@suntelecoms/ngx-dynamic-form 1.7.14 → 1.7.16
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/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://angular.dev)
|
|
6
6
|
[](https://material.angular.io)
|
|
7
|
-
[](CHANGELOG.md)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](mailto:amadoumacbookpro38@gmail.com)
|
|
10
10
|
|
|
@@ -284,8 +284,8 @@ Pour disposer du **Form Builder + gestionnaire + rendu par URL** dans votre appl
|
|
|
284
284
|
| `location` | `<input>` + bouton GPS | Champ adresse avec géolocalisation — bouton `my_location` déclenche `navigator.geolocation` _(v1.2.8)_ |
|
|
285
285
|
| `file` | Dropzone (clic ou glisser-déposer) + liste de fichiers choisis | Téléversement — `accept`, `multiple` ; `formControl.value` = `File` (ou `File[]` si `multiple`), à empaqueter en `FormData` par le consommateur dans `onSubmit` — le plugin ne fait aucun appel HTTP lui-même _(fonctionnel depuis v1.7.11 — avant cette version l'`<input>` n'était pas relié au formulaire)_ |
|
|
286
286
|
| `phone` | `mat-form-field` + menu pays | Téléphone international — sélecteur de pays (menu + recherche), masque automatique, valeur E.164 dans le FormGroup _(v1.4.0, v1.4.7)_ |
|
|
287
|
-
| `iso-country` | `mat-autocomplete` — recherche pays | Code ISO 3166-1 alpha-2 : liste déroulante recherchable (nom ou code) avec drapeau, sur le même référentiel `PHONE_COUNTRIES` que `country-dial-code` (son `.code` EST le code ISO) — garantit un code toujours valide, pas de saisie libre ; validation `^[A-Za-z]{2}$` conservée en filet de sécurité si une valeur est posée par programmation _(v1.7.12 en saisie libre, converti en liste déroulante en v1.7.14)_ |
|
|
288
|
-
| `country-dial-code` | `mat-autocomplete` — recherche pays | Choix de l'indicatif téléphonique d'un pays comme attribut autonome (ex: `Pays.indicatifTel = '+221'`) — distinct de `phone` (qui saisit un numéro complet E.164) ; recherche par nom, indicatif ou code sur le même référentiel `PHONE_COUNTRIES
|
|
287
|
+
| `iso-country` | `mat-autocomplete` — recherche pays | Code ISO 3166-1 alpha-2 : liste déroulante recherchable (nom ou code) avec drapeau SVG (`flag-icons`, même rendu que `phone` — pas d'emoji, repli en deux lettres nues sur certains Windows/webviews), sur le même référentiel `PHONE_COUNTRIES` que `country-dial-code` (son `.code` EST le code ISO) — garantit un code toujours valide, pas de saisie libre ; validation `^[A-Za-z]{2}$` conservée en filet de sécurité si une valeur est posée par programmation _(v1.7.12 en saisie libre, converti en liste déroulante en v1.7.14, drapeau SVG en v1.7.15)_ |
|
|
288
|
+
| `country-dial-code` | `mat-autocomplete` — recherche pays | Choix de l'indicatif téléphonique d'un pays comme attribut autonome (ex: `Pays.indicatifTel = '+221'`) — distinct de `phone` (qui saisit un numéro complet E.164) ; recherche par nom, indicatif ou code sur le même référentiel `PHONE_COUNTRIES`, drapeau SVG (`flag-icons`, même rendu que `phone`) dans chaque résultat, `formControl.value` = l'indicatif choisi (ex: `'+221'`) _(v1.7.13, drapeau SVG en v1.7.15)_ |
|
|
289
289
|
|
|
290
290
|
### Mise en page
|
|
291
291
|
|
|
@@ -1247,11 +1247,16 @@ class DynamicFieldComponent {
|
|
|
1247
1247
|
}));
|
|
1248
1248
|
}
|
|
1249
1249
|
this.loadingOptions = false;
|
|
1250
|
+
// Réponse HTTP arrivée dans un callback async : sans ça, mat-select n'affiche le
|
|
1251
|
+
// libellé de la valeur déjà pré-remplie (mode édition) qu'au prochain cycle de
|
|
1252
|
+
// détection de changements déclenché par autre chose (ex: cliquer sur le select).
|
|
1253
|
+
this.cdr.markForCheck();
|
|
1250
1254
|
},
|
|
1251
1255
|
error: (err) => {
|
|
1252
1256
|
console.error(`[ngx-dynamic-form] Échec du chargement des options pour "${this.field.key}" (${url}):`, err);
|
|
1253
1257
|
this.resolvedOptions = [];
|
|
1254
1258
|
this.loadingOptions = false;
|
|
1259
|
+
this.cdr.markForCheck();
|
|
1255
1260
|
},
|
|
1256
1261
|
});
|
|
1257
1262
|
}
|
|
@@ -1835,7 +1840,7 @@ class DynamicFieldComponent {
|
|
|
1835
1840
|
[readonly]="field.readonly || false" />
|
|
1836
1841
|
<mat-autocomplete #isoCountryAutoSimple="matAutocomplete" [displayWith]="displayIsoCountry" (optionSelected)="onIsoCountrySelected($event)">
|
|
1837
1842
|
@for (c of filteredIsoCountries; track c.code) {
|
|
1838
|
-
<mat-option [value]="c"
|
|
1843
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.code }})</mat-option>
|
|
1839
1844
|
}
|
|
1840
1845
|
</mat-autocomplete>
|
|
1841
1846
|
@if (field.hint && !hasError) { <small class="ngx-simple-hint">{{ field.hint }}</small> }
|
|
@@ -1852,7 +1857,7 @@ class DynamicFieldComponent {
|
|
|
1852
1857
|
[readonly]="field.readonly || false" />
|
|
1853
1858
|
<mat-autocomplete #isoCountryAuto="matAutocomplete" [displayWith]="displayIsoCountry" (optionSelected)="onIsoCountrySelected($event)">
|
|
1854
1859
|
@for (c of filteredIsoCountries; track c.code) {
|
|
1855
|
-
<mat-option [value]="c"
|
|
1860
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.code }})</mat-option>
|
|
1856
1861
|
}
|
|
1857
1862
|
</mat-autocomplete>
|
|
1858
1863
|
@if (field.hint) { <mat-hint>{{ field.hint }}</mat-hint> }
|
|
@@ -1876,7 +1881,7 @@ class DynamicFieldComponent {
|
|
|
1876
1881
|
[readonly]="field.readonly || false" />
|
|
1877
1882
|
<mat-autocomplete #dialCodeAutoSimple="matAutocomplete" [displayWith]="displayDialCode" (optionSelected)="onDialCodeSelected($event)">
|
|
1878
1883
|
@for (c of filteredDialCodeCountries; track c.code) {
|
|
1879
|
-
<mat-option [value]="c"
|
|
1884
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.dialCode }})</mat-option>
|
|
1880
1885
|
}
|
|
1881
1886
|
</mat-autocomplete>
|
|
1882
1887
|
@if (field.hint && !hasError) { <small class="ngx-simple-hint">{{ field.hint }}</small> }
|
|
@@ -1893,7 +1898,7 @@ class DynamicFieldComponent {
|
|
|
1893
1898
|
[readonly]="field.readonly || false" />
|
|
1894
1899
|
<mat-autocomplete #dialCodeAuto="matAutocomplete" [displayWith]="displayDialCode" (optionSelected)="onDialCodeSelected($event)">
|
|
1895
1900
|
@for (c of filteredDialCodeCountries; track c.code) {
|
|
1896
|
-
<mat-option [value]="c"
|
|
1901
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.dialCode }})</mat-option>
|
|
1897
1902
|
}
|
|
1898
1903
|
</mat-autocomplete>
|
|
1899
1904
|
@if (field.hint) { <mat-hint>{{ field.hint }}</mat-hint> }
|
|
@@ -2440,7 +2445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2440
2445
|
[readonly]="field.readonly || false" />
|
|
2441
2446
|
<mat-autocomplete #isoCountryAutoSimple="matAutocomplete" [displayWith]="displayIsoCountry" (optionSelected)="onIsoCountrySelected($event)">
|
|
2442
2447
|
@for (c of filteredIsoCountries; track c.code) {
|
|
2443
|
-
<mat-option [value]="c"
|
|
2448
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.code }})</mat-option>
|
|
2444
2449
|
}
|
|
2445
2450
|
</mat-autocomplete>
|
|
2446
2451
|
@if (field.hint && !hasError) { <small class="ngx-simple-hint">{{ field.hint }}</small> }
|
|
@@ -2457,7 +2462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2457
2462
|
[readonly]="field.readonly || false" />
|
|
2458
2463
|
<mat-autocomplete #isoCountryAuto="matAutocomplete" [displayWith]="displayIsoCountry" (optionSelected)="onIsoCountrySelected($event)">
|
|
2459
2464
|
@for (c of filteredIsoCountries; track c.code) {
|
|
2460
|
-
<mat-option [value]="c"
|
|
2465
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.code }})</mat-option>
|
|
2461
2466
|
}
|
|
2462
2467
|
</mat-autocomplete>
|
|
2463
2468
|
@if (field.hint) { <mat-hint>{{ field.hint }}</mat-hint> }
|
|
@@ -2481,7 +2486,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2481
2486
|
[readonly]="field.readonly || false" />
|
|
2482
2487
|
<mat-autocomplete #dialCodeAutoSimple="matAutocomplete" [displayWith]="displayDialCode" (optionSelected)="onDialCodeSelected($event)">
|
|
2483
2488
|
@for (c of filteredDialCodeCountries; track c.code) {
|
|
2484
|
-
<mat-option [value]="c"
|
|
2489
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.dialCode }})</mat-option>
|
|
2485
2490
|
}
|
|
2486
2491
|
</mat-autocomplete>
|
|
2487
2492
|
@if (field.hint && !hasError) { <small class="ngx-simple-hint">{{ field.hint }}</small> }
|
|
@@ -2498,7 +2503,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2498
2503
|
[readonly]="field.readonly || false" />
|
|
2499
2504
|
<mat-autocomplete #dialCodeAuto="matAutocomplete" [displayWith]="displayDialCode" (optionSelected)="onDialCodeSelected($event)">
|
|
2500
2505
|
@for (c of filteredDialCodeCountries; track c.code) {
|
|
2501
|
-
<mat-option [value]="c"
|
|
2506
|
+
<mat-option [value]="c"><span class="fi fi-{{ c.code.toLowerCase() }} ngx-phone-flag"></span> {{ c.name }} ({{ c.dialCode }})</mat-option>
|
|
2502
2507
|
}
|
|
2503
2508
|
</mat-autocomplete>
|
|
2504
2509
|
@if (field.hint) { <mat-hint>{{ field.hint }}</mat-hint> }
|