@starterlib/ui 0.12.0 → 0.13.1

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/README.md CHANGED
@@ -55,7 +55,7 @@ l'histogramme depuis la 0.12.0, P08-18).
55
55
  | `@starterlib/ui/indicateurs` | pastille de statut (`st-status-pill`), badge et compteur ancre (`st-badge`, `st-badge-ancre`), etiquettes et groupes d'etiquettes (`st-tag`, `st-tag-group`, `st-groupe-d-etiquettes`) | aucun |
56
56
  | `@starterlib/ui/mise-en-page` | section, separateur, texte long (`st-text`), rangee de reglage (`st-settings-row`), groupe de boutons (`st-button-group`) | aucun |
57
57
  | `@starterlib/ui/force` | l'adaptateur de la jauge de force du mot de passe (`chargerEstimateurZxcvbn`, ADR web 0011) : jamais importe statiquement, charge a la premiere frappe par `fournirEstimateurDeForce`, jamais partage en federation | `@zxcvbn-ts/*`, pairs OPTIONNELS, par imports dynamiques |
58
- | `@starterlib/ui/virtuel` | la liste virtuelle (`st-virtual-list`, `stVirtualItem`) : plusieurs milliers de lignes affichees ensemble, la fenetre seule rendue ; bonus sous condition ecrite du lot 267 (`packages/ui/virtuel/README.md`) | `@angular/cdk/scrolling` — et rien d'autre |
58
+ | `@starterlib/ui/virtuel` | la liste virtuelle (`st-virtual-list`, `stVirtualItem`) et le tableau virtualise (`st-virtual-table`, P08-19) : des milliers a des centaines de milliers de lignes affichees ensemble, la fenetre seule rendue ; bonus sous condition ecrite du lot 267 (`packages/ui/virtuel/README.md`) | `@angular/cdk/scrolling` — et rien d'autre |
59
59
 
