@starterlib/ui 0.11.4 → 0.11.5

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.
Files changed (46) hide show
  1. package/assets/icones/catalogue.json +1 -1
  2. package/fesm2022/starterlib-ui-arbre.mjs +6 -6
  3. package/fesm2022/starterlib-ui-donnees.mjs +70 -70
  4. package/fesm2022/starterlib-ui-donnees.mjs.map +1 -1
  5. package/fesm2022/starterlib-ui-etats.mjs +26 -26
  6. package/fesm2022/starterlib-ui-etats.mjs.map +1 -1
  7. package/fesm2022/starterlib-ui-formulaires-autres-CoiQKLZA.mjs +3455 -0
  8. package/fesm2022/starterlib-ui-formulaires-autres-CoiQKLZA.mjs.map +1 -0
  9. package/fesm2022/starterlib-ui-formulaires-base-DI7s_Zey.mjs +125 -0
  10. package/fesm2022/starterlib-ui-formulaires-base-DI7s_Zey.mjs.map +1 -0
  11. package/fesm2022/starterlib-ui-formulaires.mjs +2 -3573
  12. package/fesm2022/starterlib-ui-graphiques.mjs +12 -12
  13. package/fesm2022/starterlib-ui-graphiques.mjs.map +1 -1
  14. package/fesm2022/starterlib-ui-indicateurs.mjs +20 -20
  15. package/fesm2022/starterlib-ui-indicateurs.mjs.map +1 -1
  16. package/fesm2022/starterlib-ui-listes.mjs +93 -93
  17. package/fesm2022/starterlib-ui-listes.mjs.map +1 -1
  18. package/fesm2022/starterlib-ui-messagerie.mjs +9 -9
  19. package/fesm2022/starterlib-ui-mise-en-page.mjs +19 -19
  20. package/fesm2022/starterlib-ui-mise-en-page.mjs.map +1 -1
  21. package/fesm2022/starterlib-ui-navigation.mjs +17 -17
  22. package/fesm2022/starterlib-ui-navigation.mjs.map +1 -1
  23. package/fesm2022/starterlib-ui-onglets.mjs +11 -11
  24. package/fesm2022/starterlib-ui-onglets.mjs.map +1 -1
  25. package/fesm2022/starterlib-ui-parcours.mjs +34 -34
  26. package/fesm2022/starterlib-ui-parcours.mjs.map +1 -1
  27. package/fesm2022/starterlib-ui-qr.mjs +6 -6
  28. package/fesm2022/starterlib-ui-qr.mjs.map +1 -1
  29. package/fesm2022/starterlib-ui-saisie-autres-Bw8gYr8W.mjs +6376 -0
  30. package/fesm2022/starterlib-ui-saisie-autres-Bw8gYr8W.mjs.map +1 -0
  31. package/fesm2022/starterlib-ui-saisie-base-Bj-Wzk1h.mjs +2617 -0
  32. package/fesm2022/starterlib-ui-saisie-base-Bj-Wzk1h.mjs.map +1 -0
  33. package/fesm2022/starterlib-ui-saisie.mjs +2 -8983
  34. package/fesm2022/starterlib-ui-selection.mjs +17 -17
  35. package/fesm2022/starterlib-ui-selection.mjs.map +1 -1
  36. package/fesm2022/starterlib-ui-sens.mjs +3 -3
  37. package/fesm2022/starterlib-ui-surfaces.mjs +94 -94
  38. package/fesm2022/starterlib-ui-surfaces.mjs.map +1 -1
  39. package/fesm2022/starterlib-ui-virtuel.mjs +8 -8
  40. package/fesm2022/starterlib-ui-virtuel.mjs.map +1 -1
  41. package/fesm2022/starterlib-ui.mjs +119 -119
  42. package/fesm2022/starterlib-ui.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/types/starterlib-ui-saisie.d.ts +24 -24
  45. package/fesm2022/starterlib-ui-formulaires.mjs.map +0 -1
  46. package/fesm2022/starterlib-ui-saisie.mjs.map +0 -1
