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