60
60
  ```ts
61
61
  import { StButton, StCard, StError } from '@starterlib/ui';
@@ -451,6 +451,16 @@ seule emission de `atteint` ; `lu()` compose l'indisponibilite du bouton qui sui
451
451
  libelles du point d'entree (`LibellesDonnees`, `fournirLibellesDonnees`). Recette :
452
452
  `docs/recettes/accepter-apres-lecture.md`.
453
453
 
454
+ Visionneuse de pieces (0.13.0, P08-17) — `st-image-viewer` (`ui/donnees`) : une image ou deux cote a
455
+ cote (`images` : `{ contenu: Blob, libelle }`), a inspecter sans la telecharger. Le contenu, charge par
456
+ l'application (`@starterlib/core`, piece servie sans cache), est decode une fois et dessine dans un
457
+ canevas : aucune adresse vers l'image, aucune `ObjectURL`, aucun bouton de telechargement ; canevas
458
+ vides a la destruction. Zoom, rotation et contraste communs aux deux panneaux, defilements lies, au
459
+ clavier (`+`, `-`, `r`, `Maj+r`, `c`, `Maj+c`, `0`) et a la barre d'outils ; `filigrane` (identite de
460
+ l'operateur et date) a l'ecran comme a l'impression, ou les images, elles, ne s'impriment pas. Le
461
+ champ de televersement propose l'appareil photo par l'entree `capture` de `st-file-upload`
462
+ (`environment` ou `user`), le choix de fichiers restant toujours possible.
463
+
454
464
  Courbe et tendance (0.11.0, P08-07) — `@starterlib/ui/graphiques`, point d'entree OPTIONNEL (12 000
455
465
  octets en brotli au plus, `BUDGET_BR`), du SVG ecrit a la main sans bibliotheque. `st-line-chart` :
456
466
  une a quatre `series` (`{ libelle, points: [{ instant, valeur }], trait? }`, valeurs en CHAINE
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "paquet": "@starterlib/ui",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "sprite": {
5
5
  "fichier": "sprite.svg",
6
6
  "empreinte": "67749CA7",
@@ -1,6 +1,6 @@
1
1
  import { DOCUMENT, Location, NgTemplateOutlet } from "@angular/common";
2
2
  import * as i0 from "@angular/core";
3
- import { ChangeDetectionStrategy, Component, DOCUMENT as DOCUMENT$1, DestroyRef, ElementRef, InjectionToken, afterNextRender, booleanAttribute, computed, effect, inject, input, linkedSignal, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, DOCUMENT as DOCUMENT$1, DestroyRef, ElementRef, InjectionToken, afterNextRender, booleanAttribute, computed, effect, inject, input, linkedSignal, numberAttribute, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
4
4
  import { formaterIban, masquerCarte, masquerIban, masquerTelephone, partiesDuMontant, quatreDerniers } from "@starterlib/util/valeurs";
5
5
  import { tenue } from "@starterlib/tokens";
6
6
  import { AnnonceLocale, FUSEAU_PAR_DEFAUT, ST_LIBELLES, ST_LOCALE, ST_MONTANTS_MASQUES, StAvatar, StIcon, StIconButton, StIdentifiants, StInlineMessage, StLink, StTimer, catalogueDuPointDEntree, copierDansLePressePapiers, partagerLaValeur, pressePapiersDisponible } from "@starterlib/ui";
@@ -1322,10 +1322,10 @@ var StNumber = class StNumber {
1322
1322
  }, ...ngDevMode ? [{ debugName: "signe" }] : /* istanbul ignore next */ []);
1323
1323
  options = computed(() => {
1324
1324
  const decimales = this.decimales();
1325
- const min = borner(typeof decimales === "number" ? decimales : decimales.min);
1325
+ const min = borner$1(typeof decimales === "number" ? decimales : decimales.min);
1326
1326
  const base = {
1327
1327
  minimumFractionDigits: min,
1328
- maximumFractionDigits: Math.max(min, borner(typeof decimales === "number" ? decimales : decimales.max)),
1328
+ maximumFractionDigits: Math.max(min, borner$1(typeof decimales === "number" ? decimales : decimales.max)),
1329
1329
  signDisplay: this.signeExplicite() ? "exceptZero" : "negative"
1330
1330
  };
1331
1331
  const format = this.format();
@@ -1523,7 +1523,7 @@ i0.ɵɵngDeclareClassMetadata({
1523
1523
  }]
1524
1524
  }
1525
1525
  });
1526
- function borner(decimales) {
1526
+ function borner$1(decimales) {
1527
1527
  return Number.isFinite(decimales) ? Math.min(100, Math.max(0, Math.trunc(decimales))) : 0;
1528
1528
  }
1529
1529
  const PARTIES = [
@@ -4055,13 +4055,35 @@ const LIBELLES_DONNEES_FR = {
4055
4055
  finDuDocument: "Fin du document",
4056
4056
  aJour: (age) => `\u00c0 jour, ${age}`,
4057
4057
  perimeeDepuis: (duree) => `P\u00e9rim\u00e9e depuis ${duree}`,
4058
- libelleDeLaDonnee: (libelle) => `${libelle}\u00a0: `
4058
+ libelleDeLaDonnee: (libelle) => `${libelle}\u00a0: `,
4059
+ outilsDeLaVisionneuse: "Outils de la visionneuse",
4060
+ reduire: "Réduire",
4061
+ agrandir: "Agrandir",
4062
+ tournerAGauche: "Tourner à gauche",
4063
+ tournerADroite: "Tourner à droite",
4064
+ moinsDeContraste: "Moins de contraste",
4065
+ plusDeContraste: "Plus de contraste",
4066
+ vueDOrigine: "Vue d’origine",
4067
+ raccourcisDeLaVisionneuse: "Raccourcis\xA0: + et − pour le zoom, R et Maj+R pour tourner, C et Maj+C pour le contraste, 0 pour la vue d’origine\xA0; les flèches font défiler l’image.",
4068
+ etatDeLaVue: (zoom, rotation, contraste) => `Zoom ${zoom.toString()}\u00a0%, rotation ${rotation.toString()}\u00a0degr\u00e9s, contraste ${contraste.toString()}\u00a0%`,
4069
+ imageIllisible: "Image illisible."
4059
4070
  };
4060
4071
  const LIBELLES_DONNEES_EN = {
4061
4072
  finDuDocument: "End of document",
4062
4073
  aJour: (age) => `Up to date, ${age}`,
4063
4074
  perimeeDepuis: (duree) => `Stale for ${duree}`,
4064
- libelleDeLaDonnee: (libelle) => `${libelle}: `
4075
+ libelleDeLaDonnee: (libelle) => `${libelle}: `,
4076
+ outilsDeLaVisionneuse: "Viewer tools",
4077
+ reduire: "Zoom out",
4078
+ agrandir: "Zoom in",
4079
+ tournerAGauche: "Rotate left",
4080
+ tournerADroite: "Rotate right",
4081
+ moinsDeContraste: "Less contrast",
4082
+ plusDeContraste: "More contrast",
4083
+ vueDOrigine: "Reset view",
4084
+ raccourcisDeLaVisionneuse: "Shortcuts: + and − to zoom, R and Shift+R to rotate, C and Shift+C for contrast, 0 to reset; arrow keys scroll the image.",
4085
+ etatDeLaVue: (zoom, rotation, contraste) => `Zoom ${zoom.toString()}%, rotation ${rotation.toString()} degrees, contrast ${contraste.toString()}%`,
4086
+ imageIllisible: "Unreadable image."
4065
4087
  };
4066
4088
  const ST_LIBELLES_DONNEES = new InjectionToken("ST_LIBELLES_DONNEES", {
4067
4089
  providedIn: "root",
@@ -4407,6 +4429,337 @@ i0.ɵɵngDeclareClassMetadata({
4407
4429
  }]
4408
4430
  }
4409
4431
  });
4410
- export { LIBELLES_DONNEES_EN, LIBELLES_DONNEES_FR, OPACITE_DE_FILIGRANE, ST_LIBELLES_DONNEES, StAmountSummary, StAvatarGroup, StBarList, StCode, StCount, StDate, StDeadline, StDocument, StDuration, StFreshness, StKbd, StLuJusquAuBout, StMasked, StMeter, StMoney, StNumber, StPerson, StRelativeTime, StRepartition, StStat, StStatGroup, StWatermark, catalogueDesDonnees, fournirLibellesDonnees, libellesDesDonnees, motifDeFiligrane, zonesDeJauge };
4432
+ const BORNES_DE_LA_VISIONNEUSE = {
4433
+ zoom: {
4434
+ min: .5,
4435
+ max: 4,
4436
+ pas: .25
4437
+ },
4438
+ contraste: {
4439
+ min: .5,
4440
+ max: 2,
4441
+ pas: .25
4442
+ }
4443
+ };
4444
+ function borner(valeur, bornes) {
4445
+ return Math.min(bornes.max, Math.max(bornes.min, valeur));
4446
+ }
4447
+ function vider(toile) {
4448
+ toile.width = 0;
4449
+ toile.height = 0;
4450
+ }
4451
+ var StImageViewer = class StImageViewer {
4452
+ images = input.required(...ngDevMode ? [{ debugName: "images" }] : /* istanbul ignore next */ []);
4453
+ libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
4454
+ filigrane = input(null, ...ngDevMode ? [{ debugName: "filigrane" }] : /* istanbul ignore next */ []);
4455
+ libelles = libellesDesDonnees();
4456
+ bornes = BORNES_DE_LA_VISIONNEUSE;
4457
+ zoom = signal(1, ...ngDevMode ? [{ debugName: "zoom" }] : /* istanbul ignore next */ []);
4458
+ rotation = signal(0, ...ngDevMode ? [{ debugName: "rotation" }] : /* istanbul ignore next */ []);
4459
+ contraste = signal(1, ...ngDevMode ? [{ debugName: "contraste" }] : /* istanbul ignore next */ []);
4460
+ etats = signal([], ...ngDevMode ? [{ debugName: "etats" }] : /* istanbul ignore next */ []);
4461
+ dimensions = signal([], ...ngDevMode ? [{ debugName: "dimensions" }] : /* istanbul ignore next */ []);
4462
+ ajustements = signal([], ...ngDevMode ? [{ debugName: "ajustements" }] : /* istanbul ignore next */ []);
4463
+ toiles = viewChildren("toile", ...ngDevMode ? [{ debugName: "toiles" }] : /* istanbul ignore next */ []);
4464
+ defilements = viewChildren("defilement", ...ngDevMode ? [{ debugName: "defilements" }] : /* istanbul ignore next */ []);
4465
+ annonce = new AnnonceLocale(inject(DestroyRef));
4466
+ identifiantDeLAide = inject(StIdentifiants).prochain("st-image-viewer-aide");
4467
+ generation = 0;
4468
+ synchronisationEnCours = false;
4469
+ affichees = computed(() => this.images().slice(0, 2), ...ngDevMode ? [{ debugName: "affichees" }] : /* istanbul ignore next */ []);
4470
+ transformation = computed(() => `rotate(${this.rotation().toString()}deg)`, ...ngDevMode ? [{ debugName: "transformation" }] : /* istanbul ignore next */ []);
4471
+ filtre = computed(() => `contrast(${this.contraste().toString()})`, ...ngDevMode ? [{ debugName: "filtre" }] : /* istanbul ignore next */ []);
4472
+ mesures = computed(() => {
4473
+ const couchee = this.rotation() % 180 !== 0;
4474
+ return this.affichees().map((_, indice) => {
4475
+ const dimensions = this.dimensions()[indice];
4476
+ if (dimensions === null || dimensions === void 0) return null;
4477
+ const echelle = (this.ajustements()[indice] ?? 1) * this.zoom();
4478
+ const largeur = dimensions.largeur * echelle;
4479
+ const hauteur = dimensions.hauteur * echelle;
4480
+ return {
4481
+ largeur,
4482
+ hauteur,
4483
+ boiteLargeur: couchee ? hauteur : largeur,
4484
+ boiteHauteur: couchee ? largeur : hauteur
4485
+ };
4486
+ });
4487
+ }, ...ngDevMode ? [{ debugName: "mesures" }] : /* istanbul ignore next */ []);
4488
+ constructor() {
4489
+ effect(() => {
4490
+ const images = this.affichees();
4491
+ const toiles = this.toiles();
4492
+ untracked(() => {
4493
+ this.dessiner(images, toiles);
4494
+ });
4495
+ });
4496
+ inject(DestroyRef).onDestroy(() => {
4497
+ this.generation += 1;
4498
+ for (const toile of this.toiles()) vider(toile.nativeElement);
4499
+ });
4500
+ }
4501
+ async dessiner(images, toiles) {
4502
+ this.generation += 1;
4503
+ const generation = this.generation;
4504
+ for (const toile of toiles) vider(toile.nativeElement);
4505
+ this.etats.set(images.map(() => "chargement"));
4506
+ this.dimensions.set(images.map(() => null));
4507
+ await Promise.all(images.map(async (image, indice) => {
4508
+ const toile = toiles[indice]?.nativeElement;
4509
+ if (toile === void 0) return;
4510
+ let etat = "illisible";
4511
+ let dimensions = null;
4512
+ try {
4513
+ const bitmap = await createImageBitmap(image.contenu, { imageOrientation: "from-image" });
4514
+ try {
4515
+ if (generation !== this.generation) return;
4516
+ const contexte = toile.getContext("2d");
4517
+ if (contexte !== null) {
4518
+ toile.width = bitmap.width;
4519
+ toile.height = bitmap.height;
4520
+ contexte.drawImage(bitmap, 0, 0);
4521
+ dimensions = {
4522
+ largeur: bitmap.width,
4523
+ hauteur: bitmap.height
4524
+ };
4525
+ etat = "prete";
4526
+ }
4527
+ } finally {
4528
+ bitmap.close();
4529
+ }
4530
+ } catch {
4531
+ etat = "illisible";
4532
+ }
4533
+ if (generation !== this.generation) return;
4534
+ const largeurDuPanneau = this.defilements()[indice]?.nativeElement.clientWidth ?? 0;
4535
+ this.ajustements.update((liste) => {
4536
+ const suite = [...liste];
4537
+ suite[indice] = dimensions !== null && largeurDuPanneau > 0 ? Math.min(1, largeurDuPanneau / dimensions.largeur) : 1;
4538
+ return suite;
4539
+ });
4540
+ this.dimensions.update((liste) => liste.map((d, i) => i === indice ? dimensions : d));
4541
+ this.etats.update((liste) => liste.map((e, i) => i === indice ? etat : e));
4542
+ }));
4543
+ }
4544
+ zoomer(sens) {
4545
+ const { pas } = BORNES_DE_LA_VISIONNEUSE.zoom;
4546
+ this.zoom.set(borner(this.zoom() + sens * pas, BORNES_DE_LA_VISIONNEUSE.zoom));
4547
+ this.annoncerLaVue();
4548
+ }
4549
+ tourner(degres) {
4550
+ this.rotation.set((this.rotation() + degres + 360) % 360);
4551
+ this.annoncerLaVue();
4552
+ }
4553
+ contraster(sens) {
4554
+ const { pas } = BORNES_DE_LA_VISIONNEUSE.contraste;
4555
+ this.contraste.set(borner(this.contraste() + sens * pas, BORNES_DE_LA_VISIONNEUSE.contraste));
4556
+ this.annoncerLaVue();
4557
+ }
4558
+ reinitialiser() {
4559
+ this.zoom.set(1);
4560
+ this.rotation.set(0);
4561
+ this.contraste.set(1);
4562
+ this.annoncerLaVue();
4563
+ }
4564
+ pourcentage(valeur) {
4565
+ return Math.round(valeur * 100);
4566
+ }
4567
+ annoncerLaVue() {
4568
+ this.annonce.annoncer(this.libelles().etatDeLaVue(this.pourcentage(this.zoom()), this.rotation(), this.pourcentage(this.contraste())));
4569
+ }
4570
+ auClavier(evenement) {
4571
+ if (evenement.ctrlKey || evenement.metaKey || evenement.altKey) return;
4572
+ const action = {
4573
+ "+": () => {
4574
+ this.zoomer(1);
4575
+ },
4576
+ "=": () => {
4577
+ this.zoomer(1);
4578
+ },
4579
+ "-": () => {
4580
+ this.zoomer(-1);
4581
+ },
4582
+ r: () => {
4583
+ this.tourner(90);
4584
+ },
4585
+ R: () => {
4586
+ this.tourner(-90);
4587
+ },
4588
+ c: () => {
4589
+ this.contraster(1);
4590
+ },
4591
+ C: () => {
4592
+ this.contraster(-1);
4593
+ },
4594
+ "0": () => {
4595
+ this.reinitialiser();
4596
+ }
4597
+ }[evenement.key];
4598
+ if (action === void 0) return;
4599
+ evenement.preventDefault();
4600
+ action();
4601
+ }
4602
+ synchroniser(indice) {
4603
+ if (this.synchronisationEnCours) return;
4604
+ const panneaux = this.defilements().map((reference) => reference.nativeElement);
4605
+ const source = panneaux[indice];
4606
+ if (source === void 0 || panneaux.length < 2) return;
4607
+ const horizontal = source.scrollWidth - source.clientWidth;
4608
+ const vertical = source.scrollHeight - source.clientHeight;
4609
+ this.synchronisationEnCours = true;
4610
+ for (const [rang, cible] of panneaux.entries()) {
4611
+ if (rang === indice) continue;
4612
+ cible.scrollLeft = horizontal > 0 ? source.scrollLeft / horizontal * (cible.scrollWidth - cible.clientWidth) : 0;
4613
+ cible.scrollTop = vertical > 0 ? source.scrollTop / vertical * (cible.scrollHeight - cible.clientHeight) : 0;
4614
+ }
4615
+ this.synchronisationEnCours = false;
4616
+ }
4617
+ interdireLeMenu(evenement) {
4618
+ evenement.preventDefault();
4619
+ }
4620
+ static ɵfac = i0.ɵɵngDeclareFactory({
4621
+ minVersion: "12.0.0",
4622
+ version: "22.2.2",
4623
+ ngImport: i0,
4624
+ type: StImageViewer,
4625
+ deps: [],
4626
+ target: i0.ɵɵFactoryTarget.Component
4627
+ });
4628
+ static ɵcmp = i0.ɵɵngDeclareComponent({
4629
+ minVersion: "17.0.0",
4630
+ version: "22.2.2",
4631
+ type: StImageViewer,
4632
+ isStandalone: true,
4633
+ selector: "st-image-viewer",
4634
+ inputs: {
4635
+ images: {
4636
+ classPropertyName: "images",
4637
+ publicName: "images",
4638
+ isSignal: true,
4639
+ isRequired: true,
4640
+ transformFunction: null
4641
+ },
4642
+ libelle: {
4643
+ classPropertyName: "libelle",
4644
+ publicName: "libelle",
4645
+ isSignal: true,
4646
+ isRequired: true,
4647
+ transformFunction: null
4648
+ },
4649
+ filigrane: {
4650
+ classPropertyName: "filigrane",
4651
+ publicName: "filigrane",
4652
+ isSignal: true,
4653
+ isRequired: false,
4654
+ transformFunction: null
4655
+ }
4656
+ },
4657
+ host: {
4658
+ attributes: { "role": "group" },
4659
+ listeners: { "keydown": "auClavier($event)" },
4660
+ properties: { "attr.aria-label": "libelle()" },
4661
+ classAttribute: "st-image-viewer"
4662
+ },
4663
+ viewQueries: [{
4664
+ propertyName: "toiles",
4665
+ predicate: ["toile"],
4666
+ descendants: true,
4667
+ isSignal: true
4668
+ }, {
4669
+ propertyName: "defilements",
4670
+ predicate: ["defilement"],
4671
+ descendants: true,
4672
+ isSignal: true
4673
+ }],
4674
+ ngImport: i0,
4675
+ template: "<div\n class=\"st-image-viewer__barre\"\n role=\"toolbar\"\n [attr.aria-label]=\"libelles().outilsDeLaVisionneuse\"\n>\n <button\n stIconButton\n type=\"button\"\n icone=\"cercle-moins\"\n [etiquette]=\"libelles().reduire\"\n [indisponible]=\"zoom() <= bornes.zoom.min\"\n (click)=\"zoomer(-1)\"\n ></button>\n <span class=\"st-image-viewer__mesure\" aria-hidden=\"true\">{{ pourcentage(zoom()) }}&#160;%</span>\n <button\n stIconButton\n type=\"button\"\n icone=\"cercle-plus\"\n [etiquette]=\"libelles().agrandir\"\n [indisponible]=\"zoom() >= bornes.zoom.max\"\n (click)=\"zoomer(1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"rotation-arriere\"\n [etiquette]=\"libelles().tournerAGauche\"\n (click)=\"tourner(-90)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"redemarrer\"\n [etiquette]=\"libelles().tournerADroite\"\n (click)=\"tourner(90)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"luminosite\"\n [etiquette]=\"libelles().moinsDeContraste\"\n [indisponible]=\"contraste() <= bornes.contraste.min\"\n (click)=\"contraster(-1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"contraste\"\n [etiquette]=\"libelles().plusDeContraste\"\n [indisponible]=\"contraste() >= bornes.contraste.max\"\n (click)=\"contraster(1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"historique\"\n [etiquette]=\"libelles().vueDOrigine\"\n (click)=\"reinitialiser()\"\n ></button>\n</div>\n<p class=\"st-image-viewer__aide\" [id]=\"identifiantDeLAide\">\n {{ libelles().raccourcisDeLaVisionneuse }}\n</p>\n<div\n class=\"st-image-viewer__panneaux\"\n [class.st-image-viewer__panneaux--double]=\"affichees().length > 1\"\n>\n @for (image of affichees(); track $index) {\n <figure class=\"st-image-viewer__panneau\">\n <div\n #defilement\n class=\"st-image-viewer__defilement\"\n tabindex=\"0\"\n role=\"group\"\n [attr.aria-label]=\"image.libelle\"\n [attr.aria-describedby]=\"identifiantDeLAide\"\n [attr.aria-busy]=\"etats()[$index] === 'chargement' ? 'true' : null\"\n (scroll)=\"synchroniser($index)\"\n >\n @let mesure = mesures()[$index];\n <div\n class=\"st-image-viewer__boite\"\n [style.width.px]=\"mesure?.boiteLargeur ?? 0\"\n [style.height.px]=\"mesure?.boiteHauteur ?? 0\"\n >\n <canvas\n #toile\n class=\"st-image-viewer__toile\"\n role=\"img\"\n draggable=\"false\"\n [attr.aria-label]=\"image.libelle\"\n [style.width.px]=\"mesure?.largeur ?? 0\"\n [style.height.px]=\"mesure?.hauteur ?? 0\"\n [style.transform]=\"transformation()\"\n [style.filter]=\"filtre()\"\n (contextmenu)=\"interdireLeMenu($event)\"\n ></canvas>\n </div>\n </div>\n @if (filigrane(); as texte) {\n <st-watermark [texte]=\"texte\" />\n }\n <figcaption class=\"st-image-viewer__legende\">{{ image.libelle }}</figcaption>\n @if (etats()[$index] === 'illisible') {\n <p class=\"st-image-viewer__erreur\" role=\"status\">{{ libelles().imageIllisible }}</p>\n }\n </figure>\n }\n</div>\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
4676
+ 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:grid;gap:var(--st-espacement-2);min-inline-size:0}.st-image-viewer__barre{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1);align-items:center}.st-image-viewer__mesure{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-large);min-inline-size:4ch;font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte-discret);text-align:center}.st-image-viewer__aide{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-large);margin:0;color:var(--st-couleur-texte-discret)}.st-image-viewer__panneaux{display:grid;gap:var(--st-espacement-3)}@container (min-width: 48rem){.st-image-viewer__panneaux--double{grid-template-columns:repeat(2,minmax(0,1fr))}}.st-image-viewer__panneau{position:relative;display:grid;gap:var(--st-espacement-1);min-inline-size:0;margin:0}.st-image-viewer__defilement: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-image-viewer__defilement{overflow:auto;max-block-size:70vh;border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure);border-radius:var(--st-rayon-sm);background-color:var(--st-couleur-surface-conteneur-bas)}.st-image-viewer__boite{display:grid;place-items:center;margin-inline:auto}.st-image-viewer__toile{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.st-image-viewer__legende{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-large);color:var(--st-couleur-texte-discret)}.st-image-viewer__erreur{font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal);margin:0;color:var(--st-couleur-erreur)}@media print{.st-image-viewer__barre,.st-image-viewer__aide,.st-image-viewer__toile{display:none}}\n"],
4677
+ dependencies: [{
4678
+ kind: "component",
4679
+ type: StIconButton,
4680
+ selector: "button[stIconButton]",
4681
+ inputs: [
4682
+ "icone",
4683
+ "etiquette",
4684
+ "variante",
4685
+ "taille",
4686
+ "tailleDuGlyphe",
4687
+ "enfonce",
4688
+ "iconeEnfoncee",
4689
+ "chargement",
4690
+ "indisponible",
4691
+ "raisonIndisponible"
4692
+ ]
4693
+ }, {
4694
+ kind: "component",
4695
+ type: StWatermark,
4696
+ selector: "st-watermark",
4697
+ inputs: [
4698
+ "texte",
4699
+ "imprime",
4700
+ "opacite"
4701
+ ]
4702
+ }],
4703
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
4704
+ });
4705
+ };
4706
+ i0.ɵɵngDeclareClassMetadata({
4707
+ minVersion: "12.0.0",
4708
+ version: "22.2.2",
4709
+ ngImport: i0,
4710
+ type: StImageViewer,
4711
+ decorators: [{
4712
+ type: Component,
4713
+ args: [{
4714
+ selector: "st-image-viewer",
4715
+ changeDetection: ChangeDetectionStrategy.OnPush,
4716
+ imports: [StIconButton, StWatermark],
4717
+ host: {
4718
+ class: "st-image-viewer",
4719
+ role: "group",
4720
+ "[attr.aria-label]": "libelle()",
4721
+ "(keydown)": "auClavier($event)"
4722
+ },
4723
+ template: "<div\n class=\"st-image-viewer__barre\"\n role=\"toolbar\"\n [attr.aria-label]=\"libelles().outilsDeLaVisionneuse\"\n>\n <button\n stIconButton\n type=\"button\"\n icone=\"cercle-moins\"\n [etiquette]=\"libelles().reduire\"\n [indisponible]=\"zoom() <= bornes.zoom.min\"\n (click)=\"zoomer(-1)\"\n ></button>\n <span class=\"st-image-viewer__mesure\" aria-hidden=\"true\">{{ pourcentage(zoom()) }}&#160;%</span>\n <button\n stIconButton\n type=\"button\"\n icone=\"cercle-plus\"\n [etiquette]=\"libelles().agrandir\"\n [indisponible]=\"zoom() >= bornes.zoom.max\"\n (click)=\"zoomer(1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"rotation-arriere\"\n [etiquette]=\"libelles().tournerAGauche\"\n (click)=\"tourner(-90)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"redemarrer\"\n [etiquette]=\"libelles().tournerADroite\"\n (click)=\"tourner(90)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"luminosite\"\n [etiquette]=\"libelles().moinsDeContraste\"\n [indisponible]=\"contraste() <= bornes.contraste.min\"\n (click)=\"contraster(-1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"contraste\"\n [etiquette]=\"libelles().plusDeContraste\"\n [indisponible]=\"contraste() >= bornes.contraste.max\"\n (click)=\"contraster(1)\"\n ></button>\n <button\n stIconButton\n type=\"button\"\n icone=\"historique\"\n [etiquette]=\"libelles().vueDOrigine\"\n (click)=\"reinitialiser()\"\n ></button>\n</div>\n<p class=\"st-image-viewer__aide\" [id]=\"identifiantDeLAide\">\n {{ libelles().raccourcisDeLaVisionneuse }}\n</p>\n<div\n class=\"st-image-viewer__panneaux\"\n [class.st-image-viewer__panneaux--double]=\"affichees().length > 1\"\n>\n @for (image of affichees(); track $index) {\n <figure class=\"st-image-viewer__panneau\">\n <div\n #defilement\n class=\"st-image-viewer__defilement\"\n tabindex=\"0\"\n role=\"group\"\n [attr.aria-label]=\"image.libelle\"\n [attr.aria-describedby]=\"identifiantDeLAide\"\n [attr.aria-busy]=\"etats()[$index] === 'chargement' ? 'true' : null\"\n (scroll)=\"synchroniser($index)\"\n >\n @let mesure = mesures()[$index];\n <div\n class=\"st-image-viewer__boite\"\n [style.width.px]=\"mesure?.boiteLargeur ?? 0\"\n [style.height.px]=\"mesure?.boiteHauteur ?? 0\"\n >\n <canvas\n #toile\n class=\"st-image-viewer__toile\"\n role=\"img\"\n draggable=\"false\"\n [attr.aria-label]=\"image.libelle\"\n [style.width.px]=\"mesure?.largeur ?? 0\"\n [style.height.px]=\"mesure?.hauteur ?? 0\"\n [style.transform]=\"transformation()\"\n [style.filter]=\"filtre()\"\n (contextmenu)=\"interdireLeMenu($event)\"\n ></canvas>\n </div>\n </div>\n @if (filigrane(); as texte) {\n <st-watermark [texte]=\"texte\" />\n }\n <figcaption class=\"st-image-viewer__legende\">{{ image.libelle }}</figcaption>\n @if (etats()[$index] === 'illisible') {\n <p class=\"st-image-viewer__erreur\" role=\"status\">{{ libelles().imageIllisible }}</p>\n }\n </figure>\n }\n</div>\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
4724
+ 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:grid;gap:var(--st-espacement-2);min-inline-size:0}.st-image-viewer__barre{display:flex;flex-wrap:wrap;gap:var(--st-espacement-1);align-items:center}.st-image-viewer__mesure{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-large);min-inline-size:4ch;font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte-discret);text-align:center}.st-image-viewer__aide{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-large);margin:0;color:var(--st-couleur-texte-discret)}.st-image-viewer__panneaux{display:grid;gap:var(--st-espacement-3)}@container (min-width: 48rem){.st-image-viewer__panneaux--double{grid-template-columns:repeat(2,minmax(0,1fr))}}.st-image-viewer__panneau{position:relative;display:grid;gap:var(--st-espacement-1);min-inline-size:0;margin:0}.st-image-viewer__defilement: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-image-viewer__defilement{overflow:auto;max-block-size:70vh;border:var(--st-epaisseur-fine) solid var(--st-couleur-bordure);border-radius:var(--st-rayon-sm);background-color:var(--st-couleur-surface-conteneur-bas)}.st-image-viewer__boite{display:grid;place-items:center;margin-inline:auto}.st-image-viewer__toile{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.st-image-viewer__legende{font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-moyenne);letter-spacing:var(--st-interlettrage-large);color:var(--st-couleur-texte-discret)}.st-image-viewer__erreur{font-size:var(--st-taille-md);line-height:var(--st-interligne-md);font-weight:var(--st-graisse-normale);letter-spacing:var(--st-interlettrage-normal);margin:0;color:var(--st-couleur-erreur)}@media print{.st-image-viewer__barre,.st-image-viewer__aide,.st-image-viewer__toile{display:none}}\n"]
4725
+ }]
4726
+ }],
4727
+ ctorParameters: () => [],
4728
+ propDecorators: {
4729
+ images: [{
4730
+ type: i0.Input,
4731
+ args: [{
4732
+ isSignal: true,
4733
+ alias: "images",
4734
+ required: true
4735
+ }]
4736
+ }],
4737
+ libelle: [{
4738
+ type: i0.Input,
4739
+ args: [{
4740
+ isSignal: true,
4741
+ alias: "libelle",
4742
+ required: true
4743
+ }]
4744
+ }],
4745
+ filigrane: [{
4746
+ type: i0.Input,
4747
+ args: [{
4748
+ isSignal: true,
4749
+ alias: "filigrane",
4750
+ required: false
4751
+ }]
4752
+ }],
4753
+ toiles: [{
4754
+ type: i0.ViewChildren,
4755
+ args: ["toile", { isSignal: true }]
4756
+ }],
4757
+ defilements: [{
4758
+ type: i0.ViewChildren,
4759
+ args: ["defilement", { isSignal: true }]
4760
+ }]
4761
+ }
4762
+ });
4763
+ export { BORNES_DE_LA_VISIONNEUSE, LIBELLES_DONNEES_EN, LIBELLES_DONNEES_FR, OPACITE_DE_FILIGRANE, ST_LIBELLES_DONNEES, StAmountSummary, StAvatarGroup, StBarList, StCode, StCount, StDate, StDeadline, StDocument, StDuration, StFreshness, StImageViewer, StKbd, StLuJusquAuBout, StMasked, StMeter, StMoney, StNumber, StPerson, StRelativeTime, StRepartition, StStat, StStatGroup, StWatermark, catalogueDesDonnees, fournirLibellesDonnees, libellesDesDonnees, motifDeFiligrane, zonesDeJauge };
4411
4764
 
4412
4765
  //# sourceMappingURL=starterlib-ui-donnees.mjs.map