@starterlib/ui 0.8.0 → 0.9.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.
Files changed (55) hide show
  1. package/LICENCES-TIERCES.md +236 -0
  2. package/README.md +101 -47
  3. package/assets/icones/catalogue.json +3296 -0
  4. package/assets/icones/sprite.svg +235 -35
  5. package/fesm2022/starterlib-ui-arbre.mjs +473 -80
  6. package/fesm2022/starterlib-ui-arbre.mjs.map +1 -1
  7. package/fesm2022/starterlib-ui-donnees.mjs +3551 -522
  8. package/fesm2022/starterlib-ui-donnees.mjs.map +1 -1
  9. package/fesm2022/starterlib-ui-formulaires.mjs +3186 -443
  10. package/fesm2022/starterlib-ui-formulaires.mjs.map +1 -1
  11. package/fesm2022/starterlib-ui-libelles-en.mjs +380 -139
  12. package/fesm2022/starterlib-ui-libelles-en.mjs.map +1 -1
  13. package/fesm2022/starterlib-ui-listes.mjs +5354 -658
  14. package/fesm2022/starterlib-ui-listes.mjs.map +1 -1
  15. package/fesm2022/starterlib-ui-messagerie.mjs +737 -0
  16. package/fesm2022/starterlib-ui-messagerie.mjs.map +1 -0
  17. package/fesm2022/starterlib-ui-navigation.mjs +506 -243
  18. package/fesm2022/starterlib-ui-navigation.mjs.map +1 -1
  19. package/fesm2022/starterlib-ui-onglets.mjs +369 -135
  20. package/fesm2022/starterlib-ui-onglets.mjs.map +1 -1
  21. package/fesm2022/starterlib-ui-parcours.mjs +2449 -0
  22. package/fesm2022/starterlib-ui-parcours.mjs.map +1 -0
  23. package/fesm2022/starterlib-ui-qr.mjs +907 -0
  24. package/fesm2022/starterlib-ui-qr.mjs.map +1 -0
  25. package/fesm2022/starterlib-ui-saisie.mjs +8566 -1589
  26. package/fesm2022/starterlib-ui-saisie.mjs.map +1 -1
  27. package/fesm2022/starterlib-ui-selection.mjs +1340 -268
  28. package/fesm2022/starterlib-ui-selection.mjs.map +1 -1
  29. package/fesm2022/starterlib-ui-sens.mjs +59 -0
  30. package/fesm2022/starterlib-ui-sens.mjs.map +1 -0
  31. package/fesm2022/starterlib-ui-surfaces.mjs +5140 -1387
  32. package/fesm2022/starterlib-ui-surfaces.mjs.map +1 -1
  33. package/fesm2022/starterlib-ui.mjs +10721 -2871
  34. package/fesm2022/starterlib-ui.mjs.map +1 -1
  35. package/package.json +27 -18
  36. package/styles/amorce.css +69 -0
  37. package/styles/couches.css +178 -0
  38. package/types/starterlib-ui-arbre.d.ts +199 -25
  39. package/types/starterlib-ui-donnees.d.ts +1441 -180
  40. package/types/starterlib-ui-formulaires.d.ts +1174 -139
  41. package/types/starterlib-ui-libelles-en.d.ts +3 -23
  42. package/types/starterlib-ui-listes.d.ts +2310 -255
  43. package/types/starterlib-ui-messagerie.d.ts +317 -0
  44. package/types/starterlib-ui-navigation.d.ts +201 -63
  45. package/types/starterlib-ui-onglets.d.ts +172 -43
  46. package/types/starterlib-ui-parcours.d.ts +916 -0
  47. package/types/starterlib-ui-qr.d.ts +105 -0
  48. package/types/starterlib-ui-saisie.d.ts +3431 -549
  49. package/types/starterlib-ui-selection.d.ts +441 -65
  50. package/types/starterlib-ui-sens.d.ts +44 -0
  51. package/types/starterlib-ui-surfaces.d.ts +1899 -510
  52. package/types/starterlib-ui.d.ts +4749 -1115
  53. package/fesm2022/starterlib-ui-interactions.mjs +0 -43
  54. package/fesm2022/starterlib-ui-interactions.mjs.map +0 -1
  55. package/types/starterlib-ui-interactions.d.ts +0 -4
