@suntelecoms/ngx-dynamic-form 1.11.3 → 1.12.1
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 +81 -1
- package/fesm2022/suntelecoms-ngx-dynamic-form.mjs +388 -29
- package/fesm2022/suntelecoms-ngx-dynamic-form.mjs.map +1 -1
- package/lib/components/dynamic-field/dynamic-field.component.d.ts +45 -0
- package/lib/models/form-field.model.d.ts +46 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, InjectionToken, signal, makeEnvironmentProviders, ElementRef, forwardRef, Input, Directive, ChangeDetectorRef, EventEmitter, HostBinding, Output, Component, ChangeDetectionStrategy, ViewChild, computed } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, InjectionToken, signal, makeEnvironmentProviders, ElementRef, forwardRef, Input, Directive, ChangeDetectorRef, DestroyRef, EventEmitter, HostBinding, Output, Component, ChangeDetectionStrategy, ViewChild, computed } from '@angular/core';
|
|
3
3
|
import { NgComponentOutlet, JsonPipe } from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormControl, FormGroup, FormArray, Validators, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
6
6
|
import { MatIconButton, MatButton } from '@angular/material/button';
|
|
7
7
|
import { MatIcon } from '@angular/material/icon';
|
|
8
8
|
import * as i3$1 from '@angular/common/http';
|
|
9
|
-
import { HttpClient, HttpErrorResponse, HttpBackend, HttpParams } from '@angular/common/http';
|
|
9
|
+
import { HttpClient, HttpErrorResponse, HttpBackend, HttpHeaders, HttpEventType, HttpParams } from '@angular/common/http';
|
|
10
10
|
import { of, timer, map as map$1, catchError as catchError$1, tap, switchMap as switchMap$1, Subject, startWith, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
|
|
11
11
|
import { switchMap, map, catchError, first, debounceTime, distinctUntilChanged, filter, tap as tap$1 } from 'rxjs/operators';
|
|
12
12
|
import { MatFormField, MatLabel, MatError, MatHint, MatPrefix, MatSuffix } from '@angular/material/form-field';
|
|
@@ -494,6 +494,8 @@ class DynamicFormBuilderService {
|
|
|
494
494
|
if (!control.errors || !control.touched)
|
|
495
495
|
return null;
|
|
496
496
|
const msgs = validation?.messages ?? {};
|
|
497
|
+
if (control.errors['uploadPending'])
|
|
498
|
+
return 'Envoi du fichier en cours…';
|
|
497
499
|
if (control.errors['required'])
|
|
498
500
|
return msgs['required'] ?? 'Ce champ est requis.';
|
|
499
501
|
if (control.errors['email'])
|
|
@@ -1371,6 +1373,7 @@ class DynamicFieldComponent {
|
|
|
1371
1373
|
this.globalDateLocale = inject(NGX_DATE_LOCALE, { optional: true }) ?? 'fr-FR';
|
|
1372
1374
|
this.dateAdapter = inject(DateAdapter);
|
|
1373
1375
|
this.cdr = inject(ChangeDetectorRef);
|
|
1376
|
+
this.destroyRef = inject(DestroyRef);
|
|
1374
1377
|
this._resolvedOptions = [];
|
|
1375
1378
|
this.loadingOptions = false;
|
|
1376
1379
|
this.lookupLoading = false;
|
|
@@ -1419,10 +1422,18 @@ class DynamicFieldComponent {
|
|
|
1419
1422
|
return `${value.flag} ${value.name} (${value.dialCode})`;
|
|
1420
1423
|
};
|
|
1421
1424
|
// ── Fichier (type: 'file') ───────────────────────────────────────────────────
|
|
1422
|
-
// formControl.value contient directement le/les File choisi(s)
|
|
1423
|
-
// field.multiple est faux, File[] sinon) — c'est au consommateur
|
|
1424
|
-
//
|
|
1425
|
+
// Sans `field.upload` : formControl.value contient directement le/les File choisi(s)
|
|
1426
|
+
// (File si field.multiple est faux, File[] sinon) — c'est au consommateur de les envoyer.
|
|
1427
|
+
// Avec `field.upload` : chaque fichier part dès sa sélection vers l'API décrite par la
|
|
1428
|
+
// config (url, méthode, champs multipart, lecture de la réponse) ; la valeur ne garde que
|
|
1429
|
+
// le document enregistré (objet ou id selon upload.valueMode), sérialisable en JSON.
|
|
1425
1430
|
this.fileDragging = false;
|
|
1431
|
+
/** Refus avant envoi (taille) ; affiché sous la zone de dépôt. */
|
|
1432
|
+
this.fileNotice = '';
|
|
1433
|
+
/** Mode upload : fichiers en cours d'envoi, envoyés ou en échec (la valeur ne reflète que les envoyés). */
|
|
1434
|
+
this.uploadItems = [];
|
|
1435
|
+
/** Valeur posée par le champ lui-même : ne pas la relire comme un patch externe. */
|
|
1436
|
+
this.ownUploadValue = undefined;
|
|
1426
1437
|
// ── Géolocalisation ────────────────────────────────────────────────────────
|
|
1427
1438
|
this.locating = false;
|
|
1428
1439
|
this.locationError = '';
|
|
@@ -1469,6 +1480,37 @@ class DynamicFieldComponent {
|
|
|
1469
1480
|
if (this.field?.type === 'multiselect' && this.field.display === 'cards' && this.form?.get(this.field.key)) {
|
|
1470
1481
|
queueMicrotask(() => this.ensureLockedOptions());
|
|
1471
1482
|
}
|
|
1483
|
+
if (this.form?.get(this.field?.key)) {
|
|
1484
|
+
queueMicrotask(() => this.alignValueOnOptions());
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Valeur reçue d'une API (ex: booléen `true`, nombre `1`) alors que les options du formulaire portent
|
|
1489
|
+
* la même valeur en texte (`"true"`, `"1"` — le Form Builder enregistre les valeurs d'option en texte) :
|
|
1490
|
+
* la valeur prend celle de l'option correspondante, sinon la liste n'affiche rien (comparaison stricte).
|
|
1491
|
+
* Sans effet si la valeur correspond déjà à une option, est vide ou ne correspond à aucune.
|
|
1492
|
+
*/
|
|
1493
|
+
alignValueOnOptions() {
|
|
1494
|
+
if (!['select', 'multiselect', 'radio'].includes(this.field?.type))
|
|
1495
|
+
return;
|
|
1496
|
+
const control = this.form?.get(this.field.key);
|
|
1497
|
+
const options = this._resolvedOptions;
|
|
1498
|
+
if (!control || !options?.length)
|
|
1499
|
+
return;
|
|
1500
|
+
const scalar = (v) => v != null && v !== '' && typeof v !== 'object';
|
|
1501
|
+
const align = (v) => {
|
|
1502
|
+
if (!scalar(v) || options.some(o => o.value === v))
|
|
1503
|
+
return v;
|
|
1504
|
+
const match = options.find(o => scalar(o.value) && String(o.value) === String(v));
|
|
1505
|
+
return match ? match.value : v;
|
|
1506
|
+
};
|
|
1507
|
+
const value = control.value;
|
|
1508
|
+
const next = Array.isArray(value) ? value.map(align) : align(value);
|
|
1509
|
+
const changed = Array.isArray(value) ? next.some((v, i) => v !== value[i]) : next !== value;
|
|
1510
|
+
if (changed) {
|
|
1511
|
+
control.setValue(next, { emitEvent: false });
|
|
1512
|
+
this.cdr.markForCheck();
|
|
1513
|
+
}
|
|
1472
1514
|
}
|
|
1473
1515
|
get remoteSearchHasEnoughChars() {
|
|
1474
1516
|
const text = this.searchDisplayControl.value;
|
|
@@ -1505,12 +1547,34 @@ class DynamicFieldComponent {
|
|
|
1505
1547
|
const v = this.formControl.value;
|
|
1506
1548
|
if (!v)
|
|
1507
1549
|
return [];
|
|
1508
|
-
return Array.isArray(v) ? v : [v];
|
|
1550
|
+
return (Array.isArray(v) ? v : [v]).filter(isFile);
|
|
1551
|
+
}
|
|
1552
|
+
/** Lignes affichées sous la zone de dépôt (les deux modes). */
|
|
1553
|
+
get fileEntries() {
|
|
1554
|
+
if (!this.field.upload) {
|
|
1555
|
+
return this.selectedFiles.map(f => ({ name: f.name, size: f.size, status: 'done', progress: 100, canRetry: false }));
|
|
1556
|
+
}
|
|
1557
|
+
return this.uploadItems.map(i => ({
|
|
1558
|
+
name: i.value?.name ?? i.file?.name ?? '',
|
|
1559
|
+
size: i.value?.size ?? i.file?.size ?? 0,
|
|
1560
|
+
status: i.status,
|
|
1561
|
+
progress: i.progress,
|
|
1562
|
+
error: i.error,
|
|
1563
|
+
canRetry: !!i.file,
|
|
1564
|
+
}));
|
|
1565
|
+
}
|
|
1566
|
+
/** Une ligne en échec porte déjà son message : pas de « champ obligatoire » en plus. */
|
|
1567
|
+
get hasFileEntryError() {
|
|
1568
|
+
return this.uploadItems.some(i => i.status === 'error');
|
|
1569
|
+
}
|
|
1570
|
+
get canDownloadFile() {
|
|
1571
|
+
return !!(this.field.upload?.downloadUrl && this.http);
|
|
1509
1572
|
}
|
|
1510
1573
|
onFileInputChange(event) {
|
|
1511
1574
|
const input = event.target;
|
|
1512
1575
|
if (input.files)
|
|
1513
1576
|
this.setFiles(input.files);
|
|
1577
|
+
input.value = ''; // permet de resélectionner le même fichier
|
|
1514
1578
|
}
|
|
1515
1579
|
onFileDragOver(event) {
|
|
1516
1580
|
event.preventDefault();
|
|
@@ -1523,13 +1587,51 @@ class DynamicFieldComponent {
|
|
|
1523
1587
|
onFileDrop(event) {
|
|
1524
1588
|
event.preventDefault();
|
|
1525
1589
|
this.fileDragging = false;
|
|
1590
|
+
if (this.field.disabled || this.field.readonly)
|
|
1591
|
+
return;
|
|
1526
1592
|
if (event.dataTransfer?.files)
|
|
1527
1593
|
this.setFiles(event.dataTransfer.files);
|
|
1528
1594
|
}
|
|
1529
1595
|
removeFile(index, input) {
|
|
1596
|
+
input.value = ''; // permet de resélectionner le même fichier après suppression
|
|
1597
|
+
this.fileNotice = '';
|
|
1598
|
+
if (this.field.upload) {
|
|
1599
|
+
const [item] = this.uploadItems.splice(index, 1);
|
|
1600
|
+
if (item)
|
|
1601
|
+
this.discardUploadItem(item);
|
|
1602
|
+
this.writeUploadValue();
|
|
1603
|
+
return;
|
|
1604
|
+
}
|
|
1530
1605
|
const remaining = this.selectedFiles.filter((_, i) => i !== index);
|
|
1531
1606
|
this.formControl.setValue(this.field.multiple ? remaining : null, { emitEvent: true });
|
|
1532
|
-
|
|
1607
|
+
}
|
|
1608
|
+
retryUpload(index) {
|
|
1609
|
+
const item = this.uploadItems[index];
|
|
1610
|
+
if (item?.file)
|
|
1611
|
+
this.startUpload(item);
|
|
1612
|
+
}
|
|
1613
|
+
/** Télécharge un document déjà envoyé (GET blob sur upload.downloadUrl, via HttpClient : les intercepteurs d'auth s'appliquent). */
|
|
1614
|
+
downloadFile(index) {
|
|
1615
|
+
const item = this.uploadItems[index];
|
|
1616
|
+
const cfg = this.field.upload;
|
|
1617
|
+
if (!item?.value || !cfg?.downloadUrl || !this.http)
|
|
1618
|
+
return;
|
|
1619
|
+
const url = this.absoluteUrl(this.interpolateUrl(cfg.downloadUrl.replace('{id}', encodeURIComponent(item.value.id))));
|
|
1620
|
+
this.http.get(url, { responseType: 'blob' }).subscribe({
|
|
1621
|
+
next: blob => {
|
|
1622
|
+
const href = URL.createObjectURL(blob);
|
|
1623
|
+
const a = document.createElement('a');
|
|
1624
|
+
a.href = href;
|
|
1625
|
+
a.download = item.value.name;
|
|
1626
|
+
a.click();
|
|
1627
|
+
setTimeout(() => URL.revokeObjectURL(href), 1000);
|
|
1628
|
+
},
|
|
1629
|
+
error: err => {
|
|
1630
|
+
item.status = 'error';
|
|
1631
|
+
item.error = uploadErrorMessage(err);
|
|
1632
|
+
this.cdr.markForCheck();
|
|
1633
|
+
},
|
|
1634
|
+
});
|
|
1533
1635
|
}
|
|
1534
1636
|
formatFileSize(bytes) {
|
|
1535
1637
|
if (bytes < 1024)
|
|
@@ -1539,10 +1641,173 @@ class DynamicFieldComponent {
|
|
|
1539
1641
|
return `${(bytes / (1024 * 1024)).toFixed(1)} Mo`;
|
|
1540
1642
|
}
|
|
1541
1643
|
setFiles(fileList) {
|
|
1542
|
-
|
|
1644
|
+
let files = Array.from(fileList);
|
|
1543
1645
|
if (!files.length)
|
|
1544
1646
|
return;
|
|
1545
|
-
this.
|
|
1647
|
+
this.fileNotice = '';
|
|
1648
|
+
const max = this.field.maxFileSize;
|
|
1649
|
+
if (max) {
|
|
1650
|
+
const tooBig = files.filter(f => f.size > max);
|
|
1651
|
+
if (tooBig.length) {
|
|
1652
|
+
this.fileNotice = `${tooBig.map(f => f.name).join(', ')} : ${this.formatFileSize(max)} maximum par fichier.`;
|
|
1653
|
+
files = files.filter(f => f.size <= max);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
if (!this.field.multiple)
|
|
1657
|
+
files = files.slice(0, 1);
|
|
1658
|
+
if (!files.length) {
|
|
1659
|
+
this.formControl.markAsTouched();
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1662
|
+
if (!this.field.upload) {
|
|
1663
|
+
this.formControl.setValue(this.field.multiple ? [...this.selectedFiles, ...files] : files[0], { emitEvent: true });
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
if (!this.field.multiple) {
|
|
1667
|
+
this.uploadItems.forEach(i => this.discardUploadItem(i));
|
|
1668
|
+
this.uploadItems = [];
|
|
1669
|
+
}
|
|
1670
|
+
for (const file of files) {
|
|
1671
|
+
const item = { file, status: 'uploading', progress: 0 };
|
|
1672
|
+
this.uploadItems.push(item);
|
|
1673
|
+
this.startUpload(item);
|
|
1674
|
+
}
|
|
1675
|
+
this.writeUploadValue();
|
|
1676
|
+
}
|
|
1677
|
+
/** Mode upload : relit la valeur du contrôle (valeur initiale, retour sur l'étape, patchValue). */
|
|
1678
|
+
initUpload() {
|
|
1679
|
+
this.syncUploadItemsFromValue(this.formControl.value);
|
|
1680
|
+
// Envoi en cours : le champ (donc le formulaire) reste invalide tant que le document n'est pas enregistré.
|
|
1681
|
+
this.formControl.addValidators(() => this.uploadItems.some(i => i.status === 'uploading') ? { uploadPending: true } : null);
|
|
1682
|
+
this.formControl.updateValueAndValidity({ emitEvent: false });
|
|
1683
|
+
this.formControl.valueChanges.subscribe(v => {
|
|
1684
|
+
if (v !== this.ownUploadValue)
|
|
1685
|
+
this.syncUploadItemsFromValue(v);
|
|
1686
|
+
});
|
|
1687
|
+
this.destroyRef.onDestroy(() => this.uploadItems.forEach(i => i.sub?.unsubscribe()));
|
|
1688
|
+
}
|
|
1689
|
+
syncUploadItemsFromValue(v) {
|
|
1690
|
+
const list = v == null || v === '' ? [] : Array.isArray(v) ? v : [v];
|
|
1691
|
+
const done = list
|
|
1692
|
+
.filter(x => x != null && !isFile(x))
|
|
1693
|
+
.map(x => ({
|
|
1694
|
+
status: 'done',
|
|
1695
|
+
progress: 100,
|
|
1696
|
+
value: typeof x === 'object'
|
|
1697
|
+
? x
|
|
1698
|
+
: { id: String(x), name: String(x), size: 0, type: '' },
|
|
1699
|
+
}));
|
|
1700
|
+
// Les envois en cours ou en échec ne sont pas dans la valeur : on les garde.
|
|
1701
|
+
this.uploadItems = [...done, ...this.uploadItems.filter(i => i.status !== 'done')];
|
|
1702
|
+
this.cdr.markForCheck();
|
|
1703
|
+
}
|
|
1704
|
+
startUpload(item) {
|
|
1705
|
+
const cfg = this.field.upload;
|
|
1706
|
+
if (!this.http) {
|
|
1707
|
+
console.warn(`[ngx-dynamic-form] Le champ "${this.field.key}" a upload mais HttpClient n'est pas disponible. Ajoutez provideHttpClient().`);
|
|
1708
|
+
item.status = 'error';
|
|
1709
|
+
item.error = 'Envoi impossible : HttpClient absent.';
|
|
1710
|
+
return;
|
|
1711
|
+
}
|
|
1712
|
+
const file = item.file;
|
|
1713
|
+
const body = new FormData();
|
|
1714
|
+
body.append(cfg.fileParam || 'file', file, file.name);
|
|
1715
|
+
for (const [k, raw] of Object.entries(cfg.params ?? {})) {
|
|
1716
|
+
const value = this.interpolateText(raw);
|
|
1717
|
+
if (value !== '')
|
|
1718
|
+
body.append(k, value);
|
|
1719
|
+
}
|
|
1720
|
+
let headers = new HttpHeaders();
|
|
1721
|
+
for (const [k, raw] of Object.entries(cfg.headers ?? {}))
|
|
1722
|
+
headers = headers.set(k, this.interpolateText(raw));
|
|
1723
|
+
const url = this.absoluteUrl(this.interpolateUrl(cfg.url));
|
|
1724
|
+
item.sub?.unsubscribe();
|
|
1725
|
+
item.status = 'uploading';
|
|
1726
|
+
item.progress = 0;
|
|
1727
|
+
item.error = undefined;
|
|
1728
|
+
this.formControl.updateValueAndValidity();
|
|
1729
|
+
item.sub = this.http.request(cfg.method ?? 'POST', url, { body, headers, reportProgress: true, observe: 'events' }).subscribe({
|
|
1730
|
+
next: ev => {
|
|
1731
|
+
if (ev.type === HttpEventType.UploadProgress && ev.total) {
|
|
1732
|
+
item.progress = Math.min(99, Math.round((100 * ev.loaded) / ev.total));
|
|
1733
|
+
}
|
|
1734
|
+
else if (ev.type === HttpEventType.Response) {
|
|
1735
|
+
const value = this.toUploadedValue(ev.body, file);
|
|
1736
|
+
if (value) {
|
|
1737
|
+
item.value = value;
|
|
1738
|
+
item.file = undefined;
|
|
1739
|
+
item.status = 'done';
|
|
1740
|
+
item.progress = 100;
|
|
1741
|
+
}
|
|
1742
|
+
else {
|
|
1743
|
+
item.status = 'error';
|
|
1744
|
+
item.error = `Réponse de l'API sans « ${cfg.idKey ?? 'id'} » : document non enregistré.`;
|
|
1745
|
+
}
|
|
1746
|
+
this.writeUploadValue();
|
|
1747
|
+
}
|
|
1748
|
+
this.cdr.markForCheck();
|
|
1749
|
+
},
|
|
1750
|
+
error: err => {
|
|
1751
|
+
item.status = 'error';
|
|
1752
|
+
item.error = uploadErrorMessage(err);
|
|
1753
|
+
this.formControl.updateValueAndValidity();
|
|
1754
|
+
this.formControl.markAsTouched();
|
|
1755
|
+
this.cdr.markForCheck();
|
|
1756
|
+
},
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
/** Lit le document enregistré dans la réponse selon la config (responseDataKey, idKey, nameKey, keepKeys). */
|
|
1760
|
+
toUploadedValue(response, file) {
|
|
1761
|
+
const cfg = this.field.upload;
|
|
1762
|
+
const key = cfg.responseDataKey ?? 'data';
|
|
1763
|
+
const doc = key ? getPath(response, key) : response;
|
|
1764
|
+
const id = doc?.[cfg.idKey ?? 'id'];
|
|
1765
|
+
if (id == null || id === '')
|
|
1766
|
+
return null;
|
|
1767
|
+
const value = {
|
|
1768
|
+
id: String(id),
|
|
1769
|
+
name: String(doc?.[cfg.nameKey ?? 'name'] ?? file.name),
|
|
1770
|
+
size: file.size,
|
|
1771
|
+
type: file.type,
|
|
1772
|
+
};
|
|
1773
|
+
for (const k of cfg.keepKeys ?? [])
|
|
1774
|
+
if (doc?.[k] !== undefined)
|
|
1775
|
+
value[k] = doc[k];
|
|
1776
|
+
return value;
|
|
1777
|
+
}
|
|
1778
|
+
/** Valeur du contrôle = documents enregistrés uniquement (objet ou id selon valueMode). */
|
|
1779
|
+
writeUploadValue() {
|
|
1780
|
+
const byId = this.field.upload?.valueMode === 'id';
|
|
1781
|
+
const done = this.uploadItems.filter(i => i.status === 'done' && i.value).map(i => (byId ? i.value.id : i.value));
|
|
1782
|
+
const value = this.field.multiple ? done : (done[0] ?? null);
|
|
1783
|
+
this.ownUploadValue = value;
|
|
1784
|
+
this.formControl.setValue(value);
|
|
1785
|
+
this.formControl.markAsTouched();
|
|
1786
|
+
this.cdr.markForCheck();
|
|
1787
|
+
}
|
|
1788
|
+
/** Retrait d'une ligne : annule l'envoi en cours, ou supprime côté API si upload.deleteUrl est fourni. */
|
|
1789
|
+
discardUploadItem(item) {
|
|
1790
|
+
item.sub?.unsubscribe();
|
|
1791
|
+
const cfg = this.field.upload;
|
|
1792
|
+
if (item.status === 'done' && item.value && cfg?.deleteUrl && this.http) {
|
|
1793
|
+
const url = this.absoluteUrl(this.interpolateUrl(cfg.deleteUrl.replace('{id}', encodeURIComponent(item.value.id))));
|
|
1794
|
+
this.http.delete(url).subscribe({
|
|
1795
|
+
error: err => console.error(`[ngx-dynamic-form] Suppression du document "${item.value.id}" impossible (${url}) :`, err),
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
/** 'http…' ou '/…' tels quels, sinon relatif à dataUrl (même règle que `url` des options). */
|
|
1800
|
+
absoluteUrl(endpoint) {
|
|
1801
|
+
if (endpoint.startsWith('http') || endpoint.startsWith('/'))
|
|
1802
|
+
return endpoint;
|
|
1803
|
+
return `${this.dataApiUrl.replace(/\/$/, '')}/${endpoint}`;
|
|
1804
|
+
}
|
|
1805
|
+
/** `{{cléDeChamp}}` remplacé par la valeur brute du champ (champs multipart, en-têtes). */
|
|
1806
|
+
interpolateText(text) {
|
|
1807
|
+
return String(text ?? '').replace(/\{\{(\w+)\}\}/g, (_m, key) => {
|
|
1808
|
+
const value = this.form.get(key)?.value;
|
|
1809
|
+
return value != null ? String(value) : '';
|
|
1810
|
+
});
|
|
1546
1811
|
}
|
|
1547
1812
|
get filteredPhoneCountries() {
|
|
1548
1813
|
const term = this.phoneSearch.trim().toLowerCase();
|
|
@@ -1660,6 +1925,11 @@ class DynamicFieldComponent {
|
|
|
1660
1925
|
queueMicrotask(() => this.ensureLockedOptions());
|
|
1661
1926
|
this.formControl.valueChanges.subscribe(() => this.ensureLockedOptions());
|
|
1662
1927
|
}
|
|
1928
|
+
// Valeur posée après coup (patchValue, mode édition) : même alignement sur le type des options.
|
|
1929
|
+
if (this.hasOptions) {
|
|
1930
|
+
queueMicrotask(() => this.alignValueOnOptions());
|
|
1931
|
+
this.formControl.valueChanges.subscribe(() => this.alignValueOnOptions());
|
|
1932
|
+
}
|
|
1663
1933
|
// Convertit une valeur string "YYYY-MM-DD" en Date pour le mat-datepicker
|
|
1664
1934
|
if (this.field.type === 'date' && !this.isSimple) {
|
|
1665
1935
|
this.dateAdapter.setLocale(this.field.dateLocale ?? this.globalDateLocale);
|
|
@@ -1671,6 +1941,10 @@ class DynamicFieldComponent {
|
|
|
1671
1941
|
}
|
|
1672
1942
|
}
|
|
1673
1943
|
}
|
|
1944
|
+
// Fichier envoyé à une API dès sa sélection (field.upload)
|
|
1945
|
+
if (this.field.type === 'file' && this.field.upload) {
|
|
1946
|
+
this.initUpload();
|
|
1947
|
+
}
|
|
1674
1948
|
// Initialise le range à la valeur min si null
|
|
1675
1949
|
if (this.field.type === 'range' && this.formControl.value == null) {
|
|
1676
1950
|
this.formControl.setValue(this.field.min ?? 0, { emitEvent: false });
|
|
@@ -2585,7 +2859,7 @@ class DynamicFieldComponent {
|
|
|
2585
2859
|
(change)="onFileInputChange($event)"
|
|
2586
2860
|
class="ngx-file-input-native" />
|
|
2587
2861
|
|
|
2588
|
-
@if (
|
|
2862
|
+
@if (fileEntries.length === 0) {
|
|
2589
2863
|
<button type="button"
|
|
2590
2864
|
class="ngx-file-dropzone"
|
|
2591
2865
|
[class.ngx-file-dropzone-active]="fileDragging"
|
|
@@ -2597,19 +2871,50 @@ class DynamicFieldComponent {
|
|
|
2597
2871
|
>
|
|
2598
2872
|
<mat-icon>cloud_upload</mat-icon>
|
|
2599
2873
|
<span><strong>Cliquez pour choisir</strong> ou glissez-déposez{{ field.multiple ? ' un ou plusieurs fichiers' : ' un fichier' }}</span>
|
|
2874
|
+
@if (field.maxFileSize) { <small class="ngx-file-dropzone-max">{{ formatFileSize(field.maxFileSize) }} maximum par fichier</small> }
|
|
2600
2875
|
</button>
|
|
2601
2876
|
} @else {
|
|
2602
|
-
<div class="ngx-file-list">
|
|
2603
|
-
@for (
|
|
2604
|
-
<div class="ngx-file-chip">
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2877
|
+
<div class="ngx-file-list" aria-live="polite">
|
|
2878
|
+
@for (entry of fileEntries; track $index; let fi = $index) {
|
|
2879
|
+
<div class="ngx-file-chip" [attr.data-status]="entry.status">
|
|
2880
|
+
@if (entry.status === 'uploading') {
|
|
2881
|
+
<mat-progress-spinner class="ngx-file-chip-spinner" diameter="18" strokeWidth="2.5"
|
|
2882
|
+
[mode]="entry.progress > 0 ? 'determinate' : 'indeterminate'" [value]="entry.progress"></mat-progress-spinner>
|
|
2883
|
+
} @else if (entry.status === 'error') {
|
|
2884
|
+
<mat-icon class="ngx-file-chip-icon-error">error_outline</mat-icon>
|
|
2885
|
+
} @else if (field.upload) {
|
|
2886
|
+
<mat-icon class="ngx-file-chip-icon-done">task</mat-icon>
|
|
2887
|
+
} @else {
|
|
2888
|
+
<mat-icon>description</mat-icon>
|
|
2889
|
+
}
|
|
2890
|
+
<span class="ngx-file-chip-body">
|
|
2891
|
+
@if (entry.status === 'done' && canDownloadFile) {
|
|
2892
|
+
<button type="button" class="ngx-file-chip-name ngx-file-chip-link" (click)="downloadFile(fi)" [title]="'Télécharger ' + entry.name">{{ entry.name }}</button>
|
|
2893
|
+
} @else {
|
|
2894
|
+
<span class="ngx-file-chip-name" [title]="entry.name">{{ entry.name }}</span>
|
|
2895
|
+
}
|
|
2896
|
+
@if (entry.status === 'error') {
|
|
2897
|
+
<span class="ngx-file-chip-error" role="alert">{{ entry.error }}</span>
|
|
2898
|
+
}
|
|
2899
|
+
</span>
|
|
2900
|
+
<span class="ngx-file-chip-size">
|
|
2901
|
+
@if (entry.status === 'uploading') { Envoi… {{ entry.progress > 0 ? entry.progress + ' %' : '' }} }
|
|
2902
|
+
@else if (entry.size) { {{ formatFileSize(entry.size) }} }
|
|
2903
|
+
</span>
|
|
2904
|
+
@if (entry.status === 'error' && entry.canRetry && !field.disabled && !field.readonly) {
|
|
2905
|
+
<button type="button" class="ngx-file-chip-remove" (click)="retryUpload(fi)" title="Réessayer l’envoi" aria-label="Réessayer l’envoi">
|
|
2906
|
+
<mat-icon>refresh</mat-icon>
|
|
2907
|
+
</button>
|
|
2908
|
+
}
|
|
2608
2909
|
@if (!field.disabled && !field.readonly) {
|
|
2609
|
-
<button type="button" class="ngx-file-chip-remove" (click)="removeFile(fi, fileInput)"
|
|
2910
|
+
<button type="button" class="ngx-file-chip-remove" (click)="removeFile(fi, fileInput)"
|
|
2911
|
+
[title]="entry.status === 'uploading' ? 'Annuler l’envoi' : 'Retirer'" [attr.aria-label]="'Retirer ' + entry.name">
|
|
2610
2912
|
<mat-icon>close</mat-icon>
|
|
2611
2913
|
</button>
|
|
2612
2914
|
}
|
|
2915
|
+
@if (entry.status === 'uploading') {
|
|
2916
|
+
<span class="ngx-file-chip-progress" [style.transform]="'scaleX(' + entry.progress / 100 + ')'"></span>
|
|
2917
|
+
}
|
|
2613
2918
|
</div>
|
|
2614
2919
|
}
|
|
2615
2920
|
@if (field.multiple && !field.disabled && !field.readonly) {
|
|
@@ -2619,9 +2924,10 @@ class DynamicFieldComponent {
|
|
|
2619
2924
|
}
|
|
2620
2925
|
</div>
|
|
2621
2926
|
}
|
|
2927
|
+
@if (fileNotice) { <small class="ngx-mat-standalone-error" role="alert">{{ fileNotice }}</small> }
|
|
2622
2928
|
|
|
2623
2929
|
@if (field.hint && !hasError) { <small class="ngx-hint">{{ field.hint }}</small> }
|
|
2624
|
-
@if (hasError) { <small class="ngx-mat-standalone-error">{{ errorMessage }}</small> }
|
|
2930
|
+
@if (hasError && !fileNotice && !hasFileEntryError) { <small class="ngx-mat-standalone-error">{{ errorMessage }}</small> }
|
|
2625
2931
|
</div>
|
|
2626
2932
|
|
|
2627
2933
|
} @else if (field.type === 'phone') {
|
|
@@ -2901,7 +3207,7 @@ class DynamicFieldComponent {
|
|
|
2901
3207
|
}
|
|
2902
3208
|
}
|
|
2903
3209
|
}
|
|
2904
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;width:100%;--ngx-field-color: inherit;--ngx-field-bg: transparent;--ngx-field-align: left}:host ::ng-deep .mat-mdc-input-element{color:var(--ngx-field-color)!important;text-align:var(--ngx-field-align)!important}:host ::ng-deep .mat-mdc-text-field-wrapper{background-color:var(--ngx-field-bg)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__leading,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__notch,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__trailing{border-color:var(--ngx-border-color)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:before,:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:after{border-bottom-color:var(--ngx-border-color)!important}:host[style*=--ngx-label-color] ::ng-deep .mdc-floating-label,:host[style*=--ngx-label-color] ::ng-deep .mat-mdc-floating-label{color:var(--ngx-label-color)!important}::ng-deep .ngx-phone-menu{min-width:280px}.ngx-affix-text{font-size:.9em;color:#0000008a;padding:0 2px}.ngx-mat-field{width:100%}.ngx-simple-field{display:flex;flex-direction:column;gap:.375rem;width:100%;padding-bottom:.75rem}.ngx-simple-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151);line-height:1.25}.ngx-simple-required{color:#ef4444}.ngx-simple-input-row{display:flex;align-items:center;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;background:#fff;transition:border-color .15s,box-shadow .15s;overflow:hidden;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-simple-error-border{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-simple-input,.ngx-simple-select,textarea.ngx-simple-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;resize:vertical;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}textarea.ngx-simple-input{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;transition:border-color .15s,box-shadow .15s;width:100%;box-sizing:border-box;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-select{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;width:100%;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .75rem center;background-size:1.25em;appearance:none;-webkit-appearance:none;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-icon{font-size:1.1rem;width:1.1rem;height:1.1rem;color:#9ca3af;padding:0 0 0 .75rem;flex-shrink:0}.ngx-simple-affix{font-size:.9rem;color:#6b7280;flex-shrink:0;white-space:nowrap}.ngx-simple-prefix{padding-left:.75rem}.ngx-simple-suffix{padding-right:.75rem}.ngx-simple-hint{font-size:.75rem;color:#6b7280}.ngx-simple-error-msg{font-size:.75rem;color:#ef4444}.ngx-simple-loading{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;font-size:.8125rem;color:#9ca3af}.ngx-radio-wrapper{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0 .75rem}.ngx-radio-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-radio-group{display:flex;flex-wrap:wrap;gap:.75rem}.ngx-cards{--ngx-cards-primary: var(--ngx-df-primary, var(--mat-sys-primary, #0c1a4a))}.ngx-cards__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ngx-cards__label{color:var(--ngx-cards-primary);font-size:1rem;font-weight:700}.ngx-cards__counter{padding:4px 12px;border-radius:999px;background:#eef0f5;color:var(--ngx-cards-primary);font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-cards__hint{margin:8px 0 0;color:#64748b;font-size:.875rem}.ngx-cards__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:12px;margin-top:12px}.ngx-custom-missing{margin:0;padding:10px 14px;border:1px dashed #ef9a9a;border-radius:8px;color:#b71c1c;font-size:.875rem}.ngx-cards__section--group{margin-top:16px;padding:12px 16px 16px;border:1px dashed #d5dae5;border-radius:12px}.ngx-cards__section--group .ngx-cards__grid{margin-top:10px}.ngx-cards__group-head{display:flex;align-items:center;gap:10px}.ngx-cards__group-title{color:var(--ngx-cards-primary);font-weight:700}.ngx-cards__group-badge{padding:2px 10px;border-radius:999px;background:#fdf0dc;color:#b8680d;font-size:.75rem;font-weight:700}.ngx-card{display:flex;align-items:center;gap:8px;min-height:56px;padding:4px 12px 4px 4px;border:1px solid #e3e6ee;border-radius:12px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ngx-card:hover:not(.ngx-card--disabled){border-color:#c7cddb}.ngx-card--checked{border:2px solid var(--ngx-cards-primary);padding:3px 11px 3px 3px}.ngx-card--locked{background:#fafbfd}.ngx-card__check{flex:1 1 auto;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field{display:flex;flex-wrap:nowrap;align-items:center;width:100%;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field>.mdc-checkbox{flex:0 0 auto}.ngx-card__check ::ng-deep label{flex:1 1 auto;min-width:0;font-weight:600;line-height:1.3;color:#0f172a;cursor:pointer}.ngx-card__texte{overflow-wrap:break-word}.ngx-card--disabled .ngx-card__check ::ng-deep label{cursor:default}.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox--disabled.mat-mdc-checkbox-checked .mdc-checkbox__background,.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background{background-color:var(--ngx-cards-primary)!important;border-color:var(--ngx-cards-primary)!important}.ngx-card--locked .ngx-card__check ::ng-deep label{color:#0f172a!important}.ngx-card__badge{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:0 2px;color:#64748b;font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-card__badge mat-icon{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;font-size:14px!important;line-height:14px!important;overflow:hidden}@media(prefers-reduced-motion:reduce){.ngx-card{transition:none}}.ngx-checkbox-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.25rem 0}.ngx-file-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-file-label{font-size:.875rem;font-weight:500;color:#000000de}.ngx-file-input-native{display:none}.ngx-file-dropzone{display:flex;flex-direction:column;align-items:center;gap:.375rem;width:100%;border:1.5px dashed rgba(0,0,0,.23);border-radius:6px;padding:1.25rem 1rem;font-size:.8125rem;color:#0009;text-align:center;cursor:pointer;background:#00000004;transition:border-color .15s,background-color .15s}.ngx-file-dropzone:hover:not(:disabled){border-color:#6366f1;background:#6366f10a}.ngx-file-dropzone-active{border-color:#6366f1;background:#6366f10f}.ngx-file-dropzone:disabled{cursor:not-allowed;opacity:.6}.ngx-file-dropzone mat-icon{color:#0006}.ngx-file-list{display:flex;flex-direction:column;gap:.375rem}.ngx-file-chip{display:flex;align-items:center;gap:.5rem;border:1px solid rgba(0,0,0,.12);border-radius:6px;padding:.5rem .625rem;background:#00000004}.ngx-file-chip mat-icon{color:#6366f1;flex-shrink:0}.ngx-file-chip-name{flex:1;font-size:.8125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-file-chip-size{font-size:.75rem;color:#00000080;flex-shrink:0}.ngx-file-chip-remove{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:#0006;flex-shrink:0}.ngx-file-chip-remove:hover{color:#dc2626}.ngx-file-chip-remove mat-icon{font-size:18px;width:18px;height:18px}.ngx-file-add-more{display:flex;align-items:center;gap:.25rem;align-self:flex-start;border:none;background:transparent;color:#6366f1;font-size:.8125rem;cursor:pointer;padding:.25rem 0}.ngx-geo-btn{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:none;background:transparent;cursor:pointer;color:#6366f1;border-radius:0 7px 7px 0;flex-shrink:0;transition:background .15s;mat-icon{font-size:1.1rem;width:1.1rem;height:1.1rem}&:hover:not(:disabled){background:#6366f11a}&:disabled{color:#9ca3af;cursor:not-allowed}}.ngx-switch-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.375rem 0 .75rem}.ngx-range-wrapper{display:flex;flex-direction:column;gap:.25rem;padding-bottom:.75rem;width:100%}.ngx-range-header{display:flex;align-items:center;justify-content:space-between}.ngx-range-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-range-value{font-size:.875rem;font-weight:600;color:#6366f1;min-width:2.5rem;text-align:right}.ngx-slider{width:100%}.ngx-range-limits{display:flex;justify-content:space-between;font-size:.7rem;color:#00000061;margin-top:-.25rem}.ngx-color-field{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-color-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-color-row{display:flex;align-items:center;gap:.75rem}.ngx-color-input{width:48px;height:40px;border:1px solid rgba(0,0,0,.23);border-radius:6px;padding:2px;cursor:pointer;background:transparent}.ngx-color-hex{font-size:.875rem;color:#0009;font-family:monospace}.ngx-mat-standalone-error{font-size:.75rem;color:var(--mat-sys-error, #b00020)}.ngx-amount-input{font-variant-numeric:tabular-nums}.ngx-phone-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem;width:100%}.ngx-phone-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151)}.ngx-phone-row{display:flex;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-phone-error{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-phone-country{border:none;border-right:1px solid #e5e7eb;background:#f9fafb;padding:0 8px;font-size:.875rem;cursor:pointer;outline:none;min-width:90px;color:#374151;appearance:none;-webkit-appearance:none;&:focus{background:#f3f4f6}}.ngx-phone-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}.ngx-phone-flag-trigger{display:flex;align-items:center;gap:.375rem;border:none;background:transparent;padding:0 .375rem;margin-right:.375rem;cursor:pointer;border-radius:4px;&:hover{background:#0000000a}&:focus-visible{outline:2px solid rgba(99,102,241,.5);outline-offset:1px}}.ngx-phone-flag{font-size:1.25rem;vertical-align:middle;border-radius:2px;box-shadow:0 0 0 1px #00000014}.ngx-phone-menu-list .ngx-phone-flag{font-size:1.125rem}.ngx-phone-dial-code{font-size:.875rem;color:#0009}.ngx-phone-caret{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#00000073}.ngx-phone-menu-search{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border-bottom:1px solid rgba(0,0,0,.08);.ngx-phone-menu-search-icon{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#0006}input{flex:1;min-width:0;border:none;outline:none;font-size:.875rem;background:transparent;&::placeholder{color:#0006}}}.ngx-phone-menu-list{max-height:260px;overflow-y:auto}.ngx-phone-menu-list ::ng-deep .mat-mdc-menu-item-text{display:flex;align-items:center;gap:.625rem;width:100%}.ngx-phone-menu-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem}.ngx-phone-menu-dial{font-size:.8125rem;color:#00000080}.ngx-phone-menu-empty{padding:.75rem;text-align:center;font-size:.8125rem;color:#00000073}.ngx-options-loading,.ngx-options-loading-inline{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:#00000073}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i4.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i4.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i5.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: ThousandsInputDirective, selector: "input[ngxThousands]", inputs: ["ngxThousands"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] }); }
|
|
3210
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;width:100%;--ngx-field-color: inherit;--ngx-field-bg: transparent;--ngx-field-align: left}:host ::ng-deep .mat-mdc-input-element{color:var(--ngx-field-color)!important;text-align:var(--ngx-field-align)!important}:host ::ng-deep .mat-mdc-text-field-wrapper{background-color:var(--ngx-field-bg)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__leading,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__notch,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__trailing{border-color:var(--ngx-border-color)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:before,:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:after{border-bottom-color:var(--ngx-border-color)!important}:host[style*=--ngx-label-color] ::ng-deep .mdc-floating-label,:host[style*=--ngx-label-color] ::ng-deep .mat-mdc-floating-label{color:var(--ngx-label-color)!important}::ng-deep .ngx-phone-menu{min-width:280px}.ngx-affix-text{font-size:.9em;color:#0000008a;padding:0 2px}.ngx-mat-field{width:100%}.ngx-simple-field{display:flex;flex-direction:column;gap:.375rem;width:100%;padding-bottom:.75rem}.ngx-simple-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151);line-height:1.25}.ngx-simple-required{color:#ef4444}.ngx-simple-input-row{display:flex;align-items:center;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;background:#fff;transition:border-color .15s,box-shadow .15s;overflow:hidden;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-simple-error-border{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-simple-input,.ngx-simple-select,textarea.ngx-simple-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;resize:vertical;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}textarea.ngx-simple-input{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;transition:border-color .15s,box-shadow .15s;width:100%;box-sizing:border-box;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-select{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;width:100%;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .75rem center;background-size:1.25em;appearance:none;-webkit-appearance:none;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-icon{font-size:1.1rem;width:1.1rem;height:1.1rem;color:#9ca3af;padding:0 0 0 .75rem;flex-shrink:0}.ngx-simple-affix{font-size:.9rem;color:#6b7280;flex-shrink:0;white-space:nowrap}.ngx-simple-prefix{padding-left:.75rem}.ngx-simple-suffix{padding-right:.75rem}.ngx-simple-hint{font-size:.75rem;color:#6b7280}.ngx-simple-error-msg{font-size:.75rem;color:#ef4444}.ngx-simple-loading{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;font-size:.8125rem;color:#9ca3af}.ngx-radio-wrapper{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0 .75rem}.ngx-radio-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-radio-group{display:flex;flex-wrap:wrap;gap:.75rem}.ngx-cards{--ngx-cards-primary: var(--ngx-df-primary, var(--mat-sys-primary, #0c1a4a))}.ngx-cards__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ngx-cards__label{color:var(--ngx-cards-primary);font-size:1rem;font-weight:700}.ngx-cards__counter{padding:4px 12px;border-radius:999px;background:#eef0f5;color:var(--ngx-cards-primary);font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-cards__hint{margin:8px 0 0;color:#64748b;font-size:.875rem}.ngx-cards__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:12px;margin-top:12px}.ngx-custom-missing{margin:0;padding:10px 14px;border:1px dashed #ef9a9a;border-radius:8px;color:#b71c1c;font-size:.875rem}.ngx-cards__section--group{margin-top:16px;padding:12px 16px 16px;border:1px dashed #d5dae5;border-radius:12px}.ngx-cards__section--group .ngx-cards__grid{margin-top:10px}.ngx-cards__group-head{display:flex;align-items:center;gap:10px}.ngx-cards__group-title{color:var(--ngx-cards-primary);font-weight:700}.ngx-cards__group-badge{padding:2px 10px;border-radius:999px;background:#fdf0dc;color:#b8680d;font-size:.75rem;font-weight:700}.ngx-card{display:flex;align-items:center;gap:8px;min-height:56px;padding:4px 12px 4px 4px;border:1px solid #e3e6ee;border-radius:12px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ngx-card:hover:not(.ngx-card--disabled){border-color:#c7cddb}.ngx-card--checked{border:2px solid var(--ngx-cards-primary);padding:3px 11px 3px 3px}.ngx-card--locked{background:#fafbfd}.ngx-card__check{flex:1 1 auto;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field{display:flex;flex-wrap:nowrap;align-items:center;width:100%;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field>.mdc-checkbox{flex:0 0 auto}.ngx-card__check ::ng-deep label{flex:1 1 auto;min-width:0;font-weight:600;line-height:1.3;color:#0f172a;cursor:pointer}.ngx-card__texte{overflow-wrap:break-word}.ngx-card--disabled .ngx-card__check ::ng-deep label{cursor:default}.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox--disabled.mat-mdc-checkbox-checked .mdc-checkbox__background,.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background{background-color:var(--ngx-cards-primary)!important;border-color:var(--ngx-cards-primary)!important}.ngx-card--locked .ngx-card__check ::ng-deep label{color:#0f172a!important}.ngx-card__badge{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:0 2px;color:#64748b;font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-card__badge mat-icon{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;font-size:14px!important;line-height:14px!important;overflow:hidden}@media(prefers-reduced-motion:reduce){.ngx-card{transition:none}}.ngx-checkbox-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.25rem 0}.ngx-file-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-file-label{font-size:.875rem;font-weight:500;color:#000000de}.ngx-file-input-native{display:none}.ngx-file-dropzone{display:flex;flex-direction:column;align-items:center;gap:.375rem;width:100%;border:1.5px dashed rgba(0,0,0,.23);border-radius:6px;padding:1.25rem 1rem;font-size:.8125rem;color:#0009;text-align:center;cursor:pointer;background:#00000004;transition:border-color .15s,background-color .15s}.ngx-file-dropzone:hover:not(:disabled){border-color:#6366f1;background:#6366f10a}.ngx-file-dropzone-active{border-color:#6366f1;background:#6366f10f}.ngx-file-dropzone:disabled{cursor:not-allowed;opacity:.6}.ngx-file-dropzone mat-icon{color:#0006}.ngx-file-list{display:flex;flex-direction:column;gap:.375rem}.ngx-file-chip{display:flex;align-items:center;gap:.5rem;border:1px solid rgba(0,0,0,.12);border-radius:6px;padding:.5rem .625rem;background:#00000004}.ngx-file-chip mat-icon{color:#6366f1;flex-shrink:0}.ngx-file-chip{position:relative;overflow:hidden}.ngx-file-chip[data-status=error]{border-color:#dc262659;background:#dc262608}.ngx-file-chip mat-icon.ngx-file-chip-icon-error{color:#dc2626}.ngx-file-chip mat-icon.ngx-file-chip-icon-done{color:#16a34a}.ngx-file-chip-spinner{flex-shrink:0}.ngx-file-chip-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.ngx-file-chip-name{display:block;font-size:.8125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-file-chip-link{max-width:100%;padding:0;border:none;background:none;text-align:left;font:inherit;font-size:.8125rem;color:#4f46e5;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.ngx-file-chip-error{font-size:.75rem;color:#dc2626}.ngx-file-chip-progress{position:absolute;left:0;right:0;bottom:0;height:2px;background:#6366f1;transform-origin:left center;transition:transform .16s cubic-bezier(.23,1,.32,1)}.ngx-file-dropzone-max{font-size:.75rem;color:#00000073}@media(prefers-reduced-motion:reduce){.ngx-file-chip-progress{transition:none}}.ngx-file-chip-size{font-size:.75rem;color:#00000080;flex-shrink:0}.ngx-file-chip-remove{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:#0006;flex-shrink:0}.ngx-file-chip-remove:hover{color:#dc2626}.ngx-file-chip-remove mat-icon{font-size:18px;width:18px;height:18px}.ngx-file-add-more{display:flex;align-items:center;gap:.25rem;align-self:flex-start;border:none;background:transparent;color:#6366f1;font-size:.8125rem;cursor:pointer;padding:.25rem 0}.ngx-geo-btn{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:none;background:transparent;cursor:pointer;color:#6366f1;border-radius:0 7px 7px 0;flex-shrink:0;transition:background .15s;mat-icon{font-size:1.1rem;width:1.1rem;height:1.1rem}&:hover:not(:disabled){background:#6366f11a}&:disabled{color:#9ca3af;cursor:not-allowed}}.ngx-switch-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.375rem 0 .75rem}.ngx-range-wrapper{display:flex;flex-direction:column;gap:.25rem;padding-bottom:.75rem;width:100%}.ngx-range-header{display:flex;align-items:center;justify-content:space-between}.ngx-range-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-range-value{font-size:.875rem;font-weight:600;color:#6366f1;min-width:2.5rem;text-align:right}.ngx-slider{width:100%}.ngx-range-limits{display:flex;justify-content:space-between;font-size:.7rem;color:#00000061;margin-top:-.25rem}.ngx-color-field{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-color-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-color-row{display:flex;align-items:center;gap:.75rem}.ngx-color-input{width:48px;height:40px;border:1px solid rgba(0,0,0,.23);border-radius:6px;padding:2px;cursor:pointer;background:transparent}.ngx-color-hex{font-size:.875rem;color:#0009;font-family:monospace}.ngx-mat-standalone-error{font-size:.75rem;color:var(--mat-sys-error, #b00020)}.ngx-amount-input{font-variant-numeric:tabular-nums}.ngx-phone-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem;width:100%}.ngx-phone-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151)}.ngx-phone-row{display:flex;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-phone-error{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-phone-country{border:none;border-right:1px solid #e5e7eb;background:#f9fafb;padding:0 8px;font-size:.875rem;cursor:pointer;outline:none;min-width:90px;color:#374151;appearance:none;-webkit-appearance:none;&:focus{background:#f3f4f6}}.ngx-phone-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}.ngx-phone-flag-trigger{display:flex;align-items:center;gap:.375rem;border:none;background:transparent;padding:0 .375rem;margin-right:.375rem;cursor:pointer;border-radius:4px;&:hover{background:#0000000a}&:focus-visible{outline:2px solid rgba(99,102,241,.5);outline-offset:1px}}.ngx-phone-flag{font-size:1.25rem;vertical-align:middle;border-radius:2px;box-shadow:0 0 0 1px #00000014}.ngx-phone-menu-list .ngx-phone-flag{font-size:1.125rem}.ngx-phone-dial-code{font-size:.875rem;color:#0009}.ngx-phone-caret{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#00000073}.ngx-phone-menu-search{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border-bottom:1px solid rgba(0,0,0,.08);.ngx-phone-menu-search-icon{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#0006}input{flex:1;min-width:0;border:none;outline:none;font-size:.875rem;background:transparent;&::placeholder{color:#0006}}}.ngx-phone-menu-list{max-height:260px;overflow-y:auto}.ngx-phone-menu-list ::ng-deep .mat-mdc-menu-item-text{display:flex;align-items:center;gap:.625rem;width:100%}.ngx-phone-menu-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem}.ngx-phone-menu-dial{font-size:.8125rem;color:#00000080}.ngx-phone-menu-empty{padding:.75rem;text-align:center;font-size:.8125rem;color:#00000073}.ngx-options-loading,.ngx-options-loading-inline{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:#00000073}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i4.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i4.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i5.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: ThousandsInputDirective, selector: "input[ngxThousands]", inputs: ["ngxThousands"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] }); }
|
|
2905
3211
|
}
|
|
2906
3212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: DynamicFieldComponent, decorators: [{
|
|
2907
3213
|
type: Component,
|
|
@@ -3319,7 +3625,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3319
3625
|
(change)="onFileInputChange($event)"
|
|
3320
3626
|
class="ngx-file-input-native" />
|
|
3321
3627
|
|
|
3322
|
-
@if (
|
|
3628
|
+
@if (fileEntries.length === 0) {
|
|
3323
3629
|
<button type="button"
|
|
3324
3630
|
class="ngx-file-dropzone"
|
|
3325
3631
|
[class.ngx-file-dropzone-active]="fileDragging"
|
|
@@ -3331,19 +3637,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3331
3637
|
>
|
|
3332
3638
|
<mat-icon>cloud_upload</mat-icon>
|
|
3333
3639
|
<span><strong>Cliquez pour choisir</strong> ou glissez-déposez{{ field.multiple ? ' un ou plusieurs fichiers' : ' un fichier' }}</span>
|
|
3640
|
+
@if (field.maxFileSize) { <small class="ngx-file-dropzone-max">{{ formatFileSize(field.maxFileSize) }} maximum par fichier</small> }
|
|
3334
3641
|
</button>
|
|
3335
3642
|
} @else {
|
|
3336
|
-
<div class="ngx-file-list">
|
|
3337
|
-
@for (
|
|
3338
|
-
<div class="ngx-file-chip">
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3643
|
+
<div class="ngx-file-list" aria-live="polite">
|
|
3644
|
+
@for (entry of fileEntries; track $index; let fi = $index) {
|
|
3645
|
+
<div class="ngx-file-chip" [attr.data-status]="entry.status">
|
|
3646
|
+
@if (entry.status === 'uploading') {
|
|
3647
|
+
<mat-progress-spinner class="ngx-file-chip-spinner" diameter="18" strokeWidth="2.5"
|
|
3648
|
+
[mode]="entry.progress > 0 ? 'determinate' : 'indeterminate'" [value]="entry.progress"></mat-progress-spinner>
|
|
3649
|
+
} @else if (entry.status === 'error') {
|
|
3650
|
+
<mat-icon class="ngx-file-chip-icon-error">error_outline</mat-icon>
|
|
3651
|
+
} @else if (field.upload) {
|
|
3652
|
+
<mat-icon class="ngx-file-chip-icon-done">task</mat-icon>
|
|
3653
|
+
} @else {
|
|
3654
|
+
<mat-icon>description</mat-icon>
|
|
3655
|
+
}
|
|
3656
|
+
<span class="ngx-file-chip-body">
|
|
3657
|
+
@if (entry.status === 'done' && canDownloadFile) {
|
|
3658
|
+
<button type="button" class="ngx-file-chip-name ngx-file-chip-link" (click)="downloadFile(fi)" [title]="'Télécharger ' + entry.name">{{ entry.name }}</button>
|
|
3659
|
+
} @else {
|
|
3660
|
+
<span class="ngx-file-chip-name" [title]="entry.name">{{ entry.name }}</span>
|
|
3661
|
+
}
|
|
3662
|
+
@if (entry.status === 'error') {
|
|
3663
|
+
<span class="ngx-file-chip-error" role="alert">{{ entry.error }}</span>
|
|
3664
|
+
}
|
|
3665
|
+
</span>
|
|
3666
|
+
<span class="ngx-file-chip-size">
|
|
3667
|
+
@if (entry.status === 'uploading') { Envoi… {{ entry.progress > 0 ? entry.progress + ' %' : '' }} }
|
|
3668
|
+
@else if (entry.size) { {{ formatFileSize(entry.size) }} }
|
|
3669
|
+
</span>
|
|
3670
|
+
@if (entry.status === 'error' && entry.canRetry && !field.disabled && !field.readonly) {
|
|
3671
|
+
<button type="button" class="ngx-file-chip-remove" (click)="retryUpload(fi)" title="Réessayer l’envoi" aria-label="Réessayer l’envoi">
|
|
3672
|
+
<mat-icon>refresh</mat-icon>
|
|
3673
|
+
</button>
|
|
3674
|
+
}
|
|
3342
3675
|
@if (!field.disabled && !field.readonly) {
|
|
3343
|
-
<button type="button" class="ngx-file-chip-remove" (click)="removeFile(fi, fileInput)"
|
|
3676
|
+
<button type="button" class="ngx-file-chip-remove" (click)="removeFile(fi, fileInput)"
|
|
3677
|
+
[title]="entry.status === 'uploading' ? 'Annuler l’envoi' : 'Retirer'" [attr.aria-label]="'Retirer ' + entry.name">
|
|
3344
3678
|
<mat-icon>close</mat-icon>
|
|
3345
3679
|
</button>
|
|
3346
3680
|
}
|
|
3681
|
+
@if (entry.status === 'uploading') {
|
|
3682
|
+
<span class="ngx-file-chip-progress" [style.transform]="'scaleX(' + entry.progress / 100 + ')'"></span>
|
|
3683
|
+
}
|
|
3347
3684
|
</div>
|
|
3348
3685
|
}
|
|
3349
3686
|
@if (field.multiple && !field.disabled && !field.readonly) {
|
|
@@ -3353,9 +3690,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3353
3690
|
}
|
|
3354
3691
|
</div>
|
|
3355
3692
|
}
|
|
3693
|
+
@if (fileNotice) { <small class="ngx-mat-standalone-error" role="alert">{{ fileNotice }}</small> }
|
|
3356
3694
|
|
|
3357
3695
|
@if (field.hint && !hasError) { <small class="ngx-hint">{{ field.hint }}</small> }
|
|
3358
|
-
@if (hasError) { <small class="ngx-mat-standalone-error">{{ errorMessage }}</small> }
|
|
3696
|
+
@if (hasError && !fileNotice && !hasFileEntryError) { <small class="ngx-mat-standalone-error">{{ errorMessage }}</small> }
|
|
3359
3697
|
</div>
|
|
3360
3698
|
|
|
3361
3699
|
} @else if (field.type === 'phone') {
|
|
@@ -3635,7 +3973,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3635
3973
|
}
|
|
3636
3974
|
}
|
|
3637
3975
|
}
|
|
3638
|
-
`, styles: [":host{display:flex;flex-direction:column;width:100%;--ngx-field-color: inherit;--ngx-field-bg: transparent;--ngx-field-align: left}:host ::ng-deep .mat-mdc-input-element{color:var(--ngx-field-color)!important;text-align:var(--ngx-field-align)!important}:host ::ng-deep .mat-mdc-text-field-wrapper{background-color:var(--ngx-field-bg)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__leading,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__notch,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__trailing{border-color:var(--ngx-border-color)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:before,:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:after{border-bottom-color:var(--ngx-border-color)!important}:host[style*=--ngx-label-color] ::ng-deep .mdc-floating-label,:host[style*=--ngx-label-color] ::ng-deep .mat-mdc-floating-label{color:var(--ngx-label-color)!important}::ng-deep .ngx-phone-menu{min-width:280px}.ngx-affix-text{font-size:.9em;color:#0000008a;padding:0 2px}.ngx-mat-field{width:100%}.ngx-simple-field{display:flex;flex-direction:column;gap:.375rem;width:100%;padding-bottom:.75rem}.ngx-simple-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151);line-height:1.25}.ngx-simple-required{color:#ef4444}.ngx-simple-input-row{display:flex;align-items:center;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;background:#fff;transition:border-color .15s,box-shadow .15s;overflow:hidden;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-simple-error-border{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-simple-input,.ngx-simple-select,textarea.ngx-simple-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;resize:vertical;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}textarea.ngx-simple-input{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;transition:border-color .15s,box-shadow .15s;width:100%;box-sizing:border-box;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-select{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;width:100%;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .75rem center;background-size:1.25em;appearance:none;-webkit-appearance:none;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-icon{font-size:1.1rem;width:1.1rem;height:1.1rem;color:#9ca3af;padding:0 0 0 .75rem;flex-shrink:0}.ngx-simple-affix{font-size:.9rem;color:#6b7280;flex-shrink:0;white-space:nowrap}.ngx-simple-prefix{padding-left:.75rem}.ngx-simple-suffix{padding-right:.75rem}.ngx-simple-hint{font-size:.75rem;color:#6b7280}.ngx-simple-error-msg{font-size:.75rem;color:#ef4444}.ngx-simple-loading{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;font-size:.8125rem;color:#9ca3af}.ngx-radio-wrapper{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0 .75rem}.ngx-radio-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-radio-group{display:flex;flex-wrap:wrap;gap:.75rem}.ngx-cards{--ngx-cards-primary: var(--ngx-df-primary, var(--mat-sys-primary, #0c1a4a))}.ngx-cards__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ngx-cards__label{color:var(--ngx-cards-primary);font-size:1rem;font-weight:700}.ngx-cards__counter{padding:4px 12px;border-radius:999px;background:#eef0f5;color:var(--ngx-cards-primary);font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-cards__hint{margin:8px 0 0;color:#64748b;font-size:.875rem}.ngx-cards__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:12px;margin-top:12px}.ngx-custom-missing{margin:0;padding:10px 14px;border:1px dashed #ef9a9a;border-radius:8px;color:#b71c1c;font-size:.875rem}.ngx-cards__section--group{margin-top:16px;padding:12px 16px 16px;border:1px dashed #d5dae5;border-radius:12px}.ngx-cards__section--group .ngx-cards__grid{margin-top:10px}.ngx-cards__group-head{display:flex;align-items:center;gap:10px}.ngx-cards__group-title{color:var(--ngx-cards-primary);font-weight:700}.ngx-cards__group-badge{padding:2px 10px;border-radius:999px;background:#fdf0dc;color:#b8680d;font-size:.75rem;font-weight:700}.ngx-card{display:flex;align-items:center;gap:8px;min-height:56px;padding:4px 12px 4px 4px;border:1px solid #e3e6ee;border-radius:12px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ngx-card:hover:not(.ngx-card--disabled){border-color:#c7cddb}.ngx-card--checked{border:2px solid var(--ngx-cards-primary);padding:3px 11px 3px 3px}.ngx-card--locked{background:#fafbfd}.ngx-card__check{flex:1 1 auto;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field{display:flex;flex-wrap:nowrap;align-items:center;width:100%;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field>.mdc-checkbox{flex:0 0 auto}.ngx-card__check ::ng-deep label{flex:1 1 auto;min-width:0;font-weight:600;line-height:1.3;color:#0f172a;cursor:pointer}.ngx-card__texte{overflow-wrap:break-word}.ngx-card--disabled .ngx-card__check ::ng-deep label{cursor:default}.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox--disabled.mat-mdc-checkbox-checked .mdc-checkbox__background,.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background{background-color:var(--ngx-cards-primary)!important;border-color:var(--ngx-cards-primary)!important}.ngx-card--locked .ngx-card__check ::ng-deep label{color:#0f172a!important}.ngx-card__badge{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:0 2px;color:#64748b;font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-card__badge mat-icon{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;font-size:14px!important;line-height:14px!important;overflow:hidden}@media(prefers-reduced-motion:reduce){.ngx-card{transition:none}}.ngx-checkbox-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.25rem 0}.ngx-file-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-file-label{font-size:.875rem;font-weight:500;color:#000000de}.ngx-file-input-native{display:none}.ngx-file-dropzone{display:flex;flex-direction:column;align-items:center;gap:.375rem;width:100%;border:1.5px dashed rgba(0,0,0,.23);border-radius:6px;padding:1.25rem 1rem;font-size:.8125rem;color:#0009;text-align:center;cursor:pointer;background:#00000004;transition:border-color .15s,background-color .15s}.ngx-file-dropzone:hover:not(:disabled){border-color:#6366f1;background:#6366f10a}.ngx-file-dropzone-active{border-color:#6366f1;background:#6366f10f}.ngx-file-dropzone:disabled{cursor:not-allowed;opacity:.6}.ngx-file-dropzone mat-icon{color:#0006}.ngx-file-list{display:flex;flex-direction:column;gap:.375rem}.ngx-file-chip{display:flex;align-items:center;gap:.5rem;border:1px solid rgba(0,0,0,.12);border-radius:6px;padding:.5rem .625rem;background:#00000004}.ngx-file-chip mat-icon{color:#6366f1;flex-shrink:0}.ngx-file-chip-name{flex:1;font-size:.8125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-file-chip-size{font-size:.75rem;color:#00000080;flex-shrink:0}.ngx-file-chip-remove{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:#0006;flex-shrink:0}.ngx-file-chip-remove:hover{color:#dc2626}.ngx-file-chip-remove mat-icon{font-size:18px;width:18px;height:18px}.ngx-file-add-more{display:flex;align-items:center;gap:.25rem;align-self:flex-start;border:none;background:transparent;color:#6366f1;font-size:.8125rem;cursor:pointer;padding:.25rem 0}.ngx-geo-btn{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:none;background:transparent;cursor:pointer;color:#6366f1;border-radius:0 7px 7px 0;flex-shrink:0;transition:background .15s;mat-icon{font-size:1.1rem;width:1.1rem;height:1.1rem}&:hover:not(:disabled){background:#6366f11a}&:disabled{color:#9ca3af;cursor:not-allowed}}.ngx-switch-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.375rem 0 .75rem}.ngx-range-wrapper{display:flex;flex-direction:column;gap:.25rem;padding-bottom:.75rem;width:100%}.ngx-range-header{display:flex;align-items:center;justify-content:space-between}.ngx-range-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-range-value{font-size:.875rem;font-weight:600;color:#6366f1;min-width:2.5rem;text-align:right}.ngx-slider{width:100%}.ngx-range-limits{display:flex;justify-content:space-between;font-size:.7rem;color:#00000061;margin-top:-.25rem}.ngx-color-field{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-color-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-color-row{display:flex;align-items:center;gap:.75rem}.ngx-color-input{width:48px;height:40px;border:1px solid rgba(0,0,0,.23);border-radius:6px;padding:2px;cursor:pointer;background:transparent}.ngx-color-hex{font-size:.875rem;color:#0009;font-family:monospace}.ngx-mat-standalone-error{font-size:.75rem;color:var(--mat-sys-error, #b00020)}.ngx-amount-input{font-variant-numeric:tabular-nums}.ngx-phone-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem;width:100%}.ngx-phone-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151)}.ngx-phone-row{display:flex;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-phone-error{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-phone-country{border:none;border-right:1px solid #e5e7eb;background:#f9fafb;padding:0 8px;font-size:.875rem;cursor:pointer;outline:none;min-width:90px;color:#374151;appearance:none;-webkit-appearance:none;&:focus{background:#f3f4f6}}.ngx-phone-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}.ngx-phone-flag-trigger{display:flex;align-items:center;gap:.375rem;border:none;background:transparent;padding:0 .375rem;margin-right:.375rem;cursor:pointer;border-radius:4px;&:hover{background:#0000000a}&:focus-visible{outline:2px solid rgba(99,102,241,.5);outline-offset:1px}}.ngx-phone-flag{font-size:1.25rem;vertical-align:middle;border-radius:2px;box-shadow:0 0 0 1px #00000014}.ngx-phone-menu-list .ngx-phone-flag{font-size:1.125rem}.ngx-phone-dial-code{font-size:.875rem;color:#0009}.ngx-phone-caret{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#00000073}.ngx-phone-menu-search{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border-bottom:1px solid rgba(0,0,0,.08);.ngx-phone-menu-search-icon{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#0006}input{flex:1;min-width:0;border:none;outline:none;font-size:.875rem;background:transparent;&::placeholder{color:#0006}}}.ngx-phone-menu-list{max-height:260px;overflow-y:auto}.ngx-phone-menu-list ::ng-deep .mat-mdc-menu-item-text{display:flex;align-items:center;gap:.625rem;width:100%}.ngx-phone-menu-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem}.ngx-phone-menu-dial{font-size:.8125rem;color:#00000080}.ngx-phone-menu-empty{padding:.75rem;text-align:center;font-size:.8125rem;color:#00000073}.ngx-options-loading,.ngx-options-loading-inline{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:#00000073}\n"] }]
|
|
3976
|
+
`, styles: [":host{display:flex;flex-direction:column;width:100%;--ngx-field-color: inherit;--ngx-field-bg: transparent;--ngx-field-align: left}:host ::ng-deep .mat-mdc-input-element{color:var(--ngx-field-color)!important;text-align:var(--ngx-field-align)!important}:host ::ng-deep .mat-mdc-text-field-wrapper{background-color:var(--ngx-field-bg)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__leading,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__notch,:host[style*=--ngx-border-color] ::ng-deep .mdc-notched-outline__trailing{border-color:var(--ngx-border-color)!important}:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:before,:host[style*=--ngx-border-color] ::ng-deep .mdc-line-ripple:after{border-bottom-color:var(--ngx-border-color)!important}:host[style*=--ngx-label-color] ::ng-deep .mdc-floating-label,:host[style*=--ngx-label-color] ::ng-deep .mat-mdc-floating-label{color:var(--ngx-label-color)!important}::ng-deep .ngx-phone-menu{min-width:280px}.ngx-affix-text{font-size:.9em;color:#0000008a;padding:0 2px}.ngx-mat-field{width:100%}.ngx-simple-field{display:flex;flex-direction:column;gap:.375rem;width:100%;padding-bottom:.75rem}.ngx-simple-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151);line-height:1.25}.ngx-simple-required{color:#ef4444}.ngx-simple-input-row{display:flex;align-items:center;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;background:#fff;transition:border-color .15s,box-shadow .15s;overflow:hidden;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-simple-error-border{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-simple-input,.ngx-simple-select,textarea.ngx-simple-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;resize:vertical;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}textarea.ngx-simple-input{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;transition:border-color .15s,box-shadow .15s;width:100%;box-sizing:border-box;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-select{border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;padding:.625rem .875rem;width:100%;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .75rem center;background-size:1.25em;appearance:none;-webkit-appearance:none;&:focus{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f;outline:none}&.ngx-simple-error-border{border-color:#ef4444!important}}.ngx-simple-icon{font-size:1.1rem;width:1.1rem;height:1.1rem;color:#9ca3af;padding:0 0 0 .75rem;flex-shrink:0}.ngx-simple-affix{font-size:.9rem;color:#6b7280;flex-shrink:0;white-space:nowrap}.ngx-simple-prefix{padding-left:.75rem}.ngx-simple-suffix{padding-right:.75rem}.ngx-simple-hint{font-size:.75rem;color:#6b7280}.ngx-simple-error-msg{font-size:.75rem;color:#ef4444}.ngx-simple-loading{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;font-size:.8125rem;color:#9ca3af}.ngx-radio-wrapper{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0 .75rem}.ngx-radio-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-radio-group{display:flex;flex-wrap:wrap;gap:.75rem}.ngx-cards{--ngx-cards-primary: var(--ngx-df-primary, var(--mat-sys-primary, #0c1a4a))}.ngx-cards__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ngx-cards__label{color:var(--ngx-cards-primary);font-size:1rem;font-weight:700}.ngx-cards__counter{padding:4px 12px;border-radius:999px;background:#eef0f5;color:var(--ngx-cards-primary);font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-cards__hint{margin:8px 0 0;color:#64748b;font-size:.875rem}.ngx-cards__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:12px;margin-top:12px}.ngx-custom-missing{margin:0;padding:10px 14px;border:1px dashed #ef9a9a;border-radius:8px;color:#b71c1c;font-size:.875rem}.ngx-cards__section--group{margin-top:16px;padding:12px 16px 16px;border:1px dashed #d5dae5;border-radius:12px}.ngx-cards__section--group .ngx-cards__grid{margin-top:10px}.ngx-cards__group-head{display:flex;align-items:center;gap:10px}.ngx-cards__group-title{color:var(--ngx-cards-primary);font-weight:700}.ngx-cards__group-badge{padding:2px 10px;border-radius:999px;background:#fdf0dc;color:#b8680d;font-size:.75rem;font-weight:700}.ngx-card{display:flex;align-items:center;gap:8px;min-height:56px;padding:4px 12px 4px 4px;border:1px solid #e3e6ee;border-radius:12px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ngx-card:hover:not(.ngx-card--disabled){border-color:#c7cddb}.ngx-card--checked{border:2px solid var(--ngx-cards-primary);padding:3px 11px 3px 3px}.ngx-card--locked{background:#fafbfd}.ngx-card__check{flex:1 1 auto;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field{display:flex;flex-wrap:nowrap;align-items:center;width:100%;min-width:0}.ngx-card__check ::ng-deep .mdc-form-field>.mdc-checkbox{flex:0 0 auto}.ngx-card__check ::ng-deep label{flex:1 1 auto;min-width:0;font-weight:600;line-height:1.3;color:#0f172a;cursor:pointer}.ngx-card__texte{overflow-wrap:break-word}.ngx-card--disabled .ngx-card__check ::ng-deep label{cursor:default}.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox--disabled.mat-mdc-checkbox-checked .mdc-checkbox__background,.ngx-card--locked .ngx-card__check ::ng-deep .mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background{background-color:var(--ngx-cards-primary)!important;border-color:var(--ngx-cards-primary)!important}.ngx-card--locked .ngx-card__check ::ng-deep label{color:#0f172a!important}.ngx-card__badge{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:0 2px;color:#64748b;font-size:.8125rem;font-weight:700;white-space:nowrap}.ngx-card__badge mat-icon{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;font-size:14px!important;line-height:14px!important;overflow:hidden}@media(prefers-reduced-motion:reduce){.ngx-card{transition:none}}.ngx-checkbox-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.25rem 0}.ngx-file-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-file-label{font-size:.875rem;font-weight:500;color:#000000de}.ngx-file-input-native{display:none}.ngx-file-dropzone{display:flex;flex-direction:column;align-items:center;gap:.375rem;width:100%;border:1.5px dashed rgba(0,0,0,.23);border-radius:6px;padding:1.25rem 1rem;font-size:.8125rem;color:#0009;text-align:center;cursor:pointer;background:#00000004;transition:border-color .15s,background-color .15s}.ngx-file-dropzone:hover:not(:disabled){border-color:#6366f1;background:#6366f10a}.ngx-file-dropzone-active{border-color:#6366f1;background:#6366f10f}.ngx-file-dropzone:disabled{cursor:not-allowed;opacity:.6}.ngx-file-dropzone mat-icon{color:#0006}.ngx-file-list{display:flex;flex-direction:column;gap:.375rem}.ngx-file-chip{display:flex;align-items:center;gap:.5rem;border:1px solid rgba(0,0,0,.12);border-radius:6px;padding:.5rem .625rem;background:#00000004}.ngx-file-chip mat-icon{color:#6366f1;flex-shrink:0}.ngx-file-chip{position:relative;overflow:hidden}.ngx-file-chip[data-status=error]{border-color:#dc262659;background:#dc262608}.ngx-file-chip mat-icon.ngx-file-chip-icon-error{color:#dc2626}.ngx-file-chip mat-icon.ngx-file-chip-icon-done{color:#16a34a}.ngx-file-chip-spinner{flex-shrink:0}.ngx-file-chip-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.ngx-file-chip-name{display:block;font-size:.8125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-file-chip-link{max-width:100%;padding:0;border:none;background:none;text-align:left;font:inherit;font-size:.8125rem;color:#4f46e5;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.ngx-file-chip-error{font-size:.75rem;color:#dc2626}.ngx-file-chip-progress{position:absolute;left:0;right:0;bottom:0;height:2px;background:#6366f1;transform-origin:left center;transition:transform .16s cubic-bezier(.23,1,.32,1)}.ngx-file-dropzone-max{font-size:.75rem;color:#00000073}@media(prefers-reduced-motion:reduce){.ngx-file-chip-progress{transition:none}}.ngx-file-chip-size{font-size:.75rem;color:#00000080;flex-shrink:0}.ngx-file-chip-remove{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:#0006;flex-shrink:0}.ngx-file-chip-remove:hover{color:#dc2626}.ngx-file-chip-remove mat-icon{font-size:18px;width:18px;height:18px}.ngx-file-add-more{display:flex;align-items:center;gap:.25rem;align-self:flex-start;border:none;background:transparent;color:#6366f1;font-size:.8125rem;cursor:pointer;padding:.25rem 0}.ngx-geo-btn{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:none;background:transparent;cursor:pointer;color:#6366f1;border-radius:0 7px 7px 0;flex-shrink:0;transition:background .15s;mat-icon{font-size:1.1rem;width:1.1rem;height:1.1rem}&:hover:not(:disabled){background:#6366f11a}&:disabled{color:#9ca3af;cursor:not-allowed}}.ngx-switch-wrapper{display:flex;flex-direction:column;gap:.25rem;padding:.375rem 0 .75rem}.ngx-range-wrapper{display:flex;flex-direction:column;gap:.25rem;padding-bottom:.75rem;width:100%}.ngx-range-header{display:flex;align-items:center;justify-content:space-between}.ngx-range-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-range-value{font-size:.875rem;font-weight:600;color:#6366f1;min-width:2.5rem;text-align:right}.ngx-slider{width:100%}.ngx-range-limits{display:flex;justify-content:space-between;font-size:.7rem;color:#00000061;margin-top:-.25rem}.ngx-color-field{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem}.ngx-color-label{font-size:.875rem;font-weight:500;color:#0009}.ngx-color-row{display:flex;align-items:center;gap:.75rem}.ngx-color-input{width:48px;height:40px;border:1px solid rgba(0,0,0,.23);border-radius:6px;padding:2px;cursor:pointer;background:transparent}.ngx-color-hex{font-size:.875rem;color:#0009;font-family:monospace}.ngx-mat-standalone-error{font-size:.75rem;color:var(--mat-sys-error, #b00020)}.ngx-amount-input{font-variant-numeric:tabular-nums}.ngx-phone-wrapper{display:flex;flex-direction:column;gap:.375rem;padding-bottom:.75rem;width:100%}.ngx-phone-label{font-size:.875rem;font-weight:500;color:var(--ngx-label-color, #374151)}.ngx-phone-row{display:flex;border:1px solid var(--ngx-border-color, #d1d5db);border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s;&:focus-within{border-color:var(--ngx-border-color, #6366f1);box-shadow:0 0 0 3px #6366f11f}&.ngx-phone-error{border-color:#ef4444!important;box-shadow:0 0 0 3px #ef44441a}}.ngx-phone-country{border:none;border-right:1px solid #e5e7eb;background:#f9fafb;padding:0 8px;font-size:.875rem;cursor:pointer;outline:none;min-width:90px;color:#374151;appearance:none;-webkit-appearance:none;&:focus{background:#f3f4f6}}.ngx-phone-input{flex:1;min-width:0;padding:.625rem .875rem;border:none;outline:none;background:transparent;font-size:.9375rem;color:#111827;font-family:inherit;&::placeholder{color:#9ca3af}&:disabled{background:#f9fafb;cursor:not-allowed;color:#6b7280}}.ngx-phone-flag-trigger{display:flex;align-items:center;gap:.375rem;border:none;background:transparent;padding:0 .375rem;margin-right:.375rem;cursor:pointer;border-radius:4px;&:hover{background:#0000000a}&:focus-visible{outline:2px solid rgba(99,102,241,.5);outline-offset:1px}}.ngx-phone-flag{font-size:1.25rem;vertical-align:middle;border-radius:2px;box-shadow:0 0 0 1px #00000014}.ngx-phone-menu-list .ngx-phone-flag{font-size:1.125rem}.ngx-phone-dial-code{font-size:.875rem;color:#0009}.ngx-phone-caret{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#00000073}.ngx-phone-menu-search{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border-bottom:1px solid rgba(0,0,0,.08);.ngx-phone-menu-search-icon{width:1.125rem;height:1.125rem;font-size:1.125rem;color:#0006}input{flex:1;min-width:0;border:none;outline:none;font-size:.875rem;background:transparent;&::placeholder{color:#0006}}}.ngx-phone-menu-list{max-height:260px;overflow-y:auto}.ngx-phone-menu-list ::ng-deep .mat-mdc-menu-item-text{display:flex;align-items:center;gap:.625rem;width:100%}.ngx-phone-menu-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem}.ngx-phone-menu-dial{font-size:.8125rem;color:#00000080}.ngx-phone-menu-empty{padding:.75rem;text-align:center;font-size:.8125rem;color:#00000073}.ngx-options-loading,.ngx-options-loading-inline{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:#00000073}\n"] }]
|
|
3639
3977
|
}], propDecorators: { field: [{
|
|
3640
3978
|
type: Input,
|
|
3641
3979
|
args: [{ required: true }]
|
|
@@ -3657,6 +3995,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3657
3995
|
type: HostBinding,
|
|
3658
3996
|
args: ['class']
|
|
3659
3997
|
}] } });
|
|
3998
|
+
function isFile(v) {
|
|
3999
|
+
return typeof File !== 'undefined' && v instanceof File;
|
|
4000
|
+
}
|
|
4001
|
+
/** Message d'erreur du backend tel quel ; repli générique selon le statut HTTP. */
|
|
4002
|
+
function uploadErrorMessage(err) {
|
|
4003
|
+
if (err instanceof HttpErrorResponse) {
|
|
4004
|
+
const body = err.error;
|
|
4005
|
+
if (typeof body === 'string' && body.trim())
|
|
4006
|
+
return body;
|
|
4007
|
+
if (body?.errorMessage)
|
|
4008
|
+
return body.errorMessage;
|
|
4009
|
+
if (body?.message)
|
|
4010
|
+
return body.message;
|
|
4011
|
+
if (err.status === 0)
|
|
4012
|
+
return 'Impossible de joindre le serveur.';
|
|
4013
|
+
if (err.status === 413)
|
|
4014
|
+
return 'Fichier trop volumineux pour le serveur (413).';
|
|
4015
|
+
return `Échec de l'envoi (${err.status}).`;
|
|
4016
|
+
}
|
|
4017
|
+
return "Échec de l'envoi.";
|
|
4018
|
+
}
|
|
3660
4019
|
|
|
3661
4020
|
/**
|
|
3662
4021
|
* type: 'repeater' — liste de lignes à plusieurs colonnes (itemFields), ajoutées ou retirées par
|