@suntelecoms/ngx-dynamic-form 1.12.1 → 1.15.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,4 +1,4 @@
1
- import type { DynamicFormConfig, DynamicFormField, FieldCondition, FieldType, FieldValidation, RemoteSearchConfig, SelectOption, StepGuard, StepperFormConfig, ValueRule, QuestionItem } from '../../models/form-field.model';
1
+ import type { DynamicFormConfig, DynamicFormField, FieldCondition, FieldType, FieldValidation, RemoteSearchConfig, SelectOption, StepGuard, StepperFormConfig, ValueRule, QuestionItem, RechercheConfig } from '../../models/form-field.model';
2
2
  import type { SavedFormSchema } from '../../models/saved-form.model';
3
3
  import * as i0 from "@angular/core";
4
4
  interface FieldTypeDef {
@@ -10,6 +10,7 @@ interface FieldTypeDef {
10
10
  interface BuilderStep {
11
11
  label: string;
12
12
  icon?: string;
13
+ description?: string;
13
14
  fields: DynamicFormField[];
14
15
  atLeastOneOf?: string[];
15
16
  atLeastOneOfMessage?: string;
@@ -47,6 +48,14 @@ export declare class FormBuilderComponent {
47
48
  formFloatLabel: import("@angular/core").WritableSignal<"auto" | "always">;
48
49
  formAtLeastOneOfKeys: import("@angular/core").WritableSignal<string>;
49
50
  formAtLeastOneOfMsg: import("@angular/core").WritableSignal<string>;
51
+ showSubmit: import("@angular/core").WritableSignal<boolean>;
52
+ formLayout: import("@angular/core").WritableSignal<"vertical" | "horizontal" | "inline">;
53
+ formDebug: import("@angular/core").WritableSignal<boolean>;
54
+ stepperLinear: import("@angular/core").WritableSignal<boolean>;
55
+ stepperOrientation: import("@angular/core").WritableSignal<"vertical" | "horizontal">;
56
+ stepperSummaryLabel: import("@angular/core").WritableSignal<string>;
57
+ /** Clés de la config que le constructeur n'édite pas (cssClass…) : gardées telles quelles à l'enregistrement. */
58
+ private configReste;
50
59
  formCode: import("@angular/core").WritableSignal<string>;
51
60
  currentId: import("@angular/core").WritableSignal<string | null>;
52
61
  showExport: import("@angular/core").WritableSignal<boolean>;
@@ -64,6 +73,8 @@ export declare class FormBuilderComponent {
64
73
  readonly selectedField: import("@angular/core").Signal<DynamicFormField | null>;
65
74
  readonly previewConfig: import("@angular/core").Signal<DynamicFormConfig>;
66
75
  readonly stepperPreviewConfig: import("@angular/core").Signal<StepperFormConfig>;
76
+ /** Clés de config éditées par le constructeur (les autres vont dans configReste). */
77
+ private static readonly CLES_CONFIG;
67
78
  readonly groupedTypes: import("@angular/core").Signal<{
68
79
  label: "Saisie" | "Choix" | "Mise en page";
69
80
  types: FieldTypeDef[];
@@ -88,7 +99,7 @@ export declare class FormBuilderComponent {
88
99
  updateValidation(prop: keyof FieldValidation, value: any): void;
89
100
  getOptions(): SelectOption[];
90
101
  addOption(): void;
91
- updateOption(idx: number, prop: 'label' | 'value' | 'dependsOnValue' | 'locked', value: string | boolean): void;
102
+ updateOption(idx: number, prop: 'label' | 'value' | 'dependsOnValue' | 'locked' | 'disabled' | 'group', value: string | boolean): void;
92
103
  /** Options cochées en même temps que l'option idx (includes) ; « griser » : includesLocked. */
93
104
  updateOptionIncludes(idx: number, values: any[]): void;
94
105
  updateOptionIncludesLocked(idx: number, locked: boolean): void;
@@ -123,6 +134,36 @@ export declare class FormBuilderComponent {
123
134
  /** Source des questions : saisies ici ('static') ou chargées depuis une API ('api'). */
124
135
  questionSource(): 'static' | 'api';
125
136
  setQuestionSource(source: 'static' | 'api'): void;
137
+ /** Clés de RechercheConfig éditées en JSON (« Avancé ») plutôt qu'en champs dédiés. */
138
+ private static readonly RCH_AVANCE;
139
+ rchAvanceErreur: import("@angular/core").WritableSignal<string>;
140
+ rch(): RechercheConfig;
141
+ /** Propriété de `recherche` ; valeur vide = propriété retirée (défaut du plugin). */
142
+ setRch(prop: keyof RechercheConfig, value: any): void;
143
+ /** Mode d'après l'URL : recherche serveur avec {{q}}, sinon liste filtrée dans le navigateur. */
144
+ rchServeur(): boolean;
145
+ getRchDetails(): {
146
+ label: string;
147
+ path: string;
148
+ format?: "badge" | "date";
149
+ }[];
150
+ addRchDetail(): void;
151
+ removeRchDetail(i: number): void;
152
+ updateRchDetail(i: number, prop: 'label' | 'path' | 'format', value: any): void;
153
+ /** `champs` en lignes éditables (clé du formulaire → source). */
154
+ getRchChamps(): {
155
+ cle: string;
156
+ source: string;
157
+ }[];
158
+ private setRchChamps;
159
+ addRchChamp(): void;
160
+ removeRchChamp(i: number): void;
161
+ updateRchChamp(i: number, prop: 'cle' | 'source', value: string): void;
162
+ toggleRchAjout(on: boolean): void;
163
+ setRchAjout(prop: string, value: any): void;
164
+ rchAvanceText(): string;
165
+ /** Options avancées (JSON) : remplace les clés RCH_AVANCE de `recherche`, garde les autres. */
166
+ updateRchAvance(text: string): void;
126
167
  /** Valeur saisie dans le constructeur : 'true' / 'false' deviennent des booléens (cases à cocher). */
127
168
  private valeurSaisie;
128
169
  getValueRules(): ValueRule[];
@@ -131,7 +172,28 @@ export declare class FormBuilderComponent {
131
172
  addValueRule(): void;
132
173
  removeValueRule(index: number): void;
133
174
  updateValueRule(index: number, prop: 'value' | 'lock', value: any): void;
134
- updateValueRuleCondition(index: number, key: keyof FieldCondition, value: any): void;
175
+ /** Toutes les conditions d'une règle (`when` objet ou tableau). */
176
+ ruleConditions(rule: ValueRule): FieldCondition[];
177
+ /** Réécrit les conditions d'une règle : objet seul s'il n'y en a qu'une, tableau sinon (logic retirée). */
178
+ private setRuleConditions;
179
+ updateValueRuleCondition(index: number, key: keyof FieldCondition, value: any, ci?: number): void;
180
+ addValueRuleCondition(index: number): void;
181
+ removeValueRuleCondition(index: number, ci: number): void;
182
+ setValueRuleLogic(index: number, logic: 'AND' | 'OR'): void;
183
+ setUpload(prop: string, value: any): void;
184
+ setUploadJson(prop: 'params' | 'headers', text: string): void;
185
+ /** maxFileSize saisi en Mo, gardé en octets. */
186
+ maxFileSizeMo(): number | '';
187
+ setMaxFileSizeMo(v: any): void;
188
+ toggleUpload(on: boolean): void;
189
+ /** Liste séparée par des virgules (keepKeys). */
190
+ setUploadList(prop: string, text: string): void;
191
+ /** Objets JSON (headers, params de l'upload, params de remoteSearch) : texte affiché et erreur par clé. */
192
+ jsonErreurs: import("@angular/core").WritableSignal<Record<string, string>>;
193
+ jsonText(v: any): string;
194
+ /** Analyse un objet JSON saisi ; appelle `apply` avec l'objet (undefined si vide), ou note l'erreur sous `cle`. */
195
+ setJsonObject(cle: string, text: string, apply: (v: Record<string, any> | undefined) => void): void;
196
+ setRemoteSearchParams(text: string): void;
135
197
  getDisabledConditions(): FieldCondition[];
136
198
  addDisabledCondition(): void;
137
199
  removeDisabledCondition(index: number): void;
@@ -166,7 +228,7 @@ export declare class FormBuilderComponent {
166
228
  setStepAtLeastOneOf(text: string): void;
167
229
  getStepBeforeNext(): StepGuard | undefined;
168
230
  toggleBeforeNext(enabled: boolean): void;
169
- setBeforeNextProp(key: keyof StepGuard, value: string): void;
231
+ setBeforeNextProp(key: keyof StepGuard, value: any): void;
170
232
  /** Presets de masques de saisie courants */
171
233
  readonly maskPresets: {
172
234
  label: string;
@@ -0,0 +1,60 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
3
+ import { DynamicFormField, RechercheConfig } from '../../models/form-field.model';
4
+ import { RechercheResultat } from '../../utils/recherche';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * type: 'recherche' — recherche d'une entité via une API puis fiche de la sélection (bouton « Changer »).
8
+ * Avec `{{q}}` dans `recherche.url` : recherche serveur (debounce, ou Entrée / bouton) ; sans : liste chargée une
9
+ * fois puis filtrée dans le navigateur. Valeur du champ : `recherche.valeur` de l'item choisi ; `recherche.champs`
10
+ * sont écrits à plat dans le formulaire. Au retour sur l'étape, la fiche est rechargée via
11
+ * `recherche.chargementUrl` (`{{value}}`), ou retrouvée dans la liste (mode sans `{{q}}`).
12
+ */
13
+ export declare class RechercheFieldComponent implements OnInit, OnDestroy {
14
+ field: DynamicFormField;
15
+ form: FormGroup;
16
+ private readonly http;
17
+ private readonly dataApiUrl;
18
+ private readonly builder;
19
+ private readonly cdr;
20
+ private readonly manuelle$;
21
+ private subs;
22
+ /** Mode sans {{q}} : items chargés une fois, filtrés dans le navigateur. */
23
+ private liste;
24
+ readonly saisie: FormControl<string>;
25
+ resultats: RechercheResultat[];
26
+ retenu: RechercheResultat | null;
27
+ recherchant: boolean;
28
+ rechercheFaite: boolean;
29
+ echec: string;
30
+ get cfg(): RechercheConfig;
31
+ get control(): AbstractControl;
32
+ get erreur(): string | null;
33
+ /** Saisie d'une nouvelle entité (recherche.ajout) : le champ `ajout.champ` porte `ajout.valeur`. */
34
+ get nouveau(): boolean;
35
+ private get serveur();
36
+ ngOnInit(): void;
37
+ ngOnDestroy(): void;
38
+ lancer(): void;
39
+ choisir(r: RechercheResultat): void;
40
+ changer(): void;
41
+ /** « Ajouter » : sélection effacée, mode de saisie d'une nouvelle entité. */
42
+ ajouter(): void;
43
+ rechercherExistant(): void;
44
+ /** Codes techniques (EN_ATTENTE) rendus lisibles (En attente) ; le reste tel quel. */
45
+ lisible(valeur: string): string;
46
+ private poserMode;
47
+ private chercher;
48
+ private tous;
49
+ private charger;
50
+ private versResultats;
51
+ /** Fiche de la valeur courante : chargementUrl, sinon recherche dans la liste (mode sans {{q}}). */
52
+ private restaurer;
53
+ private appliquer;
54
+ /** Clés plates écrites dans le formulaire (ajoutées si l'étape ne les déclare pas). */
55
+ private ecrireChamps;
56
+ /** {{q}} / {{value}} puis {{champ}} du formulaire ; relative à dataUrl sauf 'http…' ou '/…'. */
57
+ private url;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<RechercheFieldComponent, never>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<RechercheFieldComponent, "ngx-recherche-field", never, { "field": { "alias": "field"; "required": true; }; "form": { "alias": "form"; "required": true; }; }, {}, never, never, true, never>;
60
+ }
@@ -1,4 +1,4 @@
1
- export type FieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'textarea' | 'select' | 'multiselect' | 'checkbox' | 'radio' | 'switch' | 'date' | 'datetime-local' | 'time' | 'month' | 'week' | 'range' | 'color' | 'location' | 'file' | 'hidden' | 'phone' | 'iso-country' | 'country-dial-code' | 'divider' | 'heading' | 'custom' | 'repeater' | 'questionnaire';
1
+ export type FieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'textarea' | 'select' | 'multiselect' | 'checkbox' | 'radio' | 'switch' | 'date' | 'datetime-local' | 'time' | 'month' | 'week' | 'range' | 'color' | 'location' | 'file' | 'hidden' | 'phone' | 'iso-country' | 'country-dial-code' | 'divider' | 'heading' | 'custom' | 'repeater' | 'questionnaire' | 'recherche';
2
2
  export interface SelectOption {
3
3
  label: string;
4
4
  value: any;
@@ -77,6 +77,8 @@ export interface FieldValidation {
77
77
  ageReferenceField?: string;
78
78
  messages?: {
79
79
  required?: string;
80
+ /** Champ rendu obligatoire par requiredWhen (repli : required). */
81
+ requiredWhen?: string;
80
82
  minLength?: string;
81
83
  maxLength?: string;
82
84
  min?: string;
@@ -154,6 +156,101 @@ export interface RemoteSearchConfig {
154
156
  /** Extra static query params sent on every request (e.g. { size: 20 }). */
155
157
  params?: Record<string, string | number>;
156
158
  }
159
+ /**
160
+ * type: 'recherche' — recherche d'une entité via une API, puis fiche de la sélection (bouton « Changer »).
161
+ * Les textes (titre, sousTitre, details[].path en modèle) suivent la syntaxe de displayName :
162
+ * chemin pointé ou modèle '{{a}} · {{b}}' (repli '{{x ?? 0}}').
163
+ */
164
+ export interface RechercheConfig {
165
+ /**
166
+ * Adresse de la recherche. Avec `{{q}}` (texte saisi) : appelée à chaque saisie (debounce).
167
+ * Sans `{{q}}` : liste chargée une fois puis filtrée dans le navigateur (titre + sous-titre).
168
+ * Accepte aussi `{{cléDeChamp}}` ; relative à dataUrl sauf 'http…' ou '/…'.
169
+ */
170
+ url: string;
171
+ /** Clé (chemin pointé) de la liste dans la réponse ; '' = la réponse. Défaut : tableau, content, data.content, data. */
172
+ responseDataKey?: string;
173
+ /** Recherche à partir de N caractères. @default 2 */
174
+ minChars?: number;
175
+ /** Délai après la frappe, en ms. @default 350 */
176
+ debounceMs?: number;
177
+ /** Mode sans `{{q}}` : nombre maximum de résultats affichés. @default 10 */
178
+ maxResultats?: number;
179
+ placeholder?: string;
180
+ /** Bouton dans la barre (ex. 'Rechercher') : lance la recherche quel que soit minChars, comme Entrée. ← v1.14.0 */
181
+ bouton?: string;
182
+ /** Message quand rien ne correspond ; `{q}` = texte saisi. @default 'Aucun résultat pour « {q} ».' */
183
+ aucunResultat?: string;
184
+ /** Filtre des items reçus (propriétés brutes de l'item), même forme que optionsFilter. */
185
+ filtre?: FieldCondition | FieldCondition[];
186
+ /** @default 'AND' */
187
+ filtreLogic?: 'AND' | 'OR';
188
+ /** Propriété de l'item gardée comme valeur du champ. @default 'id' */
189
+ valeur?: string;
190
+ /** Titre (liste et fiche). @default '{{label}}' */
191
+ titre?: string;
192
+ /** Sous-titre (liste ; fiche si pas de badge). */
193
+ sousTitre?: string;
194
+ /** Titre de la fiche s'il diffère de celui de la liste (ex. propriétaire d'un véhicule). ← v1.14.0 */
195
+ titreFiche?: string;
196
+ /** Pastille de la fiche : texte fixe ('Partenaire') ou modèle ("{{statut ?? 'Contrat'}}"). */
197
+ badge?: string;
198
+ /** Icône Material de l'avatar de la fiche, à la place de l'initiale du titre (ex. 'description'). ← v1.14.0 */
199
+ avatar?: string;
200
+ /** Plaque affichée à gauche de chaque résultat (ex. '{{immatriculation || numeroChassis}}'). ← v1.14.0 */
201
+ etiquette?: string;
202
+ /** Texte à droite de chaque résultat (ex. '{{proprietaire.nom}}') : texte fixe, ou modèle avec {{…}}. ← v1.14.0 */
203
+ note?: string;
204
+ /** Résultat choisissable seulement si ces conditions (propriétés brutes de l'item) sont vraies ; sinon grisé. ← v1.14.0 */
205
+ selectionnable?: FieldCondition | FieldCondition[];
206
+ /** @default 'AND' */
207
+ selectionnableLogic?: 'AND' | 'OR';
208
+ /** Mention d'un résultat non choisissable (ex. 'Sans propriétaire client'). */
209
+ nonSelectionnable?: string;
210
+ /** Grille de la fiche ; format 'badge' = pastille de statut, 'date' = jj/mm/aaaa. Valeur vide : « Non renseigné ». */
211
+ details?: {
212
+ label: string;
213
+ path: string;
214
+ format?: 'badge' | 'date';
215
+ }[];
216
+ /**
217
+ * Bloc sous la fiche (ex. véhicule) : surtitre, titre et puces (texte fixe, ou modèle avec {{…}}), plaque
218
+ * (`etiquette` : chemin ou modèle). Affiché si la plaque est renseignée (sans plaque : si le titre l'est). ← v1.14.0
219
+ */
220
+ encart?: {
221
+ icone?: string;
222
+ surtitre?: string;
223
+ titre?: string;
224
+ puces?: string[];
225
+ etiquette?: string;
226
+ etiquetteLabel?: string;
227
+ };
228
+ /**
229
+ * Bouton « Ajouter » sous la barre (saisie d'une nouvelle entité dans les autres champs) : pose `valeur` dans le
230
+ * champ `champ` (ex. modeSouscripteur = 'NOUVEAU') et masque la recherche ; le lien `retourLabel` (et le choix
231
+ * d'un résultat) y remet `retourValeur`. Les autres champs suivent avec showWhen / requiredWhen. ← v1.14.0
232
+ */
233
+ ajout?: {
234
+ label: string;
235
+ champ: string;
236
+ valeur: any;
237
+ retourValeur?: any;
238
+ retourLabel?: string;
239
+ aide?: string;
240
+ icone?: string;
241
+ };
242
+ /**
243
+ * Valeurs écrites à plat dans le formulaire au choix (remises à null par « Changer ») :
244
+ * { cléDuFormulaire: source }, source = chemin ('id'), modèle ('{{prenom}} {{nom}}') ou constante entre
245
+ * apostrophes ("'PARTENAIRE'").
246
+ */
247
+ champs?: Record<string, string>;
248
+ /** GET de la fiche d'une valeur déjà posée (retour sur l'étape) ; `{{value}}` = valeur du champ.
249
+ * Sans elle, la fiche est retrouvée dans la liste (mode sans `{{q}}`). */
250
+ chargementUrl?: string;
251
+ /** Libellé du bouton de la fiche. @default 'Changer' */
252
+ changerLabel?: string;
253
+ }
157
254
  /** Async guard executed before advancing to the next stepper step */
158
255
  export interface StepGuard {
159
256
  url: string;
@@ -259,6 +356,7 @@ export interface DynamicFormField {
259
356
  /** Nombre minimum / maximum de lignes (minItems > 0 : la liste est obligatoire). */
260
357
  minItems?: number;
261
358
  maxItems?: number;
359
+ recherche?: RechercheConfig;
262
360
  /** Questions statiques ; avec `url`, chargées depuis l'API (interpolation {{champ}} possible). */
263
361
  questions?: QuestionItem[];
264
362
  /** Propriétés des questions de l'API : code (défaut 'code'), libellé (défaut 'libelle', puis 'label'),
@@ -327,6 +425,7 @@ export interface DynamicFormField {
327
425
  message?: string;
328
426
  };
329
427
  defaultCountry?: string;
428
+ /** @deprecated Non lu par le rendu (aucun effet) — gardé pour la compatibilité des configs existantes. */
330
429
  attrs?: Record<string, any>;
331
430
  }
332
431
  export interface DynamicFormConfig {
@@ -1,11 +1,20 @@
1
1
  /** Lit une valeur via un chemin pointé : getPath(item, 'personnePhysique.nom'). */
2
2
  export declare function getPath(obj: any, path: string): any;
3
+ /** Date ISO ('2026-03-15', '2026-03-15T10:00:00') → '15/03/2026' ; autre valeur telle quelle. */
4
+ export declare function formatDate(v: any): string;
5
+ /**
6
+ * Première valeur non vide parmi des chemins séparés par '||' : 'immatriculation || numeroChassis'.
7
+ * Un seul chemin : getPath tel quel.
8
+ */
9
+ export declare function getFirstPath(obj: any, paths: string, defaults?: Record<string, any>): any;
3
10
  /**
4
11
  * Libellé d'une option chargée depuis une API. `displayName` accepte :
5
12
  * - une clé ou un chemin pointé : 'codeClient', 'personnePhysique.nom'
13
+ * - des alternatives (première non vide) : 'raisonSociale || codeClient'
6
14
  * - un modèle de concaténation : '{{codeClient}} - {{telephone}}',
7
15
  * '{{personnePhysique.nom}} {{personnePhysique.prenom}}'
8
- * - une valeur de repli quand la propriété est vide : '{{libelle}} ({{valeur ?? 0}})', "{{unite ?? 'FCFA'}}"
16
+ * - dans un modèle : alternatives '{{immatriculation || numeroChassis}}', date '{{dateEffet | date}}' (jj/mm/aaaa),
17
+ * valeur de repli quand la propriété est vide '{{libelle}} ({{valeur ?? 0}})', "{{unite ?? 'FCFA'}}"
9
18
  * Dans un modèle, une valeur absente (null/undefined) est remplacée par '' et les espaces en trop sont
10
19
  * réduits — on peut donc enchaîner des alternatives :
11
20
  * '{{personnePhysique.nom}} {{personnePhysique.prenom}}{{personneMorale.raisonSociale}}'.
@@ -0,0 +1,44 @@
1
+ import type { RechercheConfig } from '../models/form-field.model';
2
+ /** Résultat affiché (liste et fiche), calculé depuis un item brut de l'API. */
3
+ export interface RechercheResultat {
4
+ valeur: any;
5
+ titre: string;
6
+ sousTitre: string;
7
+ /** Titre de la fiche (recherche.titreFiche, sinon titre). */
8
+ titreFiche: string;
9
+ badge: string;
10
+ etiquette: string;
11
+ note: string;
12
+ selectionnable: boolean;
13
+ details: {
14
+ label: string;
15
+ valeur: string;
16
+ format?: 'badge' | 'date';
17
+ }[];
18
+ encart: {
19
+ surtitre: string;
20
+ titre: string;
21
+ puces: string[];
22
+ etiquette: string;
23
+ } | null;
24
+ item: any;
25
+ }
26
+ /** Liste d'items d'une réponse : tableau, `responseDataKey`, sinon content / data.content / data. */
27
+ export declare function rechercheItems(r: any, responseDataKey?: string): any[];
28
+ /** Item d'une réponse de chargement (fiche) : à la racine, ou dans `data` (enveloppe { data: {...} }). */
29
+ export declare function rechercheItem(r: any): any;
30
+ /**
31
+ * Texte d'un modèle pour un item : chemin, alternatives ('a || b') ou modèle ('{{a}} · {{b | date}}').
32
+ * Dans un modèle, les séparateurs orphelins sont retirés quand une partie est vide (« BANQUE · » → « BANQUE »).
33
+ */
34
+ export declare function rechercheTexte(item: any, modele?: string): string;
35
+ /** Item brut → résultat affiché. */
36
+ export declare function versResultat(cfg: RechercheConfig, item: any): RechercheResultat;
37
+ /**
38
+ * Valeurs écrites à plat dans le formulaire (`champs`) : chemin ou alternatives ('id', 'a.nom || b.raisonSociale')
39
+ * = valeur brute ; modèle ('{{prenom}} {{nom}}') = texte ; entre apostrophes ("'PARTENAIRE'") = constante.
40
+ * `item` null : toutes les clés à null (« Changer »).
41
+ */
42
+ export declare function rechercheChamps(cfg: RechercheConfig, item: any | null): Record<string, any>;
43
+ /** Mode sans {{q}} : résultats dont le titre, le sous-titre, l'étiquette ou la note contiennent q. */
44
+ export declare function filtrerResultats(liste: RechercheResultat[], q: string, max: number): RechercheResultat[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suntelecoms/ngx-dynamic-form",
3
- "version": "1.12.1",
3
+ "version": "1.15.0",
4
4
  "description": "Générateur de formulaires Angular dynamiques — SUNTELECOMS",
5
5
  "author": "Amadou Diallo <amadoumacbookpro38@gmail.com>",
6
6
  "license": "MIT",
package/public-api.d.ts CHANGED
@@ -6,7 +6,10 @@ export { MesFormulairesComponent } from './lib/components/mes-formulaires/mes-fo
6
6
  export { FormLoaderComponent } from './lib/components/form-loader/form-loader.component';
7
7
  export { RepeaterFieldComponent } from './lib/components/repeater-field/repeater-field.component';
8
8
  export { QuestionnaireFieldComponent } from './lib/components/questionnaire-field/questionnaire-field.component';
9
- export { optionLabel, getPath } from './lib/utils/option-label';
9
+ export { RechercheFieldComponent } from './lib/components/recherche-field/recherche-field.component';
10
+ export { optionLabel, getPath, getFirstPath, formatDate } from './lib/utils/option-label';
11
+ export { rechercheItems, rechercheItem, rechercheTexte, versResultat, rechercheChamps, filtrerResultats } from './lib/utils/recherche';
12
+ export type { RechercheResultat } from './lib/utils/recherche';
10
13
  export { withoutFields, toFormValues, prepareSubmit, evaluateRules, matchesConditions, includedBy, toggleWithIncludes, withLockedIncludes, toQuestions, answerQuestion, questionErrors, answeredCount, keepAnswers } from './lib/utils/form-logic';
11
14
  export { ThousandsInputDirective } from './lib/utils/thousands-input.directive';
12
15
  export { DynamicFormBuilderService } from './lib/services/dynamic-form-builder.service';
@@ -20,7 +23,7 @@ export { provideNgxForms, NGX_DATA_API_URL, NGX_CUSTOM_FIELDS, ngxFormsAuthInter
20
23
  export type { NgxFormsOptions, NgxFormsLocalOptions, NgxFormsHttpOptions } from './lib/providers';
21
24
  export { NgxFormsAuthService, NGX_FORMS_AUTH } from './lib/auth/ngx-forms-auth.service';
22
25
  export type { NgxFormsAuthOptions } from './lib/auth/ngx-forms-auth.service';
23
- export type { DynamicFormField, DynamicFormConfig, StepperFormConfig, FormStep, DynamicFormSubmitEvent, FieldType, FieldValidation, FieldCondition, SelectOption, ValueRule, QuestionItem, FormRulesFn, FormValuesTransform, FileUploadConfig, UploadedFileValue, } from './lib/models/form-field.model';
26
+ export type { DynamicFormField, DynamicFormConfig, StepperFormConfig, FormStep, DynamicFormSubmitEvent, FieldType, FieldValidation, FieldCondition, SelectOption, ValueRule, QuestionItem, FormRulesFn, FormValuesTransform, FileUploadConfig, UploadedFileValue, RechercheConfig, } from './lib/models/form-field.model';
24
27
  export type { SavedFormSchema, AnyFormConfig } from './lib/models/saved-form.model';
25
28
  export type { PhoneCountry } from './lib/data/phone-countries';
26
29
  export { PHONE_COUNTRIES } from './lib/data/phone-countries';