@@ -1,82 +1,475 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, model, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { Tree, TreeItem, TreeItemGroup } from '@angular/aria/tree';
5
- import { StIcon } from '@starterlib/ui';
6
-
7
- /**
8
- * Arbre de donnees hierarchiques, sur `@angular/aria/tree` : dossiers, plan
9
- * comptable, organisation.
10
- *
11
- * ```html
12
- * <st-tree etiquette="Plan comptable" [noeuds]="comptes" [(selection)]="compte" [(deplies)]="ouverts" />
13
- * ```
14
- *
15
- * ⚠️ **Jamais pour la navigation du site** (UX-17) : une navigation est une liste
16
- * de liens, que le lecteur d'ecran liste et parcourt comme telle. Un arbre se
17
- * parcourt aux fleches, un element a la fois, et ses elements ne sont pas des
18
- * liens. Le mode « navigation » de la primitive n'est donc pas expose.
19
- *
20
- * ⚠️ **Les noeuds sont rendus par le composant, a partir de donnees** (FE-6) : la
21
- * primitive relie un element a son arbre par injection, et un contenu projete
22
- * garde l'injecteur de l'endroit ou il est ecrit — lecon de `st-menu`.
23
- *
24
- * Clavier de la primitive : fleches haut et bas entre les elements visibles,
25
- * droite pour deplier ou entrer, gauche pour replier ou remonter, Debut et Fin,
26
- * recherche a la frappe ; Espace ou Entree choisit. Selection et depliage sont des
27
- * listes de VALEURS, lisibles et restaurables par l'application.
28
- */
29
- class StTree {
30
- /** Nom de l'arbre, lu a l'entree. Obligatoire. */
31
- etiquette = input.required(/* @ts-ignore */
32
- ...(ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []));
33
- noeuds = input.required(/* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "noeuds" }] : /* istanbul ignore next */ []));
35
- multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
36
- selection = model([], /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
38
- deplies = model([], /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "deplies" }] : /* istanbul ignore next */ []));
40
- /** La primitive attend un tableau modifiable ; le modele est en lecture seule. */
41
- valeursChoisies = computed(() => [...this.selection()], /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "valeursChoisies" }] : /* istanbul ignore next */ []));
43
- ensembleDeplie = computed(() => new Set(this.deplies()), /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "ensembleDeplie" }] : /* istanbul ignore next */ []));
45
- estDeplie(noeud) {
46
- return this.ensembleDeplie().has(noeud.valeur);
47
- }
48
- surDepliage(noeud, deplie) {
49
- const deplies = this.deplies().filter((valeur) => valeur !== noeud.valeur);
50
- this.deplies.set(deplie ? [...deplies, noeud.valeur] : deplies);
51
- }
52
- surSelection(valeurs) {
53
- this.selection.set([...valeurs]);
54
- }
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: StTree, deps: [], target: i0.ɵɵFactoryTarget.Component });
56
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: StTree, isStandalone: true, selector: "st-tree", inputs: { etiquette: { classPropertyName: "etiquette", publicName: "etiquette", isSignal: true, isRequired: true, transformFunction: null }, noeuds: { classPropertyName: "noeuds", publicName: "noeuds", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, deplies: { classPropertyName: "deplies", publicName: "deplies", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", deplies: "depliesChange" }, host: { classAttribute: "st-tree" }, ngImport: i0, template: "<ul\n #arbre=\"ngTree\"\n class=\"st-tree__racine\"\n ngTree\n selectionMode=\"explicit\"\n [attr.aria-label]=\"etiquette()\"\n [multi]=\"multiple()\"\n [value]=\"valeursChoisies()\"\n (valueChange)=\"surSelection($event)\"\n>\n <ng-container\n *ngTemplateOutlet=\"niveau; context: { noeuds: noeuds(), parent: arbre, niveau: 1 }\"\n />\n</ul>\n\n<ng-template #niveau let-noeuds=\"noeuds\" let-parent=\"parent\" let-profondeur=\"niveau\">\n @for (noeud of noeuds; track noeud.valeur) {\n <li\n #element=\"ngTreeItem\"\n class=\"st-tree__element\"\n ngTreeItem\n [parent]=\"parent\"\n [value]=\"noeud.valeur\"\n [label]=\"noeud.libelle\"\n [disabled]=\"noeud.desactive === true\"\n [expanded]=\"estDeplie(noeud)\"\n [style.--st-arbre-niveau]=\"profondeur\"\n (expandedChange)=\"surDepliage(noeud, $event)\"\n >\n @if (noeud.enfants?.length) {\n <st-icon\n class=\"st-tree__chevron\"\n taille=\"sm\"\n [nom]=\"estDeplie(noeud) ? 'chevron-bas' : 'chevron-droite'\"\n />\n } @else {\n <span class=\"st-tree__espace\"></span>\n }\n <span class=\"st-tree__libelle\">{{ noeud.libelle }}</span>\n <st-icon class=\"st-tree__coche\" nom=\"coche\" taille=\"sm\" />\n </li>\n @if (noeud.enfants?.length) {\n <ul class=\"st-tree__groupe\" role=\"group\">\n <ng-template ngTreeItemGroup [ownedBy]=\"element\" #groupe=\"ngTreeItemGroup\">\n <ng-container\n *ngTemplateOutlet=\"\n niveau;\n context: { noeuds: noeud.enfants, parent: groupe, niveau: profondeur + 1 }\n \"\n />\n </ng-template>\n </ul>\n }\n }\n</ng-template>\n", styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-tree__racine,.st-tree__groupe{padding:0;margin:0;list-style:none}.st-tree__element{display:flex;gap:var(--st-espacement-1);align-items:center;min-block-size:var(--st-cible-tactile-min);padding-inline:calc((var(--st-arbre-niveau, 1) - 1) * 1.5rem + var(--st-espacement-2)) var(--st-espacement-2);cursor:pointer;border-radius:var(--st-rayon-sm)}@media(hover:hover){.st-tree__element:hover{background:var(--st-couleur-surface-survol)}}.st-tree__element:focus-visible{outline:2px solid var(--st-couleur-anneau-focus);outline-offset:-2px}.st-tree__element[aria-selected=true]{font-weight:var(--st-graisse-semi);background:var(--st-couleur-primaire-discret)}.st-tree__element[aria-disabled=true]{color:var(--st-couleur-texte-desactive);cursor:not-allowed}.st-tree__chevron,.st-tree__espace{flex:none;inline-size:1rem}.st-tree__coche{margin-inline-start:auto;visibility:hidden}[aria-selected=true]>.st-tree__coche{visibility:visible}.st-tree__groupe:empty{display:none}\n"], dependencies: [{ kind: "directive", type: Tree, selector: "[ngTree]", inputs: ["id", "orientation", "multi", "disabled", "selectionMode", "focusMode", "wrap", "softDisabled", "typeaheadDelay", "tabindex", "value", "nav", "currentType"], outputs: ["valueChange"], exportAs: ["ngTree"] }, { kind: "directive", type: TreeItem, selector: "[ngTreeItem]", inputs: ["id", "value", "parent", "disabled", "selectable", "expanded", "label"], outputs: ["expandedChange"], exportAs: ["ngTreeItem"] }, { kind: "directive", type: TreeItemGroup, selector: "ng-template[ngTreeItemGroup]", inputs: ["ownedBy"], exportAs: ["ngTreeItemGroup"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: StIcon, selector: "st-icon", inputs: ["nom", "sprite", "nomMetier", "taille", "ton", "etiquette"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, InjectionToken, booleanAttribute, computed, inject, input, model, output } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { Tree, TreeItem, TreeItemGroup } from "@angular/aria/tree";
5
+ import { ST_LIBELLES, ST_LOCALE, ST_MONTANTS_MASQUES, StEmpty, StIcon, StSpinner, affichageDiffere, catalogueDuPointDEntree } from "@starterlib/ui";
6
+ import { sansCommandesDeDirection } from "@starterlib/util";
7
+ const LIBELLES_ARBRE_FR = {
8
+ aucunElement: "Aucun élément",
9
+ elementsAuNombreDe: (nombre, enChiffres) => `${enChiffres} ${nombre <= 1 ? "élément" : "éléments"}`,
10
+ partiellementSelectionne: "partiellement sélectionné"
11
+ };
12
+ const LIBELLES_ARBRE_EN = {
13
+ aucunElement: "No items",
14
+ elementsAuNombreDe: (nombre, enChiffres) => `${enChiffres} ${nombre === 1 ? "item" : "items"}`,
15
+ partiellementSelectionne: "partially selected"
16
+ };
17
+ const ST_LIBELLES_ARBRE = new InjectionToken("ST_LIBELLES_ARBRE", {
18
+ providedIn: "root",
19
+ factory: () => ({
20
+ fr: LIBELLES_ARBRE_FR,
21
+ en: LIBELLES_ARBRE_EN
22
+ })
23
+ });
24
+ function fournirLibellesArbre(catalogues) {
25
+ return {
26
+ provide: ST_LIBELLES_ARBRE,
27
+ useValue: {
28
+ fr: LIBELLES_ARBRE_FR,
29
+ en: LIBELLES_ARBRE_EN,
30
+ ...catalogues
31
+ }
32
+ };
57
33
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: StTree, decorators: [{
59
- type: Component,
60
- args: [{ selector: 'st-tree', changeDetection: ChangeDetectionStrategy.OnPush, imports: [Tree, TreeItem, TreeItemGroup, NgTemplateOutlet, StIcon], host: { class: 'st-tree' }, template: "<ul\n #arbre=\"ngTree\"\n class=\"st-tree__racine\"\n ngTree\n selectionMode=\"explicit\"\n [attr.aria-label]=\"etiquette()\"\n [multi]=\"multiple()\"\n [value]=\"valeursChoisies()\"\n (valueChange)=\"surSelection($event)\"\n>\n <ng-container\n *ngTemplateOutlet=\"niveau; context: { noeuds: noeuds(), parent: arbre, niveau: 1 }\"\n />\n</ul>\n\n<ng-template #niveau let-noeuds=\"noeuds\" let-parent=\"parent\" let-profondeur=\"niveau\">\n @for (noeud of noeuds; track noeud.valeur) {\n <li\n #element=\"ngTreeItem\"\n class=\"st-tree__element\"\n ngTreeItem\n [parent]=\"parent\"\n [value]=\"noeud.valeur\"\n [label]=\"noeud.libelle\"\n [disabled]=\"noeud.desactive === true\"\n [expanded]=\"estDeplie(noeud)\"\n [style.--st-arbre-niveau]=\"profondeur\"\n (expandedChange)=\"surDepliage(noeud, $event)\"\n >\n @if (noeud.enfants?.length) {\n <st-icon\n class=\"st-tree__chevron\"\n taille=\"sm\"\n [nom]=\"estDeplie(noeud) ? 'chevron-bas' : 'chevron-droite'\"\n />\n } @else {\n <span class=\"st-tree__espace\"></span>\n }\n <span class=\"st-tree__libelle\">{{ noeud.libelle }}</span>\n <st-icon class=\"st-tree__coche\" nom=\"coche\" taille=\"sm\" />\n </li>\n @if (noeud.enfants?.length) {\n <ul class=\"st-tree__groupe\" role=\"group\">\n <ng-template ngTreeItemGroup [ownedBy]=\"element\" #groupe=\"ngTreeItemGroup\">\n <ng-container\n *ngTemplateOutlet=\"\n niveau;\n context: { noeuds: noeud.enfants, parent: groupe, niveau: profondeur + 1 }\n \"\n />\n </ng-template>\n </ul>\n }\n }\n</ng-template>\n", styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-tree__racine,.st-tree__groupe{padding:0;margin:0;list-style:none}.st-tree__element{display:flex;gap:var(--st-espacement-1);align-items:center;min-block-size:var(--st-cible-tactile-min);padding-inline:calc((var(--st-arbre-niveau, 1) - 1) * 1.5rem + var(--st-espacement-2)) var(--st-espacement-2);cursor:pointer;border-radius:var(--st-rayon-sm)}@media(hover:hover){.st-tree__element:hover{background:var(--st-couleur-surface-survol)}}.st-tree__element:focus-visible{outline:2px solid var(--st-couleur-anneau-focus);outline-offset:-2px}.st-tree__element[aria-selected=true]{font-weight:var(--st-graisse-semi);background:var(--st-couleur-primaire-discret)}.st-tree__element[aria-disabled=true]{color:var(--st-couleur-texte-desactive);cursor:not-allowed}.st-tree__chevron,.st-tree__espace{flex:none;inline-size:1rem}.st-tree__coche{margin-inline-start:auto;visibility:hidden}[aria-selected=true]>.st-tree__coche{visibility:visible}.st-tree__groupe:empty{display:none}\n"] }]
61
- }], propDecorators: { etiquette: [{ type: i0.Input, args: [{ isSignal: true, alias: "etiquette", required: true }] }], noeuds: [{ type: i0.Input, args: [{ isSignal: true, alias: "noeuds", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], deplies: [{ type: i0.Input, args: [{ isSignal: true, alias: "deplies", required: false }] }, { type: i0.Output, args: ["depliesChange"] }] } });
62
-
63
- /**
64
- * @starterlib/ui/arbre — l'arborescence deroulante.
65
- *
66
- * ⚠️ Detache de `@starterlib/ui/interactions` (ADR 0031, decision 2). Pair
67
- * lourd de ce point d'entree, et le seul : `@angular/aria/tree`.
68
- *
69
- * ⚠️ En federation, ce point d'entree se partage SEPAREMENT : c'est un
70
- * specificateur de module distinct.
71
- *
72
- * ```ts
73
- * import { StTree } from '@starterlib/ui/arbre';
74
- * ```
75
- */
76
-
77
- /**
78
- * Generated bundle index. Do not edit.
79
- */
34
+ function libellesDeLArbre() {
35
+ const catalogue = catalogueDeLArbre();
36
+ return computed(() => catalogue().libelles);
37
+ }
38
+ function catalogueDeLArbre() {
39
+ return catalogueDuPointDEntree("@starterlib/ui/arbre", inject(ST_LIBELLES_ARBRE), LIBELLES_ARBRE_FR, "fournirLibellesArbre");
40
+ }
41
+ var StTreeAttente = class StTreeAttente {
42
+ actif = input(false, {
43
+ ...ngDevMode ? { debugName: "actif" } : /* istanbul ignore next */ {},
44
+ transform: booleanAttribute
45
+ });
46
+ visible = affichageDiffere(() => this.actif());
47
+ static ɵfac = i0.ɵɵngDeclareFactory({
48
+ minVersion: "12.0.0",
49
+ version: "22.2.0",
50
+ ngImport: i0,
51
+ type: StTreeAttente,
52
+ deps: [],
53
+ target: i0.ɵɵFactoryTarget.Component
54
+ });
55
+ static ɵcmp = i0.ɵɵngDeclareComponent({
56
+ minVersion: "17.0.0",
57
+ version: "22.2.0",
58
+ type: StTreeAttente,
59
+ isStandalone: true,
60
+ selector: "st-tree-attente",
61
+ inputs: { actif: {
62
+ classPropertyName: "actif",
63
+ publicName: "actif",
64
+ isSignal: true,
65
+ isRequired: false,
66
+ transformFunction: null
67
+ } },
68
+ host: { classAttribute: "st-tree__chargement" },
69
+ ngImport: i0,
70
+ template: "@if (visible()) {\n <st-spinner taille=\"sm\" />\n}\n",
71
+ dependencies: [{
72
+ kind: "component",
73
+ type: StSpinner,
74
+ selector: "st-spinner",
75
+ inputs: [
76
+ "taille",
77
+ "ton",
78
+ "etiquette",
79
+ "icone"
80
+ ]
81
+ }],
82
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
83
+ });
84
+ };
85
+ i0.ɵɵngDeclareClassMetadata({
86
+ minVersion: "12.0.0",
87
+ version: "22.2.0",
88
+ ngImport: i0,
89
+ type: StTreeAttente,
90
+ decorators: [{
91
+ type: Component,
92
+ args: [{
93
+ selector: "st-tree-attente",
94
+ changeDetection: ChangeDetectionStrategy.OnPush,
95
+ imports: [StSpinner],
96
+ host: { class: "st-tree__chargement" },
97
+ template: "@if (visible()) {\n <st-spinner taille=\"sm\" />\n}\n"
98
+ }]
99
+ }],
100
+ propDecorators: { actif: [{
101
+ type: i0.Input,
102
+ args: [{
103
+ isSignal: true,
104
+ alias: "actif",
105
+ required: false
106
+ }]
107
+ }] }
108
+ });
109
+ function tousLesNoeuds(noeuds) {
110
+ const vus = [];
111
+ const pile = [...noeuds].reverse();
112
+ for (let noeud = pile.pop(); noeud !== void 0; noeud = pile.pop()) {
113
+ vus.push(noeud);
114
+ for (let rang = (noeud.enfants?.length ?? 0) - 1; rang >= 0; rang -= 1) {
115
+ const enfant = noeud.enfants?.[rang];
116
+ if (enfant !== void 0) pile.push(enfant);
117
+ }
118
+ }
119
+ return vus;
120
+ }
121
+ function aDesIcones(noeuds) {
122
+ return tousLesNoeuds(noeuds).some((noeud) => Boolean(noeud.icone ?? noeud.iconeDepliee));
123
+ }
124
+ var StTree = class StTree {
125
+ affichable = sansCommandesDeDirection;
126
+ locale = inject(ST_LOCALE);
127
+ catalogue = catalogueDeLArbre();
128
+ libelles = computed(() => this.catalogue().libelles, ...ngDevMode ? [{ debugName: "libelles" }] : /* istanbul ignore next */ []);
129
+ libellesUi = inject(ST_LIBELLES);
130
+ montantsMasques = inject(ST_MONTANTS_MASQUES);
131
+ etiquette = input.required(...ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []);
132
+ noeuds = input.required(...ngDevMode ? [{ debugName: "noeuds" }] : /* istanbul ignore next */ []);
133
+ multiple = input(false, {
134
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
135
+ transform: booleanAttribute
136
+ });
137
+ texteVide = input(null, ...ngDevMode ? [{ debugName: "texteVide" }] : /* istanbul ignore next */ []);
138
+ descriptionVide = input(null, ...ngDevMode ? [{ debugName: "descriptionVide" }] : /* istanbul ignore next */ []);
139
+ niveauDuTitreVide = input(3, ...ngDevMode ? [{ debugName: "niveauDuTitreVide" }] : /* istanbul ignore next */ []);
140
+ selection = model([], ...ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []);
141
+ deplies = model([], ...ngDevMode ? [{ debugName: "deplies" }] : /* istanbul ignore next */ []);
142
+ chargementDemande = output();
143
+ valeursChoisies = computed(() => [...this.selection()], ...ngDevMode ? [{ debugName: "valeursChoisies" }] : /* istanbul ignore next */ []);
144
+ ensembleDeplie = computed(() => new Set(this.deplies()), ...ngDevMode ? [{ debugName: "ensembleDeplie" }] : /* istanbul ignore next */ []);
145
+ ensembleChoisi = computed(() => new Set(this.selection()), ...ngDevMode ? [{ debugName: "ensembleChoisi" }] : /* istanbul ignore next */ []);
146
+ formatDesComptes = computed(() => new Intl.NumberFormat(this.locale()), ...ngDevMode ? [{ debugName: "formatDesComptes" }] : /* istanbul ignore next */ []);
147
+ avecIcones = computed(() => aDesIcones(this.noeuds()), ...ngDevMode ? [{ debugName: "avecIcones" }] : /* istanbul ignore next */ []);
148
+ texteDuVide = computed(() => this.texteVide() ?? this.libelles().aucunElement, ...ngDevMode ? [{ debugName: "texteDuVide" }] : /* istanbul ignore next */ []);
149
+ langueDuVide = computed(() => this.texteVide() === null && this.descriptionVide() === null ? this.catalogue().langueDeRepli : null, ...ngDevMode ? [{ debugName: "langueDuVide" }] : /* istanbul ignore next */ []);
150
+ estDeplie(noeud) {
151
+ return this.ensembleDeplie().has(noeud.valeur);
152
+ }
153
+ estParent(noeud) {
154
+ return (noeud.enfants?.length ?? 0) > 0 || noeud.aDesEnfants === true;
155
+ }
156
+ parentsPartiels = computed(() => {
157
+ const partiels = /* @__PURE__ */ new Set();
158
+ const choisis = this.ensembleChoisi();
159
+ if (!this.multiple() || choisis.size === 0) return partiels;
160
+ const contientUnChoix = /* @__PURE__ */ new Set();
161
+ for (const noeud of tousLesNoeuds(this.noeuds()).reverse()) {
162
+ if (!(noeud.enfants ?? []).some((enfant) => choisis.has(enfant.valeur) || contientUnChoix.has(enfant.valeur))) continue;
163
+ contientUnChoix.add(noeud.valeur);
164
+ if (!choisis.has(noeud.valeur)) partiels.add(noeud.valeur);
165
+ }
166
+ return partiels;
167
+ }, ...ngDevMode ? [{ debugName: "parentsPartiels" }] : /* istanbul ignore next */ []);
168
+ estPartiel(noeud) {
169
+ return this.parentsPartiels().has(noeud.valeur);
170
+ }
171
+ complementMasque(noeud) {
172
+ return noeud.complementMontant === true && this.montantsMasques();
173
+ }
174
+ iconeDe(noeud) {
175
+ if (this.estDeplie(noeud)) return noeud.iconeDepliee ?? noeud.icone ?? null;
176
+ return noeud.icone ?? null;
177
+ }
178
+ compteDe(compte) {
179
+ return this.formatDesComptes().format(compte);
180
+ }
181
+ nomDe(noeud) {
182
+ const parties = [sansCommandesDeDirection(noeud.libelle)];
183
+ if (noeud.compte !== void 0 && noeud.compte !== null) parties.push(this.libelles().elementsAuNombreDe(noeud.compte, this.compteDe(noeud.compte)));
184
+ if (noeud.complement) parties.push(this.complementMasque(noeud) ? this.libellesUi().montantMasque : sansCommandesDeDirection(noeud.complement));
185
+ if (this.estPartiel(noeud)) parties.push(this.libelles().partiellementSelectionne);
186
+ return parties.join(", ");
187
+ }
188
+ surDepliage(noeud, deplie) {
189
+ const deplies = this.deplies().filter((valeur) => valeur !== noeud.valeur);
190
+ this.deplies.set(deplie ? [...deplies, noeud.valeur] : deplies);
191
+ if (deplie && noeud.aDesEnfants === true && (noeud.enfants?.length ?? 0) === 0) this.chargementDemande.emit(noeud.valeur);
192
+ }
193
+ surSelection(valeurs) {
194
+ this.selection.set([...valeurs]);
195
+ }
196
+ static ɵfac = i0.ɵɵngDeclareFactory({
197
+ minVersion: "12.0.0",
198
+ version: "22.2.0",
199
+ ngImport: i0,
200
+ type: StTree,
201
+ deps: [],
202
+ target: i0.ɵɵFactoryTarget.Component
203
+ });
204
+ static ɵcmp = i0.ɵɵngDeclareComponent({
205
+ minVersion: "17.0.0",
206
+ version: "22.2.0",
207
+ type: StTree,
208
+ isStandalone: true,
209
+ selector: "st-tree",
210
+ inputs: {
211
+ etiquette: {
212
+ classPropertyName: "etiquette",
213
+ publicName: "etiquette",
214
+ isSignal: true,
215
+ isRequired: true,
216
+ transformFunction: null
217
+ },
218
+ noeuds: {
219
+ classPropertyName: "noeuds",
220
+ publicName: "noeuds",
221
+ isSignal: true,
222
+ isRequired: true,
223
+ transformFunction: null
224
+ },
225
+ multiple: {
226
+ classPropertyName: "multiple",
227
+ publicName: "multiple",
228
+ isSignal: true,
229
+ isRequired: false,
230
+ transformFunction: null
231
+ },
232
+ texteVide: {
233
+ classPropertyName: "texteVide",
234
+ publicName: "texteVide",
235
+ isSignal: true,
236
+ isRequired: false,
237
+ transformFunction: null
238
+ },
239
+ descriptionVide: {
240
+ classPropertyName: "descriptionVide",
241
+ publicName: "descriptionVide",
242
+ isSignal: true,
243
+ isRequired: false,
244
+ transformFunction: null
245
+ },
246
+ niveauDuTitreVide: {
247
+ classPropertyName: "niveauDuTitreVide",
248
+ publicName: "niveauDuTitreVide",
249
+ isSignal: true,
250
+ isRequired: false,
251
+ transformFunction: null
252
+ },
253
+ selection: {
254
+ classPropertyName: "selection",
255
+ publicName: "selection",
256
+ isSignal: true,
257
+ isRequired: false,
258
+ transformFunction: null
259
+ },
260
+ deplies: {
261
+ classPropertyName: "deplies",
262
+ publicName: "deplies",
263
+ isSignal: true,
264
+ isRequired: false,
265
+ transformFunction: null
266
+ }
267
+ },
268
+ outputs: {
269
+ selection: "selectionChange",
270
+ deplies: "depliesChange",
271
+ chargementDemande: "chargementDemande"
272
+ },
273
+ host: { classAttribute: "st-tree" },
274
+ ngImport: i0,
275
+ template: "@if (noeuds().length === 0) {\n <!-- L'etat vide du canon (D26, D68) : du contenu statique, et non une region vivante. Son\n `lang`, quand le catalogue retombe sur le francais et ecrit seul le titre (D-29). -->\n <st-empty\n class=\"st-tree__vide\"\n taille=\"sm\"\n icone=\"dossier-barre\"\n [attr.lang]=\"langueDuVide()\"\n [titre]=\"texteDuVide()\"\n [description]=\"descriptionVide()\"\n [niveauDuTitre]=\"niveauDuTitreVide()\"\n />\n} @else {\n <ul\n #arbre=\"ngTree\"\n class=\"st-tree__racine\"\n ngTree\n selectionMode=\"explicit\"\n [attr.aria-label]=\"etiquette()\"\n [multi]=\"multiple()\"\n [value]=\"valeursChoisies()\"\n (valueChange)=\"surSelection($event)\"\n >\n <ng-container\n *ngTemplateOutlet=\"niveau; context: { noeuds: noeuds(), parent: arbre, niveau: 1 }\"\n />\n </ul>\n}\n\n<ng-template #niveau let-noeuds=\"noeuds\" let-parent=\"parent\" let-profondeur=\"niveau\">\n @for (noeud of noeuds; track noeud.valeur) {\n <!-- Le nom de l'element est le sien, jamais le texte de ses enfants (le groupe est DANS lui). -->\n <li\n #element=\"ngTreeItem\"\n class=\"st-tree__element\"\n ngTreeItem\n [parent]=\"parent\"\n [value]=\"noeud.valeur\"\n [label]=\"noeud.libelle\"\n [disabled]=\"noeud.desactive === true\"\n [selectable]=\"noeud.selectionnable !== false\"\n [expanded]=\"estDeplie(noeud)\"\n [attr.aria-label]=\"nomDe(noeud)\"\n [attr.aria-busy]=\"noeud.chargement ? 'true' : null\"\n [attr.data-parent]=\"estParent(noeud) ? '' : null\"\n [attr.data-partiel]=\"estPartiel(noeud) ? '' : null\"\n [style.--st-arbre-niveau]=\"profondeur\"\n (expandedChange)=\"surDepliage(noeud, $event)\"\n >\n <div class=\"st-tree__ligne\">\n <!-- La tete (chevron, icone, libelle), d'un bloc et premiere sur sa ligne : c'est la fin\n qui passe dessous quand la place manque, jamais le libelle. -->\n <span class=\"st-tree__tete\">\n <span class=\"st-tree__bascule\">\n @if (estParent(noeud)) {\n <st-icon class=\"st-tree__chevron\" nom=\"chevron-droite\" taille=\"18\" />\n } @else {\n <span class=\"st-tree__point\"></span>\n }\n </span>\n @if (iconeDe(noeud); as icone) {\n <st-icon class=\"st-tree__icone\" taille=\"18\" [icone]=\"icone\" />\n } @else if (avecIcones()) {\n <!-- La colonne des icones est tenue sur chaque ligne des qu'un noeud en porte une. -->\n <span class=\"st-tree__icone st-tree__icone--vide\"></span>\n }\n <span class=\"st-tree__libelle\" dir=\"auto\">{{ affichable(noeud.libelle) }}</span>\n </span>\n <!-- La fin de ligne, d'un bloc : quand elle ne tient pas a cote du libelle entier, elle passe\n dessous, alignee a la fin, plutot que d'ecraser le libelle lettre a lettre. -->\n <span class=\"st-tree__fin\">\n @if (noeud.compte !== undefined && noeud.compte !== null) {\n <span class=\"st-tree__compte\">{{ compteDe(noeud.compte) }}</span>\n }\n @if (noeud.complement) {\n @if (complementMasque(noeud)) {\n <!-- Masque avec les montants de l'ecran : ni chiffre, ni ton (le ton dirait le signe). -->\n <span class=\"st-tree__complement\" aria-hidden=\"true\">&bull;&bull;&bull;&bull;</span>\n } @else {\n <span\n class=\"st-tree__complement\"\n dir=\"auto\"\n [attr.data-ton]=\"noeud.tonDuComplement ?? null\"\n >{{ affichable(noeud.complement) }}</span\n >\n }\n }\n @if (noeud.aDesEnfants || noeud.chargement) {\n <st-tree-attente [actif]=\"noeud.chargement === true\" />\n }\n <!-- La selection se dit aussi par la forme, dans une case tenue sur chaque ligne (rien\n ne bouge quand on choisit) : le cercle coche plein, ou le cercle moins d'un parent\n en partie choisi. -->\n @if (estPartiel(noeud)) {\n <st-icon class=\"st-tree__coche\" nom=\"cercle-moins\" taille=\"16\" />\n } @else {\n <st-icon class=\"st-tree__coche\" nom=\"cercle-coche\" variante=\"plein\" taille=\"16\" />\n }\n </span>\n </div>\n @if (estParent(noeud)) {\n <ul class=\"st-tree__groupe\" role=\"group\">\n <ng-template ngTreeItemGroup [ownedBy]=\"element\" #groupe=\"ngTreeItemGroup\">\n <ng-container\n *ngTemplateOutlet=\"\n niveau;\n context: { noeuds: noeud.enfants ?? [], parent: groupe, niveau: profondeur + 1 }\n \"\n />\n </ng-template>\n </ul>\n }\n </li>\n }\n</ng-template>\n",
276
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;min-inline-size:0}.st-tree__racine,.st-tree__groupe{padding:0;margin:0;list-style:none}.st-tree__racine{padding-block:var(--st-espacement-1)}.st-tree__groupe{position:relative}.st-tree__groupe:empty{display:none}.st-tree__groupe:before{position:absolute;inset-block:0 calc(var(--st-hauteur-commande-defaut) / 2);inset-inline-start:calc(var(--st-espacement-5) + (var(--st-arbre-niveau, 1) - 1) * var(--st-espacement-6));inline-size:var(--st-epaisseur-capillaire);pointer-events:none;content:\"\";background:var(--st-couleur-bordure)}.st-tree__element{font-weight:var(--st-graisse-normale);outline:none}.st-tree__element:focus-visible>.st-tree__ligne{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:calc(-1 * var(--st-focus-epaisseur))}.st-tree__element[data-parent]{font-weight:var(--st-graisse-moyenne)}.st-tree__racine>.st-tree__element[data-parent]{font-weight:var(--st-graisse-semi)}.st-tree__racine>.st-tree__element+.st-tree__element{border-block-start:var(--st-epaisseur-capillaire) solid var(--st-couleur-bordure)}.st-tree__ligne{position:relative;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:0 var(--st-espacement-1-5);align-items:center;min-block-size:var(--st-hauteur-commande-defaut);padding-block:var(--st-espacement-1);padding-inline:calc(var(--st-espacement-2) + (var(--st-arbre-niveau, 1) - 1) * var(--st-espacement-6)) var(--st-espacement-2);font-size:min(var(--st-taille-sm),var(--st-densite-texte-taille));line-height:min(var(--st-interligne-sm),var(--st-densite-texte-interligne));color:var(--st-couleur-texte);cursor:pointer}.st-tree__racine>.st-tree__element:where([aria-expanded=false]:not([aria-selected=true]))>.st-tree__ligne{background:color-mix(in srgb,var(--st-couleur-surface-conteneur-bas) 60%,transparent)}@media(hover:hover){.st-tree__element:not([aria-disabled=true],[aria-selected=true])>.st-tree__ligne:hover{background:var(--st-couleur-surface-survol)}}.st-tree__element:not([aria-disabled=true])>.st-tree__ligne:active{background:var(--st-couleur-surface-active)}.st-tree__bascule{display:inline-flex;flex:none;align-items:center;justify-content:center;inline-size:var(--st-espacement-6);block-size:var(--st-espacement-6)}.st-tree__chevron,.st-tree__icone{flex:none;color:var(--st-couleur-texte-discret)}.st-tree__racine>.st-tree__element>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone),.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__chevron{color:var(--st-couleur-texte)}.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__icone,.st-tree__element[aria-busy=true]>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone){color:var(--st-couleur-primaire)}.st-tree__chevron{transition:rotate var(--st-duree-rapide) var(--st-courbe-standard)}.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__chevron{rotate:90deg}.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__chevron:dir(rtl){rotate:-90deg}.st-tree__icone--vide{inline-size:1.125rem}.st-tree__point{inline-size:var(--st-espacement-1-5);block-size:var(--st-espacement-1-5);background:var(--st-couleur-texte-attenue);border-radius:var(--st-rayon-pleine)}.st-tree__tete{display:flex;flex:1 1 auto;gap:var(--st-espacement-1-5);align-items:center;min-inline-size:0}.st-tree__libelle{flex:1 1 auto;min-inline-size:0;overflow-wrap:anywhere}.st-tree__fin{display:inline-flex;flex:none;gap:var(--st-espacement-1-5);align-items:center;margin-inline-start:auto}.st-tree__compte{flex:none;padding-block:var(--st-espacement-demi);padding-inline:var(--st-espacement-2);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-texte-discret);background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-tree__complement{flex:none;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-normale);font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte-discret)}.st-tree__complement[data-ton=positif]{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-positif)}.st-tree__chargement{display:contents}.st-tree__coche{flex:none;color:var(--st-couleur-primaire);visibility:hidden}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__coche,.st-tree__element[data-partiel]>.st-tree__ligne .st-tree__coche{visibility:visible}.st-tree__element[aria-selected=true]>.st-tree__ligne{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte-primaire);background:var(--st-couleur-surface-selection)}.st-tree__element[aria-selected=true]>.st-tree__ligne:before{position:absolute;inset-block:0;inset-inline-start:0;inline-size:var(--st-epaisseur-forte);content:\"\";background:var(--st-couleur-bordure-selection)}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__point{background:var(--st-couleur-primaire)}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__complement{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-texte)}.st-tree__element[aria-disabled=true]>.st-tree__ligne{color:var(--st-couleur-texte-desactive);cursor:not-allowed}.st-tree__element[aria-disabled=true]>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone,.st-tree__complement){color:var(--st-couleur-texte-desactive)}.st-tree__element[aria-disabled=true]>.st-tree__ligne .st-tree__point{background:var(--st-couleur-texte-desactive)}@media(forced-colors:active){.st-tree__element[aria-selected=true]>.st-tree__ligne{forced-color-adjust:none;color:HighlightText;background:Highlight}.st-tree__element[aria-selected=true]>.st-tree__ligne:before{background:HighlightText}.st-tree__element[aria-selected=true]>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone,.st-tree__compte,.st-tree__complement,.st-tree__coche){color:HighlightText}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__compte{background:Highlight}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__point{background:HighlightText}.st-tree__groupe:before{background:CanvasText}}\n"],
277
+ dependencies: [
278
+ {
279
+ kind: "directive",
280
+ type: Tree,
281
+ selector: "[ngTree]",
282
+ inputs: [
283
+ "id",
284
+ "orientation",
285
+ "multi",
286
+ "disabled",
287
+ "selectionMode",
288
+ "focusMode",
289
+ "wrap",
290
+ "softDisabled",
291
+ "typeaheadDelay",
292
+ "tabindex",
293
+ "value",
294
+ "nav",
295
+ "currentType"
296
+ ],
297
+ outputs: ["valueChange"],
298
+ exportAs: ["ngTree"]
299
+ },
300
+ {
301
+ kind: "directive",
302
+ type: TreeItem,
303
+ selector: "[ngTreeItem]",
304
+ inputs: [
305
+ "id",
306
+ "value",
307
+ "parent",
308
+ "disabled",
309
+ "selectable",
310
+ "expanded",
311
+ "label"
312
+ ],
313
+ outputs: ["expandedChange"],
314
+ exportAs: ["ngTreeItem"]
315
+ },
316
+ {
317
+ kind: "directive",
318
+ type: TreeItemGroup,
319
+ selector: "ng-template[ngTreeItemGroup]",
320
+ inputs: ["ownedBy"],
321
+ exportAs: ["ngTreeItemGroup"]
322
+ },
323
+ {
324
+ kind: "directive",
325
+ type: NgTemplateOutlet,
326
+ selector: "[ngTemplateOutlet]",
327
+ inputs: [
328
+ "ngTemplateOutletContext",
329
+ "ngTemplateOutlet",
330
+ "ngTemplateOutletInjector"
331
+ ]
332
+ },
333
+ {
334
+ kind: "component",
335
+ type: StEmpty,
336
+ selector: "st-empty",
337
+ inputs: [
338
+ "titre",
339
+ "description",
340
+ "icone",
341
+ "niveauDuTitre",
342
+ "taille",
343
+ "variante"
344
+ ]
345
+ },
346
+ {
347
+ kind: "component",
348
+ type: StIcon,
349
+ selector: "st-icon",
350
+ inputs: [
351
+ "icone",
352
+ "nom",
353
+ "variante",
354
+ "sprite",
355
+ "nomMetier",
356
+ "taille",
357
+ "ton",
358
+ "etiquette",
359
+ "miroir"
360
+ ]
361
+ },
362
+ {
363
+ kind: "component",
364
+ type: StTreeAttente,
365
+ selector: "st-tree-attente",
366
+ inputs: ["actif"]
367
+ }
368
+ ],
369
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
370
+ });
371
+ };
372
+ i0.ɵɵngDeclareClassMetadata({
373
+ minVersion: "12.0.0",
374
+ version: "22.2.0",
375
+ ngImport: i0,
376
+ type: StTree,
377
+ decorators: [{
378
+ type: Component,
379
+ args: [{
380
+ selector: "st-tree",
381
+ changeDetection: ChangeDetectionStrategy.OnPush,
382
+ imports: [
383
+ Tree,
384
+ TreeItem,
385
+ TreeItemGroup,
386
+ NgTemplateOutlet,
387
+ StEmpty,
388
+ StIcon,
389
+ StTreeAttente
390
+ ],
391
+ host: { class: "st-tree" },
392
+ template: "@if (noeuds().length === 0) {\n <!-- L'etat vide du canon (D26, D68) : du contenu statique, et non une region vivante. Son\n `lang`, quand le catalogue retombe sur le francais et ecrit seul le titre (D-29). -->\n <st-empty\n class=\"st-tree__vide\"\n taille=\"sm\"\n icone=\"dossier-barre\"\n [attr.lang]=\"langueDuVide()\"\n [titre]=\"texteDuVide()\"\n [description]=\"descriptionVide()\"\n [niveauDuTitre]=\"niveauDuTitreVide()\"\n />\n} @else {\n <ul\n #arbre=\"ngTree\"\n class=\"st-tree__racine\"\n ngTree\n selectionMode=\"explicit\"\n [attr.aria-label]=\"etiquette()\"\n [multi]=\"multiple()\"\n [value]=\"valeursChoisies()\"\n (valueChange)=\"surSelection($event)\"\n >\n <ng-container\n *ngTemplateOutlet=\"niveau; context: { noeuds: noeuds(), parent: arbre, niveau: 1 }\"\n />\n </ul>\n}\n\n<ng-template #niveau let-noeuds=\"noeuds\" let-parent=\"parent\" let-profondeur=\"niveau\">\n @for (noeud of noeuds; track noeud.valeur) {\n <!-- Le nom de l'element est le sien, jamais le texte de ses enfants (le groupe est DANS lui). -->\n <li\n #element=\"ngTreeItem\"\n class=\"st-tree__element\"\n ngTreeItem\n [parent]=\"parent\"\n [value]=\"noeud.valeur\"\n [label]=\"noeud.libelle\"\n [disabled]=\"noeud.desactive === true\"\n [selectable]=\"noeud.selectionnable !== false\"\n [expanded]=\"estDeplie(noeud)\"\n [attr.aria-label]=\"nomDe(noeud)\"\n [attr.aria-busy]=\"noeud.chargement ? 'true' : null\"\n [attr.data-parent]=\"estParent(noeud) ? '' : null\"\n [attr.data-partiel]=\"estPartiel(noeud) ? '' : null\"\n [style.--st-arbre-niveau]=\"profondeur\"\n (expandedChange)=\"surDepliage(noeud, $event)\"\n >\n <div class=\"st-tree__ligne\">\n <!-- La tete (chevron, icone, libelle), d'un bloc et premiere sur sa ligne : c'est la fin\n qui passe dessous quand la place manque, jamais le libelle. -->\n <span class=\"st-tree__tete\">\n <span class=\"st-tree__bascule\">\n @if (estParent(noeud)) {\n <st-icon class=\"st-tree__chevron\" nom=\"chevron-droite\" taille=\"18\" />\n } @else {\n <span class=\"st-tree__point\"></span>\n }\n </span>\n @if (iconeDe(noeud); as icone) {\n <st-icon class=\"st-tree__icone\" taille=\"18\" [icone]=\"icone\" />\n } @else if (avecIcones()) {\n <!-- La colonne des icones est tenue sur chaque ligne des qu'un noeud en porte une. -->\n <span class=\"st-tree__icone st-tree__icone--vide\"></span>\n }\n <span class=\"st-tree__libelle\" dir=\"auto\">{{ affichable(noeud.libelle) }}</span>\n </span>\n <!-- La fin de ligne, d'un bloc : quand elle ne tient pas a cote du libelle entier, elle passe\n dessous, alignee a la fin, plutot que d'ecraser le libelle lettre a lettre. -->\n <span class=\"st-tree__fin\">\n @if (noeud.compte !== undefined && noeud.compte !== null) {\n <span class=\"st-tree__compte\">{{ compteDe(noeud.compte) }}</span>\n }\n @if (noeud.complement) {\n @if (complementMasque(noeud)) {\n <!-- Masque avec les montants de l'ecran : ni chiffre, ni ton (le ton dirait le signe). -->\n <span class=\"st-tree__complement\" aria-hidden=\"true\">&bull;&bull;&bull;&bull;</span>\n } @else {\n <span\n class=\"st-tree__complement\"\n dir=\"auto\"\n [attr.data-ton]=\"noeud.tonDuComplement ?? null\"\n >{{ affichable(noeud.complement) }}</span\n >\n }\n }\n @if (noeud.aDesEnfants || noeud.chargement) {\n <st-tree-attente [actif]=\"noeud.chargement === true\" />\n }\n <!-- La selection se dit aussi par la forme, dans une case tenue sur chaque ligne (rien\n ne bouge quand on choisit) : le cercle coche plein, ou le cercle moins d'un parent\n en partie choisi. -->\n @if (estPartiel(noeud)) {\n <st-icon class=\"st-tree__coche\" nom=\"cercle-moins\" taille=\"16\" />\n } @else {\n <st-icon class=\"st-tree__coche\" nom=\"cercle-coche\" variante=\"plein\" taille=\"16\" />\n }\n </span>\n </div>\n @if (estParent(noeud)) {\n <ul class=\"st-tree__groupe\" role=\"group\">\n <ng-template ngTreeItemGroup [ownedBy]=\"element\" #groupe=\"ngTreeItemGroup\">\n <ng-container\n *ngTemplateOutlet=\"\n niveau;\n context: { noeuds: noeud.enfants ?? [], parent: groupe, niveau: profondeur + 1 }\n \"\n />\n </ng-template>\n </ul>\n }\n </li>\n }\n</ng-template>\n",
393
+ styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block;min-inline-size:0}.st-tree__racine,.st-tree__groupe{padding:0;margin:0;list-style:none}.st-tree__racine{padding-block:var(--st-espacement-1)}.st-tree__groupe{position:relative}.st-tree__groupe:empty{display:none}.st-tree__groupe:before{position:absolute;inset-block:0 calc(var(--st-hauteur-commande-defaut) / 2);inset-inline-start:calc(var(--st-espacement-5) + (var(--st-arbre-niveau, 1) - 1) * var(--st-espacement-6));inline-size:var(--st-epaisseur-capillaire);pointer-events:none;content:\"\";background:var(--st-couleur-bordure)}.st-tree__element{font-weight:var(--st-graisse-normale);outline:none}.st-tree__element:focus-visible>.st-tree__ligne{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:calc(-1 * var(--st-focus-epaisseur))}.st-tree__element[data-parent]{font-weight:var(--st-graisse-moyenne)}.st-tree__racine>.st-tree__element[data-parent]{font-weight:var(--st-graisse-semi)}.st-tree__racine>.st-tree__element+.st-tree__element{border-block-start:var(--st-epaisseur-capillaire) solid var(--st-couleur-bordure)}.st-tree__ligne{position:relative;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:0 var(--st-espacement-1-5);align-items:center;min-block-size:var(--st-hauteur-commande-defaut);padding-block:var(--st-espacement-1);padding-inline:calc(var(--st-espacement-2) + (var(--st-arbre-niveau, 1) - 1) * var(--st-espacement-6)) var(--st-espacement-2);font-size:min(var(--st-taille-sm),var(--st-densite-texte-taille));line-height:min(var(--st-interligne-sm),var(--st-densite-texte-interligne));color:var(--st-couleur-texte);cursor:pointer}.st-tree__racine>.st-tree__element:where([aria-expanded=false]:not([aria-selected=true]))>.st-tree__ligne{background:color-mix(in srgb,var(--st-couleur-surface-conteneur-bas) 60%,transparent)}@media(hover:hover){.st-tree__element:not([aria-disabled=true],[aria-selected=true])>.st-tree__ligne:hover{background:var(--st-couleur-surface-survol)}}.st-tree__element:not([aria-disabled=true])>.st-tree__ligne:active{background:var(--st-couleur-surface-active)}.st-tree__bascule{display:inline-flex;flex:none;align-items:center;justify-content:center;inline-size:var(--st-espacement-6);block-size:var(--st-espacement-6)}.st-tree__chevron,.st-tree__icone{flex:none;color:var(--st-couleur-texte-discret)}.st-tree__racine>.st-tree__element>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone),.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__chevron{color:var(--st-couleur-texte)}.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__icone,.st-tree__element[aria-busy=true]>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone){color:var(--st-couleur-primaire)}.st-tree__chevron{transition:rotate var(--st-duree-rapide) var(--st-courbe-standard)}.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__chevron{rotate:90deg}.st-tree__element[aria-expanded=true]>.st-tree__ligne .st-tree__chevron:dir(rtl){rotate:-90deg}.st-tree__icone--vide{inline-size:1.125rem}.st-tree__point{inline-size:var(--st-espacement-1-5);block-size:var(--st-espacement-1-5);background:var(--st-couleur-texte-attenue);border-radius:var(--st-rayon-pleine)}.st-tree__tete{display:flex;flex:1 1 auto;gap:var(--st-espacement-1-5);align-items:center;min-inline-size:0}.st-tree__libelle{flex:1 1 auto;min-inline-size:0;overflow-wrap:anywhere}.st-tree__fin{display:inline-flex;flex:none;gap:var(--st-espacement-1-5);align-items:center;margin-inline-start:auto}.st-tree__compte{flex:none;padding-block:var(--st-espacement-demi);padding-inline:var(--st-espacement-2);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);font-variant-numeric:var(--st-chiffres-alignes);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-texte-discret);background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine)}.st-tree__complement{flex:none;font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs);font-weight:var(--st-graisse-normale);font-variant-numeric:var(--st-chiffres-alignes);color:var(--st-couleur-texte-discret)}.st-tree__complement[data-ton=positif]{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-positif)}.st-tree__chargement{display:contents}.st-tree__coche{flex:none;color:var(--st-couleur-primaire);visibility:hidden}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__coche,.st-tree__element[data-partiel]>.st-tree__ligne .st-tree__coche{visibility:visible}.st-tree__element[aria-selected=true]>.st-tree__ligne{font-weight:var(--st-graisse-semi);color:var(--st-couleur-texte-primaire);background:var(--st-couleur-surface-selection)}.st-tree__element[aria-selected=true]>.st-tree__ligne:before{position:absolute;inset-block:0;inset-inline-start:0;inline-size:var(--st-epaisseur-forte);content:\"\";background:var(--st-couleur-bordure-selection)}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__point{background:var(--st-couleur-primaire)}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__complement{font-weight:var(--st-graisse-grasse);color:var(--st-couleur-texte)}.st-tree__element[aria-disabled=true]>.st-tree__ligne{color:var(--st-couleur-texte-desactive);cursor:not-allowed}.st-tree__element[aria-disabled=true]>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone,.st-tree__complement){color:var(--st-couleur-texte-desactive)}.st-tree__element[aria-disabled=true]>.st-tree__ligne .st-tree__point{background:var(--st-couleur-texte-desactive)}@media(forced-colors:active){.st-tree__element[aria-selected=true]>.st-tree__ligne{forced-color-adjust:none;color:HighlightText;background:Highlight}.st-tree__element[aria-selected=true]>.st-tree__ligne:before{background:HighlightText}.st-tree__element[aria-selected=true]>.st-tree__ligne :is(.st-tree__chevron,.st-tree__icone,.st-tree__compte,.st-tree__complement,.st-tree__coche){color:HighlightText}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__compte{background:Highlight}.st-tree__element[aria-selected=true]>.st-tree__ligne .st-tree__point{background:HighlightText}.st-tree__groupe:before{background:CanvasText}}\n"]
394
+ }]
395
+ }],
396
+ propDecorators: {
397
+ etiquette: [{
398
+ type: i0.Input,
399
+ args: [{
400
+ isSignal: true,
401
+ alias: "etiquette",
402
+ required: true
403
+ }]
404
+ }],
405
+ noeuds: [{
406
+ type: i0.Input,
407
+ args: [{
408
+ isSignal: true,
409
+ alias: "noeuds",
410
+ required: true
411
+ }]
412
+ }],
413
+ multiple: [{
414
+ type: i0.Input,
415
+ args: [{
416
+ isSignal: true,
417
+ alias: "multiple",
418
+ required: false
419
+ }]
420
+ }],
421
+ texteVide: [{
422
+ type: i0.Input,
423
+ args: [{
424
+ isSignal: true,
425
+ alias: "texteVide",
426
+ required: false
427
+ }]
428
+ }],
429
+ descriptionVide: [{
430
+ type: i0.Input,
431
+ args: [{
432
+ isSignal: true,
433
+ alias: "descriptionVide",
434
+ required: false
435
+ }]
436
+ }],
437
+ niveauDuTitreVide: [{
438
+ type: i0.Input,
439
+ args: [{
440
+ isSignal: true,
441
+ alias: "niveauDuTitreVide",
442
+ required: false
443
+ }]
444
+ }],
445
+ selection: [{
446
+ type: i0.Input,
447
+ args: [{
448
+ isSignal: true,
449
+ alias: "selection",
450
+ required: false
451
+ }]
452
+ }, {
453
+ type: i0.Output,
454
+ args: ["selectionChange"]
455
+ }],
456
+ deplies: [{
457
+ type: i0.Input,
458
+ args: [{
459
+ isSignal: true,
460
+ alias: "deplies",
461
+ required: false
462
+ }]
463
+ }, {
464
+ type: i0.Output,
465
+ args: ["depliesChange"]
466
+ }],
467
+ chargementDemande: [{
468
+ type: i0.Output,
469
+ args: ["chargementDemande"]
470
+ }]
471
+ }
472
+ });
473
+ export { LIBELLES_ARBRE_EN, LIBELLES_ARBRE_FR, ST_LIBELLES_ARBRE, StTree, catalogueDeLArbre, fournirLibellesArbre, libellesDeLArbre };
80
474
 
81
- export { StTree };
82
- //# sourceMappingURL=starterlib-ui-arbre.mjs.map
475
+ //# sourceMappingURL=starterlib-ui-arbre.mjs.map