@@ -0,0 +1,3455 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, InjectionToken, Injector, afterNextRender, booleanAttribute, computed, effect, inject, input, linkedSignal, model, numberAttribute, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
3
+ import { transformedValue } from "@angular/forms/signals";
4
+ import { ContratDeChamp, ContratDeChampABornes, ControleDeSaisie, StCalendar, StControleDeChamp, StFieldset, StFormField, StRadioGroup, StSelect, erreurTelephone, exempleDeDate, fusionnerErreurs, messageDErreur, motifDHeureLocal, motifDuMoisLocal, motifLocal } from "@starterlib/ui/saisie";
5
+ import { AnnonceLocale, ST_LIBELLES, ST_LOCALE, StIcon, StIconButton, StIdentifiants, catalogueDuPointDEntree } from "@starterlib/ui";
6
+ import { decimalesDe, decrireRecurrence, estDateIso, estHeureIso, estMoisIso, exempleDHeure, exempleDeMois, formaterDateSaisie, formaterHeureSaisie, formaterMoisSaisie, formaterMontant, formaterNombre, heureSurDouze, lireDate, lireHeure, lireMois, lireMontant, lireNombre, montant, nomDuFuseau, normaliserTelephone, ordreDeDate } from "@starterlib/util/valeurs";
7
+ import { NgTemplateOutlet } from "@angular/common";
8
+ import { StText } from "@starterlib/ui/mise-en-page";
9
+ const CODE_DE_DEVISE = /^[A-Za-z]{3}$/;
10
+ var StAmountField = class StAmountField extends ContratDeChamp {
11
+ libelles = inject(ST_LIBELLES);
12
+ locale = inject(ST_LOCALE);
13
+ annonce = new AnnonceLocale(inject(DestroyRef));
14
+ idDevise = `${inject(StIdentifiants).prochain("st-amount-field")}-devise`;
15
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
16
+ devise = input.required(...ngDevMode ? [{ debugName: "devise" }] : /* istanbul ignore next */ []);
17
+ autocomplete = input(null, ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
18
+ complement = input(null, ...ngDevMode ? [{ debugName: "complement" }] : /* istanbul ignore next */ []);
19
+ pleineLargeur = input(false, {
20
+ ...ngDevMode ? { debugName: "pleineLargeur" } : /* istanbul ignore next */ {},
21
+ transform: booleanAttribute
22
+ });
23
+ decritPar = input([], ...ngDevMode ? [{ debugName: "decritPar" }] : /* istanbul ignore next */ []);
24
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
25
+ avertie = false;
26
+ deviseSure = computed(() => {
27
+ const code = this.devise().trim();
28
+ if (CODE_DE_DEVISE.test(code)) return code.toUpperCase();
29
+ if ((typeof ngDevMode === "undefined" || !!ngDevMode) && !this.avertie && code !== "") {
30
+ this.avertie = true;
31
+ console.warn(`[st-amount-field] "${code}" : code ISO 4217 de trois lettres attendu.`);
32
+ }
33
+ return null;
34
+ }, ...ngDevMode ? [{ debugName: "deviseSure" }] : /* istanbul ignore next */ []);
35
+ saisie = transformedValue(this.value, {
36
+ parse: (texte) => {
37
+ const devise = this.deviseSure();
38
+ if (texte.trim() === "" || devise === null) return { value: null };
39
+ const lecture = lireMontant(texte, devise, this.locale());
40
+ if (lecture.lu) return { value: lecture.unitesMineures };
41
+ return {
42
+ value: null,
43
+ error: lecture.raison === "decimales" ? {
44
+ kind: "decimales",
45
+ decimales: decimalesDe(devise)
46
+ } : {
47
+ kind: "montant",
48
+ devise
49
+ }
50
+ };
51
+ },
52
+ format: (valeur) => this.formater(valeur)
53
+ });
54
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
55
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors().map((erreur) => this.borneEnDevise(erreur)), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
56
+ parties = computed(() => {
57
+ const devise = this.deviseSure();
58
+ if (devise === null) return null;
59
+ try {
60
+ const parties = new Intl.NumberFormat(this.locale(), {
61
+ style: "currency",
62
+ currency: devise
63
+ }).formatToParts(1);
64
+ const symbole = parties.find((partie) => partie.type === "currency")?.value ?? devise;
65
+ const rangDuSymbole = parties.findIndex((partie) => partie.type === "currency");
66
+ const rangDuNombre = parties.findIndex((partie) => partie.type === "integer");
67
+ return {
68
+ symbole,
69
+ avant: rangDuSymbole >= 0 && rangDuSymbole < rangDuNombre
70
+ };
71
+ } catch {
72
+ return {
73
+ symbole: devise,
74
+ avant: false
75
+ };
76
+ }
77
+ }, ...ngDevMode ? [{ debugName: "parties" }] : /* istanbul ignore next */ []);
78
+ symbole = computed(() => this.parties()?.symbole ?? "", ...ngDevMode ? [{ debugName: "symbole" }] : /* istanbul ignore next */ []);
79
+ symboleAvant = computed(() => this.parties()?.avant ?? false, ...ngDevMode ? [{ debugName: "symboleAvant" }] : /* istanbul ignore next */ []);
80
+ deviseLue = computed(() => {
81
+ const devise = this.deviseSure();
82
+ if (devise === null) return null;
83
+ let nom = devise;
84
+ try {
85
+ nom = new Intl.DisplayNames(this.locale(), { type: "currency" }).of(devise) ?? devise;
86
+ } catch {}
87
+ return this.libelles().deviseDuMontant(nom);
88
+ }, ...ngDevMode ? [{ debugName: "deviseLue" }] : /* istanbul ignore next */ []);
89
+ descriptionsDuControle = computed(() => [...this.decritPar(), ...this.deviseLue() === null ? [] : [this.idDevise]], ...ngDevMode ? [{ debugName: "descriptionsDuControle" }] : /* istanbul ignore next */ []);
90
+ constructor() {
91
+ super();
92
+ let precedente;
93
+ effect(() => {
94
+ const devise = this.deviseSure();
95
+ untracked(() => {
96
+ const premiere = precedente === void 0;
97
+ const changee = devise !== precedente;
98
+ precedente = devise;
99
+ if (premiere || !changee || devise === null) return;
100
+ const texte = this.saisie();
101
+ if (texte.trim() !== "") this.saisie.set(texte);
102
+ else if (this.value() !== null) this.saisie.set(this.formater(this.value()));
103
+ });
104
+ });
105
+ }
106
+ surPressionDuCadre(evenement) {
107
+ if (evenement.button !== 0 || evenement.target instanceof HTMLInputElement) return;
108
+ evenement.preventDefault();
109
+ this.focus();
110
+ }
111
+ surSaisie(evenement) {
112
+ this.saisie.set(this.texteSaisi(evenement));
113
+ }
114
+ aLaSortie() {
115
+ if (this.saisie.parseErrors().length === 0) {
116
+ const tape = this.saisie();
117
+ const groupe = this.formater(this.value());
118
+ this.saisie.set(groupe);
119
+ const devise = this.deviseSure();
120
+ const valeur = this.value();
121
+ if (groupe !== tape.trim() && valeur !== null && devise !== null) {
122
+ const lu = formaterMontant(montant(valeur, devise), { locale: this.locale() });
123
+ this.annonce.annoncer(this.libelles().libelleEtMessage(this.libelle(), lu));
124
+ }
125
+ }
126
+ this.quitte.set(true);
127
+ this.touch.emit();
128
+ }
129
+ borneEnDevise(erreur) {
130
+ const devise = this.deviseSure();
131
+ if (devise === null || (erreur.message?.trim() ?? "") !== "") return erreur;
132
+ const borne = erreur[erreur.kind === "min" ? "min" : "max"];
133
+ if (erreur.kind !== "min" && erreur.kind !== "max" || typeof borne !== "bigint") return erreur;
134
+ const texte = formaterMontant(montant(borne, devise), { locale: this.locale() });
135
+ const libelles = this.libelles();
136
+ return {
137
+ ...erreur,
138
+ message: erreur.kind === "min" ? libelles.valeurMinimale(texte) : libelles.valeurMaximale(texte)
139
+ };
140
+ }
141
+ formater(valeur) {
142
+ const devise = untracked(this.deviseSure);
143
+ if (valeur === null || devise === null) return "";
144
+ return formaterMontant(montant(valeur, devise), {
145
+ locale: this.locale(),
146
+ sansDevise: true
147
+ }).replace(/\u202f/g, "\xA0");
148
+ }
149
+ static ɵfac = i0.ɵɵngDeclareFactory({
150
+ minVersion: "12.0.0",
151
+ version: "22.2.2",
152
+ ngImport: i0,
153
+ type: StAmountField,
154
+ deps: [],
155
+ target: i0.ɵɵFactoryTarget.Component
156
+ });
157
+ static ɵcmp = i0.ɵɵngDeclareComponent({
158
+ minVersion: "17.0.0",
159
+ version: "22.2.2",
160
+ type: StAmountField,
161
+ isStandalone: true,
162
+ selector: "st-amount-field",
163
+ inputs: {
164
+ value: {
165
+ classPropertyName: "value",
166
+ publicName: "value",
167
+ isSignal: true,
168
+ isRequired: false,
169
+ transformFunction: null
170
+ },
171
+ devise: {
172
+ classPropertyName: "devise",
173
+ publicName: "devise",
174
+ isSignal: true,
175
+ isRequired: true,
176
+ transformFunction: null
177
+ },
178
+ autocomplete: {
179
+ classPropertyName: "autocomplete",
180
+ publicName: "autocomplete",
181
+ isSignal: true,
182
+ isRequired: false,
183
+ transformFunction: null
184
+ },
185
+ complement: {
186
+ classPropertyName: "complement",
187
+ publicName: "complement",
188
+ isSignal: true,
189
+ isRequired: false,
190
+ transformFunction: null
191
+ },
192
+ pleineLargeur: {
193
+ classPropertyName: "pleineLargeur",
194
+ publicName: "pleineLargeur",
195
+ isSignal: true,
196
+ isRequired: false,
197
+ transformFunction: null
198
+ },
199
+ decritPar: {
200
+ classPropertyName: "decritPar",
201
+ publicName: "decritPar",
202
+ isSignal: true,
203
+ isRequired: false,
204
+ transformFunction: null
205
+ }
206
+ },
207
+ outputs: { value: "valueChange" },
208
+ host: {
209
+ properties: { "attr.data-pleine-largeur": "pleineLargeur() ? '' : null" },
210
+ classAttribute: "st-amount-field"
211
+ },
212
+ usesInheritance: true,
213
+ ngImport: i0,
214
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [complement]=\"complement()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le cadre est UN champ : un clic sur le bloc de devise donne le focus a la zone de frappe,\n comme un clic sur l'etiquette. Au clavier, le champ se rejoint par tabulation. -->\n <div class=\"st-amount-field__cadre\" (mousedown)=\"surPressionDuCadre($event)\">\n @if (symboleAvant() && symbole() !== '') {\n <span class=\"st-amount-field__devise\" aria-hidden=\"true\">{{ symbole() }}</span>\n }\n <input\n #champ\n class=\"st-amount-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"decimal\"\n spellcheck=\"false\"\n dir=\"ltr\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly() || deviseSure() === null\"\n [attr.aria-busy]=\"deviseSure() === null ? 'true' : null\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortie()\"\n />\n @if (!symboleAvant() && symbole() !== '') {\n <span class=\"st-amount-field__devise\" aria-hidden=\"true\">{{ symbole() }}</span>\n }\n </div>\n</st-form-field>\n@if (deviseLue(); as nom) {\n <span class=\"st-vh\" [id]=\"idDevise\">{{ nom }}</span>\n}\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
215
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;max-inline-size:var(--st-largeur-champ-lg)}:host([data-pleine-largeur]){max-inline-size:none}.st-amount-field__cadre:has(>.st-amount-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-amount-field__cadre{box-sizing:border-box;block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}.st-amount-field__cadre>.st-amount-field__champ{margin-block:calc(-1 * var(--st-epaisseur-fine));background:transparent;border:0;border-radius:0;box-shadow:none;outline:none}@media(hover:hover){.st-amount-field__cadre:hover:not(:has(>.st-amount-field__champ:is(:disabled,:focus,[aria-invalid=true]))){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-amount-field__cadre:has(>.st-amount-field__champ:focus-visible){border-color:var(--st-couleur-primaire)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true]){border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true]):has(>.st-amount-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__cadre:has(>.st-amount-field__champ:disabled){color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-amount-field__cadre:has(>.st-amount-field__champ:is(input,textarea):read-only:not(:disabled)),.st-amount-field__cadre:has(>.st-amount-field__champ[aria-readonly=true]:not(:disabled)){background:var(--st-couleur-surface-enfoncee)}.st-amount-field__cadre{display:flex;align-items:stretch;overflow:hidden}.st-amount-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-amount-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-amount-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-amount-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-amount-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-amount-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-amount-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-amount-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-amount-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-amount-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-amount-field__champ:is(input,textarea):read-only:not(:disabled),.st-amount-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-amount-field__champ{flex:1 1 auto;min-inline-size:0;font-family:var(--st-police-mono);font-size:var(--st-taille-lg);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-references);line-height:var(--st-interligne-lg);text-align:end;unicode-bidi:isolate}@media(pointer:coarse){.st-amount-field__champ{font-size:var(--st-taille-lg);line-height:var(--st-interligne-lg)}}.st-amount-field__devise{display:flex;flex:none;align-items:center;justify-content:center;padding-inline:var(--st-espacement-4);font-family:var(--st-police-mono);font-size:var(--st-taille-sm);font-weight:var(--st-graisse-grasse);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);cursor:text;background:var(--st-couleur-surface-enfoncee);border-inline-start:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active)}.st-amount-field__devise:first-child{border-inline-start:0;border-inline-end:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true])>.st-amount-field__champ{color:var(--st-couleur-erreur)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true])>.st-amount-field__devise{color:var(--st-couleur-erreur);background:var(--st-couleur-erreur-discret);border-color:color-mix(in srgb,var(--st-couleur-erreur) 30%,transparent)}.st-amount-field__cadre:has(>.st-amount-field__champ:disabled)>.st-amount-field__devise{color:var(--st-couleur-texte-desactive);cursor:inherit}@media print{.st-amount-field__cadre{box-shadow:none}}.st-amount-field__cadre>.st-amount-field__champ:is(input):read-only{background:transparent}\n"],
216
+ dependencies: [{
217
+ kind: "component",
218
+ type: StFormField,
219
+ selector: "st-form-field",
220
+ inputs: [
221
+ "libelle",
222
+ "complement",
223
+ "disposition",
224
+ "presentation",
225
+ "libelleMasque",
226
+ "descriptionsDuControle"
227
+ ]
228
+ }, {
229
+ kind: "directive",
230
+ type: StControleDeChamp,
231
+ selector: "[stControleDeChamp]"
232
+ }],
233
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
234
+ });
235
+ };
236
+ i0.ɵɵngDeclareClassMetadata({
237
+ minVersion: "12.0.0",
238
+ version: "22.2.2",
239
+ ngImport: i0,
240
+ type: StAmountField,
241
+ decorators: [{
242
+ type: Component,
243
+ args: [{
244
+ selector: "st-amount-field",
245
+ changeDetection: ChangeDetectionStrategy.OnPush,
246
+ imports: [StFormField, StControleDeChamp],
247
+ host: {
248
+ class: "st-amount-field",
249
+ "[attr.data-pleine-largeur]": "pleineLargeur() ? '' : null"
250
+ },
251
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [complement]=\"complement()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le cadre est UN champ : un clic sur le bloc de devise donne le focus a la zone de frappe,\n comme un clic sur l'etiquette. Au clavier, le champ se rejoint par tabulation. -->\n <div class=\"st-amount-field__cadre\" (mousedown)=\"surPressionDuCadre($event)\">\n @if (symboleAvant() && symbole() !== '') {\n <span class=\"st-amount-field__devise\" aria-hidden=\"true\">{{ symbole() }}</span>\n }\n <input\n #champ\n class=\"st-amount-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"decimal\"\n spellcheck=\"false\"\n dir=\"ltr\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly() || deviseSure() === null\"\n [attr.aria-busy]=\"deviseSure() === null ? 'true' : null\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortie()\"\n />\n @if (!symboleAvant() && symbole() !== '') {\n <span class=\"st-amount-field__devise\" aria-hidden=\"true\">{{ symbole() }}</span>\n }\n </div>\n</st-form-field>\n@if (deviseLue(); as nom) {\n <span class=\"st-vh\" [id]=\"idDevise\">{{ nom }}</span>\n}\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
252
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;max-inline-size:var(--st-largeur-champ-lg)}:host([data-pleine-largeur]){max-inline-size:none}.st-amount-field__cadre:has(>.st-amount-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-amount-field__cadre{box-sizing:border-box;block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}.st-amount-field__cadre>.st-amount-field__champ{margin-block:calc(-1 * var(--st-epaisseur-fine));background:transparent;border:0;border-radius:0;box-shadow:none;outline:none}@media(hover:hover){.st-amount-field__cadre:hover:not(:has(>.st-amount-field__champ:is(:disabled,:focus,[aria-invalid=true]))){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-amount-field__cadre:has(>.st-amount-field__champ:focus-visible){border-color:var(--st-couleur-primaire)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true]){border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true]):has(>.st-amount-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__cadre:has(>.st-amount-field__champ:disabled){color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-amount-field__cadre:has(>.st-amount-field__champ:is(input,textarea):read-only:not(:disabled)),.st-amount-field__cadre:has(>.st-amount-field__champ[aria-readonly=true]:not(:disabled)){background:var(--st-couleur-surface-enfoncee)}.st-amount-field__cadre{display:flex;align-items:stretch;overflow:hidden}.st-amount-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-amount-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-amount-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-amount-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-amount-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-amount-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-amount-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-amount-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-amount-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-amount-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-amount-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-amount-field__champ:is(input,textarea):read-only:not(:disabled),.st-amount-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-amount-field__champ{flex:1 1 auto;min-inline-size:0;font-family:var(--st-police-mono);font-size:var(--st-taille-lg);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-references);line-height:var(--st-interligne-lg);text-align:end;unicode-bidi:isolate}@media(pointer:coarse){.st-amount-field__champ{font-size:var(--st-taille-lg);line-height:var(--st-interligne-lg)}}.st-amount-field__devise{display:flex;flex:none;align-items:center;justify-content:center;padding-inline:var(--st-espacement-4);font-family:var(--st-police-mono);font-size:var(--st-taille-sm);font-weight:var(--st-graisse-grasse);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);cursor:text;background:var(--st-couleur-surface-enfoncee);border-inline-start:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active)}.st-amount-field__devise:first-child{border-inline-start:0;border-inline-end:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true])>.st-amount-field__champ{color:var(--st-couleur-erreur)}.st-amount-field__cadre:has(>.st-amount-field__champ[aria-invalid=true])>.st-amount-field__devise{color:var(--st-couleur-erreur);background:var(--st-couleur-erreur-discret);border-color:color-mix(in srgb,var(--st-couleur-erreur) 30%,transparent)}.st-amount-field__cadre:has(>.st-amount-field__champ:disabled)>.st-amount-field__devise{color:var(--st-couleur-texte-desactive);cursor:inherit}@media print{.st-amount-field__cadre{box-shadow:none}}.st-amount-field__cadre>.st-amount-field__champ:is(input):read-only{background:transparent}\n"]
253
+ }]
254
+ }],
255
+ ctorParameters: () => [],
256
+ propDecorators: {
257
+ value: [{
258
+ type: i0.Input,
259
+ args: [{
260
+ isSignal: true,
261
+ alias: "value",
262
+ required: false
263
+ }]
264
+ }, {
265
+ type: i0.Output,
266
+ args: ["valueChange"]
267
+ }],
268
+ devise: [{
269
+ type: i0.Input,
270
+ args: [{
271
+ isSignal: true,
272
+ alias: "devise",
273
+ required: true
274
+ }]
275
+ }],
276
+ autocomplete: [{
277
+ type: i0.Input,
278
+ args: [{
279
+ isSignal: true,
280
+ alias: "autocomplete",
281
+ required: false
282
+ }]
283
+ }],
284
+ complement: [{
285
+ type: i0.Input,
286
+ args: [{
287
+ isSignal: true,
288
+ alias: "complement",
289
+ required: false
290
+ }]
291
+ }],
292
+ pleineLargeur: [{
293
+ type: i0.Input,
294
+ args: [{
295
+ isSignal: true,
296
+ alias: "pleineLargeur",
297
+ required: false
298
+ }]
299
+ }],
300
+ decritPar: [{
301
+ type: i0.Input,
302
+ args: [{
303
+ isSignal: true,
304
+ alias: "decritPar",
305
+ required: false
306
+ }]
307
+ }]
308
+ }
309
+ });
310
+ function enumerer(morceaux, et) {
311
+ if (morceaux.length <= 1) return morceaux.join("");
312
+ return `${morceaux.slice(0, -1).join(", ")} ${et} ${morceaux[morceaux.length - 1] ?? ""}`;
313
+ }
314
+ const PARTIES_FR = {
315
+ jour: "le jour",
316
+ mois: "le mois",
317
+ annee: "l’année"
318
+ };
319
+ const PARTIES_EN = {
320
+ jour: "day",
321
+ mois: "month",
322
+ annee: "year"
323
+ };
324
+ const LIBELLES_FORMULAIRES_FR = {
325
+ montantMinimal: "Montant minimal",
326
+ montantMaximal: "Montant maximal",
327
+ frequence: "Fréquence",
328
+ frequences: {
329
+ quotidienne: "Tous les jours",
330
+ hebdomadaire: "Toutes les semaines",
331
+ mensuelle: "Tous les mois",
332
+ annuelle: "Tous les ans"
333
+ },
334
+ intervalle: "Répéter tous les",
335
+ unitesDIntervalle: {
336
+ quotidienne: "jours",
337
+ hebdomadaire: "semaines",
338
+ mensuelle: "mois",
339
+ annuelle: "ans"
340
+ },
341
+ jourDuMois: "Jour du mois",
342
+ jourDeLaPremiereEcheance: "Le jour de la première échéance",
343
+ regleDeFinDeMois: "Un 29, 30 ou 31 : les mois plus courts, l’échéance tombe le dernier jour du mois.",
344
+ premiereEcheance: "Première échéance le",
345
+ fin: "Fin",
346
+ finJamais: "Jusqu’à nouvel ordre",
347
+ finALaDate: "À une date",
348
+ finApresNombre: "Après un nombre d’échéances",
349
+ derniereEcheance: "Dernière échéance le",
350
+ nombreDEcheances: "Nombre d’échéances",
351
+ recapitulatif: "Récapitulatif",
352
+ jour: "Jour",
353
+ mois: "Mois",
354
+ exempleDeDateMemorable: (exemple) => `Par exemple ${exemple}.`,
355
+ dateMemorableIncomplete: (manque) => `Saisissez ${enumerer(manque.map((partie) => PARTIES_FR[partie]), "et")}.`,
356
+ dateMemorableInexistante: (exemple) => `Saisissez une date qui existe, en chiffres, par exemple ${exemple}.`
357
+ };
358
+ const LIBELLES_FORMULAIRES_EN = {
359
+ montantMinimal: "Minimum amount",
360
+ montantMaximal: "Maximum amount",
361
+ frequence: "Frequency",
362
+ frequences: {
363
+ quotidienne: "Every day",
364
+ hebdomadaire: "Every week",
365
+ mensuelle: "Every month",
366
+ annuelle: "Every year"
367
+ },
368
+ intervalle: "Repeat every",
369
+ unitesDIntervalle: {
370
+ quotidienne: "days",
371
+ hebdomadaire: "weeks",
372
+ mensuelle: "months",
373
+ annuelle: "years"
374
+ },
375
+ jourDuMois: "Day of the month",
376
+ jourDeLaPremiereEcheance: "The day of the first occurrence",
377
+ regleDeFinDeMois: "The 29th, 30th or 31st: in shorter months, the occurrence falls on the last day.",
378
+ premiereEcheance: "First occurrence on",
379
+ fin: "End",
380
+ finJamais: "Until further notice",
381
+ finALaDate: "On a date",
382
+ finApresNombre: "After a number of occurrences",
383
+ derniereEcheance: "Last occurrence on",
384
+ nombreDEcheances: "Number of occurrences",
385
+ recapitulatif: "Summary",
386
+ jour: "Day",
387
+ mois: "Month",
388
+ exempleDeDateMemorable: (exemple) => `For example, ${exemple}.`,
389
+ dateMemorableIncomplete: (manque) => `Enter the ${enumerer(manque.map((partie) => PARTIES_EN[partie]), "and")}.`,
390
+ dateMemorableInexistante: (exemple) => `Enter a real date, in numbers, for example ${exemple}.`
391
+ };
392
+ const ST_LIBELLES_FORMULAIRES = new InjectionToken("ST_LIBELLES_FORMULAIRES", {
393
+ providedIn: "root",
394
+ factory: () => ({
395
+ fr: LIBELLES_FORMULAIRES_FR,
396
+ en: LIBELLES_FORMULAIRES_EN
397
+ })
398
+ });
399
+ function fournirLibellesFormulaires(catalogues) {
400
+ return {
401
+ provide: ST_LIBELLES_FORMULAIRES,
402
+ useValue: {
403
+ fr: LIBELLES_FORMULAIRES_FR,
404
+ en: LIBELLES_FORMULAIRES_EN,
405
+ ...catalogues
406
+ }
407
+ };
408
+ }
409
+ function libellesDesFormulaires() {
410
+ const catalogue = catalogueDesFormulaires();
411
+ return computed(() => catalogue().libelles);
412
+ }
413
+ function catalogueDesFormulaires() {
414
+ return catalogueDuPointDEntree("@starterlib/ui/formulaires", inject(ST_LIBELLES_FORMULAIRES), LIBELLES_FORMULAIRES_FR, "fournirLibellesFormulaires");
415
+ }
416
+ function erreurPlageDeMontants(plage) {
417
+ const { min, max } = plage;
418
+ if (min === null || max === null) return null;
419
+ return max < min ? { kind: "plageDeMontants" } : null;
420
+ }
421
+ var StAmountRange = class StAmountRange extends ContratDeChamp {
422
+ libellesDesChamps = libellesDesFormulaires();
423
+ value = model({
424
+ min: null,
425
+ max: null
426
+ }, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
427
+ devise = input.required(...ngDevMode ? [{ debugName: "devise" }] : /* istanbul ignore next */ []);
428
+ etiquettes = input(null, ...ngDevMode ? [{ debugName: "etiquettes" }] : /* istanbul ignore next */ []);
429
+ fieldset = viewChild(StFieldset, ...ngDevMode ? [{ debugName: "fieldset" }] : /* istanbul ignore next */ []);
430
+ champs = viewChildren(StAmountField, ...ngDevMode ? [{ debugName: "champs" }] : /* istanbul ignore next */ []);
431
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
432
+ etiquettesLues = computed(() => {
433
+ const libelles = this.libellesDesChamps();
434
+ return this.etiquettes() ?? {
435
+ min: libelles.montantMinimal,
436
+ max: libelles.montantMaximal
437
+ };
438
+ }, ...ngDevMode ? [{ debugName: "etiquettesLues" }] : /* istanbul ignore next */ []);
439
+ erreursDuMaximum = computed(() => this.errors().filter((erreur) => erreur.kind === "plageDeMontants"), ...ngDevMode ? [{ debugName: "erreursDuMaximum" }] : /* istanbul ignore next */ []);
440
+ erreursDuGroupe = computed(() => this.errors().filter((erreur) => erreur.kind !== "plageDeMontants"), ...ngDevMode ? [{ debugName: "erreursDuGroupe" }] : /* istanbul ignore next */ []);
441
+ decritPar = computed(() => {
442
+ const fieldset = this.fieldset();
443
+ return fieldset !== void 0 && this.aideEtRaisons() !== null ? [fieldset.identifiants.aide] : [];
444
+ }, ...ngDevMode ? [{ debugName: "decritPar" }] : /* istanbul ignore next */ []);
445
+ changer(partie, montant) {
446
+ this.value.set({
447
+ ...this.value(),
448
+ [partie]: montant
449
+ });
450
+ }
451
+ quitter() {
452
+ this.quitte.set(true);
453
+ this.touch.emit();
454
+ }
455
+ focus(options) {
456
+ const [minimum, maximum] = this.champs();
457
+ if (this.erreursDuMaximum().length > 0) {
458
+ maximum?.focus(options);
459
+ return;
460
+ }
461
+ (this.champs().find((champ) => champ.lectureInvalide()) ?? minimum)?.focus(options);
462
+ }
463
+ static ɵfac = i0.ɵɵngDeclareFactory({
464
+ minVersion: "12.0.0",
465
+ version: "22.2.2",
466
+ ngImport: i0,
467
+ type: StAmountRange,
468
+ deps: null,
469
+ target: i0.ɵɵFactoryTarget.Component
470
+ });
471
+ static ɵcmp = i0.ɵɵngDeclareComponent({
472
+ minVersion: "17.2.0",
473
+ version: "22.2.2",
474
+ type: StAmountRange,
475
+ isStandalone: true,
476
+ selector: "st-amount-range",
477
+ inputs: {
478
+ value: {
479
+ classPropertyName: "value",
480
+ publicName: "value",
481
+ isSignal: true,
482
+ isRequired: false,
483
+ transformFunction: null
484
+ },
485
+ devise: {
486
+ classPropertyName: "devise",
487
+ publicName: "devise",
488
+ isSignal: true,
489
+ isRequired: true,
490
+ transformFunction: null
491
+ },
492
+ etiquettes: {
493
+ classPropertyName: "etiquettes",
494
+ publicName: "etiquettes",
495
+ isSignal: true,
496
+ isRequired: false,
497
+ transformFunction: null
498
+ }
499
+ },
500
+ outputs: { value: "valueChange" },
501
+ host: { classAttribute: "st-amount-range" },
502
+ viewQueries: [{
503
+ propertyName: "fieldset",
504
+ first: true,
505
+ predicate: StFieldset,
506
+ descendants: true,
507
+ isSignal: true
508
+ }, {
509
+ propertyName: "champs",
510
+ predicate: StAmountField,
511
+ descendants: true,
512
+ isSignal: true
513
+ }],
514
+ usesInheritance: true,
515
+ ngImport: i0,
516
+ template: "<st-fieldset\n [legende]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"erreursDuGroupe()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [disabled]=\"disabled()\"\n>\n <div class=\"st-amount-range__parties\">\n <st-amount-field\n class=\"st-amount-range__partie\"\n [libelle]=\"etiquettesLues().min\"\n [devise]=\"devise()\"\n [value]=\"value().min\"\n [decritPar]=\"decritPar()\"\n [touched]=\"touched() || quitte()\"\n [readonly]=\"readonly()\"\n [name]=\"name() ? name() + '-min' : ''\"\n (valueChange)=\"changer('min', $event)\"\n (touch)=\"quitter()\"\n />\n <st-amount-field\n class=\"st-amount-range__partie\"\n [libelle]=\"etiquettesLues().max\"\n [devise]=\"devise()\"\n [value]=\"value().max\"\n [errors]=\"erreursDuMaximum()\"\n [decritPar]=\"decritPar()\"\n [touched]=\"touched() || quitte()\"\n [readonly]=\"readonly()\"\n [name]=\"name() ? name() + '-max' : ''\"\n (valueChange)=\"changer('max', $event)\"\n (touch)=\"quitter()\"\n />\n </div>\n</st-fieldset>\n",
517
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;min-inline-size:0;container-type:inline-size}.st-amount-range__parties{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-espacement-4)}@container (min-width: 30rem){.st-amount-range__parties{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}\n"],
518
+ dependencies: [{
519
+ kind: "component",
520
+ type: StAmountField,
521
+ selector: "st-amount-field",
522
+ inputs: [
523
+ "value",
524
+ "devise",
525
+ "autocomplete",
526
+ "complement",
527
+ "pleineLargeur",
528
+ "decritPar"
529
+ ],
530
+ outputs: ["valueChange"]
531
+ }, {
532
+ kind: "component",
533
+ type: StFieldset,
534
+ selector: "st-fieldset",
535
+ inputs: [
536
+ "legende",
537
+ "contenu",
538
+ "disposition",
539
+ "toutesLesErreurs",
540
+ "choixExclusif",
541
+ "readonly",
542
+ "disabled",
543
+ "hidden",
544
+ "decritPar"
545
+ ]
546
+ }],
547
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
548
+ });
549
+ };
550
+ i0.ɵɵngDeclareClassMetadata({
551
+ minVersion: "12.0.0",
552
+ version: "22.2.2",
553
+ ngImport: i0,
554
+ type: StAmountRange,
555
+ decorators: [{
556
+ type: Component,
557
+ args: [{
558
+ selector: "st-amount-range",
559
+ changeDetection: ChangeDetectionStrategy.OnPush,
560
+ imports: [StAmountField, StFieldset],
561
+ host: { class: "st-amount-range" },
562
+ template: "<st-fieldset\n [legende]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"erreursDuGroupe()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [disabled]=\"disabled()\"\n>\n <div class=\"st-amount-range__parties\">\n <st-amount-field\n class=\"st-amount-range__partie\"\n [libelle]=\"etiquettesLues().min\"\n [devise]=\"devise()\"\n [value]=\"value().min\"\n [decritPar]=\"decritPar()\"\n [touched]=\"touched() || quitte()\"\n [readonly]=\"readonly()\"\n [name]=\"name() ? name() + '-min' : ''\"\n (valueChange)=\"changer('min', $event)\"\n (touch)=\"quitter()\"\n />\n <st-amount-field\n class=\"st-amount-range__partie\"\n [libelle]=\"etiquettesLues().max\"\n [devise]=\"devise()\"\n [value]=\"value().max\"\n [errors]=\"erreursDuMaximum()\"\n [decritPar]=\"decritPar()\"\n [touched]=\"touched() || quitte()\"\n [readonly]=\"readonly()\"\n [name]=\"name() ? name() + '-max' : ''\"\n (valueChange)=\"changer('max', $event)\"\n (touch)=\"quitter()\"\n />\n </div>\n</st-fieldset>\n",
563
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;min-inline-size:0;container-type:inline-size}.st-amount-range__parties{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-espacement-4)}@container (min-width: 30rem){.st-amount-range__parties{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}\n"]
564
+ }]
565
+ }],
566
+ propDecorators: {
567
+ value: [{
568
+ type: i0.Input,
569
+ args: [{
570
+ isSignal: true,
571
+ alias: "value",
572
+ required: false
573
+ }]
574
+ }, {
575
+ type: i0.Output,
576
+ args: ["valueChange"]
577
+ }],
578
+ devise: [{
579
+ type: i0.Input,
580
+ args: [{
581
+ isSignal: true,
582
+ alias: "devise",
583
+ required: true
584
+ }]
585
+ }],
586
+ etiquettes: [{
587
+ type: i0.Input,
588
+ args: [{
589
+ isSignal: true,
590
+ alias: "etiquettes",
591
+ required: false
592
+ }]
593
+ }],
594
+ fieldset: [{
595
+ type: i0.ViewChild,
596
+ args: [i0.forwardRef(() => StFieldset), { isSignal: true }]
597
+ }],
598
+ champs: [{
599
+ type: i0.ViewChildren,
600
+ args: [i0.forwardRef(() => StAmountField), { isSignal: true }]
601
+ }]
602
+ }
603
+ });
604
+ const MARGE = 8;
605
+ const ECART = 4;
606
+ var StCoucheAncree = class StCoucheAncree {
607
+ stCoucheAncree = input.required(...ngDevMode ? [{ debugName: "stCoucheAncree" }] : /* istanbul ignore next */ []);
608
+ element = inject(ElementRef).nativeElement;
609
+ fenetre = inject(DOCUMENT).defaultView;
610
+ observateur = null;
611
+ placer = () => {
612
+ const ancre = this.stCoucheAncree();
613
+ if (ancre === null || this.fenetre === null || !this.element.matches(":popover-open")) return;
614
+ const largeurUtile = this.element.ownerDocument.documentElement.clientWidth;
615
+ const hauteurUtile = this.fenetre.innerHeight;
616
+ this.element.style.setProperty("max-inline-size", `${String(largeurUtile - 16)}px`);
617
+ const a = ancre.getBoundingClientRect();
618
+ const bloc = this.element.getBoundingClientRect();
619
+ const debut = this.fenetre.getComputedStyle(ancre).direction === "rtl" ? a.right - bloc.width : a.left;
620
+ const gauche = Math.min(Math.max(MARGE, debut), largeurUtile - bloc.width - MARGE);
621
+ const dessous = a.bottom + ECART;
622
+ const dessus = a.top - ECART - bloc.height;
623
+ const auDessus = dessous + bloc.height > hauteurUtile - MARGE && dessus >= MARGE;
624
+ this.element.style.setProperty("left", `${String(Math.max(MARGE, gauche))}px`);
625
+ this.element.style.setProperty("top", `${String(auDessus ? dessus : dessous)}px`);
626
+ this.element.dataset["cote"] = auDessus ? "haut" : "bas";
627
+ };
628
+ constructor() {
629
+ const pris = typeof this.element.showPopover === "function";
630
+ if (pris) this.element.setAttribute("popover", "manual");
631
+ afterNextRender(() => {
632
+ if (!pris) return;
633
+ this.element.showPopover();
634
+ this.placer();
635
+ this.fenetre?.addEventListener("scroll", this.placer, {
636
+ capture: true,
637
+ passive: true
638
+ });
639
+ this.fenetre?.addEventListener("resize", this.placer, { passive: true });
640
+ const Observateur = this.fenetre?.ResizeObserver;
641
+ if (Observateur !== void 0) {
642
+ this.observateur = new Observateur(this.placer);
643
+ this.observateur.observe(this.element);
644
+ }
645
+ });
646
+ inject(DestroyRef).onDestroy(() => {
647
+ this.observateur?.disconnect();
648
+ this.fenetre?.removeEventListener("scroll", this.placer, { capture: true });
649
+ this.fenetre?.removeEventListener("resize", this.placer);
650
+ });
651
+ }
652
+ static ɵfac = i0.ɵɵngDeclareFactory({
653
+ minVersion: "12.0.0",
654
+ version: "22.2.2",
655
+ ngImport: i0,
656
+ type: StCoucheAncree,
657
+ deps: [],
658
+ target: i0.ɵɵFactoryTarget.Directive
659
+ });
660
+ static ɵdir = i0.ɵɵngDeclareDirective({
661
+ minVersion: "17.1.0",
662
+ version: "22.2.2",
663
+ type: StCoucheAncree,
664
+ isStandalone: true,
665
+ selector: "[stCoucheAncree]",
666
+ inputs: { stCoucheAncree: {
667
+ classPropertyName: "stCoucheAncree",
668
+ publicName: "stCoucheAncree",
669
+ isSignal: true,
670
+ isRequired: true,
671
+ transformFunction: null
672
+ } },
673
+ host: { classAttribute: "st-couche-ancree" },
674
+ ngImport: i0
675
+ });
676
+ };
677
+ i0.ɵɵngDeclareClassMetadata({
678
+ minVersion: "12.0.0",
679
+ version: "22.2.2",
680
+ ngImport: i0,
681
+ type: StCoucheAncree,
682
+ decorators: [{
683
+ type: Directive,
684
+ args: [{
685
+ selector: "[stCoucheAncree]",
686
+ host: { class: "st-couche-ancree" }
687
+ }]
688
+ }],
689
+ ctorParameters: () => [],
690
+ propDecorators: { stCoucheAncree: [{
691
+ type: i0.Input,
692
+ args: [{
693
+ isSignal: true,
694
+ alias: "stCoucheAncree",
695
+ required: true
696
+ }]
697
+ }] }
698
+ });
699
+ var SortieDuComposant = class {
700
+ hote;
701
+ sortir;
702
+ appui = false;
703
+ enAttente = null;
704
+ retirerLesEcouteurs = null;
705
+ minuterie;
706
+ constructor(hote, sortir) {
707
+ this.hote = hote;
708
+ this.sortir = sortir;
709
+ inject(DestroyRef).onDestroy(() => {
710
+ this.retirerLesEcouteurs?.();
711
+ clearTimeout(this.minuterie);
712
+ });
713
+ }
714
+ surPointeur() {
715
+ if (this.appui) return;
716
+ this.appui = true;
717
+ const document = this.hote.ownerDocument;
718
+ const relache = () => {
719
+ this.retirerLesEcouteurs?.();
720
+ this.minuterie = setTimeout(() => {
721
+ this.appui = false;
722
+ this.trancher();
723
+ });
724
+ };
725
+ this.retirerLesEcouteurs = () => {
726
+ document.removeEventListener("pointerup", relache, true);
727
+ document.removeEventListener("pointercancel", relache, true);
728
+ this.retirerLesEcouteurs = null;
729
+ };
730
+ document.addEventListener("pointerup", relache, true);
731
+ document.addEventListener("pointercancel", relache, true);
732
+ }
733
+ surFocusout(evenement) {
734
+ const suivant = evenement.relatedTarget;
735
+ if (suivant !== null && this.hote.contains(suivant)) return;
736
+ if (suivant !== null && !this.appui) {
737
+ this.enAttente = null;
738
+ this.sortir();
739
+ return;
740
+ }
741
+ this.enAttente = evenement.target;
742
+ if (!this.appui) queueMicrotask(() => {
743
+ this.trancher();
744
+ });
745
+ }
746
+ trancher() {
747
+ const cible = this.enAttente;
748
+ if (cible === null || this.appui) return;
749
+ this.enAttente = null;
750
+ if (cible instanceof Node && !cible.isConnected) return;
751
+ const actif = this.hote.ownerDocument.activeElement;
752
+ if (actif !== null && this.hote.contains(actif)) return;
753
+ this.sortir();
754
+ }
755
+ };
756
+ function texteDesBornes$1(libelles, locale, min, max) {
757
+ if (min !== null && max !== null) return libelles.entreLeEtLe(formaterDateSaisie(min, locale), formaterDateSaisie(max, locale));
758
+ if (min !== null) return libelles.dateTropTot(formaterDateSaisie(min, locale));
759
+ if (max !== null) return libelles.dateTropTard(formaterDateSaisie(max, locale));
760
+ return null;
761
+ }
762
+ var StRaccourcisDeDates = class StRaccourcisDeDates {
763
+ titre = input.required(...ngDevMode ? [{ debugName: "titre" }] : /* istanbul ignore next */ []);
764
+ disposition = input("liste", ...ngDevMode ? [{ debugName: "disposition" }] : /* istanbul ignore next */ []);
765
+ raccourcis = input.required(...ngDevMode ? [{ debugName: "raccourcis" }] : /* istanbul ignore next */ []);
766
+ desactive = input(false, {
767
+ ...ngDevMode ? { debugName: "desactive" } : /* istanbul ignore next */ {},
768
+ transform: booleanAttribute
769
+ });
770
+ choix = output();
771
+ idDuTitre = `${inject(StIdentifiants).prochain("st-raccourcis")}-titre`;
772
+ static ɵfac = i0.ɵɵngDeclareFactory({
773
+ minVersion: "12.0.0",
774
+ version: "22.2.2",
775
+ ngImport: i0,
776
+ type: StRaccourcisDeDates,
777
+ deps: [],
778
+ target: i0.ɵɵFactoryTarget.Component
779
+ });
780
+ static ɵcmp = i0.ɵɵngDeclareComponent({
781
+ minVersion: "17.0.0",
782
+ version: "22.2.2",
783
+ type: StRaccourcisDeDates,
784
+ isStandalone: true,
785
+ selector: "st-raccourcis-de-dates",
786
+ inputs: {
787
+ titre: {
788
+ classPropertyName: "titre",
789
+ publicName: "titre",
790
+ isSignal: true,
791
+ isRequired: true,
792
+ transformFunction: null
793
+ },
794
+ disposition: {
795
+ classPropertyName: "disposition",
796
+ publicName: "disposition",
797
+ isSignal: true,
798
+ isRequired: false,
799
+ transformFunction: null
800
+ },
801
+ raccourcis: {
802
+ classPropertyName: "raccourcis",
803
+ publicName: "raccourcis",
804
+ isSignal: true,
805
+ isRequired: true,
806
+ transformFunction: null
807
+ },
808
+ desactive: {
809
+ classPropertyName: "desactive",
810
+ publicName: "desactive",
811
+ isSignal: true,
812
+ isRequired: false,
813
+ transformFunction: null
814
+ }
815
+ },
816
+ outputs: { choix: "choix" },
817
+ host: {
818
+ properties: { "attr.data-disposition": "disposition()" },
819
+ classAttribute: "st-raccourcis-de-dates"
820
+ },
821
+ ngImport: i0,
822
+ template: "<p class=\"st-raccourcis-de-dates__titre\" [id]=\"idDuTitre\">{{ titre() }}</p>\n<div class=\"st-raccourcis-de-dates__boutons\" role=\"group\" [attr.aria-labelledby]=\"idDuTitre\">\n @for (raccourci of raccourcis(); track raccourci.cle) {\n <button\n class=\"st-raccourcis-de-dates__bouton\"\n type=\"button\"\n [attr.aria-pressed]=\"raccourci.choisi ? 'true' : 'false'\"\n [disabled]=\"desactive()\"\n (click)=\"choix.emit(raccourci.cle)\"\n >\n <span class=\"st-raccourcis-de-dates__libelle\">{{ raccourci.libelle }}</span>\n @if (raccourci.choisi) {\n <st-icon class=\"st-raccourcis-de-dates__coche\" nom=\"coche\" taille=\"16\" />\n } @else if (raccourci.precision) {\n <span class=\"st-raccourcis-de-dates__precision\" aria-hidden=\"true\">{{\n raccourci.precision\n }}</span>\n }\n </button>\n }\n</div>\n",
823
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-raccourcis-de-dates__titre{margin:0 0 var(--st-espacement-2);color:var(--st-couleur-texte-discret);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase}.st-raccourcis-de-dates__boutons{display:flex;flex-direction:column;gap:var(--st-espacement-2)}:host([data-disposition=grille]) .st-raccourcis-de-dates__boutons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.st-raccourcis-de-dates__bouton:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-raccourcis-de-dates__bouton{box-sizing:border-box;display:flex;gap:var(--st-espacement-1);align-items:center;justify-content:space-between;min-inline-size:0;padding:var(--st-espacement-2-5) var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-xs);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte);text-align:start;cursor:pointer;background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-md)}@media(hover:hover){.st-raccourcis-de-dates__bouton:hover:not(:disabled,[aria-pressed=true]){background:var(--st-couleur-surface-survol);border-color:var(--st-couleur-bordure-forte);transition:background-color var(--st-duree-rapide) var(--st-courbe-standard),border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-raccourcis-de-dates__bouton[aria-pressed=true]{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-texte-primaire);border-color:var(--st-couleur-primaire);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-primaire)}.st-raccourcis-de-dates__bouton[aria-pressed=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-primaire)}.st-raccourcis-de-dates__bouton:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed}@media(forced-colors:active){.st-raccourcis-de-dates__bouton{border-color:ButtonText}.st-raccourcis-de-dates__bouton[aria-pressed=true]{border-color:Highlight;outline:var(--st-epaisseur-fine) solid Highlight;outline-offset:calc(-2 * var(--st-epaisseur-fine))}}@media print{.st-raccourcis-de-dates__bouton{background:none}.st-raccourcis-de-dates__bouton[aria-pressed=true]{color:var(--st-couleur-texte);border-color:var(--st-couleur-texte);box-shadow:none;outline:var(--st-epaisseur-fine) solid var(--st-couleur-texte);outline-offset:calc(-2 * var(--st-epaisseur-fine))}}:host([data-disposition=grille]) .st-raccourcis-de-dates__bouton{padding:var(--st-espacement-2) var(--st-espacement-3)}@media(pointer:coarse){.st-raccourcis-de-dates__bouton{min-block-size:var(--st-hauteur-commande-xl)}}.st-raccourcis-de-dates__libelle{min-inline-size:0;overflow-wrap:anywhere}.st-raccourcis-de-dates__precision{flex:none;font-family:var(--st-police-mono);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);color:var(--st-couleur-texte-discret)}.st-raccourcis-de-dates__coche{flex:none}\n"],
824
+ dependencies: [{
825
+ kind: "component",
826
+ type: StIcon,
827
+ selector: "st-icon",
828
+ inputs: [
829
+ "icone",
830
+ "nom",
831
+ "variante",
832
+ "sprite",
833
+ "nomMetier",
834
+ "taille",
835
+ "ton",
836
+ "etiquette",
837
+ "miroir"
838
+ ]
839
+ }],
840
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
841
+ });
842
+ };
843
+ i0.ɵɵngDeclareClassMetadata({
844
+ minVersion: "12.0.0",
845
+ version: "22.2.2",
846
+ ngImport: i0,
847
+ type: StRaccourcisDeDates,
848
+ decorators: [{
849
+ type: Component,
850
+ args: [{
851
+ selector: "st-raccourcis-de-dates",
852
+ changeDetection: ChangeDetectionStrategy.OnPush,
853
+ imports: [StIcon],
854
+ host: {
855
+ class: "st-raccourcis-de-dates",
856
+ "[attr.data-disposition]": "disposition()"
857
+ },
858
+ template: "<p class=\"st-raccourcis-de-dates__titre\" [id]=\"idDuTitre\">{{ titre() }}</p>\n<div class=\"st-raccourcis-de-dates__boutons\" role=\"group\" [attr.aria-labelledby]=\"idDuTitre\">\n @for (raccourci of raccourcis(); track raccourci.cle) {\n <button\n class=\"st-raccourcis-de-dates__bouton\"\n type=\"button\"\n [attr.aria-pressed]=\"raccourci.choisi ? 'true' : 'false'\"\n [disabled]=\"desactive()\"\n (click)=\"choix.emit(raccourci.cle)\"\n >\n <span class=\"st-raccourcis-de-dates__libelle\">{{ raccourci.libelle }}</span>\n @if (raccourci.choisi) {\n <st-icon class=\"st-raccourcis-de-dates__coche\" nom=\"coche\" taille=\"16\" />\n } @else if (raccourci.precision) {\n <span class=\"st-raccourcis-de-dates__precision\" aria-hidden=\"true\">{{\n raccourci.precision\n }}</span>\n }\n </button>\n }\n</div>\n",
859
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-raccourcis-de-dates__titre{margin:0 0 var(--st-espacement-2);color:var(--st-couleur-texte-discret);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase}.st-raccourcis-de-dates__boutons{display:flex;flex-direction:column;gap:var(--st-espacement-2)}:host([data-disposition=grille]) .st-raccourcis-de-dates__boutons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.st-raccourcis-de-dates__bouton:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-raccourcis-de-dates__bouton{box-sizing:border-box;display:flex;gap:var(--st-espacement-1);align-items:center;justify-content:space-between;min-inline-size:0;padding:var(--st-espacement-2-5) var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-xs);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte);text-align:start;cursor:pointer;background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-md)}@media(hover:hover){.st-raccourcis-de-dates__bouton:hover:not(:disabled,[aria-pressed=true]){background:var(--st-couleur-surface-survol);border-color:var(--st-couleur-bordure-forte);transition:background-color var(--st-duree-rapide) var(--st-courbe-standard),border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-raccourcis-de-dates__bouton[aria-pressed=true]{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-texte-primaire);border-color:var(--st-couleur-primaire);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-primaire)}.st-raccourcis-de-dates__bouton[aria-pressed=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-primaire)}.st-raccourcis-de-dates__bouton:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed}@media(forced-colors:active){.st-raccourcis-de-dates__bouton{border-color:ButtonText}.st-raccourcis-de-dates__bouton[aria-pressed=true]{border-color:Highlight;outline:var(--st-epaisseur-fine) solid Highlight;outline-offset:calc(-2 * var(--st-epaisseur-fine))}}@media print{.st-raccourcis-de-dates__bouton{background:none}.st-raccourcis-de-dates__bouton[aria-pressed=true]{color:var(--st-couleur-texte);border-color:var(--st-couleur-texte);box-shadow:none;outline:var(--st-epaisseur-fine) solid var(--st-couleur-texte);outline-offset:calc(-2 * var(--st-epaisseur-fine))}}:host([data-disposition=grille]) .st-raccourcis-de-dates__bouton{padding:var(--st-espacement-2) var(--st-espacement-3)}@media(pointer:coarse){.st-raccourcis-de-dates__bouton{min-block-size:var(--st-hauteur-commande-xl)}}.st-raccourcis-de-dates__libelle{min-inline-size:0;overflow-wrap:anywhere}.st-raccourcis-de-dates__precision{flex:none;font-family:var(--st-police-mono);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);color:var(--st-couleur-texte-discret)}.st-raccourcis-de-dates__coche{flex:none}\n"]
860
+ }]
861
+ }],
862
+ propDecorators: {
863
+ titre: [{
864
+ type: i0.Input,
865
+ args: [{
866
+ isSignal: true,
867
+ alias: "titre",
868
+ required: true
869
+ }]
870
+ }],
871
+ disposition: [{
872
+ type: i0.Input,
873
+ args: [{
874
+ isSignal: true,
875
+ alias: "disposition",
876
+ required: false
877
+ }]
878
+ }],
879
+ raccourcis: [{
880
+ type: i0.Input,
881
+ args: [{
882
+ isSignal: true,
883
+ alias: "raccourcis",
884
+ required: true
885
+ }]
886
+ }],
887
+ desactive: [{
888
+ type: i0.Input,
889
+ args: [{
890
+ isSignal: true,
891
+ alias: "desactive",
892
+ required: false
893
+ }]
894
+ }],
895
+ choix: [{
896
+ type: i0.Output,
897
+ args: ["choix"]
898
+ }]
899
+ }
900
+ });
901
+ var StDateField = class StDateField extends ContratDeChamp {
902
+ libelles = inject(ST_LIBELLES);
903
+ locale = inject(ST_LOCALE);
904
+ element = inject(ElementRef);
905
+ injecteur = inject(Injector);
906
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
907
+ dateMin = input(null, ...ngDevMode ? [{ debugName: "dateMin" }] : /* istanbul ignore next */ []);
908
+ dateMax = input(null, ...ngDevMode ? [{ debugName: "dateMax" }] : /* istanbul ignore next */ []);
909
+ autocomplete = input(null, ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
910
+ annees = input(null, ...ngDevMode ? [{ debugName: "annees" }] : /* istanbul ignore next */ []);
911
+ raccourcis = input([], ...ngDevMode ? [{ debugName: "raccourcis" }] : /* istanbul ignore next */ []);
912
+ dispositionDesRaccourcis = input("liste", ...ngDevMode ? [{ debugName: "dispositionDesRaccourcis" }] : /* istanbul ignore next */ []);
913
+ titreDesRaccourcis = input(null, ...ngDevMode ? [{ debugName: "titreDesRaccourcis" }] : /* istanbul ignore next */ []);
914
+ raccourcisAffiches = computed(() => {
915
+ const date = this.value();
916
+ return this.raccourcis().map((raccourci) => ({
917
+ cle: raccourci.cle,
918
+ libelle: raccourci.libelle,
919
+ precision: raccourci.precision ?? null,
920
+ choisi: raccourci.date === date
921
+ }));
922
+ }, ...ngDevMode ? [{ debugName: "raccourcisAffiches" }] : /* istanbul ignore next */ []);
923
+ titreDesRaccourcisLu = computed(() => this.titreDesRaccourcis() ?? this.libelles().datesPredefinies, ...ngDevMode ? [{ debugName: "titreDesRaccourcisLu" }] : /* istanbul ignore next */ []);
924
+ choisirUnRaccourci(cle) {
925
+ const raccourci = this.raccourcis().find((un) => un.cle === cle);
926
+ if (raccourci !== void 0) this.value.set(raccourci.date);
927
+ }
928
+ ouvert = signal(false, ...ngDevMode ? [{ debugName: "ouvert" }] : /* istanbul ignore next */ []);
929
+ identifiantCalendrier = `${inject(StIdentifiants).prochain("st-date")}-calendrier`;
930
+ calendrier = viewChild(StCalendar, ...ngDevMode ? [{ debugName: "calendrier" }] : /* istanbul ignore next */ []);
931
+ bouton = viewChild("bouton", {
932
+ ...ngDevMode ? { debugName: "bouton" } : /* istanbul ignore next */ {},
933
+ read: ElementRef
934
+ });
935
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
936
+ saisie = transformedValue(this.value, {
937
+ parse: (texte) => {
938
+ if (texte.trim() === "") return { value: null };
939
+ const date = lireDate(texte, this.locale());
940
+ return date === null ? {
941
+ value: null,
942
+ error: { kind: "date" }
943
+ } : { value: date };
944
+ },
945
+ format: (valeur) => this.formater(valeur)
946
+ });
947
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
948
+ aideLue = computed(() => {
949
+ const libelles = this.libelles();
950
+ const locale = this.locale();
951
+ const format = libelles.formatDeDate(motifLocal(libelles, locale), exempleDeDate(locale));
952
+ const bornes = texteDesBornes$1(libelles, locale, this.dateMin(), this.dateMax());
953
+ return [
954
+ this.aideEtRaisons(),
955
+ format,
956
+ bornes
957
+ ].filter((texte) => texte !== null).join(" ");
958
+ }, ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
959
+ sortie = new SortieDuComposant(this.element.nativeElement, () => {
960
+ this.ouvert.set(false);
961
+ this.quitte.set(true);
962
+ this.touch.emit();
963
+ });
964
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
965
+ surSaisie(evenement) {
966
+ this.saisie.set(this.texteSaisi(evenement));
967
+ }
968
+ surToucheDuChamp(evenement) {
969
+ if (evenement.key !== "ArrowDown" || !evenement.altKey || this.ouvert()) return;
970
+ evenement.preventDefault();
971
+ this.basculer();
972
+ }
973
+ surEchap(evenement) {
974
+ if (!this.ouvert()) return;
975
+ evenement.preventDefault();
976
+ evenement.stopPropagation();
977
+ this.fermer(true);
978
+ }
979
+ aLaSortieDuChamp() {
980
+ if (this.saisie.parseErrors().length === 0) this.saisie.set(this.formater(this.value()));
981
+ }
982
+ basculer() {
983
+ if (this.ouvert()) {
984
+ this.fermer(true);
985
+ return;
986
+ }
987
+ this.ouvert.set(true);
988
+ afterNextRender(() => {
989
+ this.calendrier()?.focus();
990
+ }, { injector: this.injecteur });
991
+ }
992
+ choisir(date) {
993
+ this.value.set(date);
994
+ this.fermer(false);
995
+ afterNextRender(() => {
996
+ this.focus();
997
+ }, { injector: this.injecteur });
998
+ }
999
+ fermer(rendreLeFocus) {
1000
+ this.ouvert.set(false);
1001
+ if (!rendreLeFocus) return;
1002
+ afterNextRender(() => {
1003
+ this.bouton()?.nativeElement.focus();
1004
+ }, { injector: this.injecteur });
1005
+ }
1006
+ formater(valeur) {
1007
+ return valeur === null ? "" : formaterDateSaisie(valeur, this.locale());
1008
+ }
1009
+ static ɵfac = i0.ɵɵngDeclareFactory({
1010
+ minVersion: "12.0.0",
1011
+ version: "22.2.2",
1012
+ ngImport: i0,
1013
+ type: StDateField,
1014
+ deps: null,
1015
+ target: i0.ɵɵFactoryTarget.Component
1016
+ });
1017
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1018
+ minVersion: "17.0.0",
1019
+ version: "22.2.2",
1020
+ type: StDateField,
1021
+ isStandalone: true,
1022
+ selector: "st-date-field",
1023
+ inputs: {
1024
+ value: {
1025
+ classPropertyName: "value",
1026
+ publicName: "value",
1027
+ isSignal: true,
1028
+ isRequired: false,
1029
+ transformFunction: null
1030
+ },
1031
+ dateMin: {
1032
+ classPropertyName: "dateMin",
1033
+ publicName: "dateMin",
1034
+ isSignal: true,
1035
+ isRequired: false,
1036
+ transformFunction: null
1037
+ },
1038
+ dateMax: {
1039
+ classPropertyName: "dateMax",
1040
+ publicName: "dateMax",
1041
+ isSignal: true,
1042
+ isRequired: false,
1043
+ transformFunction: null
1044
+ },
1045
+ autocomplete: {
1046
+ classPropertyName: "autocomplete",
1047
+ publicName: "autocomplete",
1048
+ isSignal: true,
1049
+ isRequired: false,
1050
+ transformFunction: null
1051
+ },
1052
+ annees: {
1053
+ classPropertyName: "annees",
1054
+ publicName: "annees",
1055
+ isSignal: true,
1056
+ isRequired: false,
1057
+ transformFunction: null
1058
+ },
1059
+ raccourcis: {
1060
+ classPropertyName: "raccourcis",
1061
+ publicName: "raccourcis",
1062
+ isSignal: true,
1063
+ isRequired: false,
1064
+ transformFunction: null
1065
+ },
1066
+ dispositionDesRaccourcis: {
1067
+ classPropertyName: "dispositionDesRaccourcis",
1068
+ publicName: "dispositionDesRaccourcis",
1069
+ isSignal: true,
1070
+ isRequired: false,
1071
+ transformFunction: null
1072
+ },
1073
+ titreDesRaccourcis: {
1074
+ classPropertyName: "titreDesRaccourcis",
1075
+ publicName: "titreDesRaccourcis",
1076
+ isSignal: true,
1077
+ isRequired: false,
1078
+ transformFunction: null
1079
+ }
1080
+ },
1081
+ outputs: { value: "valueChange" },
1082
+ host: {
1083
+ listeners: {
1084
+ "focusout": "sortie.surFocusout($event)",
1085
+ "pointerdown": "sortie.surPointeur()",
1086
+ "keydown.escape": "surEchap($event)"
1087
+ },
1088
+ classAttribute: "st-date-field"
1089
+ },
1090
+ viewQueries: [{
1091
+ propertyName: "calendrier",
1092
+ first: true,
1093
+ predicate: StCalendar,
1094
+ descendants: true,
1095
+ isSignal: true
1096
+ }, {
1097
+ propertyName: "bouton",
1098
+ first: true,
1099
+ predicate: ["bouton"],
1100
+ descendants: true,
1101
+ read: ElementRef,
1102
+ isSignal: true
1103
+ }],
1104
+ usesInheritance: true,
1105
+ ngImport: i0,
1106
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <div #ligne class=\"st-date-field__ligne\">\n <input\n #champ\n class=\"st-date-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (keydown)=\"surToucheDuChamp($event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n <button\n #bouton\n class=\"st-date-field__bouton\"\n stIconButton\n type=\"button\"\n icone=\"calendrier\"\n [etiquette]=\"libelles().choisirDansLeCalendrier(libelle())\"\n [attr.aria-expanded]=\"ouvert()\"\n [attr.aria-controls]=\"ouvert() ? identifiantCalendrier : null\"\n [disabled]=\"disabled() || readonly()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"basculer()\"\n ></button>\n </div>\n @if (raccourcis().length > 0) {\n <st-raccourcis-de-dates\n class=\"st-date-field__raccourcis\"\n [titre]=\"titreDesRaccourcisLu()\"\n [disposition]=\"dispositionDesRaccourcis()\"\n [raccourcis]=\"raccourcisAffiches()\"\n [desactive]=\"disabled() || readonly()\"\n (choix)=\"choisirUnRaccourci($event)\"\n />\n }\n <!-- Le calendrier flotte sous le champ, dans la couche superieure (D132) : rien ne descend,\n rien ne bouge autour, comme la liste d'un select. -->\n @if (ouvert()) {\n <div class=\"st-date-field__couche\" [stCoucheAncree]=\"ligne\">\n <st-calendar\n class=\"st-date-field__calendrier\"\n [id]=\"identifiantCalendrier\"\n fermable\n [selection]=\"value()\"\n [dateMin]=\"dateMin()\"\n [dateMax]=\"dateMax()\"\n [annees]=\"annees()\"\n (choix)=\"choisir($event)\"\n (fermeture)=\"fermer(true)\"\n />\n </div>\n }\n</st-form-field>\n",
1107
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-date-field__ligne{position:relative;max-inline-size:calc(var(--st-largeur-champ-sm) + var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)))}.st-date-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-date-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-date-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-date-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-date-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-date-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-date-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-date-field__champ:is(input,textarea):read-only:not(:disabled),.st-date-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-date-field__champ{padding-inline-end:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));font-family:var(--st-police-mono);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes)}.st-date-field__bouton{position:absolute;inset-block:0;inset-inline-end:0;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto}@supports selector(:popover-open){.st-date-field__couche[popover]{position:fixed;inset:auto;padding:0;margin:0;overflow:visible;color:inherit;background:transparent;border:0}}.st-date-field__couche:popover-open{border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee);transition:opacity var(--st-duree-normale) linear,translate var(--st-duree-normale) var(--st-courbe-entrant)}@starting-style{.st-date-field__couche:popover-open{opacity:0;translate:0 calc(-1 * var(--st-deplacement-court))}}@supports not selector(:popover-open){.st-date-field__couche{margin-block-start:var(--st-espacement-2)}}.st-date-field__raccourcis{margin-block-start:var(--st-espacement-3)}\n"],
1108
+ dependencies: [
1109
+ {
1110
+ kind: "component",
1111
+ type: StFormField,
1112
+ selector: "st-form-field",
1113
+ inputs: [
1114
+ "libelle",
1115
+ "complement",
1116
+ "disposition",
1117
+ "presentation",
1118
+ "libelleMasque",
1119
+ "descriptionsDuControle"
1120
+ ]
1121
+ },
1122
+ {
1123
+ kind: "directive",
1124
+ type: StControleDeChamp,
1125
+ selector: "[stControleDeChamp]"
1126
+ },
1127
+ {
1128
+ kind: "component",
1129
+ type: StIconButton,
1130
+ selector: "button[stIconButton]",
1131
+ inputs: [
1132
+ "icone",
1133
+ "etiquette",
1134
+ "variante",
1135
+ "taille",
1136
+ "tailleDuGlyphe",
1137
+ "enfonce",
1138
+ "iconeEnfoncee",
1139
+ "chargement",
1140
+ "indisponible",
1141
+ "raisonIndisponible"
1142
+ ]
1143
+ },
1144
+ {
1145
+ kind: "component",
1146
+ type: StCalendar,
1147
+ selector: "st-calendar",
1148
+ inputs: [
1149
+ "selection",
1150
+ "dateMin",
1151
+ "dateMax",
1152
+ "plage",
1153
+ "rejet",
1154
+ "annees",
1155
+ "pleineLargeur",
1156
+ "fermable"
1157
+ ],
1158
+ outputs: ["choix", "fermeture"]
1159
+ },
1160
+ {
1161
+ kind: "component",
1162
+ type: StRaccourcisDeDates,
1163
+ selector: "st-raccourcis-de-dates",
1164
+ inputs: [
1165
+ "titre",
1166
+ "disposition",
1167
+ "raccourcis",
1168
+ "desactive"
1169
+ ],
1170
+ outputs: ["choix"]
1171
+ },
1172
+ {
1173
+ kind: "directive",
1174
+ type: StCoucheAncree,
1175
+ selector: "[stCoucheAncree]",
1176
+ inputs: ["stCoucheAncree"]
1177
+ }
1178
+ ],
1179
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1180
+ });
1181
+ };
1182
+ i0.ɵɵngDeclareClassMetadata({
1183
+ minVersion: "12.0.0",
1184
+ version: "22.2.2",
1185
+ ngImport: i0,
1186
+ type: StDateField,
1187
+ decorators: [{
1188
+ type: Component,
1189
+ args: [{
1190
+ selector: "st-date-field",
1191
+ changeDetection: ChangeDetectionStrategy.OnPush,
1192
+ imports: [
1193
+ StFormField,
1194
+ StControleDeChamp,
1195
+ StIconButton,
1196
+ StCalendar,
1197
+ StRaccourcisDeDates,
1198
+ StCoucheAncree
1199
+ ],
1200
+ host: {
1201
+ class: "st-date-field",
1202
+ "(focusout)": "sortie.surFocusout($event)",
1203
+ "(pointerdown)": "sortie.surPointeur()",
1204
+ "(keydown.escape)": "surEchap($event)"
1205
+ },
1206
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <div #ligne class=\"st-date-field__ligne\">\n <input\n #champ\n class=\"st-date-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (keydown)=\"surToucheDuChamp($event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n <button\n #bouton\n class=\"st-date-field__bouton\"\n stIconButton\n type=\"button\"\n icone=\"calendrier\"\n [etiquette]=\"libelles().choisirDansLeCalendrier(libelle())\"\n [attr.aria-expanded]=\"ouvert()\"\n [attr.aria-controls]=\"ouvert() ? identifiantCalendrier : null\"\n [disabled]=\"disabled() || readonly()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"basculer()\"\n ></button>\n </div>\n @if (raccourcis().length > 0) {\n <st-raccourcis-de-dates\n class=\"st-date-field__raccourcis\"\n [titre]=\"titreDesRaccourcisLu()\"\n [disposition]=\"dispositionDesRaccourcis()\"\n [raccourcis]=\"raccourcisAffiches()\"\n [desactive]=\"disabled() || readonly()\"\n (choix)=\"choisirUnRaccourci($event)\"\n />\n }\n <!-- Le calendrier flotte sous le champ, dans la couche superieure (D132) : rien ne descend,\n rien ne bouge autour, comme la liste d'un select. -->\n @if (ouvert()) {\n <div class=\"st-date-field__couche\" [stCoucheAncree]=\"ligne\">\n <st-calendar\n class=\"st-date-field__calendrier\"\n [id]=\"identifiantCalendrier\"\n fermable\n [selection]=\"value()\"\n [dateMin]=\"dateMin()\"\n [dateMax]=\"dateMax()\"\n [annees]=\"annees()\"\n (choix)=\"choisir($event)\"\n (fermeture)=\"fermer(true)\"\n />\n </div>\n }\n</st-form-field>\n",
1207
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-date-field__ligne{position:relative;max-inline-size:calc(var(--st-largeur-champ-sm) + var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)))}.st-date-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-date-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-date-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-date-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-date-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-date-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-date-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-date-field__champ:is(input,textarea):read-only:not(:disabled),.st-date-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-date-field__champ{padding-inline-end:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));font-family:var(--st-police-mono);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes)}.st-date-field__bouton{position:absolute;inset-block:0;inset-inline-end:0;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto}@supports selector(:popover-open){.st-date-field__couche[popover]{position:fixed;inset:auto;padding:0;margin:0;overflow:visible;color:inherit;background:transparent;border:0}}.st-date-field__couche:popover-open{border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee);transition:opacity var(--st-duree-normale) linear,translate var(--st-duree-normale) var(--st-courbe-entrant)}@starting-style{.st-date-field__couche:popover-open{opacity:0;translate:0 calc(-1 * var(--st-deplacement-court))}}@supports not selector(:popover-open){.st-date-field__couche{margin-block-start:var(--st-espacement-2)}}.st-date-field__raccourcis{margin-block-start:var(--st-espacement-3)}\n"]
1208
+ }]
1209
+ }],
1210
+ propDecorators: {
1211
+ value: [{
1212
+ type: i0.Input,
1213
+ args: [{
1214
+ isSignal: true,
1215
+ alias: "value",
1216
+ required: false
1217
+ }]
1218
+ }, {
1219
+ type: i0.Output,
1220
+ args: ["valueChange"]
1221
+ }],
1222
+ dateMin: [{
1223
+ type: i0.Input,
1224
+ args: [{
1225
+ isSignal: true,
1226
+ alias: "dateMin",
1227
+ required: false
1228
+ }]
1229
+ }],
1230
+ dateMax: [{
1231
+ type: i0.Input,
1232
+ args: [{
1233
+ isSignal: true,
1234
+ alias: "dateMax",
1235
+ required: false
1236
+ }]
1237
+ }],
1238
+ autocomplete: [{
1239
+ type: i0.Input,
1240
+ args: [{
1241
+ isSignal: true,
1242
+ alias: "autocomplete",
1243
+ required: false
1244
+ }]
1245
+ }],
1246
+ annees: [{
1247
+ type: i0.Input,
1248
+ args: [{
1249
+ isSignal: true,
1250
+ alias: "annees",
1251
+ required: false
1252
+ }]
1253
+ }],
1254
+ raccourcis: [{
1255
+ type: i0.Input,
1256
+ args: [{
1257
+ isSignal: true,
1258
+ alias: "raccourcis",
1259
+ required: false
1260
+ }]
1261
+ }],
1262
+ dispositionDesRaccourcis: [{
1263
+ type: i0.Input,
1264
+ args: [{
1265
+ isSignal: true,
1266
+ alias: "dispositionDesRaccourcis",
1267
+ required: false
1268
+ }]
1269
+ }],
1270
+ titreDesRaccourcis: [{
1271
+ type: i0.Input,
1272
+ args: [{
1273
+ isSignal: true,
1274
+ alias: "titreDesRaccourcis",
1275
+ required: false
1276
+ }]
1277
+ }],
1278
+ calendrier: [{
1279
+ type: i0.ViewChild,
1280
+ args: [i0.forwardRef(() => StCalendar), { isSignal: true }]
1281
+ }],
1282
+ bouton: [{
1283
+ type: i0.ViewChild,
1284
+ args: ["bouton", {
1285
+ read: ElementRef,
1286
+ isSignal: true
1287
+ }]
1288
+ }]
1289
+ }
1290
+ });
1291
+ var StDateRange = class StDateRange extends ContratDeChamp {
1292
+ libelles = inject(ST_LIBELLES);
1293
+ locale = inject(ST_LOCALE);
1294
+ element = inject(ElementRef);
1295
+ injecteur = inject(Injector);
1296
+ value = model({
1297
+ debut: null,
1298
+ fin: null
1299
+ }, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
1300
+ dateMin = input(null, ...ngDevMode ? [{ debugName: "dateMin" }] : /* istanbul ignore next */ []);
1301
+ dateMax = input(null, ...ngDevMode ? [{ debugName: "dateMax" }] : /* istanbul ignore next */ []);
1302
+ libelleDebut = input(null, ...ngDevMode ? [{ debugName: "libelleDebut" }] : /* istanbul ignore next */ []);
1303
+ libelleFin = input(null, ...ngDevMode ? [{ debugName: "libelleFin" }] : /* istanbul ignore next */ []);
1304
+ annees = input(null, ...ngDevMode ? [{ debugName: "annees" }] : /* istanbul ignore next */ []);
1305
+ raccourcis = input([], ...ngDevMode ? [{ debugName: "raccourcis" }] : /* istanbul ignore next */ []);
1306
+ dispositionDesRaccourcis = input("liste", ...ngDevMode ? [{ debugName: "dispositionDesRaccourcis" }] : /* istanbul ignore next */ []);
1307
+ titreDesRaccourcis = input(null, ...ngDevMode ? [{ debugName: "titreDesRaccourcis" }] : /* istanbul ignore next */ []);
1308
+ variante = input("complete", ...ngDevMode ? [{ debugName: "variante" }] : /* istanbul ignore next */ []);
1309
+ presentation = input("libelle", ...ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []);
1310
+ parties = ["debut", "fin"];
1311
+ ouvert = signal(null, ...ngDevMode ? [{ debugName: "ouvert" }] : /* istanbul ignore next */ []);
1312
+ deploye = signal(false, ...ngDevMode ? [{ debugName: "deploye" }] : /* istanbul ignore next */ []);
1313
+ identifiants = (() => {
1314
+ const base = inject(StIdentifiants).prochain("st-plage");
1315
+ return {
1316
+ debut: `${base}-debut`,
1317
+ fin: `${base}-fin`,
1318
+ boutons: {
1319
+ debut: `${base}-bouton-debut`,
1320
+ fin: `${base}-bouton-fin`
1321
+ },
1322
+ calendrier: `${base}-calendrier`,
1323
+ resume: `${base}-resume`,
1324
+ libelleDuResume: `${base}-resume-libelle`,
1325
+ valeurDuResume: `${base}-resume-valeur`,
1326
+ detail: `${base}-detail`
1327
+ };
1328
+ })();
1329
+ calendrier = viewChild(StCalendar, ...ngDevMode ? [{ debugName: "calendrier" }] : /* istanbul ignore next */ []);
1330
+ fieldset = viewChild(StFieldset, ...ngDevMode ? [{ debugName: "fieldset" }] : /* istanbul ignore next */ []);
1331
+ lignes = viewChildren("ligne", ...ngDevMode ? [{ debugName: "lignes" }] : /* istanbul ignore next */ []);
1332
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
1333
+ saisie = transformedValue(this.value, {
1334
+ parse: (brut) => {
1335
+ const debut = this.lirePartie(brut.debut);
1336
+ const fin = this.lirePartie(brut.fin);
1337
+ const erreurs = [];
1338
+ if (debut === void 0) erreurs.push({
1339
+ kind: "date",
1340
+ partie: "debut"
1341
+ });
1342
+ if (fin === void 0) erreurs.push({
1343
+ kind: "date",
1344
+ partie: "fin"
1345
+ });
1346
+ const value = {
1347
+ debut: debut ?? null,
1348
+ fin: fin ?? null
1349
+ };
1350
+ return erreurs.length === 0 ? { value } : {
1351
+ value,
1352
+ error: erreurs
1353
+ };
1354
+ },
1355
+ format: (plage) => ({
1356
+ debut: this.formater(plage.debut),
1357
+ fin: this.formater(plage.fin)
1358
+ })
1359
+ });
1360
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
1361
+ etiquettes = computed(() => ({
1362
+ debut: this.libelleDebut() ?? this.libelles().dateDeDebut,
1363
+ fin: this.libelleFin() ?? this.libelles().dateDeFin
1364
+ }), ...ngDevMode ? [{ debugName: "etiquettes" }] : /* istanbul ignore next */ []);
1365
+ aideLue = computed(() => {
1366
+ const libelles = this.libelles();
1367
+ const locale = this.locale();
1368
+ const format = libelles.formatDeDate(motifLocal(libelles, locale), exempleDeDate(locale));
1369
+ const bornes = texteDesBornes$1(libelles, locale, this.dateMin(), this.dateMax());
1370
+ return [
1371
+ this.aideEtRaisons(),
1372
+ format,
1373
+ bornes
1374
+ ].filter((texte) => texte !== null).join(" ");
1375
+ }, ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
1376
+ raccourcisAffiches = computed(() => {
1377
+ const { debut, fin } = this.value();
1378
+ return this.raccourcis().map((raccourci) => ({
1379
+ cle: raccourci.cle,
1380
+ libelle: raccourci.libelle,
1381
+ precision: raccourci.precision ?? null,
1382
+ choisi: raccourci.plage.debut === debut && raccourci.plage.fin === fin
1383
+ }));
1384
+ }, ...ngDevMode ? [{ debugName: "raccourcisAffiches" }] : /* istanbul ignore next */ []);
1385
+ titreDesRaccourcisLu = computed(() => this.titreDesRaccourcis() ?? this.libelles().periodesPredefinies, ...ngDevMode ? [{ debugName: "titreDesRaccourcisLu" }] : /* istanbul ignore next */ []);
1386
+ periodeLue = computed(() => {
1387
+ const { debut, fin } = this.value();
1388
+ const libelles = this.libelles();
1389
+ const locale = this.locale();
1390
+ const format = new Intl.DateTimeFormat(locale, {
1391
+ day: "numeric",
1392
+ month: "short",
1393
+ year: "numeric",
1394
+ timeZone: "UTC"
1395
+ });
1396
+ const instant = (iso) => /* @__PURE__ */ new Date(`${iso}T00:00:00Z`);
1397
+ if (debut !== null && fin !== null) return format.formatRange(instant(debut), instant(fin));
1398
+ if (debut !== null) return libelles.aPartirDu(format.format(instant(debut)));
1399
+ if (fin !== null) return libelles.jusquAu(format.format(instant(fin)));
1400
+ return libelles.choisirUnePeriode;
1401
+ }, ...ngDevMode ? [{ debugName: "periodeLue" }] : /* istanbul ignore next */ []);
1402
+ periodeChoisie = computed(() => this.value().debut !== null || this.value().fin !== null, ...ngDevMode ? [{ debugName: "periodeChoisie" }] : /* istanbul ignore next */ []);
1403
+ sortie = new SortieDuComposant(this.element.nativeElement, () => {
1404
+ this.ouvert.set(null);
1405
+ this.deploye.set(false);
1406
+ this.quitte.set(true);
1407
+ this.touch.emit();
1408
+ });
1409
+ erreursAffichees = computed(() => {
1410
+ const libelles = this.libelles();
1411
+ const locale = this.locale();
1412
+ const etiquettes = this.etiquettes();
1413
+ return fusionnerErreurs(this.errors(), this.saisie.parseErrors()).map((erreur) => {
1414
+ const partie = this.partieDe(erreur);
1415
+ if (partie === null) return erreur;
1416
+ return {
1417
+ kind: erreur.kind,
1418
+ message: libelles.libelleEtMessage(etiquettes[partie], messageDErreur(erreur, libelles, locale))
1419
+ };
1420
+ });
1421
+ }, ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
1422
+ enErreur = computed(() => {
1423
+ const parties = fusionnerErreurs(this.errors(), this.saisie.parseErrors()).map((erreur) => this.partieDe(erreur));
1424
+ const duGroupe = parties.includes(null);
1425
+ return {
1426
+ debut: duGroupe || parties.includes("debut"),
1427
+ fin: duGroupe || parties.includes("fin")
1428
+ };
1429
+ }, ...ngDevMode ? [{ debugName: "enErreur" }] : /* istanbul ignore next */ []);
1430
+ invalide = computed(() => {
1431
+ const affichees = this.touched() || this.quitte();
1432
+ const enErreur = this.enErreur();
1433
+ return {
1434
+ debut: affichees && enErreur.debut,
1435
+ fin: affichees && enErreur.fin
1436
+ };
1437
+ }, ...ngDevMode ? [{ debugName: "invalide" }] : /* istanbul ignore next */ []);
1438
+ descriptions = computed(() => {
1439
+ const groupe = this.fieldset();
1440
+ const invalide = this.invalide();
1441
+ const aide = groupe?.identifiants.aide ?? null;
1442
+ const erreur = groupe?.identifiants.erreur ?? null;
1443
+ const de = (partie) => [aide, invalide[partie] ? erreur : null].filter((id) => id !== null).join(" ") || null;
1444
+ return {
1445
+ debut: de("debut"),
1446
+ fin: de("fin"),
1447
+ erreur
1448
+ };
1449
+ }, ...ngDevMode ? [{ debugName: "descriptions" }] : /* istanbul ignore next */ []);
1450
+ choisirUnRaccourci(cle) {
1451
+ const raccourci = this.raccourcis().find((un) => un.cle === cle);
1452
+ if (raccourci === void 0) return;
1453
+ this.value.set({
1454
+ debut: raccourci.plage.debut,
1455
+ fin: raccourci.plage.fin
1456
+ });
1457
+ }
1458
+ basculerLeResume() {
1459
+ if (this.deploye()) {
1460
+ this.deploye.set(false);
1461
+ this.ouvert.set(null);
1462
+ return;
1463
+ }
1464
+ this.deploye.set(true);
1465
+ afterNextRender(() => {
1466
+ this.element.nativeElement.querySelector(".st-date-range__panneau button, .st-date-range__panneau input")?.focus();
1467
+ }, { injector: this.injecteur });
1468
+ }
1469
+ ancreDe(partie) {
1470
+ return this.lignes()[partie === "debut" ? 0 : 1]?.nativeElement ?? null;
1471
+ }
1472
+ surSaisie(partie, evenement) {
1473
+ this.saisie.set({
1474
+ ...this.saisie(),
1475
+ [partie]: this.texteSaisi(evenement)
1476
+ });
1477
+ }
1478
+ surToucheDuChamp(partie, evenement) {
1479
+ if (evenement.key !== "ArrowDown" || !evenement.altKey || this.ouvert() === partie) return;
1480
+ evenement.preventDefault();
1481
+ this.basculer(partie);
1482
+ }
1483
+ surEchap(evenement) {
1484
+ const partie = this.ouvert();
1485
+ if (partie !== null) {
1486
+ evenement.preventDefault();
1487
+ evenement.stopPropagation();
1488
+ this.fermer(partie, true);
1489
+ return;
1490
+ }
1491
+ if (!this.deploye()) return;
1492
+ evenement.preventDefault();
1493
+ evenement.stopPropagation();
1494
+ this.deploye.set(false);
1495
+ afterNextRender(() => {
1496
+ this.element.nativeElement.querySelector(`#${this.identifiants.resume}`)?.focus();
1497
+ }, { injector: this.injecteur });
1498
+ }
1499
+ aLaSortieDuChamp() {
1500
+ if (this.saisie.parseErrors().length === 0) {
1501
+ const plage = this.value();
1502
+ this.saisie.set({
1503
+ debut: this.formater(plage.debut),
1504
+ fin: this.formater(plage.fin)
1505
+ });
1506
+ }
1507
+ }
1508
+ basculer(partie) {
1509
+ if (this.ouvert() === partie) {
1510
+ this.fermer(partie, true);
1511
+ return;
1512
+ }
1513
+ this.ouvert.set(partie);
1514
+ afterNextRender(() => {
1515
+ this.calendrier()?.focus();
1516
+ }, { injector: this.injecteur });
1517
+ }
1518
+ bornes(partie) {
1519
+ const plage = this.value();
1520
+ return partie === "debut" ? {
1521
+ min: this.dateMin(),
1522
+ max: plage.fin ?? this.dateMax()
1523
+ } : {
1524
+ min: plage.debut ?? this.dateMin(),
1525
+ max: this.dateMax()
1526
+ };
1527
+ }
1528
+ choisir(partie, date) {
1529
+ this.value.set({
1530
+ ...this.value(),
1531
+ [partie]: date
1532
+ });
1533
+ this.fermer(partie);
1534
+ }
1535
+ fermer(partie, versLeBouton = false) {
1536
+ this.ouvert.set(null);
1537
+ const cible = versLeBouton ? this.identifiants.boutons[partie] : this.identifiants[partie];
1538
+ afterNextRender(() => {
1539
+ this.element.nativeElement.querySelector(`#${cible}`)?.focus();
1540
+ }, { injector: this.injecteur });
1541
+ }
1542
+ focus(options) {
1543
+ if (this.variante() === "resume" && !this.deploye()) {
1544
+ this.element.nativeElement.querySelector(`#${this.identifiants.resume}`)?.focus(options);
1545
+ return;
1546
+ }
1547
+ const partie = !this.enErreur().debut && this.enErreur().fin ? "fin" : "debut";
1548
+ this.element.nativeElement.querySelector(`#${this.identifiants[partie]}`)?.focus(options);
1549
+ }
1550
+ lirePartie(texte) {
1551
+ if (texte.trim() === "") return null;
1552
+ return lireDate(texte, this.locale()) ?? void 0;
1553
+ }
1554
+ formater(valeur) {
1555
+ return valeur === null ? "" : formaterDateSaisie(valeur, this.locale());
1556
+ }
1557
+ partieDe(erreur) {
1558
+ const partie = erreur.partie;
1559
+ if (partie === "debut" || partie === "fin") return partie;
1560
+ return erreur.kind === "plageDeDates" ? "fin" : null;
1561
+ }
1562
+ static ɵfac = i0.ɵɵngDeclareFactory({
1563
+ minVersion: "12.0.0",
1564
+ version: "22.2.2",
1565
+ ngImport: i0,
1566
+ type: StDateRange,
1567
+ deps: null,
1568
+ target: i0.ɵɵFactoryTarget.Component
1569
+ });
1570
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1571
+ minVersion: "17.0.0",
1572
+ version: "22.2.2",
1573
+ type: StDateRange,
1574
+ isStandalone: true,
1575
+ selector: "st-date-range",
1576
+ inputs: {
1577
+ value: {
1578
+ classPropertyName: "value",
1579
+ publicName: "value",
1580
+ isSignal: true,
1581
+ isRequired: false,
1582
+ transformFunction: null
1583
+ },
1584
+ dateMin: {
1585
+ classPropertyName: "dateMin",
1586
+ publicName: "dateMin",
1587
+ isSignal: true,
1588
+ isRequired: false,
1589
+ transformFunction: null
1590
+ },
1591
+ dateMax: {
1592
+ classPropertyName: "dateMax",
1593
+ publicName: "dateMax",
1594
+ isSignal: true,
1595
+ isRequired: false,
1596
+ transformFunction: null
1597
+ },
1598
+ libelleDebut: {
1599
+ classPropertyName: "libelleDebut",
1600
+ publicName: "libelleDebut",
1601
+ isSignal: true,
1602
+ isRequired: false,
1603
+ transformFunction: null
1604
+ },
1605
+ libelleFin: {
1606
+ classPropertyName: "libelleFin",
1607
+ publicName: "libelleFin",
1608
+ isSignal: true,
1609
+ isRequired: false,
1610
+ transformFunction: null
1611
+ },
1612
+ annees: {
1613
+ classPropertyName: "annees",
1614
+ publicName: "annees",
1615
+ isSignal: true,
1616
+ isRequired: false,
1617
+ transformFunction: null
1618
+ },
1619
+ raccourcis: {
1620
+ classPropertyName: "raccourcis",
1621
+ publicName: "raccourcis",
1622
+ isSignal: true,
1623
+ isRequired: false,
1624
+ transformFunction: null
1625
+ },
1626
+ dispositionDesRaccourcis: {
1627
+ classPropertyName: "dispositionDesRaccourcis",
1628
+ publicName: "dispositionDesRaccourcis",
1629
+ isSignal: true,
1630
+ isRequired: false,
1631
+ transformFunction: null
1632
+ },
1633
+ titreDesRaccourcis: {
1634
+ classPropertyName: "titreDesRaccourcis",
1635
+ publicName: "titreDesRaccourcis",
1636
+ isSignal: true,
1637
+ isRequired: false,
1638
+ transformFunction: null
1639
+ },
1640
+ variante: {
1641
+ classPropertyName: "variante",
1642
+ publicName: "variante",
1643
+ isSignal: true,
1644
+ isRequired: false,
1645
+ transformFunction: null
1646
+ },
1647
+ presentation: {
1648
+ classPropertyName: "presentation",
1649
+ publicName: "presentation",
1650
+ isSignal: true,
1651
+ isRequired: false,
1652
+ transformFunction: null
1653
+ }
1654
+ },
1655
+ outputs: { value: "valueChange" },
1656
+ host: {
1657
+ listeners: {
1658
+ "focusout": "sortie.surFocusout($event)",
1659
+ "pointerdown": "sortie.surPointeur()",
1660
+ "keydown.escape": "surEchap($event)"
1661
+ },
1662
+ classAttribute: "st-date-range"
1663
+ },
1664
+ viewQueries: [
1665
+ {
1666
+ propertyName: "calendrier",
1667
+ first: true,
1668
+ predicate: StCalendar,
1669
+ descendants: true,
1670
+ isSignal: true
1671
+ },
1672
+ {
1673
+ propertyName: "fieldset",
1674
+ first: true,
1675
+ predicate: StFieldset,
1676
+ descendants: true,
1677
+ isSignal: true
1678
+ },
1679
+ {
1680
+ propertyName: "lignes",
1681
+ predicate: ["ligne"],
1682
+ descendants: true,
1683
+ isSignal: true
1684
+ }
1685
+ ],
1686
+ usesInheritance: true,
1687
+ ngImport: i0,
1688
+ template: "<!-- Variante resume (planche 4, barre de filtres) : un bouton-champ qui dit la periode et ouvre, en\n couche flottante sous lui (D132), le panneau des champs (motif « disclosure » : aria-expanded,\n aria-controls). Nomme par l'etiquette puis par la periode : « Periode comptable 1–30 sept. 2026 ». -->\n@if (variante() === 'resume') {\n <div class=\"st-date-range__resume\" [attr.data-presentation]=\"presentation()\">\n <span class=\"st-date-range__libelle-du-resume\" [id]=\"identifiants.libelleDuResume\">\n {{ libelle() }}\n </span>\n <button\n #boutonChamp\n class=\"st-date-range__bouton-champ\"\n type=\"button\"\n [id]=\"identifiants.resume\"\n [attr.aria-labelledby]=\"identifiants.libelleDuResume + ' ' + identifiants.valeurDuResume\"\n [attr.aria-expanded]=\"deploye() ? 'true' : 'false'\"\n [attr.aria-controls]=\"identifiants.detail\"\n [attr.aria-invalid]=\"invalide().debut || invalide().fin ? 'true' : null\"\n [disabled]=\"disabled()\"\n (click)=\"basculerLeResume()\"\n >\n <st-icon class=\"st-date-range__icone-du-resume\" nom=\"calendrier\" taille=\"20\" />\n <!-- Sens du texte lu dans la periode elle-meme : « 1–30 sept. 2026 » ne se renverse pas dans\n une page de droite a gauche. -->\n <span\n class=\"st-date-range__valeur-du-resume\"\n dir=\"auto\"\n [id]=\"identifiants.valeurDuResume\"\n [attr.data-vide]=\"periodeChoisie() ? null : ''\"\n >{{ periodeLue() }}</span\n >\n </button>\n </div>\n @if (deploye()) {\n <div class=\"st-date-range__panneau\" [stCoucheAncree]=\"boutonChamp\">\n <ng-container *ngTemplateOutlet=\"champs\" />\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"champs\" />\n}\n\n<ng-template #champs>\n <st-fieldset\n [id]=\"identifiants.detail\"\n [legende]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n >\n @if (raccourcis().length > 0) {\n <st-raccourcis-de-dates\n class=\"st-date-range__raccourcis\"\n [titre]=\"titreDesRaccourcisLu()\"\n [disposition]=\"dispositionDesRaccourcis()\"\n [raccourcis]=\"raccourcisAffiches()\"\n [desactive]=\"disabled() || readonly()\"\n (choix)=\"choisirUnRaccourci($event)\"\n />\n }\n <div class=\"st-date-range__parties\">\n @for (partie of parties; track partie) {\n <div class=\"st-date-range__partie\">\n <label class=\"st-date-range__libelle\" [for]=\"identifiants[partie]\">\n {{ etiquettes()[partie] }}\n </label>\n <div #ligne class=\"st-date-range__ligne\">\n <input\n #champ\n class=\"st-date-range__champ\"\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [attr.data-libelle]=\"etiquettes()[partie]\"\n [id]=\"identifiants[partie]\"\n [value]=\"saisie()[partie]\"\n [attr.name]=\"name() ? name() + '-' + partie : null\"\n [attr.aria-invalid]=\"invalide()[partie] ? 'true' : null\"\n [attr.aria-describedby]=\"descriptions()[partie]\"\n [attr.aria-errormessage]=\"invalide()[partie] ? descriptions().erreur : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie(partie, $event)\"\n (keydown)=\"surToucheDuChamp(partie, $event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n <button\n class=\"st-date-range__bouton\"\n stIconButton\n type=\"button\"\n icone=\"calendrier\"\n [id]=\"identifiants.boutons[partie]\"\n [etiquette]=\"libelles().choisirDansLeCalendrier(etiquettes()[partie])\"\n [attr.aria-expanded]=\"ouvert() === partie\"\n [attr.aria-controls]=\"ouvert() === partie ? identifiants.calendrier : null\"\n [disabled]=\"disabled() || readonly()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"basculer(partie)\"\n ></button>\n </div>\n </div>\n }\n </div>\n <!-- Le calendrier de la partie ouverte flotte sous sa ligne, dans la couche superieure (D132) :\n rien ne descend, rien ne bouge autour, comme la liste d'un select. -->\n @if (ouvert(); as partie) {\n <div class=\"st-date-range__couche\" [stCoucheAncree]=\"ancreDe(partie)\">\n <st-calendar\n class=\"st-date-range__calendrier\"\n [id]=\"identifiants.calendrier\"\n fermable\n [selection]=\"value()[partie]\"\n [plage]=\"value()\"\n [dateMin]=\"bornes(partie).min\"\n [dateMax]=\"bornes(partie).max\"\n [annees]=\"annees()\"\n (choix)=\"choisir(partie, $event)\"\n (fermeture)=\"fermer(partie, true)\"\n />\n </div>\n }\n </st-fieldset>\n</ng-template>\n",
1689
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-date-range__parties{display:flex;flex-wrap:wrap;gap:var(--st-espacement-3) var(--st-espacement-5)}.st-date-range__libelle{display:block;margin-block-end:var(--st-espacement-1);font-weight:var(--st-graisse-semi)}.st-date-range__ligne{position:relative;inline-size:calc(var(--st-largeur-champ-sm) + var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)));max-inline-size:100%}.st-date-range__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-date-range__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-date-range__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-date-range__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-date-range__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-range__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-date-range__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-date-range__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-date-range__champ:is(input,textarea):read-only:not(:disabled),.st-date-range__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-date-range__champ{padding-inline-end:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));font-family:var(--st-police-mono);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes)}.st-date-range__bouton{position:absolute;inset-block:0;inset-inline-end:0;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto}@supports selector(:popover-open){.st-date-range__couche[popover]{position:fixed;inset:auto;padding:0;margin:0;overflow:visible;color:inherit;background:transparent;border:0}}.st-date-range__couche:popover-open{border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee);transition:opacity var(--st-duree-normale) linear,translate var(--st-duree-normale) var(--st-courbe-entrant)}@starting-style{.st-date-range__couche:popover-open{opacity:0;translate:0 calc(-1 * var(--st-deplacement-court))}}@supports not selector(:popover-open){.st-date-range__couche{margin-block-start:var(--st-espacement-3)}}@supports selector(:popover-open){.st-date-range__panneau[popover]{position:fixed;inset:auto;padding:0;margin:0;overflow:visible;color:inherit;background:transparent;border:0}}.st-date-range__panneau:popover-open{border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee);transition:opacity var(--st-duree-normale) linear,translate var(--st-duree-normale) var(--st-courbe-entrant)}@starting-style{.st-date-range__panneau:popover-open{opacity:0;translate:0 calc(-1 * var(--st-deplacement-court))}}.st-date-range__panneau,.st-date-range__panneau[popover]{box-sizing:border-box;inline-size:max-content;max-inline-size:min(40rem,100vw - 2 * var(--st-espacement-2));padding:var(--st-espacement-4);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-lg)}@supports not selector(:popover-open){.st-date-range__panneau{margin-block-start:var(--st-espacement-3)}}.st-date-range__raccourcis{margin-block-end:var(--st-espacement-4)}.st-date-range__resume{display:flex;flex-direction:column;gap:var(--st-espacement-1)}.st-date-range__libelle-du-resume{font-size:var(--st-taille-sm);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte)}.st-date-range__resume[data-presentation=micro-capitales] .st-date-range__libelle-du-resume{color:var(--st-couleur-texte-discret);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase}.st-date-range__bouton-champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-date-range__bouton-champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__bouton-champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__bouton-champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-date-range__bouton-champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-date-range__bouton-champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-date-range__bouton-champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-range__bouton-champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-date-range__bouton-champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__bouton-champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-date-range__bouton-champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-date-range__bouton-champ:is(input,textarea):read-only:not(:disabled),.st-date-range__bouton-champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-date-range__bouton-champ{display:flex;gap:var(--st-espacement-2);align-items:center;justify-content:flex-start;text-align:start;cursor:pointer}@media(hover:hover){.st-date-range__bouton-champ:hover:not(:disabled,:focus-visible){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-range__bouton-champ[aria-expanded=true]{border-color:var(--st-couleur-primaire)}.st-date-range__bouton-champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__bouton-champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed}.st-date-range__valeur-du-resume{min-inline-size:0;overflow-wrap:anywhere;font-variant-numeric:var(--st-chiffres-alignes)}.st-date-range__valeur-du-resume[data-vide]{color:var(--st-couleur-texte-attenue)}.st-date-range__icone-du-resume{flex:none;color:var(--st-couleur-texte-discret)}\n"],
1690
+ dependencies: [
1691
+ {
1692
+ kind: "component",
1693
+ type: StFieldset,
1694
+ selector: "st-fieldset",
1695
+ inputs: [
1696
+ "legende",
1697
+ "contenu",
1698
+ "disposition",
1699
+ "toutesLesErreurs",
1700
+ "choixExclusif",
1701
+ "readonly",
1702
+ "disabled",
1703
+ "hidden",
1704
+ "decritPar"
1705
+ ]
1706
+ },
1707
+ {
1708
+ kind: "component",
1709
+ type: StIconButton,
1710
+ selector: "button[stIconButton]",
1711
+ inputs: [
1712
+ "icone",
1713
+ "etiquette",
1714
+ "variante",
1715
+ "taille",
1716
+ "tailleDuGlyphe",
1717
+ "enfonce",
1718
+ "iconeEnfoncee",
1719
+ "chargement",
1720
+ "indisponible",
1721
+ "raisonIndisponible"
1722
+ ]
1723
+ },
1724
+ {
1725
+ kind: "component",
1726
+ type: StCalendar,
1727
+ selector: "st-calendar",
1728
+ inputs: [
1729
+ "selection",
1730
+ "dateMin",
1731
+ "dateMax",
1732
+ "plage",
1733
+ "rejet",
1734
+ "annees",
1735
+ "pleineLargeur",
1736
+ "fermable"
1737
+ ],
1738
+ outputs: ["choix", "fermeture"]
1739
+ },
1740
+ {
1741
+ kind: "component",
1742
+ type: StIcon,
1743
+ selector: "st-icon",
1744
+ inputs: [
1745
+ "icone",
1746
+ "nom",
1747
+ "variante",
1748
+ "sprite",
1749
+ "nomMetier",
1750
+ "taille",
1751
+ "ton",
1752
+ "etiquette",
1753
+ "miroir"
1754
+ ]
1755
+ },
1756
+ {
1757
+ kind: "component",
1758
+ type: StRaccourcisDeDates,
1759
+ selector: "st-raccourcis-de-dates",
1760
+ inputs: [
1761
+ "titre",
1762
+ "disposition",
1763
+ "raccourcis",
1764
+ "desactive"
1765
+ ],
1766
+ outputs: ["choix"]
1767
+ },
1768
+ {
1769
+ kind: "directive",
1770
+ type: StCoucheAncree,
1771
+ selector: "[stCoucheAncree]",
1772
+ inputs: ["stCoucheAncree"]
1773
+ },
1774
+ {
1775
+ kind: "directive",
1776
+ type: NgTemplateOutlet,
1777
+ selector: "[ngTemplateOutlet]",
1778
+ inputs: [
1779
+ "ngTemplateOutletContext",
1780
+ "ngTemplateOutlet",
1781
+ "ngTemplateOutletInjector"
1782
+ ]
1783
+ }
1784
+ ],
1785
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1786
+ });
1787
+ };
1788
+ i0.ɵɵngDeclareClassMetadata({
1789
+ minVersion: "12.0.0",
1790
+ version: "22.2.2",
1791
+ ngImport: i0,
1792
+ type: StDateRange,
1793
+ decorators: [{
1794
+ type: Component,
1795
+ args: [{
1796
+ selector: "st-date-range",
1797
+ changeDetection: ChangeDetectionStrategy.OnPush,
1798
+ imports: [
1799
+ StFieldset,
1800
+ StIconButton,
1801
+ StCalendar,
1802
+ StIcon,
1803
+ StRaccourcisDeDates,
1804
+ StCoucheAncree,
1805
+ NgTemplateOutlet
1806
+ ],
1807
+ host: {
1808
+ class: "st-date-range",
1809
+ "(focusout)": "sortie.surFocusout($event)",
1810
+ "(pointerdown)": "sortie.surPointeur()",
1811
+ "(keydown.escape)": "surEchap($event)"
1812
+ },
1813
+ template: "<!-- Variante resume (planche 4, barre de filtres) : un bouton-champ qui dit la periode et ouvre, en\n couche flottante sous lui (D132), le panneau des champs (motif « disclosure » : aria-expanded,\n aria-controls). Nomme par l'etiquette puis par la periode : « Periode comptable 1–30 sept. 2026 ». -->\n@if (variante() === 'resume') {\n <div class=\"st-date-range__resume\" [attr.data-presentation]=\"presentation()\">\n <span class=\"st-date-range__libelle-du-resume\" [id]=\"identifiants.libelleDuResume\">\n {{ libelle() }}\n </span>\n <button\n #boutonChamp\n class=\"st-date-range__bouton-champ\"\n type=\"button\"\n [id]=\"identifiants.resume\"\n [attr.aria-labelledby]=\"identifiants.libelleDuResume + ' ' + identifiants.valeurDuResume\"\n [attr.aria-expanded]=\"deploye() ? 'true' : 'false'\"\n [attr.aria-controls]=\"identifiants.detail\"\n [attr.aria-invalid]=\"invalide().debut || invalide().fin ? 'true' : null\"\n [disabled]=\"disabled()\"\n (click)=\"basculerLeResume()\"\n >\n <st-icon class=\"st-date-range__icone-du-resume\" nom=\"calendrier\" taille=\"20\" />\n <!-- Sens du texte lu dans la periode elle-meme : « 1–30 sept. 2026 » ne se renverse pas dans\n une page de droite a gauche. -->\n <span\n class=\"st-date-range__valeur-du-resume\"\n dir=\"auto\"\n [id]=\"identifiants.valeurDuResume\"\n [attr.data-vide]=\"periodeChoisie() ? null : ''\"\n >{{ periodeLue() }}</span\n >\n </button>\n </div>\n @if (deploye()) {\n <div class=\"st-date-range__panneau\" [stCoucheAncree]=\"boutonChamp\">\n <ng-container *ngTemplateOutlet=\"champs\" />\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"champs\" />\n}\n\n<ng-template #champs>\n <st-fieldset\n [id]=\"identifiants.detail\"\n [legende]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n >\n @if (raccourcis().length > 0) {\n <st-raccourcis-de-dates\n class=\"st-date-range__raccourcis\"\n [titre]=\"titreDesRaccourcisLu()\"\n [disposition]=\"dispositionDesRaccourcis()\"\n [raccourcis]=\"raccourcisAffiches()\"\n [desactive]=\"disabled() || readonly()\"\n (choix)=\"choisirUnRaccourci($event)\"\n />\n }\n <div class=\"st-date-range__parties\">\n @for (partie of parties; track partie) {\n <div class=\"st-date-range__partie\">\n <label class=\"st-date-range__libelle\" [for]=\"identifiants[partie]\">\n {{ etiquettes()[partie] }}\n </label>\n <div #ligne class=\"st-date-range__ligne\">\n <input\n #champ\n class=\"st-date-range__champ\"\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [attr.data-libelle]=\"etiquettes()[partie]\"\n [id]=\"identifiants[partie]\"\n [value]=\"saisie()[partie]\"\n [attr.name]=\"name() ? name() + '-' + partie : null\"\n [attr.aria-invalid]=\"invalide()[partie] ? 'true' : null\"\n [attr.aria-describedby]=\"descriptions()[partie]\"\n [attr.aria-errormessage]=\"invalide()[partie] ? descriptions().erreur : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie(partie, $event)\"\n (keydown)=\"surToucheDuChamp(partie, $event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n <button\n class=\"st-date-range__bouton\"\n stIconButton\n type=\"button\"\n icone=\"calendrier\"\n [id]=\"identifiants.boutons[partie]\"\n [etiquette]=\"libelles().choisirDansLeCalendrier(etiquettes()[partie])\"\n [attr.aria-expanded]=\"ouvert() === partie\"\n [attr.aria-controls]=\"ouvert() === partie ? identifiants.calendrier : null\"\n [disabled]=\"disabled() || readonly()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"basculer(partie)\"\n ></button>\n </div>\n </div>\n }\n </div>\n <!-- Le calendrier de la partie ouverte flotte sous sa ligne, dans la couche superieure (D132) :\n rien ne descend, rien ne bouge autour, comme la liste d'un select. -->\n @if (ouvert(); as partie) {\n <div class=\"st-date-range__couche\" [stCoucheAncree]=\"ancreDe(partie)\">\n <st-calendar\n class=\"st-date-range__calendrier\"\n [id]=\"identifiants.calendrier\"\n fermable\n [selection]=\"value()[partie]\"\n [plage]=\"value()\"\n [dateMin]=\"bornes(partie).min\"\n [dateMax]=\"bornes(partie).max\"\n [annees]=\"annees()\"\n (choix)=\"choisir(partie, $event)\"\n (fermeture)=\"fermer(partie, true)\"\n />\n </div>\n }\n </st-fieldset>\n</ng-template>\n",
1814
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-date-range__parties{display:flex;flex-wrap:wrap;gap:var(--st-espacement-3) var(--st-espacement-5)}.st-date-range__libelle{display:block;margin-block-end:var(--st-espacement-1);font-weight:var(--st-graisse-semi)}.st-date-range__ligne{position:relative;inline-size:calc(var(--st-largeur-champ-sm) + var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)));max-inline-size:100%}.st-date-range__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-date-range__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-date-range__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-date-range__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-date-range__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-range__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-date-range__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-date-range__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-date-range__champ:is(input,textarea):read-only:not(:disabled),.st-date-range__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-date-range__champ{padding-inline-end:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));font-family:var(--st-police-mono);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes)}.st-date-range__bouton{position:absolute;inset-block:0;inset-inline-end:0;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto}@supports selector(:popover-open){.st-date-range__couche[popover]{position:fixed;inset:auto;padding:0;margin:0;overflow:visible;color:inherit;background:transparent;border:0}}.st-date-range__couche:popover-open{border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee);transition:opacity var(--st-duree-normale) linear,translate var(--st-duree-normale) var(--st-courbe-entrant)}@starting-style{.st-date-range__couche:popover-open{opacity:0;translate:0 calc(-1 * var(--st-deplacement-court))}}@supports not selector(:popover-open){.st-date-range__couche{margin-block-start:var(--st-espacement-3)}}@supports selector(:popover-open){.st-date-range__panneau[popover]{position:fixed;inset:auto;padding:0;margin:0;overflow:visible;color:inherit;background:transparent;border:0}}.st-date-range__panneau:popover-open{border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee);transition:opacity var(--st-duree-normale) linear,translate var(--st-duree-normale) var(--st-courbe-entrant)}@starting-style{.st-date-range__panneau:popover-open{opacity:0;translate:0 calc(-1 * var(--st-deplacement-court))}}.st-date-range__panneau,.st-date-range__panneau[popover]{box-sizing:border-box;inline-size:max-content;max-inline-size:min(40rem,100vw - 2 * var(--st-espacement-2));padding:var(--st-espacement-4);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-lg)}@supports not selector(:popover-open){.st-date-range__panneau{margin-block-start:var(--st-espacement-3)}}.st-date-range__raccourcis{margin-block-end:var(--st-espacement-4)}.st-date-range__resume{display:flex;flex-direction:column;gap:var(--st-espacement-1)}.st-date-range__libelle-du-resume{font-size:var(--st-taille-sm);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte)}.st-date-range__resume[data-presentation=micro-capitales] .st-date-range__libelle-du-resume{color:var(--st-couleur-texte-discret);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase}.st-date-range__bouton-champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-date-range__bouton-champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__bouton-champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-date-range__bouton-champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-date-range__bouton-champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-date-range__bouton-champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-date-range__bouton-champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-range__bouton-champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-date-range__bouton-champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__bouton-champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-date-range__bouton-champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-date-range__bouton-champ:is(input,textarea):read-only:not(:disabled),.st-date-range__bouton-champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-date-range__bouton-champ{display:flex;gap:var(--st-espacement-2);align-items:center;justify-content:flex-start;text-align:start;cursor:pointer}@media(hover:hover){.st-date-range__bouton-champ:hover:not(:disabled,:focus-visible){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-date-range__bouton-champ[aria-expanded=true]{border-color:var(--st-couleur-primaire)}.st-date-range__bouton-champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-date-range__bouton-champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed}.st-date-range__valeur-du-resume{min-inline-size:0;overflow-wrap:anywhere;font-variant-numeric:var(--st-chiffres-alignes)}.st-date-range__valeur-du-resume[data-vide]{color:var(--st-couleur-texte-attenue)}.st-date-range__icone-du-resume{flex:none;color:var(--st-couleur-texte-discret)}\n"]
1815
+ }]
1816
+ }],
1817
+ propDecorators: {
1818
+ value: [{
1819
+ type: i0.Input,
1820
+ args: [{
1821
+ isSignal: true,
1822
+ alias: "value",
1823
+ required: false
1824
+ }]
1825
+ }, {
1826
+ type: i0.Output,
1827
+ args: ["valueChange"]
1828
+ }],
1829
+ dateMin: [{
1830
+ type: i0.Input,
1831
+ args: [{
1832
+ isSignal: true,
1833
+ alias: "dateMin",
1834
+ required: false
1835
+ }]
1836
+ }],
1837
+ dateMax: [{
1838
+ type: i0.Input,
1839
+ args: [{
1840
+ isSignal: true,
1841
+ alias: "dateMax",
1842
+ required: false
1843
+ }]
1844
+ }],
1845
+ libelleDebut: [{
1846
+ type: i0.Input,
1847
+ args: [{
1848
+ isSignal: true,
1849
+ alias: "libelleDebut",
1850
+ required: false
1851
+ }]
1852
+ }],
1853
+ libelleFin: [{
1854
+ type: i0.Input,
1855
+ args: [{
1856
+ isSignal: true,
1857
+ alias: "libelleFin",
1858
+ required: false
1859
+ }]
1860
+ }],
1861
+ annees: [{
1862
+ type: i0.Input,
1863
+ args: [{
1864
+ isSignal: true,
1865
+ alias: "annees",
1866
+ required: false
1867
+ }]
1868
+ }],
1869
+ raccourcis: [{
1870
+ type: i0.Input,
1871
+ args: [{
1872
+ isSignal: true,
1873
+ alias: "raccourcis",
1874
+ required: false
1875
+ }]
1876
+ }],
1877
+ dispositionDesRaccourcis: [{
1878
+ type: i0.Input,
1879
+ args: [{
1880
+ isSignal: true,
1881
+ alias: "dispositionDesRaccourcis",
1882
+ required: false
1883
+ }]
1884
+ }],
1885
+ titreDesRaccourcis: [{
1886
+ type: i0.Input,
1887
+ args: [{
1888
+ isSignal: true,
1889
+ alias: "titreDesRaccourcis",
1890
+ required: false
1891
+ }]
1892
+ }],
1893
+ variante: [{
1894
+ type: i0.Input,
1895
+ args: [{
1896
+ isSignal: true,
1897
+ alias: "variante",
1898
+ required: false
1899
+ }]
1900
+ }],
1901
+ presentation: [{
1902
+ type: i0.Input,
1903
+ args: [{
1904
+ isSignal: true,
1905
+ alias: "presentation",
1906
+ required: false
1907
+ }]
1908
+ }],
1909
+ calendrier: [{
1910
+ type: i0.ViewChild,
1911
+ args: [i0.forwardRef(() => StCalendar), { isSignal: true }]
1912
+ }],
1913
+ fieldset: [{
1914
+ type: i0.ViewChild,
1915
+ args: [i0.forwardRef(() => StFieldset), { isSignal: true }]
1916
+ }],
1917
+ lignes: [{
1918
+ type: i0.ViewChildren,
1919
+ args: ["ligne", { isSignal: true }]
1920
+ }]
1921
+ }
1922
+ });
1923
+ var StMonthField = class StMonthField extends ContratDeChamp {
1924
+ libelles = inject(ST_LIBELLES);
1925
+ locale = inject(ST_LOCALE);
1926
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
1927
+ autocomplete = input(null, ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
1928
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
1929
+ saisie = transformedValue(this.value, {
1930
+ parse: (texte) => {
1931
+ if (texte.trim() === "") return { value: null };
1932
+ const mois = lireMois(texte, this.locale());
1933
+ return mois === null ? {
1934
+ value: null,
1935
+ error: { kind: "mois" }
1936
+ } : { value: mois };
1937
+ },
1938
+ format: (valeur) => this.formater(valeur)
1939
+ });
1940
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
1941
+ aideLue = computed(() => {
1942
+ const libelles = this.libelles();
1943
+ const locale = this.locale();
1944
+ const format = libelles.formatDeDate(motifDuMoisLocal(libelles, locale), exempleDeMois(locale));
1945
+ return [this.aideEtRaisons(), format].filter((texte) => texte !== null).join(" ");
1946
+ }, ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
1947
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
1948
+ surSaisie(evenement) {
1949
+ this.saisie.set(this.texteSaisi(evenement));
1950
+ }
1951
+ aLaSortieDuChamp() {
1952
+ if (this.saisie.parseErrors().length === 0) this.saisie.set(this.formater(this.value()));
1953
+ this.quitte.set(true);
1954
+ this.touch.emit();
1955
+ }
1956
+ formater(valeur) {
1957
+ return valeur === null || !estMoisIso(valeur) ? "" : formaterMoisSaisie(valeur, this.locale());
1958
+ }
1959
+ static ɵfac = i0.ɵɵngDeclareFactory({
1960
+ minVersion: "12.0.0",
1961
+ version: "22.2.2",
1962
+ ngImport: i0,
1963
+ type: StMonthField,
1964
+ deps: null,
1965
+ target: i0.ɵɵFactoryTarget.Component
1966
+ });
1967
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1968
+ minVersion: "17.1.0",
1969
+ version: "22.2.2",
1970
+ type: StMonthField,
1971
+ isStandalone: true,
1972
+ selector: "st-month-field",
1973
+ inputs: {
1974
+ value: {
1975
+ classPropertyName: "value",
1976
+ publicName: "value",
1977
+ isSignal: true,
1978
+ isRequired: false,
1979
+ transformFunction: null
1980
+ },
1981
+ autocomplete: {
1982
+ classPropertyName: "autocomplete",
1983
+ publicName: "autocomplete",
1984
+ isSignal: true,
1985
+ isRequired: false,
1986
+ transformFunction: null
1987
+ }
1988
+ },
1989
+ outputs: { value: "valueChange" },
1990
+ host: { classAttribute: "st-month-field" },
1991
+ usesInheritance: true,
1992
+ ngImport: i0,
1993
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <input\n #champ\n class=\"st-month-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n</st-form-field>\n",
1994
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-month-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-month-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-month-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-month-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-month-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-month-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-month-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-month-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-month-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-month-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-month-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-month-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-month-field__champ:is(input,textarea):read-only:not(:disabled),.st-month-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-month-field__champ{max-inline-size:var(--st-largeur-champ-sm);font-variant-numeric:var(--st-chiffres-alignes)}\n"],
1995
+ dependencies: [{
1996
+ kind: "component",
1997
+ type: StFormField,
1998
+ selector: "st-form-field",
1999
+ inputs: [
2000
+ "libelle",
2001
+ "complement",
2002
+ "disposition",
2003
+ "presentation",
2004
+ "libelleMasque",
2005
+ "descriptionsDuControle"
2006
+ ]
2007
+ }, {
2008
+ kind: "directive",
2009
+ type: StControleDeChamp,
2010
+ selector: "[stControleDeChamp]"
2011
+ }],
2012
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2013
+ });
2014
+ };
2015
+ i0.ɵɵngDeclareClassMetadata({
2016
+ minVersion: "12.0.0",
2017
+ version: "22.2.2",
2018
+ ngImport: i0,
2019
+ type: StMonthField,
2020
+ decorators: [{
2021
+ type: Component,
2022
+ args: [{
2023
+ selector: "st-month-field",
2024
+ changeDetection: ChangeDetectionStrategy.OnPush,
2025
+ imports: [StFormField, StControleDeChamp],
2026
+ host: { class: "st-month-field" },
2027
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <input\n #champ\n class=\"st-month-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n</st-form-field>\n",
2028
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-month-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-month-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-month-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-month-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-month-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-month-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-month-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-month-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-month-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-month-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-month-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-month-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-month-field__champ:is(input,textarea):read-only:not(:disabled),.st-month-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-month-field__champ{max-inline-size:var(--st-largeur-champ-sm);font-variant-numeric:var(--st-chiffres-alignes)}\n"]
2029
+ }]
2030
+ }],
2031
+ propDecorators: {
2032
+ value: [{
2033
+ type: i0.Input,
2034
+ args: [{
2035
+ isSignal: true,
2036
+ alias: "value",
2037
+ required: false
2038
+ }]
2039
+ }, {
2040
+ type: i0.Output,
2041
+ args: ["valueChange"]
2042
+ }],
2043
+ autocomplete: [{
2044
+ type: i0.Input,
2045
+ args: [{
2046
+ isSignal: true,
2047
+ alias: "autocomplete",
2048
+ required: false
2049
+ }]
2050
+ }]
2051
+ }
2052
+ });
2053
+ const SEPARATEUR = "|";
2054
+ const LONGUEURS = {
2055
+ jour: 2,
2056
+ mois: 2,
2057
+ annee: 4
2058
+ };
2059
+ const NAISSANCE = {
2060
+ jour: "bday-day",
2061
+ mois: "bday-month",
2062
+ annee: "bday-year"
2063
+ };
2064
+ const DATE_D_EXEMPLE = "1990-03-27";
2065
+ function decouper(texte) {
2066
+ const [jour = "", mois = "", annee = ""] = texte.split(SEPARATEUR);
2067
+ return {
2068
+ jour: jour.trim(),
2069
+ mois: mois.trim(),
2070
+ annee: annee.trim()
2071
+ };
2072
+ }
2073
+ function sansZeroDeTete(partie) {
2074
+ return partie.replace(/^0+(?=\d)/, "");
2075
+ }
2076
+ var StMemorableDate = class StMemorableDate extends ContratDeChamp {
2077
+ libellesDuTronc = inject(ST_LIBELLES);
2078
+ locale = inject(ST_LOCALE);
2079
+ catalogue = catalogueDesFormulaires();
2080
+ libelles = computed(() => this.catalogue().libelles, ...ngDevMode ? [{ debugName: "libelles" }] : /* istanbul ignore next */ []);
2081
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
2082
+ naissance = input(false, {
2083
+ ...ngDevMode ? { debugName: "naissance" } : /* istanbul ignore next */ {},
2084
+ transform: booleanAttribute
2085
+ });
2086
+ cases = viewChildren("partie", ...ngDevMode ? [{ debugName: "cases" }] : /* istanbul ignore next */ []);
2087
+ identifiant = inject(StIdentifiants).prochain("st-memorable-date");
2088
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
2089
+ saisie = transformedValue(this.value, {
2090
+ parse: (texte) => this.lire(texte),
2091
+ format: (valeur) => this.formater(valeur)
2092
+ });
2093
+ parties = computed(() => decouper(this.saisie()), ...ngDevMode ? [{ debugName: "parties" }] : /* istanbul ignore next */ []);
2094
+ ordre = computed(() => ordreDeDate(this.locale()).map((partie) => ({
2095
+ partie,
2096
+ libelle: this.libelleDe(partie),
2097
+ longueur: LONGUEURS[partie],
2098
+ autocomplete: this.naissance() ? NAISSANCE[partie] : "off"
2099
+ })), ...ngDevMode ? [{ debugName: "ordre" }] : /* istanbul ignore next */ []);
2100
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
2101
+ aideLue = computed(() => {
2102
+ const exemple = this.exemple();
2103
+ return [this.aideEtRaisons(), this.libelles().exempleDeDateMemorable(exemple)].filter((texte) => texte !== null).join(" ");
2104
+ }, ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
2105
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
2106
+ enErreur = computed(() => (this.touched() || this.quitte()) && this.erreursAffichees().length > 0, ...ngDevMode ? [{ debugName: "enErreur" }] : /* istanbul ignore next */ []);
2107
+ focus(options) {
2108
+ this.cases()[0]?.nativeElement.focus(options);
2109
+ }
2110
+ surSaisie(partie, evenement) {
2111
+ const parties = {
2112
+ ...this.parties(),
2113
+ [partie]: this.texteSaisi(evenement)
2114
+ };
2115
+ this.saisie.set([
2116
+ parties.jour,
2117
+ parties.mois,
2118
+ parties.annee
2119
+ ].join(SEPARATEUR));
2120
+ }
2121
+ aLaSortie(evenement) {
2122
+ const suivant = evenement.relatedTarget;
2123
+ const groupe = evenement.currentTarget;
2124
+ if (suivant instanceof Node && groupe instanceof Node && groupe.contains(suivant)) return;
2125
+ this.quitte.set(true);
2126
+ this.touch.emit();
2127
+ }
2128
+ libelleDe(partie) {
2129
+ if (partie === "annee") return this.libellesDuTronc().annee;
2130
+ return partie === "jour" ? this.libelles().jour : this.libelles().mois;
2131
+ }
2132
+ exemple() {
2133
+ const [annee = "", mois = "", jour = ""] = DATE_D_EXEMPLE.split("-");
2134
+ const valeurs = {
2135
+ jour: sansZeroDeTete(jour),
2136
+ mois: sansZeroDeTete(mois),
2137
+ annee
2138
+ };
2139
+ return ordreDeDate(this.locale()).map((partie) => valeurs[partie]).join(" ");
2140
+ }
2141
+ lire(texte) {
2142
+ const parties = decouper(texte);
2143
+ const manque = ordreDeDate(this.locale()).filter((partie) => parties[partie] === "");
2144
+ if (manque.length === 3) return { value: null };
2145
+ const libelles = this.libelles();
2146
+ if (manque.length > 0) return {
2147
+ value: null,
2148
+ error: {
2149
+ kind: "dateIncomplete",
2150
+ message: libelles.dateMemorableIncomplete(manque)
2151
+ }
2152
+ };
2153
+ const { jour, mois, annee } = parties;
2154
+ const iso = jour.length <= LONGUEURS.jour && mois.length <= LONGUEURS.mois && annee.length === LONGUEURS.annee ? lireDate(`${annee}-${mois.padStart(2, "0")}-${jour.padStart(2, "0")}`, this.locale()) : null;
2155
+ return iso === null ? {
2156
+ value: null,
2157
+ error: {
2158
+ kind: "date",
2159
+ message: libelles.dateMemorableInexistante(this.exemple())
2160
+ }
2161
+ } : { value: iso };
2162
+ }
2163
+ formater(valeur) {
2164
+ if (valeur === null || !estDateIso(valeur)) return "";
2165
+ const [annee = "", mois = "", jour = ""] = valeur.split("-");
2166
+ return [
2167
+ sansZeroDeTete(jour),
2168
+ sansZeroDeTete(mois),
2169
+ annee
2170
+ ].join(SEPARATEUR);
2171
+ }
2172
+ static ɵfac = i0.ɵɵngDeclareFactory({
2173
+ minVersion: "12.0.0",
2174
+ version: "22.2.2",
2175
+ ngImport: i0,
2176
+ type: StMemorableDate,
2177
+ deps: null,
2178
+ target: i0.ɵɵFactoryTarget.Component
2179
+ });
2180
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2181
+ minVersion: "17.0.0",
2182
+ version: "22.2.2",
2183
+ type: StMemorableDate,
2184
+ isStandalone: true,
2185
+ selector: "st-memorable-date",
2186
+ inputs: {
2187
+ value: {
2188
+ classPropertyName: "value",
2189
+ publicName: "value",
2190
+ isSignal: true,
2191
+ isRequired: false,
2192
+ transformFunction: null
2193
+ },
2194
+ naissance: {
2195
+ classPropertyName: "naissance",
2196
+ publicName: "naissance",
2197
+ isSignal: true,
2198
+ isRequired: false,
2199
+ transformFunction: null
2200
+ }
2201
+ },
2202
+ outputs: { value: "valueChange" },
2203
+ host: {
2204
+ listeners: { "focusout": "aLaSortie($event)" },
2205
+ classAttribute: "st-memorable-date"
2206
+ },
2207
+ viewQueries: [{
2208
+ propertyName: "cases",
2209
+ predicate: ["partie"],
2210
+ descendants: true,
2211
+ isSignal: true
2212
+ }],
2213
+ usesInheritance: true,
2214
+ ngImport: i0,
2215
+ template: "<st-fieldset\n [legende]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [toutesLesErreurs]=\"false\"\n [obligatoire]=\"required()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n disposition=\"en-ligne\"\n>\n <div class=\"st-memorable-date__parties\">\n @for (case of ordre(); track case.partie) {\n <div class=\"st-memorable-date__partie\" [attr.data-partie]=\"case.partie\">\n <label class=\"st-memorable-date__libelle\" [for]=\"identifiant + '-' + case.partie\">\n {{ case.libelle }}\n </label>\n <input\n #partie\n class=\"st-memorable-date__champ\"\n [class.st-memorable-date__champ--annee]=\"case.partie === 'annee'\"\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [id]=\"identifiant + '-' + case.partie\"\n [attr.maxlength]=\"case.longueur\"\n [attr.autocomplete]=\"case.autocomplete\"\n [attr.name]=\"name() ? name() + '-' + case.partie : null\"\n [attr.aria-invalid]=\"enErreur() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [value]=\"parties()[case.partie]\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie(case.partie, $event)\"\n />\n </div>\n }\n </div>\n</st-fieldset>\n",
2216
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-memorable-date__parties{display:flex;flex-wrap:wrap;gap:var(--st-espacement-3)}.st-memorable-date__partie{display:flex;flex-direction:column;gap:var(--st-espacement-1)}.st-memorable-date__libelle{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-normal);color:var(--st-couleur-texte-discret)}.st-memorable-date__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-memorable-date__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-memorable-date__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-memorable-date__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-memorable-date__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-memorable-date__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-memorable-date__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-memorable-date__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-memorable-date__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-memorable-date__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-memorable-date__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-memorable-date__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-memorable-date__champ:is(input,textarea):read-only:not(:disabled),.st-memorable-date__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-memorable-date__champ{inline-size:calc(3ch + 2 * var(--st-espacement-3-5) + 2 * var(--st-epaisseur-fine));font-variant-numeric:var(--st-chiffres-alignes)}.st-memorable-date__champ--annee{inline-size:calc(5ch + 2 * var(--st-espacement-3-5) + 2 * var(--st-epaisseur-fine))}\n"],
2217
+ dependencies: [{
2218
+ kind: "component",
2219
+ type: StFieldset,
2220
+ selector: "st-fieldset",
2221
+ inputs: [
2222
+ "legende",
2223
+ "contenu",
2224
+ "disposition",
2225
+ "toutesLesErreurs",
2226
+ "choixExclusif",
2227
+ "readonly",
2228
+ "disabled",
2229
+ "hidden",
2230
+ "decritPar"
2231
+ ]
2232
+ }],
2233
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2234
+ });
2235
+ };
2236
+ i0.ɵɵngDeclareClassMetadata({
2237
+ minVersion: "12.0.0",
2238
+ version: "22.2.2",
2239
+ ngImport: i0,
2240
+ type: StMemorableDate,
2241
+ decorators: [{
2242
+ type: Component,
2243
+ args: [{
2244
+ selector: "st-memorable-date",
2245
+ changeDetection: ChangeDetectionStrategy.OnPush,
2246
+ imports: [StFieldset],
2247
+ host: {
2248
+ class: "st-memorable-date",
2249
+ "(focusout)": "aLaSortie($event)"
2250
+ },
2251
+ template: "<st-fieldset\n [legende]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [toutesLesErreurs]=\"false\"\n [obligatoire]=\"required()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n disposition=\"en-ligne\"\n>\n <div class=\"st-memorable-date__parties\">\n @for (case of ordre(); track case.partie) {\n <div class=\"st-memorable-date__partie\" [attr.data-partie]=\"case.partie\">\n <label class=\"st-memorable-date__libelle\" [for]=\"identifiant + '-' + case.partie\">\n {{ case.libelle }}\n </label>\n <input\n #partie\n class=\"st-memorable-date__champ\"\n [class.st-memorable-date__champ--annee]=\"case.partie === 'annee'\"\n type=\"text\"\n inputmode=\"numeric\"\n spellcheck=\"false\"\n [id]=\"identifiant + '-' + case.partie\"\n [attr.maxlength]=\"case.longueur\"\n [attr.autocomplete]=\"case.autocomplete\"\n [attr.name]=\"name() ? name() + '-' + case.partie : null\"\n [attr.aria-invalid]=\"enErreur() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [value]=\"parties()[case.partie]\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie(case.partie, $event)\"\n />\n </div>\n }\n </div>\n</st-fieldset>\n",
2252
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-memorable-date__parties{display:flex;flex-wrap:wrap;gap:var(--st-espacement-3)}.st-memorable-date__partie{display:flex;flex-direction:column;gap:var(--st-espacement-1)}.st-memorable-date__libelle{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-normal);color:var(--st-couleur-texte-discret)}.st-memorable-date__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-memorable-date__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-memorable-date__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-memorable-date__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-memorable-date__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-memorable-date__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-memorable-date__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-memorable-date__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-memorable-date__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-memorable-date__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-memorable-date__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-memorable-date__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-memorable-date__champ:is(input,textarea):read-only:not(:disabled),.st-memorable-date__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-memorable-date__champ{inline-size:calc(3ch + 2 * var(--st-espacement-3-5) + 2 * var(--st-epaisseur-fine));font-variant-numeric:var(--st-chiffres-alignes)}.st-memorable-date__champ--annee{inline-size:calc(5ch + 2 * var(--st-espacement-3-5) + 2 * var(--st-epaisseur-fine))}\n"]
2253
+ }]
2254
+ }],
2255
+ propDecorators: {
2256
+ value: [{
2257
+ type: i0.Input,
2258
+ args: [{
2259
+ isSignal: true,
2260
+ alias: "value",
2261
+ required: false
2262
+ }]
2263
+ }, {
2264
+ type: i0.Output,
2265
+ args: ["valueChange"]
2266
+ }],
2267
+ naissance: [{
2268
+ type: i0.Input,
2269
+ args: [{
2270
+ isSignal: true,
2271
+ alias: "naissance",
2272
+ required: false
2273
+ }]
2274
+ }],
2275
+ cases: [{
2276
+ type: i0.ViewChildren,
2277
+ args: ["partie", { isSignal: true }]
2278
+ }]
2279
+ }
2280
+ });
2281
+ const borneLisible = (heure) => heure !== null && estHeureIso(heure) ? heure : null;
2282
+ function texteDesBornes(libelles, locale, borneMin, borneMax) {
2283
+ const min = borneLisible(borneMin);
2284
+ const max = borneLisible(borneMax);
2285
+ const ecrire = (heure) => formaterHeureSaisie(heure, locale);
2286
+ if (min !== null && max !== null) return libelles.entreHeures(ecrire(min), ecrire(max));
2287
+ if (min !== null) return libelles.heureTropTot(ecrire(min));
2288
+ if (max !== null) return libelles.heureTropTard(ecrire(max));
2289
+ return null;
2290
+ }
2291
+ var StTimeField = class StTimeField extends ContratDeChamp {
2292
+ libelles = inject(ST_LIBELLES);
2293
+ locale = inject(ST_LOCALE);
2294
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
2295
+ heureMin = input(null, ...ngDevMode ? [{ debugName: "heureMin" }] : /* istanbul ignore next */ []);
2296
+ heureMax = input(null, ...ngDevMode ? [{ debugName: "heureMax" }] : /* istanbul ignore next */ []);
2297
+ secondes = input(false, {
2298
+ ...ngDevMode ? { debugName: "secondes" } : /* istanbul ignore next */ {},
2299
+ transform: booleanAttribute
2300
+ });
2301
+ fuseau = input(null, ...ngDevMode ? [{ debugName: "fuseau" }] : /* istanbul ignore next */ []);
2302
+ autocomplete = input(null, ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
2303
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
2304
+ saisie = transformedValue(this.value, {
2305
+ parse: (texte) => {
2306
+ if (texte.trim() === "") return { value: null };
2307
+ const secondes = this.secondes();
2308
+ const heure = lireHeure(texte, this.locale(), { secondes });
2309
+ return heure === null ? {
2310
+ value: null,
2311
+ error: {
2312
+ kind: "heure",
2313
+ secondes
2314
+ }
2315
+ } : { value: heure };
2316
+ },
2317
+ format: (valeur) => this.formater(valeur)
2318
+ });
2319
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
2320
+ clavier = computed(() => heureSurDouze(this.locale()) ? "text" : "numeric", ...ngDevMode ? [{ debugName: "clavier" }] : /* istanbul ignore next */ []);
2321
+ instantDuNomDeFuseau = Date.now();
2322
+ aideLue = computed(() => {
2323
+ const libelles = this.libelles();
2324
+ const locale = this.locale();
2325
+ const secondes = this.secondes();
2326
+ const format = libelles.formatDeDate(motifDHeureLocal(libelles, locale, secondes), exempleDHeure(locale, secondes));
2327
+ const bornes = texteDesBornes(libelles, locale, this.heureMin(), this.heureMax());
2328
+ const fuseau = this.fuseau();
2329
+ const zone = fuseau === null ? null : libelles.fuseauHoraire(nomDuFuseau(fuseau, locale, this.instantDuNomDeFuseau));
2330
+ return [
2331
+ this.aideEtRaisons(),
2332
+ format,
2333
+ bornes,
2334
+ zone
2335
+ ].filter((texte) => texte !== null).join(" ");
2336
+ }, ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
2337
+ constructor() {
2338
+ super();
2339
+ effect(() => {
2340
+ if (!(typeof ngDevMode === "undefined" || !!ngDevMode)) return;
2341
+ for (const borne of [this.heureMin(), this.heureMax()]) {
2342
+ if (borne === null || estHeureIso(borne)) continue;
2343
+ console.warn(`[st-time-field] Borne illisible ("${borne}") : elle n'est pas dite dans l'aide. Transmettre une heure HH:MM.`);
2344
+ }
2345
+ });
2346
+ }
2347
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
2348
+ surSaisie(evenement) {
2349
+ this.saisie.set(this.texteSaisi(evenement));
2350
+ }
2351
+ aLaSortieDuChamp() {
2352
+ if (this.saisie.parseErrors().length === 0) this.saisie.set(this.formater(this.value()));
2353
+ this.quitte.set(true);
2354
+ this.touch.emit();
2355
+ }
2356
+ formater(valeur) {
2357
+ return valeur === null || !estHeureIso(valeur) ? "" : formaterHeureSaisie(valeur, this.locale());
2358
+ }
2359
+ static ɵfac = i0.ɵɵngDeclareFactory({
2360
+ minVersion: "12.0.0",
2361
+ version: "22.2.2",
2362
+ ngImport: i0,
2363
+ type: StTimeField,
2364
+ deps: [],
2365
+ target: i0.ɵɵFactoryTarget.Component
2366
+ });
2367
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2368
+ minVersion: "17.1.0",
2369
+ version: "22.2.2",
2370
+ type: StTimeField,
2371
+ isStandalone: true,
2372
+ selector: "st-time-field",
2373
+ inputs: {
2374
+ value: {
2375
+ classPropertyName: "value",
2376
+ publicName: "value",
2377
+ isSignal: true,
2378
+ isRequired: false,
2379
+ transformFunction: null
2380
+ },
2381
+ heureMin: {
2382
+ classPropertyName: "heureMin",
2383
+ publicName: "heureMin",
2384
+ isSignal: true,
2385
+ isRequired: false,
2386
+ transformFunction: null
2387
+ },
2388
+ heureMax: {
2389
+ classPropertyName: "heureMax",
2390
+ publicName: "heureMax",
2391
+ isSignal: true,
2392
+ isRequired: false,
2393
+ transformFunction: null
2394
+ },
2395
+ secondes: {
2396
+ classPropertyName: "secondes",
2397
+ publicName: "secondes",
2398
+ isSignal: true,
2399
+ isRequired: false,
2400
+ transformFunction: null
2401
+ },
2402
+ fuseau: {
2403
+ classPropertyName: "fuseau",
2404
+ publicName: "fuseau",
2405
+ isSignal: true,
2406
+ isRequired: false,
2407
+ transformFunction: null
2408
+ },
2409
+ autocomplete: {
2410
+ classPropertyName: "autocomplete",
2411
+ publicName: "autocomplete",
2412
+ isSignal: true,
2413
+ isRequired: false,
2414
+ transformFunction: null
2415
+ }
2416
+ },
2417
+ outputs: { value: "valueChange" },
2418
+ host: { classAttribute: "st-time-field" },
2419
+ usesInheritance: true,
2420
+ ngImport: i0,
2421
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <input\n #champ\n class=\"st-time-field__champ\"\n stControleDeChamp\n type=\"text\"\n spellcheck=\"false\"\n [attr.inputmode]=\"clavier()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n</st-form-field>\n",
2422
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-time-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-time-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-time-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-time-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-time-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-time-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-time-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-time-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-time-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-time-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-time-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-time-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-time-field__champ:is(input,textarea):read-only:not(:disabled),.st-time-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-time-field__champ{max-inline-size:var(--st-largeur-champ-sm);font-variant-numeric:var(--st-chiffres-alignes)}\n"],
2423
+ dependencies: [{
2424
+ kind: "component",
2425
+ type: StFormField,
2426
+ selector: "st-form-field",
2427
+ inputs: [
2428
+ "libelle",
2429
+ "complement",
2430
+ "disposition",
2431
+ "presentation",
2432
+ "libelleMasque",
2433
+ "descriptionsDuControle"
2434
+ ]
2435
+ }, {
2436
+ kind: "directive",
2437
+ type: StControleDeChamp,
2438
+ selector: "[stControleDeChamp]"
2439
+ }],
2440
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2441
+ });
2442
+ };
2443
+ i0.ɵɵngDeclareClassMetadata({
2444
+ minVersion: "12.0.0",
2445
+ version: "22.2.2",
2446
+ ngImport: i0,
2447
+ type: StTimeField,
2448
+ decorators: [{
2449
+ type: Component,
2450
+ args: [{
2451
+ selector: "st-time-field",
2452
+ changeDetection: ChangeDetectionStrategy.OnPush,
2453
+ imports: [StFormField, StControleDeChamp],
2454
+ host: { class: "st-time-field" },
2455
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <input\n #champ\n class=\"st-time-field__champ\"\n stControleDeChamp\n type=\"text\"\n spellcheck=\"false\"\n [attr.inputmode]=\"clavier()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortieDuChamp()\"\n />\n</st-form-field>\n",
2456
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-time-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-time-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-time-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-time-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-time-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-time-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-time-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-time-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-time-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-time-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-time-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-time-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-time-field__champ:is(input,textarea):read-only:not(:disabled),.st-time-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-time-field__champ{max-inline-size:var(--st-largeur-champ-sm);font-variant-numeric:var(--st-chiffres-alignes)}\n"]
2457
+ }]
2458
+ }],
2459
+ ctorParameters: () => [],
2460
+ propDecorators: {
2461
+ value: [{
2462
+ type: i0.Input,
2463
+ args: [{
2464
+ isSignal: true,
2465
+ alias: "value",
2466
+ required: false
2467
+ }]
2468
+ }, {
2469
+ type: i0.Output,
2470
+ args: ["valueChange"]
2471
+ }],
2472
+ heureMin: [{
2473
+ type: i0.Input,
2474
+ args: [{
2475
+ isSignal: true,
2476
+ alias: "heureMin",
2477
+ required: false
2478
+ }]
2479
+ }],
2480
+ heureMax: [{
2481
+ type: i0.Input,
2482
+ args: [{
2483
+ isSignal: true,
2484
+ alias: "heureMax",
2485
+ required: false
2486
+ }]
2487
+ }],
2488
+ secondes: [{
2489
+ type: i0.Input,
2490
+ args: [{
2491
+ isSignal: true,
2492
+ alias: "secondes",
2493
+ required: false
2494
+ }]
2495
+ }],
2496
+ fuseau: [{
2497
+ type: i0.Input,
2498
+ args: [{
2499
+ isSignal: true,
2500
+ alias: "fuseau",
2501
+ required: false
2502
+ }]
2503
+ }],
2504
+ autocomplete: [{
2505
+ type: i0.Input,
2506
+ args: [{
2507
+ isSignal: true,
2508
+ alias: "autocomplete",
2509
+ required: false
2510
+ }]
2511
+ }]
2512
+ }
2513
+ });
2514
+ function pasOuNull(valeur) {
2515
+ if (valeur === null || valeur === void 0 || valeur === "") return null;
2516
+ const pas = numberAttribute(valeur, NaN);
2517
+ return Number.isFinite(pas) && pas > 0 ? pas : null;
2518
+ }
2519
+ function decimalesDuPas(pas) {
2520
+ const texte = String(pas);
2521
+ const exposant = /e-(\d+)$/.exec(texte);
2522
+ if (exposant !== null) return Number(exposant[1]);
2523
+ return (texte.split(".")[1] ?? "").length;
2524
+ }
2525
+ function bornerEtArrondir(valeur, decimales, bas, haut) {
2526
+ let resultat = Number(valeur.toFixed(decimales));
2527
+ if (bas !== void 0 && resultat < bas) resultat = bas;
2528
+ if (haut !== void 0 && resultat > haut) resultat = haut;
2529
+ return resultat;
2530
+ }
2531
+ const TOUCHES_DU_PAS = {
2532
+ ArrowUp: 1,
2533
+ ArrowDown: -1,
2534
+ PageUp: 10,
2535
+ PageDown: -10
2536
+ };
2537
+ var StNumberField = class StNumberField extends ContratDeChampABornes {
2538
+ libelles = inject(ST_LIBELLES);
2539
+ locale = inject(ST_LOCALE);
2540
+ idUnite = `${inject(StIdentifiants).prochain("st-number-field")}-unite`;
2541
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
2542
+ decimales = input(0, {
2543
+ ...ngDevMode ? { debugName: "decimales" } : /* istanbul ignore next */ {},
2544
+ transform: numberAttribute
2545
+ });
2546
+ pas = input(null, {
2547
+ ...ngDevMode ? { debugName: "pas" } : /* istanbul ignore next */ {},
2548
+ transform: pasOuNull
2549
+ });
2550
+ unite = input(null, ...ngDevMode ? [{ debugName: "unite" }] : /* istanbul ignore next */ []);
2551
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
2552
+ averti = false;
2553
+ decimalesAdmises = computed(() => {
2554
+ const decimales = Math.max(0, Math.trunc(this.decimales()));
2555
+ const pas = this.pas();
2556
+ if ((typeof ngDevMode === "undefined" || !!ngDevMode) && !this.averti && pas !== null && decimalesDuPas(pas) > decimales) {
2557
+ this.averti = true;
2558
+ console.warn(`[st-number-field] pas ${String(pas)} plus fin que ${String(decimales)} decimale(s).`);
2559
+ }
2560
+ return decimales;
2561
+ }, ...ngDevMode ? [{ debugName: "decimalesAdmises" }] : /* istanbul ignore next */ []);
2562
+ saisie = transformedValue(this.value, {
2563
+ parse: (texte) => {
2564
+ if (texte.trim() === "") return { value: null };
2565
+ const decimales = this.decimalesAdmises();
2566
+ const lecture = lireNombre(texte, this.locale(), decimales);
2567
+ if (lecture.lu) return { value: lecture.valeur };
2568
+ if (lecture.raison === "illisible") return {
2569
+ value: null,
2570
+ error: {
2571
+ kind: "nombre",
2572
+ decimales
2573
+ }
2574
+ };
2575
+ return {
2576
+ value: null,
2577
+ error: decimales === 0 ? { kind: "entier" } : {
2578
+ kind: "decimales",
2579
+ decimales
2580
+ }
2581
+ };
2582
+ },
2583
+ format: (valeur) => this.formater(valeur)
2584
+ });
2585
+ lectureInvalide = computed(() => this.saisie.parseErrors().length > 0, ...ngDevMode ? [{ debugName: "lectureInvalide" }] : /* istanbul ignore next */ []);
2586
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
2587
+ modifiable = computed(() => !this.disabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "modifiable" }] : /* istanbul ignore next */ []);
2588
+ peutDiminuer = computed(() => {
2589
+ const valeur = this.value();
2590
+ const bas = this.min();
2591
+ return this.modifiable() && (valeur === null || bas === void 0 || valeur > bas);
2592
+ }, ...ngDevMode ? [{ debugName: "peutDiminuer" }] : /* istanbul ignore next */ []);
2593
+ peutAugmenter = computed(() => {
2594
+ const valeur = this.value();
2595
+ const haut = this.max();
2596
+ return this.modifiable() && (valeur === null || haut === void 0 || valeur < haut);
2597
+ }, ...ngDevMode ? [{ debugName: "peutAugmenter" }] : /* istanbul ignore next */ []);
2598
+ valeurLue = computed(() => {
2599
+ const valeur = this.value();
2600
+ if (valeur === null) return null;
2601
+ const texte = formaterNombre(valeur, this.locale(), this.decimalesAdmises());
2602
+ const unite = this.unite()?.trim() ?? "";
2603
+ return unite === "" ? texte : `${texte} ${unite}`;
2604
+ }, ...ngDevMode ? [{ debugName: "valeurLue" }] : /* istanbul ignore next */ []);
2605
+ uniteLue = computed(() => {
2606
+ const unite = this.unite()?.trim() ?? "";
2607
+ return unite === "" ? null : this.libelles().uniteDuNombre(unite);
2608
+ }, ...ngDevMode ? [{ debugName: "uniteLue" }] : /* istanbul ignore next */ []);
2609
+ descriptionsDuControle = computed(() => this.uniteLue() === null ? [] : [this.idUnite], ...ngDevMode ? [{ debugName: "descriptionsDuControle" }] : /* istanbul ignore next */ []);
2610
+ surPressionDuCadre(evenement) {
2611
+ const cible = evenement.target;
2612
+ if (evenement.button !== 0 || !(cible instanceof Element)) return;
2613
+ if (cible.closest("input, button") !== null) return;
2614
+ evenement.preventDefault();
2615
+ this.focus();
2616
+ }
2617
+ surSaisie(evenement) {
2618
+ this.saisie.set(this.texteSaisi(evenement));
2619
+ }
2620
+ surTouche(evenement) {
2621
+ if (this.pas() === null || !this.modifiable() || evenement.altKey || evenement.ctrlKey) return;
2622
+ const pas = TOUCHES_DU_PAS[evenement.key];
2623
+ if (pas !== void 0) {
2624
+ evenement.preventDefault();
2625
+ this.avancer(pas);
2626
+ return;
2627
+ }
2628
+ const borne = evenement.key === "Home" ? this.min() : evenement.key === "End" ? this.max() : void 0;
2629
+ if (borne !== void 0) {
2630
+ evenement.preventDefault();
2631
+ this.poser(borne);
2632
+ }
2633
+ }
2634
+ avancer(nombreDePas) {
2635
+ const pas = this.pas();
2636
+ if (pas === null || !this.modifiable()) return;
2637
+ const actuelle = this.value();
2638
+ this.poser(actuelle === null ? this.min() ?? 0 : actuelle + nombreDePas * pas);
2639
+ }
2640
+ aLaSortie() {
2641
+ if (this.saisie.parseErrors().length === 0) this.saisie.set(this.formater(this.value()));
2642
+ this.quitte.set(true);
2643
+ this.touch.emit();
2644
+ }
2645
+ poser(valeur) {
2646
+ const bornee = bornerEtArrondir(valeur, this.decimalesAdmises(), this.min(), this.max());
2647
+ this.saisie.set(this.formater(bornee));
2648
+ }
2649
+ formater(valeur) {
2650
+ if (valeur === null) return "";
2651
+ return formaterNombre(valeur, untracked(this.locale), untracked(this.decimalesAdmises)).replace(/\s/g, String.fromCharCode(160));
2652
+ }
2653
+ static ɵfac = i0.ɵɵngDeclareFactory({
2654
+ minVersion: "12.0.0",
2655
+ version: "22.2.2",
2656
+ ngImport: i0,
2657
+ type: StNumberField,
2658
+ deps: null,
2659
+ target: i0.ɵɵFactoryTarget.Component
2660
+ });
2661
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2662
+ minVersion: "17.0.0",
2663
+ version: "22.2.2",
2664
+ type: StNumberField,
2665
+ isStandalone: true,
2666
+ selector: "st-number-field",
2667
+ inputs: {
2668
+ value: {
2669
+ classPropertyName: "value",
2670
+ publicName: "value",
2671
+ isSignal: true,
2672
+ isRequired: false,
2673
+ transformFunction: null
2674
+ },
2675
+ decimales: {
2676
+ classPropertyName: "decimales",
2677
+ publicName: "decimales",
2678
+ isSignal: true,
2679
+ isRequired: false,
2680
+ transformFunction: null
2681
+ },
2682
+ pas: {
2683
+ classPropertyName: "pas",
2684
+ publicName: "pas",
2685
+ isSignal: true,
2686
+ isRequired: false,
2687
+ transformFunction: null
2688
+ },
2689
+ unite: {
2690
+ classPropertyName: "unite",
2691
+ publicName: "unite",
2692
+ isSignal: true,
2693
+ isRequired: false,
2694
+ transformFunction: null
2695
+ }
2696
+ },
2697
+ outputs: { value: "valueChange" },
2698
+ host: {
2699
+ properties: { "attr.data-pas": "pas() === null ? null : \"\"" },
2700
+ classAttribute: "st-number-field"
2701
+ },
2702
+ usesInheritance: true,
2703
+ ngImport: i0,
2704
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le cadre est UN champ : un clic sur l'unite donne le focus a la zone de frappe. Avec un pas,\n les boutons - et + sont dans le cadre, a sa fin ; ils ne prennent pas le focus (les fleches\n font le meme travail au clavier). -->\n <div class=\"st-number-field__cadre\" (mousedown)=\"surPressionDuCadre($event)\">\n <input\n #champ\n class=\"st-number-field__champ\"\n stControleDeChamp\n type=\"text\"\n spellcheck=\"false\"\n dir=\"ltr\"\n [attr.inputmode]=\"decimalesAdmises() > 0 ? 'decimal' : 'numeric'\"\n [attr.role]=\"pas() === null ? null : 'spinbutton'\"\n [attr.aria-valuenow]=\"pas() === null ? null : value()\"\n [attr.aria-valuemin]=\"pas() === null ? null : (min() ?? null)\"\n [attr.aria-valuemax]=\"pas() === null ? null : (max() ?? null)\"\n [attr.aria-valuetext]=\"pas() === null ? null : valeurLue()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (keydown)=\"surTouche($event)\"\n (blur)=\"aLaSortie()\"\n />\n @if (unite(); as texte) {\n <span class=\"st-number-field__unite\" aria-hidden=\"true\">{{ texte }}</span>\n }\n @if (pas() !== null) {\n <span class=\"st-number-field__boutons\">\n <button\n stIconButton\n type=\"button\"\n icone=\"moins\"\n tabindex=\"-1\"\n [etiquette]=\"libelles().diminuer(libelle())\"\n [disabled]=\"!peutDiminuer()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"avancer(-1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"plus\"\n tabindex=\"-1\"\n [etiquette]=\"libelles().augmenter(libelle())\"\n [disabled]=\"!peutAugmenter()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"avancer(1)\"\n ></button>\n </span>\n }\n </div>\n</st-form-field>\n@if (uniteLue(); as texte) {\n <span class=\"st-vh\" [id]=\"idUnite\">{{ texte }}</span>\n}\n",
2705
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;max-inline-size:var(--st-largeur-champ-md)}:host([data-pas]){max-inline-size:var(--st-largeur-champ-lg)}.st-number-field__cadre:has(>.st-number-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-number-field__cadre{box-sizing:border-box;block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}.st-number-field__cadre>.st-number-field__champ{margin-block:calc(-1 * var(--st-epaisseur-fine));background:transparent;border:0;border-radius:0;box-shadow:none;outline:none}@media(hover:hover){.st-number-field__cadre:hover:not(:has(>.st-number-field__champ:is(:disabled,:focus,[aria-invalid=true]))){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-number-field__cadre:has(>.st-number-field__champ:focus-visible){border-color:var(--st-couleur-primaire)}.st-number-field__cadre:has(>.st-number-field__champ[aria-invalid=true]){border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__cadre:has(>.st-number-field__champ[aria-invalid=true]):has(>.st-number-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__cadre:has(>.st-number-field__champ:disabled){color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-number-field__cadre:has(>.st-number-field__champ:is(input,textarea):read-only:not(:disabled)),.st-number-field__cadre:has(>.st-number-field__champ[aria-readonly=true]:not(:disabled)){background:var(--st-couleur-surface-enfoncee)}.st-number-field__cadre{display:flex;align-items:stretch;overflow:hidden}.st-number-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-number-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-number-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-number-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-number-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-number-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-number-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-number-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-number-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-number-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-number-field__champ:is(input,textarea):read-only:not(:disabled),.st-number-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-number-field__champ{flex:1 1 auto;min-inline-size:0;font-variant-numeric:var(--st-chiffres-alignes);unicode-bidi:isolate}.st-number-field__cadre:has(>.st-number-field__unite)>.st-number-field__champ{padding-inline-end:var(--st-espacement-2)}.st-number-field__unite{display:flex;flex:none;align-items:center;padding-inline-end:var(--st-espacement-3-5);font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret);cursor:text}.st-number-field__boutons{display:flex;flex:none}.st-number-field__boutons>button{align-self:stretch;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto;border-inline-start:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:0}.st-number-field__cadre:has(>.st-number-field__champ:disabled)>.st-number-field__unite{color:var(--st-couleur-texte-desactive);cursor:inherit}@media(forced-colors:active){.st-number-field__boutons>button{border-inline-start-color:ButtonText}}\n"],
2706
+ dependencies: [
2707
+ {
2708
+ kind: "component",
2709
+ type: StFormField,
2710
+ selector: "st-form-field",
2711
+ inputs: [
2712
+ "libelle",
2713
+ "complement",
2714
+ "disposition",
2715
+ "presentation",
2716
+ "libelleMasque",
2717
+ "descriptionsDuControle"
2718
+ ]
2719
+ },
2720
+ {
2721
+ kind: "directive",
2722
+ type: StControleDeChamp,
2723
+ selector: "[stControleDeChamp]"
2724
+ },
2725
+ {
2726
+ kind: "component",
2727
+ type: StIconButton,
2728
+ selector: "button[stIconButton]",
2729
+ inputs: [
2730
+ "icone",
2731
+ "etiquette",
2732
+ "variante",
2733
+ "taille",
2734
+ "tailleDuGlyphe",
2735
+ "enfonce",
2736
+ "iconeEnfoncee",
2737
+ "chargement",
2738
+ "indisponible",
2739
+ "raisonIndisponible"
2740
+ ]
2741
+ }
2742
+ ],
2743
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2744
+ });
2745
+ };
2746
+ i0.ɵɵngDeclareClassMetadata({
2747
+ minVersion: "12.0.0",
2748
+ version: "22.2.2",
2749
+ ngImport: i0,
2750
+ type: StNumberField,
2751
+ decorators: [{
2752
+ type: Component,
2753
+ args: [{
2754
+ selector: "st-number-field",
2755
+ changeDetection: ChangeDetectionStrategy.OnPush,
2756
+ imports: [
2757
+ StFormField,
2758
+ StControleDeChamp,
2759
+ StIconButton
2760
+ ],
2761
+ host: {
2762
+ class: "st-number-field",
2763
+ "[attr.data-pas]": "pas() === null ? null : \"\""
2764
+ },
2765
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le cadre est UN champ : un clic sur l'unite donne le focus a la zone de frappe. Avec un pas,\n les boutons - et + sont dans le cadre, a sa fin ; ils ne prennent pas le focus (les fleches\n font le meme travail au clavier). -->\n <div class=\"st-number-field__cadre\" (mousedown)=\"surPressionDuCadre($event)\">\n <input\n #champ\n class=\"st-number-field__champ\"\n stControleDeChamp\n type=\"text\"\n spellcheck=\"false\"\n dir=\"ltr\"\n [attr.inputmode]=\"decimalesAdmises() > 0 ? 'decimal' : 'numeric'\"\n [attr.role]=\"pas() === null ? null : 'spinbutton'\"\n [attr.aria-valuenow]=\"pas() === null ? null : value()\"\n [attr.aria-valuemin]=\"pas() === null ? null : (min() ?? null)\"\n [attr.aria-valuemax]=\"pas() === null ? null : (max() ?? null)\"\n [attr.aria-valuetext]=\"pas() === null ? null : valeurLue()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (keydown)=\"surTouche($event)\"\n (blur)=\"aLaSortie()\"\n />\n @if (unite(); as texte) {\n <span class=\"st-number-field__unite\" aria-hidden=\"true\">{{ texte }}</span>\n }\n @if (pas() !== null) {\n <span class=\"st-number-field__boutons\">\n <button\n stIconButton\n type=\"button\"\n icone=\"moins\"\n tabindex=\"-1\"\n [etiquette]=\"libelles().diminuer(libelle())\"\n [disabled]=\"!peutDiminuer()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"avancer(-1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"plus\"\n tabindex=\"-1\"\n [etiquette]=\"libelles().augmenter(libelle())\"\n [disabled]=\"!peutAugmenter()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"avancer(1)\"\n ></button>\n </span>\n }\n </div>\n</st-form-field>\n@if (uniteLue(); as texte) {\n <span class=\"st-vh\" [id]=\"idUnite\">{{ texte }}</span>\n}\n",
2766
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;max-inline-size:var(--st-largeur-champ-md)}:host([data-pas]){max-inline-size:var(--st-largeur-champ-lg)}.st-number-field__cadre:has(>.st-number-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-number-field__cadre{box-sizing:border-box;block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}.st-number-field__cadre>.st-number-field__champ{margin-block:calc(-1 * var(--st-epaisseur-fine));background:transparent;border:0;border-radius:0;box-shadow:none;outline:none}@media(hover:hover){.st-number-field__cadre:hover:not(:has(>.st-number-field__champ:is(:disabled,:focus,[aria-invalid=true]))){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-number-field__cadre:has(>.st-number-field__champ:focus-visible){border-color:var(--st-couleur-primaire)}.st-number-field__cadre:has(>.st-number-field__champ[aria-invalid=true]){border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__cadre:has(>.st-number-field__champ[aria-invalid=true]):has(>.st-number-field__champ:focus-visible){outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__cadre:has(>.st-number-field__champ:disabled){color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-number-field__cadre:has(>.st-number-field__champ:is(input,textarea):read-only:not(:disabled)),.st-number-field__cadre:has(>.st-number-field__champ[aria-readonly=true]:not(:disabled)){background:var(--st-couleur-surface-enfoncee)}.st-number-field__cadre{display:flex;align-items:stretch;overflow:hidden}.st-number-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-number-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-number-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-number-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-number-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-number-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-number-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-number-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-number-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-number-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-number-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-number-field__champ:is(input,textarea):read-only:not(:disabled),.st-number-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-number-field__champ{flex:1 1 auto;min-inline-size:0;font-variant-numeric:var(--st-chiffres-alignes);unicode-bidi:isolate}.st-number-field__cadre:has(>.st-number-field__unite)>.st-number-field__champ{padding-inline-end:var(--st-espacement-2)}.st-number-field__unite{display:flex;flex:none;align-items:center;padding-inline-end:var(--st-espacement-3-5);font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret);cursor:text}.st-number-field__boutons{display:flex;flex:none}.st-number-field__boutons>button{align-self:stretch;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto;border-inline-start:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:0}.st-number-field__cadre:has(>.st-number-field__champ:disabled)>.st-number-field__unite{color:var(--st-couleur-texte-desactive);cursor:inherit}@media(forced-colors:active){.st-number-field__boutons>button{border-inline-start-color:ButtonText}}\n"]
2767
+ }]
2768
+ }],
2769
+ propDecorators: {
2770
+ value: [{
2771
+ type: i0.Input,
2772
+ args: [{
2773
+ isSignal: true,
2774
+ alias: "value",
2775
+ required: false
2776
+ }]
2777
+ }, {
2778
+ type: i0.Output,
2779
+ args: ["valueChange"]
2780
+ }],
2781
+ decimales: [{
2782
+ type: i0.Input,
2783
+ args: [{
2784
+ isSignal: true,
2785
+ alias: "decimales",
2786
+ required: false
2787
+ }]
2788
+ }],
2789
+ pas: [{
2790
+ type: i0.Input,
2791
+ args: [{
2792
+ isSignal: true,
2793
+ alias: "pas",
2794
+ required: false
2795
+ }]
2796
+ }],
2797
+ unite: [{
2798
+ type: i0.Input,
2799
+ args: [{
2800
+ isSignal: true,
2801
+ alias: "unite",
2802
+ required: false
2803
+ }]
2804
+ }]
2805
+ }
2806
+ });
2807
+ const INSECABLE = String.fromCharCode(160);
2808
+ var StRangeSlider = class StRangeSlider extends ContratDeChampABornes {
2809
+ libelles = inject(ST_LIBELLES);
2810
+ locale = inject(ST_LOCALE);
2811
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
2812
+ pas = input(1, {
2813
+ ...ngDevMode ? { debugName: "pas" } : /* istanbul ignore next */ {},
2814
+ transform: numberAttribute
2815
+ });
2816
+ unite = input(null, ...ngDevMode ? [{ debugName: "unite" }] : /* istanbul ignore next */ []);
2817
+ avecChamp = input(false, {
2818
+ ...ngDevMode ? { debugName: "avecChamp" } : /* istanbul ignore next */ {},
2819
+ transform: booleanAttribute
2820
+ });
2821
+ formaterValeur = input(null, ...ngDevMode ? [{ debugName: "formaterValeur" }] : /* istanbul ignore next */ []);
2822
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
2823
+ enveloppe = viewChild.required(StFormField, ...ngDevMode ? [{ debugName: "enveloppe" }] : /* istanbul ignore next */ []);
2824
+ idDuCurseur = computed(() => this.enveloppe().identifiants.controle, ...ngDevMode ? [{ debugName: "idDuCurseur" }] : /* istanbul ignore next */ []);
2825
+ bas = computed(() => this.min() ?? 0, ...ngDevMode ? [{ debugName: "bas" }] : /* istanbul ignore next */ []);
2826
+ haut = computed(() => Math.max(this.max() ?? 100, this.bas()), ...ngDevMode ? [{ debugName: "haut" }] : /* istanbul ignore next */ []);
2827
+ pasSur = computed(() => this.pas() > 0 ? this.pas() : 1, ...ngDevMode ? [{ debugName: "pasSur" }] : /* istanbul ignore next */ []);
2828
+ decimales = computed(() => decimalesDuPas(this.pasSur()), ...ngDevMode ? [{ debugName: "decimales" }] : /* istanbul ignore next */ []);
2829
+ partRemplie = computed(() => {
2830
+ const valeur = this.value();
2831
+ const etendue = this.haut() - this.bas();
2832
+ if (valeur === null || etendue <= 0) return "0%";
2833
+ const part = Math.min(100, Math.max(0, (valeur - this.bas()) / etendue * 100));
2834
+ return `${String(part)}%`;
2835
+ }, ...ngDevMode ? [{ debugName: "partRemplie" }] : /* istanbul ignore next */ []);
2836
+ valeurLue = computed(() => {
2837
+ const valeur = this.value();
2838
+ return valeur === null ? "" : this.ecrire(valeur);
2839
+ }, ...ngDevMode ? [{ debugName: "valeurLue" }] : /* istanbul ignore next */ []);
2840
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), []), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
2841
+ ecrire(valeur) {
2842
+ const formater = this.formaterValeur();
2843
+ if (formater !== null) return formater(valeur);
2844
+ const texte = formaterNombre(valeur, this.locale(), this.decimales());
2845
+ const unite = this.unite()?.trim() ?? "";
2846
+ return unite === "" ? texte : `${texte}${INSECABLE}${unite}`;
2847
+ }
2848
+ surCurseur(evenement) {
2849
+ const curseur = evenement.target;
2850
+ if (this.readonly()) {
2851
+ curseur.value = String(this.value() ?? this.bas());
2852
+ return;
2853
+ }
2854
+ this.value.set(bornerEtArrondir(Number(curseur.value), this.decimales(), this.bas(), this.haut()));
2855
+ }
2856
+ depuisLeChamp(valeur) {
2857
+ this.value.set(valeur);
2858
+ }
2859
+ aLaSortie() {
2860
+ this.quitte.set(true);
2861
+ this.touch.emit();
2862
+ }
2863
+ static ɵfac = i0.ɵɵngDeclareFactory({
2864
+ minVersion: "12.0.0",
2865
+ version: "22.2.2",
2866
+ ngImport: i0,
2867
+ type: StRangeSlider,
2868
+ deps: null,
2869
+ target: i0.ɵɵFactoryTarget.Component
2870
+ });
2871
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2872
+ minVersion: "17.0.0",
2873
+ version: "22.2.2",
2874
+ type: StRangeSlider,
2875
+ isStandalone: true,
2876
+ selector: "st-range-slider",
2877
+ inputs: {
2878
+ value: {
2879
+ classPropertyName: "value",
2880
+ publicName: "value",
2881
+ isSignal: true,
2882
+ isRequired: false,
2883
+ transformFunction: null
2884
+ },
2885
+ pas: {
2886
+ classPropertyName: "pas",
2887
+ publicName: "pas",
2888
+ isSignal: true,
2889
+ isRequired: false,
2890
+ transformFunction: null
2891
+ },
2892
+ unite: {
2893
+ classPropertyName: "unite",
2894
+ publicName: "unite",
2895
+ isSignal: true,
2896
+ isRequired: false,
2897
+ transformFunction: null
2898
+ },
2899
+ avecChamp: {
2900
+ classPropertyName: "avecChamp",
2901
+ publicName: "avecChamp",
2902
+ isSignal: true,
2903
+ isRequired: false,
2904
+ transformFunction: null
2905
+ },
2906
+ formaterValeur: {
2907
+ classPropertyName: "formaterValeur",
2908
+ publicName: "formaterValeur",
2909
+ isSignal: true,
2910
+ isRequired: false,
2911
+ transformFunction: null
2912
+ }
2913
+ },
2914
+ outputs: { value: "valueChange" },
2915
+ host: { classAttribute: "st-range-slider" },
2916
+ viewQueries: [{
2917
+ propertyName: "enveloppe",
2918
+ first: true,
2919
+ predicate: StFormField,
2920
+ descendants: true,
2921
+ isSignal: true
2922
+ }],
2923
+ usesInheritance: true,
2924
+ ngImport: i0,
2925
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <div class=\"st-range-slider__ligne\">\n <input\n #champ\n class=\"st-range-slider__curseur\"\n stControleDeChamp\n type=\"range\"\n [min]=\"bas()\"\n [max]=\"haut()\"\n [step]=\"pasSur()\"\n [value]=\"value() ?? bas()\"\n [style.--_part]=\"partRemplie()\"\n [attr.aria-valuetext]=\"valeurLue() || null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n (input)=\"surCurseur($event)\"\n (blur)=\"aLaSortie()\"\n />\n <!-- La valeur, toujours lisible ; relie au curseur, sans region vivante (le curseur la dit). -->\n <output class=\"st-range-slider__valeur\" dir=\"auto\" aria-live=\"off\" [attr.for]=\"idDuCurseur()\">{{\n valeurLue()\n }}</output>\n </div>\n <!-- Le sens du texte vient de la valeur : « 1 500 € » ne se renverse pas en ecriture inverse. -->\n <div class=\"st-range-slider__bornes\" aria-hidden=\"true\">\n <span dir=\"auto\">{{ ecrire(bas()) }}</span>\n <span dir=\"auto\">{{ ecrire(haut()) }}</span>\n </div>\n</st-form-field>\n@if (avecChamp()) {\n <st-number-field\n class=\"st-range-slider__champ\"\n [libelle]=\"libelles().champJumeau(libelle())\"\n [decimales]=\"decimales()\"\n [unite]=\"unite()\"\n [min]=\"bas()\"\n [max]=\"haut()\"\n [value]=\"value()\"\n (valueChange)=\"depuisLeChamp($event)\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (touch)=\"aLaSortie()\"\n />\n}\n",
2926
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-range-slider__ligne{display:flex;gap:var(--st-espacement-3);align-items:center}.st-range-slider__curseur:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-range-slider__curseur{--_piste: var(--st-couleur-surface-active);--_rempli: var(--st-couleur-primaire);flex:1 1 auto;min-inline-size:0;block-size:var(--st-cible-tactile-min);margin:0;color:var(--st-couleur-texte);cursor:pointer;background:transparent;border-radius:var(--st-rayon-sm);appearance:none}.st-range-slider__curseur::-webkit-slider-runnable-track{block-size:var(--st-espacement-1);background:linear-gradient(to right,var(--_rempli) var(--_part, 0%),var(--_piste) var(--_part, 0%));border-radius:var(--st-rayon-pleine)}.st-range-slider__curseur::-moz-range-track{block-size:var(--st-espacement-1);background:var(--_piste);border-radius:var(--st-rayon-pleine)}.st-range-slider__curseur::-moz-range-progress{block-size:var(--st-espacement-1);background:var(--_rempli);border-radius:var(--st-rayon-pleine)}.st-range-slider__curseur::-webkit-slider-thumb{inline-size:var(--st-espacement-5);block-size:var(--st-espacement-5);margin-block-start:calc((var(--st-espacement-1) - var(--st-espacement-5)) / 2);background:var(--_rempli);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-surface);border-radius:var(--st-rayon-pleine);box-shadow:var(--st-ombre-repos);appearance:none}.st-range-slider__curseur::-moz-range-thumb{inline-size:var(--st-espacement-5);block-size:var(--st-espacement-5);background:var(--_rempli);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-surface);border-radius:var(--st-rayon-pleine);box-shadow:var(--st-ombre-repos)}.st-range-slider__curseur:disabled{--_rempli: var(--st-couleur-texte-desactive);cursor:not-allowed}.st-range-slider__curseur:dir(rtl)::-webkit-slider-runnable-track{background:linear-gradient(to left,var(--_rempli) var(--_part, 0%),var(--_piste) var(--_part, 0%))}@media(forced-colors:active){.st-range-slider__curseur::-webkit-slider-runnable-track{background:Canvas;border:var(--st-epaisseur-fine) solid CanvasText}.st-range-slider__curseur::-webkit-slider-thumb{background:Highlight;border-color:Canvas}}.st-range-slider__valeur{flex:none;min-inline-size:4ch;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);text-align:end}.st-range-slider__bornes{display:flex;justify-content:space-between;font-size:var(--st-taille-xs);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-range-slider__champ{margin-block-start:var(--st-espacement-3)}\n"],
2927
+ dependencies: [
2928
+ {
2929
+ kind: "component",
2930
+ type: StFormField,
2931
+ selector: "st-form-field",
2932
+ inputs: [
2933
+ "libelle",
2934
+ "complement",
2935
+ "disposition",
2936
+ "presentation",
2937
+ "libelleMasque",
2938
+ "descriptionsDuControle"
2939
+ ]
2940
+ },
2941
+ {
2942
+ kind: "directive",
2943
+ type: StControleDeChamp,
2944
+ selector: "[stControleDeChamp]"
2945
+ },
2946
+ {
2947
+ kind: "component",
2948
+ type: StNumberField,
2949
+ selector: "st-number-field",
2950
+ inputs: [
2951
+ "value",
2952
+ "decimales",
2953
+ "pas",
2954
+ "unite"
2955
+ ],
2956
+ outputs: ["valueChange"]
2957
+ }
2958
+ ],
2959
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2960
+ });
2961
+ };
2962
+ i0.ɵɵngDeclareClassMetadata({
2963
+ minVersion: "12.0.0",
2964
+ version: "22.2.2",
2965
+ ngImport: i0,
2966
+ type: StRangeSlider,
2967
+ decorators: [{
2968
+ type: Component,
2969
+ args: [{
2970
+ selector: "st-range-slider",
2971
+ changeDetection: ChangeDetectionStrategy.OnPush,
2972
+ imports: [
2973
+ StFormField,
2974
+ StControleDeChamp,
2975
+ StNumberField
2976
+ ],
2977
+ host: { class: "st-range-slider" },
2978
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <div class=\"st-range-slider__ligne\">\n <input\n #champ\n class=\"st-range-slider__curseur\"\n stControleDeChamp\n type=\"range\"\n [min]=\"bas()\"\n [max]=\"haut()\"\n [step]=\"pasSur()\"\n [value]=\"value() ?? bas()\"\n [style.--_part]=\"partRemplie()\"\n [attr.aria-valuetext]=\"valeurLue() || null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n (input)=\"surCurseur($event)\"\n (blur)=\"aLaSortie()\"\n />\n <!-- La valeur, toujours lisible ; relie au curseur, sans region vivante (le curseur la dit). -->\n <output class=\"st-range-slider__valeur\" dir=\"auto\" aria-live=\"off\" [attr.for]=\"idDuCurseur()\">{{\n valeurLue()\n }}</output>\n </div>\n <!-- Le sens du texte vient de la valeur : « 1 500 € » ne se renverse pas en ecriture inverse. -->\n <div class=\"st-range-slider__bornes\" aria-hidden=\"true\">\n <span dir=\"auto\">{{ ecrire(bas()) }}</span>\n <span dir=\"auto\">{{ ecrire(haut()) }}</span>\n </div>\n</st-form-field>\n@if (avecChamp()) {\n <st-number-field\n class=\"st-range-slider__champ\"\n [libelle]=\"libelles().champJumeau(libelle())\"\n [decimales]=\"decimales()\"\n [unite]=\"unite()\"\n [min]=\"bas()\"\n [max]=\"haut()\"\n [value]=\"value()\"\n (valueChange)=\"depuisLeChamp($event)\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (touch)=\"aLaSortie()\"\n />\n}\n",
2979
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-range-slider__ligne{display:flex;gap:var(--st-espacement-3);align-items:center}.st-range-slider__curseur:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-range-slider__curseur{--_piste: var(--st-couleur-surface-active);--_rempli: var(--st-couleur-primaire);flex:1 1 auto;min-inline-size:0;block-size:var(--st-cible-tactile-min);margin:0;color:var(--st-couleur-texte);cursor:pointer;background:transparent;border-radius:var(--st-rayon-sm);appearance:none}.st-range-slider__curseur::-webkit-slider-runnable-track{block-size:var(--st-espacement-1);background:linear-gradient(to right,var(--_rempli) var(--_part, 0%),var(--_piste) var(--_part, 0%));border-radius:var(--st-rayon-pleine)}.st-range-slider__curseur::-moz-range-track{block-size:var(--st-espacement-1);background:var(--_piste);border-radius:var(--st-rayon-pleine)}.st-range-slider__curseur::-moz-range-progress{block-size:var(--st-espacement-1);background:var(--_rempli);border-radius:var(--st-rayon-pleine)}.st-range-slider__curseur::-webkit-slider-thumb{inline-size:var(--st-espacement-5);block-size:var(--st-espacement-5);margin-block-start:calc((var(--st-espacement-1) - var(--st-espacement-5)) / 2);background:var(--_rempli);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-surface);border-radius:var(--st-rayon-pleine);box-shadow:var(--st-ombre-repos);appearance:none}.st-range-slider__curseur::-moz-range-thumb{inline-size:var(--st-espacement-5);block-size:var(--st-espacement-5);background:var(--_rempli);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-surface);border-radius:var(--st-rayon-pleine);box-shadow:var(--st-ombre-repos)}.st-range-slider__curseur:disabled{--_rempli: var(--st-couleur-texte-desactive);cursor:not-allowed}.st-range-slider__curseur:dir(rtl)::-webkit-slider-runnable-track{background:linear-gradient(to left,var(--_rempli) var(--_part, 0%),var(--_piste) var(--_part, 0%))}@media(forced-colors:active){.st-range-slider__curseur::-webkit-slider-runnable-track{background:Canvas;border:var(--st-epaisseur-fine) solid CanvasText}.st-range-slider__curseur::-webkit-slider-thumb{background:Highlight;border-color:Canvas}}.st-range-slider__valeur{flex:none;min-inline-size:4ch;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);text-align:end}.st-range-slider__bornes{display:flex;justify-content:space-between;font-size:var(--st-taille-xs);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-range-slider__champ{margin-block-start:var(--st-espacement-3)}\n"]
2980
+ }]
2981
+ }],
2982
+ propDecorators: {
2983
+ value: [{
2984
+ type: i0.Input,
2985
+ args: [{
2986
+ isSignal: true,
2987
+ alias: "value",
2988
+ required: false
2989
+ }]
2990
+ }, {
2991
+ type: i0.Output,
2992
+ args: ["valueChange"]
2993
+ }],
2994
+ pas: [{
2995
+ type: i0.Input,
2996
+ args: [{
2997
+ isSignal: true,
2998
+ alias: "pas",
2999
+ required: false
3000
+ }]
3001
+ }],
3002
+ unite: [{
3003
+ type: i0.Input,
3004
+ args: [{
3005
+ isSignal: true,
3006
+ alias: "unite",
3007
+ required: false
3008
+ }]
3009
+ }],
3010
+ avecChamp: [{
3011
+ type: i0.Input,
3012
+ args: [{
3013
+ isSignal: true,
3014
+ alias: "avecChamp",
3015
+ required: false
3016
+ }]
3017
+ }],
3018
+ formaterValeur: [{
3019
+ type: i0.Input,
3020
+ args: [{
3021
+ isSignal: true,
3022
+ alias: "formaterValeur",
3023
+ required: false
3024
+ }]
3025
+ }],
3026
+ enveloppe: [{
3027
+ type: i0.ViewChild,
3028
+ args: [i0.forwardRef(() => StFormField), { isSignal: true }]
3029
+ }]
3030
+ }
3031
+ });
3032
+ var StPhoneField = class StPhoneField extends ControleDeSaisie {
3033
+ libelles = inject(ST_LIBELLES);
3034
+ autocomplete = input("tel", ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
3035
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
3036
+ aideLue = computed(() => this.aideEtRaisons() ?? this.libelles().exempleDeTelephone, ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
3037
+ saisie = transformedValue(this.value, {
3038
+ parse: (texte) => {
3039
+ const forme = erreurTelephone(texte);
3040
+ return forme === null ? { value: normaliserTelephone(texte) } : {
3041
+ value: normaliserTelephone(texte),
3042
+ error: { kind: forme.kind }
3043
+ };
3044
+ },
3045
+ format: (valeur) => valeur
3046
+ });
3047
+ erreursAffichees = computed(() => fusionnerErreurs(this.errors(), this.saisie.parseErrors()), ...ngDevMode ? [{ debugName: "erreursAffichees" }] : /* istanbul ignore next */ []);
3048
+ afficherErreurs = computed(() => this.touched() || this.quitte(), ...ngDevMode ? [{ debugName: "afficherErreurs" }] : /* istanbul ignore next */ []);
3049
+ surSaisie(evenement) {
3050
+ this.saisie.set(this.texteSaisi(evenement));
3051
+ }
3052
+ aLaSortie() {
3053
+ this.quitte.set(true);
3054
+ this.touch.emit();
3055
+ }
3056
+ static ɵfac = i0.ɵɵngDeclareFactory({
3057
+ minVersion: "12.0.0",
3058
+ version: "22.2.2",
3059
+ ngImport: i0,
3060
+ type: StPhoneField,
3061
+ deps: null,
3062
+ target: i0.ɵɵFactoryTarget.Component
3063
+ });
3064
+ static ɵcmp = i0.ɵɵngDeclareComponent({
3065
+ minVersion: "17.1.0",
3066
+ version: "22.2.2",
3067
+ type: StPhoneField,
3068
+ isStandalone: true,
3069
+ selector: "st-phone-field",
3070
+ inputs: { autocomplete: {
3071
+ classPropertyName: "autocomplete",
3072
+ publicName: "autocomplete",
3073
+ isSignal: true,
3074
+ isRequired: false,
3075
+ transformFunction: null
3076
+ } },
3077
+ host: { classAttribute: "st-phone-field" },
3078
+ usesInheritance: true,
3079
+ ngImport: i0,
3080
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"afficherErreurs()\"\n [obligatoire]=\"required()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <input\n #champ\n class=\"st-phone-field__champ\"\n stControleDeChamp\n type=\"tel\"\n dir=\"ltr\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortie()\"\n />\n</st-form-field>\n",
3081
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-phone-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-phone-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-phone-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-phone-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-phone-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-phone-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-phone-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-phone-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-phone-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-phone-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-phone-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-phone-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-phone-field__champ:is(input,textarea):read-only:not(:disabled),.st-phone-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-phone-field__champ{max-inline-size:var(--st-largeur-champ-lg);font-variant-numeric:var(--st-chiffres-references);text-align:start;unicode-bidi:isolate}\n"],
3082
+ dependencies: [{
3083
+ kind: "component",
3084
+ type: StFormField,
3085
+ selector: "st-form-field",
3086
+ inputs: [
3087
+ "libelle",
3088
+ "complement",
3089
+ "disposition",
3090
+ "presentation",
3091
+ "libelleMasque",
3092
+ "descriptionsDuControle"
3093
+ ]
3094
+ }, {
3095
+ kind: "directive",
3096
+ type: StControleDeChamp,
3097
+ selector: "[stControleDeChamp]"
3098
+ }],
3099
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
3100
+ });
3101
+ };
3102
+ i0.ɵɵngDeclareClassMetadata({
3103
+ minVersion: "12.0.0",
3104
+ version: "22.2.2",
3105
+ ngImport: i0,
3106
+ type: StPhoneField,
3107
+ decorators: [{
3108
+ type: Component,
3109
+ args: [{
3110
+ selector: "st-phone-field",
3111
+ changeDetection: ChangeDetectionStrategy.OnPush,
3112
+ imports: [StFormField, StControleDeChamp],
3113
+ host: { class: "st-phone-field" },
3114
+ template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"erreursAffichees()\"\n [afficherErreurs]=\"afficherErreurs()\"\n [obligatoire]=\"required()\"\n>\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <input\n #champ\n class=\"st-phone-field__champ\"\n stControleDeChamp\n type=\"tel\"\n dir=\"ltr\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"saisie()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"aLaSortie()\"\n />\n</st-form-field>\n",
3115
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-phone-field__champ:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-phone-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-phone-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-phone-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( (var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2 - var(--st-epaisseur-fine) ) ) );padding-block:var(--_remplissage-bloc);padding-inline:var(--st-espacement-3-5);font-family:inherit;font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-commande-rayon, var(--st-rayon-md))}@media(pointer:coarse){.st-phone-field__champ{--_remplissage-bloc: max( var(--st-espacement-demi), min( var(--st-espacement-2), calc( ( var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var( --st-interligne-md ) ) / 2 - var(--st-epaisseur-fine) ) ) );font-size:var(--st-taille-md);line-height:var(--st-interligne-md)}}.st-phone-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-phone-field__champ:hover:not(:disabled,:focus,[aria-invalid=true]){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-phone-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-phone-field__champ[aria-invalid=true]{border-color:var(--st-couleur-erreur);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-phone-field__champ[aria-invalid=true]:focus-visible{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus),inset 0 0 0 var(--st-epaisseur-fine) var(--st-couleur-erreur)}.st-phone-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-phone-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-phone-field__champ:is(input,textarea):read-only:not(:disabled),.st-phone-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-phone-field__champ{max-inline-size:var(--st-largeur-champ-lg);font-variant-numeric:var(--st-chiffres-references);text-align:start;unicode-bidi:isolate}\n"]
3116
+ }]
3117
+ }],
3118
+ propDecorators: { autocomplete: [{
3119
+ type: i0.Input,
3120
+ args: [{
3121
+ isSignal: true,
3122
+ alias: "autocomplete",
3123
+ required: false
3124
+ }]
3125
+ }] }
3126
+ });
3127
+ const PAR_DEFAUT = {
3128
+ frequence: "mensuelle",
3129
+ intervalle: 1,
3130
+ jourDuMois: null,
3131
+ debut: null,
3132
+ fin: "jamais",
3133
+ jusquau: null,
3134
+ nombre: null
3135
+ };
3136
+ const FREQUENCES = [
3137
+ "quotidienne",
3138
+ "hebdomadaire",
3139
+ "mensuelle",
3140
+ "annuelle"
3141
+ ];
3142
+ function brouillonDe(recurrence) {
3143
+ const jusquau = recurrence.jusquau ?? null;
3144
+ const nombre = recurrence.nombre ?? null;
3145
+ return {
3146
+ frequence: recurrence.frequence,
3147
+ intervalle: recurrence.intervalle ?? 1,
3148
+ jourDuMois: recurrence.jourDuMois ?? null,
3149
+ debut: recurrence.debut,
3150
+ fin: jusquau !== null ? "date" : nombre !== null ? "nombre" : "jamais",
3151
+ jusquau,
3152
+ nombre
3153
+ };
3154
+ }
3155
+ function recurrenceDe(brouillon) {
3156
+ if (brouillon.debut === null) return null;
3157
+ const mensuelle = brouillon.frequence === "mensuelle" || brouillon.frequence === "annuelle";
3158
+ return {
3159
+ frequence: brouillon.frequence,
3160
+ intervalle: Math.max(1, brouillon.intervalle ?? 1),
3161
+ debut: brouillon.debut,
3162
+ ...mensuelle && brouillon.jourDuMois !== null ? { jourDuMois: brouillon.jourDuMois } : {},
3163
+ ...brouillon.fin === "date" && brouillon.jusquau !== null ? { jusquau: brouillon.jusquau } : {},
3164
+ ...brouillon.fin === "nombre" && brouillon.nombre !== null ? { nombre: brouillon.nombre } : {}
3165
+ };
3166
+ }
3167
+ function memeRecurrence(a, b) {
3168
+ if (a === null || b === null) return a === b;
3169
+ return a.frequence === b.frequence && (a.intervalle ?? 1) === (b.intervalle ?? 1) && (a.jourDuMois ?? null) === (b.jourDuMois ?? null) && a.debut === b.debut && (a.jusquau ?? null) === (b.jusquau ?? null) && (a.nombre ?? null) === (b.nombre ?? null);
3170
+ }
3171
+ var StRecurrenceField = class StRecurrenceField extends ContratDeChamp {
3172
+ locale = inject(ST_LOCALE);
3173
+ catalogue = catalogueDesFormulaires();
3174
+ libellesDesChamps = computed(() => this.catalogue().libelles, ...ngDevMode ? [{ debugName: "libellesDesChamps" }] : /* istanbul ignore next */ []);
3175
+ langueDeRepli = computed(() => this.catalogue().langueDeRepli, ...ngDevMode ? [{ debugName: "langueDeRepli" }] : /* istanbul ignore next */ []);
3176
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
3177
+ dateMin = input(null, ...ngDevMode ? [{ debugName: "dateMin" }] : /* istanbul ignore next */ []);
3178
+ frequenceChamp = viewChild(StSelect, ...ngDevMode ? [{ debugName: "frequenceChamp" }] : /* istanbul ignore next */ []);
3179
+ debutChamp = viewChild("debut", ...ngDevMode ? [{ debugName: "debutChamp" }] : /* istanbul ignore next */ []);
3180
+ idDuRecapitulatif = inject(StIdentifiants).prochain("st-recurrence");
3181
+ quitte = signal(false, ...ngDevMode ? [{ debugName: "quitte" }] : /* istanbul ignore next */ []);
3182
+ brouillon = linkedSignal({
3183
+ ...ngDevMode ? { debugName: "brouillon" } : /* istanbul ignore next */ {},
3184
+ source: this.value,
3185
+ computation: (recurrence, precedent) => {
3186
+ if (precedent !== void 0 && memeRecurrence(recurrenceDe(precedent.value), recurrence)) return precedent.value;
3187
+ return recurrence === null ? precedent?.value ?? PAR_DEFAUT : brouillonDe(recurrence);
3188
+ }
3189
+ });
3190
+ optionsDeFrequence = computed(() => FREQUENCES.map((frequence) => ({
3191
+ valeur: frequence,
3192
+ libelle: this.libellesDesChamps().frequences[frequence]
3193
+ })), ...ngDevMode ? [{ debugName: "optionsDeFrequence" }] : /* istanbul ignore next */ []);
3194
+ optionsDeJour = computed(() => Array.from({ length: 31 }, (_, rang) => ({
3195
+ valeur: String(rang + 1),
3196
+ libelle: String(rang + 1)
3197
+ })), ...ngDevMode ? [{ debugName: "optionsDeJour" }] : /* istanbul ignore next */ []);
3198
+ optionsDeFin = computed(() => {
3199
+ const libelles = this.libellesDesChamps();
3200
+ return [
3201
+ {
3202
+ valeur: "jamais",
3203
+ libelle: libelles.finJamais
3204
+ },
3205
+ {
3206
+ valeur: "date",
3207
+ libelle: libelles.finALaDate
3208
+ },
3209
+ {
3210
+ valeur: "nombre",
3211
+ libelle: libelles.finApresNombre
3212
+ }
3213
+ ];
3214
+ }, ...ngDevMode ? [{ debugName: "optionsDeFin" }] : /* istanbul ignore next */ []);
3215
+ avecJourDuMois = computed(() => {
3216
+ const frequence = this.brouillon().frequence;
3217
+ return frequence === "mensuelle" || frequence === "annuelle";
3218
+ }, ...ngDevMode ? [{ debugName: "avecJourDuMois" }] : /* istanbul ignore next */ []);
3219
+ jourChoisi = computed(() => {
3220
+ const jour = this.brouillon().jourDuMois;
3221
+ return jour === null ? "" : String(jour);
3222
+ }, ...ngDevMode ? [{ debugName: "jourChoisi" }] : /* istanbul ignore next */ []);
3223
+ unite = computed(() => this.libellesDesChamps().unitesDIntervalle[this.brouillon().frequence], ...ngDevMode ? [{ debugName: "unite" }] : /* istanbul ignore next */ []);
3224
+ recapitulatif = computed(() => {
3225
+ const recurrence = this.value();
3226
+ return recurrence === null ? null : decrireRecurrence(recurrence, this.locale());
3227
+ }, ...ngDevMode ? [{ debugName: "recapitulatif" }] : /* istanbul ignore next */ []);
3228
+ decritPar = computed(() => this.recapitulatif() === null ? [] : [this.idDuRecapitulatif], ...ngDevMode ? [{ debugName: "decritPar" }] : /* istanbul ignore next */ []);
3229
+ modifier(partie) {
3230
+ const brouillon = {
3231
+ ...this.brouillon(),
3232
+ ...partie
3233
+ };
3234
+ this.brouillon.set(brouillon);
3235
+ this.value.set(recurrenceDe(brouillon));
3236
+ }
3237
+ choisirLaFrequence(valeur) {
3238
+ if (FREQUENCES.includes(valeur)) this.modifier({ frequence: valeur });
3239
+ }
3240
+ choisirLeJour(valeur) {
3241
+ this.modifier({ jourDuMois: valeur === "" ? null : Number(valeur) });
3242
+ }
3243
+ choisirLaFin(valeur) {
3244
+ if (valeur === "jamais" || valeur === "date" || valeur === "nombre") this.modifier({ fin: valeur });
3245
+ }
3246
+ quitter() {
3247
+ this.quitte.set(true);
3248
+ this.touch.emit();
3249
+ }
3250
+ focus(options) {
3251
+ if (this.brouillon().debut === null) this.debutChamp()?.focus(options);
3252
+ else this.frequenceChamp()?.focus(options);
3253
+ }
3254
+ static ɵfac = i0.ɵɵngDeclareFactory({
3255
+ minVersion: "12.0.0",
3256
+ version: "22.2.2",
3257
+ ngImport: i0,
3258
+ type: StRecurrenceField,
3259
+ deps: null,
3260
+ target: i0.ɵɵFactoryTarget.Component
3261
+ });
3262
+ static ɵcmp = i0.ɵɵngDeclareComponent({
3263
+ minVersion: "17.0.0",
3264
+ version: "22.2.2",
3265
+ type: StRecurrenceField,
3266
+ isStandalone: true,
3267
+ selector: "st-recurrence-field",
3268
+ inputs: {
3269
+ value: {
3270
+ classPropertyName: "value",
3271
+ publicName: "value",
3272
+ isSignal: true,
3273
+ isRequired: false,
3274
+ transformFunction: null
3275
+ },
3276
+ dateMin: {
3277
+ classPropertyName: "dateMin",
3278
+ publicName: "dateMin",
3279
+ isSignal: true,
3280
+ isRequired: false,
3281
+ transformFunction: null
3282
+ }
3283
+ },
3284
+ outputs: { value: "valueChange" },
3285
+ host: { classAttribute: "st-recurrence-field" },
3286
+ viewQueries: [{
3287
+ propertyName: "frequenceChamp",
3288
+ first: true,
3289
+ predicate: StSelect,
3290
+ descendants: true,
3291
+ isSignal: true
3292
+ }, {
3293
+ propertyName: "debutChamp",
3294
+ first: true,
3295
+ predicate: ["debut"],
3296
+ descendants: true,
3297
+ isSignal: true
3298
+ }],
3299
+ usesInheritance: true,
3300
+ ngImport: i0,
3301
+ template: "<st-fieldset\n [legende]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [disabled]=\"disabled()\"\n [decritPar]=\"decritPar()\"\n>\n <div class=\"st-recurrence-field__lignes\">\n <div class=\"st-recurrence-field__ligne\">\n <st-select\n [libelle]=\"libellesDesChamps().frequence\"\n [options]=\"optionsDeFrequence()\"\n [value]=\"brouillon().frequence\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choisirLaFrequence($event)\"\n (touch)=\"quitter()\"\n />\n <st-number-field\n [libelle]=\"libellesDesChamps().intervalle\"\n [unite]=\"unite()\"\n [min]=\"1\"\n [value]=\"brouillon().intervalle\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ intervalle: $event })\"\n (touch)=\"quitter()\"\n />\n </div>\n\n <!-- Le jour du mois et la premiere echeance vont par deux, comme la frequence et l'intervalle. -->\n <div class=\"st-recurrence-field__ligne\">\n @if (avecJourDuMois()) {\n <!-- La regle des 29, 30 et 31 est l'aide du champ : elle se lit avant tout choix. Tout son\n texte vient du catalogue (les jours sont des chiffres) : son `lang` au repli (D-29). -->\n <st-select\n [attr.lang]=\"langueDeRepli()\"\n [libelle]=\"libellesDesChamps().jourDuMois\"\n [aide]=\"libellesDesChamps().regleDeFinDeMois\"\n [texteVide]=\"libellesDesChamps().jourDeLaPremiereEcheance\"\n [options]=\"optionsDeJour()\"\n [value]=\"jourChoisi()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choisirLeJour($event)\"\n (touch)=\"quitter()\"\n />\n }\n\n <st-date-field\n #debut\n [libelle]=\"libellesDesChamps().premiereEcheance\"\n [dateMin]=\"dateMin()\"\n [required]=\"required()\"\n [value]=\"brouillon().debut\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ debut: $event })\"\n (touch)=\"quitter()\"\n />\n </div>\n\n <st-radio-group\n [attr.lang]=\"langueDeRepli()\"\n [legende]=\"libellesDesChamps().fin\"\n [options]=\"optionsDeFin()\"\n [value]=\"brouillon().fin\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choisirLaFin($event)\"\n />\n @switch (brouillon().fin) {\n @case ('date') {\n <st-date-field\n [libelle]=\"libellesDesChamps().derniereEcheance\"\n [dateMin]=\"brouillon().debut ?? dateMin()\"\n [value]=\"brouillon().jusquau\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ jusquau: $event })\"\n (touch)=\"quitter()\"\n />\n }\n @case ('nombre') {\n <st-number-field\n [libelle]=\"libellesDesChamps().nombreDEcheances\"\n [min]=\"1\"\n [value]=\"brouillon().nombre\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ nombre: $event })\"\n (touch)=\"quitter()\"\n />\n }\n }\n\n <!-- Le recapitulatif DECRIT le groupe, sans region vivante : il ne s'annonce pas a chaque\n choix, il se lit en entrant dans le groupe. -->\n @if (recapitulatif(); as texte) {\n <div class=\"st-recurrence-field__recapitulatif\">\n <st-text variante=\"legende\" graisse=\"semi\" [attr.lang]=\"langueDeRepli()\">{{\n libellesDesChamps().recapitulatif\n }}</st-text>\n <st-text [attr.id]=\"idDuRecapitulatif\">{{ texte }}</st-text>\n </div>\n }\n </div>\n</st-fieldset>\n",
3302
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;min-inline-size:0;container-type:inline-size}.st-recurrence-field__lignes{display:flex;flex-direction:column;gap:var(--st-espacement-4)}.st-recurrence-field__ligne{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-espacement-4)}@container (min-width: 30rem){.st-recurrence-field__ligne{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}.st-recurrence-field__recapitulatif{display:flex;flex-direction:column;gap:var(--st-espacement-1);padding:var(--st-espacement-3) var(--st-espacement-4);background:var(--st-couleur-surface-conteneur-bas);border-radius:var(--st-rayon-md)}@media(forced-colors:active){.st-recurrence-field__recapitulatif{border:var(--st-epaisseur-fine) solid CanvasText}}\n"],
3303
+ dependencies: [
3304
+ {
3305
+ kind: "component",
3306
+ type: StDateField,
3307
+ selector: "st-date-field",
3308
+ inputs: [
3309
+ "value",
3310
+ "dateMin",
3311
+ "dateMax",
3312
+ "autocomplete",
3313
+ "annees",
3314
+ "raccourcis",
3315
+ "dispositionDesRaccourcis",
3316
+ "titreDesRaccourcis"
3317
+ ],
3318
+ outputs: ["valueChange"]
3319
+ },
3320
+ {
3321
+ kind: "component",
3322
+ type: StFieldset,
3323
+ selector: "st-fieldset",
3324
+ inputs: [
3325
+ "legende",
3326
+ "contenu",
3327
+ "disposition",
3328
+ "toutesLesErreurs",
3329
+ "choixExclusif",
3330
+ "readonly",
3331
+ "disabled",
3332
+ "hidden",
3333
+ "decritPar"
3334
+ ]
3335
+ },
3336
+ {
3337
+ kind: "component",
3338
+ type: StNumberField,
3339
+ selector: "st-number-field",
3340
+ inputs: [
3341
+ "value",
3342
+ "decimales",
3343
+ "pas",
3344
+ "unite"
3345
+ ],
3346
+ outputs: ["valueChange"]
3347
+ },
3348
+ {
3349
+ kind: "component",
3350
+ type: StRadioGroup,
3351
+ selector: "st-radio-group",
3352
+ inputs: [
3353
+ "legende",
3354
+ "aide",
3355
+ "options",
3356
+ "disposition",
3357
+ "value",
3358
+ "errors",
3359
+ "touched",
3360
+ "dirty",
3361
+ "pending",
3362
+ "disabled",
3363
+ "disabledReasons",
3364
+ "readonly",
3365
+ "required",
3366
+ "hidden",
3367
+ "name"
3368
+ ],
3369
+ outputs: ["valueChange", "touch"]
3370
+ },
3371
+ {
3372
+ kind: "component",
3373
+ type: StSelect,
3374
+ selector: "st-select",
3375
+ inputs: [
3376
+ "options",
3377
+ "texteVide",
3378
+ "autocomplete",
3379
+ "icone",
3380
+ "presentation",
3381
+ "variante"
3382
+ ]
3383
+ },
3384
+ {
3385
+ kind: "component",
3386
+ type: StText,
3387
+ selector: "st-text",
3388
+ inputs: [
3389
+ "variante",
3390
+ "graisse",
3391
+ "enLigne",
3392
+ "tronquerA",
3393
+ "revelable"
3394
+ ]
3395
+ }
3396
+ ],
3397
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
3398
+ });
3399
+ };
3400
+ i0.ɵɵngDeclareClassMetadata({
3401
+ minVersion: "12.0.0",
3402
+ version: "22.2.2",
3403
+ ngImport: i0,
3404
+ type: StRecurrenceField,
3405
+ decorators: [{
3406
+ type: Component,
3407
+ args: [{
3408
+ selector: "st-recurrence-field",
3409
+ changeDetection: ChangeDetectionStrategy.OnPush,
3410
+ imports: [
3411
+ StDateField,
3412
+ StFieldset,
3413
+ StNumberField,
3414
+ StRadioGroup,
3415
+ StSelect,
3416
+ StText
3417
+ ],
3418
+ host: { class: "st-recurrence-field" },
3419
+ template: "<st-fieldset\n [legende]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched() || quitte()\"\n [obligatoire]=\"required()\"\n [disabled]=\"disabled()\"\n [decritPar]=\"decritPar()\"\n>\n <div class=\"st-recurrence-field__lignes\">\n <div class=\"st-recurrence-field__ligne\">\n <st-select\n [libelle]=\"libellesDesChamps().frequence\"\n [options]=\"optionsDeFrequence()\"\n [value]=\"brouillon().frequence\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choisirLaFrequence($event)\"\n (touch)=\"quitter()\"\n />\n <st-number-field\n [libelle]=\"libellesDesChamps().intervalle\"\n [unite]=\"unite()\"\n [min]=\"1\"\n [value]=\"brouillon().intervalle\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ intervalle: $event })\"\n (touch)=\"quitter()\"\n />\n </div>\n\n <!-- Le jour du mois et la premiere echeance vont par deux, comme la frequence et l'intervalle. -->\n <div class=\"st-recurrence-field__ligne\">\n @if (avecJourDuMois()) {\n <!-- La regle des 29, 30 et 31 est l'aide du champ : elle se lit avant tout choix. Tout son\n texte vient du catalogue (les jours sont des chiffres) : son `lang` au repli (D-29). -->\n <st-select\n [attr.lang]=\"langueDeRepli()\"\n [libelle]=\"libellesDesChamps().jourDuMois\"\n [aide]=\"libellesDesChamps().regleDeFinDeMois\"\n [texteVide]=\"libellesDesChamps().jourDeLaPremiereEcheance\"\n [options]=\"optionsDeJour()\"\n [value]=\"jourChoisi()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choisirLeJour($event)\"\n (touch)=\"quitter()\"\n />\n }\n\n <st-date-field\n #debut\n [libelle]=\"libellesDesChamps().premiereEcheance\"\n [dateMin]=\"dateMin()\"\n [required]=\"required()\"\n [value]=\"brouillon().debut\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ debut: $event })\"\n (touch)=\"quitter()\"\n />\n </div>\n\n <st-radio-group\n [attr.lang]=\"langueDeRepli()\"\n [legende]=\"libellesDesChamps().fin\"\n [options]=\"optionsDeFin()\"\n [value]=\"brouillon().fin\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choisirLaFin($event)\"\n />\n @switch (brouillon().fin) {\n @case ('date') {\n <st-date-field\n [libelle]=\"libellesDesChamps().derniereEcheance\"\n [dateMin]=\"brouillon().debut ?? dateMin()\"\n [value]=\"brouillon().jusquau\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ jusquau: $event })\"\n (touch)=\"quitter()\"\n />\n }\n @case ('nombre') {\n <st-number-field\n [libelle]=\"libellesDesChamps().nombreDEcheances\"\n [min]=\"1\"\n [value]=\"brouillon().nombre\"\n [readonly]=\"readonly()\"\n (valueChange)=\"modifier({ nombre: $event })\"\n (touch)=\"quitter()\"\n />\n }\n }\n\n <!-- Le recapitulatif DECRIT le groupe, sans region vivante : il ne s'annonce pas a chaque\n choix, il se lit en entrant dans le groupe. -->\n @if (recapitulatif(); as texte) {\n <div class=\"st-recurrence-field__recapitulatif\">\n <st-text variante=\"legende\" graisse=\"semi\" [attr.lang]=\"langueDeRepli()\">{{\n libellesDesChamps().recapitulatif\n }}</st-text>\n <st-text [attr.id]=\"idDuRecapitulatif\">{{ texte }}</st-text>\n </div>\n }\n </div>\n</st-fieldset>\n",
3420
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;min-inline-size:0;container-type:inline-size}.st-recurrence-field__lignes{display:flex;flex-direction:column;gap:var(--st-espacement-4)}.st-recurrence-field__ligne{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-espacement-4)}@container (min-width: 30rem){.st-recurrence-field__ligne{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}.st-recurrence-field__recapitulatif{display:flex;flex-direction:column;gap:var(--st-espacement-1);padding:var(--st-espacement-3) var(--st-espacement-4);background:var(--st-couleur-surface-conteneur-bas);border-radius:var(--st-rayon-md)}@media(forced-colors:active){.st-recurrence-field__recapitulatif{border:var(--st-epaisseur-fine) solid CanvasText}}\n"]
3421
+ }]
3422
+ }],
3423
+ propDecorators: {
3424
+ value: [{
3425
+ type: i0.Input,
3426
+ args: [{
3427
+ isSignal: true,
3428
+ alias: "value",
3429
+ required: false
3430
+ }]
3431
+ }, {
3432
+ type: i0.Output,
3433
+ args: ["valueChange"]
3434
+ }],
3435
+ dateMin: [{
3436
+ type: i0.Input,
3437
+ args: [{
3438
+ isSignal: true,
3439
+ alias: "dateMin",
3440
+ required: false
3441
+ }]
3442
+ }],
3443
+ frequenceChamp: [{
3444
+ type: i0.ViewChild,
3445
+ args: [i0.forwardRef(() => StSelect), { isSignal: true }]
3446
+ }],
3447
+ debutChamp: [{
3448
+ type: i0.ViewChild,
3449
+ args: ["debut", { isSignal: true }]
3450
+ }]
3451
+ }
3452
+ });
3453
+ export { LIBELLES_FORMULAIRES_EN, LIBELLES_FORMULAIRES_FR, ST_LIBELLES_FORMULAIRES, StAmountField, StAmountRange, StDateField, StDateRange, StMemorableDate, StMonthField, StNumberField, StPhoneField, StRangeSlider, StRecurrenceField, StTimeField, catalogueDesFormulaires, erreurPlageDeMontants, fournirLibellesFormulaires, libellesDesFormulaires };
3454
+
3455
+ //# sourceMappingURL=starterlib-ui-formulaires-autres-CoiQKLZA.mjs.map