@starterlib/ui 0.7.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENCES-TIERCES.md +236 -0
- package/README.md +163 -56
- package/assets/icones/catalogue.json +3296 -0
- package/assets/icones/sprite.svg +235 -35
- package/fesm2022/starterlib-ui-arbre.mjs +475 -0
- package/fesm2022/starterlib-ui-arbre.mjs.map +1 -0
- package/fesm2022/starterlib-ui-donnees.mjs +3561 -0
- package/fesm2022/starterlib-ui-donnees.mjs.map +1 -0
- package/fesm2022/starterlib-ui-formulaires.mjs +3186 -442
- package/fesm2022/starterlib-ui-formulaires.mjs.map +1 -1
- package/fesm2022/starterlib-ui-libelles-en.mjs +383 -0
- package/fesm2022/starterlib-ui-libelles-en.mjs.map +1 -0
- package/fesm2022/starterlib-ui-listes.mjs +5367 -0
- package/fesm2022/starterlib-ui-listes.mjs.map +1 -0
- package/fesm2022/starterlib-ui-messagerie.mjs +737 -0
- package/fesm2022/starterlib-ui-messagerie.mjs.map +1 -0
- package/fesm2022/starterlib-ui-navigation.mjs +509 -0
- package/fesm2022/starterlib-ui-navigation.mjs.map +1 -0
- package/fesm2022/starterlib-ui-onglets.mjs +371 -0
- package/fesm2022/starterlib-ui-onglets.mjs.map +1 -0
- package/fesm2022/starterlib-ui-parcours.mjs +2449 -0
- package/fesm2022/starterlib-ui-parcours.mjs.map +1 -0
- package/fesm2022/starterlib-ui-qr.mjs +907 -0
- package/fesm2022/starterlib-ui-qr.mjs.map +1 -0
- package/fesm2022/starterlib-ui-saisie.mjs +8609 -0
- package/fesm2022/starterlib-ui-saisie.mjs.map +1 -0
- package/fesm2022/starterlib-ui-selection.mjs +1341 -0
- package/fesm2022/starterlib-ui-selection.mjs.map +1 -0
- package/fesm2022/starterlib-ui-sens.mjs +59 -0
- package/fesm2022/starterlib-ui-sens.mjs.map +1 -0
- package/fesm2022/starterlib-ui-surfaces.mjs +5140 -1387
- package/fesm2022/starterlib-ui-surfaces.mjs.map +1 -1
- package/fesm2022/starterlib-ui.mjs +10729 -5689
- package/fesm2022/starterlib-ui.mjs.map +1 -1
- package/package.json +58 -17
- package/styles/amorce.css +69 -0
- package/styles/couches.css +178 -0
- package/types/starterlib-ui-arbre.d.ts +225 -0
- package/types/starterlib-ui-donnees.d.ts +1489 -0
- package/types/starterlib-ui-formulaires.d.ts +1174 -138
- package/types/starterlib-ui-libelles-en.d.ts +5 -0
- package/types/starterlib-ui-listes.d.ts +2487 -0
- package/types/starterlib-ui-messagerie.d.ts +317 -0
- package/types/starterlib-ui-navigation.d.ts +242 -0
- package/types/starterlib-ui-onglets.d.ts +212 -0
- package/types/starterlib-ui-parcours.d.ts +916 -0
- package/types/starterlib-ui-qr.d.ts +105 -0
- package/types/starterlib-ui-saisie.d.ts +3806 -0
- package/types/starterlib-ui-selection.d.ts +488 -0
- package/types/starterlib-ui-sens.d.ts +44 -0
- package/types/starterlib-ui-surfaces.d.ts +1899 -510
- package/types/starterlib-ui.d.ts +4731 -2678
- package/fesm2022/starterlib-ui-interactions.mjs +0 -598
- package/fesm2022/starterlib-ui-interactions.mjs.map +0 -1
- package/types/starterlib-ui-interactions.d.ts +0 -316
|
@@ -0,0 +1,3561 @@
|
|
|
1
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, afterNextRender, booleanAttribute, computed, effect, inject, input, isDevMode, linkedSignal, numberAttribute, output, signal, untracked } from "@angular/core";
|
|
4
|
+
import { ecartRelatif, formaterIban, lireInstant, masquerCarte, masquerIban, masquerTelephone, partiesDuMontant, quatreDerniers, sansCommandesDeDirection } from "@starterlib/util";
|
|
5
|
+
import { tenue } from "@starterlib/tokens";
|
|
6
|
+
import { AnnonceLocale, FUSEAU_PAR_DEFAUT, ST_LIBELLES, ST_LOCALE, ST_MONTANTS_MASQUES, StAvatar, StIcon, StIconButton, StIdentifiants, StLink, StTimer, partagerLaValeur } from "@starterlib/ui";
|
|
7
|
+
import { RouterLink } from "@angular/router";
|
|
8
|
+
const POINT$1 = "•";
|
|
9
|
+
const DUREE_MIN = 5;
|
|
10
|
+
const DUREE_MAX = 120;
|
|
11
|
+
var StMasked = class StMasked {
|
|
12
|
+
libelles = inject(ST_LIBELLES);
|
|
13
|
+
document = inject(DOCUMENT);
|
|
14
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
15
|
+
type = input("iban", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
16
|
+
charger = input(null, ...ngDevMode ? [{ debugName: "charger" }] : /* istanbul ignore next */ []);
|
|
17
|
+
dureeDeRevelationEnSecondes = input(tenue.revelation / 1e3, {
|
|
18
|
+
...ngDevMode ? { debugName: "dureeDeRevelationEnSecondes" } : /* istanbul ignore next */ {},
|
|
19
|
+
transform: (valeur) => {
|
|
20
|
+
const nombre = Number(valeur);
|
|
21
|
+
if (!Number.isFinite(nombre)) return tenue.revelation / 1e3;
|
|
22
|
+
return Math.min(DUREE_MAX, Math.max(DUREE_MIN, nombre));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
libelle = input(null, ...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
26
|
+
variante = input("ligne", ...ngDevMode ? [{ debugName: "variante" }] : /* istanbul ignore next */ []);
|
|
27
|
+
taille = input("sm", ...ngDevMode ? [{ debugName: "taille" }] : /* istanbul ignore next */ []);
|
|
28
|
+
afficherLeDecompte = input(false, {
|
|
29
|
+
...ngDevMode ? { debugName: "afficherLeDecompte" } : /* istanbul ignore next */ {},
|
|
30
|
+
transform: booleanAttribute
|
|
31
|
+
});
|
|
32
|
+
libelleAfficher = input(null, ...ngDevMode ? [{ debugName: "libelleAfficher" }] : /* istanbul ignore next */ []);
|
|
33
|
+
revelation = output();
|
|
34
|
+
reveleChange = output();
|
|
35
|
+
annonce = new AnnonceLocale(inject(DestroyRef));
|
|
36
|
+
enregistrement = computed(() => ({
|
|
37
|
+
valeur: this.valeur(),
|
|
38
|
+
charger: this.charger(),
|
|
39
|
+
type: this.type()
|
|
40
|
+
}), {
|
|
41
|
+
...ngDevMode ? { debugName: "enregistrement" } : /* istanbul ignore next */ {},
|
|
42
|
+
equal: (a, b) => a.valeur === b.valeur && a.charger === b.charger && a.type === b.type
|
|
43
|
+
});
|
|
44
|
+
etat = linkedSignal({
|
|
45
|
+
...ngDevMode ? { debugName: "etat" } : /* istanbul ignore next */ {},
|
|
46
|
+
source: this.enregistrement,
|
|
47
|
+
computation: () => "masque"
|
|
48
|
+
});
|
|
49
|
+
valeurComplete = linkedSignal({
|
|
50
|
+
...ngDevMode ? { debugName: "valeurComplete" } : /* istanbul ignore next */ {},
|
|
51
|
+
source: this.enregistrement,
|
|
52
|
+
computation: () => null
|
|
53
|
+
});
|
|
54
|
+
minuterie = null;
|
|
55
|
+
demande = 0;
|
|
56
|
+
reveleSignale = false;
|
|
57
|
+
revele = computed(() => this.etat() === "revele", ...ngDevMode ? [{ debugName: "revele" }] : /* istanbul ignore next */ []);
|
|
58
|
+
enChargement = computed(() => this.etat() === "chargement", ...ngDevMode ? [{ debugName: "enChargement" }] : /* istanbul ignore next */ []);
|
|
59
|
+
dejaMasquee = computed(() => this.valeur().includes(POINT$1), ...ngDevMode ? [{ debugName: "dejaMasquee" }] : /* istanbul ignore next */ []);
|
|
60
|
+
revelationPossible = computed(() => this.charger() !== null, ...ngDevMode ? [{ debugName: "revelationPossible" }] : /* istanbul ignore next */ []);
|
|
61
|
+
constructor() {
|
|
62
|
+
const destruction = inject(DestroyRef);
|
|
63
|
+
destruction.onDestroy(() => {
|
|
64
|
+
this.demande++;
|
|
65
|
+
this.arreterLaMinuterie();
|
|
66
|
+
});
|
|
67
|
+
let precedent = null;
|
|
68
|
+
effect(() => {
|
|
69
|
+
const courant = this.enregistrement();
|
|
70
|
+
if (precedent !== null && precedent !== courant) untracked(() => {
|
|
71
|
+
this.oublierLaRevelation();
|
|
72
|
+
});
|
|
73
|
+
precedent = courant;
|
|
74
|
+
});
|
|
75
|
+
afterNextRender(() => {
|
|
76
|
+
const fenetre = this.document.defaultView;
|
|
77
|
+
const remasquer = () => {
|
|
78
|
+
if (this.etat() !== "masque") this.masquer();
|
|
79
|
+
};
|
|
80
|
+
const auChangementDeVisibilite = () => {
|
|
81
|
+
if (this.document.hidden) remasquer();
|
|
82
|
+
};
|
|
83
|
+
this.document.addEventListener("visibilitychange", auChangementDeVisibilite);
|
|
84
|
+
fenetre?.addEventListener("blur", remasquer);
|
|
85
|
+
destruction.onDestroy(() => {
|
|
86
|
+
this.document.removeEventListener("visibilitychange", auChangementDeVisibilite);
|
|
87
|
+
fenetre?.removeEventListener("blur", remasquer);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
valeurMasquee = computed(() => {
|
|
92
|
+
const valeur = this.valeur();
|
|
93
|
+
if (this.dejaMasquee()) return valeur;
|
|
94
|
+
switch (this.type()) {
|
|
95
|
+
case "carte": return masquerCarte(valeur);
|
|
96
|
+
case "telephone": return masquerTelephone(valeur);
|
|
97
|
+
case "reference": return masquerReference(valeur);
|
|
98
|
+
default: return masquerIban(valeur);
|
|
99
|
+
}
|
|
100
|
+
}, ...ngDevMode ? [{ debugName: "valeurMasquee" }] : /* istanbul ignore next */ []);
|
|
101
|
+
valeurLisible = computed(() => {
|
|
102
|
+
const complete = this.valeurComplete();
|
|
103
|
+
if (complete === null) return null;
|
|
104
|
+
return this.type() === "iban" ? formaterIban(complete) : complete;
|
|
105
|
+
}, ...ngDevMode ? [{ debugName: "valeurLisible" }] : /* istanbul ignore next */ []);
|
|
106
|
+
valeurAffichee = computed(() => this.revele() ? this.valeurLisible() ?? this.valeurMasquee() : this.valeurMasquee(), ...ngDevMode ? [{ debugName: "valeurAffichee" }] : /* istanbul ignore next */ []);
|
|
107
|
+
groupes = computed(() => {
|
|
108
|
+
const morceaux = this.valeurAffichee().split(/\s+/).filter(Boolean);
|
|
109
|
+
if (this.type() === "telephone" && morceaux[0]?.startsWith("+") && morceaux.length > 2) morceaux.splice(0, 2, `${morceaux[0]}\u00a0${morceaux[1] ?? ""}`);
|
|
110
|
+
const revele = this.revele();
|
|
111
|
+
return morceaux.map((texte, rang) => ({
|
|
112
|
+
texte,
|
|
113
|
+
points: texte.includes(POINT$1),
|
|
114
|
+
extremite: revele && (rang === 0 || rang === morceaux.length - 1)
|
|
115
|
+
}));
|
|
116
|
+
}, ...ngDevMode ? [{ debugName: "groupes" }] : /* istanbul ignore next */ []);
|
|
117
|
+
finLisible = computed(() => quatreDerniers(this.valeurMasquee()), ...ngDevMode ? [{ debugName: "finLisible" }] : /* istanbul ignore next */ []);
|
|
118
|
+
nature = computed(() => {
|
|
119
|
+
const libelles = this.libelles();
|
|
120
|
+
return {
|
|
121
|
+
iban: libelles.natureIban,
|
|
122
|
+
carte: libelles.natureCarte,
|
|
123
|
+
telephone: libelles.natureTelephone,
|
|
124
|
+
reference: libelles.natureReference
|
|
125
|
+
}[this.type()];
|
|
126
|
+
}, ...ngDevMode ? [{ debugName: "nature" }] : /* istanbul ignore next */ []);
|
|
127
|
+
nomAccessible = computed(() => {
|
|
128
|
+
const lisible = this.revele() ? this.valeurLisible() : null;
|
|
129
|
+
if (lisible !== null) return `${this.nature()} ${lisible}`;
|
|
130
|
+
return this.libelles().seTerminantPar(this.nature(), this.finLisible());
|
|
131
|
+
}, ...ngDevMode ? [{ debugName: "nomAccessible" }] : /* istanbul ignore next */ []);
|
|
132
|
+
libelleDuBouton = computed(() => this.libelleAfficher() ?? this.libelles().afficherLaValeur(this.type()), ...ngDevMode ? [{ debugName: "libelleDuBouton" }] : /* istanbul ignore next */ []);
|
|
133
|
+
basculer() {
|
|
134
|
+
if (this.etat() === "revele") {
|
|
135
|
+
this.masquer();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (this.etat() === "masque") this.reveler();
|
|
139
|
+
}
|
|
140
|
+
async reveler() {
|
|
141
|
+
const charger = this.charger();
|
|
142
|
+
if (charger === null) return;
|
|
143
|
+
const demande = ++this.demande;
|
|
144
|
+
this.etat.set("chargement");
|
|
145
|
+
try {
|
|
146
|
+
const resultat = charger();
|
|
147
|
+
const complete = typeof resultat === "string" ? resultat : await resultat;
|
|
148
|
+
if (demande !== this.demande || this.etat() !== "chargement") return;
|
|
149
|
+
this.montrer(complete);
|
|
150
|
+
} catch (erreur) {
|
|
151
|
+
if (demande !== this.demande) return;
|
|
152
|
+
if (isDevMode()) console.warn("[st-masked] La revelation a echoue.", erreur);
|
|
153
|
+
this.etat.set("masque");
|
|
154
|
+
this.annonce.annoncer(this.libelles().revelationImpossible);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
montrer(complete) {
|
|
158
|
+
this.valeurComplete.set(complete);
|
|
159
|
+
this.etat.set("revele");
|
|
160
|
+
this.reveleSignale = true;
|
|
161
|
+
this.revelation.emit({ type: this.type() });
|
|
162
|
+
this.reveleChange.emit(true);
|
|
163
|
+
this.annonce.annoncer(this.libelles().valeurAffichee(this.type()));
|
|
164
|
+
this.arreterLaMinuterie();
|
|
165
|
+
this.minuterie = setTimeout(() => {
|
|
166
|
+
this.masquer();
|
|
167
|
+
}, this.dureeDeRevelationEnSecondes() * 1e3);
|
|
168
|
+
}
|
|
169
|
+
masquer() {
|
|
170
|
+
this.arreterLaMinuterie();
|
|
171
|
+
const etaitRevele = this.etat() === "revele";
|
|
172
|
+
this.etat.set("masque");
|
|
173
|
+
this.valeurComplete.set(null);
|
|
174
|
+
if (!etaitRevele) return;
|
|
175
|
+
this.reveleSignale = false;
|
|
176
|
+
this.reveleChange.emit(false);
|
|
177
|
+
this.annonce.annoncer(this.libelles().valeurMasqueeANouveau);
|
|
178
|
+
}
|
|
179
|
+
oublierLaRevelation() {
|
|
180
|
+
this.demande++;
|
|
181
|
+
this.arreterLaMinuterie();
|
|
182
|
+
if (!this.reveleSignale) return;
|
|
183
|
+
this.reveleSignale = false;
|
|
184
|
+
this.reveleChange.emit(false);
|
|
185
|
+
this.annonce.annoncer(this.libelles().valeurMasqueeANouveau);
|
|
186
|
+
}
|
|
187
|
+
arreterLaMinuterie() {
|
|
188
|
+
if (this.minuterie !== null) clearTimeout(this.minuterie);
|
|
189
|
+
this.minuterie = null;
|
|
190
|
+
}
|
|
191
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
192
|
+
minVersion: "12.0.0",
|
|
193
|
+
version: "22.2.0",
|
|
194
|
+
ngImport: i0,
|
|
195
|
+
type: StMasked,
|
|
196
|
+
deps: [],
|
|
197
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
198
|
+
});
|
|
199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
200
|
+
minVersion: "17.0.0",
|
|
201
|
+
version: "22.2.0",
|
|
202
|
+
type: StMasked,
|
|
203
|
+
isStandalone: true,
|
|
204
|
+
selector: "st-masked",
|
|
205
|
+
inputs: {
|
|
206
|
+
valeur: {
|
|
207
|
+
classPropertyName: "valeur",
|
|
208
|
+
publicName: "valeur",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: true,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
type: {
|
|
214
|
+
classPropertyName: "type",
|
|
215
|
+
publicName: "type",
|
|
216
|
+
isSignal: true,
|
|
217
|
+
isRequired: false,
|
|
218
|
+
transformFunction: null
|
|
219
|
+
},
|
|
220
|
+
charger: {
|
|
221
|
+
classPropertyName: "charger",
|
|
222
|
+
publicName: "charger",
|
|
223
|
+
isSignal: true,
|
|
224
|
+
isRequired: false,
|
|
225
|
+
transformFunction: null
|
|
226
|
+
},
|
|
227
|
+
dureeDeRevelationEnSecondes: {
|
|
228
|
+
classPropertyName: "dureeDeRevelationEnSecondes",
|
|
229
|
+
publicName: "dureeDeRevelationEnSecondes",
|
|
230
|
+
isSignal: true,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
},
|
|
234
|
+
libelle: {
|
|
235
|
+
classPropertyName: "libelle",
|
|
236
|
+
publicName: "libelle",
|
|
237
|
+
isSignal: true,
|
|
238
|
+
isRequired: false,
|
|
239
|
+
transformFunction: null
|
|
240
|
+
},
|
|
241
|
+
variante: {
|
|
242
|
+
classPropertyName: "variante",
|
|
243
|
+
publicName: "variante",
|
|
244
|
+
isSignal: true,
|
|
245
|
+
isRequired: false,
|
|
246
|
+
transformFunction: null
|
|
247
|
+
},
|
|
248
|
+
taille: {
|
|
249
|
+
classPropertyName: "taille",
|
|
250
|
+
publicName: "taille",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
},
|
|
255
|
+
afficherLeDecompte: {
|
|
256
|
+
classPropertyName: "afficherLeDecompte",
|
|
257
|
+
publicName: "afficherLeDecompte",
|
|
258
|
+
isSignal: true,
|
|
259
|
+
isRequired: false,
|
|
260
|
+
transformFunction: null
|
|
261
|
+
},
|
|
262
|
+
libelleAfficher: {
|
|
263
|
+
classPropertyName: "libelleAfficher",
|
|
264
|
+
publicName: "libelleAfficher",
|
|
265
|
+
isSignal: true,
|
|
266
|
+
isRequired: false,
|
|
267
|
+
transformFunction: null
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
outputs: {
|
|
271
|
+
revelation: "revelation",
|
|
272
|
+
reveleChange: "reveleChange"
|
|
273
|
+
},
|
|
274
|
+
host: {
|
|
275
|
+
properties: {
|
|
276
|
+
"attr.data-type": "type()",
|
|
277
|
+
"attr.data-variante": "variante()",
|
|
278
|
+
"attr.data-taille": "taille()",
|
|
279
|
+
"attr.data-revele": "revele() ? \"\" : null"
|
|
280
|
+
},
|
|
281
|
+
classAttribute: "st-masked"
|
|
282
|
+
},
|
|
283
|
+
ngImport: i0,
|
|
284
|
+
template: "@if (libelle() !== null || (afficherLeDecompte() && revele())) {\n <div class=\"st-masked__entete\">\n @if (libelle(); as texte) {\n <span class=\"st-masked__libelle\">{{ texte }}</span>\n }\n @if (afficherLeDecompte() && revele()) {\n <st-timer\n variante=\"pastille\"\n nature=\"remasquage\"\n [secondes]=\"dureeDeRevelationEnSecondes()\"\n />\n }\n </div>\n}\n\n<span class=\"st-masked__valeur\" aria-hidden=\"true\">\n @if (taille() === 'lg') {\n @for (groupe of groupes(); track $index) {\n <span\n class=\"st-masked__groupe\"\n [class.st-masked__groupe--points]=\"groupe.points\"\n [class.st-masked__groupe--extremite]=\"groupe.extremite\"\n >{{ groupe.texte }}</span\n >\n }\n } @else {\n <ng-container>{{ valeurAffichee() }}</ng-container>\n }\n</span>\n@if (revele()) {\n <!-- Sur papier, la valeur est TOUJOURS masquee : une impression ne se remasque pas. -->\n <span class=\"st-masked__imprime\" aria-hidden=\"true\">{{ valeurMasquee() }}</span>\n}\n<span class=\"st-vh\">{{ nomAccessible() }}</span>\n\n<div class=\"st-masked__fin\">\n <ng-content select=\"[fin]\" />\n @if (revelationPossible()) {\n <button\n stIconButton\n type=\"button\"\n variante=\"secondaire\"\n icone=\"oeil\"\n iconeEnfoncee=\"oeil-barre\"\n [taille]=\"taille() === 'lg' ? 'md' : 'xs'\"\n [tailleDuGlyphe]=\"taille() === 'lg' ? '20' : null\"\n [etiquette]=\"libelleDuBouton()\"\n [enfonce]=\"revele()\"\n [chargement]=\"enChargement()\"\n (click)=\"basculer()\"\n ></button>\n }\n</div>\n\n<div class=\"st-masked__suite\"><ng-content /></div>\n\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
|
|
285
|
+
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:inline-flex;gap:var(--st-espacement-2);align-items:center}.st-masked__valeur{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-references);color:var(--st-couleur-texte);letter-spacing:var(--st-interlettrage-capitales);unicode-bidi:isolate;direction:ltr}:host([data-taille=sm]) .st-masked__valeur{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm)}:host([data-taille=lg]) .st-masked__valeur{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1-5);align-items:center;font-size:var(--st-taille-lg);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-lg)}:host([data-taille=lg]:is([data-type=carte],[data-type=telephone])) .st-masked__valeur{gap:var(--st-espacement-2)}:host([data-taille=lg][data-type=carte]) .st-masked__valeur{letter-spacing:var(--st-interlettrage-surtitre)}.st-masked__groupe{white-space:nowrap}.st-masked__groupe--points{color:var(--st-couleur-texte-attenue)}.st-masked__groupe--extremite{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-texte-primaire)}.st-masked__fin{display:flex;gap:var(--st-espacement-1);align-items:center}.st-masked__fin:empty,.st-masked__suite:empty{display:none}.st-masked__imprime{display:none}:host([data-variante=tuile]){display:grid;gap:0 var(--st-espacement-2);grid-template-areas:\"entete fin\" \"valeur fin\" \"suite suite\";grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:var(--st-espacement-4);background:var(--st-couleur-surface-conteneur-bas);border-radius:var(--st-rayon-md)}:host([data-variante=tuile]) .st-masked__entete{grid-area:entete}:host([data-variante=tuile]) .st-masked__valeur{grid-area:valeur}:host([data-variante=tuile]) .st-masked__entete+.st-masked__valeur{margin-block-start:var(--st-espacement-1)}:host([data-variante=tuile]) .st-masked__fin{grid-area:fin}:host([data-variante=tuile]) .st-masked__suite{grid-area:suite;margin-block-start:var(--st-espacement-2)}:host([data-variante=tuile][data-revele]){grid-template-areas:\"entete fin\" \"valeur valeur\" \"suite suite\";background:color-mix(in srgb,var(--st-couleur-primaire-attenue) 30%,transparent)}:host([data-variante=tuile][data-revele]) .st-masked__entete+.st-masked__valeur{margin-block-start:var(--st-espacement-2)}.st-masked__entete{display:flex;flex-wrap:wrap;gap:var(--st-espacement-2);align-items:center}.st-masked__libelle{font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase;color:var(--st-couleur-texte-discret)}:host([data-revele]) .st-masked__libelle{color:var(--st-couleur-texte-primaire)}@media print{:host([data-revele]) .st-masked__valeur,.st-masked__fin{display:none}:host([data-revele]) .st-masked__imprime{display:inline;font-family:var(--st-police-mono)}}\n"],
|
|
286
|
+
dependencies: [{
|
|
287
|
+
kind: "component",
|
|
288
|
+
type: StIconButton,
|
|
289
|
+
selector: "button[stIconButton]",
|
|
290
|
+
inputs: [
|
|
291
|
+
"icone",
|
|
292
|
+
"etiquette",
|
|
293
|
+
"variante",
|
|
294
|
+
"taille",
|
|
295
|
+
"tailleDuGlyphe",
|
|
296
|
+
"enfonce",
|
|
297
|
+
"iconeEnfoncee",
|
|
298
|
+
"chargement",
|
|
299
|
+
"indisponible",
|
|
300
|
+
"raisonIndisponible"
|
|
301
|
+
]
|
|
302
|
+
}, {
|
|
303
|
+
kind: "component",
|
|
304
|
+
type: StTimer,
|
|
305
|
+
selector: "st-timer",
|
|
306
|
+
inputs: [
|
|
307
|
+
"secondes",
|
|
308
|
+
"echeance",
|
|
309
|
+
"nature",
|
|
310
|
+
"variante",
|
|
311
|
+
"avecIcone"
|
|
312
|
+
],
|
|
313
|
+
outputs: ["termine"]
|
|
314
|
+
}],
|
|
315
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
316
|
+
});
|
|
317
|
+
};
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
319
|
+
minVersion: "12.0.0",
|
|
320
|
+
version: "22.2.0",
|
|
321
|
+
ngImport: i0,
|
|
322
|
+
type: StMasked,
|
|
323
|
+
decorators: [{
|
|
324
|
+
type: Component,
|
|
325
|
+
args: [{
|
|
326
|
+
selector: "st-masked",
|
|
327
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
328
|
+
imports: [StIconButton, StTimer],
|
|
329
|
+
host: {
|
|
330
|
+
class: "st-masked",
|
|
331
|
+
"[attr.data-type]": "type()",
|
|
332
|
+
"[attr.data-variante]": "variante()",
|
|
333
|
+
"[attr.data-taille]": "taille()",
|
|
334
|
+
"[attr.data-revele]": "revele() ? \"\" : null"
|
|
335
|
+
},
|
|
336
|
+
template: "@if (libelle() !== null || (afficherLeDecompte() && revele())) {\n <div class=\"st-masked__entete\">\n @if (libelle(); as texte) {\n <span class=\"st-masked__libelle\">{{ texte }}</span>\n }\n @if (afficherLeDecompte() && revele()) {\n <st-timer\n variante=\"pastille\"\n nature=\"remasquage\"\n [secondes]=\"dureeDeRevelationEnSecondes()\"\n />\n }\n </div>\n}\n\n<span class=\"st-masked__valeur\" aria-hidden=\"true\">\n @if (taille() === 'lg') {\n @for (groupe of groupes(); track $index) {\n <span\n class=\"st-masked__groupe\"\n [class.st-masked__groupe--points]=\"groupe.points\"\n [class.st-masked__groupe--extremite]=\"groupe.extremite\"\n >{{ groupe.texte }}</span\n >\n }\n } @else {\n <ng-container>{{ valeurAffichee() }}</ng-container>\n }\n</span>\n@if (revele()) {\n <!-- Sur papier, la valeur est TOUJOURS masquee : une impression ne se remasque pas. -->\n <span class=\"st-masked__imprime\" aria-hidden=\"true\">{{ valeurMasquee() }}</span>\n}\n<span class=\"st-vh\">{{ nomAccessible() }}</span>\n\n<div class=\"st-masked__fin\">\n <ng-content select=\"[fin]\" />\n @if (revelationPossible()) {\n <button\n stIconButton\n type=\"button\"\n variante=\"secondaire\"\n icone=\"oeil\"\n iconeEnfoncee=\"oeil-barre\"\n [taille]=\"taille() === 'lg' ? 'md' : 'xs'\"\n [tailleDuGlyphe]=\"taille() === 'lg' ? '20' : null\"\n [etiquette]=\"libelleDuBouton()\"\n [enfonce]=\"revele()\"\n [chargement]=\"enChargement()\"\n (click)=\"basculer()\"\n ></button>\n }\n</div>\n\n<div class=\"st-masked__suite\"><ng-content /></div>\n\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
|
|
337
|
+
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:inline-flex;gap:var(--st-espacement-2);align-items:center}.st-masked__valeur{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-references);color:var(--st-couleur-texte);letter-spacing:var(--st-interlettrage-capitales);unicode-bidi:isolate;direction:ltr}:host([data-taille=sm]) .st-masked__valeur{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm)}:host([data-taille=lg]) .st-masked__valeur{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1-5);align-items:center;font-size:var(--st-taille-lg);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-lg)}:host([data-taille=lg]:is([data-type=carte],[data-type=telephone])) .st-masked__valeur{gap:var(--st-espacement-2)}:host([data-taille=lg][data-type=carte]) .st-masked__valeur{letter-spacing:var(--st-interlettrage-surtitre)}.st-masked__groupe{white-space:nowrap}.st-masked__groupe--points{color:var(--st-couleur-texte-attenue)}.st-masked__groupe--extremite{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-texte-primaire)}.st-masked__fin{display:flex;gap:var(--st-espacement-1);align-items:center}.st-masked__fin:empty,.st-masked__suite:empty{display:none}.st-masked__imprime{display:none}:host([data-variante=tuile]){display:grid;gap:0 var(--st-espacement-2);grid-template-areas:\"entete fin\" \"valeur fin\" \"suite suite\";grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:var(--st-espacement-4);background:var(--st-couleur-surface-conteneur-bas);border-radius:var(--st-rayon-md)}:host([data-variante=tuile]) .st-masked__entete{grid-area:entete}:host([data-variante=tuile]) .st-masked__valeur{grid-area:valeur}:host([data-variante=tuile]) .st-masked__entete+.st-masked__valeur{margin-block-start:var(--st-espacement-1)}:host([data-variante=tuile]) .st-masked__fin{grid-area:fin}:host([data-variante=tuile]) .st-masked__suite{grid-area:suite;margin-block-start:var(--st-espacement-2)}:host([data-variante=tuile][data-revele]){grid-template-areas:\"entete fin\" \"valeur valeur\" \"suite suite\";background:color-mix(in srgb,var(--st-couleur-primaire-attenue) 30%,transparent)}:host([data-variante=tuile][data-revele]) .st-masked__entete+.st-masked__valeur{margin-block-start:var(--st-espacement-2)}.st-masked__entete{display:flex;flex-wrap:wrap;gap:var(--st-espacement-2);align-items:center}.st-masked__libelle{font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase;color:var(--st-couleur-texte-discret)}:host([data-revele]) .st-masked__libelle{color:var(--st-couleur-texte-primaire)}@media print{:host([data-revele]) .st-masked__valeur,.st-masked__fin{display:none}:host([data-revele]) .st-masked__imprime{display:inline;font-family:var(--st-police-mono)}}\n"]
|
|
338
|
+
}]
|
|
339
|
+
}],
|
|
340
|
+
ctorParameters: () => [],
|
|
341
|
+
propDecorators: {
|
|
342
|
+
valeur: [{
|
|
343
|
+
type: i0.Input,
|
|
344
|
+
args: [{
|
|
345
|
+
isSignal: true,
|
|
346
|
+
alias: "valeur",
|
|
347
|
+
required: true
|
|
348
|
+
}]
|
|
349
|
+
}],
|
|
350
|
+
type: [{
|
|
351
|
+
type: i0.Input,
|
|
352
|
+
args: [{
|
|
353
|
+
isSignal: true,
|
|
354
|
+
alias: "type",
|
|
355
|
+
required: false
|
|
356
|
+
}]
|
|
357
|
+
}],
|
|
358
|
+
charger: [{
|
|
359
|
+
type: i0.Input,
|
|
360
|
+
args: [{
|
|
361
|
+
isSignal: true,
|
|
362
|
+
alias: "charger",
|
|
363
|
+
required: false
|
|
364
|
+
}]
|
|
365
|
+
}],
|
|
366
|
+
dureeDeRevelationEnSecondes: [{
|
|
367
|
+
type: i0.Input,
|
|
368
|
+
args: [{
|
|
369
|
+
isSignal: true,
|
|
370
|
+
alias: "dureeDeRevelationEnSecondes",
|
|
371
|
+
required: false
|
|
372
|
+
}]
|
|
373
|
+
}],
|
|
374
|
+
libelle: [{
|
|
375
|
+
type: i0.Input,
|
|
376
|
+
args: [{
|
|
377
|
+
isSignal: true,
|
|
378
|
+
alias: "libelle",
|
|
379
|
+
required: false
|
|
380
|
+
}]
|
|
381
|
+
}],
|
|
382
|
+
variante: [{
|
|
383
|
+
type: i0.Input,
|
|
384
|
+
args: [{
|
|
385
|
+
isSignal: true,
|
|
386
|
+
alias: "variante",
|
|
387
|
+
required: false
|
|
388
|
+
}]
|
|
389
|
+
}],
|
|
390
|
+
taille: [{
|
|
391
|
+
type: i0.Input,
|
|
392
|
+
args: [{
|
|
393
|
+
isSignal: true,
|
|
394
|
+
alias: "taille",
|
|
395
|
+
required: false
|
|
396
|
+
}]
|
|
397
|
+
}],
|
|
398
|
+
afficherLeDecompte: [{
|
|
399
|
+
type: i0.Input,
|
|
400
|
+
args: [{
|
|
401
|
+
isSignal: true,
|
|
402
|
+
alias: "afficherLeDecompte",
|
|
403
|
+
required: false
|
|
404
|
+
}]
|
|
405
|
+
}],
|
|
406
|
+
libelleAfficher: [{
|
|
407
|
+
type: i0.Input,
|
|
408
|
+
args: [{
|
|
409
|
+
isSignal: true,
|
|
410
|
+
alias: "libelleAfficher",
|
|
411
|
+
required: false
|
|
412
|
+
}]
|
|
413
|
+
}],
|
|
414
|
+
revelation: [{
|
|
415
|
+
type: i0.Output,
|
|
416
|
+
args: ["revelation"]
|
|
417
|
+
}],
|
|
418
|
+
reveleChange: [{
|
|
419
|
+
type: i0.Output,
|
|
420
|
+
args: ["reveleChange"]
|
|
421
|
+
}]
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
function masquerReference(valeur) {
|
|
425
|
+
const moitie = Math.ceil(valeur.length / 2);
|
|
426
|
+
return POINT$1.repeat(4) + valeur.slice(moitie);
|
|
427
|
+
}
|
|
428
|
+
const POINT = "•";
|
|
429
|
+
var StMoney = class StMoney {
|
|
430
|
+
locale = inject(ST_LOCALE);
|
|
431
|
+
libelles = inject(ST_LIBELLES);
|
|
432
|
+
montantsMasques = inject(ST_MONTANTS_MASQUES);
|
|
433
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
434
|
+
signeExplicite = input(false, {
|
|
435
|
+
...ngDevMode ? { debugName: "signeExplicite" } : /* istanbul ignore next */ {},
|
|
436
|
+
transform: booleanAttribute
|
|
437
|
+
});
|
|
438
|
+
sansDevise = input(false, {
|
|
439
|
+
...ngDevMode ? { debugName: "sansDevise" } : /* istanbul ignore next */ {},
|
|
440
|
+
transform: booleanAttribute
|
|
441
|
+
});
|
|
442
|
+
taille = input(null, ...ngDevMode ? [{ debugName: "taille" }] : /* istanbul ignore next */ []);
|
|
443
|
+
variation = input(false, {
|
|
444
|
+
...ngDevMode ? { debugName: "variation" } : /* istanbul ignore next */ {},
|
|
445
|
+
transform: booleanAttribute
|
|
446
|
+
});
|
|
447
|
+
ton = input(null, ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
448
|
+
police = input("base", ...ngDevMode ? [{ debugName: "police" }] : /* istanbul ignore next */ []);
|
|
449
|
+
alignement = input(null, ...ngDevMode ? [{ debugName: "alignement" }] : /* istanbul ignore next */ []);
|
|
450
|
+
masque = input(false, {
|
|
451
|
+
...ngDevMode ? { debugName: "masque" } : /* istanbul ignore next */ {},
|
|
452
|
+
transform: booleanAttribute
|
|
453
|
+
});
|
|
454
|
+
masqueLu = computed(() => this.masque() || this.montantsMasques(), ...ngDevMode ? [{ debugName: "masqueLu" }] : /* istanbul ignore next */ []);
|
|
455
|
+
signe = computed(() => {
|
|
456
|
+
const unites = this.valeur().unitesMineures;
|
|
457
|
+
if (unites < 0n) return "negatif";
|
|
458
|
+
if (unites > 0n) return "positif";
|
|
459
|
+
return "nul";
|
|
460
|
+
}, ...ngDevMode ? [{ debugName: "signe" }] : /* istanbul ignore next */ []);
|
|
461
|
+
options = computed(() => ({
|
|
462
|
+
locale: this.locale(),
|
|
463
|
+
signeExplicite: this.signeExplicite(),
|
|
464
|
+
sansDevise: this.sansDevise()
|
|
465
|
+
}), ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
466
|
+
texte = computed(() => partiesDuMontant(this.valeur(), this.options()).map((partie) => partie.value).join(""), ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
467
|
+
valeurMachine = computed(() => {
|
|
468
|
+
const { unitesMineures, devise } = this.valeur();
|
|
469
|
+
return `${unitesMineures.toString()} ${devise}`;
|
|
470
|
+
}, ...ngDevMode ? [{ debugName: "valeurMachine" }] : /* istanbul ignore next */ []);
|
|
471
|
+
texteLu = computed(() => {
|
|
472
|
+
const { unitesMineures, devise } = this.valeur();
|
|
473
|
+
const absolu = partiesDuMontant({
|
|
474
|
+
unitesMineures: unitesMineures < 0n ? -unitesMineures : unitesMineures,
|
|
475
|
+
devise
|
|
476
|
+
}, {
|
|
477
|
+
...this.options(),
|
|
478
|
+
signeExplicite: false
|
|
479
|
+
}).map((partie) => partie.value).join("");
|
|
480
|
+
return this.libelles().montantNegatif(absolu);
|
|
481
|
+
}, ...ngDevMode ? [{ debugName: "texteLu" }] : /* istanbul ignore next */ []);
|
|
482
|
+
texteMasque = computed(() => {
|
|
483
|
+
let entierRendu = false;
|
|
484
|
+
return partiesDuMontant(this.valeur(), {
|
|
485
|
+
...this.options(),
|
|
486
|
+
signeExplicite: false
|
|
487
|
+
}).filter((partie) => partie.type !== "minusSign" && partie.type !== "group").map((partie) => {
|
|
488
|
+
if (partie.type === "fraction") return POINT.repeat(partie.value.length);
|
|
489
|
+
if (partie.type !== "integer") return partie.value;
|
|
490
|
+
if (entierRendu) return "";
|
|
491
|
+
entierRendu = true;
|
|
492
|
+
return POINT.repeat(4);
|
|
493
|
+
}).join("");
|
|
494
|
+
}, ...ngDevMode ? [{ debugName: "texteMasque" }] : /* istanbul ignore next */ []);
|
|
495
|
+
libelleMasque = computed(() => this.libelles().montantMasque, ...ngDevMode ? [{ debugName: "libelleMasque" }] : /* istanbul ignore next */ []);
|
|
496
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
497
|
+
minVersion: "12.0.0",
|
|
498
|
+
version: "22.2.0",
|
|
499
|
+
ngImport: i0,
|
|
500
|
+
type: StMoney,
|
|
501
|
+
deps: [],
|
|
502
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
503
|
+
});
|
|
504
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
505
|
+
minVersion: "17.0.0",
|
|
506
|
+
version: "22.2.0",
|
|
507
|
+
type: StMoney,
|
|
508
|
+
isStandalone: true,
|
|
509
|
+
selector: "st-money",
|
|
510
|
+
inputs: {
|
|
511
|
+
valeur: {
|
|
512
|
+
classPropertyName: "valeur",
|
|
513
|
+
publicName: "valeur",
|
|
514
|
+
isSignal: true,
|
|
515
|
+
isRequired: true,
|
|
516
|
+
transformFunction: null
|
|
517
|
+
},
|
|
518
|
+
signeExplicite: {
|
|
519
|
+
classPropertyName: "signeExplicite",
|
|
520
|
+
publicName: "signeExplicite",
|
|
521
|
+
isSignal: true,
|
|
522
|
+
isRequired: false,
|
|
523
|
+
transformFunction: null
|
|
524
|
+
},
|
|
525
|
+
sansDevise: {
|
|
526
|
+
classPropertyName: "sansDevise",
|
|
527
|
+
publicName: "sansDevise",
|
|
528
|
+
isSignal: true,
|
|
529
|
+
isRequired: false,
|
|
530
|
+
transformFunction: null
|
|
531
|
+
},
|
|
532
|
+
taille: {
|
|
533
|
+
classPropertyName: "taille",
|
|
534
|
+
publicName: "taille",
|
|
535
|
+
isSignal: true,
|
|
536
|
+
isRequired: false,
|
|
537
|
+
transformFunction: null
|
|
538
|
+
},
|
|
539
|
+
variation: {
|
|
540
|
+
classPropertyName: "variation",
|
|
541
|
+
publicName: "variation",
|
|
542
|
+
isSignal: true,
|
|
543
|
+
isRequired: false,
|
|
544
|
+
transformFunction: null
|
|
545
|
+
},
|
|
546
|
+
ton: {
|
|
547
|
+
classPropertyName: "ton",
|
|
548
|
+
publicName: "ton",
|
|
549
|
+
isSignal: true,
|
|
550
|
+
isRequired: false,
|
|
551
|
+
transformFunction: null
|
|
552
|
+
},
|
|
553
|
+
police: {
|
|
554
|
+
classPropertyName: "police",
|
|
555
|
+
publicName: "police",
|
|
556
|
+
isSignal: true,
|
|
557
|
+
isRequired: false,
|
|
558
|
+
transformFunction: null
|
|
559
|
+
},
|
|
560
|
+
alignement: {
|
|
561
|
+
classPropertyName: "alignement",
|
|
562
|
+
publicName: "alignement",
|
|
563
|
+
isSignal: true,
|
|
564
|
+
isRequired: false,
|
|
565
|
+
transformFunction: null
|
|
566
|
+
},
|
|
567
|
+
masque: {
|
|
568
|
+
classPropertyName: "masque",
|
|
569
|
+
publicName: "masque",
|
|
570
|
+
isSignal: true,
|
|
571
|
+
isRequired: false,
|
|
572
|
+
transformFunction: null
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
host: {
|
|
576
|
+
properties: {
|
|
577
|
+
"attr.data-taille": "taille()",
|
|
578
|
+
"attr.data-signe": "masqueLu() ? null : signe()",
|
|
579
|
+
"attr.data-variation": "variation() && !masqueLu() ? \"\" : null",
|
|
580
|
+
"attr.data-ton": "ton()",
|
|
581
|
+
"attr.data-police": "police()",
|
|
582
|
+
"attr.data-alignement": "alignement()",
|
|
583
|
+
"attr.data-masque": "masqueLu() ? \"\" : null"
|
|
584
|
+
},
|
|
585
|
+
classAttribute: "st-money"
|
|
586
|
+
},
|
|
587
|
+
ngImport: i0,
|
|
588
|
+
template: "@if (masqueLu()) {\n <span class=\"st-money__valeur\" aria-hidden=\"true\">{{ texteMasque() }}</span>\n <span class=\"st-vh\">{{ libelleMasque() }}</span>\n} @else if (signe() === 'negatif') {\n <!-- Le signe moins U+2212 n'est pas lu partout : le texte visible se tait, le mot se dit. -->\n <data class=\"st-money__valeur\" [attr.value]=\"valeurMachine()\" aria-hidden=\"true\">{{\n texte()\n }}</data>\n <span class=\"st-vh\">{{ texteLu() }}</span>\n} @else {\n <data class=\"st-money__valeur\" [attr.value]=\"valeurMachine()\">{{ texte() }}</data>\n}\n",
|
|
589
|
+
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{color:var(--st-couleur-texte);unicode-bidi:isolate;white-space:nowrap}:host(:not([data-masque])){font-variant-numeric:var(--st-chiffres-alignes)}:host([data-alignement=fin]){text-align:end}:host([data-alignement=debut]){text-align:start}:host([data-taille=sm]){font-size:var(--st-taille-sm);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-sm)}:host([data-taille=md]){font-weight:var(--st-graisse-moyenne)}:host([data-taille=lg]){font-size:var(--st-taille-lg);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-lg)}:host([data-taille=xl]){font-size:var(--st-taille-xl);line-height:var(--st-interligne-xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-xl)}:host([data-taille=\"2xl\"]){font-size:var(--st-taille-2xl);line-height:var(--st-interligne-2xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-2xl)}:host([data-taille=hero]){display:block;font-size:var(--st-taille-xl);line-height:var(--st-interligne-xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-xl)}@media(min-width:30rem){:host([data-taille=hero]){font-size:var(--st-taille-4xl);line-height:var(--st-interligne-4xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-4xl);font-variant-numeric:var(--st-chiffres-alignes)}}:host([data-police=mono]){font-family:var(--st-police-mono);letter-spacing:var(--st-interlettrage-normal)}:host([data-variation][data-signe=positif]:not([data-ton])){color:var(--st-couleur-positif)}:host([data-variation][data-signe=negatif]:not([data-ton])){color:var(--st-couleur-negatif)}:host([data-masque]){color:var(--st-couleur-texte)}:host([data-ton=neutre]){color:var(--st-couleur-texte)}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){color:var(--st-couleur-texte-primaire)}:host([data-ton=succes]){color:var(--st-couleur-succes)}:host([data-ton=danger]){color:var(--st-couleur-danger)}:host([data-masque]){font-family:var(--st-police-mono);letter-spacing:var(--st-interlettrage-surtitre)}\n"],
|
|
590
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
591
|
+
});
|
|
592
|
+
};
|
|
593
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
594
|
+
minVersion: "12.0.0",
|
|
595
|
+
version: "22.2.0",
|
|
596
|
+
ngImport: i0,
|
|
597
|
+
type: StMoney,
|
|
598
|
+
decorators: [{
|
|
599
|
+
type: Component,
|
|
600
|
+
args: [{
|
|
601
|
+
selector: "st-money",
|
|
602
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
603
|
+
host: {
|
|
604
|
+
class: "st-money",
|
|
605
|
+
"[attr.data-taille]": "taille()",
|
|
606
|
+
"[attr.data-signe]": "masqueLu() ? null : signe()",
|
|
607
|
+
"[attr.data-variation]": "variation() && !masqueLu() ? \"\" : null",
|
|
608
|
+
"[attr.data-ton]": "ton()",
|
|
609
|
+
"[attr.data-police]": "police()",
|
|
610
|
+
"[attr.data-alignement]": "alignement()",
|
|
611
|
+
"[attr.data-masque]": "masqueLu() ? \"\" : null"
|
|
612
|
+
},
|
|
613
|
+
template: "@if (masqueLu()) {\n <span class=\"st-money__valeur\" aria-hidden=\"true\">{{ texteMasque() }}</span>\n <span class=\"st-vh\">{{ libelleMasque() }}</span>\n} @else if (signe() === 'negatif') {\n <!-- Le signe moins U+2212 n'est pas lu partout : le texte visible se tait, le mot se dit. -->\n <data class=\"st-money__valeur\" [attr.value]=\"valeurMachine()\" aria-hidden=\"true\">{{\n texte()\n }}</data>\n <span class=\"st-vh\">{{ texteLu() }}</span>\n} @else {\n <data class=\"st-money__valeur\" [attr.value]=\"valeurMachine()\">{{ texte() }}</data>\n}\n",
|
|
614
|
+
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{color:var(--st-couleur-texte);unicode-bidi:isolate;white-space:nowrap}:host(:not([data-masque])){font-variant-numeric:var(--st-chiffres-alignes)}:host([data-alignement=fin]){text-align:end}:host([data-alignement=debut]){text-align:start}:host([data-taille=sm]){font-size:var(--st-taille-sm);font-weight:var(--st-graisse-moyenne);line-height:var(--st-interligne-sm)}:host([data-taille=md]){font-weight:var(--st-graisse-moyenne)}:host([data-taille=lg]){font-size:var(--st-taille-lg);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-lg)}:host([data-taille=xl]){font-size:var(--st-taille-xl);line-height:var(--st-interligne-xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-xl)}:host([data-taille=\"2xl\"]){font-size:var(--st-taille-2xl);line-height:var(--st-interligne-2xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-2xl)}:host([data-taille=hero]){display:block;font-size:var(--st-taille-xl);line-height:var(--st-interligne-xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-xl)}@media(min-width:30rem){:host([data-taille=hero]){font-size:var(--st-taille-4xl);line-height:var(--st-interligne-4xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-4xl);font-variant-numeric:var(--st-chiffres-alignes)}}:host([data-police=mono]){font-family:var(--st-police-mono);letter-spacing:var(--st-interlettrage-normal)}:host([data-variation][data-signe=positif]:not([data-ton])){color:var(--st-couleur-positif)}:host([data-variation][data-signe=negatif]:not([data-ton])){color:var(--st-couleur-negatif)}:host([data-masque]){color:var(--st-couleur-texte)}:host([data-ton=neutre]){color:var(--st-couleur-texte)}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){color:var(--st-couleur-texte-primaire)}:host([data-ton=succes]){color:var(--st-couleur-succes)}:host([data-ton=danger]){color:var(--st-couleur-danger)}:host([data-masque]){font-family:var(--st-police-mono);letter-spacing:var(--st-interlettrage-surtitre)}\n"]
|
|
615
|
+
}]
|
|
616
|
+
}],
|
|
617
|
+
propDecorators: {
|
|
618
|
+
valeur: [{
|
|
619
|
+
type: i0.Input,
|
|
620
|
+
args: [{
|
|
621
|
+
isSignal: true,
|
|
622
|
+
alias: "valeur",
|
|
623
|
+
required: true
|
|
624
|
+
}]
|
|
625
|
+
}],
|
|
626
|
+
signeExplicite: [{
|
|
627
|
+
type: i0.Input,
|
|
628
|
+
args: [{
|
|
629
|
+
isSignal: true,
|
|
630
|
+
alias: "signeExplicite",
|
|
631
|
+
required: false
|
|
632
|
+
}]
|
|
633
|
+
}],
|
|
634
|
+
sansDevise: [{
|
|
635
|
+
type: i0.Input,
|
|
636
|
+
args: [{
|
|
637
|
+
isSignal: true,
|
|
638
|
+
alias: "sansDevise",
|
|
639
|
+
required: false
|
|
640
|
+
}]
|
|
641
|
+
}],
|
|
642
|
+
taille: [{
|
|
643
|
+
type: i0.Input,
|
|
644
|
+
args: [{
|
|
645
|
+
isSignal: true,
|
|
646
|
+
alias: "taille",
|
|
647
|
+
required: false
|
|
648
|
+
}]
|
|
649
|
+
}],
|
|
650
|
+
variation: [{
|
|
651
|
+
type: i0.Input,
|
|
652
|
+
args: [{
|
|
653
|
+
isSignal: true,
|
|
654
|
+
alias: "variation",
|
|
655
|
+
required: false
|
|
656
|
+
}]
|
|
657
|
+
}],
|
|
658
|
+
ton: [{
|
|
659
|
+
type: i0.Input,
|
|
660
|
+
args: [{
|
|
661
|
+
isSignal: true,
|
|
662
|
+
alias: "ton",
|
|
663
|
+
required: false
|
|
664
|
+
}]
|
|
665
|
+
}],
|
|
666
|
+
police: [{
|
|
667
|
+
type: i0.Input,
|
|
668
|
+
args: [{
|
|
669
|
+
isSignal: true,
|
|
670
|
+
alias: "police",
|
|
671
|
+
required: false
|
|
672
|
+
}]
|
|
673
|
+
}],
|
|
674
|
+
alignement: [{
|
|
675
|
+
type: i0.Input,
|
|
676
|
+
args: [{
|
|
677
|
+
isSignal: true,
|
|
678
|
+
alias: "alignement",
|
|
679
|
+
required: false
|
|
680
|
+
}]
|
|
681
|
+
}],
|
|
682
|
+
masque: [{
|
|
683
|
+
type: i0.Input,
|
|
684
|
+
args: [{
|
|
685
|
+
isSignal: true,
|
|
686
|
+
alias: "masque",
|
|
687
|
+
required: false
|
|
688
|
+
}]
|
|
689
|
+
}]
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
const OPTIONS = {
|
|
693
|
+
court: {
|
|
694
|
+
day: "2-digit",
|
|
695
|
+
month: "2-digit",
|
|
696
|
+
year: "numeric"
|
|
697
|
+
},
|
|
698
|
+
long: {
|
|
699
|
+
day: "numeric",
|
|
700
|
+
month: "long",
|
|
701
|
+
year: "numeric"
|
|
702
|
+
},
|
|
703
|
+
moyen: {
|
|
704
|
+
dateStyle: "medium",
|
|
705
|
+
timeStyle: "short"
|
|
706
|
+
},
|
|
707
|
+
"date-heure": {
|
|
708
|
+
day: "2-digit",
|
|
709
|
+
month: "2-digit",
|
|
710
|
+
year: "numeric",
|
|
711
|
+
hour: "2-digit",
|
|
712
|
+
minute: "2-digit"
|
|
713
|
+
},
|
|
714
|
+
heure: {
|
|
715
|
+
hour: "2-digit",
|
|
716
|
+
minute: "2-digit"
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
const AVEC_HEURE = /* @__PURE__ */ new Set([
|
|
720
|
+
"moyen",
|
|
721
|
+
"date-heure",
|
|
722
|
+
"heure"
|
|
723
|
+
]);
|
|
724
|
+
const DATE_DE_CALENDRIER = /^\d{4}-\d{2}-\d{2}$/;
|
|
725
|
+
var StDate = class StDate {
|
|
726
|
+
locale = inject(ST_LOCALE);
|
|
727
|
+
libelles = inject(ST_LIBELLES);
|
|
728
|
+
fuseauParDefaut = inject(FUSEAU_PAR_DEFAUT);
|
|
729
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
730
|
+
format = input("court", ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
731
|
+
fuseau = input(null, ...ngDevMode ? [{ debugName: "fuseau" }] : /* istanbul ignore next */ []);
|
|
732
|
+
afficherLeFuseau = input(false, {
|
|
733
|
+
...ngDevMode ? { debugName: "afficherLeFuseau" } : /* istanbul ignore next */ {},
|
|
734
|
+
transform: booleanAttribute
|
|
735
|
+
});
|
|
736
|
+
variante = input("valeur", ...ngDevMode ? [{ debugName: "variante" }] : /* istanbul ignore next */ []);
|
|
737
|
+
estDateDeCalendrier = computed(() => {
|
|
738
|
+
const valeur = this.valeur();
|
|
739
|
+
return typeof valeur === "string" && DATE_DE_CALENDRIER.test(valeur);
|
|
740
|
+
}, ...ngDevMode ? [{ debugName: "estDateDeCalendrier" }] : /* istanbul ignore next */ []);
|
|
741
|
+
fuseauDeRendu = computed(() => this.estDateDeCalendrier() ? "UTC" : this.fuseau() ?? this.fuseauParDefaut, ...ngDevMode ? [{ debugName: "fuseauDeRendu" }] : /* istanbul ignore next */ []);
|
|
742
|
+
date = computed(() => {
|
|
743
|
+
const valeur = this.valeur();
|
|
744
|
+
if (valeur === null || valeur === "") return null;
|
|
745
|
+
if (valeur instanceof Date) return Number.isNaN(valeur.getTime()) ? null : valeur;
|
|
746
|
+
const instant = lireInstant(valeur, this.fuseauDeRendu());
|
|
747
|
+
return instant === null ? null : new Date(instant);
|
|
748
|
+
}, ...ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []);
|
|
749
|
+
estValide = computed(() => this.date() !== null, ...ngDevMode ? [{ debugName: "estValide" }] : /* istanbul ignore next */ []);
|
|
750
|
+
constructor() {
|
|
751
|
+
effect(() => {
|
|
752
|
+
const valeur = this.valeur();
|
|
753
|
+
if (!isDevMode() || this.estValide() || valeur === null || valeur === "") return;
|
|
754
|
+
console.warn(`[st-date] Valeur illisible ("${String(valeur)}") : le tiret "\u2014" est rendu. Transmettre une date ISO 8601 ou un objet Date.`);
|
|
755
|
+
});
|
|
756
|
+
effect(() => {
|
|
757
|
+
if (isDevMode() && this.format() === "heure" && this.estDateDeCalendrier()) console.warn("[st-date] Format \"heure\" sur une date de calendrier : la date est rendue.");
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
iso = computed(() => {
|
|
761
|
+
const date = this.date();
|
|
762
|
+
if (date === null) return null;
|
|
763
|
+
if (this.estDateDeCalendrier()) return date.toISOString().slice(0, 10);
|
|
764
|
+
return date.toISOString();
|
|
765
|
+
}, ...ngDevMode ? [{ debugName: "iso" }] : /* istanbul ignore next */ []);
|
|
766
|
+
optionsDeFormat = computed(() => {
|
|
767
|
+
const format = this.format();
|
|
768
|
+
if (!this.estDateDeCalendrier()) return OPTIONS[format];
|
|
769
|
+
if (format === "heure") return OPTIONS.court;
|
|
770
|
+
if (format === "moyen") return { dateStyle: "medium" };
|
|
771
|
+
const sansHeure = { ...OPTIONS[format] };
|
|
772
|
+
delete sansHeure.hour;
|
|
773
|
+
delete sansHeure.minute;
|
|
774
|
+
return sansHeure;
|
|
775
|
+
}, ...ngDevMode ? [{ debugName: "optionsDeFormat" }] : /* istanbul ignore next */ []);
|
|
776
|
+
texte = computed(() => {
|
|
777
|
+
const date = this.date();
|
|
778
|
+
if (date === null) return "";
|
|
779
|
+
return new Intl.DateTimeFormat(this.locale(), {
|
|
780
|
+
...this.optionsDeFormat(),
|
|
781
|
+
timeZone: this.fuseauDeRendu()
|
|
782
|
+
}).format(date);
|
|
783
|
+
}, ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
784
|
+
fuseauAffiche = computed(() => this.afficherLeFuseau() && AVEC_HEURE.has(this.format()) && !this.estDateDeCalendrier() ? this.fuseauDeRendu() : null, ...ngDevMode ? [{ debugName: "fuseauAffiche" }] : /* istanbul ignore next */ []);
|
|
785
|
+
texteAccessible = computed(() => {
|
|
786
|
+
const date = this.date();
|
|
787
|
+
if (date === null || this.format() !== "court") return null;
|
|
788
|
+
return new Intl.DateTimeFormat(this.locale(), {
|
|
789
|
+
...OPTIONS.long,
|
|
790
|
+
timeZone: this.fuseauDeRendu()
|
|
791
|
+
}).format(date);
|
|
792
|
+
}, ...ngDevMode ? [{ debugName: "texteAccessible" }] : /* istanbul ignore next */ []);
|
|
793
|
+
dateInconnue = computed(() => this.libelles().dateInconnue, ...ngDevMode ? [{ debugName: "dateInconnue" }] : /* istanbul ignore next */ []);
|
|
794
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
795
|
+
minVersion: "12.0.0",
|
|
796
|
+
version: "22.2.0",
|
|
797
|
+
ngImport: i0,
|
|
798
|
+
type: StDate,
|
|
799
|
+
deps: [],
|
|
800
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
801
|
+
});
|
|
802
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
803
|
+
minVersion: "17.0.0",
|
|
804
|
+
version: "22.2.0",
|
|
805
|
+
type: StDate,
|
|
806
|
+
isStandalone: true,
|
|
807
|
+
selector: "st-date",
|
|
808
|
+
inputs: {
|
|
809
|
+
valeur: {
|
|
810
|
+
classPropertyName: "valeur",
|
|
811
|
+
publicName: "valeur",
|
|
812
|
+
isSignal: true,
|
|
813
|
+
isRequired: true,
|
|
814
|
+
transformFunction: null
|
|
815
|
+
},
|
|
816
|
+
format: {
|
|
817
|
+
classPropertyName: "format",
|
|
818
|
+
publicName: "format",
|
|
819
|
+
isSignal: true,
|
|
820
|
+
isRequired: false,
|
|
821
|
+
transformFunction: null
|
|
822
|
+
},
|
|
823
|
+
fuseau: {
|
|
824
|
+
classPropertyName: "fuseau",
|
|
825
|
+
publicName: "fuseau",
|
|
826
|
+
isSignal: true,
|
|
827
|
+
isRequired: false,
|
|
828
|
+
transformFunction: null
|
|
829
|
+
},
|
|
830
|
+
afficherLeFuseau: {
|
|
831
|
+
classPropertyName: "afficherLeFuseau",
|
|
832
|
+
publicName: "afficherLeFuseau",
|
|
833
|
+
isSignal: true,
|
|
834
|
+
isRequired: false,
|
|
835
|
+
transformFunction: null
|
|
836
|
+
},
|
|
837
|
+
variante: {
|
|
838
|
+
classPropertyName: "variante",
|
|
839
|
+
publicName: "variante",
|
|
840
|
+
isSignal: true,
|
|
841
|
+
isRequired: false,
|
|
842
|
+
transformFunction: null
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
host: {
|
|
846
|
+
properties: {
|
|
847
|
+
"attr.data-format": "format()",
|
|
848
|
+
"attr.data-variante": "variante()",
|
|
849
|
+
"attr.data-inconnue": "estValide() ? null : \"\""
|
|
850
|
+
},
|
|
851
|
+
classAttribute: "st-date"
|
|
852
|
+
},
|
|
853
|
+
ngImport: i0,
|
|
854
|
+
template: "@if (estValide()) {\n <time [attr.datetime]=\"iso()\" [attr.aria-hidden]=\"texteAccessible() === null ? null : 'true'\"\n ><span class=\"st-date__texte\">{{ texte() }}</span>\n @if (fuseauAffiche(); as fuseau) {\n <!-- L'espace dans le corps de la date : c'est lui qui coupe la ligne avant le fuseau. -->\n {{ ' ' }}<span class=\"st-date__fuseau\">({{ fuseau }})</span>\n }\n </time>\n @if (texteAccessible(); as lu) {\n <!-- Rien quand le format affiche se lit deja : un noeud vide ferait\n croire a un texte de remplacement absent. -->\n <span class=\"st-vh\">{{ lu }}</span>\n }\n} @else {\n <span class=\"st-date__inconnue\" aria-hidden=\"true\">—</span>\n <span class=\"st-vh\">{{ dateInconnue() }}</span>\n}\n",
|
|
855
|
+
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{color:var(--st-couleur-texte);unicode-bidi:isolate}:host([data-variante=valeur][data-format=court]:not([data-inconnue])),:host([data-variante=valeur][data-format=date-heure]:not([data-inconnue])),:host([data-variante=valeur][data-format=heure]:not([data-inconnue])){font-variant-numeric:var(--st-chiffres-alignes)}:host([data-variante=meta]){font-weight:var(--st-graisse-semi)}.st-date__texte{white-space:nowrap}.st-date__fuseau{font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret);white-space:nowrap}.st-date__inconnue{font-family:var(--st-police-mono);color:var(--st-couleur-texte-discret)}\n"],
|
|
856
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
857
|
+
});
|
|
858
|
+
};
|
|
859
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
860
|
+
minVersion: "12.0.0",
|
|
861
|
+
version: "22.2.0",
|
|
862
|
+
ngImport: i0,
|
|
863
|
+
type: StDate,
|
|
864
|
+
decorators: [{
|
|
865
|
+
type: Component,
|
|
866
|
+
args: [{
|
|
867
|
+
selector: "st-date",
|
|
868
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
869
|
+
host: {
|
|
870
|
+
class: "st-date",
|
|
871
|
+
"[attr.data-format]": "format()",
|
|
872
|
+
"[attr.data-variante]": "variante()",
|
|
873
|
+
"[attr.data-inconnue]": "estValide() ? null : \"\""
|
|
874
|
+
},
|
|
875
|
+
template: "@if (estValide()) {\n <time [attr.datetime]=\"iso()\" [attr.aria-hidden]=\"texteAccessible() === null ? null : 'true'\"\n ><span class=\"st-date__texte\">{{ texte() }}</span>\n @if (fuseauAffiche(); as fuseau) {\n <!-- L'espace dans le corps de la date : c'est lui qui coupe la ligne avant le fuseau. -->\n {{ ' ' }}<span class=\"st-date__fuseau\">({{ fuseau }})</span>\n }\n </time>\n @if (texteAccessible(); as lu) {\n <!-- Rien quand le format affiche se lit deja : un noeud vide ferait\n croire a un texte de remplacement absent. -->\n <span class=\"st-vh\">{{ lu }}</span>\n }\n} @else {\n <span class=\"st-date__inconnue\" aria-hidden=\"true\">—</span>\n <span class=\"st-vh\">{{ dateInconnue() }}</span>\n}\n",
|
|
876
|
+
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{color:var(--st-couleur-texte);unicode-bidi:isolate}:host([data-variante=valeur][data-format=court]:not([data-inconnue])),:host([data-variante=valeur][data-format=date-heure]:not([data-inconnue])),:host([data-variante=valeur][data-format=heure]:not([data-inconnue])){font-variant-numeric:var(--st-chiffres-alignes)}:host([data-variante=meta]){font-weight:var(--st-graisse-semi)}.st-date__texte{white-space:nowrap}.st-date__fuseau{font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret);white-space:nowrap}.st-date__inconnue{font-family:var(--st-police-mono);color:var(--st-couleur-texte-discret)}\n"]
|
|
877
|
+
}]
|
|
878
|
+
}],
|
|
879
|
+
ctorParameters: () => [],
|
|
880
|
+
propDecorators: {
|
|
881
|
+
valeur: [{
|
|
882
|
+
type: i0.Input,
|
|
883
|
+
args: [{
|
|
884
|
+
isSignal: true,
|
|
885
|
+
alias: "valeur",
|
|
886
|
+
required: true
|
|
887
|
+
}]
|
|
888
|
+
}],
|
|
889
|
+
format: [{
|
|
890
|
+
type: i0.Input,
|
|
891
|
+
args: [{
|
|
892
|
+
isSignal: true,
|
|
893
|
+
alias: "format",
|
|
894
|
+
required: false
|
|
895
|
+
}]
|
|
896
|
+
}],
|
|
897
|
+
fuseau: [{
|
|
898
|
+
type: i0.Input,
|
|
899
|
+
args: [{
|
|
900
|
+
isSignal: true,
|
|
901
|
+
alias: "fuseau",
|
|
902
|
+
required: false
|
|
903
|
+
}]
|
|
904
|
+
}],
|
|
905
|
+
afficherLeFuseau: [{
|
|
906
|
+
type: i0.Input,
|
|
907
|
+
args: [{
|
|
908
|
+
isSignal: true,
|
|
909
|
+
alias: "afficherLeFuseau",
|
|
910
|
+
required: false
|
|
911
|
+
}]
|
|
912
|
+
}],
|
|
913
|
+
variante: [{
|
|
914
|
+
type: i0.Input,
|
|
915
|
+
args: [{
|
|
916
|
+
isSignal: true,
|
|
917
|
+
alias: "variante",
|
|
918
|
+
required: false
|
|
919
|
+
}]
|
|
920
|
+
}]
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
const MINUTE$1 = 6e4;
|
|
924
|
+
const JOUR = 1440 * MINUTE$1;
|
|
925
|
+
const ABSOLU_VISIBLE = {
|
|
926
|
+
dateStyle: "medium",
|
|
927
|
+
timeStyle: "short"
|
|
928
|
+
};
|
|
929
|
+
var StRelativeTime = class StRelativeTime {
|
|
930
|
+
locale = inject(ST_LOCALE);
|
|
931
|
+
libelles = inject(ST_LIBELLES);
|
|
932
|
+
fuseau = inject(FUSEAU_PAR_DEFAUT);
|
|
933
|
+
document = inject(DOCUMENT);
|
|
934
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
935
|
+
rafraichir = input(true, {
|
|
936
|
+
...ngDevMode ? { debugName: "rafraichir" } : /* istanbul ignore next */ {},
|
|
937
|
+
transform: booleanAttribute
|
|
938
|
+
});
|
|
939
|
+
ton = input("neutre", ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
940
|
+
avecAbsolu = input(false, {
|
|
941
|
+
...ngDevMode ? { debugName: "avecAbsolu" } : /* istanbul ignore next */ {},
|
|
942
|
+
transform: booleanAttribute
|
|
943
|
+
});
|
|
944
|
+
seuilAbsoluEnJours = input(7, {
|
|
945
|
+
...ngDevMode ? { debugName: "seuilAbsoluEnJours" } : /* istanbul ignore next */ {},
|
|
946
|
+
transform: numberAttribute
|
|
947
|
+
});
|
|
948
|
+
destruction = inject(DestroyRef);
|
|
949
|
+
maintenant = signal(Date.now(), ...ngDevMode ? [{ debugName: "maintenant" }] : /* istanbul ignore next */ []);
|
|
950
|
+
constructor() {
|
|
951
|
+
afterNextRender(() => {
|
|
952
|
+
if (!this.rafraichir()) return;
|
|
953
|
+
let minuterie = null;
|
|
954
|
+
const arreter = () => {
|
|
955
|
+
if (minuterie !== null) clearTimeout(minuterie);
|
|
956
|
+
minuterie = null;
|
|
957
|
+
};
|
|
958
|
+
const planifier = () => {
|
|
959
|
+
arreter();
|
|
960
|
+
if (this.document.hidden) return;
|
|
961
|
+
const cadence = Math.abs(Date.now() - this.dateEnMillisecondes()) < MINUTE$1 ? 1e4 : MINUTE$1;
|
|
962
|
+
minuterie = setTimeout(() => {
|
|
963
|
+
this.maintenant.set(Date.now());
|
|
964
|
+
planifier();
|
|
965
|
+
}, cadence);
|
|
966
|
+
};
|
|
967
|
+
const auChangementDeVisibilite = () => {
|
|
968
|
+
if (this.document.hidden) {
|
|
969
|
+
arreter();
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
this.maintenant.set(Date.now());
|
|
973
|
+
planifier();
|
|
974
|
+
};
|
|
975
|
+
this.document.addEventListener("visibilitychange", auChangementDeVisibilite);
|
|
976
|
+
planifier();
|
|
977
|
+
this.destruction.onDestroy(() => {
|
|
978
|
+
arreter();
|
|
979
|
+
this.document.removeEventListener("visibilitychange", auChangementDeVisibilite);
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
dateEnMillisecondes() {
|
|
984
|
+
const valeur = this.valeur();
|
|
985
|
+
if (valeur instanceof Date) return valeur.getTime();
|
|
986
|
+
return lireInstant(valeur, this.fuseau) ?? NaN;
|
|
987
|
+
}
|
|
988
|
+
estValide = computed(() => !Number.isNaN(this.dateEnMillisecondes()), ...ngDevMode ? [{ debugName: "estValide" }] : /* istanbul ignore next */ []);
|
|
989
|
+
iso = computed(() => this.estValide() ? new Date(this.dateEnMillisecondes()).toISOString() : null, ...ngDevMode ? [{ debugName: "iso" }] : /* istanbul ignore next */ []);
|
|
990
|
+
depasseLeSeuil = computed(() => {
|
|
991
|
+
return Math.abs(this.maintenant() - this.dateEnMillisecondes()) > this.seuilAbsoluEnJours() * JOUR;
|
|
992
|
+
}, ...ngDevMode ? [{ debugName: "depasseLeSeuil" }] : /* istanbul ignore next */ []);
|
|
993
|
+
texte = computed(() => {
|
|
994
|
+
if (!this.estValide()) return "";
|
|
995
|
+
const cible = this.dateEnMillisecondes();
|
|
996
|
+
if (this.depasseLeSeuil()) return new Intl.DateTimeFormat(this.locale(), {
|
|
997
|
+
day: "numeric",
|
|
998
|
+
month: "long",
|
|
999
|
+
year: "numeric",
|
|
1000
|
+
timeZone: this.fuseau
|
|
1001
|
+
}).format(new Date(cible));
|
|
1002
|
+
if (Math.abs(cible - this.maintenant()) < 1e4) return this.libelles().aLInstant;
|
|
1003
|
+
const style = this.avecAbsolu() ? "short" : "long";
|
|
1004
|
+
return ecartRelatif(cible, this.maintenant(), this.locale(), style);
|
|
1005
|
+
}, ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
1006
|
+
absoluVisible = computed(() => {
|
|
1007
|
+
if (!this.avecAbsolu() || !this.estValide() || this.depasseLeSeuil()) return null;
|
|
1008
|
+
return new Intl.DateTimeFormat(this.locale(), {
|
|
1009
|
+
...ABSOLU_VISIBLE,
|
|
1010
|
+
timeZone: this.fuseau
|
|
1011
|
+
}).format(new Date(this.dateEnMillisecondes()));
|
|
1012
|
+
}, ...ngDevMode ? [{ debugName: "absoluVisible" }] : /* istanbul ignore next */ []);
|
|
1013
|
+
texteAccessible = computed(() => {
|
|
1014
|
+
if (!this.estValide() || this.avecAbsolu()) return null;
|
|
1015
|
+
return new Intl.DateTimeFormat(this.locale(), {
|
|
1016
|
+
day: "numeric",
|
|
1017
|
+
month: "long",
|
|
1018
|
+
year: "numeric",
|
|
1019
|
+
hour: "2-digit",
|
|
1020
|
+
minute: "2-digit",
|
|
1021
|
+
timeZone: this.fuseau
|
|
1022
|
+
}).format(new Date(this.dateEnMillisecondes()));
|
|
1023
|
+
}, ...ngDevMode ? [{ debugName: "texteAccessible" }] : /* istanbul ignore next */ []);
|
|
1024
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1025
|
+
minVersion: "12.0.0",
|
|
1026
|
+
version: "22.2.0",
|
|
1027
|
+
ngImport: i0,
|
|
1028
|
+
type: StRelativeTime,
|
|
1029
|
+
deps: [],
|
|
1030
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1031
|
+
});
|
|
1032
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1033
|
+
minVersion: "17.0.0",
|
|
1034
|
+
version: "22.2.0",
|
|
1035
|
+
type: StRelativeTime,
|
|
1036
|
+
isStandalone: true,
|
|
1037
|
+
selector: "st-relative-time",
|
|
1038
|
+
inputs: {
|
|
1039
|
+
valeur: {
|
|
1040
|
+
classPropertyName: "valeur",
|
|
1041
|
+
publicName: "valeur",
|
|
1042
|
+
isSignal: true,
|
|
1043
|
+
isRequired: true,
|
|
1044
|
+
transformFunction: null
|
|
1045
|
+
},
|
|
1046
|
+
rafraichir: {
|
|
1047
|
+
classPropertyName: "rafraichir",
|
|
1048
|
+
publicName: "rafraichir",
|
|
1049
|
+
isSignal: true,
|
|
1050
|
+
isRequired: false,
|
|
1051
|
+
transformFunction: null
|
|
1052
|
+
},
|
|
1053
|
+
ton: {
|
|
1054
|
+
classPropertyName: "ton",
|
|
1055
|
+
publicName: "ton",
|
|
1056
|
+
isSignal: true,
|
|
1057
|
+
isRequired: false,
|
|
1058
|
+
transformFunction: null
|
|
1059
|
+
},
|
|
1060
|
+
avecAbsolu: {
|
|
1061
|
+
classPropertyName: "avecAbsolu",
|
|
1062
|
+
publicName: "avecAbsolu",
|
|
1063
|
+
isSignal: true,
|
|
1064
|
+
isRequired: false,
|
|
1065
|
+
transformFunction: null
|
|
1066
|
+
},
|
|
1067
|
+
seuilAbsoluEnJours: {
|
|
1068
|
+
classPropertyName: "seuilAbsoluEnJours",
|
|
1069
|
+
publicName: "seuilAbsoluEnJours",
|
|
1070
|
+
isSignal: true,
|
|
1071
|
+
isRequired: false,
|
|
1072
|
+
transformFunction: null
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
host: {
|
|
1076
|
+
properties: { "attr.data-ton": "ton()" },
|
|
1077
|
+
classAttribute: "st-relative-time"
|
|
1078
|
+
},
|
|
1079
|
+
ngImport: i0,
|
|
1080
|
+
template: "@if (estValide()) {\n <time [attr.datetime]=\"iso()\" [attr.aria-hidden]=\"texteAccessible() === null ? null : 'true'\">{{\n texte()\n }}</time>\n @if (absoluVisible(); as absolu) {\n {{ ' ' }}<span class=\"st-relative-time__absolu\">({{ absolu }})</span>\n }\n @if (texteAccessible(); as lu) {\n <!-- Rien quand l'absolu est a l'ecran : il se lit deja. -->\n <span class=\"st-vh\">{{ lu }}</span>\n }\n}\n",
|
|
1081
|
+
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{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte)}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte-primaire)}.st-relative-time__absolu{font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);letter-spacing:var(--st-interlettrage-capitales);white-space:nowrap;unicode-bidi:isolate}\n"],
|
|
1082
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1083
|
+
});
|
|
1084
|
+
};
|
|
1085
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1086
|
+
minVersion: "12.0.0",
|
|
1087
|
+
version: "22.2.0",
|
|
1088
|
+
ngImport: i0,
|
|
1089
|
+
type: StRelativeTime,
|
|
1090
|
+
decorators: [{
|
|
1091
|
+
type: Component,
|
|
1092
|
+
args: [{
|
|
1093
|
+
selector: "st-relative-time",
|
|
1094
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1095
|
+
host: {
|
|
1096
|
+
class: "st-relative-time",
|
|
1097
|
+
"[attr.data-ton]": "ton()"
|
|
1098
|
+
},
|
|
1099
|
+
template: "@if (estValide()) {\n <time [attr.datetime]=\"iso()\" [attr.aria-hidden]=\"texteAccessible() === null ? null : 'true'\">{{\n texte()\n }}</time>\n @if (absoluVisible(); as absolu) {\n {{ ' ' }}<span class=\"st-relative-time__absolu\">({{ absolu }})</span>\n }\n @if (texteAccessible(); as lu) {\n <!-- Rien quand l'absolu est a l'ecran : il se lit deja. -->\n <span class=\"st-vh\">{{ lu }}</span>\n }\n}\n",
|
|
1100
|
+
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{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte)}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte-primaire)}.st-relative-time__absolu{font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);letter-spacing:var(--st-interlettrage-capitales);white-space:nowrap;unicode-bidi:isolate}\n"]
|
|
1101
|
+
}]
|
|
1102
|
+
}],
|
|
1103
|
+
ctorParameters: () => [],
|
|
1104
|
+
propDecorators: {
|
|
1105
|
+
valeur: [{
|
|
1106
|
+
type: i0.Input,
|
|
1107
|
+
args: [{
|
|
1108
|
+
isSignal: true,
|
|
1109
|
+
alias: "valeur",
|
|
1110
|
+
required: true
|
|
1111
|
+
}]
|
|
1112
|
+
}],
|
|
1113
|
+
rafraichir: [{
|
|
1114
|
+
type: i0.Input,
|
|
1115
|
+
args: [{
|
|
1116
|
+
isSignal: true,
|
|
1117
|
+
alias: "rafraichir",
|
|
1118
|
+
required: false
|
|
1119
|
+
}]
|
|
1120
|
+
}],
|
|
1121
|
+
ton: [{
|
|
1122
|
+
type: i0.Input,
|
|
1123
|
+
args: [{
|
|
1124
|
+
isSignal: true,
|
|
1125
|
+
alias: "ton",
|
|
1126
|
+
required: false
|
|
1127
|
+
}]
|
|
1128
|
+
}],
|
|
1129
|
+
avecAbsolu: [{
|
|
1130
|
+
type: i0.Input,
|
|
1131
|
+
args: [{
|
|
1132
|
+
isSignal: true,
|
|
1133
|
+
alias: "avecAbsolu",
|
|
1134
|
+
required: false
|
|
1135
|
+
}]
|
|
1136
|
+
}],
|
|
1137
|
+
seuilAbsoluEnJours: [{
|
|
1138
|
+
type: i0.Input,
|
|
1139
|
+
args: [{
|
|
1140
|
+
isSignal: true,
|
|
1141
|
+
alias: "seuilAbsoluEnJours",
|
|
1142
|
+
required: false
|
|
1143
|
+
}]
|
|
1144
|
+
}]
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
function seuilDAbreviation(valeur) {
|
|
1148
|
+
if (valeur === null || valeur === void 0 || valeur === "null") return null;
|
|
1149
|
+
const nombre = Number(valeur);
|
|
1150
|
+
return Number.isFinite(nombre) ? nombre : null;
|
|
1151
|
+
}
|
|
1152
|
+
var StCount = class StCount {
|
|
1153
|
+
locale = inject(ST_LOCALE);
|
|
1154
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
1155
|
+
ton = input("neutre", ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
1156
|
+
unite = input(null, ...ngDevMode ? [{ debugName: "unite" }] : /* istanbul ignore next */ []);
|
|
1157
|
+
abregerAuDela = input(1e3, {
|
|
1158
|
+
...ngDevMode ? { debugName: "abregerAuDela" } : /* istanbul ignore next */ {},
|
|
1159
|
+
transform: seuilDAbreviation
|
|
1160
|
+
});
|
|
1161
|
+
absolu = computed(() => {
|
|
1162
|
+
const valeur = this.valeur();
|
|
1163
|
+
return typeof valeur === "bigint" ? valeur < 0n ? -valeur : valeur : Math.abs(valeur);
|
|
1164
|
+
}, ...ngDevMode ? [{ debugName: "absolu" }] : /* istanbul ignore next */ []);
|
|
1165
|
+
estAbrege = computed(() => {
|
|
1166
|
+
const seuil = this.abregerAuDela();
|
|
1167
|
+
return seuil !== null && this.absolu() >= seuil;
|
|
1168
|
+
}, ...ngDevMode ? [{ debugName: "estAbrege" }] : /* istanbul ignore next */ []);
|
|
1169
|
+
optionsDUnite = computed(() => {
|
|
1170
|
+
const unite = this.unite();
|
|
1171
|
+
return unite === null ? {} : {
|
|
1172
|
+
style: "unit",
|
|
1173
|
+
unit: unite,
|
|
1174
|
+
unitDisplay: "short"
|
|
1175
|
+
};
|
|
1176
|
+
}, ...ngDevMode ? [{ debugName: "optionsDUnite" }] : /* istanbul ignore next */ []);
|
|
1177
|
+
texteComplet = computed(() => new Intl.NumberFormat(this.locale(), this.optionsDUnite()).format(this.valeur()), ...ngDevMode ? [{ debugName: "texteComplet" }] : /* istanbul ignore next */ []);
|
|
1178
|
+
texte = computed(() => {
|
|
1179
|
+
if (!this.estAbrege()) return this.texteComplet();
|
|
1180
|
+
return new Intl.NumberFormat(this.locale(), {
|
|
1181
|
+
...this.optionsDUnite(),
|
|
1182
|
+
notation: "compact",
|
|
1183
|
+
maximumFractionDigits: 1
|
|
1184
|
+
}).format(this.valeur());
|
|
1185
|
+
}, ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
1186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1187
|
+
minVersion: "12.0.0",
|
|
1188
|
+
version: "22.2.0",
|
|
1189
|
+
ngImport: i0,
|
|
1190
|
+
type: StCount,
|
|
1191
|
+
deps: [],
|
|
1192
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1193
|
+
});
|
|
1194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1195
|
+
minVersion: "17.0.0",
|
|
1196
|
+
version: "22.2.0",
|
|
1197
|
+
type: StCount,
|
|
1198
|
+
isStandalone: true,
|
|
1199
|
+
selector: "st-count",
|
|
1200
|
+
inputs: {
|
|
1201
|
+
valeur: {
|
|
1202
|
+
classPropertyName: "valeur",
|
|
1203
|
+
publicName: "valeur",
|
|
1204
|
+
isSignal: true,
|
|
1205
|
+
isRequired: true,
|
|
1206
|
+
transformFunction: null
|
|
1207
|
+
},
|
|
1208
|
+
ton: {
|
|
1209
|
+
classPropertyName: "ton",
|
|
1210
|
+
publicName: "ton",
|
|
1211
|
+
isSignal: true,
|
|
1212
|
+
isRequired: false,
|
|
1213
|
+
transformFunction: null
|
|
1214
|
+
},
|
|
1215
|
+
unite: {
|
|
1216
|
+
classPropertyName: "unite",
|
|
1217
|
+
publicName: "unite",
|
|
1218
|
+
isSignal: true,
|
|
1219
|
+
isRequired: false,
|
|
1220
|
+
transformFunction: null
|
|
1221
|
+
},
|
|
1222
|
+
abregerAuDela: {
|
|
1223
|
+
classPropertyName: "abregerAuDela",
|
|
1224
|
+
publicName: "abregerAuDela",
|
|
1225
|
+
isSignal: true,
|
|
1226
|
+
isRequired: false,
|
|
1227
|
+
transformFunction: null
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
host: {
|
|
1231
|
+
properties: { "attr.data-ton": "ton()" },
|
|
1232
|
+
classAttribute: "st-count"
|
|
1233
|
+
},
|
|
1234
|
+
ngImport: i0,
|
|
1235
|
+
template: "@if (estAbrege()) {\n <span aria-hidden=\"true\">{{ texte() }}</span>\n <!-- Abrege a l'ecran, entier a l'oral : « 1,2 k » ne se lit pas. -->\n <span class=\"st-vh\">{{ texteComplet() }}</span>\n} @else {\n <span>{{ texte() }}</span>\n}\n",
|
|
1236
|
+
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{font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte);white-space:nowrap;unicode-bidi:isolate}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){color:var(--st-couleur-texte-primaire)}\n"],
|
|
1237
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1238
|
+
});
|
|
1239
|
+
};
|
|
1240
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1241
|
+
minVersion: "12.0.0",
|
|
1242
|
+
version: "22.2.0",
|
|
1243
|
+
ngImport: i0,
|
|
1244
|
+
type: StCount,
|
|
1245
|
+
decorators: [{
|
|
1246
|
+
type: Component,
|
|
1247
|
+
args: [{
|
|
1248
|
+
selector: "st-count",
|
|
1249
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1250
|
+
host: {
|
|
1251
|
+
class: "st-count",
|
|
1252
|
+
"[attr.data-ton]": "ton()"
|
|
1253
|
+
},
|
|
1254
|
+
template: "@if (estAbrege()) {\n <span aria-hidden=\"true\">{{ texte() }}</span>\n <!-- Abrege a l'ecran, entier a l'oral : « 1,2 k » ne se lit pas. -->\n <span class=\"st-vh\">{{ texteComplet() }}</span>\n} @else {\n <span>{{ texte() }}</span>\n}\n",
|
|
1255
|
+
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{font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte);white-space:nowrap;unicode-bidi:isolate}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){color:var(--st-couleur-texte-primaire)}\n"]
|
|
1256
|
+
}]
|
|
1257
|
+
}],
|
|
1258
|
+
propDecorators: {
|
|
1259
|
+
valeur: [{
|
|
1260
|
+
type: i0.Input,
|
|
1261
|
+
args: [{
|
|
1262
|
+
isSignal: true,
|
|
1263
|
+
alias: "valeur",
|
|
1264
|
+
required: true
|
|
1265
|
+
}]
|
|
1266
|
+
}],
|
|
1267
|
+
ton: [{
|
|
1268
|
+
type: i0.Input,
|
|
1269
|
+
args: [{
|
|
1270
|
+
isSignal: true,
|
|
1271
|
+
alias: "ton",
|
|
1272
|
+
required: false
|
|
1273
|
+
}]
|
|
1274
|
+
}],
|
|
1275
|
+
unite: [{
|
|
1276
|
+
type: i0.Input,
|
|
1277
|
+
args: [{
|
|
1278
|
+
isSignal: true,
|
|
1279
|
+
alias: "unite",
|
|
1280
|
+
required: false
|
|
1281
|
+
}]
|
|
1282
|
+
}],
|
|
1283
|
+
abregerAuDela: [{
|
|
1284
|
+
type: i0.Input,
|
|
1285
|
+
args: [{
|
|
1286
|
+
isSignal: true,
|
|
1287
|
+
alias: "abregerAuDela",
|
|
1288
|
+
required: false
|
|
1289
|
+
}]
|
|
1290
|
+
}]
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
const SIGNE_MOINS = "−";
|
|
1294
|
+
var StNumber = class StNumber {
|
|
1295
|
+
locale = inject(ST_LOCALE);
|
|
1296
|
+
libelles = inject(ST_LIBELLES);
|
|
1297
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
1298
|
+
format = input("decimal", ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
1299
|
+
decimales = input({
|
|
1300
|
+
min: 0,
|
|
1301
|
+
max: 2
|
|
1302
|
+
}, ...ngDevMode ? [{ debugName: "decimales" }] : /* istanbul ignore next */ []);
|
|
1303
|
+
unite = input(null, ...ngDevMode ? [{ debugName: "unite" }] : /* istanbul ignore next */ []);
|
|
1304
|
+
signeExplicite = input(false, {
|
|
1305
|
+
...ngDevMode ? { debugName: "signeExplicite" } : /* istanbul ignore next */ {},
|
|
1306
|
+
transform: booleanAttribute
|
|
1307
|
+
});
|
|
1308
|
+
variation = input(false, {
|
|
1309
|
+
...ngDevMode ? { debugName: "variation" } : /* istanbul ignore next */ {},
|
|
1310
|
+
transform: booleanAttribute
|
|
1311
|
+
});
|
|
1312
|
+
ton = input(null, ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
1313
|
+
lue = computed(() => {
|
|
1314
|
+
const valeur = this.valeur();
|
|
1315
|
+
return valeur === 0 ? 0 : valeur;
|
|
1316
|
+
}, ...ngDevMode ? [{ debugName: "lue" }] : /* istanbul ignore next */ []);
|
|
1317
|
+
signe = computed(() => {
|
|
1318
|
+
const valeur = this.lue();
|
|
1319
|
+
if (valeur < 0) return "negatif";
|
|
1320
|
+
return valeur > 0 ? "positif" : "nul";
|
|
1321
|
+
}, ...ngDevMode ? [{ debugName: "signe" }] : /* istanbul ignore next */ []);
|
|
1322
|
+
options = computed(() => {
|
|
1323
|
+
const decimales = this.decimales();
|
|
1324
|
+
const min = borner(typeof decimales === "number" ? decimales : decimales.min);
|
|
1325
|
+
const base = {
|
|
1326
|
+
minimumFractionDigits: min,
|
|
1327
|
+
maximumFractionDigits: Math.max(min, borner(typeof decimales === "number" ? decimales : decimales.max)),
|
|
1328
|
+
signDisplay: this.signeExplicite() ? "exceptZero" : "negative"
|
|
1329
|
+
};
|
|
1330
|
+
const format = this.format();
|
|
1331
|
+
const unite = this.unite();
|
|
1332
|
+
if (format === "pourcentage") return {
|
|
1333
|
+
...base,
|
|
1334
|
+
style: "unit",
|
|
1335
|
+
unit: "percent"
|
|
1336
|
+
};
|
|
1337
|
+
if (format === "unite" && unite !== null) return {
|
|
1338
|
+
...base,
|
|
1339
|
+
style: "unit",
|
|
1340
|
+
unit: unite,
|
|
1341
|
+
unitDisplay: "short"
|
|
1342
|
+
};
|
|
1343
|
+
return base;
|
|
1344
|
+
}, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
1345
|
+
texte = computed(() => this.formater(this.lue(), this.options()), ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
1346
|
+
texteLu = computed(() => {
|
|
1347
|
+
const options = this.options();
|
|
1348
|
+
const abrege = options.unitDisplay === "short";
|
|
1349
|
+
const negatif = this.signe() === "negatif";
|
|
1350
|
+
if (!abrege && !negatif) return null;
|
|
1351
|
+
const valeur = this.lue();
|
|
1352
|
+
const absolu = typeof valeur === "bigint" ? valeur < 0n ? -valeur : valeur : Math.abs(valeur);
|
|
1353
|
+
const lu = this.formater(absolu, {
|
|
1354
|
+
...options,
|
|
1355
|
+
...abrege ? { unitDisplay: "long" } : {},
|
|
1356
|
+
signDisplay: negatif ? "never" : options.signDisplay
|
|
1357
|
+
});
|
|
1358
|
+
if (negatif) return this.libelles().montantNegatif(lu);
|
|
1359
|
+
return lu === this.texte() ? null : lu;
|
|
1360
|
+
}, ...ngDevMode ? [{ debugName: "texteLu" }] : /* istanbul ignore next */ []);
|
|
1361
|
+
valeurMachine = computed(() => String(this.lue()), ...ngDevMode ? [{ debugName: "valeurMachine" }] : /* istanbul ignore next */ []);
|
|
1362
|
+
formater(valeur, options) {
|
|
1363
|
+
return new Intl.NumberFormat(this.locale(), options).formatToParts(valeur).map((partie) => partie.type === "minusSign" ? SIGNE_MOINS : partie.value).join("");
|
|
1364
|
+
}
|
|
1365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1366
|
+
minVersion: "12.0.0",
|
|
1367
|
+
version: "22.2.0",
|
|
1368
|
+
ngImport: i0,
|
|
1369
|
+
type: StNumber,
|
|
1370
|
+
deps: [],
|
|
1371
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1372
|
+
});
|
|
1373
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1374
|
+
minVersion: "17.0.0",
|
|
1375
|
+
version: "22.2.0",
|
|
1376
|
+
type: StNumber,
|
|
1377
|
+
isStandalone: true,
|
|
1378
|
+
selector: "st-number",
|
|
1379
|
+
inputs: {
|
|
1380
|
+
valeur: {
|
|
1381
|
+
classPropertyName: "valeur",
|
|
1382
|
+
publicName: "valeur",
|
|
1383
|
+
isSignal: true,
|
|
1384
|
+
isRequired: true,
|
|
1385
|
+
transformFunction: null
|
|
1386
|
+
},
|
|
1387
|
+
format: {
|
|
1388
|
+
classPropertyName: "format",
|
|
1389
|
+
publicName: "format",
|
|
1390
|
+
isSignal: true,
|
|
1391
|
+
isRequired: false,
|
|
1392
|
+
transformFunction: null
|
|
1393
|
+
},
|
|
1394
|
+
decimales: {
|
|
1395
|
+
classPropertyName: "decimales",
|
|
1396
|
+
publicName: "decimales",
|
|
1397
|
+
isSignal: true,
|
|
1398
|
+
isRequired: false,
|
|
1399
|
+
transformFunction: null
|
|
1400
|
+
},
|
|
1401
|
+
unite: {
|
|
1402
|
+
classPropertyName: "unite",
|
|
1403
|
+
publicName: "unite",
|
|
1404
|
+
isSignal: true,
|
|
1405
|
+
isRequired: false,
|
|
1406
|
+
transformFunction: null
|
|
1407
|
+
},
|
|
1408
|
+
signeExplicite: {
|
|
1409
|
+
classPropertyName: "signeExplicite",
|
|
1410
|
+
publicName: "signeExplicite",
|
|
1411
|
+
isSignal: true,
|
|
1412
|
+
isRequired: false,
|
|
1413
|
+
transformFunction: null
|
|
1414
|
+
},
|
|
1415
|
+
variation: {
|
|
1416
|
+
classPropertyName: "variation",
|
|
1417
|
+
publicName: "variation",
|
|
1418
|
+
isSignal: true,
|
|
1419
|
+
isRequired: false,
|
|
1420
|
+
transformFunction: null
|
|
1421
|
+
},
|
|
1422
|
+
ton: {
|
|
1423
|
+
classPropertyName: "ton",
|
|
1424
|
+
publicName: "ton",
|
|
1425
|
+
isSignal: true,
|
|
1426
|
+
isRequired: false,
|
|
1427
|
+
transformFunction: null
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
host: {
|
|
1431
|
+
attributes: { "dir": "auto" },
|
|
1432
|
+
properties: {
|
|
1433
|
+
"attr.data-ton": "ton()",
|
|
1434
|
+
"attr.data-signe": "signe()",
|
|
1435
|
+
"attr.data-variation": "variation() ? \"\" : null"
|
|
1436
|
+
},
|
|
1437
|
+
classAttribute: "st-number"
|
|
1438
|
+
},
|
|
1439
|
+
ngImport: i0,
|
|
1440
|
+
template: "@if (texteLu(); as lu) {\n <!-- « 250 ko » a l'ecran, « 250 kilooctets » a l'oral : l'abreviation ne se prononce pas. -->\n <data class=\"st-number__valeur\" [attr.value]=\"valeurMachine()\" aria-hidden=\"true\">{{\n texte()\n }}</data>\n <span class=\"st-vh\">{{ lu }}</span>\n} @else {\n <data class=\"st-number__valeur\" [attr.value]=\"valeurMachine()\">{{ texte() }}</data>\n}\n",
|
|
1441
|
+
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{font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte);white-space:nowrap;unicode-bidi:isolate}:host([data-variation][data-signe=positif]:not([data-ton])){color:var(--st-couleur-positif)}:host([data-variation][data-signe=negatif]:not([data-ton])){color:var(--st-couleur-negatif)}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){color:var(--st-couleur-texte-primaire)}:host([data-ton=succes]){color:var(--st-couleur-succes)}:host([data-ton=danger]){color:var(--st-couleur-danger)}\n"],
|
|
1442
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1443
|
+
});
|
|
1444
|
+
};
|
|
1445
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1446
|
+
minVersion: "12.0.0",
|
|
1447
|
+
version: "22.2.0",
|
|
1448
|
+
ngImport: i0,
|
|
1449
|
+
type: StNumber,
|
|
1450
|
+
decorators: [{
|
|
1451
|
+
type: Component,
|
|
1452
|
+
args: [{
|
|
1453
|
+
selector: "st-number",
|
|
1454
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1455
|
+
host: {
|
|
1456
|
+
class: "st-number",
|
|
1457
|
+
dir: "auto",
|
|
1458
|
+
"[attr.data-ton]": "ton()",
|
|
1459
|
+
"[attr.data-signe]": "signe()",
|
|
1460
|
+
"[attr.data-variation]": "variation() ? \"\" : null"
|
|
1461
|
+
},
|
|
1462
|
+
template: "@if (texteLu(); as lu) {\n <!-- « 250 ko » a l'ecran, « 250 kilooctets » a l'oral : l'abreviation ne se prononce pas. -->\n <data class=\"st-number__valeur\" [attr.value]=\"valeurMachine()\" aria-hidden=\"true\">{{\n texte()\n }}</data>\n <span class=\"st-vh\">{{ lu }}</span>\n} @else {\n <data class=\"st-number__valeur\" [attr.value]=\"valeurMachine()\">{{ texte() }}</data>\n}\n",
|
|
1463
|
+
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{font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte);white-space:nowrap;unicode-bidi:isolate}:host([data-variation][data-signe=positif]:not([data-ton])){color:var(--st-couleur-positif)}:host([data-variation][data-signe=negatif]:not([data-ton])){color:var(--st-couleur-negatif)}:host([data-ton=discret]){color:var(--st-couleur-texte-discret)}:host([data-ton=primaire]){color:var(--st-couleur-texte-primaire)}:host([data-ton=succes]){color:var(--st-couleur-succes)}:host([data-ton=danger]){color:var(--st-couleur-danger)}\n"]
|
|
1464
|
+
}]
|
|
1465
|
+
}],
|
|
1466
|
+
propDecorators: {
|
|
1467
|
+
valeur: [{
|
|
1468
|
+
type: i0.Input,
|
|
1469
|
+
args: [{
|
|
1470
|
+
isSignal: true,
|
|
1471
|
+
alias: "valeur",
|
|
1472
|
+
required: true
|
|
1473
|
+
}]
|
|
1474
|
+
}],
|
|
1475
|
+
format: [{
|
|
1476
|
+
type: i0.Input,
|
|
1477
|
+
args: [{
|
|
1478
|
+
isSignal: true,
|
|
1479
|
+
alias: "format",
|
|
1480
|
+
required: false
|
|
1481
|
+
}]
|
|
1482
|
+
}],
|
|
1483
|
+
decimales: [{
|
|
1484
|
+
type: i0.Input,
|
|
1485
|
+
args: [{
|
|
1486
|
+
isSignal: true,
|
|
1487
|
+
alias: "decimales",
|
|
1488
|
+
required: false
|
|
1489
|
+
}]
|
|
1490
|
+
}],
|
|
1491
|
+
unite: [{
|
|
1492
|
+
type: i0.Input,
|
|
1493
|
+
args: [{
|
|
1494
|
+
isSignal: true,
|
|
1495
|
+
alias: "unite",
|
|
1496
|
+
required: false
|
|
1497
|
+
}]
|
|
1498
|
+
}],
|
|
1499
|
+
signeExplicite: [{
|
|
1500
|
+
type: i0.Input,
|
|
1501
|
+
args: [{
|
|
1502
|
+
isSignal: true,
|
|
1503
|
+
alias: "signeExplicite",
|
|
1504
|
+
required: false
|
|
1505
|
+
}]
|
|
1506
|
+
}],
|
|
1507
|
+
variation: [{
|
|
1508
|
+
type: i0.Input,
|
|
1509
|
+
args: [{
|
|
1510
|
+
isSignal: true,
|
|
1511
|
+
alias: "variation",
|
|
1512
|
+
required: false
|
|
1513
|
+
}]
|
|
1514
|
+
}],
|
|
1515
|
+
ton: [{
|
|
1516
|
+
type: i0.Input,
|
|
1517
|
+
args: [{
|
|
1518
|
+
isSignal: true,
|
|
1519
|
+
alias: "ton",
|
|
1520
|
+
required: false
|
|
1521
|
+
}]
|
|
1522
|
+
}]
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
function borner(decimales) {
|
|
1526
|
+
return Number.isFinite(decimales) ? Math.min(100, Math.max(0, Math.trunc(decimales))) : 0;
|
|
1527
|
+
}
|
|
1528
|
+
const PARTIES = [
|
|
1529
|
+
[
|
|
1530
|
+
"annees",
|
|
1531
|
+
"years",
|
|
1532
|
+
"year"
|
|
1533
|
+
],
|
|
1534
|
+
[
|
|
1535
|
+
"mois",
|
|
1536
|
+
"months",
|
|
1537
|
+
"month"
|
|
1538
|
+
],
|
|
1539
|
+
[
|
|
1540
|
+
"semaines",
|
|
1541
|
+
"weeks",
|
|
1542
|
+
"week"
|
|
1543
|
+
],
|
|
1544
|
+
[
|
|
1545
|
+
"jours",
|
|
1546
|
+
"days",
|
|
1547
|
+
"day"
|
|
1548
|
+
],
|
|
1549
|
+
[
|
|
1550
|
+
"heures",
|
|
1551
|
+
"hours",
|
|
1552
|
+
"hour"
|
|
1553
|
+
],
|
|
1554
|
+
[
|
|
1555
|
+
"minutes",
|
|
1556
|
+
"minutes",
|
|
1557
|
+
"minute"
|
|
1558
|
+
],
|
|
1559
|
+
[
|
|
1560
|
+
"secondes",
|
|
1561
|
+
"seconds",
|
|
1562
|
+
"second"
|
|
1563
|
+
]
|
|
1564
|
+
];
|
|
1565
|
+
var StDuration = class StDuration {
|
|
1566
|
+
locale = inject(ST_LOCALE);
|
|
1567
|
+
secondes = input(null, ...ngDevMode ? [{ debugName: "secondes" }] : /* istanbul ignore next */ []);
|
|
1568
|
+
parties = input(null, ...ngDevMode ? [{ debugName: "parties" }] : /* istanbul ignore next */ []);
|
|
1569
|
+
format = input("court", ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
1570
|
+
totalEnSecondes = computed(() => {
|
|
1571
|
+
const secondes = this.secondes();
|
|
1572
|
+
return secondes === null || !Number.isFinite(secondes) ? null : Math.max(0, Math.round(secondes));
|
|
1573
|
+
}, ...ngDevMode ? [{ debugName: "totalEnSecondes" }] : /* istanbul ignore next */ []);
|
|
1574
|
+
partiesLues = computed(() => {
|
|
1575
|
+
const total = this.totalEnSecondes();
|
|
1576
|
+
if (total === null) return this.parties() ?? {};
|
|
1577
|
+
return {
|
|
1578
|
+
jours: Math.floor(total / 86400),
|
|
1579
|
+
heures: Math.floor(total % 86400 / 3600),
|
|
1580
|
+
minutes: Math.floor(total % 3600 / 60),
|
|
1581
|
+
secondes: total % 60
|
|
1582
|
+
};
|
|
1583
|
+
}, ...ngDevMode ? [{ debugName: "partiesLues" }] : /* istanbul ignore next */ []);
|
|
1584
|
+
texte = computed(() => formater(this.partiesLues(), this.locale(), this.format() === "long" ? "long" : "short"), ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
1585
|
+
texteLu = computed(() => {
|
|
1586
|
+
if (this.format() === "long") return null;
|
|
1587
|
+
const long = formater(this.partiesLues(), this.locale(), "long");
|
|
1588
|
+
return long === this.texte() ? null : long;
|
|
1589
|
+
}, ...ngDevMode ? [{ debugName: "texteLu" }] : /* istanbul ignore next */ []);
|
|
1590
|
+
valeurMachine = computed(() => {
|
|
1591
|
+
const total = this.totalEnSecondes();
|
|
1592
|
+
return total === null ? null : `PT${String(total)}S`;
|
|
1593
|
+
}, ...ngDevMode ? [{ debugName: "valeurMachine" }] : /* istanbul ignore next */ []);
|
|
1594
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1595
|
+
minVersion: "12.0.0",
|
|
1596
|
+
version: "22.2.0",
|
|
1597
|
+
ngImport: i0,
|
|
1598
|
+
type: StDuration,
|
|
1599
|
+
deps: [],
|
|
1600
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1601
|
+
});
|
|
1602
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1603
|
+
minVersion: "17.0.0",
|
|
1604
|
+
version: "22.2.0",
|
|
1605
|
+
type: StDuration,
|
|
1606
|
+
isStandalone: true,
|
|
1607
|
+
selector: "st-duration",
|
|
1608
|
+
inputs: {
|
|
1609
|
+
secondes: {
|
|
1610
|
+
classPropertyName: "secondes",
|
|
1611
|
+
publicName: "secondes",
|
|
1612
|
+
isSignal: true,
|
|
1613
|
+
isRequired: false,
|
|
1614
|
+
transformFunction: null
|
|
1615
|
+
},
|
|
1616
|
+
parties: {
|
|
1617
|
+
classPropertyName: "parties",
|
|
1618
|
+
publicName: "parties",
|
|
1619
|
+
isSignal: true,
|
|
1620
|
+
isRequired: false,
|
|
1621
|
+
transformFunction: null
|
|
1622
|
+
},
|
|
1623
|
+
format: {
|
|
1624
|
+
classPropertyName: "format",
|
|
1625
|
+
publicName: "format",
|
|
1626
|
+
isSignal: true,
|
|
1627
|
+
isRequired: false,
|
|
1628
|
+
transformFunction: null
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
host: {
|
|
1632
|
+
attributes: { "dir": "auto" },
|
|
1633
|
+
classAttribute: "st-duration"
|
|
1634
|
+
},
|
|
1635
|
+
ngImport: i0,
|
|
1636
|
+
template: "@if (valeurMachine(); as machine) {\n <time\n class=\"st-duration__valeur\"\n [attr.datetime]=\"machine\"\n [attr.aria-hidden]=\"texteLu() === null ? null : 'true'\"\n >{{ texte() }}</time\n >\n} @else {\n <span class=\"st-duration__valeur\" [attr.aria-hidden]=\"texteLu() === null ? null : 'true'\">{{\n texte()\n }}</span>\n}\n@if (texteLu(); as lu) {\n <!-- « 1 h et 30 min » a l'ecran, « 1 heure et 30 minutes » a l'oral. -->\n <span class=\"st-vh\">{{ lu }}</span>\n}\n",
|
|
1637
|
+
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{font-variant-numeric:var(--st-chiffres-alignes);white-space:nowrap;unicode-bidi:isolate}\n"],
|
|
1638
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1639
|
+
});
|
|
1640
|
+
};
|
|
1641
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1642
|
+
minVersion: "12.0.0",
|
|
1643
|
+
version: "22.2.0",
|
|
1644
|
+
ngImport: i0,
|
|
1645
|
+
type: StDuration,
|
|
1646
|
+
decorators: [{
|
|
1647
|
+
type: Component,
|
|
1648
|
+
args: [{
|
|
1649
|
+
selector: "st-duration",
|
|
1650
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1651
|
+
host: {
|
|
1652
|
+
class: "st-duration",
|
|
1653
|
+
dir: "auto"
|
|
1654
|
+
},
|
|
1655
|
+
template: "@if (valeurMachine(); as machine) {\n <time\n class=\"st-duration__valeur\"\n [attr.datetime]=\"machine\"\n [attr.aria-hidden]=\"texteLu() === null ? null : 'true'\"\n >{{ texte() }}</time\n >\n} @else {\n <span class=\"st-duration__valeur\" [attr.aria-hidden]=\"texteLu() === null ? null : 'true'\">{{\n texte()\n }}</span>\n}\n@if (texteLu(); as lu) {\n <!-- « 1 h et 30 min » a l'ecran, « 1 heure et 30 minutes » a l'oral. -->\n <span class=\"st-vh\">{{ lu }}</span>\n}\n",
|
|
1656
|
+
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{font-variant-numeric:var(--st-chiffres-alignes);white-space:nowrap;unicode-bidi:isolate}\n"]
|
|
1657
|
+
}]
|
|
1658
|
+
}],
|
|
1659
|
+
propDecorators: {
|
|
1660
|
+
secondes: [{
|
|
1661
|
+
type: i0.Input,
|
|
1662
|
+
args: [{
|
|
1663
|
+
isSignal: true,
|
|
1664
|
+
alias: "secondes",
|
|
1665
|
+
required: false
|
|
1666
|
+
}]
|
|
1667
|
+
}],
|
|
1668
|
+
parties: [{
|
|
1669
|
+
type: i0.Input,
|
|
1670
|
+
args: [{
|
|
1671
|
+
isSignal: true,
|
|
1672
|
+
alias: "parties",
|
|
1673
|
+
required: false
|
|
1674
|
+
}]
|
|
1675
|
+
}],
|
|
1676
|
+
format: [{
|
|
1677
|
+
type: i0.Input,
|
|
1678
|
+
args: [{
|
|
1679
|
+
isSignal: true,
|
|
1680
|
+
alias: "format",
|
|
1681
|
+
required: false
|
|
1682
|
+
}]
|
|
1683
|
+
}]
|
|
1684
|
+
}
|
|
1685
|
+
});
|
|
1686
|
+
function formater(parties, locale, style) {
|
|
1687
|
+
const presentes = PARTIES.flatMap(([cle, cleIntl, unite]) => {
|
|
1688
|
+
const valeur = parties[cle];
|
|
1689
|
+
return valeur === void 0 || valeur === 0 || !Number.isFinite(valeur) ? [] : [{
|
|
1690
|
+
cleIntl,
|
|
1691
|
+
unite,
|
|
1692
|
+
valeur
|
|
1693
|
+
}];
|
|
1694
|
+
});
|
|
1695
|
+
if (presentes.length === 0) presentes.push({
|
|
1696
|
+
cleIntl: "seconds",
|
|
1697
|
+
unite: "second",
|
|
1698
|
+
valeur: 0
|
|
1699
|
+
});
|
|
1700
|
+
const Format = Intl.DurationFormat;
|
|
1701
|
+
if (Format !== void 0 && presentes.some(({ valeur }) => valeur !== 0)) return new Format(locale, { style }).format(Object.fromEntries(presentes.map(({ cleIntl, valeur }) => [cleIntl, valeur])));
|
|
1702
|
+
return new Intl.ListFormat(locale, {
|
|
1703
|
+
type: "unit",
|
|
1704
|
+
style
|
|
1705
|
+
}).format(presentes.map(({ unite, valeur }) => new Intl.NumberFormat(locale, {
|
|
1706
|
+
style: "unit",
|
|
1707
|
+
unit: unite,
|
|
1708
|
+
unitDisplay: style
|
|
1709
|
+
}).format(valeur)));
|
|
1710
|
+
}
|
|
1711
|
+
const ICONE_DE_TENDANCE = {
|
|
1712
|
+
hausse: "triangle-haut",
|
|
1713
|
+
baisse: "triangle-bas",
|
|
1714
|
+
stable: "moins"
|
|
1715
|
+
};
|
|
1716
|
+
var StStat = class StStat {
|
|
1717
|
+
libelles = inject(ST_LIBELLES);
|
|
1718
|
+
element = inject(ElementRef).nativeElement;
|
|
1719
|
+
libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
1720
|
+
icone = input(null, ...ngDevMode ? [{ debugName: "icone" }] : /* istanbul ignore next */ []);
|
|
1721
|
+
tendance = input(null, ...ngDevMode ? [{ debugName: "tendance" }] : /* istanbul ignore next */ []);
|
|
1722
|
+
precision = input(null, ...ngDevMode ? [{ debugName: "precision" }] : /* istanbul ignore next */ []);
|
|
1723
|
+
identifiantDuLibelle = inject(StIdentifiants).prochain("st-stat-libelle");
|
|
1724
|
+
role = partagerLaValeur(this.element, "role", () => this.role.deLAppelant() === null ? "group" : null);
|
|
1725
|
+
nommePar = partagerLaValeur(this.element, "aria-labelledby", () => this.nommePar.deLAppelant() === null ? this.identifiantDuLibelle : null);
|
|
1726
|
+
constructor() {
|
|
1727
|
+
const destruction = inject(DestroyRef);
|
|
1728
|
+
destruction.onDestroy(this.role.liberer);
|
|
1729
|
+
destruction.onDestroy(this.nommePar.liberer);
|
|
1730
|
+
}
|
|
1731
|
+
iconeDeTendance = computed(() => {
|
|
1732
|
+
const tendance = this.tendance();
|
|
1733
|
+
if (tendance === null) return null;
|
|
1734
|
+
return tendance.icone ?? (tendance.sens === void 0 ? null : ICONE_DE_TENDANCE[tendance.sens]);
|
|
1735
|
+
}, ...ngDevMode ? [{ debugName: "iconeDeTendance" }] : /* istanbul ignore next */ []);
|
|
1736
|
+
tailleDeLIcone = computed(() => {
|
|
1737
|
+
const tendance = this.tendance();
|
|
1738
|
+
return tendance?.icone === void 0 && (tendance?.sens === "hausse" || tendance?.sens === "baisse") ? "16" : "14";
|
|
1739
|
+
}, ...ngDevMode ? [{ debugName: "tailleDeLIcone" }] : /* istanbul ignore next */ []);
|
|
1740
|
+
tonDeTendance = computed(() => this.tendance()?.ton ?? "neutre", ...ngDevMode ? [{ debugName: "tonDeTendance" }] : /* istanbul ignore next */ []);
|
|
1741
|
+
sensLu = computed(() => {
|
|
1742
|
+
const sens = this.tendance()?.sens;
|
|
1743
|
+
if (sens === void 0) return null;
|
|
1744
|
+
const libelles = this.libelles();
|
|
1745
|
+
if (sens === "hausse") return libelles.tendanceEnHausse;
|
|
1746
|
+
if (sens === "baisse") return libelles.tendanceEnBaisse;
|
|
1747
|
+
return libelles.tendanceStable;
|
|
1748
|
+
}, ...ngDevMode ? [{ debugName: "sensLu" }] : /* istanbul ignore next */ []);
|
|
1749
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1750
|
+
minVersion: "12.0.0",
|
|
1751
|
+
version: "22.2.0",
|
|
1752
|
+
ngImport: i0,
|
|
1753
|
+
type: StStat,
|
|
1754
|
+
deps: [],
|
|
1755
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1756
|
+
});
|
|
1757
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1758
|
+
minVersion: "17.0.0",
|
|
1759
|
+
version: "22.2.0",
|
|
1760
|
+
type: StStat,
|
|
1761
|
+
isStandalone: true,
|
|
1762
|
+
selector: "st-stat",
|
|
1763
|
+
inputs: {
|
|
1764
|
+
libelle: {
|
|
1765
|
+
classPropertyName: "libelle",
|
|
1766
|
+
publicName: "libelle",
|
|
1767
|
+
isSignal: true,
|
|
1768
|
+
isRequired: true,
|
|
1769
|
+
transformFunction: null
|
|
1770
|
+
},
|
|
1771
|
+
icone: {
|
|
1772
|
+
classPropertyName: "icone",
|
|
1773
|
+
publicName: "icone",
|
|
1774
|
+
isSignal: true,
|
|
1775
|
+
isRequired: false,
|
|
1776
|
+
transformFunction: null
|
|
1777
|
+
},
|
|
1778
|
+
tendance: {
|
|
1779
|
+
classPropertyName: "tendance",
|
|
1780
|
+
publicName: "tendance",
|
|
1781
|
+
isSignal: true,
|
|
1782
|
+
isRequired: false,
|
|
1783
|
+
transformFunction: null
|
|
1784
|
+
},
|
|
1785
|
+
precision: {
|
|
1786
|
+
classPropertyName: "precision",
|
|
1787
|
+
publicName: "precision",
|
|
1788
|
+
isSignal: true,
|
|
1789
|
+
isRequired: false,
|
|
1790
|
+
transformFunction: null
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
host: { classAttribute: "st-stat" },
|
|
1794
|
+
ngImport: i0,
|
|
1795
|
+
template: "<div class=\"st-stat__entete\">\n <span class=\"st-stat__libelle\" [id]=\"identifiantDuLibelle\">{{ libelle() }}</span>\n <ng-content select=\"[aide]\" />\n @if (icone(); as nom) {\n <st-icon class=\"st-stat__icone\" [icone]=\"nom\" taille=\"18\" />\n }\n</div>\n<div class=\"st-stat__valeur\"><ng-content /></div>\n@if (tendance() !== null || precision() !== null) {\n <div class=\"st-stat__pied\">\n @if (tendance(); as tendance) {\n <div class=\"st-stat__tendance\">\n <span\n class=\"st-stat__pastille\"\n [attr.data-ton]=\"tonDeTendance()\"\n [attr.data-icone]=\"tailleDeLIcone()\"\n >\n @if (iconeDeTendance(); as icone) {\n <st-icon [icone]=\"icone\" [taille]=\"tailleDeLIcone()\" />\n }\n @if (sensLu(); as sens) {\n <span class=\"st-vh\">{{ sens }}, </span>\n }\n @if (tendance.montant; as montant) {\n <st-money [valeur]=\"montant\" signeExplicite />\n } @else {\n <!-- `dir=\"auto\"` : le texte de l'appelant garde son sens (« +2,4 % »), en ecriture\n inverse aussi, comme la part de st-repartition (audit UI du 2026-09-27, D-2). -->\n <span dir=\"auto\">{{ tendance.texte }}</span>\n }\n </span>\n @if (tendance.contexte; as contexte) {\n <span class=\"st-stat__contexte\">{{ contexte }}</span>\n }\n </div>\n }\n @if (precision(); as texte) {\n <div class=\"st-stat__precision\">{{ texte }}</div>\n }\n </div>\n}\n",
|
|
1796
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:flex;flex-direction:column;block-size:100%;min-inline-size:0}.st-stat__entete{display:flex;gap:var(--st-espacement-2);align-items:center;justify-content:space-between}.st-stat__libelle{font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase;color:var(--st-couleur-texte-discret)}.st-stat__icone{color:var(--st-couleur-texte-attenue)}.st-stat__valeur{margin-block-start:var(--st-espacement-2);font-size:var(--st-taille-3xl);line-height:var(--st-interligne-3xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-3xl);font-variant-numeric:var(--st-chiffres-alignes);letter-spacing:var(--st-approche-4xl);color:var(--st-couleur-texte);overflow-wrap:anywhere}.st-stat__pied{display:flex;flex-direction:column;gap:var(--st-espacement-1-5);margin-block-start:auto;padding-block-start:var(--st-espacement-6)}.st-stat__tendance{display:flex;flex-wrap:wrap;gap:var(--st-espacement-2);align-items:center}.st-stat__pastille{display:inline-flex;gap:var(--st-espacement-1);align-items:center;padding:var(--st-espacement-demi) var(--st-espacement-2);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);letter-spacing:var(--st-interlettrage-capitales);white-space:nowrap;border-radius:var(--st-rayon-pleine);outline:var(--st-epaisseur-fine) solid transparent}.st-stat__pastille[data-icone=\"16\"]{gap:var(--st-espacement-demi)}.st-stat__pastille[data-ton=neutre]{color:var(--st-couleur-texte-discret);background:var(--st-couleur-surface-enfoncee)}.st-stat__pastille[data-ton=primaire]{color:var(--st-couleur-texte-primaire);background:var(--st-couleur-surface-conteneur-bas)}.st-stat__pastille[data-ton=information]{color:var(--st-couleur-sur-information-discret);background:var(--st-couleur-information-discret)}.st-stat__pastille[data-ton=succes]{color:var(--st-couleur-succes);background:var(--st-couleur-succes-discret)}.st-stat__pastille[data-ton=avertissement]{color:var(--st-couleur-sur-avertissement-discret);background:var(--st-couleur-avertissement-discret)}.st-stat__pastille[data-ton=danger]{color:var(--st-couleur-sur-danger-discret);background:var(--st-couleur-danger-discret)}.st-stat__pastille[data-ton=danger] st-icon{color:var(--st-couleur-danger)}.st-stat__contexte{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}.st-stat__precision{font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-texte-attenue)}\n"],
|
|
1797
|
+
dependencies: [{
|
|
1798
|
+
kind: "component",
|
|
1799
|
+
type: StIcon,
|
|
1800
|
+
selector: "st-icon",
|
|
1801
|
+
inputs: [
|
|
1802
|
+
"icone",
|
|
1803
|
+
"nom",
|
|
1804
|
+
"variante",
|
|
1805
|
+
"sprite",
|
|
1806
|
+
"nomMetier",
|
|
1807
|
+
"taille",
|
|
1808
|
+
"ton",
|
|
1809
|
+
"etiquette",
|
|
1810
|
+
"miroir"
|
|
1811
|
+
]
|
|
1812
|
+
}, {
|
|
1813
|
+
kind: "component",
|
|
1814
|
+
type: StMoney,
|
|
1815
|
+
selector: "st-money",
|
|
1816
|
+
inputs: [
|
|
1817
|
+
"valeur",
|
|
1818
|
+
"signeExplicite",
|
|
1819
|
+
"sansDevise",
|
|
1820
|
+
"taille",
|
|
1821
|
+
"variation",
|
|
1822
|
+
"ton",
|
|
1823
|
+
"police",
|
|
1824
|
+
"alignement",
|
|
1825
|
+
"masque"
|
|
1826
|
+
]
|
|
1827
|
+
}],
|
|
1828
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1829
|
+
});
|
|
1830
|
+
};
|
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1832
|
+
minVersion: "12.0.0",
|
|
1833
|
+
version: "22.2.0",
|
|
1834
|
+
ngImport: i0,
|
|
1835
|
+
type: StStat,
|
|
1836
|
+
decorators: [{
|
|
1837
|
+
type: Component,
|
|
1838
|
+
args: [{
|
|
1839
|
+
selector: "st-stat",
|
|
1840
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1841
|
+
imports: [StIcon, StMoney],
|
|
1842
|
+
host: { class: "st-stat" },
|
|
1843
|
+
template: "<div class=\"st-stat__entete\">\n <span class=\"st-stat__libelle\" [id]=\"identifiantDuLibelle\">{{ libelle() }}</span>\n <ng-content select=\"[aide]\" />\n @if (icone(); as nom) {\n <st-icon class=\"st-stat__icone\" [icone]=\"nom\" taille=\"18\" />\n }\n</div>\n<div class=\"st-stat__valeur\"><ng-content /></div>\n@if (tendance() !== null || precision() !== null) {\n <div class=\"st-stat__pied\">\n @if (tendance(); as tendance) {\n <div class=\"st-stat__tendance\">\n <span\n class=\"st-stat__pastille\"\n [attr.data-ton]=\"tonDeTendance()\"\n [attr.data-icone]=\"tailleDeLIcone()\"\n >\n @if (iconeDeTendance(); as icone) {\n <st-icon [icone]=\"icone\" [taille]=\"tailleDeLIcone()\" />\n }\n @if (sensLu(); as sens) {\n <span class=\"st-vh\">{{ sens }}, </span>\n }\n @if (tendance.montant; as montant) {\n <st-money [valeur]=\"montant\" signeExplicite />\n } @else {\n <!-- `dir=\"auto\"` : le texte de l'appelant garde son sens (« +2,4 % »), en ecriture\n inverse aussi, comme la part de st-repartition (audit UI du 2026-09-27, D-2). -->\n <span dir=\"auto\">{{ tendance.texte }}</span>\n }\n </span>\n @if (tendance.contexte; as contexte) {\n <span class=\"st-stat__contexte\">{{ contexte }}</span>\n }\n </div>\n }\n @if (precision(); as texte) {\n <div class=\"st-stat__precision\">{{ texte }}</div>\n }\n </div>\n}\n",
|
|
1844
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:flex;flex-direction:column;block-size:100%;min-inline-size:0}.st-stat__entete{display:flex;gap:var(--st-espacement-2);align-items:center;justify-content:space-between}.st-stat__libelle{font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);text-transform:uppercase;color:var(--st-couleur-texte-discret)}.st-stat__icone{color:var(--st-couleur-texte-attenue)}.st-stat__valeur{margin-block-start:var(--st-espacement-2);font-size:var(--st-taille-3xl);line-height:var(--st-interligne-3xl);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-approche-3xl);font-variant-numeric:var(--st-chiffres-alignes);letter-spacing:var(--st-approche-4xl);color:var(--st-couleur-texte);overflow-wrap:anywhere}.st-stat__pied{display:flex;flex-direction:column;gap:var(--st-espacement-1-5);margin-block-start:auto;padding-block-start:var(--st-espacement-6)}.st-stat__tendance{display:flex;flex-wrap:wrap;gap:var(--st-espacement-2);align-items:center}.st-stat__pastille{display:inline-flex;gap:var(--st-espacement-1);align-items:center;padding:var(--st-espacement-demi) var(--st-espacement-2);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);letter-spacing:var(--st-interlettrage-capitales);white-space:nowrap;border-radius:var(--st-rayon-pleine);outline:var(--st-epaisseur-fine) solid transparent}.st-stat__pastille[data-icone=\"16\"]{gap:var(--st-espacement-demi)}.st-stat__pastille[data-ton=neutre]{color:var(--st-couleur-texte-discret);background:var(--st-couleur-surface-enfoncee)}.st-stat__pastille[data-ton=primaire]{color:var(--st-couleur-texte-primaire);background:var(--st-couleur-surface-conteneur-bas)}.st-stat__pastille[data-ton=information]{color:var(--st-couleur-sur-information-discret);background:var(--st-couleur-information-discret)}.st-stat__pastille[data-ton=succes]{color:var(--st-couleur-succes);background:var(--st-couleur-succes-discret)}.st-stat__pastille[data-ton=avertissement]{color:var(--st-couleur-sur-avertissement-discret);background:var(--st-couleur-avertissement-discret)}.st-stat__pastille[data-ton=danger]{color:var(--st-couleur-sur-danger-discret);background:var(--st-couleur-danger-discret)}.st-stat__pastille[data-ton=danger] st-icon{color:var(--st-couleur-danger)}.st-stat__contexte{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}.st-stat__precision{font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-texte-attenue)}\n"]
|
|
1845
|
+
}]
|
|
1846
|
+
}],
|
|
1847
|
+
ctorParameters: () => [],
|
|
1848
|
+
propDecorators: {
|
|
1849
|
+
libelle: [{
|
|
1850
|
+
type: i0.Input,
|
|
1851
|
+
args: [{
|
|
1852
|
+
isSignal: true,
|
|
1853
|
+
alias: "libelle",
|
|
1854
|
+
required: true
|
|
1855
|
+
}]
|
|
1856
|
+
}],
|
|
1857
|
+
icone: [{
|
|
1858
|
+
type: i0.Input,
|
|
1859
|
+
args: [{
|
|
1860
|
+
isSignal: true,
|
|
1861
|
+
alias: "icone",
|
|
1862
|
+
required: false
|
|
1863
|
+
}]
|
|
1864
|
+
}],
|
|
1865
|
+
tendance: [{
|
|
1866
|
+
type: i0.Input,
|
|
1867
|
+
args: [{
|
|
1868
|
+
isSignal: true,
|
|
1869
|
+
alias: "tendance",
|
|
1870
|
+
required: false
|
|
1871
|
+
}]
|
|
1872
|
+
}],
|
|
1873
|
+
precision: [{
|
|
1874
|
+
type: i0.Input,
|
|
1875
|
+
args: [{
|
|
1876
|
+
isSignal: true,
|
|
1877
|
+
alias: "precision",
|
|
1878
|
+
required: false
|
|
1879
|
+
}]
|
|
1880
|
+
}]
|
|
1881
|
+
}
|
|
1882
|
+
});
|
|
1883
|
+
var StAmountSummary = class StAmountSummary {
|
|
1884
|
+
legende = input.required(...ngDevMode ? [{ debugName: "legende" }] : /* istanbul ignore next */ []);
|
|
1885
|
+
legendeMasquee = input(false, {
|
|
1886
|
+
...ngDevMode ? { debugName: "legendeMasquee" } : /* istanbul ignore next */ {},
|
|
1887
|
+
transform: booleanAttribute
|
|
1888
|
+
});
|
|
1889
|
+
lignes = input.required(...ngDevMode ? [{ debugName: "lignes" }] : /* istanbul ignore next */ []);
|
|
1890
|
+
sansDevise = input(false, {
|
|
1891
|
+
...ngDevMode ? { debugName: "sansDevise" } : /* istanbul ignore next */ {},
|
|
1892
|
+
transform: booleanAttribute
|
|
1893
|
+
});
|
|
1894
|
+
lignesLues = computed(() => this.lignes().map((ligne) => {
|
|
1895
|
+
const type = ligne.type ?? "ligne";
|
|
1896
|
+
const montant = ligne.montant ?? null;
|
|
1897
|
+
const retranche = montant !== null && type === "deduction" && montant.unitesMineures > 0n ? {
|
|
1898
|
+
...montant,
|
|
1899
|
+
unitesMineures: -montant.unitesMineures
|
|
1900
|
+
} : montant;
|
|
1901
|
+
const ton = type === "total" ? "primaire" : type === "solde" ? "discret" : null;
|
|
1902
|
+
return {
|
|
1903
|
+
...ligne,
|
|
1904
|
+
type,
|
|
1905
|
+
montantLu: retranche,
|
|
1906
|
+
ton
|
|
1907
|
+
};
|
|
1908
|
+
}), ...ngDevMode ? [{ debugName: "lignesLues" }] : /* istanbul ignore next */ []);
|
|
1909
|
+
corps = computed(() => this.lignesLues().filter((ligne) => ligne.type !== "total" && ligne.type !== "solde"), ...ngDevMode ? [{ debugName: "corps" }] : /* istanbul ignore next */ []);
|
|
1910
|
+
pied = computed(() => this.lignesLues().filter((ligne) => ligne.type === "total" || ligne.type === "solde"), ...ngDevMode ? [{ debugName: "pied" }] : /* istanbul ignore next */ []);
|
|
1911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1912
|
+
minVersion: "12.0.0",
|
|
1913
|
+
version: "22.2.0",
|
|
1914
|
+
ngImport: i0,
|
|
1915
|
+
type: StAmountSummary,
|
|
1916
|
+
deps: [],
|
|
1917
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1918
|
+
});
|
|
1919
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1920
|
+
minVersion: "17.0.0",
|
|
1921
|
+
version: "22.2.0",
|
|
1922
|
+
type: StAmountSummary,
|
|
1923
|
+
isStandalone: true,
|
|
1924
|
+
selector: "st-amount-summary",
|
|
1925
|
+
inputs: {
|
|
1926
|
+
legende: {
|
|
1927
|
+
classPropertyName: "legende",
|
|
1928
|
+
publicName: "legende",
|
|
1929
|
+
isSignal: true,
|
|
1930
|
+
isRequired: true,
|
|
1931
|
+
transformFunction: null
|
|
1932
|
+
},
|
|
1933
|
+
legendeMasquee: {
|
|
1934
|
+
classPropertyName: "legendeMasquee",
|
|
1935
|
+
publicName: "legendeMasquee",
|
|
1936
|
+
isSignal: true,
|
|
1937
|
+
isRequired: false,
|
|
1938
|
+
transformFunction: null
|
|
1939
|
+
},
|
|
1940
|
+
lignes: {
|
|
1941
|
+
classPropertyName: "lignes",
|
|
1942
|
+
publicName: "lignes",
|
|
1943
|
+
isSignal: true,
|
|
1944
|
+
isRequired: true,
|
|
1945
|
+
transformFunction: null
|
|
1946
|
+
},
|
|
1947
|
+
sansDevise: {
|
|
1948
|
+
classPropertyName: "sansDevise",
|
|
1949
|
+
publicName: "sansDevise",
|
|
1950
|
+
isSignal: true,
|
|
1951
|
+
isRequired: false,
|
|
1952
|
+
transformFunction: null
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
host: { classAttribute: "st-amount-summary" },
|
|
1956
|
+
ngImport: i0,
|
|
1957
|
+
template: "<table class=\"st-amount-summary__tableau\">\n <caption class=\"st-amount-summary__legende\" [class.st-vh]=\"legendeMasquee()\">\n {{\n legende()\n }}\n </caption>\n <tbody>\n @for (ligne of corps(); track ligne.cle) {\n <ng-container [ngTemplateOutlet]=\"rangee\" [ngTemplateOutletContext]=\"{ $implicit: ligne }\" />\n }\n </tbody>\n @if (pied().length > 0) {\n <tfoot>\n @for (ligne of pied(); track ligne.cle) {\n <ng-container\n [ngTemplateOutlet]=\"rangee\"\n [ngTemplateOutletContext]=\"{ $implicit: ligne }\"\n />\n }\n </tfoot>\n }\n</table>\n\n<ng-template #rangee let-ligne>\n <tr class=\"st-amount-summary__ligne\" [attr.data-type]=\"ligne.type\">\n <th class=\"st-amount-summary__libelle\" scope=\"row\">\n {{ ligne.libelle }}\n @if (ligne.precision; as precision) {\n <span class=\"st-amount-summary__precision\">{{ precision }}</span>\n }\n </th>\n <td class=\"st-amount-summary__valeur\">\n @if (ligne.montantLu; as montant) {\n <st-money [valeur]=\"montant\" [sansDevise]=\"sansDevise()\" police=\"mono\" [ton]=\"ligne.ton\" />\n } @else {\n <span dir=\"auto\">{{ ligne.texte }}</span>\n }\n </td>\n </tr>\n</ng-template>\n",
|
|
1958
|
+
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;font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal)}.st-amount-summary__tableau{inline-size:100%;border-collapse:collapse}.st-amount-summary__legende{padding-block-end:var(--st-espacement-2);font-weight:var(--st-graisse-semi);text-align:start}.st-amount-summary__libelle,.st-amount-summary__valeur{padding-block:var(--st-espacement-2);vertical-align:baseline;border-block-end:var(--st-epaisseur-fine) solid var(--st-couleur-bordure)}.st-amount-summary__libelle{padding-inline-end:var(--st-espacement-4);font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret);text-align:start}.st-amount-summary__valeur{font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes);text-align:end}.st-amount-summary__precision{display:block;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}.st-amount-summary__ligne[data-type=taux]>.st-amount-summary__valeur{font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm)}.st-amount-summary__ligne[data-type=total]>*{border-block-start:var(--st-epaisseur-moyenne) solid var(--st-couleur-bordure-forte)}.st-amount-summary__ligne[data-type=total]>.st-amount-summary__libelle{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte)}.st-amount-summary__ligne:last-child>*{border-block-end:0}@media(forced-colors:active){.st-amount-summary__ligne[data-type=total]>*{border-block-start-color:CanvasText}}\n"],
|
|
1959
|
+
dependencies: [{
|
|
1960
|
+
kind: "directive",
|
|
1961
|
+
type: NgTemplateOutlet,
|
|
1962
|
+
selector: "[ngTemplateOutlet]",
|
|
1963
|
+
inputs: [
|
|
1964
|
+
"ngTemplateOutletContext",
|
|
1965
|
+
"ngTemplateOutlet",
|
|
1966
|
+
"ngTemplateOutletInjector"
|
|
1967
|
+
]
|
|
1968
|
+
}, {
|
|
1969
|
+
kind: "component",
|
|
1970
|
+
type: StMoney,
|
|
1971
|
+
selector: "st-money",
|
|
1972
|
+
inputs: [
|
|
1973
|
+
"valeur",
|
|
1974
|
+
"signeExplicite",
|
|
1975
|
+
"sansDevise",
|
|
1976
|
+
"taille",
|
|
1977
|
+
"variation",
|
|
1978
|
+
"ton",
|
|
1979
|
+
"police",
|
|
1980
|
+
"alignement",
|
|
1981
|
+
"masque"
|
|
1982
|
+
]
|
|
1983
|
+
}],
|
|
1984
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1985
|
+
});
|
|
1986
|
+
};
|
|
1987
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1988
|
+
minVersion: "12.0.0",
|
|
1989
|
+
version: "22.2.0",
|
|
1990
|
+
ngImport: i0,
|
|
1991
|
+
type: StAmountSummary,
|
|
1992
|
+
decorators: [{
|
|
1993
|
+
type: Component,
|
|
1994
|
+
args: [{
|
|
1995
|
+
selector: "st-amount-summary",
|
|
1996
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1997
|
+
imports: [NgTemplateOutlet, StMoney],
|
|
1998
|
+
host: { class: "st-amount-summary" },
|
|
1999
|
+
template: "<table class=\"st-amount-summary__tableau\">\n <caption class=\"st-amount-summary__legende\" [class.st-vh]=\"legendeMasquee()\">\n {{\n legende()\n }}\n </caption>\n <tbody>\n @for (ligne of corps(); track ligne.cle) {\n <ng-container [ngTemplateOutlet]=\"rangee\" [ngTemplateOutletContext]=\"{ $implicit: ligne }\" />\n }\n </tbody>\n @if (pied().length > 0) {\n <tfoot>\n @for (ligne of pied(); track ligne.cle) {\n <ng-container\n [ngTemplateOutlet]=\"rangee\"\n [ngTemplateOutletContext]=\"{ $implicit: ligne }\"\n />\n }\n </tfoot>\n }\n</table>\n\n<ng-template #rangee let-ligne>\n <tr class=\"st-amount-summary__ligne\" [attr.data-type]=\"ligne.type\">\n <th class=\"st-amount-summary__libelle\" scope=\"row\">\n {{ ligne.libelle }}\n @if (ligne.precision; as precision) {\n <span class=\"st-amount-summary__precision\">{{ precision }}</span>\n }\n </th>\n <td class=\"st-amount-summary__valeur\">\n @if (ligne.montantLu; as montant) {\n <st-money [valeur]=\"montant\" [sansDevise]=\"sansDevise()\" police=\"mono\" [ton]=\"ligne.ton\" />\n } @else {\n <span dir=\"auto\">{{ ligne.texte }}</span>\n }\n </td>\n </tr>\n</ng-template>\n",
|
|
2000
|
+
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;font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal)}.st-amount-summary__tableau{inline-size:100%;border-collapse:collapse}.st-amount-summary__legende{padding-block-end:var(--st-espacement-2);font-weight:var(--st-graisse-semi);text-align:start}.st-amount-summary__libelle,.st-amount-summary__valeur{padding-block:var(--st-espacement-2);vertical-align:baseline;border-block-end:var(--st-epaisseur-fine) solid var(--st-couleur-bordure)}.st-amount-summary__libelle{padding-inline-end:var(--st-espacement-4);font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret);text-align:start}.st-amount-summary__valeur{font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes);text-align:end}.st-amount-summary__precision{display:block;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}.st-amount-summary__ligne[data-type=taux]>.st-amount-summary__valeur{font-size:var(--st-taille-sm);font-weight:var(--st-graisse-normale);line-height:var(--st-interligne-sm)}.st-amount-summary__ligne[data-type=total]>*{border-block-start:var(--st-epaisseur-moyenne) solid var(--st-couleur-bordure-forte)}.st-amount-summary__ligne[data-type=total]>.st-amount-summary__libelle{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte)}.st-amount-summary__ligne:last-child>*{border-block-end:0}@media(forced-colors:active){.st-amount-summary__ligne[data-type=total]>*{border-block-start-color:CanvasText}}\n"]
|
|
2001
|
+
}]
|
|
2002
|
+
}],
|
|
2003
|
+
propDecorators: {
|
|
2004
|
+
legende: [{
|
|
2005
|
+
type: i0.Input,
|
|
2006
|
+
args: [{
|
|
2007
|
+
isSignal: true,
|
|
2008
|
+
alias: "legende",
|
|
2009
|
+
required: true
|
|
2010
|
+
}]
|
|
2011
|
+
}],
|
|
2012
|
+
legendeMasquee: [{
|
|
2013
|
+
type: i0.Input,
|
|
2014
|
+
args: [{
|
|
2015
|
+
isSignal: true,
|
|
2016
|
+
alias: "legendeMasquee",
|
|
2017
|
+
required: false
|
|
2018
|
+
}]
|
|
2019
|
+
}],
|
|
2020
|
+
lignes: [{
|
|
2021
|
+
type: i0.Input,
|
|
2022
|
+
args: [{
|
|
2023
|
+
isSignal: true,
|
|
2024
|
+
alias: "lignes",
|
|
2025
|
+
required: true
|
|
2026
|
+
}]
|
|
2027
|
+
}],
|
|
2028
|
+
sansDevise: [{
|
|
2029
|
+
type: i0.Input,
|
|
2030
|
+
args: [{
|
|
2031
|
+
isSignal: true,
|
|
2032
|
+
alias: "sansDevise",
|
|
2033
|
+
required: false
|
|
2034
|
+
}]
|
|
2035
|
+
}]
|
|
2036
|
+
}
|
|
2037
|
+
});
|
|
2038
|
+
const TON_DE_QUALITE = {
|
|
2039
|
+
optimale: "primaire",
|
|
2040
|
+
"sous-optimale": "avertissement",
|
|
2041
|
+
pire: "danger"
|
|
2042
|
+
};
|
|
2043
|
+
const TROU_VALEUR = "{valeur}";
|
|
2044
|
+
const TROU_TOTAL = "{total}";
|
|
2045
|
+
const enNombre = (valeur) => valeur === null ? null : Number(valeur);
|
|
2046
|
+
const enEntier = (valeur) => typeof valeur === "bigint" ? valeur : BigInt(Math.round(valeur));
|
|
2047
|
+
function morceauxDe(phrase) {
|
|
2048
|
+
return phrase.split(/(\{valeur\}|\{total\})/).filter((texte) => texte !== "").map((texte) => ({
|
|
2049
|
+
nature: texte === TROU_VALEUR ? "valeur" : texte === TROU_TOTAL ? "total" : "texte",
|
|
2050
|
+
texte
|
|
2051
|
+
}));
|
|
2052
|
+
}
|
|
2053
|
+
function zonesDeJauge(min, max, bas, haut, optimum) {
|
|
2054
|
+
if (bas === null && haut === null) return [];
|
|
2055
|
+
const etendue = max - min || 1;
|
|
2056
|
+
const b = Math.min(Math.max(bas ?? min, min), max);
|
|
2057
|
+
const h = Math.min(Math.max(haut ?? max, b), max);
|
|
2058
|
+
const o = optimum ?? (min + max) / 2;
|
|
2059
|
+
const part = (valeur) => (valeur - min) / etendue;
|
|
2060
|
+
const qualites = o < b ? [
|
|
2061
|
+
"optimale",
|
|
2062
|
+
"sous-optimale",
|
|
2063
|
+
"pire"
|
|
2064
|
+
] : o > h ? [
|
|
2065
|
+
"pire",
|
|
2066
|
+
"sous-optimale",
|
|
2067
|
+
"optimale"
|
|
2068
|
+
] : [
|
|
2069
|
+
"sous-optimale",
|
|
2070
|
+
"optimale",
|
|
2071
|
+
"sous-optimale"
|
|
2072
|
+
];
|
|
2073
|
+
return [
|
|
2074
|
+
{
|
|
2075
|
+
debut: 0,
|
|
2076
|
+
fin: part(b),
|
|
2077
|
+
qualite: qualites[0]
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
debut: part(b),
|
|
2081
|
+
fin: part(h),
|
|
2082
|
+
qualite: qualites[1]
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
debut: part(h),
|
|
2086
|
+
fin: 1,
|
|
2087
|
+
qualite: qualites[2]
|
|
2088
|
+
}
|
|
2089
|
+
].filter((zone) => zone.fin > zone.debut);
|
|
2090
|
+
}
|
|
2091
|
+
var StMeter = class StMeter {
|
|
2092
|
+
libelles = inject(ST_LIBELLES);
|
|
2093
|
+
locale = inject(ST_LOCALE);
|
|
2094
|
+
masques = inject(ST_MONTANTS_MASQUES);
|
|
2095
|
+
identifiants = inject(StIdentifiants);
|
|
2096
|
+
idDuLibelle = this.identifiants.prochain("st-jauge");
|
|
2097
|
+
idDeLaValeur = this.identifiants.prochain("st-jauge-valeur");
|
|
2098
|
+
libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
2099
|
+
valeur = input.required(...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
2100
|
+
max = input.required(...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
2101
|
+
min = input(0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
2102
|
+
bas = input(null, ...ngDevMode ? [{ debugName: "bas" }] : /* istanbul ignore next */ []);
|
|
2103
|
+
haut = input(null, ...ngDevMode ? [{ debugName: "haut" }] : /* istanbul ignore next */ []);
|
|
2104
|
+
optimum = input(null, ...ngDevMode ? [{ debugName: "optimum" }] : /* istanbul ignore next */ []);
|
|
2105
|
+
seuil = input(null, ...ngDevMode ? [{ debugName: "seuil" }] : /* istanbul ignore next */ []);
|
|
2106
|
+
devise = input(null, ...ngDevMode ? [{ debugName: "devise" }] : /* istanbul ignore next */ []);
|
|
2107
|
+
affichage = input("consomme", ...ngDevMode ? [{ debugName: "affichage" }] : /* istanbul ignore next */ []);
|
|
2108
|
+
precision = input(null, ...ngDevMode ? [{ debugName: "precision" }] : /* istanbul ignore next */ []);
|
|
2109
|
+
variante = input("barre", ...ngDevMode ? [{ debugName: "variante" }] : /* istanbul ignore next */ []);
|
|
2110
|
+
ton = input(null, ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
2111
|
+
partVisible = input(false, {
|
|
2112
|
+
...ngDevMode ? { debugName: "partVisible" } : /* istanbul ignore next */ {},
|
|
2113
|
+
transform: booleanAttribute
|
|
2114
|
+
});
|
|
2115
|
+
nombres = computed(() => {
|
|
2116
|
+
const min = Number(this.min());
|
|
2117
|
+
const max = Number(this.max());
|
|
2118
|
+
const valeur = Number(this.valeur());
|
|
2119
|
+
return {
|
|
2120
|
+
min,
|
|
2121
|
+
max,
|
|
2122
|
+
valeur: Math.min(Math.max(valeur, min), max)
|
|
2123
|
+
};
|
|
2124
|
+
}, ...ngDevMode ? [{ debugName: "nombres" }] : /* istanbul ignore next */ []);
|
|
2125
|
+
part = computed(() => {
|
|
2126
|
+
const { min, max, valeur } = this.nombres();
|
|
2127
|
+
return max > min ? (valeur - min) / (max - min) : 0;
|
|
2128
|
+
}, ...ngDevMode ? [{ debugName: "part" }] : /* istanbul ignore next */ []);
|
|
2129
|
+
zones = computed(() => {
|
|
2130
|
+
const { min, max } = this.nombres();
|
|
2131
|
+
return zonesDeJauge(min, max, enNombre(this.bas()), enNombre(this.haut()), enNombre(this.optimum()));
|
|
2132
|
+
}, ...ngDevMode ? [{ debugName: "zones" }] : /* istanbul ignore next */ []);
|
|
2133
|
+
tonLu = computed(() => {
|
|
2134
|
+
const impose = this.ton();
|
|
2135
|
+
if (impose !== null) return impose;
|
|
2136
|
+
const part = this.part();
|
|
2137
|
+
const zone = this.zones().find((candidate) => part >= candidate.debut && part <= candidate.fin);
|
|
2138
|
+
return zone === void 0 ? "primaire" : TON_DE_QUALITE[zone.qualite];
|
|
2139
|
+
}, ...ngDevMode ? [{ debugName: "tonLu" }] : /* istanbul ignore next */ []);
|
|
2140
|
+
partDuSeuil = computed(() => {
|
|
2141
|
+
const seuil = enNombre(this.seuil());
|
|
2142
|
+
const { min, max } = this.nombres();
|
|
2143
|
+
if (seuil === null || max <= min) return null;
|
|
2144
|
+
return (Math.min(Math.max(seuil, min), max) - min) / (max - min);
|
|
2145
|
+
}, ...ngDevMode ? [{ debugName: "partDuSeuil" }] : /* istanbul ignore next */ []);
|
|
2146
|
+
pourcentage = computed(() => new Intl.NumberFormat(this.locale(), {
|
|
2147
|
+
style: "percent",
|
|
2148
|
+
maximumFractionDigits: 1
|
|
2149
|
+
}).format(this.part()), ...ngDevMode ? [{ debugName: "pourcentage" }] : /* istanbul ignore next */ []);
|
|
2150
|
+
montant = computed(() => this.enMontant(this.valeur()), ...ngDevMode ? [{ debugName: "montant" }] : /* istanbul ignore next */ []);
|
|
2151
|
+
total = computed(() => this.enMontant(this.max()), ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
2152
|
+
reste = computed(() => {
|
|
2153
|
+
const devise = this.devise();
|
|
2154
|
+
if (devise === null) return null;
|
|
2155
|
+
return {
|
|
2156
|
+
unitesMineures: enEntier(this.max()) - enEntier(this.valeur()),
|
|
2157
|
+
devise
|
|
2158
|
+
};
|
|
2159
|
+
}, ...ngDevMode ? [{ debugName: "reste" }] : /* istanbul ignore next */ []);
|
|
2160
|
+
nombreDuReste = computed(() => this.nombres().max - this.nombres().valeur, ...ngDevMode ? [{ debugName: "nombreDuReste" }] : /* istanbul ignore next */ []);
|
|
2161
|
+
texteMasque = computed(() => this.devise() !== null && this.masques() ? this.libelles().montantMasque : null, ...ngDevMode ? [{ debugName: "texteMasque" }] : /* istanbul ignore next */ []);
|
|
2162
|
+
morceauxDuConsomme = computed(() => morceauxDe(this.libelles().valeurSurTotal(TROU_VALEUR, TROU_TOTAL)), ...ngDevMode ? [{ debugName: "morceauxDuConsomme" }] : /* istanbul ignore next */ []);
|
|
2163
|
+
morceauxDuReste = computed(() => morceauxDe(this.libelles().resteDisponible(TROU_VALEUR)), ...ngDevMode ? [{ debugName: "morceauxDuReste" }] : /* istanbul ignore next */ []);
|
|
2164
|
+
enMontant(valeur) {
|
|
2165
|
+
const devise = this.devise();
|
|
2166
|
+
return devise === null ? null : {
|
|
2167
|
+
unitesMineures: enEntier(valeur),
|
|
2168
|
+
devise
|
|
2169
|
+
};
|
|
2170
|
+
}
|
|
2171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2172
|
+
minVersion: "12.0.0",
|
|
2173
|
+
version: "22.2.0",
|
|
2174
|
+
ngImport: i0,
|
|
2175
|
+
type: StMeter,
|
|
2176
|
+
deps: [],
|
|
2177
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2178
|
+
});
|
|
2179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2180
|
+
minVersion: "17.0.0",
|
|
2181
|
+
version: "22.2.0",
|
|
2182
|
+
type: StMeter,
|
|
2183
|
+
isStandalone: true,
|
|
2184
|
+
selector: "st-meter",
|
|
2185
|
+
inputs: {
|
|
2186
|
+
libelle: {
|
|
2187
|
+
classPropertyName: "libelle",
|
|
2188
|
+
publicName: "libelle",
|
|
2189
|
+
isSignal: true,
|
|
2190
|
+
isRequired: true,
|
|
2191
|
+
transformFunction: null
|
|
2192
|
+
},
|
|
2193
|
+
valeur: {
|
|
2194
|
+
classPropertyName: "valeur",
|
|
2195
|
+
publicName: "valeur",
|
|
2196
|
+
isSignal: true,
|
|
2197
|
+
isRequired: true,
|
|
2198
|
+
transformFunction: null
|
|
2199
|
+
},
|
|
2200
|
+
max: {
|
|
2201
|
+
classPropertyName: "max",
|
|
2202
|
+
publicName: "max",
|
|
2203
|
+
isSignal: true,
|
|
2204
|
+
isRequired: true,
|
|
2205
|
+
transformFunction: null
|
|
2206
|
+
},
|
|
2207
|
+
min: {
|
|
2208
|
+
classPropertyName: "min",
|
|
2209
|
+
publicName: "min",
|
|
2210
|
+
isSignal: true,
|
|
2211
|
+
isRequired: false,
|
|
2212
|
+
transformFunction: null
|
|
2213
|
+
},
|
|
2214
|
+
bas: {
|
|
2215
|
+
classPropertyName: "bas",
|
|
2216
|
+
publicName: "bas",
|
|
2217
|
+
isSignal: true,
|
|
2218
|
+
isRequired: false,
|
|
2219
|
+
transformFunction: null
|
|
2220
|
+
},
|
|
2221
|
+
haut: {
|
|
2222
|
+
classPropertyName: "haut",
|
|
2223
|
+
publicName: "haut",
|
|
2224
|
+
isSignal: true,
|
|
2225
|
+
isRequired: false,
|
|
2226
|
+
transformFunction: null
|
|
2227
|
+
},
|
|
2228
|
+
optimum: {
|
|
2229
|
+
classPropertyName: "optimum",
|
|
2230
|
+
publicName: "optimum",
|
|
2231
|
+
isSignal: true,
|
|
2232
|
+
isRequired: false,
|
|
2233
|
+
transformFunction: null
|
|
2234
|
+
},
|
|
2235
|
+
seuil: {
|
|
2236
|
+
classPropertyName: "seuil",
|
|
2237
|
+
publicName: "seuil",
|
|
2238
|
+
isSignal: true,
|
|
2239
|
+
isRequired: false,
|
|
2240
|
+
transformFunction: null
|
|
2241
|
+
},
|
|
2242
|
+
devise: {
|
|
2243
|
+
classPropertyName: "devise",
|
|
2244
|
+
publicName: "devise",
|
|
2245
|
+
isSignal: true,
|
|
2246
|
+
isRequired: false,
|
|
2247
|
+
transformFunction: null
|
|
2248
|
+
},
|
|
2249
|
+
affichage: {
|
|
2250
|
+
classPropertyName: "affichage",
|
|
2251
|
+
publicName: "affichage",
|
|
2252
|
+
isSignal: true,
|
|
2253
|
+
isRequired: false,
|
|
2254
|
+
transformFunction: null
|
|
2255
|
+
},
|
|
2256
|
+
precision: {
|
|
2257
|
+
classPropertyName: "precision",
|
|
2258
|
+
publicName: "precision",
|
|
2259
|
+
isSignal: true,
|
|
2260
|
+
isRequired: false,
|
|
2261
|
+
transformFunction: null
|
|
2262
|
+
},
|
|
2263
|
+
variante: {
|
|
2264
|
+
classPropertyName: "variante",
|
|
2265
|
+
publicName: "variante",
|
|
2266
|
+
isSignal: true,
|
|
2267
|
+
isRequired: false,
|
|
2268
|
+
transformFunction: null
|
|
2269
|
+
},
|
|
2270
|
+
ton: {
|
|
2271
|
+
classPropertyName: "ton",
|
|
2272
|
+
publicName: "ton",
|
|
2273
|
+
isSignal: true,
|
|
2274
|
+
isRequired: false,
|
|
2275
|
+
transformFunction: null
|
|
2276
|
+
},
|
|
2277
|
+
partVisible: {
|
|
2278
|
+
classPropertyName: "partVisible",
|
|
2279
|
+
publicName: "partVisible",
|
|
2280
|
+
isSignal: true,
|
|
2281
|
+
isRequired: false,
|
|
2282
|
+
transformFunction: null
|
|
2283
|
+
}
|
|
2284
|
+
},
|
|
2285
|
+
host: {
|
|
2286
|
+
properties: {
|
|
2287
|
+
"attr.data-variante": "variante()",
|
|
2288
|
+
"attr.data-ton": "tonLu()"
|
|
2289
|
+
},
|
|
2290
|
+
classAttribute: "st-meter"
|
|
2291
|
+
},
|
|
2292
|
+
ngImport: i0,
|
|
2293
|
+
template: "<div class=\"st-meter__entete\">\n <span class=\"st-meter__libelle\" [id]=\"idDuLibelle\">{{ libelle() }}</span>\n @if (partVisible()) {\n <!-- La part se lit deja par le compteur : ici, pour les yeux. -->\n <span class=\"st-meter__part\" aria-hidden=\"true\" dir=\"auto\">{{ pourcentage() }}</span>\n }\n</div>\n\n<p class=\"st-meter__valeur\" [id]=\"idDeLaValeur\">\n <!-- `[texte]` : la phrase de l'application (« Ratio post-choc : 128,4 % / minimum legal : 100 % »)\n remplace celle du dictionnaire ; elle decrit le compteur de la meme facon. -->\n <ng-content select=\"[texte]\">\n @switch (affichage()) {\n @case ('pourcentage') {\n <span class=\"st-meter__nombre\" dir=\"auto\">{{ pourcentage() }}</span>\n }\n @case ('reste') {\n @for (morceau of morceauxDuReste(); track $index) {\n @if (morceau.nature === 'texte') {\n <span class=\"st-meter__mot\">{{ morceau.texte }}</span>\n } @else if (reste(); as montant) {\n <st-money class=\"st-meter__nombre\" [valeur]=\"montant\" />\n } @else {\n <st-number class=\"st-meter__nombre\" [valeur]=\"nombreDuReste()\" />\n }\n }\n }\n @default {\n @for (morceau of morceauxDuConsomme(); track $index) {\n @switch (morceau.nature) {\n @case ('valeur') {\n @if (montant(); as valeur) {\n <st-money class=\"st-meter__nombre\" [valeur]=\"valeur\" />\n } @else {\n <st-number class=\"st-meter__nombre\" [valeur]=\"nombres().valeur\" />\n }\n }\n @case ('total') {\n @if (total(); as valeur) {\n <st-money class=\"st-meter__total\" [valeur]=\"valeur\" />\n } @else {\n <st-number class=\"st-meter__total\" [valeur]=\"nombres().max\" />\n }\n }\n @default {\n <span class=\"st-meter__mot\">{{ morceau.texte }}</span>\n }\n }\n }\n }\n }\n </ng-content>\n</p>\n\n<!-- La semantique : un compteur natif, nomme par le libelle, decrit par la valeur dite. -->\n<meter\n class=\"st-meter__natif\"\n [attr.aria-labelledby]=\"idDuLibelle\"\n [attr.aria-describedby]=\"idDeLaValeur\"\n [attr.aria-valuetext]=\"texteMasque()\"\n [attr.min]=\"nombres().min\"\n [attr.max]=\"nombres().max\"\n [attr.value]=\"nombres().valeur\"\n [attr.low]=\"bas()\"\n [attr.high]=\"haut()\"\n [attr.optimum]=\"optimum()\"\n></meter>\n\n<!-- Le dessin : muet, la valeur est deja dite. -->\n<div class=\"st-meter__piste\" aria-hidden=\"true\">\n @if (variante() === 'puce') {\n @for (zone of zones(); track $index) {\n <span\n class=\"st-meter__zone\"\n [attr.data-qualite]=\"zone.qualite\"\n [style.inset-inline-start.%]=\"zone.debut * 100\"\n [style.inline-size.%]=\"(zone.fin - zone.debut) * 100\"\n ></span>\n }\n @if (partDuSeuil(); as seuil) {\n <span class=\"st-meter__seuil\" [style.inset-inline-start.%]=\"seuil * 100\"></span>\n }\n <span class=\"st-meter__marqueur\" [style.inset-inline-start.%]=\"part() * 100\"></span>\n } @else {\n <span class=\"st-meter__remplissage\" [style.inline-size.%]=\"part() * 100\"></span>\n }\n</div>\n\n@if (precision(); as texte) {\n <p class=\"st-meter__precision\">{{ texte }}</p>\n}\n",
|
|
2294
|
+
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{--st-meter-encre: var(--st-couleur-primaire);display:grid;gap:var(--st-espacement-2);min-inline-size:0}:host([data-ton=succes]){--st-meter-encre: var(--st-couleur-succes)}:host([data-ton=avertissement]){--st-meter-encre: var(--st-couleur-avertissement)}:host([data-ton=danger]){--st-meter-encre: var(--st-couleur-danger)}.st-meter__entete{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1) var(--st-espacement-3);align-items:baseline;justify-content:space-between}.st-meter__libelle{font-weight:var(--st-graisse-semi)}.st-meter__part{padding:var(--st-espacement-0) var(--st-espacement-2);font-family:var(--st-police-mono);font-size:var(--st-taille-sm);font-weight:var(--st-graisse-grasse);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-primaire);background:var(--st-couleur-primaire-discret);border-radius:var(--st-rayon-sm)}.st-meter__valeur,.st-meter__precision{margin:0;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}.st-meter__nombre,.st-meter__total{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-alignes)}.st-meter__nombre{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte)}.st-meter__natif{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.st-meter__piste{position:relative;display:block;block-size:var(--st-espacement-2);overflow:hidden;background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-meter__remplissage{display:block;block-size:100%;background:var(--st-meter-encre);border-radius:inherit}:host([data-variante=cellule]){gap:var(--st-espacement-1)}:host([data-variante=cellule]) .st-meter__entete{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([data-variante=cellule]) .st-meter__piste{block-size:var(--st-espacement-1-5)}:host([data-variante=puce]){grid-template-columns:minmax(0,1fr) auto;column-gap:var(--st-espacement-3);align-items:baseline}:host([data-variante=puce]) .st-meter__piste,:host([data-variante=puce]) .st-meter__precision{grid-column:1/-1}:host([data-variante=puce]) .st-meter__valeur{font-family:var(--st-police-mono)}:host([data-variante=puce]) .st-meter__piste{block-size:var(--st-espacement-6);background:var(--st-couleur-surface-conteneur-haut);border-radius:var(--st-rayon-sm)}.st-meter__zone{position:absolute;inset-block:0}.st-meter__zone[data-qualite=optimale]{background:var(--st-couleur-succes-discret)}.st-meter__zone[data-qualite=sous-optimale]{background:var(--st-couleur-avertissement-discret)}.st-meter__zone[data-qualite=pire]{background:var(--st-couleur-danger-discret)}.st-meter__marqueur{position:absolute;inset-block:var(--st-espacement-1);inline-size:var(--st-espacement-1-5);background:var(--st-meter-encre);border-radius:var(--st-rayon-xs);translate:-50% 0}.st-meter__seuil{position:absolute;inset-block:0;inline-size:var(--st-espacement-1);background:var(--st-couleur-danger);translate:-50% 0}:host(:dir(rtl)) .st-meter__marqueur,:host(:dir(rtl)) .st-meter__seuil{translate:50% 0}@media(forced-colors:active){.st-meter__piste{forced-color-adjust:none;background:Canvas;outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}.st-meter__remplissage,.st-meter__marqueur{background:Highlight}.st-meter__zone{background:Canvas;border-inline-end:var(--st-epaisseur-fine) dashed CanvasText}.st-meter__seuil{background:CanvasText}}@media print{.st-meter__piste{-webkit-print-color-adjust:exact;print-color-adjust:exact}}\n"],
|
|
2295
|
+
dependencies: [{
|
|
2296
|
+
kind: "component",
|
|
2297
|
+
type: StMoney,
|
|
2298
|
+
selector: "st-money",
|
|
2299
|
+
inputs: [
|
|
2300
|
+
"valeur",
|
|
2301
|
+
"signeExplicite",
|
|
2302
|
+
"sansDevise",
|
|
2303
|
+
"taille",
|
|
2304
|
+
"variation",
|
|
2305
|
+
"ton",
|
|
2306
|
+
"police",
|
|
2307
|
+
"alignement",
|
|
2308
|
+
"masque"
|
|
2309
|
+
]
|
|
2310
|
+
}, {
|
|
2311
|
+
kind: "component",
|
|
2312
|
+
type: StNumber,
|
|
2313
|
+
selector: "st-number",
|
|
2314
|
+
inputs: [
|
|
2315
|
+
"valeur",
|
|
2316
|
+
"format",
|
|
2317
|
+
"decimales",
|
|
2318
|
+
"unite",
|
|
2319
|
+
"signeExplicite",
|
|
2320
|
+
"variation",
|
|
2321
|
+
"ton"
|
|
2322
|
+
]
|
|
2323
|
+
}],
|
|
2324
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2325
|
+
});
|
|
2326
|
+
};
|
|
2327
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2328
|
+
minVersion: "12.0.0",
|
|
2329
|
+
version: "22.2.0",
|
|
2330
|
+
ngImport: i0,
|
|
2331
|
+
type: StMeter,
|
|
2332
|
+
decorators: [{
|
|
2333
|
+
type: Component,
|
|
2334
|
+
args: [{
|
|
2335
|
+
selector: "st-meter",
|
|
2336
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2337
|
+
imports: [StMoney, StNumber],
|
|
2338
|
+
host: {
|
|
2339
|
+
class: "st-meter",
|
|
2340
|
+
"[attr.data-variante]": "variante()",
|
|
2341
|
+
"[attr.data-ton]": "tonLu()"
|
|
2342
|
+
},
|
|
2343
|
+
template: "<div class=\"st-meter__entete\">\n <span class=\"st-meter__libelle\" [id]=\"idDuLibelle\">{{ libelle() }}</span>\n @if (partVisible()) {\n <!-- La part se lit deja par le compteur : ici, pour les yeux. -->\n <span class=\"st-meter__part\" aria-hidden=\"true\" dir=\"auto\">{{ pourcentage() }}</span>\n }\n</div>\n\n<p class=\"st-meter__valeur\" [id]=\"idDeLaValeur\">\n <!-- `[texte]` : la phrase de l'application (« Ratio post-choc : 128,4 % / minimum legal : 100 % »)\n remplace celle du dictionnaire ; elle decrit le compteur de la meme facon. -->\n <ng-content select=\"[texte]\">\n @switch (affichage()) {\n @case ('pourcentage') {\n <span class=\"st-meter__nombre\" dir=\"auto\">{{ pourcentage() }}</span>\n }\n @case ('reste') {\n @for (morceau of morceauxDuReste(); track $index) {\n @if (morceau.nature === 'texte') {\n <span class=\"st-meter__mot\">{{ morceau.texte }}</span>\n } @else if (reste(); as montant) {\n <st-money class=\"st-meter__nombre\" [valeur]=\"montant\" />\n } @else {\n <st-number class=\"st-meter__nombre\" [valeur]=\"nombreDuReste()\" />\n }\n }\n }\n @default {\n @for (morceau of morceauxDuConsomme(); track $index) {\n @switch (morceau.nature) {\n @case ('valeur') {\n @if (montant(); as valeur) {\n <st-money class=\"st-meter__nombre\" [valeur]=\"valeur\" />\n } @else {\n <st-number class=\"st-meter__nombre\" [valeur]=\"nombres().valeur\" />\n }\n }\n @case ('total') {\n @if (total(); as valeur) {\n <st-money class=\"st-meter__total\" [valeur]=\"valeur\" />\n } @else {\n <st-number class=\"st-meter__total\" [valeur]=\"nombres().max\" />\n }\n }\n @default {\n <span class=\"st-meter__mot\">{{ morceau.texte }}</span>\n }\n }\n }\n }\n }\n </ng-content>\n</p>\n\n<!-- La semantique : un compteur natif, nomme par le libelle, decrit par la valeur dite. -->\n<meter\n class=\"st-meter__natif\"\n [attr.aria-labelledby]=\"idDuLibelle\"\n [attr.aria-describedby]=\"idDeLaValeur\"\n [attr.aria-valuetext]=\"texteMasque()\"\n [attr.min]=\"nombres().min\"\n [attr.max]=\"nombres().max\"\n [attr.value]=\"nombres().valeur\"\n [attr.low]=\"bas()\"\n [attr.high]=\"haut()\"\n [attr.optimum]=\"optimum()\"\n></meter>\n\n<!-- Le dessin : muet, la valeur est deja dite. -->\n<div class=\"st-meter__piste\" aria-hidden=\"true\">\n @if (variante() === 'puce') {\n @for (zone of zones(); track $index) {\n <span\n class=\"st-meter__zone\"\n [attr.data-qualite]=\"zone.qualite\"\n [style.inset-inline-start.%]=\"zone.debut * 100\"\n [style.inline-size.%]=\"(zone.fin - zone.debut) * 100\"\n ></span>\n }\n @if (partDuSeuil(); as seuil) {\n <span class=\"st-meter__seuil\" [style.inset-inline-start.%]=\"seuil * 100\"></span>\n }\n <span class=\"st-meter__marqueur\" [style.inset-inline-start.%]=\"part() * 100\"></span>\n } @else {\n <span class=\"st-meter__remplissage\" [style.inline-size.%]=\"part() * 100\"></span>\n }\n</div>\n\n@if (precision(); as texte) {\n <p class=\"st-meter__precision\">{{ texte }}</p>\n}\n",
|
|
2344
|
+
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{--st-meter-encre: var(--st-couleur-primaire);display:grid;gap:var(--st-espacement-2);min-inline-size:0}:host([data-ton=succes]){--st-meter-encre: var(--st-couleur-succes)}:host([data-ton=avertissement]){--st-meter-encre: var(--st-couleur-avertissement)}:host([data-ton=danger]){--st-meter-encre: var(--st-couleur-danger)}.st-meter__entete{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1) var(--st-espacement-3);align-items:baseline;justify-content:space-between}.st-meter__libelle{font-weight:var(--st-graisse-semi)}.st-meter__part{padding:var(--st-espacement-0) var(--st-espacement-2);font-family:var(--st-police-mono);font-size:var(--st-taille-sm);font-weight:var(--st-graisse-grasse);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-primaire);background:var(--st-couleur-primaire-discret);border-radius:var(--st-rayon-sm)}.st-meter__valeur,.st-meter__precision{margin:0;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}.st-meter__nombre,.st-meter__total{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-alignes)}.st-meter__nombre{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte)}.st-meter__natif{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.st-meter__piste{position:relative;display:block;block-size:var(--st-espacement-2);overflow:hidden;background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-meter__remplissage{display:block;block-size:100%;background:var(--st-meter-encre);border-radius:inherit}:host([data-variante=cellule]){gap:var(--st-espacement-1)}:host([data-variante=cellule]) .st-meter__entete{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([data-variante=cellule]) .st-meter__piste{block-size:var(--st-espacement-1-5)}:host([data-variante=puce]){grid-template-columns:minmax(0,1fr) auto;column-gap:var(--st-espacement-3);align-items:baseline}:host([data-variante=puce]) .st-meter__piste,:host([data-variante=puce]) .st-meter__precision{grid-column:1/-1}:host([data-variante=puce]) .st-meter__valeur{font-family:var(--st-police-mono)}:host([data-variante=puce]) .st-meter__piste{block-size:var(--st-espacement-6);background:var(--st-couleur-surface-conteneur-haut);border-radius:var(--st-rayon-sm)}.st-meter__zone{position:absolute;inset-block:0}.st-meter__zone[data-qualite=optimale]{background:var(--st-couleur-succes-discret)}.st-meter__zone[data-qualite=sous-optimale]{background:var(--st-couleur-avertissement-discret)}.st-meter__zone[data-qualite=pire]{background:var(--st-couleur-danger-discret)}.st-meter__marqueur{position:absolute;inset-block:var(--st-espacement-1);inline-size:var(--st-espacement-1-5);background:var(--st-meter-encre);border-radius:var(--st-rayon-xs);translate:-50% 0}.st-meter__seuil{position:absolute;inset-block:0;inline-size:var(--st-espacement-1);background:var(--st-couleur-danger);translate:-50% 0}:host(:dir(rtl)) .st-meter__marqueur,:host(:dir(rtl)) .st-meter__seuil{translate:50% 0}@media(forced-colors:active){.st-meter__piste{forced-color-adjust:none;background:Canvas;outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}.st-meter__remplissage,.st-meter__marqueur{background:Highlight}.st-meter__zone{background:Canvas;border-inline-end:var(--st-epaisseur-fine) dashed CanvasText}.st-meter__seuil{background:CanvasText}}@media print{.st-meter__piste{-webkit-print-color-adjust:exact;print-color-adjust:exact}}\n"]
|
|
2345
|
+
}]
|
|
2346
|
+
}],
|
|
2347
|
+
propDecorators: {
|
|
2348
|
+
libelle: [{
|
|
2349
|
+
type: i0.Input,
|
|
2350
|
+
args: [{
|
|
2351
|
+
isSignal: true,
|
|
2352
|
+
alias: "libelle",
|
|
2353
|
+
required: true
|
|
2354
|
+
}]
|
|
2355
|
+
}],
|
|
2356
|
+
valeur: [{
|
|
2357
|
+
type: i0.Input,
|
|
2358
|
+
args: [{
|
|
2359
|
+
isSignal: true,
|
|
2360
|
+
alias: "valeur",
|
|
2361
|
+
required: true
|
|
2362
|
+
}]
|
|
2363
|
+
}],
|
|
2364
|
+
max: [{
|
|
2365
|
+
type: i0.Input,
|
|
2366
|
+
args: [{
|
|
2367
|
+
isSignal: true,
|
|
2368
|
+
alias: "max",
|
|
2369
|
+
required: true
|
|
2370
|
+
}]
|
|
2371
|
+
}],
|
|
2372
|
+
min: [{
|
|
2373
|
+
type: i0.Input,
|
|
2374
|
+
args: [{
|
|
2375
|
+
isSignal: true,
|
|
2376
|
+
alias: "min",
|
|
2377
|
+
required: false
|
|
2378
|
+
}]
|
|
2379
|
+
}],
|
|
2380
|
+
bas: [{
|
|
2381
|
+
type: i0.Input,
|
|
2382
|
+
args: [{
|
|
2383
|
+
isSignal: true,
|
|
2384
|
+
alias: "bas",
|
|
2385
|
+
required: false
|
|
2386
|
+
}]
|
|
2387
|
+
}],
|
|
2388
|
+
haut: [{
|
|
2389
|
+
type: i0.Input,
|
|
2390
|
+
args: [{
|
|
2391
|
+
isSignal: true,
|
|
2392
|
+
alias: "haut",
|
|
2393
|
+
required: false
|
|
2394
|
+
}]
|
|
2395
|
+
}],
|
|
2396
|
+
optimum: [{
|
|
2397
|
+
type: i0.Input,
|
|
2398
|
+
args: [{
|
|
2399
|
+
isSignal: true,
|
|
2400
|
+
alias: "optimum",
|
|
2401
|
+
required: false
|
|
2402
|
+
}]
|
|
2403
|
+
}],
|
|
2404
|
+
seuil: [{
|
|
2405
|
+
type: i0.Input,
|
|
2406
|
+
args: [{
|
|
2407
|
+
isSignal: true,
|
|
2408
|
+
alias: "seuil",
|
|
2409
|
+
required: false
|
|
2410
|
+
}]
|
|
2411
|
+
}],
|
|
2412
|
+
devise: [{
|
|
2413
|
+
type: i0.Input,
|
|
2414
|
+
args: [{
|
|
2415
|
+
isSignal: true,
|
|
2416
|
+
alias: "devise",
|
|
2417
|
+
required: false
|
|
2418
|
+
}]
|
|
2419
|
+
}],
|
|
2420
|
+
affichage: [{
|
|
2421
|
+
type: i0.Input,
|
|
2422
|
+
args: [{
|
|
2423
|
+
isSignal: true,
|
|
2424
|
+
alias: "affichage",
|
|
2425
|
+
required: false
|
|
2426
|
+
}]
|
|
2427
|
+
}],
|
|
2428
|
+
precision: [{
|
|
2429
|
+
type: i0.Input,
|
|
2430
|
+
args: [{
|
|
2431
|
+
isSignal: true,
|
|
2432
|
+
alias: "precision",
|
|
2433
|
+
required: false
|
|
2434
|
+
}]
|
|
2435
|
+
}],
|
|
2436
|
+
variante: [{
|
|
2437
|
+
type: i0.Input,
|
|
2438
|
+
args: [{
|
|
2439
|
+
isSignal: true,
|
|
2440
|
+
alias: "variante",
|
|
2441
|
+
required: false
|
|
2442
|
+
}]
|
|
2443
|
+
}],
|
|
2444
|
+
ton: [{
|
|
2445
|
+
type: i0.Input,
|
|
2446
|
+
args: [{
|
|
2447
|
+
isSignal: true,
|
|
2448
|
+
alias: "ton",
|
|
2449
|
+
required: false
|
|
2450
|
+
}]
|
|
2451
|
+
}],
|
|
2452
|
+
partVisible: [{
|
|
2453
|
+
type: i0.Input,
|
|
2454
|
+
args: [{
|
|
2455
|
+
isSignal: true,
|
|
2456
|
+
alias: "partVisible",
|
|
2457
|
+
required: false
|
|
2458
|
+
}]
|
|
2459
|
+
}]
|
|
2460
|
+
}
|
|
2461
|
+
});
|
|
2462
|
+
const ICONE_D_ECHEANCE = {
|
|
2463
|
+
"a-temps": "horloge",
|
|
2464
|
+
urgente: "cercle-alerte",
|
|
2465
|
+
depassee: "cercle-croix"
|
|
2466
|
+
};
|
|
2467
|
+
const MINUTE = 6e4;
|
|
2468
|
+
var StDeadline = class StDeadline {
|
|
2469
|
+
document = inject(DOCUMENT);
|
|
2470
|
+
fuseau = inject(FUSEAU_PAR_DEFAUT);
|
|
2471
|
+
libelles = inject(ST_LIBELLES);
|
|
2472
|
+
echeance = input.required(...ngDevMode ? [{ debugName: "echeance" }] : /* istanbul ignore next */ []);
|
|
2473
|
+
libelle = input(null, ...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
2474
|
+
seuilUrgentEnMinutes = input(null, {
|
|
2475
|
+
...ngDevMode ? { debugName: "seuilUrgentEnMinutes" } : /* istanbul ignore next */ {},
|
|
2476
|
+
transform: (valeur) => valeur === null || valeur === void 0 ? null : numberAttribute(valeur)
|
|
2477
|
+
});
|
|
2478
|
+
absoluVisible = input(false, {
|
|
2479
|
+
...ngDevMode ? { debugName: "absoluVisible" } : /* istanbul ignore next */ {},
|
|
2480
|
+
transform: booleanAttribute
|
|
2481
|
+
});
|
|
2482
|
+
depassee = output();
|
|
2483
|
+
maintenant = signal(Date.now(), ...ngDevMode ? [{ debugName: "maintenant" }] : /* istanbul ignore next */ []);
|
|
2484
|
+
instant = computed(() => {
|
|
2485
|
+
const valeur = this.echeance();
|
|
2486
|
+
return valeur instanceof Date ? valeur.getTime() : lireInstant(valeur, this.fuseau) ?? NaN;
|
|
2487
|
+
}, ...ngDevMode ? [{ debugName: "instant" }] : /* istanbul ignore next */ []);
|
|
2488
|
+
dateDeLEcheance = computed(() => new Date(this.instant()), ...ngDevMode ? [{ debugName: "dateDeLEcheance" }] : /* istanbul ignore next */ []);
|
|
2489
|
+
etat = computed(() => {
|
|
2490
|
+
const reste = this.instant() - this.maintenant();
|
|
2491
|
+
if (reste <= 0) return "depassee";
|
|
2492
|
+
const seuil = this.seuilUrgentEnMinutes();
|
|
2493
|
+
return seuil !== null && reste <= seuil * MINUTE ? "urgente" : "a-temps";
|
|
2494
|
+
}, ...ngDevMode ? [{ debugName: "etat" }] : /* istanbul ignore next */ []);
|
|
2495
|
+
icone = computed(() => ICONE_D_ECHEANCE[this.etat()], ...ngDevMode ? [{ debugName: "icone" }] : /* istanbul ignore next */ []);
|
|
2496
|
+
mot = computed(() => {
|
|
2497
|
+
const libelles = this.libelles();
|
|
2498
|
+
switch (this.etat()) {
|
|
2499
|
+
case "depassee": return libelles.echeanceDepassee;
|
|
2500
|
+
case "urgente": return libelles.echeanceUrgente;
|
|
2501
|
+
default: return libelles.echeanceATemps;
|
|
2502
|
+
}
|
|
2503
|
+
}, ...ngDevMode ? [{ debugName: "mot" }] : /* istanbul ignore next */ []);
|
|
2504
|
+
constructor() {
|
|
2505
|
+
const vue = this.document.defaultView;
|
|
2506
|
+
let minuterie = null;
|
|
2507
|
+
const relire = () => {
|
|
2508
|
+
this.maintenant.set(Date.now());
|
|
2509
|
+
};
|
|
2510
|
+
const demarrer = () => {
|
|
2511
|
+
if (minuterie !== null || this.document.visibilityState === "hidden") return;
|
|
2512
|
+
minuterie = setInterval(relire, MINUTE);
|
|
2513
|
+
};
|
|
2514
|
+
const arreter = () => {
|
|
2515
|
+
if (minuterie !== null) clearInterval(minuterie);
|
|
2516
|
+
minuterie = null;
|
|
2517
|
+
};
|
|
2518
|
+
const auChangementDeVisibilite = () => {
|
|
2519
|
+
if (this.document.visibilityState === "hidden") {
|
|
2520
|
+
arreter();
|
|
2521
|
+
return;
|
|
2522
|
+
}
|
|
2523
|
+
relire();
|
|
2524
|
+
demarrer();
|
|
2525
|
+
};
|
|
2526
|
+
if (vue !== null) {
|
|
2527
|
+
demarrer();
|
|
2528
|
+
this.document.addEventListener("visibilitychange", auChangementDeVisibilite);
|
|
2529
|
+
}
|
|
2530
|
+
inject(DestroyRef).onDestroy(() => {
|
|
2531
|
+
arreter();
|
|
2532
|
+
this.document.removeEventListener("visibilitychange", auChangementDeVisibilite);
|
|
2533
|
+
});
|
|
2534
|
+
let precedent = null;
|
|
2535
|
+
effect(() => {
|
|
2536
|
+
const etat = this.etat();
|
|
2537
|
+
untracked(() => {
|
|
2538
|
+
if (precedent !== null && precedent !== "depassee" && etat === "depassee") this.depassee.emit();
|
|
2539
|
+
precedent = etat;
|
|
2540
|
+
});
|
|
2541
|
+
});
|
|
2542
|
+
}
|
|
2543
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2544
|
+
minVersion: "12.0.0",
|
|
2545
|
+
version: "22.2.0",
|
|
2546
|
+
ngImport: i0,
|
|
2547
|
+
type: StDeadline,
|
|
2548
|
+
deps: [],
|
|
2549
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2550
|
+
});
|
|
2551
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2552
|
+
minVersion: "17.0.0",
|
|
2553
|
+
version: "22.2.0",
|
|
2554
|
+
type: StDeadline,
|
|
2555
|
+
isStandalone: true,
|
|
2556
|
+
selector: "st-deadline",
|
|
2557
|
+
inputs: {
|
|
2558
|
+
echeance: {
|
|
2559
|
+
classPropertyName: "echeance",
|
|
2560
|
+
publicName: "echeance",
|
|
2561
|
+
isSignal: true,
|
|
2562
|
+
isRequired: true,
|
|
2563
|
+
transformFunction: null
|
|
2564
|
+
},
|
|
2565
|
+
libelle: {
|
|
2566
|
+
classPropertyName: "libelle",
|
|
2567
|
+
publicName: "libelle",
|
|
2568
|
+
isSignal: true,
|
|
2569
|
+
isRequired: false,
|
|
2570
|
+
transformFunction: null
|
|
2571
|
+
},
|
|
2572
|
+
seuilUrgentEnMinutes: {
|
|
2573
|
+
classPropertyName: "seuilUrgentEnMinutes",
|
|
2574
|
+
publicName: "seuilUrgentEnMinutes",
|
|
2575
|
+
isSignal: true,
|
|
2576
|
+
isRequired: false,
|
|
2577
|
+
transformFunction: null
|
|
2578
|
+
},
|
|
2579
|
+
absoluVisible: {
|
|
2580
|
+
classPropertyName: "absoluVisible",
|
|
2581
|
+
publicName: "absoluVisible",
|
|
2582
|
+
isSignal: true,
|
|
2583
|
+
isRequired: false,
|
|
2584
|
+
transformFunction: null
|
|
2585
|
+
}
|
|
2586
|
+
},
|
|
2587
|
+
outputs: { depassee: "depassee" },
|
|
2588
|
+
host: {
|
|
2589
|
+
properties: { "attr.data-etat": "etat()" },
|
|
2590
|
+
classAttribute: "st-deadline"
|
|
2591
|
+
},
|
|
2592
|
+
ngImport: i0,
|
|
2593
|
+
template: "<st-icon class=\"st-deadline__icone\" [icone]=\"icone()\" taille=\"sm\" />\n@if (libelle(); as texte) {\n <span class=\"st-deadline__libelle\">{{ texte }}</span>\n}\n<!-- Le delai, qui se reecrit seul ; son nom porte la date absolue, qui ne bouge pas. -->\n<st-relative-time\n class=\"st-deadline__delai\"\n [valeur]=\"dateDeLEcheance()\"\n [avecAbsolu]=\"absoluVisible()\"\n/>\n<!-- L'etat en MOT, jamais par la seule couleur. -->\n<span class=\"st-deadline__etat\">{{ mot() }}</span>\n",
|
|
2594
|
+
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{--st-deadline-encre: var(--st-couleur-texte-discret);--st-deadline-fond: var(--st-couleur-surface-enfoncee);display:inline-flex;flex-wrap:wrap;gap:var(--st-espacement-1) var(--st-espacement-2);align-items:center;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte)}:host([data-etat=urgente]){--st-deadline-encre: var(--st-couleur-avertissement);--st-deadline-fond: var(--st-couleur-avertissement-discret)}:host([data-etat=depassee]){--st-deadline-encre: var(--st-couleur-danger);--st-deadline-fond: var(--st-couleur-danger-discret)}.st-deadline__icone{flex:none;color:var(--st-deadline-encre)}.st-deadline__libelle{font-weight:var(--st-graisse-semi)}.st-deadline__delai{font-variant-numeric:var(--st-chiffres-alignes)}.st-deadline__etat{padding:var(--st-espacement-0) var(--st-espacement-2);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);color:var(--st-deadline-encre);background:var(--st-deadline-fond);border-radius:var(--st-rayon-pleine)}@media(forced-colors:active){.st-deadline__etat{border:var(--st-epaisseur-fine) solid CanvasText}}\n"],
|
|
2595
|
+
dependencies: [{
|
|
2596
|
+
kind: "component",
|
|
2597
|
+
type: StIcon,
|
|
2598
|
+
selector: "st-icon",
|
|
2599
|
+
inputs: [
|
|
2600
|
+
"icone",
|
|
2601
|
+
"nom",
|
|
2602
|
+
"variante",
|
|
2603
|
+
"sprite",
|
|
2604
|
+
"nomMetier",
|
|
2605
|
+
"taille",
|
|
2606
|
+
"ton",
|
|
2607
|
+
"etiquette",
|
|
2608
|
+
"miroir"
|
|
2609
|
+
]
|
|
2610
|
+
}, {
|
|
2611
|
+
kind: "component",
|
|
2612
|
+
type: StRelativeTime,
|
|
2613
|
+
selector: "st-relative-time",
|
|
2614
|
+
inputs: [
|
|
2615
|
+
"valeur",
|
|
2616
|
+
"rafraichir",
|
|
2617
|
+
"ton",
|
|
2618
|
+
"avecAbsolu",
|
|
2619
|
+
"seuilAbsoluEnJours"
|
|
2620
|
+
]
|
|
2621
|
+
}],
|
|
2622
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2623
|
+
});
|
|
2624
|
+
};
|
|
2625
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2626
|
+
minVersion: "12.0.0",
|
|
2627
|
+
version: "22.2.0",
|
|
2628
|
+
ngImport: i0,
|
|
2629
|
+
type: StDeadline,
|
|
2630
|
+
decorators: [{
|
|
2631
|
+
type: Component,
|
|
2632
|
+
args: [{
|
|
2633
|
+
selector: "st-deadline",
|
|
2634
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2635
|
+
imports: [StIcon, StRelativeTime],
|
|
2636
|
+
host: {
|
|
2637
|
+
class: "st-deadline",
|
|
2638
|
+
"[attr.data-etat]": "etat()"
|
|
2639
|
+
},
|
|
2640
|
+
template: "<st-icon class=\"st-deadline__icone\" [icone]=\"icone()\" taille=\"sm\" />\n@if (libelle(); as texte) {\n <span class=\"st-deadline__libelle\">{{ texte }}</span>\n}\n<!-- Le delai, qui se reecrit seul ; son nom porte la date absolue, qui ne bouge pas. -->\n<st-relative-time\n class=\"st-deadline__delai\"\n [valeur]=\"dateDeLEcheance()\"\n [avecAbsolu]=\"absoluVisible()\"\n/>\n<!-- L'etat en MOT, jamais par la seule couleur. -->\n<span class=\"st-deadline__etat\">{{ mot() }}</span>\n",
|
|
2641
|
+
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{--st-deadline-encre: var(--st-couleur-texte-discret);--st-deadline-fond: var(--st-couleur-surface-enfoncee);display:inline-flex;flex-wrap:wrap;gap:var(--st-espacement-1) var(--st-espacement-2);align-items:center;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte)}:host([data-etat=urgente]){--st-deadline-encre: var(--st-couleur-avertissement);--st-deadline-fond: var(--st-couleur-avertissement-discret)}:host([data-etat=depassee]){--st-deadline-encre: var(--st-couleur-danger);--st-deadline-fond: var(--st-couleur-danger-discret)}.st-deadline__icone{flex:none;color:var(--st-deadline-encre)}.st-deadline__libelle{font-weight:var(--st-graisse-semi)}.st-deadline__delai{font-variant-numeric:var(--st-chiffres-alignes)}.st-deadline__etat{padding:var(--st-espacement-0) var(--st-espacement-2);font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);color:var(--st-deadline-encre);background:var(--st-deadline-fond);border-radius:var(--st-rayon-pleine)}@media(forced-colors:active){.st-deadline__etat{border:var(--st-epaisseur-fine) solid CanvasText}}\n"]
|
|
2642
|
+
}]
|
|
2643
|
+
}],
|
|
2644
|
+
ctorParameters: () => [],
|
|
2645
|
+
propDecorators: {
|
|
2646
|
+
echeance: [{
|
|
2647
|
+
type: i0.Input,
|
|
2648
|
+
args: [{
|
|
2649
|
+
isSignal: true,
|
|
2650
|
+
alias: "echeance",
|
|
2651
|
+
required: true
|
|
2652
|
+
}]
|
|
2653
|
+
}],
|
|
2654
|
+
libelle: [{
|
|
2655
|
+
type: i0.Input,
|
|
2656
|
+
args: [{
|
|
2657
|
+
isSignal: true,
|
|
2658
|
+
alias: "libelle",
|
|
2659
|
+
required: false
|
|
2660
|
+
}]
|
|
2661
|
+
}],
|
|
2662
|
+
seuilUrgentEnMinutes: [{
|
|
2663
|
+
type: i0.Input,
|
|
2664
|
+
args: [{
|
|
2665
|
+
isSignal: true,
|
|
2666
|
+
alias: "seuilUrgentEnMinutes",
|
|
2667
|
+
required: false
|
|
2668
|
+
}]
|
|
2669
|
+
}],
|
|
2670
|
+
absoluVisible: [{
|
|
2671
|
+
type: i0.Input,
|
|
2672
|
+
args: [{
|
|
2673
|
+
isSignal: true,
|
|
2674
|
+
alias: "absoluVisible",
|
|
2675
|
+
required: false
|
|
2676
|
+
}]
|
|
2677
|
+
}],
|
|
2678
|
+
depassee: [{
|
|
2679
|
+
type: i0.Output,
|
|
2680
|
+
args: ["depassee"]
|
|
2681
|
+
}]
|
|
2682
|
+
}
|
|
2683
|
+
});
|
|
2684
|
+
var StPerson = class StPerson {
|
|
2685
|
+
libelles = inject(ST_LIBELLES);
|
|
2686
|
+
nom = input.required(...ngDevMode ? [{ debugName: "nom" }] : /* istanbul ignore next */ []);
|
|
2687
|
+
precision = input(null, ...ngDevMode ? [{ debugName: "precision" }] : /* istanbul ignore next */ []);
|
|
2688
|
+
nomAffiche = computed(() => sansCommandesDeDirection(this.nom()), ...ngDevMode ? [{ debugName: "nomAffiche" }] : /* istanbul ignore next */ []);
|
|
2689
|
+
precisionAffichee = computed(() => {
|
|
2690
|
+
const precision = this.precision();
|
|
2691
|
+
return precision === null ? null : sansCommandesDeDirection(precision);
|
|
2692
|
+
}, ...ngDevMode ? [{ debugName: "precisionAffichee" }] : /* istanbul ignore next */ []);
|
|
2693
|
+
sourceImage = input(null, ...ngDevMode ? [{ debugName: "sourceImage" }] : /* istanbul ignore next */ []);
|
|
2694
|
+
lien = input(null, ...ngDevMode ? [{ debugName: "lien" }] : /* istanbul ignore next */ []);
|
|
2695
|
+
taille = input("md", ...ngDevMode ? [{ debugName: "taille" }] : /* istanbul ignore next */ []);
|
|
2696
|
+
disposition = input("ligne", ...ngDevMode ? [{ debugName: "disposition" }] : /* istanbul ignore next */ []);
|
|
2697
|
+
ton = input("primaire", ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
2698
|
+
soi = input(false, {
|
|
2699
|
+
...ngDevMode ? { debugName: "soi" } : /* istanbul ignore next */ {},
|
|
2700
|
+
transform: booleanAttribute
|
|
2701
|
+
});
|
|
2702
|
+
tailleDeLAvatar = computed(() => this.taille() === "sm" ? "xs" : "sm", ...ngDevMode ? [{ debugName: "tailleDeLAvatar" }] : /* istanbul ignore next */ []);
|
|
2703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2704
|
+
minVersion: "12.0.0",
|
|
2705
|
+
version: "22.2.0",
|
|
2706
|
+
ngImport: i0,
|
|
2707
|
+
type: StPerson,
|
|
2708
|
+
deps: [],
|
|
2709
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2710
|
+
});
|
|
2711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2712
|
+
minVersion: "17.0.0",
|
|
2713
|
+
version: "22.2.0",
|
|
2714
|
+
type: StPerson,
|
|
2715
|
+
isStandalone: true,
|
|
2716
|
+
selector: "st-person",
|
|
2717
|
+
inputs: {
|
|
2718
|
+
nom: {
|
|
2719
|
+
classPropertyName: "nom",
|
|
2720
|
+
publicName: "nom",
|
|
2721
|
+
isSignal: true,
|
|
2722
|
+
isRequired: true,
|
|
2723
|
+
transformFunction: null
|
|
2724
|
+
},
|
|
2725
|
+
precision: {
|
|
2726
|
+
classPropertyName: "precision",
|
|
2727
|
+
publicName: "precision",
|
|
2728
|
+
isSignal: true,
|
|
2729
|
+
isRequired: false,
|
|
2730
|
+
transformFunction: null
|
|
2731
|
+
},
|
|
2732
|
+
sourceImage: {
|
|
2733
|
+
classPropertyName: "sourceImage",
|
|
2734
|
+
publicName: "sourceImage",
|
|
2735
|
+
isSignal: true,
|
|
2736
|
+
isRequired: false,
|
|
2737
|
+
transformFunction: null
|
|
2738
|
+
},
|
|
2739
|
+
lien: {
|
|
2740
|
+
classPropertyName: "lien",
|
|
2741
|
+
publicName: "lien",
|
|
2742
|
+
isSignal: true,
|
|
2743
|
+
isRequired: false,
|
|
2744
|
+
transformFunction: null
|
|
2745
|
+
},
|
|
2746
|
+
taille: {
|
|
2747
|
+
classPropertyName: "taille",
|
|
2748
|
+
publicName: "taille",
|
|
2749
|
+
isSignal: true,
|
|
2750
|
+
isRequired: false,
|
|
2751
|
+
transformFunction: null
|
|
2752
|
+
},
|
|
2753
|
+
disposition: {
|
|
2754
|
+
classPropertyName: "disposition",
|
|
2755
|
+
publicName: "disposition",
|
|
2756
|
+
isSignal: true,
|
|
2757
|
+
isRequired: false,
|
|
2758
|
+
transformFunction: null
|
|
2759
|
+
},
|
|
2760
|
+
ton: {
|
|
2761
|
+
classPropertyName: "ton",
|
|
2762
|
+
publicName: "ton",
|
|
2763
|
+
isSignal: true,
|
|
2764
|
+
isRequired: false,
|
|
2765
|
+
transformFunction: null
|
|
2766
|
+
},
|
|
2767
|
+
soi: {
|
|
2768
|
+
classPropertyName: "soi",
|
|
2769
|
+
publicName: "soi",
|
|
2770
|
+
isSignal: true,
|
|
2771
|
+
isRequired: false,
|
|
2772
|
+
transformFunction: null
|
|
2773
|
+
}
|
|
2774
|
+
},
|
|
2775
|
+
host: {
|
|
2776
|
+
properties: {
|
|
2777
|
+
"attr.data-taille": "taille()",
|
|
2778
|
+
"attr.data-disposition": "disposition()"
|
|
2779
|
+
},
|
|
2780
|
+
classAttribute: "st-person"
|
|
2781
|
+
},
|
|
2782
|
+
ngImport: i0,
|
|
2783
|
+
template: "<!-- Decoratif : le nom est a cote, en texte. -->\n<st-avatar\n class=\"st-person__avatar\"\n variante=\"pleine\"\n nomAdjacent\n [nom]=\"nomAffiche()\"\n [sourceImage]=\"sourceImage()\"\n [taille]=\"tailleDeLAvatar()\"\n [ton]=\"ton()\"\n/>\n<span class=\"st-person__textes\">\n <span class=\"st-person__ligne\">\n @if (lien(); as route) {\n <a stLink class=\"st-person__nom\" dir=\"auto\" [routerLink]=\"route\">{{ nomAffiche() }}</a>\n } @else {\n <span class=\"st-person__nom\" dir=\"auto\">{{ nomAffiche() }}</span>\n }\n @if (soi()) {\n <span class=\"st-person__soi\">{{ libelles().vous }}</span>\n }\n </span>\n @if (precisionAffichee(); as texte) {\n <span class=\"st-person__precision\" dir=\"auto\">{{ texte }}</span>\n }\n</span>\n",
|
|
2784
|
+
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:inline-flex;gap:var(--st-espacement-3);align-items:center;min-inline-size:0}:host([data-taille=sm]){gap:var(--st-espacement-2)}:host([data-disposition=colonne]){flex-direction:column;text-align:center}.st-person__avatar{flex:none}.st-person__textes{display:grid;min-inline-size:0}.st-person__ligne{display:inline-flex;flex-wrap:wrap;gap:var(--st-espacement-1);align-items:baseline}.st-person__nom{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte);overflow-wrap:anywhere}a.st-person__nom{color:var(--st-couleur-texte-primaire)}.st-person__soi,.st-person__precision{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}:host([data-taille=sm]) .st-person__precision{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}\n"],
|
|
2785
|
+
dependencies: [
|
|
2786
|
+
{
|
|
2787
|
+
kind: "directive",
|
|
2788
|
+
type: RouterLink,
|
|
2789
|
+
selector: "[routerLink]",
|
|
2790
|
+
inputs: [
|
|
2791
|
+
"target",
|
|
2792
|
+
"queryParams",
|
|
2793
|
+
"fragment",
|
|
2794
|
+
"queryParamsHandling",
|
|
2795
|
+
"state",
|
|
2796
|
+
"info",
|
|
2797
|
+
"relativeTo",
|
|
2798
|
+
"preserveFragment",
|
|
2799
|
+
"skipLocationChange",
|
|
2800
|
+
"replaceUrl",
|
|
2801
|
+
"browserUrl",
|
|
2802
|
+
"routerLink"
|
|
2803
|
+
]
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
kind: "component",
|
|
2807
|
+
type: StAvatar,
|
|
2808
|
+
selector: "st-avatar",
|
|
2809
|
+
inputs: [
|
|
2810
|
+
"nom",
|
|
2811
|
+
"sourceImage",
|
|
2812
|
+
"taille",
|
|
2813
|
+
"forme",
|
|
2814
|
+
"ton",
|
|
2815
|
+
"variante",
|
|
2816
|
+
"nomAdjacent"
|
|
2817
|
+
]
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
kind: "component",
|
|
2821
|
+
type: StLink,
|
|
2822
|
+
selector: "a[stLink]",
|
|
2823
|
+
inputs: [
|
|
2824
|
+
"variante",
|
|
2825
|
+
"externe",
|
|
2826
|
+
"mentionExterne",
|
|
2827
|
+
"iconeAvant",
|
|
2828
|
+
"iconeApres"
|
|
2829
|
+
]
|
|
2830
|
+
}
|
|
2831
|
+
],
|
|
2832
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2833
|
+
});
|
|
2834
|
+
};
|
|
2835
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2836
|
+
minVersion: "12.0.0",
|
|
2837
|
+
version: "22.2.0",
|
|
2838
|
+
ngImport: i0,
|
|
2839
|
+
type: StPerson,
|
|
2840
|
+
decorators: [{
|
|
2841
|
+
type: Component,
|
|
2842
|
+
args: [{
|
|
2843
|
+
selector: "st-person",
|
|
2844
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2845
|
+
imports: [
|
|
2846
|
+
RouterLink,
|
|
2847
|
+
StAvatar,
|
|
2848
|
+
StLink
|
|
2849
|
+
],
|
|
2850
|
+
host: {
|
|
2851
|
+
class: "st-person",
|
|
2852
|
+
"[attr.data-taille]": "taille()",
|
|
2853
|
+
"[attr.data-disposition]": "disposition()"
|
|
2854
|
+
},
|
|
2855
|
+
template: "<!-- Decoratif : le nom est a cote, en texte. -->\n<st-avatar\n class=\"st-person__avatar\"\n variante=\"pleine\"\n nomAdjacent\n [nom]=\"nomAffiche()\"\n [sourceImage]=\"sourceImage()\"\n [taille]=\"tailleDeLAvatar()\"\n [ton]=\"ton()\"\n/>\n<span class=\"st-person__textes\">\n <span class=\"st-person__ligne\">\n @if (lien(); as route) {\n <a stLink class=\"st-person__nom\" dir=\"auto\" [routerLink]=\"route\">{{ nomAffiche() }}</a>\n } @else {\n <span class=\"st-person__nom\" dir=\"auto\">{{ nomAffiche() }}</span>\n }\n @if (soi()) {\n <span class=\"st-person__soi\">{{ libelles().vous }}</span>\n }\n </span>\n @if (precisionAffichee(); as texte) {\n <span class=\"st-person__precision\" dir=\"auto\">{{ texte }}</span>\n }\n</span>\n",
|
|
2856
|
+
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:inline-flex;gap:var(--st-espacement-3);align-items:center;min-inline-size:0}:host([data-taille=sm]){gap:var(--st-espacement-2)}:host([data-disposition=colonne]){flex-direction:column;text-align:center}.st-person__avatar{flex:none}.st-person__textes{display:grid;min-inline-size:0}.st-person__ligne{display:inline-flex;flex-wrap:wrap;gap:var(--st-espacement-1);align-items:baseline}.st-person__nom{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte);overflow-wrap:anywhere}a.st-person__nom{color:var(--st-couleur-texte-primaire)}.st-person__soi,.st-person__precision{font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm);color:var(--st-couleur-texte-discret)}:host([data-taille=sm]) .st-person__precision{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}\n"]
|
|
2857
|
+
}]
|
|
2858
|
+
}],
|
|
2859
|
+
propDecorators: {
|
|
2860
|
+
nom: [{
|
|
2861
|
+
type: i0.Input,
|
|
2862
|
+
args: [{
|
|
2863
|
+
isSignal: true,
|
|
2864
|
+
alias: "nom",
|
|
2865
|
+
required: true
|
|
2866
|
+
}]
|
|
2867
|
+
}],
|
|
2868
|
+
precision: [{
|
|
2869
|
+
type: i0.Input,
|
|
2870
|
+
args: [{
|
|
2871
|
+
isSignal: true,
|
|
2872
|
+
alias: "precision",
|
|
2873
|
+
required: false
|
|
2874
|
+
}]
|
|
2875
|
+
}],
|
|
2876
|
+
sourceImage: [{
|
|
2877
|
+
type: i0.Input,
|
|
2878
|
+
args: [{
|
|
2879
|
+
isSignal: true,
|
|
2880
|
+
alias: "sourceImage",
|
|
2881
|
+
required: false
|
|
2882
|
+
}]
|
|
2883
|
+
}],
|
|
2884
|
+
lien: [{
|
|
2885
|
+
type: i0.Input,
|
|
2886
|
+
args: [{
|
|
2887
|
+
isSignal: true,
|
|
2888
|
+
alias: "lien",
|
|
2889
|
+
required: false
|
|
2890
|
+
}]
|
|
2891
|
+
}],
|
|
2892
|
+
taille: [{
|
|
2893
|
+
type: i0.Input,
|
|
2894
|
+
args: [{
|
|
2895
|
+
isSignal: true,
|
|
2896
|
+
alias: "taille",
|
|
2897
|
+
required: false
|
|
2898
|
+
}]
|
|
2899
|
+
}],
|
|
2900
|
+
disposition: [{
|
|
2901
|
+
type: i0.Input,
|
|
2902
|
+
args: [{
|
|
2903
|
+
isSignal: true,
|
|
2904
|
+
alias: "disposition",
|
|
2905
|
+
required: false
|
|
2906
|
+
}]
|
|
2907
|
+
}],
|
|
2908
|
+
ton: [{
|
|
2909
|
+
type: i0.Input,
|
|
2910
|
+
args: [{
|
|
2911
|
+
isSignal: true,
|
|
2912
|
+
alias: "ton",
|
|
2913
|
+
required: false
|
|
2914
|
+
}]
|
|
2915
|
+
}],
|
|
2916
|
+
soi: [{
|
|
2917
|
+
type: i0.Input,
|
|
2918
|
+
args: [{
|
|
2919
|
+
isSignal: true,
|
|
2920
|
+
alias: "soi",
|
|
2921
|
+
required: false
|
|
2922
|
+
}]
|
|
2923
|
+
}]
|
|
2924
|
+
}
|
|
2925
|
+
});
|
|
2926
|
+
var StAvatarGroup = class StAvatarGroup {
|
|
2927
|
+
libelles = inject(ST_LIBELLES);
|
|
2928
|
+
locale = inject(ST_LOCALE);
|
|
2929
|
+
personnes = input.required(...ngDevMode ? [{ debugName: "personnes" }] : /* istanbul ignore next */ []);
|
|
2930
|
+
etiquette = input.required(...ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []);
|
|
2931
|
+
max = input(4, {
|
|
2932
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
2933
|
+
transform: numberAttribute
|
|
2934
|
+
});
|
|
2935
|
+
taille = input("sm", ...ngDevMode ? [{ debugName: "taille" }] : /* istanbul ignore next */ []);
|
|
2936
|
+
reste = output();
|
|
2937
|
+
montrees = computed(() => {
|
|
2938
|
+
const personnes = this.personnes();
|
|
2939
|
+
const max = Math.max(1, this.max());
|
|
2940
|
+
return personnes.length <= max ? personnes : personnes.slice(0, max - 1);
|
|
2941
|
+
}, ...ngDevMode ? [{ debugName: "montrees" }] : /* istanbul ignore next */ []);
|
|
2942
|
+
surplus = computed(() => this.personnes().length - this.montrees().length, ...ngDevMode ? [{ debugName: "surplus" }] : /* istanbul ignore next */ []);
|
|
2943
|
+
surplusAffiche = computed(() => new Intl.NumberFormat(this.locale(), { signDisplay: "always" }).format(this.surplus()), ...ngDevMode ? [{ debugName: "surplusAffiche" }] : /* istanbul ignore next */ []);
|
|
2944
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2945
|
+
minVersion: "12.0.0",
|
|
2946
|
+
version: "22.2.0",
|
|
2947
|
+
ngImport: i0,
|
|
2948
|
+
type: StAvatarGroup,
|
|
2949
|
+
deps: [],
|
|
2950
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2951
|
+
});
|
|
2952
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2953
|
+
minVersion: "17.0.0",
|
|
2954
|
+
version: "22.2.0",
|
|
2955
|
+
type: StAvatarGroup,
|
|
2956
|
+
isStandalone: true,
|
|
2957
|
+
selector: "st-avatar-group",
|
|
2958
|
+
inputs: {
|
|
2959
|
+
personnes: {
|
|
2960
|
+
classPropertyName: "personnes",
|
|
2961
|
+
publicName: "personnes",
|
|
2962
|
+
isSignal: true,
|
|
2963
|
+
isRequired: true,
|
|
2964
|
+
transformFunction: null
|
|
2965
|
+
},
|
|
2966
|
+
etiquette: {
|
|
2967
|
+
classPropertyName: "etiquette",
|
|
2968
|
+
publicName: "etiquette",
|
|
2969
|
+
isSignal: true,
|
|
2970
|
+
isRequired: true,
|
|
2971
|
+
transformFunction: null
|
|
2972
|
+
},
|
|
2973
|
+
max: {
|
|
2974
|
+
classPropertyName: "max",
|
|
2975
|
+
publicName: "max",
|
|
2976
|
+
isSignal: true,
|
|
2977
|
+
isRequired: false,
|
|
2978
|
+
transformFunction: null
|
|
2979
|
+
},
|
|
2980
|
+
taille: {
|
|
2981
|
+
classPropertyName: "taille",
|
|
2982
|
+
publicName: "taille",
|
|
2983
|
+
isSignal: true,
|
|
2984
|
+
isRequired: false,
|
|
2985
|
+
transformFunction: null
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
outputs: { reste: "reste" },
|
|
2989
|
+
host: {
|
|
2990
|
+
properties: { "attr.data-taille": "taille()" },
|
|
2991
|
+
classAttribute: "st-avatar-group"
|
|
2992
|
+
},
|
|
2993
|
+
ngImport: i0,
|
|
2994
|
+
template: "<ul class=\"st-avatar-group__liste\" role=\"list\" [attr.aria-label]=\"etiquette()\">\n @for (personne of montrees(); track $index) {\n <li class=\"st-avatar-group__membre\">\n <st-avatar\n [nom]=\"personne.nom\"\n [sourceImage]=\"personne.sourceImage ?? null\"\n [taille]=\"taille()\"\n [nomAdjacent]=\"false\"\n />\n </li>\n }\n @if (surplus() > 0) {\n <li class=\"st-avatar-group__membre\">\n <!-- « +3 » a l'ecran, « 3 autres personnes » a l'oreille : le nombre est dans les deux. -->\n <button type=\"button\" class=\"st-avatar-group__reste\" (click)=\"reste.emit()\">\n <span aria-hidden=\"true\">{{ surplusAffiche() }}</span>\n <span class=\"st-vh\">{{ libelles().autresPersonnes(surplus()) }}</span>\n </button>\n </li>\n }\n</ul>\n",
|
|
2995
|
+
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{--st-avatar-group-taille: var(--st-espacement-8);display:inline-block}:host([data-taille=xs]){--st-avatar-group-taille: var(--st-espacement-6)}:host([data-taille=md]){--st-avatar-group-taille: var(--st-espacement-10)}.st-avatar-group__liste{display:flex;align-items:center;padding:0;padding-inline-start:calc(var(--st-avatar-group-taille) / 4);margin:0;list-style:none}.st-avatar-group__membre{display:inline-flex;margin-inline-start:calc(var(--st-avatar-group-taille) / -4);border-radius:var(--st-rayon-pleine);box-shadow:0 0 0 var(--st-epaisseur-moyenne) var(--st-couleur-surface)}.st-avatar-group__reste: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-avatar-group__reste{position:relative;display:inline-grid;place-items:center;inline-size:var(--st-avatar-group-taille);block-size:var(--st-avatar-group-taille);padding:0;font:inherit;font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte);cursor:pointer;background:var(--st-couleur-surface-enfoncee);border:0;border-radius:var(--st-rayon-pleine)}.st-avatar-group__reste:before{position:absolute;inset:calc((var(--st-avatar-group-taille) - var(--st-cible-tactile-min)) / 2);content:\"\"}@media(hover:hover){.st-avatar-group__reste:hover{background:var(--st-couleur-surface-survol)}}@media(forced-colors:active){.st-avatar-group__reste{border:var(--st-epaisseur-fine) solid ButtonText}}\n"],
|
|
2996
|
+
dependencies: [{
|
|
2997
|
+
kind: "component",
|
|
2998
|
+
type: StAvatar,
|
|
2999
|
+
selector: "st-avatar",
|
|
3000
|
+
inputs: [
|
|
3001
|
+
"nom",
|
|
3002
|
+
"sourceImage",
|
|
3003
|
+
"taille",
|
|
3004
|
+
"forme",
|
|
3005
|
+
"ton",
|
|
3006
|
+
"variante",
|
|
3007
|
+
"nomAdjacent"
|
|
3008
|
+
]
|
|
3009
|
+
}],
|
|
3010
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
3011
|
+
});
|
|
3012
|
+
};
|
|
3013
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
3014
|
+
minVersion: "12.0.0",
|
|
3015
|
+
version: "22.2.0",
|
|
3016
|
+
ngImport: i0,
|
|
3017
|
+
type: StAvatarGroup,
|
|
3018
|
+
decorators: [{
|
|
3019
|
+
type: Component,
|
|
3020
|
+
args: [{
|
|
3021
|
+
selector: "st-avatar-group",
|
|
3022
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3023
|
+
imports: [StAvatar],
|
|
3024
|
+
host: {
|
|
3025
|
+
class: "st-avatar-group",
|
|
3026
|
+
"[attr.data-taille]": "taille()"
|
|
3027
|
+
},
|
|
3028
|
+
template: "<ul class=\"st-avatar-group__liste\" role=\"list\" [attr.aria-label]=\"etiquette()\">\n @for (personne of montrees(); track $index) {\n <li class=\"st-avatar-group__membre\">\n <st-avatar\n [nom]=\"personne.nom\"\n [sourceImage]=\"personne.sourceImage ?? null\"\n [taille]=\"taille()\"\n [nomAdjacent]=\"false\"\n />\n </li>\n }\n @if (surplus() > 0) {\n <li class=\"st-avatar-group__membre\">\n <!-- « +3 » a l'ecran, « 3 autres personnes » a l'oreille : le nombre est dans les deux. -->\n <button type=\"button\" class=\"st-avatar-group__reste\" (click)=\"reste.emit()\">\n <span aria-hidden=\"true\">{{ surplusAffiche() }}</span>\n <span class=\"st-vh\">{{ libelles().autresPersonnes(surplus()) }}</span>\n </button>\n </li>\n }\n</ul>\n",
|
|
3029
|
+
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{--st-avatar-group-taille: var(--st-espacement-8);display:inline-block}:host([data-taille=xs]){--st-avatar-group-taille: var(--st-espacement-6)}:host([data-taille=md]){--st-avatar-group-taille: var(--st-espacement-10)}.st-avatar-group__liste{display:flex;align-items:center;padding:0;padding-inline-start:calc(var(--st-avatar-group-taille) / 4);margin:0;list-style:none}.st-avatar-group__membre{display:inline-flex;margin-inline-start:calc(var(--st-avatar-group-taille) / -4);border-radius:var(--st-rayon-pleine);box-shadow:0 0 0 var(--st-epaisseur-moyenne) var(--st-couleur-surface)}.st-avatar-group__reste: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-avatar-group__reste{position:relative;display:inline-grid;place-items:center;inline-size:var(--st-avatar-group-taille);block-size:var(--st-avatar-group-taille);padding:0;font:inherit;font-size:var(--st-taille-xs);font-weight:var(--st-graisse-semi);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte);cursor:pointer;background:var(--st-couleur-surface-enfoncee);border:0;border-radius:var(--st-rayon-pleine)}.st-avatar-group__reste:before{position:absolute;inset:calc((var(--st-avatar-group-taille) - var(--st-cible-tactile-min)) / 2);content:\"\"}@media(hover:hover){.st-avatar-group__reste:hover{background:var(--st-couleur-surface-survol)}}@media(forced-colors:active){.st-avatar-group__reste{border:var(--st-epaisseur-fine) solid ButtonText}}\n"]
|
|
3030
|
+
}]
|
|
3031
|
+
}],
|
|
3032
|
+
propDecorators: {
|
|
3033
|
+
personnes: [{
|
|
3034
|
+
type: i0.Input,
|
|
3035
|
+
args: [{
|
|
3036
|
+
isSignal: true,
|
|
3037
|
+
alias: "personnes",
|
|
3038
|
+
required: true
|
|
3039
|
+
}]
|
|
3040
|
+
}],
|
|
3041
|
+
etiquette: [{
|
|
3042
|
+
type: i0.Input,
|
|
3043
|
+
args: [{
|
|
3044
|
+
isSignal: true,
|
|
3045
|
+
alias: "etiquette",
|
|
3046
|
+
required: true
|
|
3047
|
+
}]
|
|
3048
|
+
}],
|
|
3049
|
+
max: [{
|
|
3050
|
+
type: i0.Input,
|
|
3051
|
+
args: [{
|
|
3052
|
+
isSignal: true,
|
|
3053
|
+
alias: "max",
|
|
3054
|
+
required: false
|
|
3055
|
+
}]
|
|
3056
|
+
}],
|
|
3057
|
+
taille: [{
|
|
3058
|
+
type: i0.Input,
|
|
3059
|
+
args: [{
|
|
3060
|
+
isSignal: true,
|
|
3061
|
+
alias: "taille",
|
|
3062
|
+
required: false
|
|
3063
|
+
}]
|
|
3064
|
+
}],
|
|
3065
|
+
reste: [{
|
|
3066
|
+
type: i0.Output,
|
|
3067
|
+
args: ["reste"]
|
|
3068
|
+
}]
|
|
3069
|
+
}
|
|
3070
|
+
});
|
|
3071
|
+
var StStatGroup = class StStatGroup {
|
|
3072
|
+
etiquette = input.required(...ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []);
|
|
3073
|
+
colonnes = input("auto", ...ngDevMode ? [{ debugName: "colonnes" }] : /* istanbul ignore next */ []);
|
|
3074
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3075
|
+
minVersion: "12.0.0",
|
|
3076
|
+
version: "22.2.0",
|
|
3077
|
+
ngImport: i0,
|
|
3078
|
+
type: StStatGroup,
|
|
3079
|
+
deps: [],
|
|
3080
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
3081
|
+
});
|
|
3082
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3083
|
+
minVersion: "17.1.0",
|
|
3084
|
+
version: "22.2.0",
|
|
3085
|
+
type: StStatGroup,
|
|
3086
|
+
isStandalone: true,
|
|
3087
|
+
selector: "st-stat-group",
|
|
3088
|
+
inputs: {
|
|
3089
|
+
etiquette: {
|
|
3090
|
+
classPropertyName: "etiquette",
|
|
3091
|
+
publicName: "etiquette",
|
|
3092
|
+
isSignal: true,
|
|
3093
|
+
isRequired: true,
|
|
3094
|
+
transformFunction: null
|
|
3095
|
+
},
|
|
3096
|
+
colonnes: {
|
|
3097
|
+
classPropertyName: "colonnes",
|
|
3098
|
+
publicName: "colonnes",
|
|
3099
|
+
isSignal: true,
|
|
3100
|
+
isRequired: false,
|
|
3101
|
+
transformFunction: null
|
|
3102
|
+
}
|
|
3103
|
+
},
|
|
3104
|
+
host: {
|
|
3105
|
+
properties: { "attr.data-colonnes": "colonnes()" },
|
|
3106
|
+
classAttribute: "st-stat-group"
|
|
3107
|
+
},
|
|
3108
|
+
ngImport: i0,
|
|
3109
|
+
template: "<!-- `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste. -->\n<ul class=\"st-stat-group__liste\" role=\"list\" [attr.aria-label]=\"etiquette()\">\n <ng-content />\n</ul>\n",
|
|
3110
|
+
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;container-type:inline-size}.st-stat-group__liste{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-espacement-4);padding:0;margin:0;list-style:none}:host([data-colonnes=auto]) .st-stat-group__liste{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}@container (min-width: 30rem){:host(:not([data-colonnes=auto])) .st-stat-group__liste{grid-template-columns:repeat(2,minmax(0,1fr))}:host([data-colonnes=\"6\"]) .st-stat-group__liste{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 64rem){:host([data-colonnes=\"3\"]) .st-stat-group__liste{grid-template-columns:repeat(3,minmax(0,1fr))}:host([data-colonnes=\"4\"]) .st-stat-group__liste{grid-template-columns:repeat(4,minmax(0,1fr))}:host([data-colonnes=\"6\"]) .st-stat-group__liste{grid-template-columns:repeat(6,minmax(0,1fr))}}\n"],
|
|
3111
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
3112
|
+
});
|
|
3113
|
+
};
|
|
3114
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
3115
|
+
minVersion: "12.0.0",
|
|
3116
|
+
version: "22.2.0",
|
|
3117
|
+
ngImport: i0,
|
|
3118
|
+
type: StStatGroup,
|
|
3119
|
+
decorators: [{
|
|
3120
|
+
type: Component,
|
|
3121
|
+
args: [{
|
|
3122
|
+
selector: "st-stat-group",
|
|
3123
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3124
|
+
host: {
|
|
3125
|
+
class: "st-stat-group",
|
|
3126
|
+
"[attr.data-colonnes]": "colonnes()"
|
|
3127
|
+
},
|
|
3128
|
+
template: "<!-- `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste. -->\n<ul class=\"st-stat-group__liste\" role=\"list\" [attr.aria-label]=\"etiquette()\">\n <ng-content />\n</ul>\n",
|
|
3129
|
+
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;container-type:inline-size}.st-stat-group__liste{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-espacement-4);padding:0;margin:0;list-style:none}:host([data-colonnes=auto]) .st-stat-group__liste{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}@container (min-width: 30rem){:host(:not([data-colonnes=auto])) .st-stat-group__liste{grid-template-columns:repeat(2,minmax(0,1fr))}:host([data-colonnes=\"6\"]) .st-stat-group__liste{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 64rem){:host([data-colonnes=\"3\"]) .st-stat-group__liste{grid-template-columns:repeat(3,minmax(0,1fr))}:host([data-colonnes=\"4\"]) .st-stat-group__liste{grid-template-columns:repeat(4,minmax(0,1fr))}:host([data-colonnes=\"6\"]) .st-stat-group__liste{grid-template-columns:repeat(6,minmax(0,1fr))}}\n"]
|
|
3130
|
+
}]
|
|
3131
|
+
}],
|
|
3132
|
+
propDecorators: {
|
|
3133
|
+
etiquette: [{
|
|
3134
|
+
type: i0.Input,
|
|
3135
|
+
args: [{
|
|
3136
|
+
isSignal: true,
|
|
3137
|
+
alias: "etiquette",
|
|
3138
|
+
required: true
|
|
3139
|
+
}]
|
|
3140
|
+
}],
|
|
3141
|
+
colonnes: [{
|
|
3142
|
+
type: i0.Input,
|
|
3143
|
+
args: [{
|
|
3144
|
+
isSignal: true,
|
|
3145
|
+
alias: "colonnes",
|
|
3146
|
+
required: false
|
|
3147
|
+
}]
|
|
3148
|
+
}]
|
|
3149
|
+
}
|
|
3150
|
+
});
|
|
3151
|
+
const CLE_DES_AUTRES = "__autres__";
|
|
3152
|
+
function somme(lignes) {
|
|
3153
|
+
if (lignes.every((ligne) => typeof ligne.valeur === "bigint")) return lignes.reduce((total, ligne) => total + ligne.valeur, 0n);
|
|
3154
|
+
return lignes.reduce((total, ligne) => total + ligne.nombre, 0);
|
|
3155
|
+
}
|
|
3156
|
+
var StBarList = class StBarList {
|
|
3157
|
+
libelles = inject(ST_LIBELLES);
|
|
3158
|
+
locale = inject(ST_LOCALE);
|
|
3159
|
+
lignes = input.required(...ngDevMode ? [{ debugName: "lignes" }] : /* istanbul ignore next */ []);
|
|
3160
|
+
legende = input.required(...ngDevMode ? [{ debugName: "legende" }] : /* istanbul ignore next */ []);
|
|
3161
|
+
legendeMasquee = input(false, {
|
|
3162
|
+
...ngDevMode ? { debugName: "legendeMasquee" } : /* istanbul ignore next */ {},
|
|
3163
|
+
transform: booleanAttribute
|
|
3164
|
+
});
|
|
3165
|
+
devise = input(null, ...ngDevMode ? [{ debugName: "devise" }] : /* istanbul ignore next */ []);
|
|
3166
|
+
affichage = input("les-deux", ...ngDevMode ? [{ debugName: "affichage" }] : /* istanbul ignore next */ []);
|
|
3167
|
+
limite = input(null, ...ngDevMode ? [{ debugName: "limite" }] : /* istanbul ignore next */ []);
|
|
3168
|
+
lues = computed(() => {
|
|
3169
|
+
const limite = this.limite();
|
|
3170
|
+
const comptees = this.lignes().map((ligne) => ({
|
|
3171
|
+
...ligne,
|
|
3172
|
+
nombre: Number(ligne.valeur)
|
|
3173
|
+
}));
|
|
3174
|
+
let retenues = comptees;
|
|
3175
|
+
if (limite !== null && comptees.length > limite) {
|
|
3176
|
+
const triees = [...comptees].sort((a, b) => b.nombre - a.nombre);
|
|
3177
|
+
const valeur = somme(triees.slice(limite));
|
|
3178
|
+
retenues = [...triees.slice(0, limite), {
|
|
3179
|
+
cle: CLE_DES_AUTRES,
|
|
3180
|
+
libelle: this.libelles().autres,
|
|
3181
|
+
valeur,
|
|
3182
|
+
nombre: Number(valeur)
|
|
3183
|
+
}];
|
|
3184
|
+
}
|
|
3185
|
+
const total = retenues.reduce((cumul, ligne) => cumul + ligne.nombre, 0);
|
|
3186
|
+
const plusGrande = Math.max(0, ...retenues.map((ligne) => ligne.nombre));
|
|
3187
|
+
const pourcentage = new Intl.NumberFormat(this.locale(), {
|
|
3188
|
+
style: "percent",
|
|
3189
|
+
maximumFractionDigits: 1
|
|
3190
|
+
});
|
|
3191
|
+
const devise = this.devise();
|
|
3192
|
+
return retenues.map((ligne) => ({
|
|
3193
|
+
cle: ligne.cle,
|
|
3194
|
+
libelle: ligne.libelle,
|
|
3195
|
+
nombre: ligne.nombre,
|
|
3196
|
+
montant: devise === null ? null : {
|
|
3197
|
+
unitesMineures: typeof ligne.valeur === "bigint" ? ligne.valeur : BigInt(Math.round(ligne.nombre)),
|
|
3198
|
+
devise
|
|
3199
|
+
},
|
|
3200
|
+
part: pourcentage.format(total > 0 ? ligne.nombre / total : 0),
|
|
3201
|
+
longueur: plusGrande > 0 ? Math.max(0, ligne.nombre) / plusGrande : 0
|
|
3202
|
+
}));
|
|
3203
|
+
}, ...ngDevMode ? [{ debugName: "lues" }] : /* istanbul ignore next */ []);
|
|
3204
|
+
avecValeur = computed(() => this.affichage() !== "part", ...ngDevMode ? [{ debugName: "avecValeur" }] : /* istanbul ignore next */ []);
|
|
3205
|
+
avecPart = computed(() => this.affichage() !== "valeur", ...ngDevMode ? [{ debugName: "avecPart" }] : /* istanbul ignore next */ []);
|
|
3206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3207
|
+
minVersion: "12.0.0",
|
|
3208
|
+
version: "22.2.0",
|
|
3209
|
+
ngImport: i0,
|
|
3210
|
+
type: StBarList,
|
|
3211
|
+
deps: [],
|
|
3212
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
3213
|
+
});
|
|
3214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3215
|
+
minVersion: "17.0.0",
|
|
3216
|
+
version: "22.2.0",
|
|
3217
|
+
type: StBarList,
|
|
3218
|
+
isStandalone: true,
|
|
3219
|
+
selector: "st-bar-list",
|
|
3220
|
+
inputs: {
|
|
3221
|
+
lignes: {
|
|
3222
|
+
classPropertyName: "lignes",
|
|
3223
|
+
publicName: "lignes",
|
|
3224
|
+
isSignal: true,
|
|
3225
|
+
isRequired: true,
|
|
3226
|
+
transformFunction: null
|
|
3227
|
+
},
|
|
3228
|
+
legende: {
|
|
3229
|
+
classPropertyName: "legende",
|
|
3230
|
+
publicName: "legende",
|
|
3231
|
+
isSignal: true,
|
|
3232
|
+
isRequired: true,
|
|
3233
|
+
transformFunction: null
|
|
3234
|
+
},
|
|
3235
|
+
legendeMasquee: {
|
|
3236
|
+
classPropertyName: "legendeMasquee",
|
|
3237
|
+
publicName: "legendeMasquee",
|
|
3238
|
+
isSignal: true,
|
|
3239
|
+
isRequired: false,
|
|
3240
|
+
transformFunction: null
|
|
3241
|
+
},
|
|
3242
|
+
devise: {
|
|
3243
|
+
classPropertyName: "devise",
|
|
3244
|
+
publicName: "devise",
|
|
3245
|
+
isSignal: true,
|
|
3246
|
+
isRequired: false,
|
|
3247
|
+
transformFunction: null
|
|
3248
|
+
},
|
|
3249
|
+
affichage: {
|
|
3250
|
+
classPropertyName: "affichage",
|
|
3251
|
+
publicName: "affichage",
|
|
3252
|
+
isSignal: true,
|
|
3253
|
+
isRequired: false,
|
|
3254
|
+
transformFunction: null
|
|
3255
|
+
},
|
|
3256
|
+
limite: {
|
|
3257
|
+
classPropertyName: "limite",
|
|
3258
|
+
publicName: "limite",
|
|
3259
|
+
isSignal: true,
|
|
3260
|
+
isRequired: false,
|
|
3261
|
+
transformFunction: null
|
|
3262
|
+
}
|
|
3263
|
+
},
|
|
3264
|
+
host: {
|
|
3265
|
+
properties: { "attr.data-affichage": "affichage()" },
|
|
3266
|
+
classAttribute: "st-bar-list"
|
|
3267
|
+
},
|
|
3268
|
+
ngImport: i0,
|
|
3269
|
+
template: "<!-- Roles explicites : empile en largeur etroite (affichage change), le tableau reste un tableau\n pour les technologies d'assistance. -->\n<table class=\"st-bar-list__tableau\" role=\"table\">\n <caption class=\"st-bar-list__legende\" [class.st-vh]=\"legendeMasquee()\">\n {{\n legende()\n }}\n </caption>\n <!-- Les en-tetes se lisent ; la disposition, elle, se voit. -->\n <thead class=\"st-vh\" role=\"rowgroup\">\n <tr role=\"row\">\n <th scope=\"col\" role=\"columnheader\">{{ libelles().libelleDeLigne }}</th>\n @if (avecValeur()) {\n <th scope=\"col\" role=\"columnheader\">{{ libelles().valeurDeLigne }}</th>\n }\n @if (avecPart()) {\n <th scope=\"col\" role=\"columnheader\">{{ libelles().partDeLigne }}</th>\n }\n </tr>\n </thead>\n <tbody role=\"rowgroup\">\n @for (ligne of lues(); track ligne.cle) {\n <tr class=\"st-bar-list__ligne\" role=\"row\">\n <th scope=\"row\" class=\"st-bar-list__libelle\" role=\"rowheader\">\n <span class=\"st-bar-list__nom\">{{ ligne.libelle }}</span>\n <span class=\"st-bar-list__piste\" aria-hidden=\"true\">\n <span class=\"st-bar-list__barre\" [style.inline-size.%]=\"ligne.longueur * 100\"></span>\n </span>\n </th>\n @if (avecValeur()) {\n <td class=\"st-bar-list__valeur\" role=\"cell\">\n @if (ligne.montant; as montant) {\n <st-money [valeur]=\"montant\" />\n } @else {\n <st-number [valeur]=\"ligne.nombre\" />\n }\n </td>\n }\n @if (avecPart()) {\n <td class=\"st-bar-list__part\" role=\"cell\">\n <span dir=\"auto\">{{ ligne.part }}</span>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
3270
|
+
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-bar-list__tableau{inline-size:100%;border-collapse:collapse}.st-bar-list__legende{margin-block-end:var(--st-espacement-3);font-weight:var(--st-graisse-semi);text-align:start}.st-bar-list__tableau,.st-bar-list__tableau>tbody,.st-bar-list__legende{display:block}.st-bar-list__ligne{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1) var(--st-espacement-3);align-items:baseline;padding-block:var(--st-espacement-2)}.st-bar-list__ligne>*{padding:0}.st-bar-list__libelle{flex:1 0 100%;font-weight:var(--st-graisse-normale);text-align:start}.st-bar-list__nom{display:block;margin-block-end:var(--st-espacement-1-5)}.st-bar-list__valeur{flex:1 1 auto;text-align:start}@container (min-width: 30rem){.st-bar-list__tableau{display:table}.st-bar-list__legende{display:table-caption}.st-bar-list__tableau>tbody{display:table-row-group}.st-bar-list__ligne{display:table-row}.st-bar-list__ligne>*{display:table-cell;padding-block:var(--st-espacement-2);vertical-align:top}.st-bar-list__libelle{inline-size:100%;padding-inline-end:var(--st-espacement-4)}.st-bar-list__valeur{padding-inline-start:var(--st-espacement-3);text-align:end}.st-bar-list__part{padding-inline-start:var(--st-espacement-3)}}.st-bar-list__piste{display:block;block-size:var(--st-espacement-1-5);overflow:hidden;background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-bar-list__barre{display:block;block-size:100%;background:var(--st-couleur-primaire);border-radius:inherit}.st-bar-list__valeur,.st-bar-list__part{font-family:var(--st-police-mono);font-size:var(--st-taille-sm);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-sm);white-space:nowrap}.st-bar-list__part{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte)}.st-bar-list__valeur{color:var(--st-couleur-texte-discret)}@media(forced-colors:active){.st-bar-list__piste{forced-color-adjust:none;background:Canvas;outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}.st-bar-list__barre{background:Highlight}}@media print{.st-bar-list__piste{-webkit-print-color-adjust:exact;print-color-adjust:exact}}\n"],
|
|
3271
|
+
dependencies: [{
|
|
3272
|
+
kind: "component",
|
|
3273
|
+
type: StMoney,
|
|
3274
|
+
selector: "st-money",
|
|
3275
|
+
inputs: [
|
|
3276
|
+
"valeur",
|
|
3277
|
+
"signeExplicite",
|
|
3278
|
+
"sansDevise",
|
|
3279
|
+
"taille",
|
|
3280
|
+
"variation",
|
|
3281
|
+
"ton",
|
|
3282
|
+
"police",
|
|
3283
|
+
"alignement",
|
|
3284
|
+
"masque"
|
|
3285
|
+
]
|
|
3286
|
+
}, {
|
|
3287
|
+
kind: "component",
|
|
3288
|
+
type: StNumber,
|
|
3289
|
+
selector: "st-number",
|
|
3290
|
+
inputs: [
|
|
3291
|
+
"valeur",
|
|
3292
|
+
"format",
|
|
3293
|
+
"decimales",
|
|
3294
|
+
"unite",
|
|
3295
|
+
"signeExplicite",
|
|
3296
|
+
"variation",
|
|
3297
|
+
"ton"
|
|
3298
|
+
]
|
|
3299
|
+
}],
|
|
3300
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
3301
|
+
});
|
|
3302
|
+
};
|
|
3303
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
3304
|
+
minVersion: "12.0.0",
|
|
3305
|
+
version: "22.2.0",
|
|
3306
|
+
ngImport: i0,
|
|
3307
|
+
type: StBarList,
|
|
3308
|
+
decorators: [{
|
|
3309
|
+
type: Component,
|
|
3310
|
+
args: [{
|
|
3311
|
+
selector: "st-bar-list",
|
|
3312
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3313
|
+
imports: [StMoney, StNumber],
|
|
3314
|
+
host: {
|
|
3315
|
+
class: "st-bar-list",
|
|
3316
|
+
"[attr.data-affichage]": "affichage()"
|
|
3317
|
+
},
|
|
3318
|
+
template: "<!-- Roles explicites : empile en largeur etroite (affichage change), le tableau reste un tableau\n pour les technologies d'assistance. -->\n<table class=\"st-bar-list__tableau\" role=\"table\">\n <caption class=\"st-bar-list__legende\" [class.st-vh]=\"legendeMasquee()\">\n {{\n legende()\n }}\n </caption>\n <!-- Les en-tetes se lisent ; la disposition, elle, se voit. -->\n <thead class=\"st-vh\" role=\"rowgroup\">\n <tr role=\"row\">\n <th scope=\"col\" role=\"columnheader\">{{ libelles().libelleDeLigne }}</th>\n @if (avecValeur()) {\n <th scope=\"col\" role=\"columnheader\">{{ libelles().valeurDeLigne }}</th>\n }\n @if (avecPart()) {\n <th scope=\"col\" role=\"columnheader\">{{ libelles().partDeLigne }}</th>\n }\n </tr>\n </thead>\n <tbody role=\"rowgroup\">\n @for (ligne of lues(); track ligne.cle) {\n <tr class=\"st-bar-list__ligne\" role=\"row\">\n <th scope=\"row\" class=\"st-bar-list__libelle\" role=\"rowheader\">\n <span class=\"st-bar-list__nom\">{{ ligne.libelle }}</span>\n <span class=\"st-bar-list__piste\" aria-hidden=\"true\">\n <span class=\"st-bar-list__barre\" [style.inline-size.%]=\"ligne.longueur * 100\"></span>\n </span>\n </th>\n @if (avecValeur()) {\n <td class=\"st-bar-list__valeur\" role=\"cell\">\n @if (ligne.montant; as montant) {\n <st-money [valeur]=\"montant\" />\n } @else {\n <st-number [valeur]=\"ligne.nombre\" />\n }\n </td>\n }\n @if (avecPart()) {\n <td class=\"st-bar-list__part\" role=\"cell\">\n <span dir=\"auto\">{{ ligne.part }}</span>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
3319
|
+
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-bar-list__tableau{inline-size:100%;border-collapse:collapse}.st-bar-list__legende{margin-block-end:var(--st-espacement-3);font-weight:var(--st-graisse-semi);text-align:start}.st-bar-list__tableau,.st-bar-list__tableau>tbody,.st-bar-list__legende{display:block}.st-bar-list__ligne{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1) var(--st-espacement-3);align-items:baseline;padding-block:var(--st-espacement-2)}.st-bar-list__ligne>*{padding:0}.st-bar-list__libelle{flex:1 0 100%;font-weight:var(--st-graisse-normale);text-align:start}.st-bar-list__nom{display:block;margin-block-end:var(--st-espacement-1-5)}.st-bar-list__valeur{flex:1 1 auto;text-align:start}@container (min-width: 30rem){.st-bar-list__tableau{display:table}.st-bar-list__legende{display:table-caption}.st-bar-list__tableau>tbody{display:table-row-group}.st-bar-list__ligne{display:table-row}.st-bar-list__ligne>*{display:table-cell;padding-block:var(--st-espacement-2);vertical-align:top}.st-bar-list__libelle{inline-size:100%;padding-inline-end:var(--st-espacement-4)}.st-bar-list__valeur{padding-inline-start:var(--st-espacement-3);text-align:end}.st-bar-list__part{padding-inline-start:var(--st-espacement-3)}}.st-bar-list__piste{display:block;block-size:var(--st-espacement-1-5);overflow:hidden;background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-bar-list__barre{display:block;block-size:100%;background:var(--st-couleur-primaire);border-radius:inherit}.st-bar-list__valeur,.st-bar-list__part{font-family:var(--st-police-mono);font-size:var(--st-taille-sm);font-variant-numeric:var(--st-chiffres-alignes);line-height:var(--st-interligne-sm);white-space:nowrap}.st-bar-list__part{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte)}.st-bar-list__valeur{color:var(--st-couleur-texte-discret)}@media(forced-colors:active){.st-bar-list__piste{forced-color-adjust:none;background:Canvas;outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}.st-bar-list__barre{background:Highlight}}@media print{.st-bar-list__piste{-webkit-print-color-adjust:exact;print-color-adjust:exact}}\n"]
|
|
3320
|
+
}]
|
|
3321
|
+
}],
|
|
3322
|
+
propDecorators: {
|
|
3323
|
+
lignes: [{
|
|
3324
|
+
type: i0.Input,
|
|
3325
|
+
args: [{
|
|
3326
|
+
isSignal: true,
|
|
3327
|
+
alias: "lignes",
|
|
3328
|
+
required: true
|
|
3329
|
+
}]
|
|
3330
|
+
}],
|
|
3331
|
+
legende: [{
|
|
3332
|
+
type: i0.Input,
|
|
3333
|
+
args: [{
|
|
3334
|
+
isSignal: true,
|
|
3335
|
+
alias: "legende",
|
|
3336
|
+
required: true
|
|
3337
|
+
}]
|
|
3338
|
+
}],
|
|
3339
|
+
legendeMasquee: [{
|
|
3340
|
+
type: i0.Input,
|
|
3341
|
+
args: [{
|
|
3342
|
+
isSignal: true,
|
|
3343
|
+
alias: "legendeMasquee",
|
|
3344
|
+
required: false
|
|
3345
|
+
}]
|
|
3346
|
+
}],
|
|
3347
|
+
devise: [{
|
|
3348
|
+
type: i0.Input,
|
|
3349
|
+
args: [{
|
|
3350
|
+
isSignal: true,
|
|
3351
|
+
alias: "devise",
|
|
3352
|
+
required: false
|
|
3353
|
+
}]
|
|
3354
|
+
}],
|
|
3355
|
+
affichage: [{
|
|
3356
|
+
type: i0.Input,
|
|
3357
|
+
args: [{
|
|
3358
|
+
isSignal: true,
|
|
3359
|
+
alias: "affichage",
|
|
3360
|
+
required: false
|
|
3361
|
+
}]
|
|
3362
|
+
}],
|
|
3363
|
+
limite: [{
|
|
3364
|
+
type: i0.Input,
|
|
3365
|
+
args: [{
|
|
3366
|
+
isSignal: true,
|
|
3367
|
+
alias: "limite",
|
|
3368
|
+
required: false
|
|
3369
|
+
}]
|
|
3370
|
+
}]
|
|
3371
|
+
}
|
|
3372
|
+
});
|
|
3373
|
+
const SERIES = 6;
|
|
3374
|
+
var StRepartition = class StRepartition {
|
|
3375
|
+
locale = inject(ST_LOCALE);
|
|
3376
|
+
parts = input.required(...ngDevMode ? [{ debugName: "parts" }] : /* istanbul ignore next */ []);
|
|
3377
|
+
etiquette = input.required(...ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []);
|
|
3378
|
+
devise = input(null, ...ngDevMode ? [{ debugName: "devise" }] : /* istanbul ignore next */ []);
|
|
3379
|
+
legende = input("sous", ...ngDevMode ? [{ debugName: "legende" }] : /* istanbul ignore next */ []);
|
|
3380
|
+
epaisseur = input("fine", ...ngDevMode ? [{ debugName: "epaisseur" }] : /* istanbul ignore next */ []);
|
|
3381
|
+
lues = computed(() => {
|
|
3382
|
+
const parts = this.parts();
|
|
3383
|
+
const nombres = parts.map((part) => Math.max(0, Number(part.valeur)));
|
|
3384
|
+
const total = nombres.reduce((cumul, nombre) => cumul + nombre, 0);
|
|
3385
|
+
const pourcentage = new Intl.NumberFormat(this.locale(), {
|
|
3386
|
+
style: "percent",
|
|
3387
|
+
maximumFractionDigits: 1
|
|
3388
|
+
});
|
|
3389
|
+
const devise = this.devise();
|
|
3390
|
+
return parts.map((part, rang) => {
|
|
3391
|
+
const nombre = nombres[rang] ?? 0;
|
|
3392
|
+
const proportion = total > 0 ? nombre / total : 0;
|
|
3393
|
+
return {
|
|
3394
|
+
cle: part.cle,
|
|
3395
|
+
libelle: part.libelle,
|
|
3396
|
+
nombre,
|
|
3397
|
+
montant: devise === null ? null : {
|
|
3398
|
+
unitesMineures: typeof part.valeur === "bigint" ? part.valeur : BigInt(Math.round(nombre)),
|
|
3399
|
+
devise
|
|
3400
|
+
},
|
|
3401
|
+
proportion,
|
|
3402
|
+
part: pourcentage.format(proportion),
|
|
3403
|
+
serie: Math.min(rang, SERIES - 1) + 1
|
|
3404
|
+
};
|
|
3405
|
+
});
|
|
3406
|
+
}, ...ngDevMode ? [{ debugName: "lues" }] : /* istanbul ignore next */ []);
|
|
3407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3408
|
+
minVersion: "12.0.0",
|
|
3409
|
+
version: "22.2.0",
|
|
3410
|
+
ngImport: i0,
|
|
3411
|
+
type: StRepartition,
|
|
3412
|
+
deps: [],
|
|
3413
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
3414
|
+
});
|
|
3415
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3416
|
+
minVersion: "17.0.0",
|
|
3417
|
+
version: "22.2.0",
|
|
3418
|
+
type: StRepartition,
|
|
3419
|
+
isStandalone: true,
|
|
3420
|
+
selector: "st-repartition",
|
|
3421
|
+
inputs: {
|
|
3422
|
+
parts: {
|
|
3423
|
+
classPropertyName: "parts",
|
|
3424
|
+
publicName: "parts",
|
|
3425
|
+
isSignal: true,
|
|
3426
|
+
isRequired: true,
|
|
3427
|
+
transformFunction: null
|
|
3428
|
+
},
|
|
3429
|
+
etiquette: {
|
|
3430
|
+
classPropertyName: "etiquette",
|
|
3431
|
+
publicName: "etiquette",
|
|
3432
|
+
isSignal: true,
|
|
3433
|
+
isRequired: true,
|
|
3434
|
+
transformFunction: null
|
|
3435
|
+
},
|
|
3436
|
+
devise: {
|
|
3437
|
+
classPropertyName: "devise",
|
|
3438
|
+
publicName: "devise",
|
|
3439
|
+
isSignal: true,
|
|
3440
|
+
isRequired: false,
|
|
3441
|
+
transformFunction: null
|
|
3442
|
+
},
|
|
3443
|
+
legende: {
|
|
3444
|
+
classPropertyName: "legende",
|
|
3445
|
+
publicName: "legende",
|
|
3446
|
+
isSignal: true,
|
|
3447
|
+
isRequired: false,
|
|
3448
|
+
transformFunction: null
|
|
3449
|
+
},
|
|
3450
|
+
epaisseur: {
|
|
3451
|
+
classPropertyName: "epaisseur",
|
|
3452
|
+
publicName: "epaisseur",
|
|
3453
|
+
isSignal: true,
|
|
3454
|
+
isRequired: false,
|
|
3455
|
+
transformFunction: null
|
|
3456
|
+
}
|
|
3457
|
+
},
|
|
3458
|
+
host: {
|
|
3459
|
+
properties: { "attr.data-epaisseur": "epaisseur()" },
|
|
3460
|
+
classAttribute: "st-repartition"
|
|
3461
|
+
},
|
|
3462
|
+
ngImport: i0,
|
|
3463
|
+
template: "<!-- La barre : muette, la legende dit tout. -->\n<div class=\"st-repartition__barre\" aria-hidden=\"true\">\n @for (part of lues(); track part.cle) {\n @if (part.proportion > 0) {\n <span\n class=\"st-repartition__segment\"\n [attr.data-serie]=\"part.serie\"\n [style.flex-grow]=\"part.proportion\"\n ></span>\n }\n }\n</div>\n\n<!-- La legende EST la donnee : chaque part, sa valeur, son pourcentage. -->\n<ol\n class=\"st-repartition__legende\"\n role=\"list\"\n [class.st-vh]=\"legende() === 'masquee'\"\n [attr.aria-label]=\"etiquette()\"\n>\n @for (part of lues(); track part.cle) {\n <li class=\"st-repartition__part\">\n <span\n class=\"st-repartition__pastille\"\n [attr.data-serie]=\"part.serie\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"st-repartition__libelle\">{{ part.libelle }}</span>\n <span class=\"st-repartition__valeur\">\n @if (part.montant; as montant) {\n <st-money [valeur]=\"montant\" />\n } @else {\n <st-number [valeur]=\"part.nombre\" />\n }\n </span>\n <!-- `dir=\"auto\"` : la part d'Intl garde son sens (« 50,8 % »), en ecriture inverse aussi. -->\n <span class=\"st-repartition__proportion\" dir=\"auto\">{{ part.part }}</span>\n </li>\n }\n</ol>\n",
|
|
3464
|
+
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{--st-repartition-hauteur: var(--st-espacement-1-5);display:grid;gap:var(--st-espacement-3);min-inline-size:0;container-type:inline-size}:host([data-epaisseur=epaisse]){--st-repartition-hauteur: var(--st-espacement-4)}.st-repartition__barre{display:flex;gap:var(--st-epaisseur-moyenne);block-size:var(--st-repartition-hauteur);overflow:hidden;background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-repartition__segment{flex-basis:0;min-inline-size:var(--st-epaisseur-moyenne)}[data-serie=\"1\"]{background:var(--st-couleur-primaire)}[data-serie=\"2\"]{background:repeating-linear-gradient(45deg,color-mix(in oklab,var(--st-couleur-primaire) 60%,var(--st-couleur-surface)) 0 3px,color-mix(in oklab,var(--st-couleur-primaire) 40%,var(--st-couleur-surface)) 3px 6px)}[data-serie=\"3\"]{background:radial-gradient(circle,color-mix(in oklab,var(--st-couleur-primaire) 70%,var(--st-couleur-surface)) 1px,transparent 1.5px) 0 0/4px 4px,color-mix(in oklab,var(--st-couleur-primaire) 35%,var(--st-couleur-surface))}[data-serie=\"4\"]{background:repeating-linear-gradient(-45deg,color-mix(in oklab,var(--st-couleur-primaire) 45%,var(--st-couleur-surface)) 0 2px,color-mix(in oklab,var(--st-couleur-primaire) 20%,var(--st-couleur-surface)) 2px 5px)}[data-serie=\"5\"]{background:repeating-linear-gradient(90deg,color-mix(in oklab,var(--st-couleur-primaire) 30%,var(--st-couleur-surface)) 0 2px,color-mix(in oklab,var(--st-couleur-primaire) 12%,var(--st-couleur-surface)) 2px 4px)}[data-serie=\"6\"]{background:color-mix(in oklab,var(--st-couleur-primaire) 15%,var(--st-couleur-surface))}.st-repartition__legende{display:grid;gap:var(--st-espacement-2);padding:0;margin:0;list-style:none}.st-repartition__part{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"pastille libelle libelle\" \". valeur proportion\";gap:var(--st-espacement-1) var(--st-espacement-2);align-items:center;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm)}.st-repartition__pastille{grid-area:pastille}.st-repartition__libelle{grid-area:libelle}.st-repartition__valeur{grid-area:valeur}.st-repartition__proportion{grid-area:proportion}@container (min-width: 30rem){.st-repartition__part{grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:\"pastille libelle valeur proportion\"}}.st-repartition__pastille{inline-size:var(--st-espacement-3);block-size:var(--st-espacement-3);border-radius:var(--st-rayon-xs)}.st-repartition__libelle{min-inline-size:0}.st-repartition__valeur,.st-repartition__proportion{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-alignes);text-align:end;white-space:nowrap}.st-repartition__valeur{color:var(--st-couleur-texte-discret)}.st-repartition__proportion{font-weight:var(--st-graisse-semi)}@media(forced-colors:active){.st-repartition__barre{forced-color-adjust:none;background:Canvas;outline:var(--st-epaisseur-fine) solid CanvasText}.st-repartition__segment,.st-repartition__pastille{forced-color-adjust:none;outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}}@media print{.st-repartition__barre,.st-repartition__pastille{-webkit-print-color-adjust:exact;print-color-adjust:exact}}\n"],
|
|
3465
|
+
dependencies: [{
|
|
3466
|
+
kind: "component",
|
|
3467
|
+
type: StMoney,
|
|
3468
|
+
selector: "st-money",
|
|
3469
|
+
inputs: [
|
|
3470
|
+
"valeur",
|
|
3471
|
+
"signeExplicite",
|
|
3472
|
+
"sansDevise",
|
|
3473
|
+
"taille",
|
|
3474
|
+
"variation",
|
|
3475
|
+
"ton",
|
|
3476
|
+
"police",
|
|
3477
|
+
"alignement",
|
|
3478
|
+
"masque"
|
|
3479
|
+
]
|
|
3480
|
+
}, {
|
|
3481
|
+
kind: "component",
|
|
3482
|
+
type: StNumber,
|
|
3483
|
+
selector: "st-number",
|
|
3484
|
+
inputs: [
|
|
3485
|
+
"valeur",
|
|
3486
|
+
"format",
|
|
3487
|
+
"decimales",
|
|
3488
|
+
"unite",
|
|
3489
|
+
"signeExplicite",
|
|
3490
|
+
"variation",
|
|
3491
|
+
"ton"
|
|
3492
|
+
]
|
|
3493
|
+
}],
|
|
3494
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
3495
|
+
});
|
|
3496
|
+
};
|
|
3497
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
3498
|
+
minVersion: "12.0.0",
|
|
3499
|
+
version: "22.2.0",
|
|
3500
|
+
ngImport: i0,
|
|
3501
|
+
type: StRepartition,
|
|
3502
|
+
decorators: [{
|
|
3503
|
+
type: Component,
|
|
3504
|
+
args: [{
|
|
3505
|
+
selector: "st-repartition",
|
|
3506
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3507
|
+
imports: [StMoney, StNumber],
|
|
3508
|
+
host: {
|
|
3509
|
+
class: "st-repartition",
|
|
3510
|
+
"[attr.data-epaisseur]": "epaisseur()"
|
|
3511
|
+
},
|
|
3512
|
+
template: "<!-- La barre : muette, la legende dit tout. -->\n<div class=\"st-repartition__barre\" aria-hidden=\"true\">\n @for (part of lues(); track part.cle) {\n @if (part.proportion > 0) {\n <span\n class=\"st-repartition__segment\"\n [attr.data-serie]=\"part.serie\"\n [style.flex-grow]=\"part.proportion\"\n ></span>\n }\n }\n</div>\n\n<!-- La legende EST la donnee : chaque part, sa valeur, son pourcentage. -->\n<ol\n class=\"st-repartition__legende\"\n role=\"list\"\n [class.st-vh]=\"legende() === 'masquee'\"\n [attr.aria-label]=\"etiquette()\"\n>\n @for (part of lues(); track part.cle) {\n <li class=\"st-repartition__part\">\n <span\n class=\"st-repartition__pastille\"\n [attr.data-serie]=\"part.serie\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"st-repartition__libelle\">{{ part.libelle }}</span>\n <span class=\"st-repartition__valeur\">\n @if (part.montant; as montant) {\n <st-money [valeur]=\"montant\" />\n } @else {\n <st-number [valeur]=\"part.nombre\" />\n }\n </span>\n <!-- `dir=\"auto\"` : la part d'Intl garde son sens (« 50,8 % »), en ecriture inverse aussi. -->\n <span class=\"st-repartition__proportion\" dir=\"auto\">{{ part.part }}</span>\n </li>\n }\n</ol>\n",
|
|
3513
|
+
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{--st-repartition-hauteur: var(--st-espacement-1-5);display:grid;gap:var(--st-espacement-3);min-inline-size:0;container-type:inline-size}:host([data-epaisseur=epaisse]){--st-repartition-hauteur: var(--st-espacement-4)}.st-repartition__barre{display:flex;gap:var(--st-epaisseur-moyenne);block-size:var(--st-repartition-hauteur);overflow:hidden;background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-repartition__segment{flex-basis:0;min-inline-size:var(--st-epaisseur-moyenne)}[data-serie=\"1\"]{background:var(--st-couleur-primaire)}[data-serie=\"2\"]{background:repeating-linear-gradient(45deg,color-mix(in oklab,var(--st-couleur-primaire) 60%,var(--st-couleur-surface)) 0 3px,color-mix(in oklab,var(--st-couleur-primaire) 40%,var(--st-couleur-surface)) 3px 6px)}[data-serie=\"3\"]{background:radial-gradient(circle,color-mix(in oklab,var(--st-couleur-primaire) 70%,var(--st-couleur-surface)) 1px,transparent 1.5px) 0 0/4px 4px,color-mix(in oklab,var(--st-couleur-primaire) 35%,var(--st-couleur-surface))}[data-serie=\"4\"]{background:repeating-linear-gradient(-45deg,color-mix(in oklab,var(--st-couleur-primaire) 45%,var(--st-couleur-surface)) 0 2px,color-mix(in oklab,var(--st-couleur-primaire) 20%,var(--st-couleur-surface)) 2px 5px)}[data-serie=\"5\"]{background:repeating-linear-gradient(90deg,color-mix(in oklab,var(--st-couleur-primaire) 30%,var(--st-couleur-surface)) 0 2px,color-mix(in oklab,var(--st-couleur-primaire) 12%,var(--st-couleur-surface)) 2px 4px)}[data-serie=\"6\"]{background:color-mix(in oklab,var(--st-couleur-primaire) 15%,var(--st-couleur-surface))}.st-repartition__legende{display:grid;gap:var(--st-espacement-2);padding:0;margin:0;list-style:none}.st-repartition__part{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"pastille libelle libelle\" \". valeur proportion\";gap:var(--st-espacement-1) var(--st-espacement-2);align-items:center;font-size:var(--st-taille-sm);line-height:var(--st-interligne-sm)}.st-repartition__pastille{grid-area:pastille}.st-repartition__libelle{grid-area:libelle}.st-repartition__valeur{grid-area:valeur}.st-repartition__proportion{grid-area:proportion}@container (min-width: 30rem){.st-repartition__part{grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:\"pastille libelle valeur proportion\"}}.st-repartition__pastille{inline-size:var(--st-espacement-3);block-size:var(--st-espacement-3);border-radius:var(--st-rayon-xs)}.st-repartition__libelle{min-inline-size:0}.st-repartition__valeur,.st-repartition__proportion{font-family:var(--st-police-mono);font-variant-numeric:var(--st-chiffres-alignes);text-align:end;white-space:nowrap}.st-repartition__valeur{color:var(--st-couleur-texte-discret)}.st-repartition__proportion{font-weight:var(--st-graisse-semi)}@media(forced-colors:active){.st-repartition__barre{forced-color-adjust:none;background:Canvas;outline:var(--st-epaisseur-fine) solid CanvasText}.st-repartition__segment,.st-repartition__pastille{forced-color-adjust:none;outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}}@media print{.st-repartition__barre,.st-repartition__pastille{-webkit-print-color-adjust:exact;print-color-adjust:exact}}\n"]
|
|
3514
|
+
}]
|
|
3515
|
+
}],
|
|
3516
|
+
propDecorators: {
|
|
3517
|
+
parts: [{
|
|
3518
|
+
type: i0.Input,
|
|
3519
|
+
args: [{
|
|
3520
|
+
isSignal: true,
|
|
3521
|
+
alias: "parts",
|
|
3522
|
+
required: true
|
|
3523
|
+
}]
|
|
3524
|
+
}],
|
|
3525
|
+
etiquette: [{
|
|
3526
|
+
type: i0.Input,
|
|
3527
|
+
args: [{
|
|
3528
|
+
isSignal: true,
|
|
3529
|
+
alias: "etiquette",
|
|
3530
|
+
required: true
|
|
3531
|
+
}]
|
|
3532
|
+
}],
|
|
3533
|
+
devise: [{
|
|
3534
|
+
type: i0.Input,
|
|
3535
|
+
args: [{
|
|
3536
|
+
isSignal: true,
|
|
3537
|
+
alias: "devise",
|
|
3538
|
+
required: false
|
|
3539
|
+
}]
|
|
3540
|
+
}],
|
|
3541
|
+
legende: [{
|
|
3542
|
+
type: i0.Input,
|
|
3543
|
+
args: [{
|
|
3544
|
+
isSignal: true,
|
|
3545
|
+
alias: "legende",
|
|
3546
|
+
required: false
|
|
3547
|
+
}]
|
|
3548
|
+
}],
|
|
3549
|
+
epaisseur: [{
|
|
3550
|
+
type: i0.Input,
|
|
3551
|
+
args: [{
|
|
3552
|
+
isSignal: true,
|
|
3553
|
+
alias: "epaisseur",
|
|
3554
|
+
required: false
|
|
3555
|
+
}]
|
|
3556
|
+
}]
|
|
3557
|
+
}
|
|
3558
|
+
});
|
|
3559
|
+
export { StAmountSummary, StAvatarGroup, StBarList, StCount, StDate, StDeadline, StDuration, StMasked, StMeter, StMoney, StNumber, StPerson, StRelativeTime, StRepartition, StStat, StStatGroup, zonesDeJauge };
|
|
3560
|
+
|
|
3561
|
+
//# sourceMappingURL=starterlib-ui-donnees.mjs.map
|