@suntelecoms/ngx-dynamic-form 1.12.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 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';
2
+ import { inject, Injectable, InjectionToken, signal, makeEnvironmentProviders, ElementRef, forwardRef, Input, Directive, ChangeDetectorRef, ChangeDetectionStrategy, Component, DestroyRef, EventEmitter, HostBinding, Output, 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';
@@ -7,8 +7,8 @@ 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
9
  import { HttpClient, HttpErrorResponse, HttpBackend, HttpHeaders, HttpEventType, HttpParams } from '@angular/common/http';
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
- import { switchMap, map, catchError, first, debounceTime, distinctUntilChanged, filter, tap as tap$1 } from 'rxjs/operators';
10
+ import { of, timer, map as map$1, catchError as catchError$1, tap, switchMap as switchMap$1, Subject, merge, debounceTime, distinctUntilChanged, filter, finalize, startWith } from 'rxjs';
11
+ import { switchMap, map, catchError, first, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, filter as filter$1, tap as tap$1 } from 'rxjs/operators';
12
12
  import { MatFormField, MatLabel, MatError, MatHint, MatPrefix, MatSuffix } from '@angular/material/form-field';
13
13
  import { MatInput } from '@angular/material/input';
14
14
  import { MatSelect } from '@angular/material/select';
@@ -36,7 +36,7 @@ import { MatTooltip } from '@angular/material/tooltip';
36
36
  function lirePath(obj, path) {
37
37
  return path.split('.').reduce((o, k) => o?.[k], obj);
38
38
  }
39
- const vide$1 = (v) => v === null || v === undefined || v === '';
39
+ const vide$3 = (v) => v === null || v === undefined || v === '';
40
40
  const estObjet = (v) => v !== null && typeof v === 'object' && !Array.isArray(v);
41
41
  // ── Conditions ──────────────────────────────────────────────────────────────────
42
42
  function compareCondition(operator, value, conditionValue) {
@@ -47,8 +47,8 @@ function compareCondition(operator, value, conditionValue) {
47
47
  return Array.isArray(value) ? value.includes(conditionValue) : String(value ?? '').includes(String(conditionValue));
48
48
  case 'greaterThan': return Number(value) > Number(conditionValue);
49
49
  case 'lessThan': return Number(value) < Number(conditionValue);
50
- case 'exists': return !vide$1(value);
51
- case 'notExists': return vide$1(value);
50
+ case 'exists': return !vide$3(value);
51
+ case 'notExists': return vide$3(value);
52
52
  default: return true;
53
53
  }
54
54
  }
@@ -93,7 +93,7 @@ function toFormValues(fields, values) {
93
93
  for (const field of fields ?? []) {
94
94
  if (!field?.key)
95
95
  continue;
96
- if (vide$1(out[field.key]) && field.initialFrom) {
96
+ if (vide$3(out[field.key]) && field.initialFrom) {
97
97
  const derivee = lirePath(values, field.initialFrom);
98
98
  if (derivee !== undefined)
99
99
  out[field.key] = derivee;
@@ -283,7 +283,7 @@ function questionErrors(field, questions, value) {
283
283
  const out = {};
284
284
  for (const q of questions) {
285
285
  const r = v[q.code];
286
- if (vide$1(r)) {
286
+ if (vide$3(r)) {
287
287
  if (q.required)
288
288
  out[q.code] = 'Répondez à cette question';
289
289
  }
@@ -295,7 +295,7 @@ function questionErrors(field, questions, value) {
295
295
  }
296
296
  /** Nombre de questions répondues. */
297
297
  function answeredCount(questions, value) {
298
- return questions.filter((q) => !vide$1((value ?? {})[q.code])).length;
298
+ return questions.filter((q) => !vide$3((value ?? {})[q.code])).length;
299
299
  }
300
300
  /** Réponses limitées aux questions affichées (les questions ont changé : autre risque…) ; null reste null. */
301
301
  function keepAnswers(field, questions, value) {
@@ -1188,10 +1188,10 @@ const PHONE_COUNTRIES = [
1188
1188
  function getPath(obj, path) {
1189
1189
  return path.split('.').reduce((o, k) => o?.[k], obj);
1190
1190
  }
1191
- const vide = (v) => v === null || v === undefined || v === '';
1191
+ const vide$2 = (v) => v === null || v === undefined || v === '';
1192
1192
  /** Valeur affichable : un objet (propriété qui n'est pas un texte) donne '' plutôt que « [object Object] ». */
1193
1193
  function texte(v) {
1194
- if (vide(v))
1194
+ if (vide$2(v))
1195
1195
  return '';
1196
1196
  return typeof v === 'object' ? '' : String(v);
1197
1197
  }
@@ -1201,12 +1201,33 @@ function repli(brut) {
1201
1201
  const m = /^(['"])(.*)\1$/.exec(t);
1202
1202
  return m ? m[2] : t;
1203
1203
  }
1204
+ /** Date ISO ('2026-03-15', '2026-03-15T10:00:00') → '15/03/2026' ; autre valeur telle quelle. */
1205
+ function formatDate(v) {
1206
+ const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(v ?? ''));
1207
+ return m ? `${m[3]}/${m[2]}/${m[1]}` : texte(v);
1208
+ }
1209
+ /**
1210
+ * Première valeur non vide parmi des chemins séparés par '||' : 'immatriculation || numeroChassis'.
1211
+ * Un seul chemin : getPath tel quel.
1212
+ */
1213
+ function getFirstPath(obj, paths, defaults) {
1214
+ let dernier;
1215
+ for (const path of paths.split('||').map((p) => p.trim()).filter(Boolean)) {
1216
+ const v = getPath(obj, path);
1217
+ dernier = vide$2(v) && defaults && path in defaults ? defaults[path] : v;
1218
+ if (!vide$2(dernier))
1219
+ return dernier;
1220
+ }
1221
+ return dernier;
1222
+ }
1204
1223
  /**
1205
1224
  * Libellé d'une option chargée depuis une API. `displayName` accepte :
1206
1225
  * - une clé ou un chemin pointé : 'codeClient', 'personnePhysique.nom'
1226
+ * - des alternatives (première non vide) : 'raisonSociale || codeClient'
1207
1227
  * - un modèle de concaténation : '{{codeClient}} - {{telephone}}',
1208
1228
  * '{{personnePhysique.nom}} {{personnePhysique.prenom}}'
1209
- * - une valeur de repli quand la propriété est vide : '{{libelle}} ({{valeur ?? 0}})', "{{unite ?? 'FCFA'}}"
1229
+ * - dans un modèle : alternatives '{{immatriculation || numeroChassis}}', date '{{dateEffet | date}}' (jj/mm/aaaa),
1230
+ * valeur de repli quand la propriété est vide '{{libelle}} ({{valeur ?? 0}})', "{{unite ?? 'FCFA'}}"
1210
1231
  * Dans un modèle, une valeur absente (null/undefined) est remplacée par '' et les espaces en trop sont
1211
1232
  * réduits — on peut donc enchaîner des alternatives :
1212
1233
  * '{{personnePhysique.nom}} {{personnePhysique.prenom}}{{personneMorale.raisonSociale}}'.
@@ -1217,17 +1238,24 @@ function repli(brut) {
1217
1238
  function optionLabel(item, displayName, defaults) {
1218
1239
  if (item === null || typeof item !== 'object')
1219
1240
  return texte(item);
1220
- const lire = (path) => {
1221
- const v = getPath(item, path);
1222
- return vide(v) && defaults && path in defaults ? defaults[path] : v;
1223
- };
1224
1241
  if (!displayName.includes('{{')) {
1225
- return texte(lire(displayName));
1242
+ return texte(getFirstPath(item, displayName, defaults));
1226
1243
  }
1227
1244
  return displayName
1228
- .replace(/\{\{\s*([\w.]+)\s*(?:\?\?\s*([^}]*?))?\s*\}\}/g, (_m, path, defaut) => {
1229
- const v = lire(path);
1230
- return vide(v) && defaut !== undefined ? repli(defaut) : texte(v);
1245
+ .replace(/\{\{([^}]*)\}\}/g, (_m, expr) => {
1246
+ let e = expr.trim();
1247
+ let date = false;
1248
+ const f = /(?<!\|)\|\s*date\s*$/.exec(e);
1249
+ if (f) {
1250
+ date = true;
1251
+ e = e.slice(0, f.index).trim();
1252
+ }
1253
+ const i = e.indexOf('??');
1254
+ const defaut = i >= 0 ? e.slice(i + 2) : undefined;
1255
+ const v = getFirstPath(item, i >= 0 ? e.slice(0, i) : e, defaults);
1256
+ if (vide$2(v) && defaut !== undefined)
1257
+ return repli(defaut);
1258
+ return date ? formatDate(v) : texte(v);
1231
1259
  })
1232
1260
  .replace(/\s+/g, ' ')
1233
1261
  .trim();
@@ -1359,6 +1387,523 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1359
1387
  args: ['ngxThousands']
1360
1388
  }] } });
1361
1389
 
1390
+ const vide$1 = (v) => v === null || v === undefined || v === '';
1391
+ /** Liste d'items d'une réponse : tableau, `responseDataKey`, sinon content / data.content / data. */
1392
+ function rechercheItems(r, responseDataKey) {
1393
+ if (Array.isArray(r))
1394
+ return r;
1395
+ const l = responseDataKey !== undefined
1396
+ ? (responseDataKey === '' ? r : getFirstPath(r, responseDataKey))
1397
+ : (r?.content ?? r?.data?.content ?? r?.data);
1398
+ return Array.isArray(l) ? l : [];
1399
+ }
1400
+ /** Item d'une réponse de chargement (fiche) : à la racine, ou dans `data` (enveloppe { data: {...} }). */
1401
+ function rechercheItem(r) {
1402
+ if (r && typeof r === 'object' && !Array.isArray(r) && r.data && typeof r.data === 'object' && !Array.isArray(r.data))
1403
+ return r.data;
1404
+ return r ?? null;
1405
+ }
1406
+ /**
1407
+ * Texte d'un modèle pour un item : chemin, alternatives ('a || b') ou modèle ('{{a}} · {{b | date}}').
1408
+ * Dans un modèle, les séparateurs orphelins sont retirés quand une partie est vide (« BANQUE · » → « BANQUE »).
1409
+ */
1410
+ function rechercheTexte(item, modele) {
1411
+ if (!modele)
1412
+ return '';
1413
+ const t = optionLabel(item, modele);
1414
+ if (!modele.includes('{{'))
1415
+ return t;
1416
+ return t.replace(/\s[·|–-](?=\s+[·|–-](\s|$))/g, '').replace(/\s+[·|,–-]$|^[·|,–-]\s+/g, '').replace(/\s+/g, ' ').trim();
1417
+ }
1418
+ /** Item brut → résultat affiché. */
1419
+ function versResultat(cfg, item) {
1420
+ const t = (m) => rechercheTexte(item, m);
1421
+ // Textes d'affichage (badge, note, encart) : fixes, ou modèles s'ils contiennent {{…}}.
1422
+ const lit = (m) => (m && !m.includes('{{') ? m : t(m));
1423
+ const valeur = getFirstPath(item, cfg.valeur ?? 'id');
1424
+ const titre = t(cfg.titre ?? '{{label}}') || String(valeur ?? '');
1425
+ const e = cfg.encart;
1426
+ const encart = e ? { surtitre: lit(e.surtitre), titre: lit(e.titre), puces: (e.puces ?? []).map(lit).filter(Boolean), etiquette: t(e.etiquette) } : null;
1427
+ return {
1428
+ valeur,
1429
+ titre,
1430
+ sousTitre: t(cfg.sousTitre),
1431
+ titreFiche: t(cfg.titreFiche) || titre,
1432
+ badge: lit(cfg.badge),
1433
+ etiquette: t(cfg.etiquette),
1434
+ note: lit(cfg.note),
1435
+ selectionnable: !cfg.selectionnable || matchesConditions(cfg.selectionnable, cfg.selectionnableLogic, (k) => getFirstPath(item, k)),
1436
+ details: (cfg.details ?? []).map((d) => {
1437
+ const v = t(d.path);
1438
+ return { label: d.label, valeur: d.format === 'date' ? formatDate(v) : v, format: d.format };
1439
+ }),
1440
+ // Encart affiché si sa plaque est renseignée (ou, sans plaque configurée, si son titre l'est).
1441
+ encart: encart && (e?.etiquette ? encart.etiquette : encart.titre) ? encart : null,
1442
+ item,
1443
+ };
1444
+ }
1445
+ /**
1446
+ * Valeurs écrites à plat dans le formulaire (`champs`) : chemin ou alternatives ('id', 'a.nom || b.raisonSociale')
1447
+ * = valeur brute ; modèle ('{{prenom}} {{nom}}') = texte ; entre apostrophes ("'PARTENAIRE'") = constante.
1448
+ * `item` null : toutes les clés à null (« Changer »).
1449
+ */
1450
+ function rechercheChamps(cfg, item) {
1451
+ const out = {};
1452
+ for (const [cle, source] of Object.entries(cfg.champs ?? {})) {
1453
+ if (item === null) {
1454
+ out[cle] = null;
1455
+ continue;
1456
+ }
1457
+ const constante = /^'(.*)'$/.exec(source);
1458
+ const v = constante ? constante[1] : source.includes('{{') ? rechercheTexte(item, source) : getFirstPath(item, source);
1459
+ out[cle] = vide$1(v) ? null : v;
1460
+ }
1461
+ return out;
1462
+ }
1463
+ /** Mode sans {{q}} : résultats dont le titre, le sous-titre, l'étiquette ou la note contiennent q. */
1464
+ function filtrerResultats(liste, q, max) {
1465
+ const m = q.trim().toLowerCase();
1466
+ return liste.filter((r) => [r.titre, r.sousTitre, r.etiquette, r.note].join(' ').toLowerCase().includes(m)).slice(0, max);
1467
+ }
1468
+
1469
+ const vide = (v) => v === null || v === undefined || v === '';
1470
+ /**
1471
+ * type: 'recherche' — recherche d'une entité via une API puis fiche de la sélection (bouton « Changer »).
1472
+ * Avec `{{q}}` dans `recherche.url` : recherche serveur (debounce, ou Entrée / bouton) ; sans : liste chargée une
1473
+ * fois puis filtrée dans le navigateur. Valeur du champ : `recherche.valeur` de l'item choisi ; `recherche.champs`
1474
+ * sont écrits à plat dans le formulaire. Au retour sur l'étape, la fiche est rechargée via
1475
+ * `recherche.chargementUrl` (`{{value}}`), ou retrouvée dans la liste (mode sans `{{q}}`).
1476
+ */
1477
+ class RechercheFieldComponent {
1478
+ constructor() {
1479
+ this.http = inject(HttpClient);
1480
+ this.dataApiUrl = inject(NGX_DATA_API_URL, { optional: true }) ?? '';
1481
+ this.builder = inject(DynamicFormBuilderService);
1482
+ this.cdr = inject(ChangeDetectorRef);
1483
+ this.manuelle$ = new Subject();
1484
+ this.subs = [];
1485
+ /** Mode sans {{q}} : items chargés une fois, filtrés dans le navigateur. */
1486
+ this.liste = null;
1487
+ this.saisie = new FormControl('', { nonNullable: true });
1488
+ this.resultats = [];
1489
+ this.retenu = null;
1490
+ this.recherchant = false;
1491
+ this.rechercheFaite = false;
1492
+ this.echec = '';
1493
+ }
1494
+ get cfg() { return this.field.recherche ?? { url: '' }; }
1495
+ get control() { return this.form.get(this.field.key); }
1496
+ get erreur() { return this.builder.getErrorMessage(this.control, this.field.validation); }
1497
+ /** Saisie d'une nouvelle entité (recherche.ajout) : le champ `ajout.champ` porte `ajout.valeur`. */
1498
+ get nouveau() {
1499
+ const a = this.cfg.ajout;
1500
+ return !!a && this.form.get(a.champ)?.value === a.valeur;
1501
+ }
1502
+ get serveur() { return /\{\{\s*q\s*\}\}/.test(this.cfg.url); }
1503
+ ngOnInit() {
1504
+ if (this.control.disabled)
1505
+ this.saisie.disable({ emitEvent: false });
1506
+ this.subs.push(this.control.events.subscribe(() => this.cdr.markForCheck()));
1507
+ const mode = this.cfg.ajout && this.form.get(this.cfg.ajout.champ);
1508
+ if (mode)
1509
+ this.subs.push(mode.valueChanges.subscribe(() => this.cdr.markForCheck()));
1510
+ // Valeur posée (retour sur l'étape, initialValues, patchValue) : fiche rechargée.
1511
+ this.restaurer(this.control.value);
1512
+ this.subs.push(this.control.valueChanges.subscribe((v) => {
1513
+ if (!vide(v) && v !== this.retenu?.valeur)
1514
+ this.restaurer(v);
1515
+ }));
1516
+ const minChars = this.cfg.minChars ?? 2;
1517
+ this.subs.push(merge(this.saisie.valueChanges.pipe(map$1((t) => t.trim()), debounceTime(this.cfg.debounceMs ?? 350), distinctUntilChanged(), map$1((q) => (q.length < minChars ? null : q))),
1518
+ // Entrée / bouton : recherche immédiate, quel que soit minChars.
1519
+ this.manuelle$.pipe(map$1(() => this.saisie.value.trim()), filter((q) => !!q))).pipe(switchMap$1((q) => {
1520
+ if (q === null)
1521
+ return of(null);
1522
+ this.recherchant = true;
1523
+ this.echec = '';
1524
+ this.cdr.markForCheck();
1525
+ return this.chercher(q).pipe(catchError$1((err) => {
1526
+ console.error(`[ngx-dynamic-form] Recherche de "${this.field.key}" indisponible :`, err);
1527
+ this.echec = 'La recherche est indisponible pour le moment.';
1528
+ return of([]);
1529
+ }), finalize(() => { this.recherchant = false; this.cdr.markForCheck(); }));
1530
+ })).subscribe((r) => {
1531
+ this.resultats = r ?? [];
1532
+ this.rechercheFaite = r !== null;
1533
+ this.cdr.markForCheck();
1534
+ }));
1535
+ }
1536
+ ngOnDestroy() { this.subs.forEach((s) => s.unsubscribe()); }
1537
+ lancer() { this.manuelle$.next(); }
1538
+ choisir(r) {
1539
+ if (!r.selectionnable)
1540
+ return;
1541
+ this.appliquer(r);
1542
+ this.poserMode(this.cfg.ajout?.retourValeur);
1543
+ this.control.setValue(r.valeur);
1544
+ this.control.markAsTouched();
1545
+ this.control.markAsDirty();
1546
+ }
1547
+ changer() {
1548
+ this.retenu = null;
1549
+ this.resultats = [];
1550
+ this.rechercheFaite = false;
1551
+ this.saisie.setValue('', { emitEvent: false });
1552
+ this.ecrireChamps(rechercheChamps(this.cfg, null));
1553
+ this.control.setValue(null);
1554
+ this.cdr.markForCheck();
1555
+ }
1556
+ /** « Ajouter » : sélection effacée, mode de saisie d'une nouvelle entité. */
1557
+ ajouter() {
1558
+ this.changer();
1559
+ this.poserMode(this.cfg.ajout?.valeur);
1560
+ }
1561
+ rechercherExistant() { this.poserMode(this.cfg.ajout?.retourValeur); }
1562
+ /** Codes techniques (EN_ATTENTE) rendus lisibles (En attente) ; le reste tel quel. */
1563
+ lisible(valeur) {
1564
+ if (!/^[A-Z0-9]+(_[A-Z0-9]+)+$/.test(valeur ?? ''))
1565
+ return valeur;
1566
+ const t = valeur.replace(/_/g, ' ').toLowerCase();
1567
+ return t.charAt(0).toUpperCase() + t.slice(1);
1568
+ }
1569
+ poserMode(valeur) {
1570
+ const a = this.cfg.ajout;
1571
+ if (!a || valeur === undefined)
1572
+ return;
1573
+ const c = this.form.get(a.champ);
1574
+ if (c)
1575
+ c.setValue(valeur);
1576
+ else
1577
+ this.form.addControl(a.champ, new FormControl(valeur));
1578
+ this.cdr.markForCheck();
1579
+ }
1580
+ chercher(q) {
1581
+ if (this.serveur)
1582
+ return this.charger(this.url(this.cfg.url, { q })).pipe(map$1((items) => this.versResultats(items)));
1583
+ return this.tous().pipe(map$1((l) => filtrerResultats(l, q, this.cfg.maxResultats ?? 10)));
1584
+ }
1585
+ tous() {
1586
+ if (this.liste)
1587
+ return of(this.liste);
1588
+ return this.charger(this.url(this.cfg.url, {})).pipe(tap((l) => (this.liste = this.versResultats(l))), map$1(() => this.liste));
1589
+ }
1590
+ charger(url) {
1591
+ return this.http.get(url).pipe(map$1((r) => rechercheItems(r, this.cfg.responseDataKey)));
1592
+ }
1593
+ versResultats(items) {
1594
+ const f = this.cfg.filtre;
1595
+ const gardes = f ? items.filter((it) => matchesConditions(f, this.cfg.filtreLogic, (k) => getFirstPath(it, k))) : items;
1596
+ return gardes.map((it) => versResultat(this.cfg, it));
1597
+ }
1598
+ /** Fiche de la valeur courante : chargementUrl, sinon recherche dans la liste (mode sans {{q}}). */
1599
+ restaurer(valeur) {
1600
+ if (vide(valeur) || valeur === this.retenu?.valeur)
1601
+ return;
1602
+ const source$ = this.cfg.chargementUrl
1603
+ ? this.http.get(this.url(this.cfg.chargementUrl, { value: valeur })).pipe(map$1((r) => { const item = rechercheItem(r); return item ? versResultat(this.cfg, item) : null; }))
1604
+ : !this.serveur
1605
+ ? this.tous().pipe(map$1((l) => l.find((r) => String(r.valeur) === String(valeur)) ?? null))
1606
+ : of(null);
1607
+ this.recherchant = true;
1608
+ this.subs.push(source$.pipe(catchError$1((err) => {
1609
+ console.error(`[ngx-dynamic-form] Fiche de "${this.field.key}" (${valeur}) indisponible :`, err);
1610
+ return of(null);
1611
+ }), finalize(() => { this.recherchant = false; this.cdr.markForCheck(); })).subscribe((r) => {
1612
+ if (r && this.control.value === valeur)
1613
+ this.appliquer(r);
1614
+ }));
1615
+ }
1616
+ appliquer(r) {
1617
+ this.ecrireChamps(rechercheChamps(this.cfg, r.item));
1618
+ this.retenu = r;
1619
+ this.resultats = [];
1620
+ this.rechercheFaite = false;
1621
+ this.cdr.markForCheck();
1622
+ }
1623
+ /** Clés plates écrites dans le formulaire (ajoutées si l'étape ne les déclare pas). */
1624
+ ecrireChamps(champs) {
1625
+ for (const [cle, val] of Object.entries(champs)) {
1626
+ const c = this.form.get(cle);
1627
+ if (c)
1628
+ c.setValue(val, { emitEvent: false });
1629
+ else
1630
+ this.form.addControl(cle, new FormControl(val), { emitEvent: false });
1631
+ }
1632
+ }
1633
+ /** {{q}} / {{value}} puis {{champ}} du formulaire ; relative à dataUrl sauf 'http…' ou '/…'. */
1634
+ url(modele, extra) {
1635
+ const url = modele.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (_m, cle) => {
1636
+ const v = cle in extra ? extra[cle] : this.form.get(cle)?.value;
1637
+ return encodeURIComponent(String(v ?? ''));
1638
+ });
1639
+ return /^https?:\/\//.test(url) || url.startsWith('/') ? url : `${this.dataApiUrl.replace(/\/$/, '')}/${url}`;
1640
+ }
1641
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RechercheFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1642
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RechercheFieldComponent, isStandalone: true, selector: "ngx-recherche-field", inputs: { field: "field", form: "form" }, ngImport: i0, template: `
1643
+ @if (field.label) {
1644
+ <span class="ngx-rch__label" [id]="field.key + '-label'">
1645
+ {{ field.label }}@if (field.validation?.required) {<span class="ngx-rch__requis">*</span>}
1646
+ </span>
1647
+ }
1648
+
1649
+ @if (retenu; as f) {
1650
+ <div class="ngx-rch__fiche">
1651
+ <div class="ngx-rch__entete">
1652
+ <div class="ngx-rch__avatar" aria-hidden="true">
1653
+ @if (cfg.avatar) { <mat-icon>{{ cfg.avatar }}</mat-icon> } @else { {{ (f.titreFiche || '?').charAt(0) }} }
1654
+ </div>
1655
+ <div class="ngx-rch__identite">
1656
+ <span class="ngx-rch__nom">{{ f.titreFiche }}</span>
1657
+ @if (f.badge) { <span class="ngx-rch__badge">{{ lisible(f.badge) }}</span> }
1658
+ @else if (f.sousTitre) { <span class="ngx-rch__sous">{{ f.sousTitre }}</span> }
1659
+ </div>
1660
+ @if (!control.disabled) {
1661
+ <button type="button" class="ngx-rch__changer" (click)="changer()">
1662
+ <mat-icon aria-hidden="true">sync</mat-icon><span>{{ cfg.changerLabel || 'Changer' }}</span>
1663
+ </button>
1664
+ }
1665
+ </div>
1666
+ @if (f.details.length) {
1667
+ <dl class="ngx-rch__details">
1668
+ @for (d of f.details; track d.label) {
1669
+ <div>
1670
+ <dt>{{ d.label }}</dt>
1671
+ @if (!d.valeur) {
1672
+ <dd class="ngx-rch__vide">Non renseigné</dd>
1673
+ } @else if (d.format === 'badge') {
1674
+ <dd><span class="ngx-rch__statut" [attr.data-statut]="d.valeur">{{ lisible(d.valeur) }}</span></dd>
1675
+ } @else {
1676
+ <dd>{{ lisible(d.valeur) }}</dd>
1677
+ }
1678
+ </div>
1679
+ }
1680
+ </dl>
1681
+ }
1682
+ @if (f.encart; as e) {
1683
+ <div class="ngx-rch__encart">
1684
+ <span class="ngx-rch__encart-icone" aria-hidden="true"><mat-icon>{{ cfg.encart?.icone || 'directions_car' }}</mat-icon></span>
1685
+ <div class="ngx-rch__encart-corps">
1686
+ @if (e.surtitre) { <span class="ngx-rch__encart-surtitre">{{ e.surtitre }}</span> }
1687
+ @if (e.titre) { <span class="ngx-rch__encart-titre">{{ e.titre }}</span> }
1688
+ @if (e.puces.length) {
1689
+ <span class="ngx-rch__puces">@for (p of e.puces; track $index) { <span class="ngx-rch__puce">{{ lisible(p) }}</span> }</span>
1690
+ }
1691
+ </div>
1692
+ @if (e.etiquette) {
1693
+ <span class="ngx-rch__encart-plaque">
1694
+ @if (cfg.encart?.etiquetteLabel) { <span class="ngx-rch__encart-plaque-label" aria-hidden="true">{{ cfg.encart?.etiquetteLabel }}</span> }
1695
+ <span class="ngx-rch__plaque" [attr.aria-label]="(cfg.encart?.etiquetteLabel || '') + ' ' + e.etiquette">{{ e.etiquette }}</span>
1696
+ </span>
1697
+ }
1698
+ </div>
1699
+ }
1700
+ </div>
1701
+ } @else {
1702
+ @if (!nouveau) {
1703
+ <label class="ngx-rch__barre" [class.ngx-rch__barre--active]="saisie.value" [class.ngx-rch__barre--erreur]="erreur"
1704
+ [class.ngx-rch__barre--bouton]="cfg.bouton">
1705
+ @if (recherchant) {
1706
+ <mat-progress-spinner diameter="20" mode="indeterminate" />
1707
+ } @else {
1708
+ <mat-icon aria-hidden="true">search</mat-icon>
1709
+ }
1710
+ <input type="search" [formControl]="saisie" autocomplete="off"
1711
+ [placeholder]="cfg.placeholder || field.placeholder || 'Rechercher…'"
1712
+ [attr.aria-label]="field.label || cfg.placeholder || 'Rechercher'"
1713
+ (keydown.enter)="$event.preventDefault(); lancer()"
1714
+ (blur)="control.markAsTouched()" />
1715
+ @if (saisie.value) {
1716
+ <button type="button" class="ngx-rch__effacer" aria-label="Effacer" (click)="saisie.setValue('')">
1717
+ <mat-icon aria-hidden="true">close</mat-icon>
1718
+ </button>
1719
+ }
1720
+ @if (cfg.bouton) {
1721
+ <button type="button" class="ngx-rch__lancer" [disabled]="!saisie.value.trim() || recherchant" (click)="lancer()">
1722
+ <mat-icon aria-hidden="true">search</mat-icon><span>{{ cfg.bouton }}</span>
1723
+ </button>
1724
+ }
1725
+ </label>
1726
+
1727
+ @if (resultats.length) {
1728
+ <ul class="ngx-rch__resultats">
1729
+ @for (r of resultats; track $index) {
1730
+ <li>
1731
+ <button type="button" [disabled]="!r.selectionnable" (click)="choisir(r)">
1732
+ @if (r.etiquette) { <span class="ngx-rch__plaque ngx-rch__plaque--liste">{{ r.etiquette }}</span> }
1733
+ <span class="ngx-rch__corps">
1734
+ <strong>{{ r.titre }}</strong>
1735
+ @if (r.sousTitre) { <span>{{ r.sousTitre }}</span> }
1736
+ </span>
1737
+ @if (!r.selectionnable && cfg.nonSelectionnable) {
1738
+ <span class="ngx-rch__note">{{ cfg.nonSelectionnable }}</span>
1739
+ } @else if (r.note) {
1740
+ <span class="ngx-rch__note">{{ r.note }}</span>
1741
+ }
1742
+ </button>
1743
+ </li>
1744
+ }
1745
+ </ul>
1746
+ } @else if (rechercheFaite && !recherchant) {
1747
+ <p class="ngx-rch__aide" aria-live="polite">{{ echec || (cfg.aucunResultat || 'Aucun résultat pour « {q} ».').replace('{q}', saisie.value) }}</p>
1748
+ } @else if (field.hint) {
1749
+ <p class="ngx-rch__aide">{{ field.hint }}</p>
1750
+ }
1751
+ }
1752
+
1753
+ @if (cfg.ajout; as a) {
1754
+ <div class="ngx-rch__ajout">
1755
+ @if (nouveau) {
1756
+ @if (a.aide) { <span class="ngx-rch__aide">{{ a.aide }}</span> }
1757
+ <button type="button" class="ngx-rch__lien" (click)="rechercherExistant()">{{ a.retourLabel || 'Rechercher un existant' }}</button>
1758
+ } @else if (!control.disabled) {
1759
+ <button type="button" class="ngx-rch__ajouter" (click)="ajouter()">
1760
+ <mat-icon aria-hidden="true">{{ a.icone || 'person_add' }}</mat-icon><span>{{ a.label }}</span>
1761
+ </button>
1762
+ }
1763
+ </div>
1764
+ }
1765
+
1766
+ @if (erreur && !nouveau) { <p class="ngx-rch__erreur" role="alert">{{ erreur }}</p> }
1767
+ }
1768
+ `, isInline: true, styles: [":host{display:block;--ngx-rch-marine: var(--ngx-df-primary, #0c1a4a);--ngx-rch-filet: #e3e8f2;--ngx-rch-doux: #64748b}.ngx-rch__label{display:block;margin:0 0 .375rem;color:var(--ngx-rch-marine);font-size:.875rem;font-weight:600}.ngx-rch__requis{margin-left:.125rem;color:#e31e24}.ngx-rch__barre{display:flex;align-items:center;gap:.625rem;height:3rem;padding:0 1rem;border:1px solid var(--ngx-rch-filet);border-radius:999px;background:#fff;cursor:text;transition:border-color .16s ease,box-shadow .16s ease}.ngx-rch__barre--bouton{padding-right:.3125rem}.ngx-rch__barre:focus-within,.ngx-rch__barre--active{border-color:var(--ngx-rch-marine);box-shadow:0 0 0 3px #0c1a4a1a}.ngx-rch__barre--erreur{border-color:#e31e24}.ngx-rch__barre input{flex:1;min-width:0;border:0;outline:none;background:transparent;font:inherit;font-size:.9375rem;color:var(--ngx-rch-marine)}.ngx-rch__barre input::-webkit-search-cancel-button{display:none}.ngx-rch__barre mat-icon{flex-shrink:0;color:var(--ngx-rch-doux)}.ngx-rch__effacer{display:grid;place-items:center;padding:0;border:0;background:none;cursor:pointer}.ngx-rch__effacer mat-icon{color:var(--ngx-rch-marine)}.ngx-rch__lancer{display:inline-flex;flex-shrink:0;align-items:center;gap:.375rem;height:2.375rem;padding:0 1rem;border:0;border-radius:999px;background:var(--ngx-rch-marine);font:inherit;font-size:.875rem;font-weight:600;color:#fff;cursor:pointer;transition:transform .16s cubic-bezier(.23,1,.32,1),opacity .16s ease}.ngx-rch__lancer mat-icon{width:18px;height:18px;font-size:18px;color:#fff}.ngx-rch__lancer:active:not(:disabled){transform:scale(.97)}.ngx-rch__lancer:disabled{opacity:.45;cursor:default}.ngx-rch__resultats{margin:.5rem 0 0;padding:0;overflow:hidden;border:1px solid var(--ngx-rch-filet);border-radius:.875rem;background:#fff;list-style:none}.ngx-rch__resultats li+li{border-top:1px solid #f1f4f9}.ngx-rch__resultats button{display:flex;width:100%;align-items:center;gap:.875rem;padding:.625rem 1rem;border:0;background:none;font:inherit;text-align:left;cursor:pointer;transition:background-color .16s ease}@media(hover:hover)and (pointer:fine){.ngx-rch__resultats button:hover:not(:disabled){background:#0c1a4a0a}}.ngx-rch__resultats button:focus-visible{outline:2px solid var(--ngx-rch-marine);outline-offset:-2px}.ngx-rch__resultats button:disabled{cursor:not-allowed;opacity:.6}.ngx-rch__corps{display:flex;flex:1;min-width:0;flex-direction:column;gap:.125rem}.ngx-rch__corps strong{color:var(--ngx-rch-marine)}.ngx-rch__corps span{font-size:.8125rem;color:var(--ngx-rch-doux)}.ngx-rch__note{flex-shrink:0;max-width:40%;font-size:.8125rem;font-weight:600;color:var(--ngx-rch-marine);text-align:right}.ngx-rch__aide{margin:.5rem 0 0;font-size:.8125rem;color:var(--ngx-rch-doux)}.ngx-rch__erreur{margin:.25rem 0 0;font-size:.8125rem;color:#c0392b}.ngx-rch__ajout{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.75rem;margin:.75rem 0}.ngx-rch__ajout .ngx-rch__aide{margin:0 auto 0 0}.ngx-rch__ajouter{display:inline-flex;align-items:center;gap:.375rem;height:2.75rem;padding:0 1.25rem;border:1px solid #cfd8e6;border-radius:999px;background:#fff;font:inherit;font-weight:600;color:#1e40af;cursor:pointer;transition:transform .16s cubic-bezier(.23,1,.32,1)}.ngx-rch__ajouter mat-icon{width:18px;height:18px;font-size:18px;color:#1e40af}.ngx-rch__ajouter:active{transform:scale(.97)}.ngx-rch__lien{padding:0;border:0;background:none;font:inherit;font-size:.875rem;font-weight:600;color:var(--ngx-rch-marine);text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ngx-rch__fiche{overflow:hidden;border:1px solid rgba(14,44,73,.12);border-radius:.75rem;background:#fff}@media(prefers-reduced-motion:no-preference){.ngx-rch__fiche,.ngx-rch__resultats{animation:ngx-rch-apparition .18s cubic-bezier(.23,1,.32,1) both}}@keyframes ngx-rch-apparition{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.ngx-rch__entete{display:flex;align-items:center;gap:.875rem;padding:.875rem 1rem;border-bottom:1px solid rgba(14,44,73,.12);background:#0e2c490a}.ngx-rch__avatar{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:999px;background:var(--ngx-rch-marine);color:#fff;font-weight:700;text-transform:uppercase}.ngx-rch__avatar mat-icon{color:#fff}.ngx-rch__identite{display:flex;flex:1;min-width:0;flex-direction:column;gap:.125rem}.ngx-rch__nom{font-weight:600;color:var(--ngx-rch-marine);overflow-wrap:anywhere}.ngx-rch__badge{align-self:flex-start;padding:.0625rem .5rem;border-radius:999px;background:#0c1a4a14;color:var(--ngx-rch-marine);font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.ngx-rch__sous{font-size:.8125rem;color:var(--ngx-rch-doux)}.ngx-rch__changer{display:inline-flex;flex-shrink:0;align-items:center;gap:.375rem;height:2.25rem;padding:0 .875rem;border:1px solid #cfd8e6;border-radius:999px;background:#fff;font:inherit;font-size:.875rem;font-weight:600;color:var(--ngx-rch-marine);cursor:pointer;transition:transform .16s cubic-bezier(.23,1,.32,1)}.ngx-rch__changer mat-icon{width:18px;height:18px;font-size:18px}.ngx-rch__changer:active{transform:scale(.97)}.ngx-rch__details{display:grid;grid-template-columns:repeat(auto-fill,minmax(12rem,1fr));gap:.75rem 1.5rem;margin:0;padding:1rem}.ngx-rch__details dt{font-size:.75rem;color:#0e2c498c}.ngx-rch__details dd{margin:0;font-size:.875rem;font-weight:500;color:var(--ngx-rch-marine);overflow-wrap:anywhere}.ngx-rch__vide{color:var(--ngx-rch-doux)!important;font-style:italic;font-weight:400!important}.ngx-rch__statut{display:inline-block;padding:.0625rem .5rem;border-radius:999px;background:#0c1a4a14;font-size:.75rem;font-weight:600}.ngx-rch__statut[data-statut=ACTIF]{background:#16a34a1f;color:#15803d}.ngx-rch__statut[data-statut=SUSPENDU]{background:#ef9e2b26;color:#b8680d}.ngx-rch__statut[data-statut=INACTIF]{background:#c0392b1a;color:#c0392b}.ngx-rch__encart{display:flex;flex-wrap:wrap;align-items:center;gap:.875rem 1rem;padding:.875rem 1rem;border-top:1px solid rgba(14,44,73,.12)}.ngx-rch__encart-icone{display:grid;flex-shrink:0;place-items:center;width:2.5rem;height:2.5rem;border-radius:.625rem;background:#0c1a4a0f}.ngx-rch__encart-icone mat-icon{color:var(--ngx-rch-marine)}.ngx-rch__encart-corps{display:flex;flex:1;min-width:12rem;flex-direction:column;gap:.125rem}.ngx-rch__encart-surtitre{font-size:.6875rem;font-weight:700;letter-spacing:.04em;color:var(--ngx-rch-doux);text-transform:uppercase}.ngx-rch__encart-titre{font-weight:600;color:var(--ngx-rch-marine)}.ngx-rch__puces{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.25rem}.ngx-rch__puce{padding:.0625rem .5rem;border-radius:999px;background:#0c1a4a0f;font-size:.75rem;color:var(--ngx-rch-marine)}.ngx-rch__encart-plaque{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem}.ngx-rch__encart-plaque-label{font-size:.6875rem;color:var(--ngx-rch-doux)}.ngx-rch__plaque{display:inline-block;padding:.25rem .625rem;border:2px solid var(--ngx-rch-marine);border-radius:.375rem;background:#fff;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;letter-spacing:.06em;color:var(--ngx-rch-marine);white-space:nowrap}.ngx-rch__plaque--liste{flex-shrink:0;min-width:6.5rem;padding:.125rem .5rem;font-size:.8125rem;text-align:center}@media(prefers-reduced-motion:reduce){.ngx-rch__barre,.ngx-rch__resultats button,.ngx-rch__changer,.ngx-rch__lancer,.ngx-rch__ajouter{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1769
+ }
1770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RechercheFieldComponent, decorators: [{
1771
+ type: Component,
1772
+ args: [{ selector: 'ngx-recherche-field', standalone: true, imports: [ReactiveFormsModule, MatIcon, MatProgressSpinner], changeDetection: ChangeDetectionStrategy.OnPush, template: `
1773
+ @if (field.label) {
1774
+ <span class="ngx-rch__label" [id]="field.key + '-label'">
1775
+ {{ field.label }}@if (field.validation?.required) {<span class="ngx-rch__requis">*</span>}
1776
+ </span>
1777
+ }
1778
+
1779
+ @if (retenu; as f) {
1780
+ <div class="ngx-rch__fiche">
1781
+ <div class="ngx-rch__entete">
1782
+ <div class="ngx-rch__avatar" aria-hidden="true">
1783
+ @if (cfg.avatar) { <mat-icon>{{ cfg.avatar }}</mat-icon> } @else { {{ (f.titreFiche || '?').charAt(0) }} }
1784
+ </div>
1785
+ <div class="ngx-rch__identite">
1786
+ <span class="ngx-rch__nom">{{ f.titreFiche }}</span>
1787
+ @if (f.badge) { <span class="ngx-rch__badge">{{ lisible(f.badge) }}</span> }
1788
+ @else if (f.sousTitre) { <span class="ngx-rch__sous">{{ f.sousTitre }}</span> }
1789
+ </div>
1790
+ @if (!control.disabled) {
1791
+ <button type="button" class="ngx-rch__changer" (click)="changer()">
1792
+ <mat-icon aria-hidden="true">sync</mat-icon><span>{{ cfg.changerLabel || 'Changer' }}</span>
1793
+ </button>
1794
+ }
1795
+ </div>
1796
+ @if (f.details.length) {
1797
+ <dl class="ngx-rch__details">
1798
+ @for (d of f.details; track d.label) {
1799
+ <div>
1800
+ <dt>{{ d.label }}</dt>
1801
+ @if (!d.valeur) {
1802
+ <dd class="ngx-rch__vide">Non renseigné</dd>
1803
+ } @else if (d.format === 'badge') {
1804
+ <dd><span class="ngx-rch__statut" [attr.data-statut]="d.valeur">{{ lisible(d.valeur) }}</span></dd>
1805
+ } @else {
1806
+ <dd>{{ lisible(d.valeur) }}</dd>
1807
+ }
1808
+ </div>
1809
+ }
1810
+ </dl>
1811
+ }
1812
+ @if (f.encart; as e) {
1813
+ <div class="ngx-rch__encart">
1814
+ <span class="ngx-rch__encart-icone" aria-hidden="true"><mat-icon>{{ cfg.encart?.icone || 'directions_car' }}</mat-icon></span>
1815
+ <div class="ngx-rch__encart-corps">
1816
+ @if (e.surtitre) { <span class="ngx-rch__encart-surtitre">{{ e.surtitre }}</span> }
1817
+ @if (e.titre) { <span class="ngx-rch__encart-titre">{{ e.titre }}</span> }
1818
+ @if (e.puces.length) {
1819
+ <span class="ngx-rch__puces">@for (p of e.puces; track $index) { <span class="ngx-rch__puce">{{ lisible(p) }}</span> }</span>
1820
+ }
1821
+ </div>
1822
+ @if (e.etiquette) {
1823
+ <span class="ngx-rch__encart-plaque">
1824
+ @if (cfg.encart?.etiquetteLabel) { <span class="ngx-rch__encart-plaque-label" aria-hidden="true">{{ cfg.encart?.etiquetteLabel }}</span> }
1825
+ <span class="ngx-rch__plaque" [attr.aria-label]="(cfg.encart?.etiquetteLabel || '') + ' ' + e.etiquette">{{ e.etiquette }}</span>
1826
+ </span>
1827
+ }
1828
+ </div>
1829
+ }
1830
+ </div>
1831
+ } @else {
1832
+ @if (!nouveau) {
1833
+ <label class="ngx-rch__barre" [class.ngx-rch__barre--active]="saisie.value" [class.ngx-rch__barre--erreur]="erreur"
1834
+ [class.ngx-rch__barre--bouton]="cfg.bouton">
1835
+ @if (recherchant) {
1836
+ <mat-progress-spinner diameter="20" mode="indeterminate" />
1837
+ } @else {
1838
+ <mat-icon aria-hidden="true">search</mat-icon>
1839
+ }
1840
+ <input type="search" [formControl]="saisie" autocomplete="off"
1841
+ [placeholder]="cfg.placeholder || field.placeholder || 'Rechercher…'"
1842
+ [attr.aria-label]="field.label || cfg.placeholder || 'Rechercher'"
1843
+ (keydown.enter)="$event.preventDefault(); lancer()"
1844
+ (blur)="control.markAsTouched()" />
1845
+ @if (saisie.value) {
1846
+ <button type="button" class="ngx-rch__effacer" aria-label="Effacer" (click)="saisie.setValue('')">
1847
+ <mat-icon aria-hidden="true">close</mat-icon>
1848
+ </button>
1849
+ }
1850
+ @if (cfg.bouton) {
1851
+ <button type="button" class="ngx-rch__lancer" [disabled]="!saisie.value.trim() || recherchant" (click)="lancer()">
1852
+ <mat-icon aria-hidden="true">search</mat-icon><span>{{ cfg.bouton }}</span>
1853
+ </button>
1854
+ }
1855
+ </label>
1856
+
1857
+ @if (resultats.length) {
1858
+ <ul class="ngx-rch__resultats">
1859
+ @for (r of resultats; track $index) {
1860
+ <li>
1861
+ <button type="button" [disabled]="!r.selectionnable" (click)="choisir(r)">
1862
+ @if (r.etiquette) { <span class="ngx-rch__plaque ngx-rch__plaque--liste">{{ r.etiquette }}</span> }
1863
+ <span class="ngx-rch__corps">
1864
+ <strong>{{ r.titre }}</strong>
1865
+ @if (r.sousTitre) { <span>{{ r.sousTitre }}</span> }
1866
+ </span>
1867
+ @if (!r.selectionnable && cfg.nonSelectionnable) {
1868
+ <span class="ngx-rch__note">{{ cfg.nonSelectionnable }}</span>
1869
+ } @else if (r.note) {
1870
+ <span class="ngx-rch__note">{{ r.note }}</span>
1871
+ }
1872
+ </button>
1873
+ </li>
1874
+ }
1875
+ </ul>
1876
+ } @else if (rechercheFaite && !recherchant) {
1877
+ <p class="ngx-rch__aide" aria-live="polite">{{ echec || (cfg.aucunResultat || 'Aucun résultat pour « {q} ».').replace('{q}', saisie.value) }}</p>
1878
+ } @else if (field.hint) {
1879
+ <p class="ngx-rch__aide">{{ field.hint }}</p>
1880
+ }
1881
+ }
1882
+
1883
+ @if (cfg.ajout; as a) {
1884
+ <div class="ngx-rch__ajout">
1885
+ @if (nouveau) {
1886
+ @if (a.aide) { <span class="ngx-rch__aide">{{ a.aide }}</span> }
1887
+ <button type="button" class="ngx-rch__lien" (click)="rechercherExistant()">{{ a.retourLabel || 'Rechercher un existant' }}</button>
1888
+ } @else if (!control.disabled) {
1889
+ <button type="button" class="ngx-rch__ajouter" (click)="ajouter()">
1890
+ <mat-icon aria-hidden="true">{{ a.icone || 'person_add' }}</mat-icon><span>{{ a.label }}</span>
1891
+ </button>
1892
+ }
1893
+ </div>
1894
+ }
1895
+
1896
+ @if (erreur && !nouveau) { <p class="ngx-rch__erreur" role="alert">{{ erreur }}</p> }
1897
+ }
1898
+ `, styles: [":host{display:block;--ngx-rch-marine: var(--ngx-df-primary, #0c1a4a);--ngx-rch-filet: #e3e8f2;--ngx-rch-doux: #64748b}.ngx-rch__label{display:block;margin:0 0 .375rem;color:var(--ngx-rch-marine);font-size:.875rem;font-weight:600}.ngx-rch__requis{margin-left:.125rem;color:#e31e24}.ngx-rch__barre{display:flex;align-items:center;gap:.625rem;height:3rem;padding:0 1rem;border:1px solid var(--ngx-rch-filet);border-radius:999px;background:#fff;cursor:text;transition:border-color .16s ease,box-shadow .16s ease}.ngx-rch__barre--bouton{padding-right:.3125rem}.ngx-rch__barre:focus-within,.ngx-rch__barre--active{border-color:var(--ngx-rch-marine);box-shadow:0 0 0 3px #0c1a4a1a}.ngx-rch__barre--erreur{border-color:#e31e24}.ngx-rch__barre input{flex:1;min-width:0;border:0;outline:none;background:transparent;font:inherit;font-size:.9375rem;color:var(--ngx-rch-marine)}.ngx-rch__barre input::-webkit-search-cancel-button{display:none}.ngx-rch__barre mat-icon{flex-shrink:0;color:var(--ngx-rch-doux)}.ngx-rch__effacer{display:grid;place-items:center;padding:0;border:0;background:none;cursor:pointer}.ngx-rch__effacer mat-icon{color:var(--ngx-rch-marine)}.ngx-rch__lancer{display:inline-flex;flex-shrink:0;align-items:center;gap:.375rem;height:2.375rem;padding:0 1rem;border:0;border-radius:999px;background:var(--ngx-rch-marine);font:inherit;font-size:.875rem;font-weight:600;color:#fff;cursor:pointer;transition:transform .16s cubic-bezier(.23,1,.32,1),opacity .16s ease}.ngx-rch__lancer mat-icon{width:18px;height:18px;font-size:18px;color:#fff}.ngx-rch__lancer:active:not(:disabled){transform:scale(.97)}.ngx-rch__lancer:disabled{opacity:.45;cursor:default}.ngx-rch__resultats{margin:.5rem 0 0;padding:0;overflow:hidden;border:1px solid var(--ngx-rch-filet);border-radius:.875rem;background:#fff;list-style:none}.ngx-rch__resultats li+li{border-top:1px solid #f1f4f9}.ngx-rch__resultats button{display:flex;width:100%;align-items:center;gap:.875rem;padding:.625rem 1rem;border:0;background:none;font:inherit;text-align:left;cursor:pointer;transition:background-color .16s ease}@media(hover:hover)and (pointer:fine){.ngx-rch__resultats button:hover:not(:disabled){background:#0c1a4a0a}}.ngx-rch__resultats button:focus-visible{outline:2px solid var(--ngx-rch-marine);outline-offset:-2px}.ngx-rch__resultats button:disabled{cursor:not-allowed;opacity:.6}.ngx-rch__corps{display:flex;flex:1;min-width:0;flex-direction:column;gap:.125rem}.ngx-rch__corps strong{color:var(--ngx-rch-marine)}.ngx-rch__corps span{font-size:.8125rem;color:var(--ngx-rch-doux)}.ngx-rch__note{flex-shrink:0;max-width:40%;font-size:.8125rem;font-weight:600;color:var(--ngx-rch-marine);text-align:right}.ngx-rch__aide{margin:.5rem 0 0;font-size:.8125rem;color:var(--ngx-rch-doux)}.ngx-rch__erreur{margin:.25rem 0 0;font-size:.8125rem;color:#c0392b}.ngx-rch__ajout{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.75rem;margin:.75rem 0}.ngx-rch__ajout .ngx-rch__aide{margin:0 auto 0 0}.ngx-rch__ajouter{display:inline-flex;align-items:center;gap:.375rem;height:2.75rem;padding:0 1.25rem;border:1px solid #cfd8e6;border-radius:999px;background:#fff;font:inherit;font-weight:600;color:#1e40af;cursor:pointer;transition:transform .16s cubic-bezier(.23,1,.32,1)}.ngx-rch__ajouter mat-icon{width:18px;height:18px;font-size:18px;color:#1e40af}.ngx-rch__ajouter:active{transform:scale(.97)}.ngx-rch__lien{padding:0;border:0;background:none;font:inherit;font-size:.875rem;font-weight:600;color:var(--ngx-rch-marine);text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ngx-rch__fiche{overflow:hidden;border:1px solid rgba(14,44,73,.12);border-radius:.75rem;background:#fff}@media(prefers-reduced-motion:no-preference){.ngx-rch__fiche,.ngx-rch__resultats{animation:ngx-rch-apparition .18s cubic-bezier(.23,1,.32,1) both}}@keyframes ngx-rch-apparition{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.ngx-rch__entete{display:flex;align-items:center;gap:.875rem;padding:.875rem 1rem;border-bottom:1px solid rgba(14,44,73,.12);background:#0e2c490a}.ngx-rch__avatar{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:999px;background:var(--ngx-rch-marine);color:#fff;font-weight:700;text-transform:uppercase}.ngx-rch__avatar mat-icon{color:#fff}.ngx-rch__identite{display:flex;flex:1;min-width:0;flex-direction:column;gap:.125rem}.ngx-rch__nom{font-weight:600;color:var(--ngx-rch-marine);overflow-wrap:anywhere}.ngx-rch__badge{align-self:flex-start;padding:.0625rem .5rem;border-radius:999px;background:#0c1a4a14;color:var(--ngx-rch-marine);font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.ngx-rch__sous{font-size:.8125rem;color:var(--ngx-rch-doux)}.ngx-rch__changer{display:inline-flex;flex-shrink:0;align-items:center;gap:.375rem;height:2.25rem;padding:0 .875rem;border:1px solid #cfd8e6;border-radius:999px;background:#fff;font:inherit;font-size:.875rem;font-weight:600;color:var(--ngx-rch-marine);cursor:pointer;transition:transform .16s cubic-bezier(.23,1,.32,1)}.ngx-rch__changer mat-icon{width:18px;height:18px;font-size:18px}.ngx-rch__changer:active{transform:scale(.97)}.ngx-rch__details{display:grid;grid-template-columns:repeat(auto-fill,minmax(12rem,1fr));gap:.75rem 1.5rem;margin:0;padding:1rem}.ngx-rch__details dt{font-size:.75rem;color:#0e2c498c}.ngx-rch__details dd{margin:0;font-size:.875rem;font-weight:500;color:var(--ngx-rch-marine);overflow-wrap:anywhere}.ngx-rch__vide{color:var(--ngx-rch-doux)!important;font-style:italic;font-weight:400!important}.ngx-rch__statut{display:inline-block;padding:.0625rem .5rem;border-radius:999px;background:#0c1a4a14;font-size:.75rem;font-weight:600}.ngx-rch__statut[data-statut=ACTIF]{background:#16a34a1f;color:#15803d}.ngx-rch__statut[data-statut=SUSPENDU]{background:#ef9e2b26;color:#b8680d}.ngx-rch__statut[data-statut=INACTIF]{background:#c0392b1a;color:#c0392b}.ngx-rch__encart{display:flex;flex-wrap:wrap;align-items:center;gap:.875rem 1rem;padding:.875rem 1rem;border-top:1px solid rgba(14,44,73,.12)}.ngx-rch__encart-icone{display:grid;flex-shrink:0;place-items:center;width:2.5rem;height:2.5rem;border-radius:.625rem;background:#0c1a4a0f}.ngx-rch__encart-icone mat-icon{color:var(--ngx-rch-marine)}.ngx-rch__encart-corps{display:flex;flex:1;min-width:12rem;flex-direction:column;gap:.125rem}.ngx-rch__encart-surtitre{font-size:.6875rem;font-weight:700;letter-spacing:.04em;color:var(--ngx-rch-doux);text-transform:uppercase}.ngx-rch__encart-titre{font-weight:600;color:var(--ngx-rch-marine)}.ngx-rch__puces{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.25rem}.ngx-rch__puce{padding:.0625rem .5rem;border-radius:999px;background:#0c1a4a0f;font-size:.75rem;color:var(--ngx-rch-marine)}.ngx-rch__encart-plaque{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem}.ngx-rch__encart-plaque-label{font-size:.6875rem;color:var(--ngx-rch-doux)}.ngx-rch__plaque{display:inline-block;padding:.25rem .625rem;border:2px solid var(--ngx-rch-marine);border-radius:.375rem;background:#fff;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;letter-spacing:.06em;color:var(--ngx-rch-marine);white-space:nowrap}.ngx-rch__plaque--liste{flex-shrink:0;min-width:6.5rem;padding:.125rem .5rem;font-size:.8125rem;text-align:center}@media(prefers-reduced-motion:reduce){.ngx-rch__barre,.ngx-rch__resultats button,.ngx-rch__changer,.ngx-rch__lancer,.ngx-rch__ajouter{transition:none}}\n"] }]
1899
+ }], propDecorators: { field: [{
1900
+ type: Input,
1901
+ args: [{ required: true }]
1902
+ }], form: [{
1903
+ type: Input,
1904
+ args: [{ required: true }]
1905
+ }] } });
1906
+
1362
1907
  class DynamicFieldComponent {
1363
1908
  constructor() {
1364
1909
  /** Apparence héritée du formulaire parent — surchargeable par field.appearance */
@@ -2103,7 +2648,7 @@ class DynamicFieldComponent {
2103
2648
  this.searchDisplayControl.setValue(String(initial), { emitEvent: false });
2104
2649
  }
2105
2650
  const cfg = this.field.remoteSearch;
2106
- this.remoteSearch$.pipe(debounceTime(cfg.debounceMs ?? 300), distinctUntilChanged(), filter(q => q.length >= (cfg.minChars ?? 3)), tap$1(() => { this.loadingOptions = true; this.cdr.markForCheck(); }), switchMap(q => this.fetchRemoteSearch(q))).subscribe(options => {
2651
+ this.remoteSearch$.pipe(debounceTime$1(cfg.debounceMs ?? 300), distinctUntilChanged$1(), filter$1(q => q.length >= (cfg.minChars ?? 3)), tap$1(() => { this.loadingOptions = true; this.cdr.markForCheck(); }), switchMap(q => this.fetchRemoteSearch(q))).subscribe(options => {
2107
2652
  this.resolvedOptions = options;
2108
2653
  this.loadingOptions = false;
2109
2654
  // La réponse HTTP arrive dans un callback async : sans ça, le panneau
@@ -2324,7 +2869,7 @@ class DynamicFieldComponent {
2324
2869
  this.formControl.setValue(complet, { emitEvent: true });
2325
2870
  }
2326
2871
  get isInputField() {
2327
- return this.field.type !== 'divider' && this.field.type !== 'heading' && this.field.type !== 'custom';
2872
+ return !['divider', 'heading', 'custom', 'recherche'].includes(this.field.type);
2328
2873
  }
2329
2874
  /** type: 'custom' — composant déclaré par l'application (provideNgxForms({ customFields })). */
2330
2875
  get customComponent() {
@@ -2491,6 +3036,10 @@ class DynamicFieldComponent {
2491
3036
  }
2492
3037
  }
2493
3038
 
3039
+ @if (field.type === 'recherche') {
3040
+ <ngx-recherche-field [field]="field" [form]="form" />
3041
+ }
3042
+
2494
3043
  @if (isInputField) {
2495
3044
  @if (field.type === 'checkbox') {
2496
3045
  <div class="ngx-checkbox-wrapper">
@@ -3207,7 +3756,7 @@ class DynamicFieldComponent {
3207
3756
  }
3208
3757
  }
3209
3758
  }
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"] }] }); }
3759
+ `, 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"] }, { kind: "component", type: RechercheFieldComponent, selector: "ngx-recherche-field", inputs: ["field", "form"] }] }); }
3211
3760
  }
3212
3761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: DynamicFieldComponent, decorators: [{
3213
3762
  type: Component,
@@ -3228,6 +3777,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
3228
3777
  MatMenuModule,
3229
3778
  ThousandsInputDirective,
3230
3779
  NgComponentOutlet,
3780
+ RechercheFieldComponent,
3231
3781
  ], template: `
3232
3782
  @if (field.type === 'divider') {
3233
3783
  <hr class="ngx-divider"
@@ -3257,6 +3807,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
3257
3807
  }
3258
3808
  }
3259
3809
 
3810
+ @if (field.type === 'recherche') {
3811
+ <ngx-recherche-field [field]="field" [form]="form" />
3812
+ }
3813
+
3260
3814
  @if (isInputField) {
3261
3815
  @if (field.type === 'checkbox') {
3262
3816
  <div class="ngx-checkbox-wrapper">
@@ -4172,7 +4726,7 @@ class QuestionnaireFieldComponent {
4172
4726
  });
4173
4727
  this.subs.push(this.control.events.subscribe(() => this.cdr.markForCheck()));
4174
4728
  if (this.field.url) {
4175
- this.subs.push(this.form.valueChanges.pipe(startWith(null), map$1(() => this.urlResolue()), distinctUntilChanged$1(), switchMap$1((url) => {
4729
+ this.subs.push(this.form.valueChanges.pipe(startWith(null), map$1(() => this.urlResolue()), distinctUntilChanged(), switchMap$1((url) => {
4176
4730
  if (!url)
4177
4731
  return of([]);
4178
4732
  this.chargement = true;
@@ -6327,5 +6881,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
6327
6881
  * Generated bundle index. Do not edit.
6328
6882
  */
6329
6883
 
6330
- export { ConditionEvaluatorService, DynamicFieldComponent, DynamicFormBuilderService, DynamicFormComponent, FORM_API_URL, FormBuilderComponent, FormConfigService, FormLoaderComponent, FormStorageAdapter, HttpStorageAdapter, LocalStorageAdapter, MesFormulairesComponent, NGX_CUSTOM_FIELDS, NGX_DATA_API_URL, NGX_FORMS_AUTH, NGX_FORMS_LIST_PAGE_SIZE, NgxFormsAuthService, PHONE_COUNTRIES, QuestionnaireFieldComponent, RepeaterFieldComponent, StepperFormComponent, ThousandsInputDirective, UniquenessValidatorService, answerQuestion, answeredCount, evaluateRules, getPath, includedBy, keepAnswers, matchesConditions, ngxFormsAuthInterceptor, optionLabel, prepareSubmit, provideNgxForms, questionErrors, toFormValues, toQuestions, toggleWithIncludes, withLockedIncludes, withoutFields };
6884
+ export { ConditionEvaluatorService, DynamicFieldComponent, DynamicFormBuilderService, DynamicFormComponent, FORM_API_URL, FormBuilderComponent, FormConfigService, FormLoaderComponent, FormStorageAdapter, HttpStorageAdapter, LocalStorageAdapter, MesFormulairesComponent, NGX_CUSTOM_FIELDS, NGX_DATA_API_URL, NGX_FORMS_AUTH, NGX_FORMS_LIST_PAGE_SIZE, NgxFormsAuthService, PHONE_COUNTRIES, QuestionnaireFieldComponent, RechercheFieldComponent, RepeaterFieldComponent, StepperFormComponent, ThousandsInputDirective, UniquenessValidatorService, answerQuestion, answeredCount, evaluateRules, filtrerResultats, formatDate, getFirstPath, getPath, includedBy, keepAnswers, matchesConditions, ngxFormsAuthInterceptor, optionLabel, prepareSubmit, provideNgxForms, questionErrors, rechercheChamps, rechercheItem, rechercheItems, rechercheTexte, toFormValues, toQuestions, toggleWithIncludes, versResultat, withLockedIncludes, withoutFields };
6331
6885
  //# sourceMappingURL=suntelecoms-ngx-dynamic-form.mjs.map