@starterlib/ui 0.9.0 → 0.10.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/README.md +44 -32
- package/assets/icones/catalogue.json +1 -1
- package/fesm2022/starterlib-ui-donnees.mjs +200 -3
- package/fesm2022/starterlib-ui-donnees.mjs.map +1 -1
- package/fesm2022/starterlib-ui-etats.mjs +1158 -0
- package/fesm2022/starterlib-ui-etats.mjs.map +1 -0
- package/fesm2022/starterlib-ui-formulaires.mjs +3 -2
- package/fesm2022/starterlib-ui-formulaires.mjs.map +1 -1
- package/fesm2022/starterlib-ui-indicateurs.mjs +1013 -0
- package/fesm2022/starterlib-ui-indicateurs.mjs.map +1 -0
- package/fesm2022/starterlib-ui-libelles-en.mjs.map +1 -1
- package/fesm2022/starterlib-ui-listes.mjs +5 -2
- package/fesm2022/starterlib-ui-listes.mjs.map +1 -1
- package/fesm2022/starterlib-ui-messagerie.mjs +2 -2
- package/fesm2022/starterlib-ui-messagerie.mjs.map +1 -1
- package/fesm2022/starterlib-ui-mise-en-page.mjs +892 -0
- package/fesm2022/starterlib-ui-mise-en-page.mjs.map +1 -0
- package/fesm2022/starterlib-ui-onglets.mjs.map +1 -1
- package/fesm2022/starterlib-ui-parcours.mjs +222 -4
- package/fesm2022/starterlib-ui-parcours.mjs.map +1 -1
- package/fesm2022/starterlib-ui-saisie.mjs +131 -3
- package/fesm2022/starterlib-ui-saisie.mjs.map +1 -1
- package/fesm2022/starterlib-ui-surfaces.mjs +2 -1
- package/fesm2022/starterlib-ui-surfaces.mjs.map +1 -1
- package/fesm2022/starterlib-ui.mjs +3510 -7105
- package/fesm2022/starterlib-ui.mjs.map +1 -1
- package/package.json +15 -3
- package/types/starterlib-ui-donnees.d.ts +95 -1
- package/types/starterlib-ui-etats.d.ts +486 -0
- package/types/starterlib-ui-formulaires.d.ts +1 -1
- package/types/starterlib-ui-indicateurs.d.ts +463 -0
- package/types/starterlib-ui-listes.d.ts +2 -1
- package/types/starterlib-ui-mise-en-page.d.ts +355 -0
- package/types/starterlib-ui-onglets.d.ts +6 -0
- package/types/starterlib-ui-parcours.d.ts +123 -3
- package/types/starterlib-ui-saisie.d.ts +72 -2
- package/types/starterlib-ui-selection.d.ts +3 -2
- package/types/starterlib-ui.d.ts +52 -1605
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ADRESSE_VIDE, CODES_DES_PAYS, adresseEstVide, ajouterJours, ajouterMois, bornerDate, codePostalValide, decimalesDe, estDateIso, estHeureIso, exempleDHeure, formatDAdresse, formaterDateLongue, formaterDateSaisie, formaterHeureSaisie, formaterIban, formaterMontant, formaterNombre, formaterTaille, ibanEstValide, jourDeLaSemaine, listeDesPays, masquerIban, montant, motifDHeure, motifDeDate, nomAffichable, nomDuPays, normaliserCodeDePays, normaliserCodePostal, normaliserIban, normaliserTelephone, partiesAffichees, partiesExigees, premierJourDeLaSemaine, regionReconnue,
|
|
1
|
+
import { ADRESSE_VIDE, CODES_DES_PAYS, adresseEstVide, ajouterJours, ajouterMois, bornerDate, codePostalValide, decimalesDe, estDateIso, estHeureIso, exempleDHeure, formatDAdresse, formaterDateLongue, formaterDateSaisie, formaterHeureSaisie, formaterIban, formaterMontant, formaterNombre, formaterTaille, ibanEstValide, jourDeLaSemaine, listeDesPays, masquerIban, montant, motifDHeure, motifDeDate, nomAffichable, nomDuPays, normaliserCodeDePays, normaliserCodePostal, normaliserIban, normaliserTelephone, partiesAffichees, partiesExigees, premierJourDeLaSemaine, regionReconnue, semainesDuMois, typeDeFichierAccepte } from "@starterlib/util/valeurs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, afterEveryRender, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, isDevMode, linkedSignal, model, numberAttribute, output, resource, signal, untracked, viewChild, viewChildren } from "@angular/core";
|
|
4
|
-
import { AnnonceLocale, FUSEAU_PAR_DEFAUT,
|
|
4
|
+
import { AnnonceLocale, FUSEAU_PAR_DEFAUT, ST_LIBELLES, ST_LISTES_D_ADRESSES, ST_LOCALE, StButton, StIcon, StIconButton, StIdentifiants, StInlineMessage, StProgress, StSpinner, affichageDiffere } from "@starterlib/ui";
|
|
5
5
|
import { DOCUMENT as DOCUMENT$1 } from "@angular/common";
|
|
6
6
|
import { tenue } from "@starterlib/tokens";
|
|
7
|
+
import { sansCommandesDeDirection, texteDUneLigne } from "@starterlib/util";
|
|
8
|
+
import { ST_CHAMP_A_ETIQUETTES, StTagGroup } from "@starterlib/ui/indicateurs";
|
|
7
9
|
function messageDErreur(erreur, libelles, locale = "fr-FR") {
|
|
8
10
|
const fourni = erreur.message?.trim();
|
|
9
11
|
if (fourni !== void 0 && fourni !== "") return fourni;
|
|
@@ -8604,6 +8606,132 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8604
8606
|
}]
|
|
8605
8607
|
}
|
|
8606
8608
|
});
|
|
8607
|
-
|
|
8609
|
+
var StFormActions = class StFormActions {
|
|
8610
|
+
disposition = input("collee", ...ngDevMode ? [{ debugName: "disposition" }] : /* istanbul ignore next */ []);
|
|
8611
|
+
collee = signal(false, ...ngDevMode ? [{ debugName: "collee" }] : /* istanbul ignore next */ []);
|
|
8612
|
+
constructor() {
|
|
8613
|
+
const element = inject(ElementRef).nativeElement;
|
|
8614
|
+
const document = inject(DOCUMENT$1);
|
|
8615
|
+
let arreter = () => void 0;
|
|
8616
|
+
afterNextRender(() => {
|
|
8617
|
+
if (isDevMode()) avertirDesEnvoisMultiples(element);
|
|
8618
|
+
if (this.disposition() === "collee") arreter = this.suivreLaBarre(element, document);
|
|
8619
|
+
});
|
|
8620
|
+
inject(DestroyRef).onDestroy(() => {
|
|
8621
|
+
arreter();
|
|
8622
|
+
});
|
|
8623
|
+
}
|
|
8624
|
+
suivreLaBarre(element, document) {
|
|
8625
|
+
const fenetre = document.defaultView;
|
|
8626
|
+
const Intersection = fenetre?.IntersectionObserver;
|
|
8627
|
+
const Taille = fenetre?.ResizeObserver;
|
|
8628
|
+
if (fenetre === null || Intersection === void 0) return () => void 0;
|
|
8629
|
+
const conteneur = conteneurDeDefilement(element, fenetre);
|
|
8630
|
+
const cible = conteneur ?? document.documentElement;
|
|
8631
|
+
const decalage = Number.parseFloat(fenetre.getComputedStyle(element).bottom) || 0;
|
|
8632
|
+
const intersection = new Intersection(([entree]) => {
|
|
8633
|
+
if (entree === void 0) return;
|
|
8634
|
+
const bas = entree.rootBounds?.bottom ?? fenetre.innerHeight;
|
|
8635
|
+
this.collee.set(entree.isIntersecting && entree.intersectionRatio < 1 && entree.boundingClientRect.bottom > bas);
|
|
8636
|
+
}, {
|
|
8637
|
+
root: conteneur,
|
|
8638
|
+
rootMargin: `0px 0px -${String(decalage + 1)}px 0px`,
|
|
8639
|
+
threshold: [0, 1]
|
|
8640
|
+
});
|
|
8641
|
+
intersection.observe(element);
|
|
8642
|
+
let taille = null;
|
|
8643
|
+
if (Taille !== void 0) {
|
|
8644
|
+
taille = new Taille((entrees) => {
|
|
8645
|
+
const hauteur = entrees[0]?.borderBoxSize[0]?.blockSize ?? element.getBoundingClientRect().height;
|
|
8646
|
+
const recouvert = `${String(Math.ceil(hauteur + decalage))}px`;
|
|
8647
|
+
cible.style.setProperty(PROPRIETE_HAUTEUR, recouvert);
|
|
8648
|
+
cible.style.setProperty("scroll-padding-block-end", recouvert);
|
|
8649
|
+
});
|
|
8650
|
+
taille.observe(element);
|
|
8651
|
+
}
|
|
8652
|
+
return () => {
|
|
8653
|
+
intersection.disconnect();
|
|
8654
|
+
taille?.disconnect();
|
|
8655
|
+
cible.style.removeProperty(PROPRIETE_HAUTEUR);
|
|
8656
|
+
cible.style.removeProperty("scroll-padding-block-end");
|
|
8657
|
+
};
|
|
8658
|
+
}
|
|
8659
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
8660
|
+
minVersion: "12.0.0",
|
|
8661
|
+
version: "22.2.0",
|
|
8662
|
+
ngImport: i0,
|
|
8663
|
+
type: StFormActions,
|
|
8664
|
+
deps: [],
|
|
8665
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
8666
|
+
});
|
|
8667
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
8668
|
+
minVersion: "17.1.0",
|
|
8669
|
+
version: "22.2.0",
|
|
8670
|
+
type: StFormActions,
|
|
8671
|
+
isStandalone: true,
|
|
8672
|
+
selector: "st-form-actions",
|
|
8673
|
+
inputs: { disposition: {
|
|
8674
|
+
classPropertyName: "disposition",
|
|
8675
|
+
publicName: "disposition",
|
|
8676
|
+
isSignal: true,
|
|
8677
|
+
isRequired: false,
|
|
8678
|
+
transformFunction: null
|
|
8679
|
+
} },
|
|
8680
|
+
host: {
|
|
8681
|
+
properties: {
|
|
8682
|
+
"attr.data-disposition": "disposition()",
|
|
8683
|
+
"attr.data-collee": "collee() ? \"\" : null"
|
|
8684
|
+
},
|
|
8685
|
+
classAttribute: "st-form-actions"
|
|
8686
|
+
},
|
|
8687
|
+
ngImport: i0,
|
|
8688
|
+
template: "<div class=\"st-form-actions__cadre\">\n <div class=\"st-form-actions__debut\"><ng-content select=\"[debut]\" /></div>\n <div class=\"st-form-actions__aide\"><ng-content select=\"[aide]\" /></div>\n <div class=\"st-form-actions__fin\"><ng-content /></div>\n</div>\n",
|
|
8689
|
+
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;margin-block-start:var(--st-espacement-4)}:host([data-disposition=collee]){position:sticky;inset-block-end:calc(var(--st-espacement-4) + env(safe-area-inset-bottom,0px));z-index:var(--st-plan-contenu-eleve);margin-block-start:var(--st-espacement-8);padding:var(--st-espacement-4);background:var(--st-couleur-surface);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee)}:host([data-disposition=collee][data-collee]){box-shadow:var(--st-ombre-flottante)}.st-form-actions__cadre,.st-form-actions__debut,.st-form-actions__fin{display:flex;flex-direction:column;align-items:stretch;gap:var(--st-espacement-1)}.st-form-actions__aide{display:flex;align-items:center;gap:var(--st-espacement-1-5);font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-form-actions__debut:empty,.st-form-actions__aide:empty,.st-form-actions__fin:empty{display:none}@container (min-width: 30rem){.st-form-actions__cadre,.st-form-actions__debut,.st-form-actions__fin{flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--st-espacement-3)}.st-form-actions__fin{justify-content:flex-end;margin-inline-start:auto}}@media print{:host([data-disposition=collee]){position:static}}@media(forced-colors:active){:host([data-disposition=collee]){border-color:CanvasText}}\n"],
|
|
8690
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
8691
|
+
});
|
|
8692
|
+
};
|
|
8693
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
8694
|
+
minVersion: "12.0.0",
|
|
8695
|
+
version: "22.2.0",
|
|
8696
|
+
ngImport: i0,
|
|
8697
|
+
type: StFormActions,
|
|
8698
|
+
decorators: [{
|
|
8699
|
+
type: Component,
|
|
8700
|
+
args: [{
|
|
8701
|
+
selector: "st-form-actions",
|
|
8702
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8703
|
+
host: {
|
|
8704
|
+
class: "st-form-actions",
|
|
8705
|
+
"[attr.data-disposition]": "disposition()",
|
|
8706
|
+
"[attr.data-collee]": "collee() ? \"\" : null"
|
|
8707
|
+
},
|
|
8708
|
+
template: "<div class=\"st-form-actions__cadre\">\n <div class=\"st-form-actions__debut\"><ng-content select=\"[debut]\" /></div>\n <div class=\"st-form-actions__aide\"><ng-content select=\"[aide]\" /></div>\n <div class=\"st-form-actions__fin\"><ng-content /></div>\n</div>\n",
|
|
8709
|
+
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;margin-block-start:var(--st-espacement-4)}:host([data-disposition=collee]){position:sticky;inset-block-end:calc(var(--st-espacement-4) + env(safe-area-inset-bottom,0px));z-index:var(--st-plan-contenu-eleve);margin-block-start:var(--st-espacement-8);padding:var(--st-espacement-4);background:var(--st-couleur-surface);border:var(--st-epaisseur-moyenne) solid var(--st-couleur-surface-active);border-radius:var(--st-rayon-lg);box-shadow:var(--st-ombre-surelevee)}:host([data-disposition=collee][data-collee]){box-shadow:var(--st-ombre-flottante)}.st-form-actions__cadre,.st-form-actions__debut,.st-form-actions__fin{display:flex;flex-direction:column;align-items:stretch;gap:var(--st-espacement-1)}.st-form-actions__aide{display:flex;align-items:center;gap:var(--st-espacement-1-5);font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);color:var(--st-couleur-texte-discret)}.st-form-actions__debut:empty,.st-form-actions__aide:empty,.st-form-actions__fin:empty{display:none}@container (min-width: 30rem){.st-form-actions__cadre,.st-form-actions__debut,.st-form-actions__fin{flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--st-espacement-3)}.st-form-actions__fin{justify-content:flex-end;margin-inline-start:auto}}@media print{:host([data-disposition=collee]){position:static}}@media(forced-colors:active){:host([data-disposition=collee]){border-color:CanvasText}}\n"]
|
|
8710
|
+
}]
|
|
8711
|
+
}],
|
|
8712
|
+
ctorParameters: () => [],
|
|
8713
|
+
propDecorators: { disposition: [{
|
|
8714
|
+
type: i0.Input,
|
|
8715
|
+
args: [{
|
|
8716
|
+
isSignal: true,
|
|
8717
|
+
alias: "disposition",
|
|
8718
|
+
required: false
|
|
8719
|
+
}]
|
|
8720
|
+
}] }
|
|
8721
|
+
});
|
|
8722
|
+
const PROPRIETE_HAUTEUR = "--st-form-actions-hauteur";
|
|
8723
|
+
function conteneurDeDefilement(element, fenetre) {
|
|
8724
|
+
for (let parent = element.parentElement; parent !== null; parent = parent.parentElement) {
|
|
8725
|
+
if (parent === element.ownerDocument.body) return null;
|
|
8726
|
+
const { overflowY } = fenetre.getComputedStyle(parent);
|
|
8727
|
+
if (overflowY === "auto" || overflowY === "scroll" || overflowY === "overlay") return parent;
|
|
8728
|
+
}
|
|
8729
|
+
return null;
|
|
8730
|
+
}
|
|
8731
|
+
function avertirDesEnvoisMultiples(element) {
|
|
8732
|
+
const envois = element.querySelectorAll("button[type=\"submit\"], input[type=\"submit\"]").length;
|
|
8733
|
+
if (envois > 1) console.warn(`[st-form-actions] ${String(envois)} boutons d'envoi : un formulaire n'a qu'une action principale, et Entree dans un champ declenche la premiere.`);
|
|
8734
|
+
}
|
|
8735
|
+
export { ContratDeCase, ContratDeChamp, ContratDeChampABornes, ControleDeSaisie, ST_CHAMP_D_ADRESSE, ST_ETAT_D_ENVOI, StAddressFieldset, StCalendar, StCheckbox, StCheckboxGroup, StChoice, StChoiceGroup, StChoiceMatrix, StConsentGroup, StConsentRow, StControleDeChamp, StCountryField, StErrorSummary, StFieldset, StFileUpload, StFormActions, StFormField, StFormRow, StIbanField, StInput, StOtpField, StPasswordField, StRadioGroup, StSearchField, StSelect, StSwitch, StTagInput, StTextarea, cleDeFichier, erreurCode, erreurDate, erreurHeure, erreurIban, erreurPays, erreurPlageDeDates, erreurTelephone, erreursDAdresse, erreursDeFichiers, exempleDeDate, filtrerOptions, fusionnerErreurs, groupesDOptions, libelleDePartie, messageDErreur, motifDHeureLocal, motifLocal, normaliserPourRecherche, optionsDesPays };
|
|
8608
8736
|
|
|
8609
8737
|
//# sourceMappingURL=starterlib-ui-saisie.mjs.map
|