@starterlib/ui 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icones/catalogue.json +1 -1
- package/fesm2022/starterlib-ui-arbre.mjs +6 -6
- package/fesm2022/starterlib-ui-donnees.mjs +70 -70
- package/fesm2022/starterlib-ui-donnees.mjs.map +1 -1
- package/fesm2022/starterlib-ui-etats.mjs +26 -26
- package/fesm2022/starterlib-ui-etats.mjs.map +1 -1
- package/fesm2022/starterlib-ui-formulaires-autres-CoiQKLZA.mjs +3455 -0
- package/fesm2022/starterlib-ui-formulaires-autres-CoiQKLZA.mjs.map +1 -0
- package/fesm2022/starterlib-ui-formulaires-base-DI7s_Zey.mjs +125 -0
- package/fesm2022/starterlib-ui-formulaires-base-DI7s_Zey.mjs.map +1 -0
- package/fesm2022/starterlib-ui-formulaires.mjs +2 -3573
- package/fesm2022/starterlib-ui-graphiques.mjs +12 -12
- package/fesm2022/starterlib-ui-graphiques.mjs.map +1 -1
- package/fesm2022/starterlib-ui-indicateurs.mjs +20 -20
- package/fesm2022/starterlib-ui-indicateurs.mjs.map +1 -1
- package/fesm2022/starterlib-ui-listes.mjs +101 -100
- package/fesm2022/starterlib-ui-listes.mjs.map +1 -1
- package/fesm2022/starterlib-ui-messagerie.mjs +9 -9
- package/fesm2022/starterlib-ui-mise-en-page.mjs +19 -19
- package/fesm2022/starterlib-ui-mise-en-page.mjs.map +1 -1
- package/fesm2022/starterlib-ui-navigation.mjs +17 -17
- package/fesm2022/starterlib-ui-navigation.mjs.map +1 -1
- package/fesm2022/starterlib-ui-onglets.mjs +11 -11
- package/fesm2022/starterlib-ui-onglets.mjs.map +1 -1
- package/fesm2022/starterlib-ui-parcours.mjs +34 -34
- package/fesm2022/starterlib-ui-parcours.mjs.map +1 -1
- package/fesm2022/starterlib-ui-qr.mjs +6 -6
- package/fesm2022/starterlib-ui-qr.mjs.map +1 -1
- package/fesm2022/starterlib-ui-saisie-autres-Bw8gYr8W.mjs +6376 -0
- package/fesm2022/starterlib-ui-saisie-autres-Bw8gYr8W.mjs.map +1 -0
- package/fesm2022/starterlib-ui-saisie-base-Bj-Wzk1h.mjs +2617 -0
- package/fesm2022/starterlib-ui-saisie-base-Bj-Wzk1h.mjs.map +1 -0
- package/fesm2022/starterlib-ui-saisie.mjs +2 -8983
- package/fesm2022/starterlib-ui-selection.mjs +17 -17
- package/fesm2022/starterlib-ui-selection.mjs.map +1 -1
- package/fesm2022/starterlib-ui-sens.mjs +3 -3
- package/fesm2022/starterlib-ui-surfaces.mjs +94 -94
- package/fesm2022/starterlib-ui-surfaces.mjs.map +1 -1
- package/fesm2022/starterlib-ui-virtuel.mjs +8 -8
- package/fesm2022/starterlib-ui-virtuel.mjs.map +1 -1
- package/fesm2022/starterlib-ui.mjs +129 -121
- package/fesm2022/starterlib-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/starterlib-ui-listes.d.ts +7 -2
- package/types/starterlib-ui-saisie.d.ts +24 -24
- package/types/starterlib-ui.d.ts +12 -0
- package/fesm2022/starterlib-ui-formulaires.mjs.map +0 -1
- package/fesm2022/starterlib-ui-saisie.mjs.map +0 -1
|
@@ -0,0 +1,2617 @@
|
|
|
1
|
+
import { adresseEstVide, codePostalValide, decimalesDe, estDateIso, estHeureIso, exempleDHeure, exempleDeMois, formatDAdresse, formaterDateLongue, formaterDateSaisie, formaterHeureSaisie, formaterMontant, formaterNombre, formaterTaille, ibanEstValide, montant, motifDHeure, motifDeDate, motifDuMois, normaliserCodeDePays, normaliserTelephone, partiesAffichees, partiesExigees, typeDeFichierAccepte } from "@starterlib/util/valeurs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, afterEveryRender, afterNextRender, booleanAttribute, computed, contentChild, effect, inject, input, model, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { AnnonceLocale, ST_LIBELLES, ST_LOCALE, ST_MARQUE_D_OBLIGATION, StIcon, StIconButton, StIdentifiants, StInlineMessage, StSpinner, affichageDiffere } from "@starterlib/ui";
|
|
5
|
+
import { delai } from "@starterlib/tokens";
|
|
6
|
+
import { DOCUMENT as DOCUMENT$1 } from "@angular/common";
|
|
7
|
+
function messageDErreur(erreur, libelles, locale = "fr-FR") {
|
|
8
|
+
const fourni = erreur.message?.trim();
|
|
9
|
+
if (fourni !== void 0 && fourni !== "") return fourni;
|
|
10
|
+
const propriete = (nom) => erreur[nom];
|
|
11
|
+
const nombre = (nom) => {
|
|
12
|
+
const valeur = propriete(nom);
|
|
13
|
+
return typeof valeur === "number" ? valeur : void 0;
|
|
14
|
+
};
|
|
15
|
+
const texte = (nom) => {
|
|
16
|
+
const valeur = propriete(nom);
|
|
17
|
+
return typeof valeur === "string" ? valeur : void 0;
|
|
18
|
+
};
|
|
19
|
+
switch (erreur.kind) {
|
|
20
|
+
case "required": return libelles.champObligatoire;
|
|
21
|
+
case "email": return libelles.adresseInvalide;
|
|
22
|
+
case "pattern": return libelles.formatInvalide;
|
|
23
|
+
case "iban": return libelles.ibanInvalide;
|
|
24
|
+
case "telephone": return libelles.telephoneInvalide;
|
|
25
|
+
case "code": {
|
|
26
|
+
const longueur = nombre("longueur");
|
|
27
|
+
return longueur === void 0 ? libelles.valeurInvalide : libelles.codeIncomplet(longueur);
|
|
28
|
+
}
|
|
29
|
+
case "minLength": {
|
|
30
|
+
const minimum = nombre("minLength");
|
|
31
|
+
if (minimum === void 0) return libelles.valeurInvalide;
|
|
32
|
+
return viseUneListe(erreur) ? libelles.choixAuMoins(minimum) : libelles.longueurMinimale(minimum);
|
|
33
|
+
}
|
|
34
|
+
case "maxLength": {
|
|
35
|
+
const maximum = nombre("maxLength");
|
|
36
|
+
if (maximum === void 0) return libelles.valeurInvalide;
|
|
37
|
+
return viseUneListe(erreur) ? libelles.choixAuPlus(maximum) : libelles.longueurMaximale(maximum);
|
|
38
|
+
}
|
|
39
|
+
case "longueur": {
|
|
40
|
+
const minimum = nombre("minLength");
|
|
41
|
+
const maximum = nombre("maxLength");
|
|
42
|
+
return minimum === void 0 || maximum === void 0 ? libelles.valeurInvalide : libelles.longueurEntre(minimum, maximum);
|
|
43
|
+
}
|
|
44
|
+
case "positif": return libelles.valeurPositive;
|
|
45
|
+
case "passe": return libelles.datePassee;
|
|
46
|
+
case "futur": return libelles.dateFuture;
|
|
47
|
+
case "chiffres": {
|
|
48
|
+
const entiers = nombre("entiers");
|
|
49
|
+
const decimales = nombre("decimales");
|
|
50
|
+
return entiers === void 0 || decimales === void 0 ? libelles.valeurInvalide : libelles.chiffresAuPlus(entiers, decimales);
|
|
51
|
+
}
|
|
52
|
+
case "min": {
|
|
53
|
+
const minimum = nombre("min");
|
|
54
|
+
if (minimum === void 0) return libelles.valeurInvalide;
|
|
55
|
+
return propriete("strict") === true ? libelles.valeurSuperieureA(formaterNombre(minimum, locale)) : libelles.valeurMinimale(formaterNombre(minimum, locale));
|
|
56
|
+
}
|
|
57
|
+
case "max": {
|
|
58
|
+
const maximum = nombre("max");
|
|
59
|
+
if (maximum === void 0) return libelles.valeurInvalide;
|
|
60
|
+
return propriete("strict") === true ? libelles.valeurInferieureA(formaterNombre(maximum, locale)) : libelles.valeurMaximale(formaterNombre(maximum, locale));
|
|
61
|
+
}
|
|
62
|
+
case "montant": {
|
|
63
|
+
const devise = texte("devise") ?? "EUR";
|
|
64
|
+
if (!/^[A-Za-z]{3}$/.test(devise)) return libelles.valeurInvalide;
|
|
65
|
+
const exemple = formaterMontant(montant(123456n * 10n ** BigInt(decimalesDe(devise)) / 100n, devise), {
|
|
66
|
+
locale,
|
|
67
|
+
sansDevise: true
|
|
68
|
+
});
|
|
69
|
+
return libelles.montantIllisible(exemple);
|
|
70
|
+
}
|
|
71
|
+
case "nombre": {
|
|
72
|
+
const decimales = nombre("decimales") ?? 0;
|
|
73
|
+
return libelles.nombreIllisible(formaterNombre(decimales > 0 ? 1234.5 : 1234, locale, Math.min(decimales, 2)));
|
|
74
|
+
}
|
|
75
|
+
case "entier": return libelles.nombreEntier;
|
|
76
|
+
case "decimales": {
|
|
77
|
+
const decimales = nombre("decimales");
|
|
78
|
+
return decimales === void 0 ? libelles.valeurInvalide : libelles.tropDeDecimales(decimales);
|
|
79
|
+
}
|
|
80
|
+
case "date": return libelles.dateIllisible(motifLocal(libelles, locale), exempleDeDate(locale));
|
|
81
|
+
case "dateMin": {
|
|
82
|
+
const minimum = texte("min");
|
|
83
|
+
return minimum === void 0 || !estDateIso(minimum) ? libelles.valeurInvalide : libelles.dateTropTot(formaterDateLongue(minimum, locale));
|
|
84
|
+
}
|
|
85
|
+
case "dateMax": {
|
|
86
|
+
const maximum = texte("max");
|
|
87
|
+
return maximum === void 0 || !estDateIso(maximum) ? libelles.valeurInvalide : libelles.dateTropTard(formaterDateLongue(maximum, locale));
|
|
88
|
+
}
|
|
89
|
+
case "mois": return libelles.dateIllisible(motifDuMoisLocal(libelles, locale), exempleDeMois(locale));
|
|
90
|
+
case "heure": return libelles.heureIllisible(motifDHeureLocal(libelles, locale, propriete("secondes") === true), exempleDHeure(locale, propriete("secondes") === true));
|
|
91
|
+
case "heureMin": {
|
|
92
|
+
const minimum = texte("min");
|
|
93
|
+
return minimum === void 0 || !estHeureIso(minimum) ? libelles.valeurInvalide : libelles.heureTropTot(formaterHeureSaisie(minimum, locale));
|
|
94
|
+
}
|
|
95
|
+
case "heureMax": {
|
|
96
|
+
const maximum = texte("max");
|
|
97
|
+
return maximum === void 0 || !estHeureIso(maximum) ? libelles.valeurInvalide : libelles.heureTropTard(formaterHeureSaisie(maximum, locale));
|
|
98
|
+
}
|
|
99
|
+
case "plageDeDates": return libelles.finAvantDebut;
|
|
100
|
+
case "plageDeMontants": return libelles.maximumSousLeMinimum;
|
|
101
|
+
case "adresse": {
|
|
102
|
+
const partie = texte("partie");
|
|
103
|
+
return partie === void 0 ? libelles.champObligatoire : libelles.libelleEtMessage(libelleDePartie(libelles, partie, texte("nature")), libelles.champObligatoire);
|
|
104
|
+
}
|
|
105
|
+
case "codePostal": return libelles.codePostalInvalide(texte("exemple") ?? "");
|
|
106
|
+
case "pays": return libelles.paysNonAccepte;
|
|
107
|
+
case "fichierTaille": {
|
|
108
|
+
const fichier = texte("fichier");
|
|
109
|
+
const maximum = nombre("max");
|
|
110
|
+
return fichier === void 0 || maximum === void 0 ? libelles.valeurInvalide : libelles.fichierTropVolumineux(fichier, formaterTaille(maximum, locale));
|
|
111
|
+
}
|
|
112
|
+
case "fichierType": {
|
|
113
|
+
const fichier = texte("fichier");
|
|
114
|
+
return fichier === void 0 ? libelles.valeurInvalide : libelles.typeDeFichierRefuse(fichier);
|
|
115
|
+
}
|
|
116
|
+
case "fichiersNombre": {
|
|
117
|
+
const maximum = nombre("max");
|
|
118
|
+
return maximum === void 0 ? libelles.valeurInvalide : libelles.tropDeFichiers(maximum);
|
|
119
|
+
}
|
|
120
|
+
default: return libelles.valeurInvalide;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function viseUneListe(erreur) {
|
|
124
|
+
const arbre = erreur.fieldTree;
|
|
125
|
+
if (typeof arbre !== "function") return false;
|
|
126
|
+
try {
|
|
127
|
+
const etat = arbre();
|
|
128
|
+
const valeur = typeof etat === "object" && etat !== null ? etat.value : void 0;
|
|
129
|
+
return typeof valeur === "function" && Array.isArray(valeur());
|
|
130
|
+
} catch {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function libelleDePartie(libelles, partie, nature) {
|
|
135
|
+
switch (partie) {
|
|
136
|
+
case "ligne1": return libelles.adresseLigne1;
|
|
137
|
+
case "ligne2": return libelles.adresseLigne2;
|
|
138
|
+
case "codePostal": return libelles.codePostal;
|
|
139
|
+
case "ville": return libelles.ville;
|
|
140
|
+
case "region": return libelles.regionDAdresse(nature ?? "region");
|
|
141
|
+
default: return libelles.pays;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function motifLocal(libelles, locale) {
|
|
145
|
+
return motifDeDate(locale, {
|
|
146
|
+
jour: libelles.lettreDuJour,
|
|
147
|
+
mois: libelles.lettreDuMois,
|
|
148
|
+
annee: libelles.lettreDeLAnnee
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function motifDuMoisLocal(libelles, locale) {
|
|
152
|
+
return motifDuMois(locale, {
|
|
153
|
+
mois: libelles.lettreDuMois,
|
|
154
|
+
annee: libelles.lettreDeLAnnee
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function motifDHeureLocal(libelles, locale, secondes = false) {
|
|
158
|
+
return motifDHeure(locale, {
|
|
159
|
+
heure: libelles.lettreDeLHeure,
|
|
160
|
+
minute: libelles.lettreDesMinutes,
|
|
161
|
+
seconde: libelles.lettreDesSecondes
|
|
162
|
+
}, secondes);
|
|
163
|
+
}
|
|
164
|
+
function exempleDeDate(locale) {
|
|
165
|
+
return formaterDateSaisie("2026-03-31", locale);
|
|
166
|
+
}
|
|
167
|
+
function erreurIban(valeur) {
|
|
168
|
+
if (valeur.trim() === "") return null;
|
|
169
|
+
return ibanEstValide(valeur) ? null : { kind: "iban" };
|
|
170
|
+
}
|
|
171
|
+
function erreurTelephone(valeur) {
|
|
172
|
+
if (valeur.trim() === "") return null;
|
|
173
|
+
return /^\s*\+?[\d\s.\-()]+$/.test(valeur) && /^\+?[0-9]{4,15}$/.test(normaliserTelephone(valeur)) ? null : { kind: "telephone" };
|
|
174
|
+
}
|
|
175
|
+
function erreurCode(valeur, longueur = 6) {
|
|
176
|
+
if (valeur === "") return null;
|
|
177
|
+
return new RegExp(`^[0-9]{${String(longueur)}}$`).test(valeur) ? null : {
|
|
178
|
+
kind: "code",
|
|
179
|
+
longueur
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function erreurDate(valeur, bornes) {
|
|
183
|
+
if (valeur === null || valeur === "") return null;
|
|
184
|
+
const { min, max } = bornes;
|
|
185
|
+
if (min !== void 0 && min !== null && valeur < min) return {
|
|
186
|
+
kind: "dateMin",
|
|
187
|
+
min
|
|
188
|
+
};
|
|
189
|
+
if (max !== void 0 && max !== null && valeur > max) return {
|
|
190
|
+
kind: "dateMax",
|
|
191
|
+
max
|
|
192
|
+
};
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
function enSecondes(heure) {
|
|
196
|
+
return heure.length === 5 ? `${heure}:00` : heure;
|
|
197
|
+
}
|
|
198
|
+
function erreurHeure(valeur, bornes) {
|
|
199
|
+
if (valeur === null || !estHeureIso(valeur)) return null;
|
|
200
|
+
const { min, max } = bornes;
|
|
201
|
+
if (min !== void 0 && min !== null && enSecondes(valeur) < enSecondes(min)) return {
|
|
202
|
+
kind: "heureMin",
|
|
203
|
+
min
|
|
204
|
+
};
|
|
205
|
+
if (max !== void 0 && max !== null && enSecondes(valeur) > enSecondes(max)) return {
|
|
206
|
+
kind: "heureMax",
|
|
207
|
+
max
|
|
208
|
+
};
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
function erreurPlageDeDates(plage) {
|
|
212
|
+
const { debut, fin } = plage;
|
|
213
|
+
if (debut === null || fin === null) return null;
|
|
214
|
+
return fin < debut ? { kind: "plageDeDates" } : null;
|
|
215
|
+
}
|
|
216
|
+
function erreursDAdresse(adresse, regles = {}) {
|
|
217
|
+
const { requise = true, codesDesPays } = regles;
|
|
218
|
+
if (!requise && adresseEstVide(adresse)) return [];
|
|
219
|
+
const format = formatDAdresse(adresse.pays);
|
|
220
|
+
const exigees = new Set(partiesExigees(format));
|
|
221
|
+
const erreurs = [];
|
|
222
|
+
for (const partie of ["pays", ...partiesAffichees(format)]) {
|
|
223
|
+
if (!exigees.has(partie) || adresse[partie].trim() !== "") continue;
|
|
224
|
+
erreurs.push(partie === "region" && format.region !== null ? {
|
|
225
|
+
kind: "adresse",
|
|
226
|
+
partie,
|
|
227
|
+
nature: format.region.nature
|
|
228
|
+
} : {
|
|
229
|
+
kind: "adresse",
|
|
230
|
+
partie
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
const codePostal = format.codePostal;
|
|
234
|
+
if (codePostal !== null && adresse.codePostal.trim() !== "" && !codePostalValide(adresse.codePostal, adresse.pays)) erreurs.push({
|
|
235
|
+
kind: "codePostal",
|
|
236
|
+
partie: "codePostal",
|
|
237
|
+
exemple: codePostal.exemple
|
|
238
|
+
});
|
|
239
|
+
const pays = normaliserCodeDePays(adresse.pays);
|
|
240
|
+
if (codesDesPays !== void 0 && pays !== "" && !codesDesPays.includes(pays)) erreurs.push({
|
|
241
|
+
kind: "pays",
|
|
242
|
+
partie: "pays"
|
|
243
|
+
});
|
|
244
|
+
return erreurs;
|
|
245
|
+
}
|
|
246
|
+
function erreurPays(code, codesAdmis) {
|
|
247
|
+
const pays = normaliserCodeDePays(code);
|
|
248
|
+
if (pays === "") return null;
|
|
249
|
+
return codesAdmis.includes(pays) ? null : { kind: "pays" };
|
|
250
|
+
}
|
|
251
|
+
function erreursDeFichiers(fichiers, regles) {
|
|
252
|
+
const erreurs = [];
|
|
253
|
+
const { accept = "", tailleMax, nombreMax } = regles;
|
|
254
|
+
if (nombreMax !== void 0 && fichiers.length > nombreMax) erreurs.push({
|
|
255
|
+
kind: "fichiersNombre",
|
|
256
|
+
max: nombreMax
|
|
257
|
+
});
|
|
258
|
+
for (const fichier of fichiers) if (!typeDeFichierAccepte(fichier, accept)) erreurs.push({
|
|
259
|
+
kind: "fichierType",
|
|
260
|
+
fichier: fichier.name
|
|
261
|
+
});
|
|
262
|
+
else if (tailleMax !== void 0 && fichier.size > tailleMax) erreurs.push({
|
|
263
|
+
kind: "fichierTaille",
|
|
264
|
+
fichier: fichier.name,
|
|
265
|
+
max: tailleMax
|
|
266
|
+
});
|
|
267
|
+
return erreurs;
|
|
268
|
+
}
|
|
269
|
+
function fusionnerErreurs(formulaire, lecture) {
|
|
270
|
+
const cle = (erreur) => `${erreur.kind}|${erreur.partie ?? ""}`;
|
|
271
|
+
const connues = new Set(formulaire.map(cle));
|
|
272
|
+
return [...formulaire, ...lecture.filter((erreur) => !connues.has(cle(erreur)))];
|
|
273
|
+
}
|
|
274
|
+
const ST_GROUPE_DE_SAISIE = new InjectionToken("ST_GROUPE_DE_SAISIE");
|
|
275
|
+
var ContratDeChamp = class ContratDeChamp {
|
|
276
|
+
libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
277
|
+
aide = input(null, ...ngDevMode ? [{ debugName: "aide" }] : /* istanbul ignore next */ []);
|
|
278
|
+
errors = input([], ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
|
|
279
|
+
touched = input(false, {
|
|
280
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
281
|
+
transform: booleanAttribute
|
|
282
|
+
});
|
|
283
|
+
dirty = input(false, {
|
|
284
|
+
...ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {},
|
|
285
|
+
transform: booleanAttribute
|
|
286
|
+
});
|
|
287
|
+
pending = input(false, {
|
|
288
|
+
...ngDevMode ? { debugName: "pending" } : /* istanbul ignore next */ {},
|
|
289
|
+
transform: booleanAttribute
|
|
290
|
+
});
|
|
291
|
+
disabled = input(false, {
|
|
292
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
293
|
+
transform: booleanAttribute
|
|
294
|
+
});
|
|
295
|
+
disabledReasons = input([], ...ngDevMode ? [{ debugName: "disabledReasons" }] : /* istanbul ignore next */ []);
|
|
296
|
+
readonly = input(false, {
|
|
297
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
298
|
+
transform: booleanAttribute
|
|
299
|
+
});
|
|
300
|
+
required = input(false, {
|
|
301
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
302
|
+
transform: booleanAttribute
|
|
303
|
+
});
|
|
304
|
+
hidden = input(false, {
|
|
305
|
+
...ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {},
|
|
306
|
+
transform: booleanAttribute
|
|
307
|
+
});
|
|
308
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
309
|
+
minLength = input(void 0, ...ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []);
|
|
310
|
+
maxLength = input(void 0, ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
|
|
311
|
+
pattern = input([], ...ngDevMode ? [{ debugName: "pattern" }] : /* istanbul ignore next */ []);
|
|
312
|
+
touch = output();
|
|
313
|
+
champ = viewChild("champ", ...ngDevMode ? [{ debugName: "champ" }] : /* istanbul ignore next */ []);
|
|
314
|
+
groupe = inject(ST_GROUPE_DE_SAISIE, { optional: true });
|
|
315
|
+
desactive = computed(() => this.disabled() || (this.groupe?.disabled() ?? false), ...ngDevMode ? [{ debugName: "desactive" }] : /* istanbul ignore next */ []);
|
|
316
|
+
aideEtRaisons = computed(() => {
|
|
317
|
+
const raisons = this.disabled() ? this.disabledReasons().map((raison) => raison.message?.trim() ?? "").filter((message) => message !== "") : [];
|
|
318
|
+
const aide = this.aide()?.trim() ?? "";
|
|
319
|
+
const morceaux = aide === "" ? raisons : [aide, ...raisons];
|
|
320
|
+
return morceaux.length === 0 ? null : morceaux.join(" ");
|
|
321
|
+
}, ...ngDevMode ? [{ debugName: "aideEtRaisons" }] : /* istanbul ignore next */ []);
|
|
322
|
+
focus(options) {
|
|
323
|
+
this.champ()?.nativeElement.focus(options);
|
|
324
|
+
}
|
|
325
|
+
texteSaisi(evenement) {
|
|
326
|
+
return evenement.target.value;
|
|
327
|
+
}
|
|
328
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
329
|
+
minVersion: "12.0.0",
|
|
330
|
+
version: "22.2.2",
|
|
331
|
+
ngImport: i0,
|
|
332
|
+
type: ContratDeChamp,
|
|
333
|
+
deps: [],
|
|
334
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
335
|
+
});
|
|
336
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
337
|
+
minVersion: "17.2.0",
|
|
338
|
+
version: "22.2.2",
|
|
339
|
+
type: ContratDeChamp,
|
|
340
|
+
isStandalone: true,
|
|
341
|
+
inputs: {
|
|
342
|
+
libelle: {
|
|
343
|
+
classPropertyName: "libelle",
|
|
344
|
+
publicName: "libelle",
|
|
345
|
+
isSignal: true,
|
|
346
|
+
isRequired: true,
|
|
347
|
+
transformFunction: null
|
|
348
|
+
},
|
|
349
|
+
aide: {
|
|
350
|
+
classPropertyName: "aide",
|
|
351
|
+
publicName: "aide",
|
|
352
|
+
isSignal: true,
|
|
353
|
+
isRequired: false,
|
|
354
|
+
transformFunction: null
|
|
355
|
+
},
|
|
356
|
+
errors: {
|
|
357
|
+
classPropertyName: "errors",
|
|
358
|
+
publicName: "errors",
|
|
359
|
+
isSignal: true,
|
|
360
|
+
isRequired: false,
|
|
361
|
+
transformFunction: null
|
|
362
|
+
},
|
|
363
|
+
touched: {
|
|
364
|
+
classPropertyName: "touched",
|
|
365
|
+
publicName: "touched",
|
|
366
|
+
isSignal: true,
|
|
367
|
+
isRequired: false,
|
|
368
|
+
transformFunction: null
|
|
369
|
+
},
|
|
370
|
+
dirty: {
|
|
371
|
+
classPropertyName: "dirty",
|
|
372
|
+
publicName: "dirty",
|
|
373
|
+
isSignal: true,
|
|
374
|
+
isRequired: false,
|
|
375
|
+
transformFunction: null
|
|
376
|
+
},
|
|
377
|
+
pending: {
|
|
378
|
+
classPropertyName: "pending",
|
|
379
|
+
publicName: "pending",
|
|
380
|
+
isSignal: true,
|
|
381
|
+
isRequired: false,
|
|
382
|
+
transformFunction: null
|
|
383
|
+
},
|
|
384
|
+
disabled: {
|
|
385
|
+
classPropertyName: "disabled",
|
|
386
|
+
publicName: "disabled",
|
|
387
|
+
isSignal: true,
|
|
388
|
+
isRequired: false,
|
|
389
|
+
transformFunction: null
|
|
390
|
+
},
|
|
391
|
+
disabledReasons: {
|
|
392
|
+
classPropertyName: "disabledReasons",
|
|
393
|
+
publicName: "disabledReasons",
|
|
394
|
+
isSignal: true,
|
|
395
|
+
isRequired: false,
|
|
396
|
+
transformFunction: null
|
|
397
|
+
},
|
|
398
|
+
readonly: {
|
|
399
|
+
classPropertyName: "readonly",
|
|
400
|
+
publicName: "readonly",
|
|
401
|
+
isSignal: true,
|
|
402
|
+
isRequired: false,
|
|
403
|
+
transformFunction: null
|
|
404
|
+
},
|
|
405
|
+
required: {
|
|
406
|
+
classPropertyName: "required",
|
|
407
|
+
publicName: "required",
|
|
408
|
+
isSignal: true,
|
|
409
|
+
isRequired: false,
|
|
410
|
+
transformFunction: null
|
|
411
|
+
},
|
|
412
|
+
hidden: {
|
|
413
|
+
classPropertyName: "hidden",
|
|
414
|
+
publicName: "hidden",
|
|
415
|
+
isSignal: true,
|
|
416
|
+
isRequired: false,
|
|
417
|
+
transformFunction: null
|
|
418
|
+
},
|
|
419
|
+
name: {
|
|
420
|
+
classPropertyName: "name",
|
|
421
|
+
publicName: "name",
|
|
422
|
+
isSignal: true,
|
|
423
|
+
isRequired: false,
|
|
424
|
+
transformFunction: null
|
|
425
|
+
},
|
|
426
|
+
minLength: {
|
|
427
|
+
classPropertyName: "minLength",
|
|
428
|
+
publicName: "minLength",
|
|
429
|
+
isSignal: true,
|
|
430
|
+
isRequired: false,
|
|
431
|
+
transformFunction: null
|
|
432
|
+
},
|
|
433
|
+
maxLength: {
|
|
434
|
+
classPropertyName: "maxLength",
|
|
435
|
+
publicName: "maxLength",
|
|
436
|
+
isSignal: true,
|
|
437
|
+
isRequired: false,
|
|
438
|
+
transformFunction: null
|
|
439
|
+
},
|
|
440
|
+
pattern: {
|
|
441
|
+
classPropertyName: "pattern",
|
|
442
|
+
publicName: "pattern",
|
|
443
|
+
isSignal: true,
|
|
444
|
+
isRequired: false,
|
|
445
|
+
transformFunction: null
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
outputs: { touch: "touch" },
|
|
449
|
+
host: { properties: { "attr.hidden": "hidden() ? \"\" : null" } },
|
|
450
|
+
viewQueries: [{
|
|
451
|
+
propertyName: "champ",
|
|
452
|
+
first: true,
|
|
453
|
+
predicate: ["champ"],
|
|
454
|
+
descendants: true,
|
|
455
|
+
isSignal: true
|
|
456
|
+
}],
|
|
457
|
+
ngImport: i0
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
461
|
+
minVersion: "12.0.0",
|
|
462
|
+
version: "22.2.2",
|
|
463
|
+
ngImport: i0,
|
|
464
|
+
type: ContratDeChamp,
|
|
465
|
+
decorators: [{
|
|
466
|
+
type: Directive,
|
|
467
|
+
args: [{ host: { "[attr.hidden]": "hidden() ? \"\" : null" } }]
|
|
468
|
+
}],
|
|
469
|
+
propDecorators: {
|
|
470
|
+
libelle: [{
|
|
471
|
+
type: i0.Input,
|
|
472
|
+
args: [{
|
|
473
|
+
isSignal: true,
|
|
474
|
+
alias: "libelle",
|
|
475
|
+
required: true
|
|
476
|
+
}]
|
|
477
|
+
}],
|
|
478
|
+
aide: [{
|
|
479
|
+
type: i0.Input,
|
|
480
|
+
args: [{
|
|
481
|
+
isSignal: true,
|
|
482
|
+
alias: "aide",
|
|
483
|
+
required: false
|
|
484
|
+
}]
|
|
485
|
+
}],
|
|
486
|
+
errors: [{
|
|
487
|
+
type: i0.Input,
|
|
488
|
+
args: [{
|
|
489
|
+
isSignal: true,
|
|
490
|
+
alias: "errors",
|
|
491
|
+
required: false
|
|
492
|
+
}]
|
|
493
|
+
}],
|
|
494
|
+
touched: [{
|
|
495
|
+
type: i0.Input,
|
|
496
|
+
args: [{
|
|
497
|
+
isSignal: true,
|
|
498
|
+
alias: "touched",
|
|
499
|
+
required: false
|
|
500
|
+
}]
|
|
501
|
+
}],
|
|
502
|
+
dirty: [{
|
|
503
|
+
type: i0.Input,
|
|
504
|
+
args: [{
|
|
505
|
+
isSignal: true,
|
|
506
|
+
alias: "dirty",
|
|
507
|
+
required: false
|
|
508
|
+
}]
|
|
509
|
+
}],
|
|
510
|
+
pending: [{
|
|
511
|
+
type: i0.Input,
|
|
512
|
+
args: [{
|
|
513
|
+
isSignal: true,
|
|
514
|
+
alias: "pending",
|
|
515
|
+
required: false
|
|
516
|
+
}]
|
|
517
|
+
}],
|
|
518
|
+
disabled: [{
|
|
519
|
+
type: i0.Input,
|
|
520
|
+
args: [{
|
|
521
|
+
isSignal: true,
|
|
522
|
+
alias: "disabled",
|
|
523
|
+
required: false
|
|
524
|
+
}]
|
|
525
|
+
}],
|
|
526
|
+
disabledReasons: [{
|
|
527
|
+
type: i0.Input,
|
|
528
|
+
args: [{
|
|
529
|
+
isSignal: true,
|
|
530
|
+
alias: "disabledReasons",
|
|
531
|
+
required: false
|
|
532
|
+
}]
|
|
533
|
+
}],
|
|
534
|
+
readonly: [{
|
|
535
|
+
type: i0.Input,
|
|
536
|
+
args: [{
|
|
537
|
+
isSignal: true,
|
|
538
|
+
alias: "readonly",
|
|
539
|
+
required: false
|
|
540
|
+
}]
|
|
541
|
+
}],
|
|
542
|
+
required: [{
|
|
543
|
+
type: i0.Input,
|
|
544
|
+
args: [{
|
|
545
|
+
isSignal: true,
|
|
546
|
+
alias: "required",
|
|
547
|
+
required: false
|
|
548
|
+
}]
|
|
549
|
+
}],
|
|
550
|
+
hidden: [{
|
|
551
|
+
type: i0.Input,
|
|
552
|
+
args: [{
|
|
553
|
+
isSignal: true,
|
|
554
|
+
alias: "hidden",
|
|
555
|
+
required: false
|
|
556
|
+
}]
|
|
557
|
+
}],
|
|
558
|
+
name: [{
|
|
559
|
+
type: i0.Input,
|
|
560
|
+
args: [{
|
|
561
|
+
isSignal: true,
|
|
562
|
+
alias: "name",
|
|
563
|
+
required: false
|
|
564
|
+
}]
|
|
565
|
+
}],
|
|
566
|
+
minLength: [{
|
|
567
|
+
type: i0.Input,
|
|
568
|
+
args: [{
|
|
569
|
+
isSignal: true,
|
|
570
|
+
alias: "minLength",
|
|
571
|
+
required: false
|
|
572
|
+
}]
|
|
573
|
+
}],
|
|
574
|
+
maxLength: [{
|
|
575
|
+
type: i0.Input,
|
|
576
|
+
args: [{
|
|
577
|
+
isSignal: true,
|
|
578
|
+
alias: "maxLength",
|
|
579
|
+
required: false
|
|
580
|
+
}]
|
|
581
|
+
}],
|
|
582
|
+
pattern: [{
|
|
583
|
+
type: i0.Input,
|
|
584
|
+
args: [{
|
|
585
|
+
isSignal: true,
|
|
586
|
+
alias: "pattern",
|
|
587
|
+
required: false
|
|
588
|
+
}]
|
|
589
|
+
}],
|
|
590
|
+
touch: [{
|
|
591
|
+
type: i0.Output,
|
|
592
|
+
args: ["touch"]
|
|
593
|
+
}],
|
|
594
|
+
champ: [{
|
|
595
|
+
type: i0.ViewChild,
|
|
596
|
+
args: ["champ", { isSignal: true }]
|
|
597
|
+
}]
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
var ContratDeChampABornes = class ContratDeChampABornes extends ContratDeChamp {
|
|
601
|
+
min = input(void 0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
602
|
+
max = input(void 0, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
603
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
604
|
+
minVersion: "12.0.0",
|
|
605
|
+
version: "22.2.2",
|
|
606
|
+
ngImport: i0,
|
|
607
|
+
type: ContratDeChampABornes,
|
|
608
|
+
deps: null,
|
|
609
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
610
|
+
});
|
|
611
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
612
|
+
minVersion: "17.1.0",
|
|
613
|
+
version: "22.2.2",
|
|
614
|
+
type: ContratDeChampABornes,
|
|
615
|
+
isStandalone: true,
|
|
616
|
+
inputs: {
|
|
617
|
+
min: {
|
|
618
|
+
classPropertyName: "min",
|
|
619
|
+
publicName: "min",
|
|
620
|
+
isSignal: true,
|
|
621
|
+
isRequired: false,
|
|
622
|
+
transformFunction: null
|
|
623
|
+
},
|
|
624
|
+
max: {
|
|
625
|
+
classPropertyName: "max",
|
|
626
|
+
publicName: "max",
|
|
627
|
+
isSignal: true,
|
|
628
|
+
isRequired: false,
|
|
629
|
+
transformFunction: null
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
usesInheritance: true,
|
|
633
|
+
ngImport: i0
|
|
634
|
+
});
|
|
635
|
+
};
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
637
|
+
minVersion: "12.0.0",
|
|
638
|
+
version: "22.2.2",
|
|
639
|
+
ngImport: i0,
|
|
640
|
+
type: ContratDeChampABornes,
|
|
641
|
+
decorators: [{ type: Directive }],
|
|
642
|
+
propDecorators: {
|
|
643
|
+
min: [{
|
|
644
|
+
type: i0.Input,
|
|
645
|
+
args: [{
|
|
646
|
+
isSignal: true,
|
|
647
|
+
alias: "min",
|
|
648
|
+
required: false
|
|
649
|
+
}]
|
|
650
|
+
}],
|
|
651
|
+
max: [{
|
|
652
|
+
type: i0.Input,
|
|
653
|
+
args: [{
|
|
654
|
+
isSignal: true,
|
|
655
|
+
alias: "max",
|
|
656
|
+
required: false
|
|
657
|
+
}]
|
|
658
|
+
}]
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
var ControleDeSaisie = class ControleDeSaisie extends ContratDeChamp {
|
|
662
|
+
value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
663
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
664
|
+
minVersion: "12.0.0",
|
|
665
|
+
version: "22.2.2",
|
|
666
|
+
ngImport: i0,
|
|
667
|
+
type: ControleDeSaisie,
|
|
668
|
+
deps: null,
|
|
669
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
670
|
+
});
|
|
671
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
672
|
+
minVersion: "17.1.0",
|
|
673
|
+
version: "22.2.2",
|
|
674
|
+
type: ControleDeSaisie,
|
|
675
|
+
isStandalone: true,
|
|
676
|
+
inputs: { value: {
|
|
677
|
+
classPropertyName: "value",
|
|
678
|
+
publicName: "value",
|
|
679
|
+
isSignal: true,
|
|
680
|
+
isRequired: false,
|
|
681
|
+
transformFunction: null
|
|
682
|
+
} },
|
|
683
|
+
outputs: { value: "valueChange" },
|
|
684
|
+
usesInheritance: true,
|
|
685
|
+
ngImport: i0
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
689
|
+
minVersion: "12.0.0",
|
|
690
|
+
version: "22.2.2",
|
|
691
|
+
ngImport: i0,
|
|
692
|
+
type: ControleDeSaisie,
|
|
693
|
+
decorators: [{ type: Directive }],
|
|
694
|
+
propDecorators: { value: [{
|
|
695
|
+
type: i0.Input,
|
|
696
|
+
args: [{
|
|
697
|
+
isSignal: true,
|
|
698
|
+
alias: "value",
|
|
699
|
+
required: false
|
|
700
|
+
}]
|
|
701
|
+
}, {
|
|
702
|
+
type: i0.Output,
|
|
703
|
+
args: ["valueChange"]
|
|
704
|
+
}] }
|
|
705
|
+
});
|
|
706
|
+
var ContratDeCase = class ContratDeCase extends ContratDeChamp {
|
|
707
|
+
checked = model(false, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
708
|
+
surClic(evenement) {
|
|
709
|
+
if (this.readonly()) evenement.preventDefault();
|
|
710
|
+
}
|
|
711
|
+
surBascule(evenement) {
|
|
712
|
+
const element = evenement.target;
|
|
713
|
+
if (this.readonly()) {
|
|
714
|
+
element.checked = this.checked();
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
this.checked.set(element.checked);
|
|
718
|
+
}
|
|
719
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
720
|
+
minVersion: "12.0.0",
|
|
721
|
+
version: "22.2.2",
|
|
722
|
+
ngImport: i0,
|
|
723
|
+
type: ContratDeCase,
|
|
724
|
+
deps: null,
|
|
725
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
726
|
+
});
|
|
727
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
728
|
+
minVersion: "17.1.0",
|
|
729
|
+
version: "22.2.2",
|
|
730
|
+
type: ContratDeCase,
|
|
731
|
+
isStandalone: true,
|
|
732
|
+
inputs: { checked: {
|
|
733
|
+
classPropertyName: "checked",
|
|
734
|
+
publicName: "checked",
|
|
735
|
+
isSignal: true,
|
|
736
|
+
isRequired: false,
|
|
737
|
+
transformFunction: null
|
|
738
|
+
} },
|
|
739
|
+
outputs: { checked: "checkedChange" },
|
|
740
|
+
usesInheritance: true,
|
|
741
|
+
ngImport: i0
|
|
742
|
+
});
|
|
743
|
+
};
|
|
744
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
745
|
+
minVersion: "12.0.0",
|
|
746
|
+
version: "22.2.2",
|
|
747
|
+
ngImport: i0,
|
|
748
|
+
type: ContratDeCase,
|
|
749
|
+
decorators: [{ type: Directive }],
|
|
750
|
+
propDecorators: { checked: [{
|
|
751
|
+
type: i0.Input,
|
|
752
|
+
args: [{
|
|
753
|
+
isSignal: true,
|
|
754
|
+
alias: "checked",
|
|
755
|
+
required: false
|
|
756
|
+
}]
|
|
757
|
+
}, {
|
|
758
|
+
type: i0.Output,
|
|
759
|
+
args: ["checkedChange"]
|
|
760
|
+
}] }
|
|
761
|
+
});
|
|
762
|
+
var StNomsDesChamps = class StNomsDesChamps {
|
|
763
|
+
noms = /* @__PURE__ */ new WeakMap();
|
|
764
|
+
nomDe(element) {
|
|
765
|
+
const nom = this.noms.get(element);
|
|
766
|
+
if (nom === void 0) return null;
|
|
767
|
+
try {
|
|
768
|
+
return nom();
|
|
769
|
+
} catch {
|
|
770
|
+
return null;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
poser(element, nom) {
|
|
774
|
+
this.noms.set(element, nom);
|
|
775
|
+
}
|
|
776
|
+
retirer(element) {
|
|
777
|
+
this.noms.delete(element);
|
|
778
|
+
}
|
|
779
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
780
|
+
minVersion: "12.0.0",
|
|
781
|
+
version: "22.2.2",
|
|
782
|
+
ngImport: i0,
|
|
783
|
+
type: StNomsDesChamps,
|
|
784
|
+
deps: [],
|
|
785
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
786
|
+
});
|
|
787
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
788
|
+
minVersion: "12.0.0",
|
|
789
|
+
version: "22.2.2",
|
|
790
|
+
ngImport: i0,
|
|
791
|
+
type: StNomsDesChamps,
|
|
792
|
+
providedIn: "root"
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
796
|
+
minVersion: "12.0.0",
|
|
797
|
+
version: "22.2.2",
|
|
798
|
+
ngImport: i0,
|
|
799
|
+
type: StNomsDesChamps,
|
|
800
|
+
decorators: [{
|
|
801
|
+
type: Injectable,
|
|
802
|
+
args: [{ providedIn: "root" }]
|
|
803
|
+
}]
|
|
804
|
+
});
|
|
805
|
+
var PorteurDErreurs = class PorteurDErreurs {
|
|
806
|
+
libelles = inject(ST_LIBELLES);
|
|
807
|
+
locale = inject(ST_LOCALE);
|
|
808
|
+
aide = input(null, ...ngDevMode ? [{ debugName: "aide" }] : /* istanbul ignore next */ []);
|
|
809
|
+
erreurs = input([], ...ngDevMode ? [{ debugName: "erreurs" }] : /* istanbul ignore next */ []);
|
|
810
|
+
afficherErreurs = input(false, {
|
|
811
|
+
...ngDevMode ? { debugName: "afficherErreurs" } : /* istanbul ignore next */ {},
|
|
812
|
+
transform: booleanAttribute
|
|
813
|
+
});
|
|
814
|
+
toutesLesErreurs = input(false, {
|
|
815
|
+
...ngDevMode ? { debugName: "toutesLesErreurs" } : /* istanbul ignore next */ {},
|
|
816
|
+
transform: booleanAttribute
|
|
817
|
+
});
|
|
818
|
+
obligatoire = input(false, {
|
|
819
|
+
...ngDevMode ? { debugName: "obligatoire" } : /* istanbul ignore next */ {},
|
|
820
|
+
transform: booleanAttribute
|
|
821
|
+
});
|
|
822
|
+
racine = inject(StIdentifiants).prochain(this.prefixeDIdentifiant());
|
|
823
|
+
constructor() {
|
|
824
|
+
const noms = inject(StNomsDesChamps);
|
|
825
|
+
const element = inject(ElementRef).nativeElement;
|
|
826
|
+
noms.poser(element, computed(() => this.nom()));
|
|
827
|
+
inject(DestroyRef).onDestroy(() => {
|
|
828
|
+
noms.retirer(element);
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
libelleObligatoire = computed(() => this.libelles().obligatoire, ...ngDevMode ? [{ debugName: "libelleObligatoire" }] : /* istanbul ignore next */ []);
|
|
832
|
+
asterisque = inject(ST_MARQUE_D_OBLIGATION) === "asterisque";
|
|
833
|
+
aideRendue = computed(() => texteRendu(this.aide()), ...ngDevMode ? [{ debugName: "aideRendue" }] : /* istanbul ignore next */ []);
|
|
834
|
+
messages = computed(() => {
|
|
835
|
+
if (!this.afficherErreurs()) return [];
|
|
836
|
+
const erreurs = this.toutesLesErreurs() ? this.erreurs() : this.erreurs().slice(0, 1);
|
|
837
|
+
const libelles = this.libelles();
|
|
838
|
+
const locale = this.locale();
|
|
839
|
+
return erreurs.map((erreur) => messageDErreur(erreur, libelles, locale));
|
|
840
|
+
}, ...ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []);
|
|
841
|
+
enErreur = computed(() => this.messages().length > 0, ...ngDevMode ? [{ debugName: "enErreur" }] : /* istanbul ignore next */ []);
|
|
842
|
+
descriptions = computed(() => {
|
|
843
|
+
const ids = [];
|
|
844
|
+
if (this.aideRendue() !== null) ids.push(this.identifiants.aide);
|
|
845
|
+
ids.push(...this.descriptionsPropres());
|
|
846
|
+
if (this.enErreur()) ids.push(this.identifiants.erreur);
|
|
847
|
+
return ids.length === 0 ? null : ids.join(" ");
|
|
848
|
+
}, ...ngDevMode ? [{ debugName: "descriptions" }] : /* istanbul ignore next */ []);
|
|
849
|
+
descriptionsPropres() {
|
|
850
|
+
return [];
|
|
851
|
+
}
|
|
852
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
853
|
+
minVersion: "12.0.0",
|
|
854
|
+
version: "22.2.2",
|
|
855
|
+
ngImport: i0,
|
|
856
|
+
type: PorteurDErreurs,
|
|
857
|
+
deps: [],
|
|
858
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
859
|
+
});
|
|
860
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
861
|
+
minVersion: "17.1.0",
|
|
862
|
+
version: "22.2.2",
|
|
863
|
+
type: PorteurDErreurs,
|
|
864
|
+
isStandalone: true,
|
|
865
|
+
inputs: {
|
|
866
|
+
aide: {
|
|
867
|
+
classPropertyName: "aide",
|
|
868
|
+
publicName: "aide",
|
|
869
|
+
isSignal: true,
|
|
870
|
+
isRequired: false,
|
|
871
|
+
transformFunction: null
|
|
872
|
+
},
|
|
873
|
+
erreurs: {
|
|
874
|
+
classPropertyName: "erreurs",
|
|
875
|
+
publicName: "erreurs",
|
|
876
|
+
isSignal: true,
|
|
877
|
+
isRequired: false,
|
|
878
|
+
transformFunction: null
|
|
879
|
+
},
|
|
880
|
+
afficherErreurs: {
|
|
881
|
+
classPropertyName: "afficherErreurs",
|
|
882
|
+
publicName: "afficherErreurs",
|
|
883
|
+
isSignal: true,
|
|
884
|
+
isRequired: false,
|
|
885
|
+
transformFunction: null
|
|
886
|
+
},
|
|
887
|
+
toutesLesErreurs: {
|
|
888
|
+
classPropertyName: "toutesLesErreurs",
|
|
889
|
+
publicName: "toutesLesErreurs",
|
|
890
|
+
isSignal: true,
|
|
891
|
+
isRequired: false,
|
|
892
|
+
transformFunction: null
|
|
893
|
+
},
|
|
894
|
+
obligatoire: {
|
|
895
|
+
classPropertyName: "obligatoire",
|
|
896
|
+
publicName: "obligatoire",
|
|
897
|
+
isSignal: true,
|
|
898
|
+
isRequired: false,
|
|
899
|
+
transformFunction: null
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
ngImport: i0
|
|
903
|
+
});
|
|
904
|
+
};
|
|
905
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
906
|
+
minVersion: "12.0.0",
|
|
907
|
+
version: "22.2.2",
|
|
908
|
+
ngImport: i0,
|
|
909
|
+
type: PorteurDErreurs,
|
|
910
|
+
decorators: [{ type: Directive }],
|
|
911
|
+
ctorParameters: () => [],
|
|
912
|
+
propDecorators: {
|
|
913
|
+
aide: [{
|
|
914
|
+
type: i0.Input,
|
|
915
|
+
args: [{
|
|
916
|
+
isSignal: true,
|
|
917
|
+
alias: "aide",
|
|
918
|
+
required: false
|
|
919
|
+
}]
|
|
920
|
+
}],
|
|
921
|
+
erreurs: [{
|
|
922
|
+
type: i0.Input,
|
|
923
|
+
args: [{
|
|
924
|
+
isSignal: true,
|
|
925
|
+
alias: "erreurs",
|
|
926
|
+
required: false
|
|
927
|
+
}]
|
|
928
|
+
}],
|
|
929
|
+
afficherErreurs: [{
|
|
930
|
+
type: i0.Input,
|
|
931
|
+
args: [{
|
|
932
|
+
isSignal: true,
|
|
933
|
+
alias: "afficherErreurs",
|
|
934
|
+
required: false
|
|
935
|
+
}]
|
|
936
|
+
}],
|
|
937
|
+
toutesLesErreurs: [{
|
|
938
|
+
type: i0.Input,
|
|
939
|
+
args: [{
|
|
940
|
+
isSignal: true,
|
|
941
|
+
alias: "toutesLesErreurs",
|
|
942
|
+
required: false
|
|
943
|
+
}]
|
|
944
|
+
}],
|
|
945
|
+
obligatoire: [{
|
|
946
|
+
type: i0.Input,
|
|
947
|
+
args: [{
|
|
948
|
+
isSignal: true,
|
|
949
|
+
alias: "obligatoire",
|
|
950
|
+
required: false
|
|
951
|
+
}]
|
|
952
|
+
}]
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
function texteRendu(texte) {
|
|
956
|
+
return texte === null || texte === void 0 || texte.trim() === "" ? null : texte;
|
|
957
|
+
}
|
|
958
|
+
const ELEMENTS_ETIQUETABLES = /* @__PURE__ */ new Set([
|
|
959
|
+
"INPUT",
|
|
960
|
+
"SELECT",
|
|
961
|
+
"TEXTAREA",
|
|
962
|
+
"BUTTON",
|
|
963
|
+
"METER",
|
|
964
|
+
"OUTPUT",
|
|
965
|
+
"PROGRESS"
|
|
966
|
+
]);
|
|
967
|
+
var StControleDeChamp = class StControleDeChamp {
|
|
968
|
+
champ = inject(StFormField);
|
|
969
|
+
etiquetable = ELEMENTS_ETIQUETABLES.has(inject(ElementRef).nativeElement.tagName);
|
|
970
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
971
|
+
minVersion: "12.0.0",
|
|
972
|
+
version: "22.2.2",
|
|
973
|
+
ngImport: i0,
|
|
974
|
+
type: StControleDeChamp,
|
|
975
|
+
deps: [],
|
|
976
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
977
|
+
});
|
|
978
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
979
|
+
minVersion: "14.0.0",
|
|
980
|
+
version: "22.2.2",
|
|
981
|
+
type: StControleDeChamp,
|
|
982
|
+
isStandalone: true,
|
|
983
|
+
selector: "[stControleDeChamp]",
|
|
984
|
+
host: { properties: {
|
|
985
|
+
"id": "champ.identifiants.controle",
|
|
986
|
+
"attr.aria-labelledby": "etiquetable ? null : champ.identifiants.libelle",
|
|
987
|
+
"attr.aria-describedby": "champ.descriptions()",
|
|
988
|
+
"attr.aria-invalid": "champ.enErreur() ? \"true\" : null",
|
|
989
|
+
"attr.aria-errormessage": "champ.enErreur() ? champ.identifiants.erreur : null",
|
|
990
|
+
"attr.aria-required": "champ.obligatoire() ? \"true\" : null"
|
|
991
|
+
} },
|
|
992
|
+
ngImport: i0
|
|
993
|
+
});
|
|
994
|
+
};
|
|
995
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
996
|
+
minVersion: "12.0.0",
|
|
997
|
+
version: "22.2.2",
|
|
998
|
+
ngImport: i0,
|
|
999
|
+
type: StControleDeChamp,
|
|
1000
|
+
decorators: [{
|
|
1001
|
+
type: Directive,
|
|
1002
|
+
args: [{
|
|
1003
|
+
selector: "[stControleDeChamp]",
|
|
1004
|
+
host: {
|
|
1005
|
+
"[id]": "champ.identifiants.controle",
|
|
1006
|
+
"[attr.aria-labelledby]": "etiquetable ? null : champ.identifiants.libelle",
|
|
1007
|
+
"[attr.aria-describedby]": "champ.descriptions()",
|
|
1008
|
+
"[attr.aria-invalid]": "champ.enErreur() ? \"true\" : null",
|
|
1009
|
+
"[attr.aria-errormessage]": "champ.enErreur() ? champ.identifiants.erreur : null",
|
|
1010
|
+
"[attr.aria-required]": "champ.obligatoire() ? \"true\" : null"
|
|
1011
|
+
}
|
|
1012
|
+
}]
|
|
1013
|
+
}]
|
|
1014
|
+
});
|
|
1015
|
+
var StFormField = class StFormField extends PorteurDErreurs {
|
|
1016
|
+
libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
1017
|
+
complement = input(null, ...ngDevMode ? [{ debugName: "complement" }] : /* istanbul ignore next */ []);
|
|
1018
|
+
disposition = input("empilee", ...ngDevMode ? [{ debugName: "disposition" }] : /* istanbul ignore next */ []);
|
|
1019
|
+
presentation = input("libelle", ...ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []);
|
|
1020
|
+
libelleMasque = input(false, {
|
|
1021
|
+
...ngDevMode ? { debugName: "libelleMasque" } : /* istanbul ignore next */ {},
|
|
1022
|
+
transform: booleanAttribute
|
|
1023
|
+
});
|
|
1024
|
+
descriptionsDuControle = input([], ...ngDevMode ? [{ debugName: "descriptionsDuControle" }] : /* istanbul ignore next */ []);
|
|
1025
|
+
identifiants = {
|
|
1026
|
+
controle: this.racine,
|
|
1027
|
+
libelle: `${this.racine}-libelle`,
|
|
1028
|
+
aide: `${this.racine}-aide`,
|
|
1029
|
+
meta: `${this.racine}-meta`,
|
|
1030
|
+
indication: `${this.racine}-indication`,
|
|
1031
|
+
complement: `${this.racine}-complement`,
|
|
1032
|
+
erreur: `${this.racine}-erreur`
|
|
1033
|
+
};
|
|
1034
|
+
complementRendu = computed(() => texteRendu(this.complement()), ...ngDevMode ? [{ debugName: "complementRendu" }] : /* istanbul ignore next */ []);
|
|
1035
|
+
controle = contentChild(StControleDeChamp, {
|
|
1036
|
+
...ngDevMode ? { debugName: "controle" } : /* istanbul ignore next */ {},
|
|
1037
|
+
descendants: true,
|
|
1038
|
+
read: ElementRef
|
|
1039
|
+
});
|
|
1040
|
+
zoneDeMeta = viewChild("meta", ...ngDevMode ? [{ debugName: "zoneDeMeta" }] : /* istanbul ignore next */ []);
|
|
1041
|
+
zoneDIndication = viewChild("indication", ...ngDevMode ? [{ debugName: "zoneDIndication" }] : /* istanbul ignore next */ []);
|
|
1042
|
+
metaPresente = signal(false, ...ngDevMode ? [{ debugName: "metaPresente" }] : /* istanbul ignore next */ []);
|
|
1043
|
+
indicationPresente = signal(false, ...ngDevMode ? [{ debugName: "indicationPresente" }] : /* istanbul ignore next */ []);
|
|
1044
|
+
zoneDuLibelleRiche = viewChild("libelleRiche", ...ngDevMode ? [{ debugName: "zoneDuLibelleRiche" }] : /* istanbul ignore next */ []);
|
|
1045
|
+
libelleRichePresent = signal(false, ...ngDevMode ? [{ debugName: "libelleRichePresent" }] : /* istanbul ignore next */ []);
|
|
1046
|
+
nom() {
|
|
1047
|
+
return this.libelle();
|
|
1048
|
+
}
|
|
1049
|
+
constructor() {
|
|
1050
|
+
super();
|
|
1051
|
+
afterEveryRender({ read: () => {
|
|
1052
|
+
const meta = contientQuelqueChose(this.zoneDeMeta()?.nativeElement);
|
|
1053
|
+
if (meta !== this.metaPresente()) this.metaPresente.set(meta);
|
|
1054
|
+
const indication = contientQuelqueChose(this.zoneDIndication()?.nativeElement);
|
|
1055
|
+
if (indication !== this.indicationPresente()) this.indicationPresente.set(indication);
|
|
1056
|
+
const riche = contientQuelqueChose(this.zoneDuLibelleRiche()?.nativeElement);
|
|
1057
|
+
if (riche !== this.libelleRichePresent()) this.libelleRichePresent.set(riche);
|
|
1058
|
+
} });
|
|
1059
|
+
if (typeof ngDevMode === "undefined" || !!ngDevMode) afterNextRender(() => {
|
|
1060
|
+
if (this.controle() === void 0) console.warn(`[st-form-field] "${this.libelle()}" : aucun controle [stControleDeChamp] projete ; etiquette, aide et erreur ne lui sont pas reliees.`);
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
prefixeDIdentifiant() {
|
|
1064
|
+
return "st-champ";
|
|
1065
|
+
}
|
|
1066
|
+
descriptionsPropres() {
|
|
1067
|
+
const ids = [];
|
|
1068
|
+
if (this.metaPresente()) ids.push(this.identifiants.meta);
|
|
1069
|
+
ids.push(...this.descriptionsDuControle());
|
|
1070
|
+
if (this.indicationPresente() && !this.enErreur()) ids.push(this.identifiants.indication);
|
|
1071
|
+
if (this.complementRendu() !== null) ids.push(this.identifiants.complement);
|
|
1072
|
+
return ids;
|
|
1073
|
+
}
|
|
1074
|
+
focaliserLeControle() {
|
|
1075
|
+
const controle = this.controle()?.nativeElement;
|
|
1076
|
+
if (controle !== void 0 && !ELEMENTS_ETIQUETABLES.has(controle.tagName)) controle.focus();
|
|
1077
|
+
}
|
|
1078
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1079
|
+
minVersion: "12.0.0",
|
|
1080
|
+
version: "22.2.2",
|
|
1081
|
+
ngImport: i0,
|
|
1082
|
+
type: StFormField,
|
|
1083
|
+
deps: [],
|
|
1084
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1085
|
+
});
|
|
1086
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1087
|
+
minVersion: "17.0.0",
|
|
1088
|
+
version: "22.2.2",
|
|
1089
|
+
type: StFormField,
|
|
1090
|
+
isStandalone: true,
|
|
1091
|
+
selector: "st-form-field",
|
|
1092
|
+
inputs: {
|
|
1093
|
+
libelle: {
|
|
1094
|
+
classPropertyName: "libelle",
|
|
1095
|
+
publicName: "libelle",
|
|
1096
|
+
isSignal: true,
|
|
1097
|
+
isRequired: true,
|
|
1098
|
+
transformFunction: null
|
|
1099
|
+
},
|
|
1100
|
+
complement: {
|
|
1101
|
+
classPropertyName: "complement",
|
|
1102
|
+
publicName: "complement",
|
|
1103
|
+
isSignal: true,
|
|
1104
|
+
isRequired: false,
|
|
1105
|
+
transformFunction: null
|
|
1106
|
+
},
|
|
1107
|
+
disposition: {
|
|
1108
|
+
classPropertyName: "disposition",
|
|
1109
|
+
publicName: "disposition",
|
|
1110
|
+
isSignal: true,
|
|
1111
|
+
isRequired: false,
|
|
1112
|
+
transformFunction: null
|
|
1113
|
+
},
|
|
1114
|
+
presentation: {
|
|
1115
|
+
classPropertyName: "presentation",
|
|
1116
|
+
publicName: "presentation",
|
|
1117
|
+
isSignal: true,
|
|
1118
|
+
isRequired: false,
|
|
1119
|
+
transformFunction: null
|
|
1120
|
+
},
|
|
1121
|
+
libelleMasque: {
|
|
1122
|
+
classPropertyName: "libelleMasque",
|
|
1123
|
+
publicName: "libelleMasque",
|
|
1124
|
+
isSignal: true,
|
|
1125
|
+
isRequired: false,
|
|
1126
|
+
transformFunction: null
|
|
1127
|
+
},
|
|
1128
|
+
descriptionsDuControle: {
|
|
1129
|
+
classPropertyName: "descriptionsDuControle",
|
|
1130
|
+
publicName: "descriptionsDuControle",
|
|
1131
|
+
isSignal: true,
|
|
1132
|
+
isRequired: false,
|
|
1133
|
+
transformFunction: null
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
host: {
|
|
1137
|
+
properties: {
|
|
1138
|
+
"attr.data-en-erreur": "enErreur() ? \"\" : null",
|
|
1139
|
+
"attr.data-disposition": "disposition()",
|
|
1140
|
+
"attr.data-presentation": "presentation()"
|
|
1141
|
+
},
|
|
1142
|
+
classAttribute: "st-form-field"
|
|
1143
|
+
},
|
|
1144
|
+
queries: [{
|
|
1145
|
+
propertyName: "controle",
|
|
1146
|
+
first: true,
|
|
1147
|
+
predicate: StControleDeChamp,
|
|
1148
|
+
descendants: true,
|
|
1149
|
+
read: ElementRef,
|
|
1150
|
+
isSignal: true
|
|
1151
|
+
}],
|
|
1152
|
+
viewQueries: [
|
|
1153
|
+
{
|
|
1154
|
+
propertyName: "zoneDeMeta",
|
|
1155
|
+
first: true,
|
|
1156
|
+
predicate: ["meta"],
|
|
1157
|
+
descendants: true,
|
|
1158
|
+
isSignal: true
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
propertyName: "zoneDIndication",
|
|
1162
|
+
first: true,
|
|
1163
|
+
predicate: ["indication"],
|
|
1164
|
+
descendants: true,
|
|
1165
|
+
isSignal: true
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
propertyName: "zoneDuLibelleRiche",
|
|
1169
|
+
first: true,
|
|
1170
|
+
predicate: ["libelleRiche"],
|
|
1171
|
+
descendants: true,
|
|
1172
|
+
isSignal: true
|
|
1173
|
+
}
|
|
1174
|
+
],
|
|
1175
|
+
usesInheritance: true,
|
|
1176
|
+
ngImport: i0,
|
|
1177
|
+
template: "<!-- Une grille interieure : l'hote peut ainsi etre le conteneur de requete de `en-ligne`. -->\n<div class=\"st-form-field__grille\">\n <!-- En-tete : l'etiquette (et sa mention), la meta projetee a droite. -->\n <div class=\"st-form-field__entete\">\n <!-- Exception de eslint.config.mjs (clic sans clavier sur l'etiquette) :\n Le clic sur une etiquette est une commodite de souris, comme pour tout\n champ natif : au clavier, le controle se rejoint par tabulation, et\n l'etiquette n'a pas a recevoir le focus. -->\n <label\n class=\"st-form-field__libelle\"\n [class.st-vh]=\"libelleMasque()\"\n [id]=\"identifiants.libelle\"\n [for]=\"identifiants.controle\"\n [attr.data-libelle]=\"libelle()\"\n (click)=\"focaliserLeControle()\"\n >\n <!-- Libelle riche (lot 218) : un [stLibelle] projete (un lien vers les conditions generales)\n prend la place du texte ; sans lui, le libelle. Releve au rendu : relaye par un champ du\n socle, le contenu echappe aux requetes, et une fente relayee vide compterait comme remplie.\n Aucun blanc autour du texte : la largeur minimale de l'etiquette est mesuree. -->\n <span class=\"st-form-field__texte\"\n ><span #libelleRiche class=\"st-form-field__libelle-riche\"\n ><ng-content select=\"[stLibelle]\" /></span\n >{{ libelleRichePresent() ? '' : libelle() }}\n @if (obligatoire() && asterisque) {\n <span class=\"st-form-field__asterisque\" aria-hidden=\"true\">*</span>\n }\n </span>\n @if (obligatoire() && !asterisque) {\n <span class=\"st-form-field__obligatoire\">{{ libelleObligatoire() }}</span>\n }\n </label>\n <!-- L'aide contextuelle (lot 265) : HORS de l'etiquette, son nom n'entre pas dans celui du\n champ ; elle suit l'etiquette et sa mention. -->\n <span class=\"st-form-field__aide-contextuelle\"><ng-content select=\"[stAide]\" /></span>\n <span #meta class=\"st-form-field__meta\" [id]=\"identifiants.meta\"\n ><ng-content select=\"[stMeta]\"\n /></span>\n </div>\n\n @if (aideRendue(); as texte) {\n <p class=\"st-form-field__aide\" [id]=\"identifiants.aide\">{{ texte }}</p>\n }\n\n <!-- Le message : l'erreur, et a defaut l'indication projetee, a la meme place. -->\n @if (enErreur()) {\n <div class=\"st-form-field__erreurs\" [id]=\"identifiants.erreur\">\n @for (message of messages(); track $index) {\n <st-inline-message ton=\"erreur\">{{ message }}</st-inline-message>\n }\n </div>\n }\n <div\n #indication\n class=\"st-form-field__indication\"\n [id]=\"identifiants.indication\"\n [hidden]=\"enErreur()\"\n >\n <ng-content select=\"[stIndication]\" />\n </div>\n\n <div class=\"st-form-field__controle\">\n @if (enErreur()) {\n <span class=\"st-form-field__lisere\"></span>\n }\n <ng-content />\n </div>\n\n @if (complementRendu(); as texte) {\n <p class=\"st-form-field__complement\" [id]=\"identifiants.complement\">{{ texte }}</p>\n }\n</div>\n",
|
|
1178
|
+
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}.st-form-field__grille{display:flex;flex-direction:column;gap:var(--st-espacement-1-5);min-inline-size:0}.st-form-field__entete{display:flex;align-items:center;justify-content:space-between}.st-form-field__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);display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;justify-content:space-between;min-inline-size:0;color:var(--st-couleur-texte-discret)}.st-form-field__aide-contextuelle{display:inline-flex;flex:none;margin-block:calc((var(--st-interligne-sm) - var(--st-hauteur-commande-sm)) / 2)}.st-form-field__aide-contextuelle:empty{display:none}.st-form-field__entete:has(>.st-form-field__aide-contextuelle:not(:empty)){gap:var(--st-espacement-1);justify-content:flex-start}.st-form-field__entete:has(>.st-form-field__aide-contextuelle:not(:empty)) .st-form-field__libelle{flex-grow:0}.st-form-field__entete:has(>.st-form-field__aide-contextuelle:not(:empty)) .st-form-field__meta{margin-inline-start:auto}.st-form-field__texte{flex:1 1 min-content;min-inline-size:0;overflow-wrap:break-word}:host([data-presentation=micro-capitales]:not([data-disposition=case],[data-disposition=reglage])) .st-form-field__grille{gap:var(--st-espacement-1)}:host([data-presentation=micro-capitales]:not([data-disposition=case],[data-disposition=reglage])) .st-form-field__libelle{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;color:var(--st-couleur-texte-discret)}.st-form-field__asterisque{margin-inline-start:var(--st-espacement-1);font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur)}.st-form-field__obligatoire{font-size:var(--st-taille-xs);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-attenue)}.st-form-field__meta{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-form-field__meta:empty{display:none}:host(:focus-within) .st-form-field__libelle{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte-primaire)}:host([data-en-erreur]) .st-form-field__libelle{font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur)}:host([data-en-erreur]) .st-form-field__obligatoire{color:var(--st-couleur-erreur)}.st-form-field__aide,.st-form-field__complement{margin:0;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-form-field__complement{font-variant-numeric:var(--st-chiffres-alignes)}.st-form-field__erreurs{display:flex;flex-direction:column;gap:var(--st-espacement-1);padding-block:var(--st-espacement-1);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);color:var(--st-couleur-erreur)}.st-form-field__erreurs>st-inline-message{align-items:center;font-weight:inherit}.st-form-field__erreurs ::ng-deep .st-inline-message__icone,.st-form-field__indication ::ng-deep .st-inline-message__icone{align-items:flex-start}.st-form-field__indication{display:flex;align-items:center;min-block-size:calc(var(--st-interligne-xs) + var(--st-espacement-1-5));font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}.st-form-field__indication:empty,.st-form-field__indication[hidden]{display:none}.st-form-field__indication ::ng-deep>st-inline-message{gap:var(--st-espacement-1);align-items:center}.st-form-field__controle{position:relative;min-inline-size:0}.st-form-field__lisere{position:absolute;inset-block:0;inset-inline-start:calc(-1 * var(--st-espacement-3));inline-size:var(--st-epaisseur-forte);background-color:var(--st-couleur-erreur);border-radius:var(--st-rayon-pleine)}@media(forced-colors:active){.st-form-field__lisere{forced-color-adjust:none;background-color:CanvasText}}:host([data-disposition=case]) .st-form-field__grille,:host([data-disposition=reglage]) .st-form-field__grille{position:relative;justify-content:center;gap:0;min-block-size:var(--st-cible-min)}:host([data-disposition=case]) .st-form-field__entete,:host([data-disposition=reglage]) .st-form-field__entete{order:1}:host([data-disposition=case]) .st-form-field__erreurs,:host([data-disposition=case]) .st-form-field__indication,:host([data-disposition=reglage]) .st-form-field__erreurs,:host([data-disposition=reglage]) .st-form-field__indication{order:2}:host([data-disposition=case]) .st-form-field__aide,:host([data-disposition=reglage]) .st-form-field__aide{order:3}:host([data-disposition=case]) .st-form-field__complement,:host([data-disposition=reglage]) .st-form-field__complement{order:4}:host([data-disposition=case]) .st-form-field__controle,:host([data-disposition=reglage]) .st-form-field__controle{position:absolute;inset-block:0;display:flex;align-items:center}:host([data-disposition=case]) .st-form-field__libelle,:host([data-disposition=reglage]) .st-form-field__libelle{line-height:var(--st-choix-interligne, var(--st-interligne-sm))}:host([data-disposition=case]) .st-form-field__erreurs,:host([data-disposition=reglage]) .st-form-field__erreurs{gap:0;padding-block:0;font-size:var(--st-taille-xs);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-xs)}:host([data-disposition=case]) .st-form-field__erreurs>st-inline-message,:host([data-disposition=reglage]) .st-form-field__erreurs>st-inline-message{font-size:inherit;line-height:inherit}:host([data-disposition=case]) .st-form-field__erreurs ::ng-deep .st-inline-message__icone,:host([data-disposition=reglage]) .st-form-field__erreurs ::ng-deep .st-inline-message__icone{display:none}:host([data-disposition=case]) .st-form-field__indication,:host([data-disposition=reglage]) .st-form-field__indication{min-block-size:0}:host([data-disposition=case]) .st-form-field__lisere,:host([data-disposition=reglage]) .st-form-field__lisere{display:none}:host([data-disposition=case]:not([data-en-erreur])) .st-form-field__libelle,:host([data-disposition=case]:not([data-en-erreur])):focus-within .st-form-field__libelle,:host([data-disposition=reglage]:not([data-en-erreur])) .st-form-field__libelle,:host([data-disposition=reglage]:not([data-en-erreur])):focus-within .st-form-field__libelle{font-weight:var(--st-choix-graisse, var(--st-graisse-moyenne));color:var(--st-choix-couleur, var(--st-couleur-texte))}:host([data-disposition=case]) .st-form-field__grille{padding-inline-start:calc(var(--st-cible-min) + var(--st-espacement-3))}:host([data-disposition=case]) .st-form-field__controle{inset-inline-start:0}:host([data-disposition=reglage]) .st-form-field__grille{padding-inline-end:calc(var(--st-cible-tactile-min) + var(--st-espacement-3))}:host([data-disposition=reglage]) .st-form-field__controle{inset-inline-end:0}:host([data-disposition=en-ligne]) .st-form-field__entete{grid-area:entete}:host([data-disposition=en-ligne]) .st-form-field__aide{grid-area:aide}:host([data-disposition=en-ligne]) .st-form-field__erreurs,:host([data-disposition=en-ligne]) .st-form-field__indication{grid-area:message}:host([data-disposition=en-ligne]) .st-form-field__controle{grid-area:controle}:host([data-disposition=en-ligne]) .st-form-field__complement{grid-area:complement}:host([data-disposition=en-ligne]){container-type:inline-size}@container (min-width: 48rem){:host([data-disposition=en-ligne]) .st-form-field__grille{display:grid;grid-template-areas:\". aide\" \". message\" \"entete controle\" \". complement\";grid-template-columns:var(--st-champ-largeur-libelle, var(--st-largeur-champ-md)) minmax(0,1fr);gap:0 var(--st-espacement-4);align-items:start}:host([data-disposition=en-ligne]) .st-form-field__entete{align-self:start;padding-block-start:calc((var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2)}:host([data-disposition=en-ligne]) .st-form-field__aide{margin-block-end:var(--st-espacement-1)}:host([data-disposition=en-ligne]) .st-form-field__erreurs,:host([data-disposition=en-ligne]) .st-form-field__indication{margin-block-end:var(--st-espacement-1)}:host([data-disposition=en-ligne]) .st-form-field__complement{margin-block-start:var(--st-espacement-1)}}\n"],
|
|
1179
|
+
dependencies: [{
|
|
1180
|
+
kind: "component",
|
|
1181
|
+
type: StInlineMessage,
|
|
1182
|
+
selector: "st-inline-message",
|
|
1183
|
+
inputs: [
|
|
1184
|
+
"ton",
|
|
1185
|
+
"identifiant",
|
|
1186
|
+
"annonce",
|
|
1187
|
+
"encadre",
|
|
1188
|
+
"icone"
|
|
1189
|
+
]
|
|
1190
|
+
}],
|
|
1191
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1192
|
+
});
|
|
1193
|
+
};
|
|
1194
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1195
|
+
minVersion: "12.0.0",
|
|
1196
|
+
version: "22.2.2",
|
|
1197
|
+
ngImport: i0,
|
|
1198
|
+
type: StFormField,
|
|
1199
|
+
decorators: [{
|
|
1200
|
+
type: Component,
|
|
1201
|
+
args: [{
|
|
1202
|
+
selector: "st-form-field",
|
|
1203
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1204
|
+
imports: [StInlineMessage],
|
|
1205
|
+
host: {
|
|
1206
|
+
class: "st-form-field",
|
|
1207
|
+
"[attr.data-en-erreur]": "enErreur() ? \"\" : null",
|
|
1208
|
+
"[attr.data-disposition]": "disposition()",
|
|
1209
|
+
"[attr.data-presentation]": "presentation()"
|
|
1210
|
+
},
|
|
1211
|
+
template: "<!-- Une grille interieure : l'hote peut ainsi etre le conteneur de requete de `en-ligne`. -->\n<div class=\"st-form-field__grille\">\n <!-- En-tete : l'etiquette (et sa mention), la meta projetee a droite. -->\n <div class=\"st-form-field__entete\">\n <!-- Exception de eslint.config.mjs (clic sans clavier sur l'etiquette) :\n Le clic sur une etiquette est une commodite de souris, comme pour tout\n champ natif : au clavier, le controle se rejoint par tabulation, et\n l'etiquette n'a pas a recevoir le focus. -->\n <label\n class=\"st-form-field__libelle\"\n [class.st-vh]=\"libelleMasque()\"\n [id]=\"identifiants.libelle\"\n [for]=\"identifiants.controle\"\n [attr.data-libelle]=\"libelle()\"\n (click)=\"focaliserLeControle()\"\n >\n <!-- Libelle riche (lot 218) : un [stLibelle] projete (un lien vers les conditions generales)\n prend la place du texte ; sans lui, le libelle. Releve au rendu : relaye par un champ du\n socle, le contenu echappe aux requetes, et une fente relayee vide compterait comme remplie.\n Aucun blanc autour du texte : la largeur minimale de l'etiquette est mesuree. -->\n <span class=\"st-form-field__texte\"\n ><span #libelleRiche class=\"st-form-field__libelle-riche\"\n ><ng-content select=\"[stLibelle]\" /></span\n >{{ libelleRichePresent() ? '' : libelle() }}\n @if (obligatoire() && asterisque) {\n <span class=\"st-form-field__asterisque\" aria-hidden=\"true\">*</span>\n }\n </span>\n @if (obligatoire() && !asterisque) {\n <span class=\"st-form-field__obligatoire\">{{ libelleObligatoire() }}</span>\n }\n </label>\n <!-- L'aide contextuelle (lot 265) : HORS de l'etiquette, son nom n'entre pas dans celui du\n champ ; elle suit l'etiquette et sa mention. -->\n <span class=\"st-form-field__aide-contextuelle\"><ng-content select=\"[stAide]\" /></span>\n <span #meta class=\"st-form-field__meta\" [id]=\"identifiants.meta\"\n ><ng-content select=\"[stMeta]\"\n /></span>\n </div>\n\n @if (aideRendue(); as texte) {\n <p class=\"st-form-field__aide\" [id]=\"identifiants.aide\">{{ texte }}</p>\n }\n\n <!-- Le message : l'erreur, et a defaut l'indication projetee, a la meme place. -->\n @if (enErreur()) {\n <div class=\"st-form-field__erreurs\" [id]=\"identifiants.erreur\">\n @for (message of messages(); track $index) {\n <st-inline-message ton=\"erreur\">{{ message }}</st-inline-message>\n }\n </div>\n }\n <div\n #indication\n class=\"st-form-field__indication\"\n [id]=\"identifiants.indication\"\n [hidden]=\"enErreur()\"\n >\n <ng-content select=\"[stIndication]\" />\n </div>\n\n <div class=\"st-form-field__controle\">\n @if (enErreur()) {\n <span class=\"st-form-field__lisere\"></span>\n }\n <ng-content />\n </div>\n\n @if (complementRendu(); as texte) {\n <p class=\"st-form-field__complement\" [id]=\"identifiants.complement\">{{ texte }}</p>\n }\n</div>\n",
|
|
1212
|
+
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}.st-form-field__grille{display:flex;flex-direction:column;gap:var(--st-espacement-1-5);min-inline-size:0}.st-form-field__entete{display:flex;align-items:center;justify-content:space-between}.st-form-field__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);display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;justify-content:space-between;min-inline-size:0;color:var(--st-couleur-texte-discret)}.st-form-field__aide-contextuelle{display:inline-flex;flex:none;margin-block:calc((var(--st-interligne-sm) - var(--st-hauteur-commande-sm)) / 2)}.st-form-field__aide-contextuelle:empty{display:none}.st-form-field__entete:has(>.st-form-field__aide-contextuelle:not(:empty)){gap:var(--st-espacement-1);justify-content:flex-start}.st-form-field__entete:has(>.st-form-field__aide-contextuelle:not(:empty)) .st-form-field__libelle{flex-grow:0}.st-form-field__entete:has(>.st-form-field__aide-contextuelle:not(:empty)) .st-form-field__meta{margin-inline-start:auto}.st-form-field__texte{flex:1 1 min-content;min-inline-size:0;overflow-wrap:break-word}:host([data-presentation=micro-capitales]:not([data-disposition=case],[data-disposition=reglage])) .st-form-field__grille{gap:var(--st-espacement-1)}:host([data-presentation=micro-capitales]:not([data-disposition=case],[data-disposition=reglage])) .st-form-field__libelle{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;color:var(--st-couleur-texte-discret)}.st-form-field__asterisque{margin-inline-start:var(--st-espacement-1);font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur)}.st-form-field__obligatoire{font-size:var(--st-taille-xs);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-attenue)}.st-form-field__meta{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-form-field__meta:empty{display:none}:host(:focus-within) .st-form-field__libelle{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte-primaire)}:host([data-en-erreur]) .st-form-field__libelle{font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur)}:host([data-en-erreur]) .st-form-field__obligatoire{color:var(--st-couleur-erreur)}.st-form-field__aide,.st-form-field__complement{margin:0;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-form-field__complement{font-variant-numeric:var(--st-chiffres-alignes)}.st-form-field__erreurs{display:flex;flex-direction:column;gap:var(--st-espacement-1);padding-block:var(--st-espacement-1);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);color:var(--st-couleur-erreur)}.st-form-field__erreurs>st-inline-message{align-items:center;font-weight:inherit}.st-form-field__erreurs ::ng-deep .st-inline-message__icone,.st-form-field__indication ::ng-deep .st-inline-message__icone{align-items:flex-start}.st-form-field__indication{display:flex;align-items:center;min-block-size:calc(var(--st-interligne-xs) + var(--st-espacement-1-5));font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}.st-form-field__indication:empty,.st-form-field__indication[hidden]{display:none}.st-form-field__indication ::ng-deep>st-inline-message{gap:var(--st-espacement-1);align-items:center}.st-form-field__controle{position:relative;min-inline-size:0}.st-form-field__lisere{position:absolute;inset-block:0;inset-inline-start:calc(-1 * var(--st-espacement-3));inline-size:var(--st-epaisseur-forte);background-color:var(--st-couleur-erreur);border-radius:var(--st-rayon-pleine)}@media(forced-colors:active){.st-form-field__lisere{forced-color-adjust:none;background-color:CanvasText}}:host([data-disposition=case]) .st-form-field__grille,:host([data-disposition=reglage]) .st-form-field__grille{position:relative;justify-content:center;gap:0;min-block-size:var(--st-cible-min)}:host([data-disposition=case]) .st-form-field__entete,:host([data-disposition=reglage]) .st-form-field__entete{order:1}:host([data-disposition=case]) .st-form-field__erreurs,:host([data-disposition=case]) .st-form-field__indication,:host([data-disposition=reglage]) .st-form-field__erreurs,:host([data-disposition=reglage]) .st-form-field__indication{order:2}:host([data-disposition=case]) .st-form-field__aide,:host([data-disposition=reglage]) .st-form-field__aide{order:3}:host([data-disposition=case]) .st-form-field__complement,:host([data-disposition=reglage]) .st-form-field__complement{order:4}:host([data-disposition=case]) .st-form-field__controle,:host([data-disposition=reglage]) .st-form-field__controle{position:absolute;inset-block:0;display:flex;align-items:center}:host([data-disposition=case]) .st-form-field__libelle,:host([data-disposition=reglage]) .st-form-field__libelle{line-height:var(--st-choix-interligne, var(--st-interligne-sm))}:host([data-disposition=case]) .st-form-field__erreurs,:host([data-disposition=reglage]) .st-form-field__erreurs{gap:0;padding-block:0;font-size:var(--st-taille-xs);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-xs)}:host([data-disposition=case]) .st-form-field__erreurs>st-inline-message,:host([data-disposition=reglage]) .st-form-field__erreurs>st-inline-message{font-size:inherit;line-height:inherit}:host([data-disposition=case]) .st-form-field__erreurs ::ng-deep .st-inline-message__icone,:host([data-disposition=reglage]) .st-form-field__erreurs ::ng-deep .st-inline-message__icone{display:none}:host([data-disposition=case]) .st-form-field__indication,:host([data-disposition=reglage]) .st-form-field__indication{min-block-size:0}:host([data-disposition=case]) .st-form-field__lisere,:host([data-disposition=reglage]) .st-form-field__lisere{display:none}:host([data-disposition=case]:not([data-en-erreur])) .st-form-field__libelle,:host([data-disposition=case]:not([data-en-erreur])):focus-within .st-form-field__libelle,:host([data-disposition=reglage]:not([data-en-erreur])) .st-form-field__libelle,:host([data-disposition=reglage]:not([data-en-erreur])):focus-within .st-form-field__libelle{font-weight:var(--st-choix-graisse, var(--st-graisse-moyenne));color:var(--st-choix-couleur, var(--st-couleur-texte))}:host([data-disposition=case]) .st-form-field__grille{padding-inline-start:calc(var(--st-cible-min) + var(--st-espacement-3))}:host([data-disposition=case]) .st-form-field__controle{inset-inline-start:0}:host([data-disposition=reglage]) .st-form-field__grille{padding-inline-end:calc(var(--st-cible-tactile-min) + var(--st-espacement-3))}:host([data-disposition=reglage]) .st-form-field__controle{inset-inline-end:0}:host([data-disposition=en-ligne]) .st-form-field__entete{grid-area:entete}:host([data-disposition=en-ligne]) .st-form-field__aide{grid-area:aide}:host([data-disposition=en-ligne]) .st-form-field__erreurs,:host([data-disposition=en-ligne]) .st-form-field__indication{grid-area:message}:host([data-disposition=en-ligne]) .st-form-field__controle{grid-area:controle}:host([data-disposition=en-ligne]) .st-form-field__complement{grid-area:complement}:host([data-disposition=en-ligne]){container-type:inline-size}@container (min-width: 48rem){:host([data-disposition=en-ligne]) .st-form-field__grille{display:grid;grid-template-areas:\". aide\" \". message\" \"entete controle\" \". complement\";grid-template-columns:var(--st-champ-largeur-libelle, var(--st-largeur-champ-md)) minmax(0,1fr);gap:0 var(--st-espacement-4);align-items:start}:host([data-disposition=en-ligne]) .st-form-field__entete{align-self:start;padding-block-start:calc((var(--st-commande-hauteur, var(--st-hauteur-commande-defaut)) - var(--st-interligne-sm)) / 2)}:host([data-disposition=en-ligne]) .st-form-field__aide{margin-block-end:var(--st-espacement-1)}:host([data-disposition=en-ligne]) .st-form-field__erreurs,:host([data-disposition=en-ligne]) .st-form-field__indication{margin-block-end:var(--st-espacement-1)}:host([data-disposition=en-ligne]) .st-form-field__complement{margin-block-start:var(--st-espacement-1)}}\n"]
|
|
1213
|
+
}]
|
|
1214
|
+
}],
|
|
1215
|
+
ctorParameters: () => [],
|
|
1216
|
+
propDecorators: {
|
|
1217
|
+
libelle: [{
|
|
1218
|
+
type: i0.Input,
|
|
1219
|
+
args: [{
|
|
1220
|
+
isSignal: true,
|
|
1221
|
+
alias: "libelle",
|
|
1222
|
+
required: true
|
|
1223
|
+
}]
|
|
1224
|
+
}],
|
|
1225
|
+
complement: [{
|
|
1226
|
+
type: i0.Input,
|
|
1227
|
+
args: [{
|
|
1228
|
+
isSignal: true,
|
|
1229
|
+
alias: "complement",
|
|
1230
|
+
required: false
|
|
1231
|
+
}]
|
|
1232
|
+
}],
|
|
1233
|
+
disposition: [{
|
|
1234
|
+
type: i0.Input,
|
|
1235
|
+
args: [{
|
|
1236
|
+
isSignal: true,
|
|
1237
|
+
alias: "disposition",
|
|
1238
|
+
required: false
|
|
1239
|
+
}]
|
|
1240
|
+
}],
|
|
1241
|
+
presentation: [{
|
|
1242
|
+
type: i0.Input,
|
|
1243
|
+
args: [{
|
|
1244
|
+
isSignal: true,
|
|
1245
|
+
alias: "presentation",
|
|
1246
|
+
required: false
|
|
1247
|
+
}]
|
|
1248
|
+
}],
|
|
1249
|
+
libelleMasque: [{
|
|
1250
|
+
type: i0.Input,
|
|
1251
|
+
args: [{
|
|
1252
|
+
isSignal: true,
|
|
1253
|
+
alias: "libelleMasque",
|
|
1254
|
+
required: false
|
|
1255
|
+
}]
|
|
1256
|
+
}],
|
|
1257
|
+
descriptionsDuControle: [{
|
|
1258
|
+
type: i0.Input,
|
|
1259
|
+
args: [{
|
|
1260
|
+
isSignal: true,
|
|
1261
|
+
alias: "descriptionsDuControle",
|
|
1262
|
+
required: false
|
|
1263
|
+
}]
|
|
1264
|
+
}],
|
|
1265
|
+
controle: [{
|
|
1266
|
+
type: i0.ContentChild,
|
|
1267
|
+
args: [i0.forwardRef(() => StControleDeChamp), {
|
|
1268
|
+
descendants: true,
|
|
1269
|
+
read: ElementRef,
|
|
1270
|
+
isSignal: true
|
|
1271
|
+
}]
|
|
1272
|
+
}],
|
|
1273
|
+
zoneDeMeta: [{
|
|
1274
|
+
type: i0.ViewChild,
|
|
1275
|
+
args: ["meta", { isSignal: true }]
|
|
1276
|
+
}],
|
|
1277
|
+
zoneDIndication: [{
|
|
1278
|
+
type: i0.ViewChild,
|
|
1279
|
+
args: ["indication", { isSignal: true }]
|
|
1280
|
+
}],
|
|
1281
|
+
zoneDuLibelleRiche: [{
|
|
1282
|
+
type: i0.ViewChild,
|
|
1283
|
+
args: ["libelleRiche", { isSignal: true }]
|
|
1284
|
+
}]
|
|
1285
|
+
}
|
|
1286
|
+
});
|
|
1287
|
+
function contientQuelqueChose(zone) {
|
|
1288
|
+
return zone !== void 0 && (zone.childElementCount > 0 || zone.textContent.trim() !== "");
|
|
1289
|
+
}
|
|
1290
|
+
const SEUILS_D_ANNONCE = [
|
|
1291
|
+
20,
|
|
1292
|
+
10,
|
|
1293
|
+
0
|
|
1294
|
+
];
|
|
1295
|
+
function longueurVue$1(texte) {
|
|
1296
|
+
return Array.from(texte).length;
|
|
1297
|
+
}
|
|
1298
|
+
var ControleDeSaisieCompte = class ControleDeSaisieCompte extends ControleDeSaisie {
|
|
1299
|
+
libelles = inject(ST_LIBELLES);
|
|
1300
|
+
annonce = new AnnonceLocale(inject(DestroyRef));
|
|
1301
|
+
restants = computed(() => {
|
|
1302
|
+
const maximum = this.maxLength();
|
|
1303
|
+
return maximum === void 0 ? null : maximum - longueurVue$1(this.value());
|
|
1304
|
+
}, ...ngDevMode ? [{ debugName: "restants" }] : /* istanbul ignore next */ []);
|
|
1305
|
+
enDepassement = computed(() => (this.restants() ?? 0) < 0, ...ngDevMode ? [{ debugName: "enDepassement" }] : /* istanbul ignore next */ []);
|
|
1306
|
+
compteur = computed(() => {
|
|
1307
|
+
const restants = this.restants();
|
|
1308
|
+
if (restants === null) return null;
|
|
1309
|
+
const libelles = this.libelles();
|
|
1310
|
+
return restants >= 0 ? libelles.caracteresRestants(restants) : libelles.caracteresEnTrop(-restants);
|
|
1311
|
+
}, ...ngDevMode ? [{ debugName: "compteur" }] : /* istanbul ignore next */ []);
|
|
1312
|
+
aideAffichee = computed(() => {
|
|
1313
|
+
const libelles = this.libelles();
|
|
1314
|
+
const minimum = this.minLength();
|
|
1315
|
+
const aide = this.aideEtRaisons() ?? (minimum !== void 0 && minimum > 0 ? libelles.longueurMinimale(minimum) : null);
|
|
1316
|
+
if (!this.pending()) return aide;
|
|
1317
|
+
return aide === null ? libelles.verificationEnCours : `${aide} ${libelles.verificationEnCours}`;
|
|
1318
|
+
}, ...ngDevMode ? [{ debugName: "aideAffichee" }] : /* istanbul ignore next */ []);
|
|
1319
|
+
erreurs = computed(() => {
|
|
1320
|
+
const maximum = this.maxLength();
|
|
1321
|
+
if (!this.enDepassement() || maximum === void 0) return this.errors();
|
|
1322
|
+
const depassement = {
|
|
1323
|
+
kind: "maxLength",
|
|
1324
|
+
maxLength: maximum
|
|
1325
|
+
};
|
|
1326
|
+
return fusionnerErreurs(this.errors(), [depassement]);
|
|
1327
|
+
}, ...ngDevMode ? [{ debugName: "erreurs" }] : /* istanbul ignore next */ []);
|
|
1328
|
+
sorti = signal(false, ...ngDevMode ? [{ debugName: "sorti" }] : /* istanbul ignore next */ []);
|
|
1329
|
+
afficherErreurs = computed(() => this.touched() || this.sorti() && this.enDepassement(), ...ngDevMode ? [{ debugName: "afficherErreurs" }] : /* istanbul ignore next */ []);
|
|
1330
|
+
constructor() {
|
|
1331
|
+
super();
|
|
1332
|
+
let precedent = null;
|
|
1333
|
+
effect(() => {
|
|
1334
|
+
const restants = this.restants();
|
|
1335
|
+
if (restants === null) return;
|
|
1336
|
+
const avant = precedent;
|
|
1337
|
+
precedent = restants;
|
|
1338
|
+
if (avant === null) return;
|
|
1339
|
+
const franchi = SEUILS_D_ANNONCE.some((seuil) => avant > seuil && restants <= seuil) || avant >= 0 && restants < 0;
|
|
1340
|
+
const texte = this.compteur();
|
|
1341
|
+
if (franchi && texte !== null) this.annonce.annoncer(texte);
|
|
1342
|
+
});
|
|
1343
|
+
}
|
|
1344
|
+
surSortie() {
|
|
1345
|
+
this.sorti.set(true);
|
|
1346
|
+
this.touch.emit();
|
|
1347
|
+
}
|
|
1348
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1349
|
+
minVersion: "12.0.0",
|
|
1350
|
+
version: "22.2.2",
|
|
1351
|
+
ngImport: i0,
|
|
1352
|
+
type: ControleDeSaisieCompte,
|
|
1353
|
+
deps: [],
|
|
1354
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1355
|
+
});
|
|
1356
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1357
|
+
minVersion: "14.0.0",
|
|
1358
|
+
version: "22.2.2",
|
|
1359
|
+
type: ControleDeSaisieCompte,
|
|
1360
|
+
isStandalone: true,
|
|
1361
|
+
usesInheritance: true,
|
|
1362
|
+
ngImport: i0
|
|
1363
|
+
});
|
|
1364
|
+
};
|
|
1365
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1366
|
+
minVersion: "12.0.0",
|
|
1367
|
+
version: "22.2.2",
|
|
1368
|
+
ngImport: i0,
|
|
1369
|
+
type: ControleDeSaisieCompte,
|
|
1370
|
+
decorators: [{ type: Directive }],
|
|
1371
|
+
ctorParameters: () => []
|
|
1372
|
+
});
|
|
1373
|
+
const TYPES_DE_GAUCHE_A_DROITE = /* @__PURE__ */ new Set([
|
|
1374
|
+
"email",
|
|
1375
|
+
"tel",
|
|
1376
|
+
"url"
|
|
1377
|
+
]);
|
|
1378
|
+
const INTERACTIFS = "a[href], button, input, select, textarea, [tabindex]";
|
|
1379
|
+
function decrit(zone, attribut) {
|
|
1380
|
+
if (zone === void 0) return false;
|
|
1381
|
+
return Array.from(zone.children).some((element) => element.hasAttribute(attribut) && !element.matches(INTERACTIFS) && element.querySelector(INTERACTIFS) === null && element.textContent.trim() !== "");
|
|
1382
|
+
}
|
|
1383
|
+
var StInput = class StInput extends ControleDeSaisieCompte {
|
|
1384
|
+
racineDuCadre = inject(StIdentifiants).prochain("st-input");
|
|
1385
|
+
idPrefixe = `${this.racineDuCadre}-prefixe`;
|
|
1386
|
+
idSuffixe = `${this.racineDuCadre}-suffixe`;
|
|
1387
|
+
zoneDePrefixe = viewChild("prefixe", ...ngDevMode ? [{ debugName: "zoneDePrefixe" }] : /* istanbul ignore next */ []);
|
|
1388
|
+
zoneDeSuffixe = viewChild("suffixe", ...ngDevMode ? [{ debugName: "zoneDeSuffixe" }] : /* istanbul ignore next */ []);
|
|
1389
|
+
emplacementsQuiDecrivent = signal([], ...ngDevMode ? [{ debugName: "emplacementsQuiDecrivent" }] : /* istanbul ignore next */ []);
|
|
1390
|
+
type = input("text", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
1391
|
+
autocomplete = input(null, ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
|
|
1392
|
+
inputmode = input(null, ...ngDevMode ? [{ debugName: "inputmode" }] : /* istanbul ignore next */ []);
|
|
1393
|
+
icone = input(null, ...ngDevMode ? [{ debugName: "icone" }] : /* istanbul ignore next */ []);
|
|
1394
|
+
exemple = input(null, ...ngDevMode ? [{ debugName: "exemple" }] : /* istanbul ignore next */ []);
|
|
1395
|
+
chiffres = input("texte", ...ngDevMode ? [{ debugName: "chiffres" }] : /* istanbul ignore next */ []);
|
|
1396
|
+
presentation = input("libelle", ...ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []);
|
|
1397
|
+
decritPar = input([], ...ngDevMode ? [{ debugName: "decritPar" }] : /* istanbul ignore next */ []);
|
|
1398
|
+
descriptionsDuControle = computed(() => [...this.decritPar(), ...this.emplacementsQuiDecrivent()], ...ngDevMode ? [{ debugName: "descriptionsDuControle" }] : /* istanbul ignore next */ []);
|
|
1399
|
+
suggestions = input(null, ...ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []);
|
|
1400
|
+
idDesSuggestions = `${this.racineDuCadre}-suggestions`;
|
|
1401
|
+
avecSuggestions = computed(() => (this.suggestions()?.length ?? 0) > 0, ...ngDevMode ? [{ debugName: "avecSuggestions" }] : /* istanbul ignore next */ []);
|
|
1402
|
+
attenteVisible = affichageDiffere(() => this.pending());
|
|
1403
|
+
sens = computed(() => TYPES_DE_GAUCHE_A_DROITE.has(this.type()) || this.chiffres() === "reference" ? "ltr" : null, ...ngDevMode ? [{ debugName: "sens" }] : /* istanbul ignore next */ []);
|
|
1404
|
+
constructor() {
|
|
1405
|
+
super();
|
|
1406
|
+
afterEveryRender({ read: () => {
|
|
1407
|
+
const ids = [];
|
|
1408
|
+
if (decrit(this.zoneDePrefixe()?.nativeElement, "stprefixe")) ids.push(this.idPrefixe);
|
|
1409
|
+
if (decrit(this.zoneDeSuffixe()?.nativeElement, "stsuffixe")) ids.push(this.idSuffixe);
|
|
1410
|
+
const avant = this.emplacementsQuiDecrivent();
|
|
1411
|
+
if (ids.length !== avant.length || ids.some((id, i) => id !== avant[i])) this.emplacementsQuiDecrivent.set(ids);
|
|
1412
|
+
} });
|
|
1413
|
+
}
|
|
1414
|
+
surPressionDuCadre(evenement) {
|
|
1415
|
+
if (evenement.button !== 0) return;
|
|
1416
|
+
const cadre = evenement.currentTarget;
|
|
1417
|
+
const interactif = evenement.target.closest(INTERACTIFS);
|
|
1418
|
+
if (interactif !== null && cadre.contains(interactif)) return;
|
|
1419
|
+
evenement.preventDefault();
|
|
1420
|
+
this.focus();
|
|
1421
|
+
}
|
|
1422
|
+
surSaisie(evenement) {
|
|
1423
|
+
this.value.set(this.texteSaisi(evenement));
|
|
1424
|
+
}
|
|
1425
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1426
|
+
minVersion: "12.0.0",
|
|
1427
|
+
version: "22.2.2",
|
|
1428
|
+
ngImport: i0,
|
|
1429
|
+
type: StInput,
|
|
1430
|
+
deps: [],
|
|
1431
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1432
|
+
});
|
|
1433
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1434
|
+
minVersion: "17.0.0",
|
|
1435
|
+
version: "22.2.2",
|
|
1436
|
+
type: StInput,
|
|
1437
|
+
isStandalone: true,
|
|
1438
|
+
selector: "st-input",
|
|
1439
|
+
inputs: {
|
|
1440
|
+
type: {
|
|
1441
|
+
classPropertyName: "type",
|
|
1442
|
+
publicName: "type",
|
|
1443
|
+
isSignal: true,
|
|
1444
|
+
isRequired: false,
|
|
1445
|
+
transformFunction: null
|
|
1446
|
+
},
|
|
1447
|
+
autocomplete: {
|
|
1448
|
+
classPropertyName: "autocomplete",
|
|
1449
|
+
publicName: "autocomplete",
|
|
1450
|
+
isSignal: true,
|
|
1451
|
+
isRequired: false,
|
|
1452
|
+
transformFunction: null
|
|
1453
|
+
},
|
|
1454
|
+
inputmode: {
|
|
1455
|
+
classPropertyName: "inputmode",
|
|
1456
|
+
publicName: "inputmode",
|
|
1457
|
+
isSignal: true,
|
|
1458
|
+
isRequired: false,
|
|
1459
|
+
transformFunction: null
|
|
1460
|
+
},
|
|
1461
|
+
icone: {
|
|
1462
|
+
classPropertyName: "icone",
|
|
1463
|
+
publicName: "icone",
|
|
1464
|
+
isSignal: true,
|
|
1465
|
+
isRequired: false,
|
|
1466
|
+
transformFunction: null
|
|
1467
|
+
},
|
|
1468
|
+
exemple: {
|
|
1469
|
+
classPropertyName: "exemple",
|
|
1470
|
+
publicName: "exemple",
|
|
1471
|
+
isSignal: true,
|
|
1472
|
+
isRequired: false,
|
|
1473
|
+
transformFunction: null
|
|
1474
|
+
},
|
|
1475
|
+
chiffres: {
|
|
1476
|
+
classPropertyName: "chiffres",
|
|
1477
|
+
publicName: "chiffres",
|
|
1478
|
+
isSignal: true,
|
|
1479
|
+
isRequired: false,
|
|
1480
|
+
transformFunction: null
|
|
1481
|
+
},
|
|
1482
|
+
presentation: {
|
|
1483
|
+
classPropertyName: "presentation",
|
|
1484
|
+
publicName: "presentation",
|
|
1485
|
+
isSignal: true,
|
|
1486
|
+
isRequired: false,
|
|
1487
|
+
transformFunction: null
|
|
1488
|
+
},
|
|
1489
|
+
decritPar: {
|
|
1490
|
+
classPropertyName: "decritPar",
|
|
1491
|
+
publicName: "decritPar",
|
|
1492
|
+
isSignal: true,
|
|
1493
|
+
isRequired: false,
|
|
1494
|
+
transformFunction: null
|
|
1495
|
+
},
|
|
1496
|
+
suggestions: {
|
|
1497
|
+
classPropertyName: "suggestions",
|
|
1498
|
+
publicName: "suggestions",
|
|
1499
|
+
isSignal: true,
|
|
1500
|
+
isRequired: false,
|
|
1501
|
+
transformFunction: null
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
host: {
|
|
1505
|
+
properties: { "attr.data-depassement": "enDepassement() ? \"\" : null" },
|
|
1506
|
+
classAttribute: "st-input"
|
|
1507
|
+
},
|
|
1508
|
+
viewQueries: [{
|
|
1509
|
+
propertyName: "zoneDePrefixe",
|
|
1510
|
+
first: true,
|
|
1511
|
+
predicate: ["prefixe"],
|
|
1512
|
+
descendants: true,
|
|
1513
|
+
isSignal: true
|
|
1514
|
+
}, {
|
|
1515
|
+
propertyName: "zoneDeSuffixe",
|
|
1516
|
+
first: true,
|
|
1517
|
+
predicate: ["suffixe"],
|
|
1518
|
+
descendants: true,
|
|
1519
|
+
isSignal: true
|
|
1520
|
+
}],
|
|
1521
|
+
usesInheritance: true,
|
|
1522
|
+
ngImport: i0,
|
|
1523
|
+
template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideAffichee()\"\n [complement]=\"compteur()\"\n [erreurs]=\"erreurs()\"\n [afficherErreurs]=\"afficherErreurs()\"\n [obligatoire]=\"required()\"\n [presentation]=\"presentation()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <!-- Meta, aide contextuelle (lot 265) et indication de l'application, relayees a l'enveloppe\n (lot 215). -->\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le cadre : prefixe, zone de frappe, suffixe. Sans emplacement rempli, il s'efface et\n l'input porte seul l'apparence du champ ; avec, il la porte a sa place (EA-11). -->\n <div class=\"st-input__cadre\" (mousedown)=\"surPressionDuCadre($event)\">\n <span #prefixe class=\"st-input__prefixe\" [id]=\"idPrefixe\">\n @if (icone(); as nom) {\n <st-icon class=\"st-input__icone\" [nom]=\"nom\" taille=\"20\" />\n }\n <ng-content select=\"[stPrefixe]\"\n /></span>\n <input\n #champ\n class=\"st-input__champ\"\n stControleDeChamp\n [attr.data-chiffres]=\"chiffres()\"\n [type]=\"type()\"\n [value]=\"value()\"\n [attr.name]=\"name() || null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.placeholder]=\"exemple()\"\n [attr.dir]=\"sens()\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.list]=\"avecSuggestions() ? idDesSuggestions : null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"surSortie()\"\n />\n <!-- Des valeurs proposees, jamais imposees : la liste native du navigateur (D133). -->\n @if (avecSuggestions()) {\n <datalist [id]=\"idDesSuggestions\">\n @for (suggestion of suggestions() ?? []; track $index) {\n <option [value]=\"suggestion\"></option>\n }\n </datalist>\n }\n <span #suffixe class=\"st-input__suffixe\" [id]=\"idSuffixe\"\n ><ng-content select=\"[stSuffixe]\" />\n @if (attenteVisible()) {\n <span class=\"st-input__attente\" aria-hidden=\"true\"\n ><st-spinner taille=\"sm\" ton=\"neutre\"\n /></span>\n }\n </span>\n </div>\n</st-form-field>\n<!-- Les seuils du compteur (20, 10, 0 restants) et le depassement : seulement avec maxLength. -->\n@if (compteur() !== null) {\n <span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n}\n",
|
|
1524
|
+
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-input__cadre{--_frappe-minimale: min(100%, calc(8ch + var(--st-espacement-3-5) + var(--st-espacement-2)));display:grid;grid-template-columns:minmax(0,auto) minmax(var(--_frappe-minimale),1fr) minmax(0,auto);align-items:center}.st-input__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-input__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-input__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-input__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-input__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)}}@media(hover:hover){.st-input__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-input__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-input__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-input__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-input__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-input__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-input__champ:is(input,textarea):read-only:not(:disabled),.st-input__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-input__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}.st-input__champ{grid-column:2}.st-input__champ[data-chiffres=reference]{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-references)}.st-input__prefixe,.st-input__suffixe{display:inline-flex;gap:var(--st-espacement-2);align-items:center;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-attenue);white-space:nowrap;cursor:text}.st-input__prefixe:empty,.st-input__suffixe:empty{display:none}.st-input__prefixe,.st-input__suffixe{min-inline-size:0}.st-input__prefixe>::ng-deep :is([stPrefixe],[stSuffixe]):not(a,button,input,select,textarea,st-icon),.st-input__suffixe>::ng-deep :is([stPrefixe],[stSuffixe]):not(a,button,input,select,textarea,st-icon){min-inline-size:0;overflow:hidden;text-overflow:ellipsis}.st-input__prefixe{grid-column:1}.st-input__suffixe{grid-column:3}.st-input__attente{display:inline-flex}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)){cursor:text}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)){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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty))>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):hover:not(:has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ:focus-visible){border-color:var(--st-couleur-primaire)}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ[aria-invalid=true]):has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ:disabled){color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ:is(input,textarea):read-only:not(:disabled)),.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ[aria-readonly=true]:not(:disabled)){background:var(--st-couleur-surface-enfoncee)}.st-input__cadre:has(>.st-input__prefixe:not(:empty)){padding-inline-start:var(--st-espacement-4)}.st-input__cadre:has(>.st-input__prefixe:not(:empty))>.st-input__champ{padding-inline-start:var(--st-espacement-2)}.st-input__cadre:has(>.st-input__suffixe:not(:empty)){padding-inline-end:var(--st-espacement-4)}.st-input__cadre:has(>.st-input__suffixe:not(:empty))>.st-input__champ{padding-inline-end:var(--st-espacement-2)}.st-input__cadre:has(>.st-input__champ:disabled) :is(.st-input__prefixe,.st-input__suffixe){color:var(--st-couleur-texte-desactive);cursor:inherit}@media print{.st-input__champ,.st-input__cadre{box-shadow:none}.st-input__attente{display:none}}:host([data-depassement]) ::ng-deep .st-form-field__complement{color:var(--st-couleur-erreur)}\n"],
|
|
1525
|
+
dependencies: [
|
|
1526
|
+
{
|
|
1527
|
+
kind: "component",
|
|
1528
|
+
type: StFormField,
|
|
1529
|
+
selector: "st-form-field",
|
|
1530
|
+
inputs: [
|
|
1531
|
+
"libelle",
|
|
1532
|
+
"complement",
|
|
1533
|
+
"disposition",
|
|
1534
|
+
"presentation",
|
|
1535
|
+
"libelleMasque",
|
|
1536
|
+
"descriptionsDuControle"
|
|
1537
|
+
]
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
kind: "directive",
|
|
1541
|
+
type: StControleDeChamp,
|
|
1542
|
+
selector: "[stControleDeChamp]"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
kind: "component",
|
|
1546
|
+
type: StIcon,
|
|
1547
|
+
selector: "st-icon",
|
|
1548
|
+
inputs: [
|
|
1549
|
+
"icone",
|
|
1550
|
+
"nom",
|
|
1551
|
+
"variante",
|
|
1552
|
+
"sprite",
|
|
1553
|
+
"nomMetier",
|
|
1554
|
+
"taille",
|
|
1555
|
+
"ton",
|
|
1556
|
+
"etiquette",
|
|
1557
|
+
"miroir"
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
kind: "component",
|
|
1562
|
+
type: StSpinner,
|
|
1563
|
+
selector: "st-spinner",
|
|
1564
|
+
inputs: [
|
|
1565
|
+
"taille",
|
|
1566
|
+
"ton",
|
|
1567
|
+
"etiquette",
|
|
1568
|
+
"icone"
|
|
1569
|
+
]
|
|
1570
|
+
}
|
|
1571
|
+
],
|
|
1572
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1573
|
+
});
|
|
1574
|
+
};
|
|
1575
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1576
|
+
minVersion: "12.0.0",
|
|
1577
|
+
version: "22.2.2",
|
|
1578
|
+
ngImport: i0,
|
|
1579
|
+
type: StInput,
|
|
1580
|
+
decorators: [{
|
|
1581
|
+
type: Component,
|
|
1582
|
+
args: [{
|
|
1583
|
+
selector: "st-input",
|
|
1584
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1585
|
+
imports: [
|
|
1586
|
+
StFormField,
|
|
1587
|
+
StControleDeChamp,
|
|
1588
|
+
StIcon,
|
|
1589
|
+
StSpinner
|
|
1590
|
+
],
|
|
1591
|
+
host: {
|
|
1592
|
+
class: "st-input",
|
|
1593
|
+
"[attr.data-depassement]": "enDepassement() ? \"\" : null"
|
|
1594
|
+
},
|
|
1595
|
+
template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideAffichee()\"\n [complement]=\"compteur()\"\n [erreurs]=\"erreurs()\"\n [afficherErreurs]=\"afficherErreurs()\"\n [obligatoire]=\"required()\"\n [presentation]=\"presentation()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <!-- Meta, aide contextuelle (lot 265) et indication de l'application, relayees a l'enveloppe\n (lot 215). -->\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le cadre : prefixe, zone de frappe, suffixe. Sans emplacement rempli, il s'efface et\n l'input porte seul l'apparence du champ ; avec, il la porte a sa place (EA-11). -->\n <div class=\"st-input__cadre\" (mousedown)=\"surPressionDuCadre($event)\">\n <span #prefixe class=\"st-input__prefixe\" [id]=\"idPrefixe\">\n @if (icone(); as nom) {\n <st-icon class=\"st-input__icone\" [nom]=\"nom\" taille=\"20\" />\n }\n <ng-content select=\"[stPrefixe]\"\n /></span>\n <input\n #champ\n class=\"st-input__champ\"\n stControleDeChamp\n [attr.data-chiffres]=\"chiffres()\"\n [type]=\"type()\"\n [value]=\"value()\"\n [attr.name]=\"name() || null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.placeholder]=\"exemple()\"\n [attr.dir]=\"sens()\"\n [attr.aria-busy]=\"pending() ? 'true' : null\"\n [attr.list]=\"avecSuggestions() ? idDesSuggestions : null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"surSortie()\"\n />\n <!-- Des valeurs proposees, jamais imposees : la liste native du navigateur (D133). -->\n @if (avecSuggestions()) {\n <datalist [id]=\"idDesSuggestions\">\n @for (suggestion of suggestions() ?? []; track $index) {\n <option [value]=\"suggestion\"></option>\n }\n </datalist>\n }\n <span #suffixe class=\"st-input__suffixe\" [id]=\"idSuffixe\"\n ><ng-content select=\"[stSuffixe]\" />\n @if (attenteVisible()) {\n <span class=\"st-input__attente\" aria-hidden=\"true\"\n ><st-spinner taille=\"sm\" ton=\"neutre\"\n /></span>\n }\n </span>\n </div>\n</st-form-field>\n<!-- Les seuils du compteur (20, 10, 0 restants) et le depassement : seulement avec maxLength. -->\n@if (compteur() !== null) {\n <span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n}\n",
|
|
1596
|
+
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-input__cadre{--_frappe-minimale: min(100%, calc(8ch + var(--st-espacement-3-5) + var(--st-espacement-2)));display:grid;grid-template-columns:minmax(0,auto) minmax(var(--_frappe-minimale),1fr) minmax(0,auto);align-items:center}.st-input__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-input__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-input__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-input__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-input__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)}}@media(hover:hover){.st-input__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-input__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-input__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-input__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-input__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-input__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-input__champ:is(input,textarea):read-only:not(:disabled),.st-input__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-input__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}.st-input__champ{grid-column:2}.st-input__champ[data-chiffres=reference]{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-references)}.st-input__prefixe,.st-input__suffixe{display:inline-flex;gap:var(--st-espacement-2);align-items:center;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-attenue);white-space:nowrap;cursor:text}.st-input__prefixe:empty,.st-input__suffixe:empty{display:none}.st-input__prefixe,.st-input__suffixe{min-inline-size:0}.st-input__prefixe>::ng-deep :is([stPrefixe],[stSuffixe]):not(a,button,input,select,textarea,st-icon),.st-input__suffixe>::ng-deep :is([stPrefixe],[stSuffixe]):not(a,button,input,select,textarea,st-icon){min-inline-size:0;overflow:hidden;text-overflow:ellipsis}.st-input__prefixe{grid-column:1}.st-input__suffixe{grid-column:3}.st-input__attente{display:inline-flex}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)){cursor:text}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)){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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty))>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):hover:not(:has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ:focus-visible){border-color:var(--st-couleur-primaire)}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ[aria-invalid=true]):has(>.st-input__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-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ:disabled){color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ:is(input,textarea):read-only:not(:disabled)),.st-input__cadre:has(>.st-input__prefixe:not(:empty),>.st-input__suffixe:not(:empty)):has(>.st-input__champ[aria-readonly=true]:not(:disabled)){background:var(--st-couleur-surface-enfoncee)}.st-input__cadre:has(>.st-input__prefixe:not(:empty)){padding-inline-start:var(--st-espacement-4)}.st-input__cadre:has(>.st-input__prefixe:not(:empty))>.st-input__champ{padding-inline-start:var(--st-espacement-2)}.st-input__cadre:has(>.st-input__suffixe:not(:empty)){padding-inline-end:var(--st-espacement-4)}.st-input__cadre:has(>.st-input__suffixe:not(:empty))>.st-input__champ{padding-inline-end:var(--st-espacement-2)}.st-input__cadre:has(>.st-input__champ:disabled) :is(.st-input__prefixe,.st-input__suffixe){color:var(--st-couleur-texte-desactive);cursor:inherit}@media print{.st-input__champ,.st-input__cadre{box-shadow:none}.st-input__attente{display:none}}:host([data-depassement]) ::ng-deep .st-form-field__complement{color:var(--st-couleur-erreur)}\n"]
|
|
1597
|
+
}]
|
|
1598
|
+
}],
|
|
1599
|
+
ctorParameters: () => [],
|
|
1600
|
+
propDecorators: {
|
|
1601
|
+
zoneDePrefixe: [{
|
|
1602
|
+
type: i0.ViewChild,
|
|
1603
|
+
args: ["prefixe", { isSignal: true }]
|
|
1604
|
+
}],
|
|
1605
|
+
zoneDeSuffixe: [{
|
|
1606
|
+
type: i0.ViewChild,
|
|
1607
|
+
args: ["suffixe", { isSignal: true }]
|
|
1608
|
+
}],
|
|
1609
|
+
type: [{
|
|
1610
|
+
type: i0.Input,
|
|
1611
|
+
args: [{
|
|
1612
|
+
isSignal: true,
|
|
1613
|
+
alias: "type",
|
|
1614
|
+
required: false
|
|
1615
|
+
}]
|
|
1616
|
+
}],
|
|
1617
|
+
autocomplete: [{
|
|
1618
|
+
type: i0.Input,
|
|
1619
|
+
args: [{
|
|
1620
|
+
isSignal: true,
|
|
1621
|
+
alias: "autocomplete",
|
|
1622
|
+
required: false
|
|
1623
|
+
}]
|
|
1624
|
+
}],
|
|
1625
|
+
inputmode: [{
|
|
1626
|
+
type: i0.Input,
|
|
1627
|
+
args: [{
|
|
1628
|
+
isSignal: true,
|
|
1629
|
+
alias: "inputmode",
|
|
1630
|
+
required: false
|
|
1631
|
+
}]
|
|
1632
|
+
}],
|
|
1633
|
+
icone: [{
|
|
1634
|
+
type: i0.Input,
|
|
1635
|
+
args: [{
|
|
1636
|
+
isSignal: true,
|
|
1637
|
+
alias: "icone",
|
|
1638
|
+
required: false
|
|
1639
|
+
}]
|
|
1640
|
+
}],
|
|
1641
|
+
exemple: [{
|
|
1642
|
+
type: i0.Input,
|
|
1643
|
+
args: [{
|
|
1644
|
+
isSignal: true,
|
|
1645
|
+
alias: "exemple",
|
|
1646
|
+
required: false
|
|
1647
|
+
}]
|
|
1648
|
+
}],
|
|
1649
|
+
chiffres: [{
|
|
1650
|
+
type: i0.Input,
|
|
1651
|
+
args: [{
|
|
1652
|
+
isSignal: true,
|
|
1653
|
+
alias: "chiffres",
|
|
1654
|
+
required: false
|
|
1655
|
+
}]
|
|
1656
|
+
}],
|
|
1657
|
+
presentation: [{
|
|
1658
|
+
type: i0.Input,
|
|
1659
|
+
args: [{
|
|
1660
|
+
isSignal: true,
|
|
1661
|
+
alias: "presentation",
|
|
1662
|
+
required: false
|
|
1663
|
+
}]
|
|
1664
|
+
}],
|
|
1665
|
+
decritPar: [{
|
|
1666
|
+
type: i0.Input,
|
|
1667
|
+
args: [{
|
|
1668
|
+
isSignal: true,
|
|
1669
|
+
alias: "decritPar",
|
|
1670
|
+
required: false
|
|
1671
|
+
}]
|
|
1672
|
+
}],
|
|
1673
|
+
suggestions: [{
|
|
1674
|
+
type: i0.Input,
|
|
1675
|
+
args: [{
|
|
1676
|
+
isSignal: true,
|
|
1677
|
+
alias: "suggestions",
|
|
1678
|
+
required: false
|
|
1679
|
+
}]
|
|
1680
|
+
}]
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
var StCheckbox = class StCheckbox extends ContratDeCase {
|
|
1684
|
+
indetermine = model(false, ...ngDevMode ? [{ debugName: "indetermine" }] : /* istanbul ignore next */ []);
|
|
1685
|
+
aideDEtat = input(false, {
|
|
1686
|
+
...ngDevMode ? { debugName: "aideDEtat" } : /* istanbul ignore next */ {},
|
|
1687
|
+
transform: booleanAttribute
|
|
1688
|
+
});
|
|
1689
|
+
enErreur = computed(() => this.touched() && this.errors().length > 0, ...ngDevMode ? [{ debugName: "enErreur" }] : /* istanbul ignore next */ []);
|
|
1690
|
+
surChangement(evenement) {
|
|
1691
|
+
this.surBascule(evenement);
|
|
1692
|
+
if (!this.readonly()) this.indetermine.set(false);
|
|
1693
|
+
}
|
|
1694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1695
|
+
minVersion: "12.0.0",
|
|
1696
|
+
version: "22.2.2",
|
|
1697
|
+
ngImport: i0,
|
|
1698
|
+
type: StCheckbox,
|
|
1699
|
+
deps: null,
|
|
1700
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1701
|
+
});
|
|
1702
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1703
|
+
minVersion: "17.1.0",
|
|
1704
|
+
version: "22.2.2",
|
|
1705
|
+
type: StCheckbox,
|
|
1706
|
+
isStandalone: true,
|
|
1707
|
+
selector: "st-checkbox",
|
|
1708
|
+
inputs: {
|
|
1709
|
+
indetermine: {
|
|
1710
|
+
classPropertyName: "indetermine",
|
|
1711
|
+
publicName: "indetermine",
|
|
1712
|
+
isSignal: true,
|
|
1713
|
+
isRequired: false,
|
|
1714
|
+
transformFunction: null
|
|
1715
|
+
},
|
|
1716
|
+
aideDEtat: {
|
|
1717
|
+
classPropertyName: "aideDEtat",
|
|
1718
|
+
publicName: "aideDEtat",
|
|
1719
|
+
isSignal: true,
|
|
1720
|
+
isRequired: false,
|
|
1721
|
+
transformFunction: null
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
outputs: { indetermine: "indetermineChange" },
|
|
1725
|
+
host: {
|
|
1726
|
+
properties: {
|
|
1727
|
+
"attr.data-cochee": "checked() && !indetermine() ? \"\" : null",
|
|
1728
|
+
"attr.data-en-erreur": "enErreur() ? \"\" : null",
|
|
1729
|
+
"attr.data-avec-aide": "aideEtRaisons() === null ? null : \"\"",
|
|
1730
|
+
"attr.data-aide-d-etat": "aideDEtat() ? \"\" : null"
|
|
1731
|
+
},
|
|
1732
|
+
classAttribute: "st-checkbox"
|
|
1733
|
+
},
|
|
1734
|
+
usesInheritance: true,
|
|
1735
|
+
ngImport: i0,
|
|
1736
|
+
template: "<st-form-field\n disposition=\"case\"\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched()\"\n [obligatoire]=\"required()\"\n>\n <!-- Libelle riche, relaye a l'etiquette de l'enveloppe (lot 218). -->\n <ng-content select=\"[stLibelle]\" ngProjectAs=\"[stLibelle]\" />\n <input\n #champ\n class=\"st-checkbox__case\"\n type=\"checkbox\"\n stControleDeChamp\n [checked]=\"checked()\"\n [indeterminate]=\"indetermine()\"\n [attr.name]=\"name() || null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [disabled]=\"disabled()\"\n (click)=\"surClic($event)\"\n (change)=\"surChangement($event)\"\n (blur)=\"touch.emit()\"\n />\n</st-form-field>\n",
|
|
1737
|
+
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:flex;align-items:center;box-sizing:border-box;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));padding-inline:var(--st-espacement-2);font-size:var(--st-taille-md);line-height:var(--st-interligne-md);color:var(--st-couleur-texte);border-radius:var(--st-rayon-md)}:host([data-cochee]){--st-choix-graisse: var(--st-graisse-semi);background-color:rgb(from var(--st-couleur-surface-conteneur-bas) r g b/50%);border:var(--st-epaisseur-fine) solid rgb(from var(--st-couleur-primaire) r g b/10%)}:host([data-en-erreur]){background-color:var(--st-couleur-erreur-discret);border:var(--st-epaisseur-fine) solid rgb(from var(--st-couleur-erreur) r g b/30%)}:host(:has(.st-checkbox__case:disabled)){--st-choix-couleur: var(--st-couleur-texte-desactive)}:host([data-avec-aide]){--st-choix-interligne: 1.25}:host([data-cochee][data-aide-d-etat]) ::ng-deep .st-form-field__aide{font-weight:var(--st-graisse-moyenne);color:var(--st-couleur-succes)}st-form-field{flex:1 1 auto;min-inline-size:0}.st-checkbox__case: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)}@media(pointer:coarse){.st-checkbox__case{position:relative}.st-checkbox__case:after{position:absolute;top:50%;left:50%;min-width:var(--st-cible-tactile-min);min-height:var(--st-cible-tactile-min);content:\"\";transform:translate(-50%,-50%)}}.st-checkbox__case{appearance:none;display:inline-grid;flex:none;place-content:center;box-sizing:border-box;inline-size:var(--st-cible-min);block-size:var(--st-cible-min);margin:0;cursor:pointer;background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-rayon-sm)}.st-checkbox__case:before{content:\"\";display:none}@media(hover:hover){.st-checkbox__case:hover:not(:disabled,:checked,[type=checkbox]:indeterminate){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-checkbox__case:checked,.st-checkbox__case[type=checkbox]:indeterminate{background:var(--st-couleur-primaire);border-color:var(--st-couleur-primaire)}.st-checkbox__case[type=checkbox]:is(:checked,:indeterminate){border-width:0}.st-checkbox__case[type=checkbox]:checked:before{display:block;inline-size:calc(var(--st-espacement-4) + var(--st-espacement-demi));block-size:calc(var(--st-espacement-4) + var(--st-espacement-demi));background:var(--st-couleur-sur-primaire);clip-path:polygon(39.79% 75%,16.04% 51.25%,21.98% 45.31%,39.79% 63.13%,78.02% 24.9%,83.96% 30.83%)}.st-checkbox__case[type=checkbox]:indeterminate:before{display:block;clip-path:none;inline-size:var(--st-espacement-3-5);block-size:calc((var(--st-epaisseur-moyenne) + var(--st-epaisseur-forte)) / 2);background:var(--st-couleur-sur-primaire);border-radius:var(--st-rayon-pleine)}.st-checkbox__case[type=radio]{border-radius:var(--st-rayon-pleine)}.st-checkbox__case[type=radio]:checked{background:var(--st-couleur-surface);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-primaire)}.st-checkbox__case[type=radio]:checked:before{display:block;inline-size:var(--st-espacement-3);block-size:var(--st-espacement-3);background:var(--st-couleur-primaire);border-radius:var(--st-rayon-pleine)}.st-checkbox__case[aria-invalid=true]:not(:checked,:disabled,[type=checkbox]:indeterminate){border:var(--st-epaisseur-moyenne) solid var(--st-couleur-erreur)}.st-checkbox__case[aria-readonly=true]:not(:disabled){cursor:default}.st-checkbox__case:disabled{cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-checkbox__case:disabled:is(:checked,[type=checkbox]:indeterminate){background:var(--st-couleur-texte-desactive);border-color:var(--st-couleur-texte-desactive)}.st-checkbox__case[type=radio]:disabled:checked{background:var(--st-couleur-surface)}.st-checkbox__case[type=radio]:disabled:checked:before{background:var(--st-couleur-texte-desactive)}@media(forced-colors:active){.st-checkbox__case{forced-color-adjust:none;background:Canvas;border-color:CanvasText}.st-checkbox__case:is(:checked,[type=checkbox]:indeterminate){background:Highlight;border-color:Highlight}.st-checkbox__case[type=checkbox]:is(:checked,:indeterminate):before{background:HighlightText}.st-checkbox__case[type=radio]:checked{background:Canvas}.st-checkbox__case[type=radio]:checked:before{background:Highlight}.st-checkbox__case:disabled{border-color:GrayText}}@media print{.st-checkbox__case:is(:checked,[type=checkbox]:indeterminate),.st-checkbox__case[type=checkbox]:is(:checked,:indeterminate){background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-texte)}.st-checkbox__case[type=radio]:checked{border:var(--st-epaisseur-moyenne) solid var(--st-couleur-texte)}.st-checkbox__case[type=checkbox]:checked:before,.st-checkbox__case[type=checkbox]:indeterminate:before,.st-checkbox__case[type=radio]:checked:before{background:var(--st-couleur-texte);-webkit-print-color-adjust:exact;print-color-adjust:exact}}@media(forced-colors:active){:host([data-cochee]),:host([data-en-erreur]){border-color:CanvasText}}\n"],
|
|
1738
|
+
dependencies: [{
|
|
1739
|
+
kind: "component",
|
|
1740
|
+
type: StFormField,
|
|
1741
|
+
selector: "st-form-field",
|
|
1742
|
+
inputs: [
|
|
1743
|
+
"libelle",
|
|
1744
|
+
"complement",
|
|
1745
|
+
"disposition",
|
|
1746
|
+
"presentation",
|
|
1747
|
+
"libelleMasque",
|
|
1748
|
+
"descriptionsDuControle"
|
|
1749
|
+
]
|
|
1750
|
+
}, {
|
|
1751
|
+
kind: "directive",
|
|
1752
|
+
type: StControleDeChamp,
|
|
1753
|
+
selector: "[stControleDeChamp]"
|
|
1754
|
+
}],
|
|
1755
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1756
|
+
});
|
|
1757
|
+
};
|
|
1758
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1759
|
+
minVersion: "12.0.0",
|
|
1760
|
+
version: "22.2.2",
|
|
1761
|
+
ngImport: i0,
|
|
1762
|
+
type: StCheckbox,
|
|
1763
|
+
decorators: [{
|
|
1764
|
+
type: Component,
|
|
1765
|
+
args: [{
|
|
1766
|
+
selector: "st-checkbox",
|
|
1767
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1768
|
+
imports: [StFormField, StControleDeChamp],
|
|
1769
|
+
host: {
|
|
1770
|
+
class: "st-checkbox",
|
|
1771
|
+
"[attr.data-cochee]": "checked() && !indetermine() ? \"\" : null",
|
|
1772
|
+
"[attr.data-en-erreur]": "enErreur() ? \"\" : null",
|
|
1773
|
+
"[attr.data-avec-aide]": "aideEtRaisons() === null ? null : \"\"",
|
|
1774
|
+
"[attr.data-aide-d-etat]": "aideDEtat() ? \"\" : null"
|
|
1775
|
+
},
|
|
1776
|
+
template: "<st-form-field\n disposition=\"case\"\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched()\"\n [obligatoire]=\"required()\"\n>\n <!-- Libelle riche, relaye a l'etiquette de l'enveloppe (lot 218). -->\n <ng-content select=\"[stLibelle]\" ngProjectAs=\"[stLibelle]\" />\n <input\n #champ\n class=\"st-checkbox__case\"\n type=\"checkbox\"\n stControleDeChamp\n [checked]=\"checked()\"\n [indeterminate]=\"indetermine()\"\n [attr.name]=\"name() || null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [disabled]=\"disabled()\"\n (click)=\"surClic($event)\"\n (change)=\"surChangement($event)\"\n (blur)=\"touch.emit()\"\n />\n</st-form-field>\n",
|
|
1777
|
+
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:flex;align-items:center;box-sizing:border-box;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));padding-inline:var(--st-espacement-2);font-size:var(--st-taille-md);line-height:var(--st-interligne-md);color:var(--st-couleur-texte);border-radius:var(--st-rayon-md)}:host([data-cochee]){--st-choix-graisse: var(--st-graisse-semi);background-color:rgb(from var(--st-couleur-surface-conteneur-bas) r g b/50%);border:var(--st-epaisseur-fine) solid rgb(from var(--st-couleur-primaire) r g b/10%)}:host([data-en-erreur]){background-color:var(--st-couleur-erreur-discret);border:var(--st-epaisseur-fine) solid rgb(from var(--st-couleur-erreur) r g b/30%)}:host(:has(.st-checkbox__case:disabled)){--st-choix-couleur: var(--st-couleur-texte-desactive)}:host([data-avec-aide]){--st-choix-interligne: 1.25}:host([data-cochee][data-aide-d-etat]) ::ng-deep .st-form-field__aide{font-weight:var(--st-graisse-moyenne);color:var(--st-couleur-succes)}st-form-field{flex:1 1 auto;min-inline-size:0}.st-checkbox__case: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)}@media(pointer:coarse){.st-checkbox__case{position:relative}.st-checkbox__case:after{position:absolute;top:50%;left:50%;min-width:var(--st-cible-tactile-min);min-height:var(--st-cible-tactile-min);content:\"\";transform:translate(-50%,-50%)}}.st-checkbox__case{appearance:none;display:inline-grid;flex:none;place-content:center;box-sizing:border-box;inline-size:var(--st-cible-min);block-size:var(--st-cible-min);margin:0;cursor:pointer;background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure-forte);border-radius:var(--st-rayon-sm)}.st-checkbox__case:before{content:\"\";display:none}@media(hover:hover){.st-checkbox__case:hover:not(:disabled,:checked,[type=checkbox]:indeterminate){border-color:var(--st-couleur-texte-discret);transition:border-color var(--st-duree-rapide) var(--st-courbe-standard)}}.st-checkbox__case:checked,.st-checkbox__case[type=checkbox]:indeterminate{background:var(--st-couleur-primaire);border-color:var(--st-couleur-primaire)}.st-checkbox__case[type=checkbox]:is(:checked,:indeterminate){border-width:0}.st-checkbox__case[type=checkbox]:checked:before{display:block;inline-size:calc(var(--st-espacement-4) + var(--st-espacement-demi));block-size:calc(var(--st-espacement-4) + var(--st-espacement-demi));background:var(--st-couleur-sur-primaire);clip-path:polygon(39.79% 75%,16.04% 51.25%,21.98% 45.31%,39.79% 63.13%,78.02% 24.9%,83.96% 30.83%)}.st-checkbox__case[type=checkbox]:indeterminate:before{display:block;clip-path:none;inline-size:var(--st-espacement-3-5);block-size:calc((var(--st-epaisseur-moyenne) + var(--st-epaisseur-forte)) / 2);background:var(--st-couleur-sur-primaire);border-radius:var(--st-rayon-pleine)}.st-checkbox__case[type=radio]{border-radius:var(--st-rayon-pleine)}.st-checkbox__case[type=radio]:checked{background:var(--st-couleur-surface);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-primaire)}.st-checkbox__case[type=radio]:checked:before{display:block;inline-size:var(--st-espacement-3);block-size:var(--st-espacement-3);background:var(--st-couleur-primaire);border-radius:var(--st-rayon-pleine)}.st-checkbox__case[aria-invalid=true]:not(:checked,:disabled,[type=checkbox]:indeterminate){border:var(--st-epaisseur-moyenne) solid var(--st-couleur-erreur)}.st-checkbox__case[aria-readonly=true]:not(:disabled){cursor:default}.st-checkbox__case:disabled{cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-checkbox__case:disabled:is(:checked,[type=checkbox]:indeterminate){background:var(--st-couleur-texte-desactive);border-color:var(--st-couleur-texte-desactive)}.st-checkbox__case[type=radio]:disabled:checked{background:var(--st-couleur-surface)}.st-checkbox__case[type=radio]:disabled:checked:before{background:var(--st-couleur-texte-desactive)}@media(forced-colors:active){.st-checkbox__case{forced-color-adjust:none;background:Canvas;border-color:CanvasText}.st-checkbox__case:is(:checked,[type=checkbox]:indeterminate){background:Highlight;border-color:Highlight}.st-checkbox__case[type=checkbox]:is(:checked,:indeterminate):before{background:HighlightText}.st-checkbox__case[type=radio]:checked{background:Canvas}.st-checkbox__case[type=radio]:checked:before{background:Highlight}.st-checkbox__case:disabled{border-color:GrayText}}@media print{.st-checkbox__case:is(:checked,[type=checkbox]:indeterminate),.st-checkbox__case[type=checkbox]:is(:checked,:indeterminate){background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-texte)}.st-checkbox__case[type=radio]:checked{border:var(--st-epaisseur-moyenne) solid var(--st-couleur-texte)}.st-checkbox__case[type=checkbox]:checked:before,.st-checkbox__case[type=checkbox]:indeterminate:before,.st-checkbox__case[type=radio]:checked:before{background:var(--st-couleur-texte);-webkit-print-color-adjust:exact;print-color-adjust:exact}}@media(forced-colors:active){:host([data-cochee]),:host([data-en-erreur]){border-color:CanvasText}}\n"]
|
|
1778
|
+
}]
|
|
1779
|
+
}],
|
|
1780
|
+
propDecorators: {
|
|
1781
|
+
indetermine: [{
|
|
1782
|
+
type: i0.Input,
|
|
1783
|
+
args: [{
|
|
1784
|
+
isSignal: true,
|
|
1785
|
+
alias: "indetermine",
|
|
1786
|
+
required: false
|
|
1787
|
+
}]
|
|
1788
|
+
}, {
|
|
1789
|
+
type: i0.Output,
|
|
1790
|
+
args: ["indetermineChange"]
|
|
1791
|
+
}],
|
|
1792
|
+
aideDEtat: [{
|
|
1793
|
+
type: i0.Input,
|
|
1794
|
+
args: [{
|
|
1795
|
+
isSignal: true,
|
|
1796
|
+
alias: "aideDEtat",
|
|
1797
|
+
required: false
|
|
1798
|
+
}]
|
|
1799
|
+
}]
|
|
1800
|
+
}
|
|
1801
|
+
});
|
|
1802
|
+
const ST_ETAT_D_ENVOI = new InjectionToken("ST_ETAT_D_ENVOI");
|
|
1803
|
+
var StErrorSummary = class StErrorSummary {
|
|
1804
|
+
libelles = inject(ST_LIBELLES);
|
|
1805
|
+
locale = inject(ST_LOCALE);
|
|
1806
|
+
element = inject(ElementRef);
|
|
1807
|
+
injecteur = inject(Injector);
|
|
1808
|
+
envoi = inject(ST_ETAT_D_ENVOI, { optional: true });
|
|
1809
|
+
noms = inject(StNomsDesChamps);
|
|
1810
|
+
erreurs = input(...ngDevMode ? [void 0, { debugName: "erreurs" }] : /* istanbul ignore next */ []);
|
|
1811
|
+
titre = input(null, ...ngDevMode ? [{ debugName: "titre" }] : /* istanbul ignore next */ []);
|
|
1812
|
+
niveau = input(2, ...ngDevMode ? [{ debugName: "niveau" }] : /* istanbul ignore next */ []);
|
|
1813
|
+
introduction = input(null, ...ngDevMode ? [{ debugName: "introduction" }] : /* istanbul ignore next */ []);
|
|
1814
|
+
tentative = input(0, {
|
|
1815
|
+
...ngDevMode ? { debugName: "tentative" } : /* istanbul ignore next */ {},
|
|
1816
|
+
transform: (valeur) => numberAttribute(valeur, 0)
|
|
1817
|
+
});
|
|
1818
|
+
erreursLues = computed(() => this.erreurs() ?? this.envoi?.recapitulatif() ?? [], ...ngDevMode ? [{ debugName: "erreursLues" }] : /* istanbul ignore next */ []);
|
|
1819
|
+
tentativeLue = computed(() => this.erreurs() === void 0 && this.envoi !== null ? this.envoi.tentative() : this.tentative(), ...ngDevMode ? [{ debugName: "tentativeLue" }] : /* istanbul ignore next */ []);
|
|
1820
|
+
identifiantDuTitre = inject(StIdentifiants).prochain("st-recapitulatif");
|
|
1821
|
+
lignes = computed(() => {
|
|
1822
|
+
const libelles = this.libelles();
|
|
1823
|
+
const locale = this.locale();
|
|
1824
|
+
const vus = /* @__PURE__ */ new Set();
|
|
1825
|
+
const lignes = [];
|
|
1826
|
+
for (const erreur of this.erreursLues()) {
|
|
1827
|
+
const champ = erreur.fieldTree;
|
|
1828
|
+
if (champ !== void 0) {
|
|
1829
|
+
if (vus.has(champ)) continue;
|
|
1830
|
+
vus.add(champ);
|
|
1831
|
+
}
|
|
1832
|
+
const etat = champ?.();
|
|
1833
|
+
const liaison = etat?.formFieldBindings()[0];
|
|
1834
|
+
const nom = liaison === void 0 ? null : libelleDe(liaison.element, this.noms) ?? libelles.champSansNom(lignes.length + 1);
|
|
1835
|
+
lignes.push({
|
|
1836
|
+
cle: champ ?? lignes.length,
|
|
1837
|
+
libelle: nom === null ? null : libelles.libelleDeChamp(nom),
|
|
1838
|
+
message: messageDErreur(erreur, libelles, locale),
|
|
1839
|
+
aller: () => {
|
|
1840
|
+
etat?.focusBoundControl();
|
|
1841
|
+
}
|
|
1842
|
+
});
|
|
1843
|
+
}
|
|
1844
|
+
return lignes;
|
|
1845
|
+
}, ...ngDevMode ? [{ debugName: "lignes" }] : /* istanbul ignore next */ []);
|
|
1846
|
+
prefixe = computed(() => this.libelles().tonErreur, ...ngDevMode ? [{ debugName: "prefixe" }] : /* istanbul ignore next */ []);
|
|
1847
|
+
titreLu = computed(() => this.titre() ?? this.libelles().erreursACorriger(this.lignes().length), ...ngDevMode ? [{ debugName: "titreLu" }] : /* istanbul ignore next */ []);
|
|
1848
|
+
constructor() {
|
|
1849
|
+
let visible = false;
|
|
1850
|
+
let derniereTentative = this.tentativeLue();
|
|
1851
|
+
effect(() => {
|
|
1852
|
+
const maintenant = this.lignes().length > 0;
|
|
1853
|
+
const tentative = this.tentativeLue();
|
|
1854
|
+
const nouvelleTentative = !Object.is(tentative, derniereTentative);
|
|
1855
|
+
derniereTentative = tentative;
|
|
1856
|
+
if (maintenant && (!visible || nouvelleTentative)) afterNextRender(() => {
|
|
1857
|
+
this.focus();
|
|
1858
|
+
}, { injector: this.injecteur });
|
|
1859
|
+
visible = maintenant;
|
|
1860
|
+
});
|
|
1861
|
+
let averti = false;
|
|
1862
|
+
effect(() => {
|
|
1863
|
+
if (!(typeof ngDevMode === "undefined" || !!ngDevMode) || averti || this.envoi !== null || this.erreurs() !== void 0) return;
|
|
1864
|
+
averti = true;
|
|
1865
|
+
console.warn("[st-error-summary] ni [erreurs] ni form[stForm] autour : il ne s affichera jamais.");
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
focus(options) {
|
|
1869
|
+
if (this.lignes().length > 0) this.element.nativeElement.focus(options);
|
|
1870
|
+
}
|
|
1871
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1872
|
+
minVersion: "12.0.0",
|
|
1873
|
+
version: "22.2.2",
|
|
1874
|
+
ngImport: i0,
|
|
1875
|
+
type: StErrorSummary,
|
|
1876
|
+
deps: [],
|
|
1877
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1878
|
+
});
|
|
1879
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1880
|
+
minVersion: "17.0.0",
|
|
1881
|
+
version: "22.2.2",
|
|
1882
|
+
type: StErrorSummary,
|
|
1883
|
+
isStandalone: true,
|
|
1884
|
+
selector: "st-error-summary",
|
|
1885
|
+
inputs: {
|
|
1886
|
+
erreurs: {
|
|
1887
|
+
classPropertyName: "erreurs",
|
|
1888
|
+
publicName: "erreurs",
|
|
1889
|
+
isSignal: true,
|
|
1890
|
+
isRequired: false,
|
|
1891
|
+
transformFunction: null
|
|
1892
|
+
},
|
|
1893
|
+
titre: {
|
|
1894
|
+
classPropertyName: "titre",
|
|
1895
|
+
publicName: "titre",
|
|
1896
|
+
isSignal: true,
|
|
1897
|
+
isRequired: false,
|
|
1898
|
+
transformFunction: null
|
|
1899
|
+
},
|
|
1900
|
+
niveau: {
|
|
1901
|
+
classPropertyName: "niveau",
|
|
1902
|
+
publicName: "niveau",
|
|
1903
|
+
isSignal: true,
|
|
1904
|
+
isRequired: false,
|
|
1905
|
+
transformFunction: null
|
|
1906
|
+
},
|
|
1907
|
+
introduction: {
|
|
1908
|
+
classPropertyName: "introduction",
|
|
1909
|
+
publicName: "introduction",
|
|
1910
|
+
isSignal: true,
|
|
1911
|
+
isRequired: false,
|
|
1912
|
+
transformFunction: null
|
|
1913
|
+
},
|
|
1914
|
+
tentative: {
|
|
1915
|
+
classPropertyName: "tentative",
|
|
1916
|
+
publicName: "tentative",
|
|
1917
|
+
isSignal: true,
|
|
1918
|
+
isRequired: false,
|
|
1919
|
+
transformFunction: null
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
host: {
|
|
1923
|
+
properties: {
|
|
1924
|
+
"attr.hidden": "lignes().length === 0 ? \"\" : null",
|
|
1925
|
+
"attr.role": "lignes().length === 0 ? null : \"region\"",
|
|
1926
|
+
"attr.tabindex": "lignes().length === 0 ? null : -1",
|
|
1927
|
+
"attr.aria-labelledby": "lignes().length === 0 ? null : identifiantDuTitre"
|
|
1928
|
+
},
|
|
1929
|
+
classAttribute: "st-error-summary"
|
|
1930
|
+
},
|
|
1931
|
+
ngImport: i0,
|
|
1932
|
+
template: "@if (lignes().length > 0) {\n <div class=\"st-error-summary__entete\">\n <st-icon class=\"st-error-summary__icone\" nom=\"cercle-croix\" variante=\"plein\" taille=\"22\" />\n @switch (niveau()) {\n @case (3) {\n <h3 class=\"st-error-summary__titre\" [id]=\"identifiantDuTitre\">{{ titreLu() }}</h3>\n }\n @case (4) {\n <h4 class=\"st-error-summary__titre\" [id]=\"identifiantDuTitre\">{{ titreLu() }}</h4>\n }\n @default {\n <h2 class=\"st-error-summary__titre\" [id]=\"identifiantDuTitre\">{{ titreLu() }}</h2>\n }\n }\n <span class=\"st-error-summary__etiquette\"><ng-content select=\"[stEtiquette]\" /></span>\n </div>\n <div class=\"st-error-summary__corps\">\n @if (introduction(); as texte) {\n <p class=\"st-error-summary__introduction\">{{ texte }}</p>\n }\n <!-- `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste (D-1). -->\n <ul class=\"st-error-summary__liste\" role=\"list\">\n @for (ligne of lignes(); track ligne.cle) {\n <li class=\"st-error-summary__ligne\">\n <span class=\"st-error-summary__puce\" aria-hidden=\"true\">•</span>\n <!-- Le mot de l'erreur, a la place de la puce sous `--st-prefixe-de-ton: visible`. -->\n <span class=\"st-error-summary__prefixe\">{{ prefixe() }}</span>\n @if (ligne.libelle !== null) {\n <button type=\"button\" class=\"st-error-summary__lien\" (click)=\"ligne.aller()\">\n <strong class=\"st-error-summary__champ\">{{ ligne.libelle }}</strong>\n {{ ligne.message }}\n </button>\n } @else {\n <span class=\"st-error-summary__texte\">{{ ligne.message }}</span>\n }\n </li>\n }\n </ul>\n </div>\n}\n",
|
|
1933
|
+
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:focus{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)}:host{font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal);display:block;box-sizing:border-box;padding:var(--st-espacement-5);color:var(--st-couleur-texte);background-color:var(--st-couleur-erreur-discret);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-erreur);border-radius:var(--st-rayon-md)}.st-error-summary__entete{display:flex;gap:var(--st-espacement-3);align-items:center;padding-block-end:var(--st-espacement-3);border-block-end:var(--st-epaisseur-fine) solid rgb(from var(--st-couleur-erreur) r g b/20%)}.st-error-summary__icone{color:var(--st-couleur-erreur)}.st-error-summary__titre{font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-normal);margin:0;color:var(--st-couleur-erreur)}.st-error-summary__etiquette{display:flex;margin-inline-start:auto}.st-error-summary__etiquette:empty{display:none}.st-error-summary__corps{margin-block-start:var(--st-espacement-3)}.st-error-summary__introduction{margin:0 0 var(--st-espacement-2);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-xs);color:var(--st-couleur-sur-erreur-discret)}.st-error-summary__liste{display:flex;flex-direction:column;gap:var(--st-espacement-2);padding:0;margin:0;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);list-style:none}.st-error-summary__ligne{display:flex;gap:var(--st-espacement-2);align-items:flex-start;min-inline-size:0;overflow-wrap:anywhere}.st-error-summary__puce{flex:none;margin-block-start:var(--st-espacement-demi);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-grasse);line-height:var(--st-interligne-xs);color:var(--st-couleur-erreur)}.st-error-summary__prefixe{display:none;flex:none;font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur);white-space:nowrap}@container style(--st-prefixe-de-ton: visible){.st-error-summary__puce{display:none}.st-error-summary__prefixe{display:inline}}.st-error-summary__lien: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-error-summary__lien{padding:var(--st-espacement-demi) 0;margin-block:calc(-1 * var(--st-espacement-demi));font:inherit;font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur);text-align:start;text-decoration:underline;text-decoration-color:rgb(from var(--st-couleur-erreur) r g b/40%);text-underline-offset:var(--st-espacement-1);cursor:pointer;background:none;border:0}@media(hover:hover){.st-error-summary__lien:hover{text-decoration-thickness:var(--st-epaisseur-moyenne)}}.st-error-summary__champ{font-weight:var(--st-graisse-grasse)}.st-error-summary__texte{color:var(--st-couleur-sur-erreur-discret)}@media(forced-colors:active){:host{border-color:CanvasText}}@media print{:host{background-color:var(--st-couleur-surface)}}\n"],
|
|
1934
|
+
dependencies: [{
|
|
1935
|
+
kind: "component",
|
|
1936
|
+
type: StIcon,
|
|
1937
|
+
selector: "st-icon",
|
|
1938
|
+
inputs: [
|
|
1939
|
+
"icone",
|
|
1940
|
+
"nom",
|
|
1941
|
+
"variante",
|
|
1942
|
+
"sprite",
|
|
1943
|
+
"nomMetier",
|
|
1944
|
+
"taille",
|
|
1945
|
+
"ton",
|
|
1946
|
+
"etiquette",
|
|
1947
|
+
"miroir"
|
|
1948
|
+
]
|
|
1949
|
+
}],
|
|
1950
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1951
|
+
});
|
|
1952
|
+
};
|
|
1953
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1954
|
+
minVersion: "12.0.0",
|
|
1955
|
+
version: "22.2.2",
|
|
1956
|
+
ngImport: i0,
|
|
1957
|
+
type: StErrorSummary,
|
|
1958
|
+
decorators: [{
|
|
1959
|
+
type: Component,
|
|
1960
|
+
args: [{
|
|
1961
|
+
selector: "st-error-summary",
|
|
1962
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1963
|
+
imports: [StIcon],
|
|
1964
|
+
host: {
|
|
1965
|
+
class: "st-error-summary",
|
|
1966
|
+
"[attr.hidden]": "lignes().length === 0 ? \"\" : null",
|
|
1967
|
+
"[attr.role]": "lignes().length === 0 ? null : \"region\"",
|
|
1968
|
+
"[attr.tabindex]": "lignes().length === 0 ? null : -1",
|
|
1969
|
+
"[attr.aria-labelledby]": "lignes().length === 0 ? null : identifiantDuTitre"
|
|
1970
|
+
},
|
|
1971
|
+
template: "@if (lignes().length > 0) {\n <div class=\"st-error-summary__entete\">\n <st-icon class=\"st-error-summary__icone\" nom=\"cercle-croix\" variante=\"plein\" taille=\"22\" />\n @switch (niveau()) {\n @case (3) {\n <h3 class=\"st-error-summary__titre\" [id]=\"identifiantDuTitre\">{{ titreLu() }}</h3>\n }\n @case (4) {\n <h4 class=\"st-error-summary__titre\" [id]=\"identifiantDuTitre\">{{ titreLu() }}</h4>\n }\n @default {\n <h2 class=\"st-error-summary__titre\" [id]=\"identifiantDuTitre\">{{ titreLu() }}</h2>\n }\n }\n <span class=\"st-error-summary__etiquette\"><ng-content select=\"[stEtiquette]\" /></span>\n </div>\n <div class=\"st-error-summary__corps\">\n @if (introduction(); as texte) {\n <p class=\"st-error-summary__introduction\">{{ texte }}</p>\n }\n <!-- `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste (D-1). -->\n <ul class=\"st-error-summary__liste\" role=\"list\">\n @for (ligne of lignes(); track ligne.cle) {\n <li class=\"st-error-summary__ligne\">\n <span class=\"st-error-summary__puce\" aria-hidden=\"true\">•</span>\n <!-- Le mot de l'erreur, a la place de la puce sous `--st-prefixe-de-ton: visible`. -->\n <span class=\"st-error-summary__prefixe\">{{ prefixe() }}</span>\n @if (ligne.libelle !== null) {\n <button type=\"button\" class=\"st-error-summary__lien\" (click)=\"ligne.aller()\">\n <strong class=\"st-error-summary__champ\">{{ ligne.libelle }}</strong>\n {{ ligne.message }}\n </button>\n } @else {\n <span class=\"st-error-summary__texte\">{{ ligne.message }}</span>\n }\n </li>\n }\n </ul>\n </div>\n}\n",
|
|
1972
|
+
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:focus{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)}:host{font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal);display:block;box-sizing:border-box;padding:var(--st-espacement-5);color:var(--st-couleur-texte);background-color:var(--st-couleur-erreur-discret);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-erreur);border-radius:var(--st-rayon-md)}.st-error-summary__entete{display:flex;gap:var(--st-espacement-3);align-items:center;padding-block-end:var(--st-espacement-3);border-block-end:var(--st-epaisseur-fine) solid rgb(from var(--st-couleur-erreur) r g b/20%)}.st-error-summary__icone{color:var(--st-couleur-erreur)}.st-error-summary__titre{font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-normal);margin:0;color:var(--st-couleur-erreur)}.st-error-summary__etiquette{display:flex;margin-inline-start:auto}.st-error-summary__etiquette:empty{display:none}.st-error-summary__corps{margin-block-start:var(--st-espacement-3)}.st-error-summary__introduction{margin:0 0 var(--st-espacement-2);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-xs);color:var(--st-couleur-sur-erreur-discret)}.st-error-summary__liste{display:flex;flex-direction:column;gap:var(--st-espacement-2);padding:0;margin:0;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);list-style:none}.st-error-summary__ligne{display:flex;gap:var(--st-espacement-2);align-items:flex-start;min-inline-size:0;overflow-wrap:anywhere}.st-error-summary__puce{flex:none;margin-block-start:var(--st-espacement-demi);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-grasse);line-height:var(--st-interligne-xs);color:var(--st-couleur-erreur)}.st-error-summary__prefixe{display:none;flex:none;font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur);white-space:nowrap}@container style(--st-prefixe-de-ton: visible){.st-error-summary__puce{display:none}.st-error-summary__prefixe{display:inline}}.st-error-summary__lien: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-error-summary__lien{padding:var(--st-espacement-demi) 0;margin-block:calc(-1 * var(--st-espacement-demi));font:inherit;font-weight:var(--st-graisse-semi);color:var(--st-couleur-erreur);text-align:start;text-decoration:underline;text-decoration-color:rgb(from var(--st-couleur-erreur) r g b/40%);text-underline-offset:var(--st-espacement-1);cursor:pointer;background:none;border:0}@media(hover:hover){.st-error-summary__lien:hover{text-decoration-thickness:var(--st-epaisseur-moyenne)}}.st-error-summary__champ{font-weight:var(--st-graisse-grasse)}.st-error-summary__texte{color:var(--st-couleur-sur-erreur-discret)}@media(forced-colors:active){:host{border-color:CanvasText}}@media print{:host{background-color:var(--st-couleur-surface)}}\n"]
|
|
1973
|
+
}]
|
|
1974
|
+
}],
|
|
1975
|
+
ctorParameters: () => [],
|
|
1976
|
+
propDecorators: {
|
|
1977
|
+
erreurs: [{
|
|
1978
|
+
type: i0.Input,
|
|
1979
|
+
args: [{
|
|
1980
|
+
isSignal: true,
|
|
1981
|
+
alias: "erreurs",
|
|
1982
|
+
required: false
|
|
1983
|
+
}]
|
|
1984
|
+
}],
|
|
1985
|
+
titre: [{
|
|
1986
|
+
type: i0.Input,
|
|
1987
|
+
args: [{
|
|
1988
|
+
isSignal: true,
|
|
1989
|
+
alias: "titre",
|
|
1990
|
+
required: false
|
|
1991
|
+
}]
|
|
1992
|
+
}],
|
|
1993
|
+
niveau: [{
|
|
1994
|
+
type: i0.Input,
|
|
1995
|
+
args: [{
|
|
1996
|
+
isSignal: true,
|
|
1997
|
+
alias: "niveau",
|
|
1998
|
+
required: false
|
|
1999
|
+
}]
|
|
2000
|
+
}],
|
|
2001
|
+
introduction: [{
|
|
2002
|
+
type: i0.Input,
|
|
2003
|
+
args: [{
|
|
2004
|
+
isSignal: true,
|
|
2005
|
+
alias: "introduction",
|
|
2006
|
+
required: false
|
|
2007
|
+
}]
|
|
2008
|
+
}],
|
|
2009
|
+
tentative: [{
|
|
2010
|
+
type: i0.Input,
|
|
2011
|
+
args: [{
|
|
2012
|
+
isSignal: true,
|
|
2013
|
+
alias: "tentative",
|
|
2014
|
+
required: false
|
|
2015
|
+
}]
|
|
2016
|
+
}]
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
function libelleDe(element, noms) {
|
|
2020
|
+
const champ = element.matches(".st-form-field") ? element : element.querySelector(":scope > .st-form-field");
|
|
2021
|
+
const socle = (champ === null ? null : noms.nomDe(champ)) ?? champ?.querySelector(":scope > .st-form-field__grille > .st-form-field__entete > [data-libelle]")?.getAttribute("data-libelle");
|
|
2022
|
+
if (socle !== null && socle !== void 0 && socle.trim() !== "") return socle.trim();
|
|
2023
|
+
const groupe = element.querySelector(":scope > .st-fieldset");
|
|
2024
|
+
const legende = (groupe === null ? null : noms.nomDe(groupe)) ?? groupe?.querySelector(":scope > fieldset > legend[data-libelle]")?.getAttribute("data-libelle");
|
|
2025
|
+
if (legende !== null && legende !== void 0 && legende.trim() !== "") return legende.trim();
|
|
2026
|
+
const etiquette = element.labels?.[0]?.textContent.trim();
|
|
2027
|
+
if (etiquette !== void 0 && etiquette !== "") return etiquette;
|
|
2028
|
+
const nom = element.getAttribute("aria-label")?.trim();
|
|
2029
|
+
if (nom !== void 0 && nom !== "") return nom;
|
|
2030
|
+
const reference = element.getAttribute("aria-labelledby");
|
|
2031
|
+
const texte = (reference === null ? null : element.ownerDocument.getElementById(reference))?.textContent.trim();
|
|
2032
|
+
return texte === void 0 || texte === "" ? null : texte;
|
|
2033
|
+
}
|
|
2034
|
+
var EnvoisDeFormulaire = class EnvoisDeFormulaire {
|
|
2035
|
+
document = inject(DOCUMENT$1);
|
|
2036
|
+
abonnes = /* @__PURE__ */ new Set();
|
|
2037
|
+
surEnvoi = (evenement) => {
|
|
2038
|
+
for (const rappel of this.abonnes) rappel(evenement.target);
|
|
2039
|
+
};
|
|
2040
|
+
abonner(rappel) {
|
|
2041
|
+
if (this.abonnes.size === 0) this.document.addEventListener("submit", this.surEnvoi, true);
|
|
2042
|
+
this.abonnes.add(rappel);
|
|
2043
|
+
return () => {
|
|
2044
|
+
if (!this.abonnes.delete(rappel)) return;
|
|
2045
|
+
if (this.abonnes.size === 0) this.document.removeEventListener("submit", this.surEnvoi, true);
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2049
|
+
minVersion: "12.0.0",
|
|
2050
|
+
version: "22.2.2",
|
|
2051
|
+
ngImport: i0,
|
|
2052
|
+
type: EnvoisDeFormulaire,
|
|
2053
|
+
deps: [],
|
|
2054
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
2055
|
+
});
|
|
2056
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
2057
|
+
minVersion: "12.0.0",
|
|
2058
|
+
version: "22.2.2",
|
|
2059
|
+
ngImport: i0,
|
|
2060
|
+
type: EnvoisDeFormulaire,
|
|
2061
|
+
providedIn: "root"
|
|
2062
|
+
});
|
|
2063
|
+
};
|
|
2064
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2065
|
+
minVersion: "12.0.0",
|
|
2066
|
+
version: "22.2.2",
|
|
2067
|
+
ngImport: i0,
|
|
2068
|
+
type: EnvoisDeFormulaire,
|
|
2069
|
+
decorators: [{
|
|
2070
|
+
type: Injectable,
|
|
2071
|
+
args: [{ providedIn: "root" }]
|
|
2072
|
+
}]
|
|
2073
|
+
});
|
|
2074
|
+
const ST_ESTIMATEUR_DE_FORCE = new InjectionToken("ST_ESTIMATEUR_DE_FORCE");
|
|
2075
|
+
function fournirEstimateurDeForce(chargeur) {
|
|
2076
|
+
return {
|
|
2077
|
+
provide: ST_ESTIMATEUR_DE_FORCE,
|
|
2078
|
+
useValue: chargeur
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
function niveauDuScore(score) {
|
|
2082
|
+
if (!Number.isFinite(score) || score < 3) return 1;
|
|
2083
|
+
return score < 4 ? 2 : 3;
|
|
2084
|
+
}
|
|
2085
|
+
function longueurVue(texte) {
|
|
2086
|
+
return Array.from(texte).length;
|
|
2087
|
+
}
|
|
2088
|
+
var StPasswordField = class StPasswordField extends ControleDeSaisie {
|
|
2089
|
+
libelles = inject(ST_LIBELLES);
|
|
2090
|
+
element = inject(ElementRef);
|
|
2091
|
+
annonce = new AnnonceLocale(inject(DestroyRef));
|
|
2092
|
+
racineDesParties = inject(StIdentifiants).prochain("st-password-field");
|
|
2093
|
+
idRegles = `${this.racineDesParties}-regles`;
|
|
2094
|
+
idMajuscules = `${this.racineDesParties}-majuscules`;
|
|
2095
|
+
idJauge = `${this.racineDesParties}-jauge`;
|
|
2096
|
+
chargeurDeForce = inject(ST_ESTIMATEUR_DE_FORCE, { optional: true });
|
|
2097
|
+
usage = input("connexion", ...ngDevMode ? [{ debugName: "usage" }] : /* istanbul ignore next */ []);
|
|
2098
|
+
regles = input([], ...ngDevMode ? [{ debugName: "regles" }] : /* istanbul ignore next */ []);
|
|
2099
|
+
titreDesRegles = input(null, ...ngDevMode ? [{ debugName: "titreDesRegles" }] : /* istanbul ignore next */ []);
|
|
2100
|
+
jauge = input(false, {
|
|
2101
|
+
...ngDevMode ? { debugName: "jauge" } : /* istanbul ignore next */ {},
|
|
2102
|
+
transform: booleanAttribute
|
|
2103
|
+
});
|
|
2104
|
+
motsDeForce = input(null, ...ngDevMode ? [{ debugName: "motsDeForce" }] : /* istanbul ignore next */ []);
|
|
2105
|
+
formeDeJauge = input("compacte", ...ngDevMode ? [{ debugName: "formeDeJauge" }] : /* istanbul ignore next */ []);
|
|
2106
|
+
dispositionDesRegles = input("encadre", ...ngDevMode ? [{ debugName: "dispositionDesRegles" }] : /* istanbul ignore next */ []);
|
|
2107
|
+
icone = input(null, ...ngDevMode ? [{ debugName: "icone" }] : /* istanbul ignore next */ []);
|
|
2108
|
+
jaugeActive = computed(() => this.jauge() && this.usage() === "creation", ...ngDevMode ? [{ debugName: "jaugeActive" }] : /* istanbul ignore next */ []);
|
|
2109
|
+
niveauDeForce = signal(0, ...ngDevMode ? [{ debugName: "niveauDeForce" }] : /* istanbul ignore next */ []);
|
|
2110
|
+
segmentsDeForce = [
|
|
2111
|
+
1,
|
|
2112
|
+
2,
|
|
2113
|
+
3
|
|
2114
|
+
];
|
|
2115
|
+
jaugeEtendue = computed(() => this.jaugeActive() && this.formeDeJauge() === "etendue", ...ngDevMode ? [{ debugName: "jaugeEtendue" }] : /* istanbul ignore next */ []);
|
|
2116
|
+
barresPleines = signal(0, ...ngDevMode ? [{ debugName: "barresPleines" }] : /* istanbul ignore next */ []);
|
|
2117
|
+
barresDeForce = [
|
|
2118
|
+
1,
|
|
2119
|
+
2,
|
|
2120
|
+
3,
|
|
2121
|
+
4
|
|
2122
|
+
];
|
|
2123
|
+
motDeForce = computed(() => {
|
|
2124
|
+
const niveau = this.niveauDeForce();
|
|
2125
|
+
if (niveau === 0) return "";
|
|
2126
|
+
return (this.motsDeForce() ?? this.libelles().niveauxDeForce)[niveau - 1] ?? "";
|
|
2127
|
+
}, ...ngDevMode ? [{ debugName: "motDeForce" }] : /* istanbul ignore next */ []);
|
|
2128
|
+
reglePendante = computed(() => {
|
|
2129
|
+
const valeur = this.value();
|
|
2130
|
+
return this.regles().some((regle) => typeof regle !== "string" && regle.respectee !== void 0 && !regle.respectee(valeur));
|
|
2131
|
+
}, ...ngDevMode ? [{ debugName: "reglePendante" }] : /* istanbul ignore next */ []);
|
|
2132
|
+
estimateur = null;
|
|
2133
|
+
minuterieDeForce;
|
|
2134
|
+
revele = signal(false, ...ngDevMode ? [{ debugName: "revele" }] : /* istanbul ignore next */ []);
|
|
2135
|
+
majusculesVerrouillees = signal(false, ...ngDevMode ? [{ debugName: "majusculesVerrouillees" }] : /* istanbul ignore next */ []);
|
|
2136
|
+
autocomplete = computed(() => this.usage() === "creation" ? "new-password" : "current-password", ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
|
|
2137
|
+
reglesRendues = computed(() => {
|
|
2138
|
+
if (this.usage() !== "creation") return [];
|
|
2139
|
+
const valeur = this.value();
|
|
2140
|
+
return this.regles().map((regle) => typeof regle === "string" ? {
|
|
2141
|
+
texte: regle,
|
|
2142
|
+
respectee: false,
|
|
2143
|
+
testee: false
|
|
2144
|
+
} : {
|
|
2145
|
+
texte: regle.texte,
|
|
2146
|
+
respectee: regle.respectee?.(valeur) ?? false,
|
|
2147
|
+
testee: regle.respectee !== void 0
|
|
2148
|
+
});
|
|
2149
|
+
}, ...ngDevMode ? [{ debugName: "reglesRendues" }] : /* istanbul ignore next */ []);
|
|
2150
|
+
titreRendu = computed(() => this.titreDesRegles() ?? this.libelles().reglesDuMotDePasse, ...ngDevMode ? [{ debugName: "titreRendu" }] : /* istanbul ignore next */ []);
|
|
2151
|
+
compteur = computed(() => {
|
|
2152
|
+
const maximum = this.maxLength();
|
|
2153
|
+
if (maximum === void 0) return null;
|
|
2154
|
+
const restants = maximum - longueurVue(this.value());
|
|
2155
|
+
const libelles = this.libelles();
|
|
2156
|
+
return restants >= 0 ? libelles.caracteresRestants(restants) : libelles.caracteresEnTrop(-restants);
|
|
2157
|
+
}, ...ngDevMode ? [{ debugName: "compteur" }] : /* istanbul ignore next */ []);
|
|
2158
|
+
descriptionsDuControle = computed(() => {
|
|
2159
|
+
const ids = [];
|
|
2160
|
+
if (this.jaugeActive() && !this.jaugeEtendue() && this.niveauDeForce() !== 0) ids.push(this.idJauge);
|
|
2161
|
+
if (this.reglesRendues().length > 0) ids.push(this.idRegles);
|
|
2162
|
+
if (this.majusculesVerrouillees()) ids.push(this.idMajuscules);
|
|
2163
|
+
return ids;
|
|
2164
|
+
}, ...ngDevMode ? [{ debugName: "descriptionsDuControle" }] : /* istanbul ignore next */ []);
|
|
2165
|
+
constructor() {
|
|
2166
|
+
super();
|
|
2167
|
+
const desabonner = inject(EnvoisDeFormulaire).abonner((formulaire) => {
|
|
2168
|
+
if (formulaire instanceof Node && formulaire.contains(this.element.nativeElement)) this.remasquer();
|
|
2169
|
+
});
|
|
2170
|
+
const destruction = inject(DestroyRef);
|
|
2171
|
+
destruction.onDestroy(desabonner);
|
|
2172
|
+
destruction.onDestroy(() => {
|
|
2173
|
+
clearTimeout(this.minuterieDeForce);
|
|
2174
|
+
});
|
|
2175
|
+
effect(() => {
|
|
2176
|
+
if (!this.jaugeActive()) return;
|
|
2177
|
+
const valeur = this.value();
|
|
2178
|
+
const plafonnee = this.reglePendante();
|
|
2179
|
+
clearTimeout(this.minuterieDeForce);
|
|
2180
|
+
if (valeur === "") {
|
|
2181
|
+
this.niveauDeForce.set(0);
|
|
2182
|
+
this.barresPleines.set(0);
|
|
2183
|
+
return;
|
|
2184
|
+
}
|
|
2185
|
+
this.minuterieDeForce = setTimeout(() => {
|
|
2186
|
+
this.estimerLaForce(valeur, plafonnee);
|
|
2187
|
+
}, delai.frappe);
|
|
2188
|
+
});
|
|
2189
|
+
}
|
|
2190
|
+
async estimerLaForce(valeur, plafonnee) {
|
|
2191
|
+
const chargeur = this.chargeurDeForce;
|
|
2192
|
+
if (chargeur === null) {
|
|
2193
|
+
if (typeof ngDevMode === "undefined" || !!ngDevMode) throw new Error("st-password-field : jauge sans estimateur. Fournir fournirEstimateurDeForce(...) (ADR web 0011).");
|
|
2194
|
+
return;
|
|
2195
|
+
}
|
|
2196
|
+
this.estimateur ??= chargeur();
|
|
2197
|
+
const estimateur = await this.estimateur;
|
|
2198
|
+
if (valeur !== this.value()) return;
|
|
2199
|
+
const score = estimateur.estimer(valeur);
|
|
2200
|
+
const niveau = plafonnee ? 1 : niveauDuScore(score);
|
|
2201
|
+
this.barresPleines.set(plafonnee ? 1 : Math.min(4, Math.max(1, Math.round(score))));
|
|
2202
|
+
if (niveau === this.niveauDeForce()) return;
|
|
2203
|
+
this.niveauDeForce.set(niveau);
|
|
2204
|
+
this.annonce.annoncer(this.libelles().forceAnnoncee(this.motDeForce()));
|
|
2205
|
+
}
|
|
2206
|
+
basculer() {
|
|
2207
|
+
if (this.readonly() || this.desactive()) return;
|
|
2208
|
+
this.revele.update((revele) => !revele);
|
|
2209
|
+
const hote = this.element.nativeElement;
|
|
2210
|
+
if (this.revele() && !hote.contains(hote.ownerDocument.activeElement)) this.focus();
|
|
2211
|
+
}
|
|
2212
|
+
surSaisie(evenement) {
|
|
2213
|
+
this.value.set(this.texteSaisi(evenement));
|
|
2214
|
+
}
|
|
2215
|
+
surTouche(evenement) {
|
|
2216
|
+
if (typeof evenement.getModifierState !== "function") return;
|
|
2217
|
+
const actif = evenement.getModifierState("CapsLock");
|
|
2218
|
+
if (actif === this.majusculesVerrouillees()) return;
|
|
2219
|
+
this.majusculesVerrouillees.set(actif);
|
|
2220
|
+
if (actif) this.annonce.annoncer(this.libelles().verrouillageMajuscules);
|
|
2221
|
+
}
|
|
2222
|
+
remasquer() {
|
|
2223
|
+
this.revele.set(false);
|
|
2224
|
+
}
|
|
2225
|
+
aLaSortie(evenement) {
|
|
2226
|
+
const suivant = evenement.relatedTarget;
|
|
2227
|
+
if (suivant !== null && this.element.nativeElement.contains(suivant)) return;
|
|
2228
|
+
this.revele.set(false);
|
|
2229
|
+
this.majusculesVerrouillees.set(false);
|
|
2230
|
+
}
|
|
2231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2232
|
+
minVersion: "12.0.0",
|
|
2233
|
+
version: "22.2.2",
|
|
2234
|
+
ngImport: i0,
|
|
2235
|
+
type: StPasswordField,
|
|
2236
|
+
deps: [],
|
|
2237
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2238
|
+
});
|
|
2239
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2240
|
+
minVersion: "17.0.0",
|
|
2241
|
+
version: "22.2.2",
|
|
2242
|
+
type: StPasswordField,
|
|
2243
|
+
isStandalone: true,
|
|
2244
|
+
selector: "st-password-field",
|
|
2245
|
+
inputs: {
|
|
2246
|
+
usage: {
|
|
2247
|
+
classPropertyName: "usage",
|
|
2248
|
+
publicName: "usage",
|
|
2249
|
+
isSignal: true,
|
|
2250
|
+
isRequired: false,
|
|
2251
|
+
transformFunction: null
|
|
2252
|
+
},
|
|
2253
|
+
regles: {
|
|
2254
|
+
classPropertyName: "regles",
|
|
2255
|
+
publicName: "regles",
|
|
2256
|
+
isSignal: true,
|
|
2257
|
+
isRequired: false,
|
|
2258
|
+
transformFunction: null
|
|
2259
|
+
},
|
|
2260
|
+
titreDesRegles: {
|
|
2261
|
+
classPropertyName: "titreDesRegles",
|
|
2262
|
+
publicName: "titreDesRegles",
|
|
2263
|
+
isSignal: true,
|
|
2264
|
+
isRequired: false,
|
|
2265
|
+
transformFunction: null
|
|
2266
|
+
},
|
|
2267
|
+
jauge: {
|
|
2268
|
+
classPropertyName: "jauge",
|
|
2269
|
+
publicName: "jauge",
|
|
2270
|
+
isSignal: true,
|
|
2271
|
+
isRequired: false,
|
|
2272
|
+
transformFunction: null
|
|
2273
|
+
},
|
|
2274
|
+
motsDeForce: {
|
|
2275
|
+
classPropertyName: "motsDeForce",
|
|
2276
|
+
publicName: "motsDeForce",
|
|
2277
|
+
isSignal: true,
|
|
2278
|
+
isRequired: false,
|
|
2279
|
+
transformFunction: null
|
|
2280
|
+
},
|
|
2281
|
+
formeDeJauge: {
|
|
2282
|
+
classPropertyName: "formeDeJauge",
|
|
2283
|
+
publicName: "formeDeJauge",
|
|
2284
|
+
isSignal: true,
|
|
2285
|
+
isRequired: false,
|
|
2286
|
+
transformFunction: null
|
|
2287
|
+
},
|
|
2288
|
+
dispositionDesRegles: {
|
|
2289
|
+
classPropertyName: "dispositionDesRegles",
|
|
2290
|
+
publicName: "dispositionDesRegles",
|
|
2291
|
+
isSignal: true,
|
|
2292
|
+
isRequired: false,
|
|
2293
|
+
transformFunction: null
|
|
2294
|
+
},
|
|
2295
|
+
icone: {
|
|
2296
|
+
classPropertyName: "icone",
|
|
2297
|
+
publicName: "icone",
|
|
2298
|
+
isSignal: true,
|
|
2299
|
+
isRequired: false,
|
|
2300
|
+
transformFunction: null
|
|
2301
|
+
}
|
|
2302
|
+
},
|
|
2303
|
+
host: {
|
|
2304
|
+
listeners: {
|
|
2305
|
+
"focusout": "aLaSortie($event)",
|
|
2306
|
+
"window:beforeprint": "remasquer()"
|
|
2307
|
+
},
|
|
2308
|
+
classAttribute: "st-password-field"
|
|
2309
|
+
},
|
|
2310
|
+
usesInheritance: true,
|
|
2311
|
+
ngImport: i0,
|
|
2312
|
+
template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [complement]=\"compteur()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <!-- Meta et indication de l'application (« Aide PIN »), relayees a l'enveloppe. -->\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <!-- La jauge etendue (0.11.1) dit son niveau dans la meta : « Force : en attente », puis le mot. -->\n @if (jaugeEtendue()) {\n <span stMeta class=\"st-password-field__force-meta\"\n >{{ libelles().forceDuMotDePasse }} :\n {{ niveauDeForce() === 0 ? libelles().forceEnAttente : motDeForce() }}</span\n >\n }\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le bouton de revelation vit DANS le cadre du champ, a sa fin (planche 3a). -->\n <div class=\"st-password-field__cadre\" [attr.data-avec-icone]=\"icone() === null ? null : ''\">\n @if (icone(); as nom) {\n <st-icon class=\"st-password-field__icone\" [nom]=\"nom\" taille=\"20\" />\n }\n <input\n #champ\n class=\"st-password-field__champ\"\n stControleDeChamp\n spellcheck=\"false\"\n autocapitalize=\"none\"\n autocorrect=\"off\"\n [type]=\"revele() ? 'text' : 'password'\"\n [value]=\"value()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (keydown)=\"surTouche($event)\"\n (keyup)=\"surTouche($event)\"\n (blur)=\"touch.emit()\"\n />\n <button\n stIconButton\n class=\"st-password-field__oeil\"\n type=\"button\"\n icone=\"oeil\"\n iconeEnfoncee=\"oeil-barre\"\n tailleDuGlyphe=\"20\"\n [etiquette]=\"libelles().afficherLeMotDePasse\"\n [enfonce]=\"revele()\"\n [disabled]=\"disabled() || readonly()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"basculer()\"\n ></button>\n </div>\n</st-form-field>\n\n<!-- La jauge etendue (0.11.1) : quatre barres collees sous le champ, avant les regles. -->\n@if (jaugeEtendue()) {\n <span\n class=\"st-password-field__barres\"\n role=\"meter\"\n aria-valuemin=\"1\"\n aria-valuemax=\"3\"\n [id]=\"idJauge\"\n [attr.aria-valuenow]=\"niveauDeForce() || null\"\n [attr.aria-valuetext]=\"motDeForce() || null\"\n [attr.aria-label]=\"libelles().forceDuMotDePasse\"\n [attr.aria-hidden]=\"niveauDeForce() === 0 ? 'true' : null\"\n >\n @for (barre of barresDeForce; track barre) {\n <span\n class=\"st-password-field__barre\"\n [attr.data-plein]=\"barresPleines() >= barre ? '' : null\"\n ></span>\n }\n </span>\n}\n\n<!-- A la creation, la zone de Verr. Maj est RESERVEE sous le champ : les regles et la jauge, que l'on\n voit bouger en tapant, ne sautent pas quand la touche bascule. Sans rien qui suive (connexion,\n confirmation, 0.11.1), l'avertissement se pose a la demande ; avec la jauge etendue, sous les\n regles. -->\n@if (usage() === 'creation' && !jaugeEtendue() && (jaugeActive() || reglesRendues().length > 0)) {\n <div class=\"st-password-field__zone-majuscules\">\n @if (majusculesVerrouillees()) {\n <st-inline-message\n class=\"st-password-field__majuscules\"\n ton=\"avertissement\"\n icone=\"fleche-large-haut\"\n [identifiant]=\"idMajuscules\"\n >{{ libelles().verrouillageMajuscules }}</st-inline-message\n >\n }\n </div>\n} @else if (!jaugeEtendue() && majusculesVerrouillees()) {\n <st-inline-message\n class=\"st-password-field__majuscules\"\n ton=\"avertissement\"\n icone=\"fleche-large-haut\"\n encadre\n [identifiant]=\"idMajuscules\"\n >{{ libelles().verrouillageMajuscules }}</st-inline-message\n >\n}\n\n<!-- La jauge de force (ADR web 0011), optionnelle : segments ET mot, jamais la couleur seule ; sa\n place est reservee pour que les regles ne sautent pas a la premiere estimation. -->\n@if (jaugeActive() && !jaugeEtendue()) {\n <div class=\"st-password-field__jauge\" [id]=\"idJauge\">\n <span\n class=\"st-password-field__segments\"\n role=\"meter\"\n aria-valuemin=\"1\"\n aria-valuemax=\"3\"\n [attr.aria-valuenow]=\"niveauDeForce() || null\"\n [attr.aria-valuetext]=\"motDeForce() || null\"\n [attr.aria-label]=\"libelles().forceDuMotDePasse\"\n [attr.aria-hidden]=\"niveauDeForce() === 0 ? 'true' : null\"\n >\n @for (segment of segmentsDeForce; track segment) {\n <span\n class=\"st-password-field__segment\"\n [attr.data-plein]=\"niveauDeForce() >= segment ? '' : null\"\n ></span>\n }\n </span>\n <span class=\"st-password-field__force\">\n @if (niveauDeForce() !== 0) {\n {{ libelles().forceDuMotDePasse }} : <strong>{{ motDeForce() }}</strong>\n }\n </span>\n </div>\n}\n\n@if (reglesRendues().length > 0 && dispositionDesRegles() === 'ligne') {\n <!-- Les regles en ligne (0.11.1) : a la suite, sans carte ni titre ; la coche pour celles qui se testent. -->\n <p class=\"st-password-field__regles-en-ligne\" [id]=\"idRegles\">\n @for (regle of reglesRendues(); track $index) {\n <span\n class=\"st-password-field__regle-en-ligne\"\n [attr.data-respectee]=\"regle.respectee ? '' : null\"\n >\n @if (regle.testee) {\n <st-icon\n class=\"st-password-field__coche\"\n taille=\"16\"\n [nom]=\"regle.respectee ? 'cercle-coche' : 'cercle'\"\n [variante]=\"regle.respectee ? 'plein' : 'contour'\"\n />\n <span\n >{{ regle.texte\n }}<span class=\"st-vh\">\n ({{\n regle.respectee ? libelles().regleRespectee : libelles().regleNonRespectee\n }})</span\n ></span\n >\n } @else {\n <span>{{ regle.texte }}</span>\n }\n </span>\n }\n </p>\n} @else if (reglesRendues().length > 0) {\n <div class=\"st-password-field__regles\" [id]=\"idRegles\">\n <p class=\"st-password-field__titre-des-regles\">{{ titreRendu() }}</p>\n <!-- `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste (D-1). -->\n <ul class=\"st-password-field__liste\" role=\"list\">\n @for (regle of reglesRendues(); track $index) {\n <li class=\"st-password-field__regle\" [attr.data-respectee]=\"regle.respectee ? '' : null\">\n <st-icon\n class=\"st-password-field__coche\"\n taille=\"16\"\n [nom]=\"regle.respectee ? 'cercle-coche' : 'cercle'\"\n [variante]=\"regle.respectee ? 'plein' : 'contour'\"\n />\n <span class=\"st-password-field__texte-de-regle\">{{ regle.texte }}</span>\n <!-- L'etat en mots, apres la phrase : la coche ne se lit pas qu'a la forme. -->\n <span class=\"st-vh\">\n ({{ regle.respectee ? libelles().regleRespectee : libelles().regleNonRespectee }})</span\n >\n </li>\n }\n </ul>\n </div>\n}\n\n@if (jaugeEtendue() && majusculesVerrouillees()) {\n <st-inline-message\n class=\"st-password-field__majuscules\"\n ton=\"avertissement\"\n icone=\"fleche-large-haut\"\n [identifiant]=\"idMajuscules\"\n >{{ libelles().verrouillageMajuscules }}</st-inline-message\n >\n}\n\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
|
|
2313
|
+
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-password-field__cadre{position:relative;min-inline-size:0}.st-password-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-password-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-password-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-password-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-password-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-password-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-password-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-password-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-password-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-password-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-password-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-password-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-password-field__champ:is(input,textarea):read-only:not(:disabled),.st-password-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-password-field__champ{padding-inline-end:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));letter-spacing:var(--st-interlettrage-capitales)}.st-password-field__champ::-ms-reveal,.st-password-field__champ::-ms-clear{display:none}.st-password-field__icone{position:absolute;inset-block:0;inset-inline-start:var(--st-espacement-3-5);block-size:var(--st-espacement-5);margin-block:auto;color:var(--st-couleur-texte-attenue);pointer-events:none}.st-password-field__cadre[data-avec-icone] .st-password-field__champ{padding-inline-start:calc(var(--st-espacement-3-5) + var(--st-espacement-5) + var(--st-espacement-2-5))}.st-password-field__force-meta{white-space:nowrap}.st-password-field__barres{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--st-espacement-1-5);margin-block-start:var(--st-espacement-1-5)}.st-password-field__barre{block-size:var(--st-espacement-1);background:var(--st-couleur-surface-active);border-radius:var(--st-rayon-xs);forced-color-adjust:none}.st-password-field__barre[data-plein]{background:var(--st-couleur-texte-discret)}.st-password-field__regles-en-ligne{margin:var(--st-espacement-1-5) 0 0;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-password-field__regle-en-ligne+.st-password-field__regle-en-ligne{margin-inline-start:var(--st-espacement-1)}.st-password-field__regle-en-ligne>.st-password-field__coche{margin-inline-end:var(--st-espacement-1);vertical-align:text-bottom}.st-password-field__regle-en-ligne[data-respectee]{font-weight:var(--st-graisse-moyenne);color:var(--st-couleur-succes)}.st-password-field__oeil{position:absolute;inset-block:0;inset-inline-end:0;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto}.st-password-field__majuscules{margin-block-start:var(--st-espacement-1-5)}.st-password-field__zone-majuscules{min-block-size:var(--st-interligne-xs);margin-block:var(--st-espacement-2)}.st-password-field__zone-majuscules>.st-password-field__majuscules{margin-block-start:0}.st-password-field__zone-majuscules+.st-password-field__regles{margin-block-start:0}.st-password-field__jauge{display:flex;align-items:center;gap:var(--st-espacement-3);min-block-size:var(--st-interligne-sm);margin-block-start:var(--st-espacement-2)}.st-password-field__segments{display:grid;grid-template-columns:repeat(3,var(--st-espacement-8));gap:var(--st-espacement-1)}.st-password-field__segment{block-size:var(--st-espacement-1-5);border:var(--st-epaisseur-capillaire) solid var(--st-couleur-bordure-forte);border-radius:var(--st-rayon-pleine);forced-color-adjust:none}.st-password-field__segment[data-plein]{background:var(--st-couleur-texte-discret);border-color:var(--st-couleur-texte-discret)}.st-password-field__force{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal);color:var(--st-couleur-texte-discret)}.st-password-field__regles{box-sizing:border-box;margin-block-start:var(--st-espacement-4);padding:var(--st-espacement-3-5);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-md)}.st-password-field__titre-des-regles{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;margin:0 0 var(--st-espacement-2);color:var(--st-couleur-texte-discret)}.st-password-field__liste{display:flex;flex-direction:column;gap:var(--st-espacement-1-5);margin:0;padding:0;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);list-style:none}.st-password-field__regle{display:flex;gap:var(--st-espacement-2);align-items:center;color:var(--st-couleur-texte-discret)}.st-password-field__regle[data-respectee]{font-weight:var(--st-graisse-moyenne);color:var(--st-couleur-succes)}.st-password-field__coche{flex:none}\n"],
|
|
2314
|
+
dependencies: [
|
|
2315
|
+
{
|
|
2316
|
+
kind: "component",
|
|
2317
|
+
type: StFormField,
|
|
2318
|
+
selector: "st-form-field",
|
|
2319
|
+
inputs: [
|
|
2320
|
+
"libelle",
|
|
2321
|
+
"complement",
|
|
2322
|
+
"disposition",
|
|
2323
|
+
"presentation",
|
|
2324
|
+
"libelleMasque",
|
|
2325
|
+
"descriptionsDuControle"
|
|
2326
|
+
]
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
kind: "directive",
|
|
2330
|
+
type: StControleDeChamp,
|
|
2331
|
+
selector: "[stControleDeChamp]"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
kind: "component",
|
|
2335
|
+
type: StIcon,
|
|
2336
|
+
selector: "st-icon",
|
|
2337
|
+
inputs: [
|
|
2338
|
+
"icone",
|
|
2339
|
+
"nom",
|
|
2340
|
+
"variante",
|
|
2341
|
+
"sprite",
|
|
2342
|
+
"nomMetier",
|
|
2343
|
+
"taille",
|
|
2344
|
+
"ton",
|
|
2345
|
+
"etiquette",
|
|
2346
|
+
"miroir"
|
|
2347
|
+
]
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
kind: "component",
|
|
2351
|
+
type: StIconButton,
|
|
2352
|
+
selector: "button[stIconButton]",
|
|
2353
|
+
inputs: [
|
|
2354
|
+
"icone",
|
|
2355
|
+
"etiquette",
|
|
2356
|
+
"variante",
|
|
2357
|
+
"taille",
|
|
2358
|
+
"tailleDuGlyphe",
|
|
2359
|
+
"enfonce",
|
|
2360
|
+
"iconeEnfoncee",
|
|
2361
|
+
"chargement",
|
|
2362
|
+
"indisponible",
|
|
2363
|
+
"raisonIndisponible"
|
|
2364
|
+
]
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
kind: "component",
|
|
2368
|
+
type: StInlineMessage,
|
|
2369
|
+
selector: "st-inline-message",
|
|
2370
|
+
inputs: [
|
|
2371
|
+
"ton",
|
|
2372
|
+
"identifiant",
|
|
2373
|
+
"annonce",
|
|
2374
|
+
"encadre",
|
|
2375
|
+
"icone"
|
|
2376
|
+
]
|
|
2377
|
+
}
|
|
2378
|
+
],
|
|
2379
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2380
|
+
});
|
|
2381
|
+
};
|
|
2382
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2383
|
+
minVersion: "12.0.0",
|
|
2384
|
+
version: "22.2.2",
|
|
2385
|
+
ngImport: i0,
|
|
2386
|
+
type: StPasswordField,
|
|
2387
|
+
decorators: [{
|
|
2388
|
+
type: Component,
|
|
2389
|
+
args: [{
|
|
2390
|
+
selector: "st-password-field",
|
|
2391
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2392
|
+
imports: [
|
|
2393
|
+
StFormField,
|
|
2394
|
+
StControleDeChamp,
|
|
2395
|
+
StIcon,
|
|
2396
|
+
StIconButton,
|
|
2397
|
+
StInlineMessage
|
|
2398
|
+
],
|
|
2399
|
+
host: {
|
|
2400
|
+
class: "st-password-field",
|
|
2401
|
+
"(focusout)": "aLaSortie($event)",
|
|
2402
|
+
"(window:beforeprint)": "remasquer()"
|
|
2403
|
+
},
|
|
2404
|
+
template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideEtRaisons()\"\n [complement]=\"compteur()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"descriptionsDuControle()\"\n>\n <!-- Meta et indication de l'application (« Aide PIN »), relayees a l'enveloppe. -->\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <!-- La jauge etendue (0.11.1) dit son niveau dans la meta : « Force : en attente », puis le mot. -->\n @if (jaugeEtendue()) {\n <span stMeta class=\"st-password-field__force-meta\"\n >{{ libelles().forceDuMotDePasse }} :\n {{ niveauDeForce() === 0 ? libelles().forceEnAttente : motDeForce() }}</span\n >\n }\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le bouton de revelation vit DANS le cadre du champ, a sa fin (planche 3a). -->\n <div class=\"st-password-field__cadre\" [attr.data-avec-icone]=\"icone() === null ? null : ''\">\n @if (icone(); as nom) {\n <st-icon class=\"st-password-field__icone\" [nom]=\"nom\" taille=\"20\" />\n }\n <input\n #champ\n class=\"st-password-field__champ\"\n stControleDeChamp\n spellcheck=\"false\"\n autocapitalize=\"none\"\n autocorrect=\"off\"\n [type]=\"revele() ? 'text' : 'password'\"\n [value]=\"value()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (keydown)=\"surTouche($event)\"\n (keyup)=\"surTouche($event)\"\n (blur)=\"touch.emit()\"\n />\n <button\n stIconButton\n class=\"st-password-field__oeil\"\n type=\"button\"\n icone=\"oeil\"\n iconeEnfoncee=\"oeil-barre\"\n tailleDuGlyphe=\"20\"\n [etiquette]=\"libelles().afficherLeMotDePasse\"\n [enfonce]=\"revele()\"\n [disabled]=\"disabled() || readonly()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"basculer()\"\n ></button>\n </div>\n</st-form-field>\n\n<!-- La jauge etendue (0.11.1) : quatre barres collees sous le champ, avant les regles. -->\n@if (jaugeEtendue()) {\n <span\n class=\"st-password-field__barres\"\n role=\"meter\"\n aria-valuemin=\"1\"\n aria-valuemax=\"3\"\n [id]=\"idJauge\"\n [attr.aria-valuenow]=\"niveauDeForce() || null\"\n [attr.aria-valuetext]=\"motDeForce() || null\"\n [attr.aria-label]=\"libelles().forceDuMotDePasse\"\n [attr.aria-hidden]=\"niveauDeForce() === 0 ? 'true' : null\"\n >\n @for (barre of barresDeForce; track barre) {\n <span\n class=\"st-password-field__barre\"\n [attr.data-plein]=\"barresPleines() >= barre ? '' : null\"\n ></span>\n }\n </span>\n}\n\n<!-- A la creation, la zone de Verr. Maj est RESERVEE sous le champ : les regles et la jauge, que l'on\n voit bouger en tapant, ne sautent pas quand la touche bascule. Sans rien qui suive (connexion,\n confirmation, 0.11.1), l'avertissement se pose a la demande ; avec la jauge etendue, sous les\n regles. -->\n@if (usage() === 'creation' && !jaugeEtendue() && (jaugeActive() || reglesRendues().length > 0)) {\n <div class=\"st-password-field__zone-majuscules\">\n @if (majusculesVerrouillees()) {\n <st-inline-message\n class=\"st-password-field__majuscules\"\n ton=\"avertissement\"\n icone=\"fleche-large-haut\"\n [identifiant]=\"idMajuscules\"\n >{{ libelles().verrouillageMajuscules }}</st-inline-message\n >\n }\n </div>\n} @else if (!jaugeEtendue() && majusculesVerrouillees()) {\n <st-inline-message\n class=\"st-password-field__majuscules\"\n ton=\"avertissement\"\n icone=\"fleche-large-haut\"\n encadre\n [identifiant]=\"idMajuscules\"\n >{{ libelles().verrouillageMajuscules }}</st-inline-message\n >\n}\n\n<!-- La jauge de force (ADR web 0011), optionnelle : segments ET mot, jamais la couleur seule ; sa\n place est reservee pour que les regles ne sautent pas a la premiere estimation. -->\n@if (jaugeActive() && !jaugeEtendue()) {\n <div class=\"st-password-field__jauge\" [id]=\"idJauge\">\n <span\n class=\"st-password-field__segments\"\n role=\"meter\"\n aria-valuemin=\"1\"\n aria-valuemax=\"3\"\n [attr.aria-valuenow]=\"niveauDeForce() || null\"\n [attr.aria-valuetext]=\"motDeForce() || null\"\n [attr.aria-label]=\"libelles().forceDuMotDePasse\"\n [attr.aria-hidden]=\"niveauDeForce() === 0 ? 'true' : null\"\n >\n @for (segment of segmentsDeForce; track segment) {\n <span\n class=\"st-password-field__segment\"\n [attr.data-plein]=\"niveauDeForce() >= segment ? '' : null\"\n ></span>\n }\n </span>\n <span class=\"st-password-field__force\">\n @if (niveauDeForce() !== 0) {\n {{ libelles().forceDuMotDePasse }} : <strong>{{ motDeForce() }}</strong>\n }\n </span>\n </div>\n}\n\n@if (reglesRendues().length > 0 && dispositionDesRegles() === 'ligne') {\n <!-- Les regles en ligne (0.11.1) : a la suite, sans carte ni titre ; la coche pour celles qui se testent. -->\n <p class=\"st-password-field__regles-en-ligne\" [id]=\"idRegles\">\n @for (regle of reglesRendues(); track $index) {\n <span\n class=\"st-password-field__regle-en-ligne\"\n [attr.data-respectee]=\"regle.respectee ? '' : null\"\n >\n @if (regle.testee) {\n <st-icon\n class=\"st-password-field__coche\"\n taille=\"16\"\n [nom]=\"regle.respectee ? 'cercle-coche' : 'cercle'\"\n [variante]=\"regle.respectee ? 'plein' : 'contour'\"\n />\n <span\n >{{ regle.texte\n }}<span class=\"st-vh\">\n ({{\n regle.respectee ? libelles().regleRespectee : libelles().regleNonRespectee\n }})</span\n ></span\n >\n } @else {\n <span>{{ regle.texte }}</span>\n }\n </span>\n }\n </p>\n} @else if (reglesRendues().length > 0) {\n <div class=\"st-password-field__regles\" [id]=\"idRegles\">\n <p class=\"st-password-field__titre-des-regles\">{{ titreRendu() }}</p>\n <!-- `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste (D-1). -->\n <ul class=\"st-password-field__liste\" role=\"list\">\n @for (regle of reglesRendues(); track $index) {\n <li class=\"st-password-field__regle\" [attr.data-respectee]=\"regle.respectee ? '' : null\">\n <st-icon\n class=\"st-password-field__coche\"\n taille=\"16\"\n [nom]=\"regle.respectee ? 'cercle-coche' : 'cercle'\"\n [variante]=\"regle.respectee ? 'plein' : 'contour'\"\n />\n <span class=\"st-password-field__texte-de-regle\">{{ regle.texte }}</span>\n <!-- L'etat en mots, apres la phrase : la coche ne se lit pas qu'a la forme. -->\n <span class=\"st-vh\">\n ({{ regle.respectee ? libelles().regleRespectee : libelles().regleNonRespectee }})</span\n >\n </li>\n }\n </ul>\n </div>\n}\n\n@if (jaugeEtendue() && majusculesVerrouillees()) {\n <st-inline-message\n class=\"st-password-field__majuscules\"\n ton=\"avertissement\"\n icone=\"fleche-large-haut\"\n [identifiant]=\"idMajuscules\"\n >{{ libelles().verrouillageMajuscules }}</st-inline-message\n >\n}\n\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
|
|
2405
|
+
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-password-field__cadre{position:relative;min-inline-size:0}.st-password-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-password-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-password-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-password-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-password-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-password-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-password-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-password-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-password-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-password-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-password-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-password-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-password-field__champ:is(input,textarea):read-only:not(:disabled),.st-password-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-password-field__champ{padding-inline-end:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));letter-spacing:var(--st-interlettrage-capitales)}.st-password-field__champ::-ms-reveal,.st-password-field__champ::-ms-clear{display:none}.st-password-field__icone{position:absolute;inset-block:0;inset-inline-start:var(--st-espacement-3-5);block-size:var(--st-espacement-5);margin-block:auto;color:var(--st-couleur-texte-attenue);pointer-events:none}.st-password-field__cadre[data-avec-icone] .st-password-field__champ{padding-inline-start:calc(var(--st-espacement-3-5) + var(--st-espacement-5) + var(--st-espacement-2-5))}.st-password-field__force-meta{white-space:nowrap}.st-password-field__barres{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--st-espacement-1-5);margin-block-start:var(--st-espacement-1-5)}.st-password-field__barre{block-size:var(--st-espacement-1);background:var(--st-couleur-surface-active);border-radius:var(--st-rayon-xs);forced-color-adjust:none}.st-password-field__barre[data-plein]{background:var(--st-couleur-texte-discret)}.st-password-field__regles-en-ligne{margin:var(--st-espacement-1-5) 0 0;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-password-field__regle-en-ligne+.st-password-field__regle-en-ligne{margin-inline-start:var(--st-espacement-1)}.st-password-field__regle-en-ligne>.st-password-field__coche{margin-inline-end:var(--st-espacement-1);vertical-align:text-bottom}.st-password-field__regle-en-ligne[data-respectee]{font-weight:var(--st-graisse-moyenne);color:var(--st-couleur-succes)}.st-password-field__oeil{position:absolute;inset-block:0;inset-inline-end:0;inline-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut));block-size:auto}.st-password-field__majuscules{margin-block-start:var(--st-espacement-1-5)}.st-password-field__zone-majuscules{min-block-size:var(--st-interligne-xs);margin-block:var(--st-espacement-2)}.st-password-field__zone-majuscules>.st-password-field__majuscules{margin-block-start:0}.st-password-field__zone-majuscules+.st-password-field__regles{margin-block-start:0}.st-password-field__jauge{display:flex;align-items:center;gap:var(--st-espacement-3);min-block-size:var(--st-interligne-sm);margin-block-start:var(--st-espacement-2)}.st-password-field__segments{display:grid;grid-template-columns:repeat(3,var(--st-espacement-8));gap:var(--st-espacement-1)}.st-password-field__segment{block-size:var(--st-espacement-1-5);border:var(--st-epaisseur-capillaire) solid var(--st-couleur-bordure-forte);border-radius:var(--st-rayon-pleine);forced-color-adjust:none}.st-password-field__segment[data-plein]{background:var(--st-couleur-texte-discret);border-color:var(--st-couleur-texte-discret)}.st-password-field__force{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal);color:var(--st-couleur-texte-discret)}.st-password-field__regles{box-sizing:border-box;margin-block-start:var(--st-espacement-4);padding:var(--st-espacement-3-5);background:var(--st-couleur-surface);border:var(--st-epaisseur-fine) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-md)}.st-password-field__titre-des-regles{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;margin:0 0 var(--st-espacement-2);color:var(--st-couleur-texte-discret)}.st-password-field__liste{display:flex;flex-direction:column;gap:var(--st-espacement-1-5);margin:0;padding:0;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);list-style:none}.st-password-field__regle{display:flex;gap:var(--st-espacement-2);align-items:center;color:var(--st-couleur-texte-discret)}.st-password-field__regle[data-respectee]{font-weight:var(--st-graisse-moyenne);color:var(--st-couleur-succes)}.st-password-field__coche{flex:none}\n"]
|
|
2406
|
+
}]
|
|
2407
|
+
}],
|
|
2408
|
+
ctorParameters: () => [],
|
|
2409
|
+
propDecorators: {
|
|
2410
|
+
usage: [{
|
|
2411
|
+
type: i0.Input,
|
|
2412
|
+
args: [{
|
|
2413
|
+
isSignal: true,
|
|
2414
|
+
alias: "usage",
|
|
2415
|
+
required: false
|
|
2416
|
+
}]
|
|
2417
|
+
}],
|
|
2418
|
+
regles: [{
|
|
2419
|
+
type: i0.Input,
|
|
2420
|
+
args: [{
|
|
2421
|
+
isSignal: true,
|
|
2422
|
+
alias: "regles",
|
|
2423
|
+
required: false
|
|
2424
|
+
}]
|
|
2425
|
+
}],
|
|
2426
|
+
titreDesRegles: [{
|
|
2427
|
+
type: i0.Input,
|
|
2428
|
+
args: [{
|
|
2429
|
+
isSignal: true,
|
|
2430
|
+
alias: "titreDesRegles",
|
|
2431
|
+
required: false
|
|
2432
|
+
}]
|
|
2433
|
+
}],
|
|
2434
|
+
jauge: [{
|
|
2435
|
+
type: i0.Input,
|
|
2436
|
+
args: [{
|
|
2437
|
+
isSignal: true,
|
|
2438
|
+
alias: "jauge",
|
|
2439
|
+
required: false
|
|
2440
|
+
}]
|
|
2441
|
+
}],
|
|
2442
|
+
motsDeForce: [{
|
|
2443
|
+
type: i0.Input,
|
|
2444
|
+
args: [{
|
|
2445
|
+
isSignal: true,
|
|
2446
|
+
alias: "motsDeForce",
|
|
2447
|
+
required: false
|
|
2448
|
+
}]
|
|
2449
|
+
}],
|
|
2450
|
+
formeDeJauge: [{
|
|
2451
|
+
type: i0.Input,
|
|
2452
|
+
args: [{
|
|
2453
|
+
isSignal: true,
|
|
2454
|
+
alias: "formeDeJauge",
|
|
2455
|
+
required: false
|
|
2456
|
+
}]
|
|
2457
|
+
}],
|
|
2458
|
+
dispositionDesRegles: [{
|
|
2459
|
+
type: i0.Input,
|
|
2460
|
+
args: [{
|
|
2461
|
+
isSignal: true,
|
|
2462
|
+
alias: "dispositionDesRegles",
|
|
2463
|
+
required: false
|
|
2464
|
+
}]
|
|
2465
|
+
}],
|
|
2466
|
+
icone: [{
|
|
2467
|
+
type: i0.Input,
|
|
2468
|
+
args: [{
|
|
2469
|
+
isSignal: true,
|
|
2470
|
+
alias: "icone",
|
|
2471
|
+
required: false
|
|
2472
|
+
}]
|
|
2473
|
+
}]
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
const CHIFFRE_DECIMAL = /\p{Nd}/u;
|
|
2477
|
+
function chiffreAscii(chiffre) {
|
|
2478
|
+
const code = chiffre.codePointAt(0) ?? 0;
|
|
2479
|
+
let debut = code;
|
|
2480
|
+
while (CHIFFRE_DECIMAL.test(String.fromCodePoint(debut - 1))) debut -= 1;
|
|
2481
|
+
return String((code - debut) % 10);
|
|
2482
|
+
}
|
|
2483
|
+
function nettoyerLeCode(texte) {
|
|
2484
|
+
return texte.replace(/\p{Nd}/gu, chiffreAscii).replace(/\D/g, "");
|
|
2485
|
+
}
|
|
2486
|
+
var StOtpField = class StOtpField extends ControleDeSaisie {
|
|
2487
|
+
libelles = inject(ST_LIBELLES);
|
|
2488
|
+
longueur = input(6, {
|
|
2489
|
+
...ngDevMode ? { debugName: "longueur" } : /* istanbul ignore next */ {},
|
|
2490
|
+
transform: numberAttribute
|
|
2491
|
+
});
|
|
2492
|
+
decritPar = input([], ...ngDevMode ? [{ debugName: "decritPar" }] : /* istanbul ignore next */ []);
|
|
2493
|
+
aideLue = computed(() => this.aideEtRaisons() ?? this.libelles().codeAChiffres(this.longueur()), ...ngDevMode ? [{ debugName: "aideLue" }] : /* istanbul ignore next */ []);
|
|
2494
|
+
surSaisie(evenement) {
|
|
2495
|
+
const champ = evenement.target;
|
|
2496
|
+
const code = nettoyerLeCode(champ.value);
|
|
2497
|
+
if (champ.value !== code) {
|
|
2498
|
+
champ.value = code;
|
|
2499
|
+
champ.setSelectionRange(code.length, code.length);
|
|
2500
|
+
}
|
|
2501
|
+
this.value.set(code);
|
|
2502
|
+
}
|
|
2503
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2504
|
+
minVersion: "12.0.0",
|
|
2505
|
+
version: "22.2.2",
|
|
2506
|
+
ngImport: i0,
|
|
2507
|
+
type: StOtpField,
|
|
2508
|
+
deps: null,
|
|
2509
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2510
|
+
});
|
|
2511
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2512
|
+
minVersion: "17.1.0",
|
|
2513
|
+
version: "22.2.2",
|
|
2514
|
+
type: StOtpField,
|
|
2515
|
+
isStandalone: true,
|
|
2516
|
+
selector: "st-otp-field",
|
|
2517
|
+
inputs: {
|
|
2518
|
+
longueur: {
|
|
2519
|
+
classPropertyName: "longueur",
|
|
2520
|
+
publicName: "longueur",
|
|
2521
|
+
isSignal: true,
|
|
2522
|
+
isRequired: false,
|
|
2523
|
+
transformFunction: null
|
|
2524
|
+
},
|
|
2525
|
+
decritPar: {
|
|
2526
|
+
classPropertyName: "decritPar",
|
|
2527
|
+
publicName: "decritPar",
|
|
2528
|
+
isSignal: true,
|
|
2529
|
+
isRequired: false,
|
|
2530
|
+
transformFunction: null
|
|
2531
|
+
}
|
|
2532
|
+
},
|
|
2533
|
+
host: { classAttribute: "st-otp-field" },
|
|
2534
|
+
usesInheritance: true,
|
|
2535
|
+
ngImport: i0,
|
|
2536
|
+
template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"decritPar()\"\n>\n <!-- Meta de l'application (« 6 chiffres », pastille d'etat), relayee a l'enveloppe. -->\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le champ, et a sa droite le renvoi fourni par l'application (minuteur « Nouveau code dans\n 0:45 », lien « Renvoyer un code ») : a 16 px, centre sur le champ (planche 8). -->\n <div class=\"st-otp-field__ligne\">\n <input\n #champ\n class=\"st-otp-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n spellcheck=\"false\"\n autocapitalize=\"none\"\n autocorrect=\"off\"\n dir=\"ltr\"\n [value]=\"value()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"touch.emit()\"\n />\n <ng-content select=\"[stRenvoi]\" />\n </div>\n</st-form-field>\n",
|
|
2537
|
+
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-otp-field__ligne{display:flex;flex-wrap:wrap;gap:var(--st-espacement-4);align-items:center}.st-otp-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-otp-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-otp-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-otp-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-otp-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-otp-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-otp-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-otp-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-otp-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-otp-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-otp-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-otp-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-otp-field__champ:is(input,textarea):read-only:not(:disabled),.st-otp-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-otp-field__champ{inline-size:var(--st-largeur-champ-md);max-inline-size:100%;padding-inline:var(--st-espacement-3);font-family:var(--st-police-mono);font-size:var(--st-taille-lg);font-weight:var(--st-graisse-grasse);font-variant-numeric:var(--st-chiffres-references);line-height:var(--st-interligne-lg);color:var(--st-couleur-texte-primaire);text-align:center;letter-spacing:var(--st-espacement-2);unicode-bidi:isolate}@media(pointer:coarse){.st-otp-field__champ{font-size:var(--st-taille-lg);line-height:var(--st-interligne-lg)}}.st-otp-field__champ:disabled{color:var(--st-couleur-texte-desactive)}@media(forced-colors:active){.st-otp-field__champ{color:FieldText;background:Field;border-color:FieldText}.st-otp-field__champ:disabled{color:GrayText;border-color:GrayText}}\n"],
|
|
2538
|
+
dependencies: [{
|
|
2539
|
+
kind: "component",
|
|
2540
|
+
type: StFormField,
|
|
2541
|
+
selector: "st-form-field",
|
|
2542
|
+
inputs: [
|
|
2543
|
+
"libelle",
|
|
2544
|
+
"complement",
|
|
2545
|
+
"disposition",
|
|
2546
|
+
"presentation",
|
|
2547
|
+
"libelleMasque",
|
|
2548
|
+
"descriptionsDuControle"
|
|
2549
|
+
]
|
|
2550
|
+
}, {
|
|
2551
|
+
kind: "directive",
|
|
2552
|
+
type: StControleDeChamp,
|
|
2553
|
+
selector: "[stControleDeChamp]"
|
|
2554
|
+
}],
|
|
2555
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2556
|
+
});
|
|
2557
|
+
};
|
|
2558
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2559
|
+
minVersion: "12.0.0",
|
|
2560
|
+
version: "22.2.2",
|
|
2561
|
+
ngImport: i0,
|
|
2562
|
+
type: StOtpField,
|
|
2563
|
+
decorators: [{
|
|
2564
|
+
type: Component,
|
|
2565
|
+
args: [{
|
|
2566
|
+
selector: "st-otp-field",
|
|
2567
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2568
|
+
imports: [StFormField, StControleDeChamp],
|
|
2569
|
+
host: { class: "st-otp-field" },
|
|
2570
|
+
template: "<st-form-field\n [libelle]=\"libelle()\"\n [aide]=\"aideLue()\"\n [erreurs]=\"errors()\"\n [afficherErreurs]=\"touched()\"\n [obligatoire]=\"required()\"\n [descriptionsDuControle]=\"decritPar()\"\n>\n <!-- Meta de l'application (« 6 chiffres », pastille d'etat), relayee a l'enveloppe. -->\n <ng-content select=\"[stMeta]\" ngProjectAs=\"[stMeta]\" />\n <ng-content select=\"[stAide]\" ngProjectAs=\"[stAide]\" />\n <ng-content select=\"[stIndication]\" ngProjectAs=\"[stIndication]\" />\n <!-- Le champ, et a sa droite le renvoi fourni par l'application (minuteur « Nouveau code dans\n 0:45 », lien « Renvoyer un code ») : a 16 px, centre sur le champ (planche 8). -->\n <div class=\"st-otp-field__ligne\">\n <input\n #champ\n class=\"st-otp-field__champ\"\n stControleDeChamp\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n spellcheck=\"false\"\n autocapitalize=\"none\"\n autocorrect=\"off\"\n dir=\"ltr\"\n [value]=\"value()\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (input)=\"surSaisie($event)\"\n (blur)=\"touch.emit()\"\n />\n <ng-content select=\"[stRenvoi]\" />\n </div>\n</st-form-field>\n",
|
|
2571
|
+
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-otp-field__ligne{display:flex;flex-wrap:wrap;gap:var(--st-espacement-4);align-items:center}.st-otp-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-otp-field__champ{box-sizing:border-box;inline-size:100%;min-block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-otp-field__champ:is(input,select){block-size:var(--st-commande-hauteur, var(--st-hauteur-commande-defaut))}.st-otp-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-otp-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-otp-field__champ::placeholder{color:var(--st-couleur-texte-attenue);opacity:1}@media(hover:hover){.st-otp-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-otp-field__champ:focus-visible{border-color:var(--st-couleur-primaire)}.st-otp-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-otp-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-otp-field__champ:disabled{color:var(--st-couleur-texte-desactive);cursor:not-allowed;background:var(--st-couleur-surface);border-color:var(--st-couleur-bordure)}.st-otp-field__champ:disabled::placeholder{color:var(--st-couleur-texte-desactive)}.st-otp-field__champ:is(input,textarea):read-only:not(:disabled),.st-otp-field__champ[aria-readonly=true]:not(:disabled){font-weight:var(--st-graisse-moyenne);background:var(--st-couleur-surface-enfoncee)}.st-otp-field__champ{inline-size:var(--st-largeur-champ-md);max-inline-size:100%;padding-inline:var(--st-espacement-3);font-family:var(--st-police-mono);font-size:var(--st-taille-lg);font-weight:var(--st-graisse-grasse);font-variant-numeric:var(--st-chiffres-references);line-height:var(--st-interligne-lg);color:var(--st-couleur-texte-primaire);text-align:center;letter-spacing:var(--st-espacement-2);unicode-bidi:isolate}@media(pointer:coarse){.st-otp-field__champ{font-size:var(--st-taille-lg);line-height:var(--st-interligne-lg)}}.st-otp-field__champ:disabled{color:var(--st-couleur-texte-desactive)}@media(forced-colors:active){.st-otp-field__champ{color:FieldText;background:Field;border-color:FieldText}.st-otp-field__champ:disabled{color:GrayText;border-color:GrayText}}\n"]
|
|
2572
|
+
}]
|
|
2573
|
+
}],
|
|
2574
|
+
propDecorators: {
|
|
2575
|
+
longueur: [{
|
|
2576
|
+
type: i0.Input,
|
|
2577
|
+
args: [{
|
|
2578
|
+
isSignal: true,
|
|
2579
|
+
alias: "longueur",
|
|
2580
|
+
required: false
|
|
2581
|
+
}]
|
|
2582
|
+
}],
|
|
2583
|
+
decritPar: [{
|
|
2584
|
+
type: i0.Input,
|
|
2585
|
+
args: [{
|
|
2586
|
+
isSignal: true,
|
|
2587
|
+
alias: "decritPar",
|
|
2588
|
+
required: false
|
|
2589
|
+
}]
|
|
2590
|
+
}]
|
|
2591
|
+
}
|
|
2592
|
+
});
|
|
2593
|
+
function normaliserPourRecherche(texte, locale) {
|
|
2594
|
+
return texte.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase(locale).trim();
|
|
2595
|
+
}
|
|
2596
|
+
function filtrerOptions(options, recherche, locale) {
|
|
2597
|
+
const cherche = normaliserPourRecherche(recherche, locale);
|
|
2598
|
+
if (cherche === "") return options;
|
|
2599
|
+
return options.filter((option) => normaliserPourRecherche(option.libelle, locale).includes(cherche));
|
|
2600
|
+
}
|
|
2601
|
+
function groupesDOptions(options) {
|
|
2602
|
+
const blocs = [];
|
|
2603
|
+
for (const option of options) {
|
|
2604
|
+
const groupe = option.groupe ?? null;
|
|
2605
|
+
const dernier = blocs.at(-1);
|
|
2606
|
+
if (dernier?.groupe === groupe) dernier.options.push(option);
|
|
2607
|
+
else blocs.push({
|
|
2608
|
+
cle: option.valeur,
|
|
2609
|
+
groupe,
|
|
2610
|
+
options: [option]
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
return blocs;
|
|
2614
|
+
}
|
|
2615
|
+
export { ContratDeCase, ContratDeChamp, ContratDeChampABornes, ControleDeSaisie, ControleDeSaisieCompte, EnvoisDeFormulaire, PorteurDErreurs, ST_ESTIMATEUR_DE_FORCE, ST_ETAT_D_ENVOI, ST_GROUPE_DE_SAISIE, StCheckbox, StControleDeChamp, StErrorSummary, StFormField, StInput, StOtpField, StPasswordField, erreurCode, erreurDate, erreurHeure, erreurIban, erreurPays, erreurPlageDeDates, erreurTelephone, erreursDAdresse, erreursDeFichiers, exempleDeDate, filtrerOptions, fournirEstimateurDeForce, fusionnerErreurs, groupesDOptions, libelleDePartie, messageDErreur, motifDHeureLocal, motifDuMoisLocal, motifLocal, niveauDuScore, normaliserPourRecherche };
|
|
2616
|
+
|
|
2617
|
+
//# sourceMappingURL=starterlib-ui-saisie-base-Bj-Wzk1h.mjs.map
|