@cityway/basic-ui 1.1.0-beta031 → 1.1.0-beta032
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/cityway-basic-ui-1.1.0-beta032.tgz +0 -0
- package/docs/MIGRATION.md +11 -0
- package/docs/components/breadcrumb.md +10 -0
- package/docs/components/button.md +1 -0
- package/docs/components/card.md +13 -2
- package/docs/components/language-selector.md +1 -0
- package/fesm2022/cityway-basic-ui.mjs +35 -10
- package/fesm2022/cityway-basic-ui.mjs.map +1 -1
- package/index.d.ts +27 -5
- package/lib/styles/scss/components/_breadcrumb.scss +41 -0
- package/lib/styles/scss/components/_card.scss +13 -0
- package/lib/styles/scss/fo/_page-head.scss +116 -119
- package/lib/styles/scss/fo/_site-header.scss +2 -13
- package/package.json +2 -2
- package/styles/basic-ui.styles.bo.min.css +1 -1
- package/styles/basic-ui.styles.bo.min.css.map +1 -1
- package/styles/basic-ui.styles.fo-patterns.min.css +1 -1
- package/styles/basic-ui.styles.fo-patterns.min.css.map +1 -1
- package/styles/basic-ui.styles.fo.min.css +1 -1
- package/styles/basic-ui.styles.fo.min.css.map +1 -1
- package/cityway-basic-ui-1.1.0-beta031.tgz +0 -0
|
Binary file
|
package/docs/MIGRATION.md
CHANGED
|
@@ -15,6 +15,7 @@ Cette page liste ce qui change pour un projet qui consomme la lib, **BO d'abord*
|
|
|
15
15
|
| Bundle FO sans `ng-select`, téléphone, slider | Aucun | **Oui, à traiter** (voir § 3.1) |
|
|
16
16
|
| `form-field` : `ng-select`, `intl-tel-input` et `ngx-slider` chargés à la demande | **Oui** (JS, voir § 2.3) | Oui |
|
|
17
17
|
| Typographie par contexte, patterns, onglets, accordéon, card | Aucun | Opt-in ou visuel (voir § 3) |
|
|
18
|
+
| Carte `danger`, sélecteur de langue `static`, fil d'Ariane repliable, garde SSR | Aucun | Additif (voir § 3.5) |
|
|
18
19
|
| Nouveaux jetons `design-tokens` | Aucun | Additifs |
|
|
19
20
|
| Scripts de contrôle et de build | Aucun | Aucun |
|
|
20
21
|
|
|
@@ -207,6 +208,16 @@ Aucun changement tant que l'attribut `data-cw-context` n'est pas posé. Voir `st
|
|
|
207
208
|
- Utilitaires `fw-medium`, `lh-*`, `mt-auto` (et variantes), `d-grid` : ajoutés au bundle FO.
|
|
208
209
|
- Sources SCSS publiées sous `lib/styles/scss/` : composition d'un bundle à la carte (`styles-fo.md` § 1).
|
|
209
210
|
|
|
211
|
+
### 3.5 Carte `danger`, sélecteur de langue statique, fil d'Ariane repliable, garde SSR
|
|
212
|
+
|
|
213
|
+
Tout est additif : aucun changement pour un projet qui n'utilise pas ces entrées.
|
|
214
|
+
|
|
215
|
+
- **`cw-card` `[type]="cardType.danger"`** (ou `.card card-danger`) : fond `--cw-status-danger-surface-light`, sans ombre. Pour un panneau de confirmation d'une action destructive.
|
|
216
|
+
- **`cw-language-selector` `[dropdownPosition]`** (`right` par défaut, `left`, `static`) : relayé au `cw-button` interne. `static` affiche la liste dans le flux, sans surcouche, pour un menu mobile.
|
|
217
|
+
- **`cw-breadcrumb` `collapseIntermediate`** (`none` par défaut, `always`, `sm`, `md`) : replie les niveaux entre le premier et le dernier item derrière un « … ». **`CwBreadcrumbItem.queryParams`** : paramètres de requête du lien.
|
|
218
|
+
- **`ResponsiveService`** : plus de lecture de `window` côté serveur (SSR). Il reste en desktop (`false`) et n'écoute pas le redimensionnement. Le contournement `app.config.server.ts` d'un site peut être retiré.
|
|
219
|
+
- **Doc** : `.btn:hover` applique `--cw-btn-hover-bg` (transparent par défaut) : un bouton coloré hors variante doit redéfinir la variable (voir `button.md`).
|
|
220
|
+
|
|
210
221
|
## 4. design-tokens
|
|
211
222
|
|
|
212
223
|
Additions uniquement, rien de renommé ni de supprimé :
|
|
@@ -29,6 +29,7 @@ Rien ne s'affiche si `items` est vide.
|
|
|
29
29
|
|-------|------|--------|-------------|
|
|
30
30
|
| `items` | `CwBreadcrumbItem[]` | `[]` | Liste ordonnée des segments du chemin. Voir modèle ci-dessous. |
|
|
31
31
|
| `ariaLabel` | `string` | `'_COMMON._BREADCRUMB.NAV_LABEL'` | Libellé accessible du `<nav>`. Passé au pipe `translate` (fournir une **clé i18n**). |
|
|
32
|
+
| `collapseIntermediate` | `'none' \| 'always' \| 'sm' \| 'md'` | `'none'` | Replie les niveaux entre le premier et le dernier item derrière un « … » : toujours, ou sous 720 px (`sm`) / 1000 px (`md`). Sans effet s'il n'y a pas de niveau intermédiaire. |
|
|
32
33
|
|
|
33
34
|
> Les inputs utilisent l'API `input()` d'Angular (signal inputs) : binding via `[items]="..."` / `[ariaLabel]="..."`.
|
|
34
35
|
|
|
@@ -44,6 +45,8 @@ interface CwBreadcrumbItem {
|
|
|
44
45
|
label: string;
|
|
45
46
|
/** Cible RouterLink. Si `undefined` ou si `isCurrent === true`, l'item est rendu en <span> non cliquable. */
|
|
46
47
|
link?: string;
|
|
48
|
+
/** Paramètres de requête du lien (ex. `{ context: 'CardsList' }`). Ignorés si l'item n'est pas cliquable. */
|
|
49
|
+
queryParams?: Params;
|
|
47
50
|
/** Marque le segment courant. Rendu en <span> avec `aria-current="page"`, même si `link` est défini. */
|
|
48
51
|
isCurrent?: boolean;
|
|
49
52
|
}
|
|
@@ -107,6 +110,13 @@ breadcrumb: CwBreadcrumbItem[] = [
|
|
|
107
110
|
<cw-breadcrumb [items]="breadcrumb" [ariaLabel]="'DOMAIN.BREADCRUMB_LABEL'"></cw-breadcrumb>
|
|
108
111
|
```
|
|
109
112
|
|
|
113
|
+
### Replier les niveaux intermédiaires en mobile
|
|
114
|
+
|
|
115
|
+
```html
|
|
116
|
+
<cw-breadcrumb [items]="breadcrumb" collapseIntermediate="sm"></cw-breadcrumb>
|
|
117
|
+
<!-- Mobile (< 720 px) : Accueil › … › Page courante ; bureau : le chemin complet -->
|
|
118
|
+
```
|
|
119
|
+
|
|
110
120
|
---
|
|
111
121
|
|
|
112
122
|
## 5. Notes d'intégration
|
|
@@ -165,6 +165,7 @@ boButtonType = BoButtonTypeEnum;
|
|
|
165
165
|
- **Désactivé sans fond** : les types sans surface (`ghost`, `link`, `linkLike`) restent transparents une fois désactivés, seul le texte passe en `text-disabled`. Les types pleins (`primary`, `secondary`, `danger`…) prennent la surface `surface-disabled`. Le `ghost` prenait à tort le fond gris plein jusqu'à la beta016.
|
|
166
166
|
- **État actif** : la classe `.active` (ex. `[cssClass]="isCurrent ? 'active' : ''"`, ou `[class.active]` sur un `.btn` natif) donne le même rendu que le survol, pour marquer un bouton sélectionné ou courant. C'est purement visuel. Pour un **bouton bascule**, utiliser plutôt `[isPressed]`, qui pose `.active` **et** `aria-pressed` sur le `<button>` natif (un attribut posé sur l'hôte `<cw-button>` ne descend pas sur le bouton généré). Pour un élément de navigation courant, c'est `aria-current` qu'il faut.
|
|
167
167
|
- **Désactivé + tooltip** : depuis la beta024, quand `isDisabled` et `withTooltip` sont tous deux vrais, le bouton n'est plus `disabled` en natif (qui le retirerait de la tabulation : tooltip jamais lu au clavier, ni survolé sur certains navigateurs). Il porte `aria-disabled="true"` + la classe `.disabled` (même rendu), reste focusable, et les clics sont bloqués : pas de `btnAction`, propagation du clic vers l'hôte `cw-button` stoppée, menu dropdown non ouvert. Sans tooltip, `disabled` natif comme avant. Conséquence : un `(click)` posé sur l'hôte `<cw-button>` n'est pas déclenché non plus (comme avec le `disabled` natif) — écouter `btnAction`.
|
|
168
|
+
- **Bouton coloré hors variante** : `.btn:hover` applique `--cw-btn-hover-bg` (transparent par défaut), `--cw-btn-hover-color` et `--cw-btn-hover-border-color`. Un `.btn` dont le fond est posé à la main (classe de projet) doit redéfinir ces variables sur lui-même, sinon il devient transparent au survol (`.my-cta { --cw-btn-hover-bg: var(--cw-surface-primary-hover); }`). Les variantes de la lib (`primary`, `secondary`…) les définissent déjà.
|
|
168
169
|
- **Accessibilité** : pour `withOnlyIcon`, toujours fournir un libellé accessible (tooltip ou aria) — sinon le bouton n'a pas de nom.
|
|
169
170
|
- **Dropdown** : la fermeture au clic extérieur et au `Tab` sortant est gérée par le composant.
|
|
170
171
|
- **Dropdown dans un conteneur qui rogne** (depuis la beta026) : si un ancêtre a un `overflow` non visible (table qui défile horizontalement, panneau scrollable…), le menu passerait coupé. Il s'ouvre alors en `position: fixed`, calé sous le bouton, recalé à chaque défilement (fenêtre ou conteneur) et fermé au redimensionnement. Sans conteneur qui rogne, rendu inchangé. Exception : sous un ancêtre transformé (`transform`, `translate`, `scale`, `filter`…, ex. la modale animée), le `fixed` serait mal placé, le menu reste dans le flux — garder `scrollable: false` sur une modale courte qui contient un menu. Un menu `dropdownPosition: static` n'est jamais concerné : il est dans le flux et pousse son conteneur (jusqu'à la beta027, il passait à tort en `fixed`).
|
package/docs/components/card.md
CHANGED
|
@@ -14,6 +14,7 @@ Conteneur de contenu transverse (titre + corps + pied de page optionnel). Couvre
|
|
|
14
14
|
- carte avec **pied de page** (slot d'actions) ;
|
|
15
15
|
- carte **liste** (lignes pleine largeur séparées par une bordure, slots `[card-list-top]` / `[card-list-bottom]`) ;
|
|
16
16
|
- variante **light** (fond surface, sans ombre) ;
|
|
17
|
+
- variante **danger** (fond rouge clair, sans ombre : confirmation d'une action destructive) ;
|
|
17
18
|
- carte **dépliable/repliable** (collapsible, brique de l'accordion) ;
|
|
18
19
|
- **en-tête enrichi** (badge, boutons, switch projetés à côté du titre).
|
|
19
20
|
|
|
@@ -37,7 +38,7 @@ Conteneur de contenu transverse (titre + corps + pied de page optionnel). Couvre
|
|
|
37
38
|
| `subtitleKey` | `string` | — | Sous-titre en **clé i18n**, traduite par la carte (avec `subtitleParams`). L'emporte sur `subtitle` si les deux sont fournis. Depuis la beta029. |
|
|
38
39
|
| `subtitleParams` | `Record<string, unknown>` | — | Paramètres d'interpolation de `subtitleKey`. Depuis la beta029. |
|
|
39
40
|
| `truncateSubtitle` | `boolean` | `false` | Sous-titre sur une seule ligne, tronqué avec ellipse (`…`). Par défaut le sous-titre passe à la ligne et s'affiche en entier. Activé par `cw-drag-n-drop-nested-list` (cartes compactes). |
|
|
40
|
-
| `type` | `CardTypeEnum` | `default` | Variante de style (`default` / `light`). Voir enums §3. |
|
|
41
|
+
| `type` | `CardTypeEnum` | `default` | Variante de style (`default` / `light` / `danger`). Voir enums §3. |
|
|
41
42
|
| `titleRank` | `CardTitleRankEnum` | `h2` | Niveau de titre rendu (`h2` / `h3`). |
|
|
42
43
|
| `cssClass` | `string` | — | Classes CSS additionnelles sur `.card`. |
|
|
43
44
|
| `collapsible` | `boolean` (`model`) | `false` | Active le mode dépliable/repliable (chevron dans l'en-tête). |
|
|
@@ -91,7 +92,7 @@ Conteneur de contenu transverse (titre + corps + pied de page optionnel). Couvre
|
|
|
91
92
|
## 3. Enums
|
|
92
93
|
|
|
93
94
|
```ts
|
|
94
|
-
enum CardTypeEnum { default = 'default', light = 'light' }
|
|
95
|
+
enum CardTypeEnum { default = 'default', light = 'light', danger = 'danger' }
|
|
95
96
|
enum CardTitleRankEnum { h2 = 'h2', h3 = 'h3' }
|
|
96
97
|
```
|
|
97
98
|
|
|
@@ -190,6 +191,16 @@ bordure.
|
|
|
190
191
|
</div>
|
|
191
192
|
```
|
|
192
193
|
|
|
194
|
+
### Variante danger
|
|
195
|
+
|
|
196
|
+
```html
|
|
197
|
+
<cw-card [type]="cardType.danger" [title]="'DOMAIN.DELETE_TITLE'">
|
|
198
|
+
<p>{{ 'DOMAIN.DELETE_WARNING' | translate }}</p>
|
|
199
|
+
</cw-card>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
En HTML seul (FO sans composant) : `<div class="card card-danger">`.
|
|
203
|
+
|
|
193
204
|
### Variante light
|
|
194
205
|
|
|
195
206
|
```html
|
|
@@ -28,6 +28,7 @@ Le composant :
|
|
|
28
28
|
| `languages` | `string[]` | `[]` | Codes de langue à proposer, ex. `['fr', 'en']`. |
|
|
29
29
|
| `currentLang` | `string` | — (**requis**) | Code de la langue active, ex. `'fr'`. Pilote le code affiché dans le déclencheur et la position de la coche. |
|
|
30
30
|
| `showReloadHint` | `boolean` | `true` | Affiche/masque la ligne d'avertissement « la sélection recharge la page ». |
|
|
31
|
+
| `dropdownPosition` | `DropdownPositionEnum` | `right` | Position du panneau (`right`, `left`) ou `static` : liste dans le flux, sans surcouche, pour un menu mobile. |
|
|
31
32
|
|
|
32
33
|
> Inputs **signal** (`input()` / `input.required()`). `currentLang` est requis : le composant ne rend pas sans cette valeur.
|
|
33
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule, DOCUMENT, isPlatformBrowser, NgClass, NgTemplateOutlet } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, ElementRef, model, output, effect, Directive, input, HostBinding, ChangeDetectionStrategy, Component, ChangeDetectorRef, viewChild, signal, computed, untracked, contentChildren, DestroyRef, Injectable, NgZone, Renderer2, ViewContainerRef, Pipe, TemplateRef,
|
|
4
|
+
import { inject, ElementRef, model, output, effect, Directive, input, HostBinding, ChangeDetectionStrategy, Component, ChangeDetectorRef, viewChild, signal, computed, untracked, contentChildren, DestroyRef, Injectable, NgZone, Renderer2, ViewContainerRef, PLATFORM_ID, Pipe, TemplateRef, EventEmitter, ContentChild, Output, Input, ApplicationRef, Injector, createComponent, contentChild, viewChildren, forwardRef } from '@angular/core';
|
|
5
5
|
import * as i2 from '@ngx-translate/core';
|
|
6
6
|
import { TranslatePipe, TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
@@ -660,6 +660,7 @@ var CardTypeEnum;
|
|
|
660
660
|
(function (CardTypeEnum) {
|
|
661
661
|
CardTypeEnum["default"] = "default";
|
|
662
662
|
CardTypeEnum["light"] = "light";
|
|
663
|
+
CardTypeEnum["danger"] = "danger";
|
|
663
664
|
})(CardTypeEnum || (CardTypeEnum = {}));
|
|
664
665
|
var CardTitleRankEnum;
|
|
665
666
|
(function (CardTitleRankEnum) {
|
|
@@ -843,7 +844,7 @@ class CardComponent {
|
|
|
843
844
|
return this.isCollapsed();
|
|
844
845
|
}
|
|
845
846
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
846
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: CardComponent, isStandalone: true, selector: "cw-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, titleParams: { classPropertyName: "titleParams", publicName: "titleParams", isSignal: true, isRequired: false, transformFunction: null }, translateTitle: { classPropertyName: "translateTitle", publicName: "translateTitle", isSignal: true, isRequired: false, transformFunction: null }, titleId: { classPropertyName: "titleId", publicName: "titleId", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, subtitleKey: { classPropertyName: "subtitleKey", publicName: "subtitleKey", isSignal: true, isRequired: false, transformFunction: null }, subtitleParams: { classPropertyName: "subtitleParams", publicName: "subtitleParams", isSignal: true, isRequired: false, transformFunction: null }, truncateSubtitle: { classPropertyName: "truncateSubtitle", publicName: "truncateSubtitle", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, titleRank: { classPropertyName: "titleRank", publicName: "titleRank", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, collapseLocked: { classPropertyName: "collapseLocked", publicName: "collapseLocked", isSignal: true, isRequired: false, transformFunction: null }, collapseStretched: { classPropertyName: "collapseStretched", publicName: "collapseStretched", isSignal: true, isRequired: false, transformFunction: null }, collapseId: { classPropertyName: "collapseId", publicName: "collapseId", isSignal: true, isRequired: false, transformFunction: null }, destroyOnHide: { classPropertyName: "destroyOnHide", publicName: "destroyOnHide", isSignal: true, isRequired: false, transformFunction: null }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsible: "collapsibleChange", destroyOnHide: "destroyOnHideChange", collapseClicked: "collapseClicked" }, host: { properties: { "class.card-full-height": "fullHeight()" } }, viewQueries: [{ propertyName: "collapseDirective", first: true, predicate: ["collapse"], descendants: true, isSignal: true }, { propertyName: "cardFooter", first: true, predicate: ["cardFooter"], descendants: true, isSignal: true }, { propertyName: "cardHeader", first: true, predicate: ["cardHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\">\r\n <!-- Toujours dans le DOM (masque si vide) : un slot d'en-tete rempli apres coup doit pouvoir s'y projeter. -->\r\n <div #cardHeader class=\"card-header\" [class.d-none]=\"!hasHeader()\" [class.card-header-collapse]=\"collapsible()\"\r\n [class.card-header-collapsed]=\"collapsible() && isCollapsed()\">\r\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\r\n </div>\r\n\r\n @if(collapsible()) {\r\n <div [cwCollapse]=\"isCollapsed()\" [id]=\"collapseId()\" #collapse=\"cwCollapse\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n }\r\n</div>\r\n\r\n<ng-template #header>\r\n <ng-content select=\"[header-start]\"></ng-content>\r\n\r\n <div class=\"card-header-content\">\r\n @if (title(); as title) {\r\n @let titleText = translateTitle() ? (title | translate: titleParams()) : title;\r\n @if (titleRank() === titleRankEnum.h2) {\r\n <h2 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h2>\r\n }\r\n @else if (titleRank() === titleRankEnum.h3) {\r\n <h3 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h3>\r\n }\r\n }\r\n\r\n @if (subtitleKey(); as subtitleKey) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitleKey | translate: subtitleParams() }}</div>\r\n }\r\n @else if (subtitle(); as subtitle) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitle }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"card-header-custom-area\">\r\n <ng-content select=\"[header-custom-area]\"></ng-content>\r\n </div>\r\n\r\n <!-- collapseLocked : pas de chevron, donc pas de stretched-link -> en-tete non cliquable,\r\n sans passer par `disabled` (qui grise titre et sous-titre). -->\r\n @if (collapsible() && !collapseLocked()) {\r\n <button type=\"button\" class=\"btn btn-collapse\" [class.stretched-link]=\"collapseStretched() && !disabled()\"\r\n (click)=\"toggleCollapse()\" [disabled]=\"disabled()\" [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-expanded]=\"!isCollapsed()\" [class.collapsed]=\"isCollapsed()\" [attr.aria-controls]=\"collapseId()\">\r\n <!-- Deux pictos, un seul visible selon le theme (jetons --cw-btn-collapse-*-display) : chevron par defaut,\r\n \u00AB + \u00BB / \u00AB \u2212 \u00BB pour l'accordion FO. -->\r\n <cw-icon class=\"btn-collapse-chevron\" [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></cw-icon>\r\n <cw-icon class=\"btn-collapse-toggle\" [icon]=\"isCollapsed() ? spriteIcon.toolbarPlus : spriteIcon.toolbarMinus\" [iconSize]=\"iconSize['sm']\"></cw-icon>\r\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.EXPAND_COLLAPSE' | translate }}</span>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #content>\r\n @if (shouldRenderBody()) {\r\n <!-- Listes pleine largeur, avant (`[card-list-top]`) ou apres (`[card-list-bottom]`) le corps :\r\n une ligne par enfant direct, separees par une bordure. -->\r\n <ng-content select=\"[card-list-top]\"></ng-content>\r\n\r\n <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <ng-content select=\"[card-list-bottom]\"></ng-content>\r\n\r\n <div class=\"card-footer\" #cardFooter [class.d-none]=\"!showFooter()\">\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CollapseDirective, selector: "[cwCollapse]", inputs: ["cwCollapse"], outputs: ["cwCollapseChange", "shown", "hidden"], exportAs: ["cwCollapse"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
847
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: CardComponent, isStandalone: true, selector: "cw-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, titleParams: { classPropertyName: "titleParams", publicName: "titleParams", isSignal: true, isRequired: false, transformFunction: null }, translateTitle: { classPropertyName: "translateTitle", publicName: "translateTitle", isSignal: true, isRequired: false, transformFunction: null }, titleId: { classPropertyName: "titleId", publicName: "titleId", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, subtitleKey: { classPropertyName: "subtitleKey", publicName: "subtitleKey", isSignal: true, isRequired: false, transformFunction: null }, subtitleParams: { classPropertyName: "subtitleParams", publicName: "subtitleParams", isSignal: true, isRequired: false, transformFunction: null }, truncateSubtitle: { classPropertyName: "truncateSubtitle", publicName: "truncateSubtitle", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, titleRank: { classPropertyName: "titleRank", publicName: "titleRank", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, collapseLocked: { classPropertyName: "collapseLocked", publicName: "collapseLocked", isSignal: true, isRequired: false, transformFunction: null }, collapseStretched: { classPropertyName: "collapseStretched", publicName: "collapseStretched", isSignal: true, isRequired: false, transformFunction: null }, collapseId: { classPropertyName: "collapseId", publicName: "collapseId", isSignal: true, isRequired: false, transformFunction: null }, destroyOnHide: { classPropertyName: "destroyOnHide", publicName: "destroyOnHide", isSignal: true, isRequired: false, transformFunction: null }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsible: "collapsibleChange", destroyOnHide: "destroyOnHideChange", collapseClicked: "collapseClicked" }, host: { properties: { "class.card-full-height": "fullHeight()" } }, viewQueries: [{ propertyName: "collapseDirective", first: true, predicate: ["collapse"], descendants: true, isSignal: true }, { propertyName: "cardFooter", first: true, predicate: ["cardFooter"], descendants: true, isSignal: true }, { propertyName: "cardHeader", first: true, predicate: ["cardHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\" [class.card-danger]=\"type() === typeEnum.danger\">\r\n <!-- Toujours dans le DOM (masque si vide) : un slot d'en-tete rempli apres coup doit pouvoir s'y projeter. -->\r\n <div #cardHeader class=\"card-header\" [class.d-none]=\"!hasHeader()\" [class.card-header-collapse]=\"collapsible()\"\r\n [class.card-header-collapsed]=\"collapsible() && isCollapsed()\">\r\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\r\n </div>\r\n\r\n @if(collapsible()) {\r\n <div [cwCollapse]=\"isCollapsed()\" [id]=\"collapseId()\" #collapse=\"cwCollapse\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n }\r\n</div>\r\n\r\n<ng-template #header>\r\n <ng-content select=\"[header-start]\"></ng-content>\r\n\r\n <div class=\"card-header-content\">\r\n @if (title(); as title) {\r\n @let titleText = translateTitle() ? (title | translate: titleParams()) : title;\r\n @if (titleRank() === titleRankEnum.h2) {\r\n <h2 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h2>\r\n }\r\n @else if (titleRank() === titleRankEnum.h3) {\r\n <h3 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h3>\r\n }\r\n }\r\n\r\n @if (subtitleKey(); as subtitleKey) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitleKey | translate: subtitleParams() }}</div>\r\n }\r\n @else if (subtitle(); as subtitle) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitle }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"card-header-custom-area\">\r\n <ng-content select=\"[header-custom-area]\"></ng-content>\r\n </div>\r\n\r\n <!-- collapseLocked : pas de chevron, donc pas de stretched-link -> en-tete non cliquable,\r\n sans passer par `disabled` (qui grise titre et sous-titre). -->\r\n @if (collapsible() && !collapseLocked()) {\r\n <button type=\"button\" class=\"btn btn-collapse\" [class.stretched-link]=\"collapseStretched() && !disabled()\"\r\n (click)=\"toggleCollapse()\" [disabled]=\"disabled()\" [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-expanded]=\"!isCollapsed()\" [class.collapsed]=\"isCollapsed()\" [attr.aria-controls]=\"collapseId()\">\r\n <!-- Deux pictos, un seul visible selon le theme (jetons --cw-btn-collapse-*-display) : chevron par defaut,\r\n \u00AB + \u00BB / \u00AB \u2212 \u00BB pour l'accordion FO. -->\r\n <cw-icon class=\"btn-collapse-chevron\" [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></cw-icon>\r\n <cw-icon class=\"btn-collapse-toggle\" [icon]=\"isCollapsed() ? spriteIcon.toolbarPlus : spriteIcon.toolbarMinus\" [iconSize]=\"iconSize['sm']\"></cw-icon>\r\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.EXPAND_COLLAPSE' | translate }}</span>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #content>\r\n @if (shouldRenderBody()) {\r\n <!-- Listes pleine largeur, avant (`[card-list-top]`) ou apres (`[card-list-bottom]`) le corps :\r\n une ligne par enfant direct, separees par une bordure. -->\r\n <ng-content select=\"[card-list-top]\"></ng-content>\r\n\r\n <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <ng-content select=\"[card-list-bottom]\"></ng-content>\r\n\r\n <div class=\"card-footer\" #cardFooter [class.d-none]=\"!showFooter()\">\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CollapseDirective, selector: "[cwCollapse]", inputs: ["cwCollapse"], outputs: ["cwCollapseChange", "shown", "hidden"], exportAs: ["cwCollapse"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
847
848
|
}
|
|
848
849
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: CardComponent, decorators: [{
|
|
849
850
|
type: Component,
|
|
@@ -854,7 +855,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
|
|
|
854
855
|
CollapseDirective,
|
|
855
856
|
IconComponent,
|
|
856
857
|
TranslatePipe
|
|
857
|
-
], template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\">\r\n <!-- Toujours dans le DOM (masque si vide) : un slot d'en-tete rempli apres coup doit pouvoir s'y projeter. -->\r\n <div #cardHeader class=\"card-header\" [class.d-none]=\"!hasHeader()\" [class.card-header-collapse]=\"collapsible()\"\r\n [class.card-header-collapsed]=\"collapsible() && isCollapsed()\">\r\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\r\n </div>\r\n\r\n @if(collapsible()) {\r\n <div [cwCollapse]=\"isCollapsed()\" [id]=\"collapseId()\" #collapse=\"cwCollapse\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n }\r\n</div>\r\n\r\n<ng-template #header>\r\n <ng-content select=\"[header-start]\"></ng-content>\r\n\r\n <div class=\"card-header-content\">\r\n @if (title(); as title) {\r\n @let titleText = translateTitle() ? (title | translate: titleParams()) : title;\r\n @if (titleRank() === titleRankEnum.h2) {\r\n <h2 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h2>\r\n }\r\n @else if (titleRank() === titleRankEnum.h3) {\r\n <h3 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h3>\r\n }\r\n }\r\n\r\n @if (subtitleKey(); as subtitleKey) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitleKey | translate: subtitleParams() }}</div>\r\n }\r\n @else if (subtitle(); as subtitle) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitle }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"card-header-custom-area\">\r\n <ng-content select=\"[header-custom-area]\"></ng-content>\r\n </div>\r\n\r\n <!-- collapseLocked : pas de chevron, donc pas de stretched-link -> en-tete non cliquable,\r\n sans passer par `disabled` (qui grise titre et sous-titre). -->\r\n @if (collapsible() && !collapseLocked()) {\r\n <button type=\"button\" class=\"btn btn-collapse\" [class.stretched-link]=\"collapseStretched() && !disabled()\"\r\n (click)=\"toggleCollapse()\" [disabled]=\"disabled()\" [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-expanded]=\"!isCollapsed()\" [class.collapsed]=\"isCollapsed()\" [attr.aria-controls]=\"collapseId()\">\r\n <!-- Deux pictos, un seul visible selon le theme (jetons --cw-btn-collapse-*-display) : chevron par defaut,\r\n \u00AB + \u00BB / \u00AB \u2212 \u00BB pour l'accordion FO. -->\r\n <cw-icon class=\"btn-collapse-chevron\" [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></cw-icon>\r\n <cw-icon class=\"btn-collapse-toggle\" [icon]=\"isCollapsed() ? spriteIcon.toolbarPlus : spriteIcon.toolbarMinus\" [iconSize]=\"iconSize['sm']\"></cw-icon>\r\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.EXPAND_COLLAPSE' | translate }}</span>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #content>\r\n @if (shouldRenderBody()) {\r\n <!-- Listes pleine largeur, avant (`[card-list-top]`) ou apres (`[card-list-bottom]`) le corps :\r\n une ligne par enfant direct, separees par une bordure. -->\r\n <ng-content select=\"[card-list-top]\"></ng-content>\r\n\r\n <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <ng-content select=\"[card-list-bottom]\"></ng-content>\r\n\r\n <div class=\"card-footer\" #cardFooter [class.d-none]=\"!showFooter()\">\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n</ng-template>\r\n" }]
|
|
858
|
+
], template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\" [class.card-danger]=\"type() === typeEnum.danger\">\r\n <!-- Toujours dans le DOM (masque si vide) : un slot d'en-tete rempli apres coup doit pouvoir s'y projeter. -->\r\n <div #cardHeader class=\"card-header\" [class.d-none]=\"!hasHeader()\" [class.card-header-collapse]=\"collapsible()\"\r\n [class.card-header-collapsed]=\"collapsible() && isCollapsed()\">\r\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\r\n </div>\r\n\r\n @if(collapsible()) {\r\n <div [cwCollapse]=\"isCollapsed()\" [id]=\"collapseId()\" #collapse=\"cwCollapse\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n }\r\n</div>\r\n\r\n<ng-template #header>\r\n <ng-content select=\"[header-start]\"></ng-content>\r\n\r\n <div class=\"card-header-content\">\r\n @if (title(); as title) {\r\n @let titleText = translateTitle() ? (title | translate: titleParams()) : title;\r\n @if (titleRank() === titleRankEnum.h2) {\r\n <h2 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h2>\r\n }\r\n @else if (titleRank() === titleRankEnum.h3) {\r\n <h3 class=\"text-truncate\" [id]=\"titleId()\">{{ titleText }}</h3>\r\n }\r\n }\r\n\r\n @if (subtitleKey(); as subtitleKey) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitleKey | translate: subtitleParams() }}</div>\r\n }\r\n @else if (subtitle(); as subtitle) {\r\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\">{{ subtitle }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"card-header-custom-area\">\r\n <ng-content select=\"[header-custom-area]\"></ng-content>\r\n </div>\r\n\r\n <!-- collapseLocked : pas de chevron, donc pas de stretched-link -> en-tete non cliquable,\r\n sans passer par `disabled` (qui grise titre et sous-titre). -->\r\n @if (collapsible() && !collapseLocked()) {\r\n <button type=\"button\" class=\"btn btn-collapse\" [class.stretched-link]=\"collapseStretched() && !disabled()\"\r\n (click)=\"toggleCollapse()\" [disabled]=\"disabled()\" [attr.aria-disabled]=\"disabled()\"\r\n [attr.aria-expanded]=\"!isCollapsed()\" [class.collapsed]=\"isCollapsed()\" [attr.aria-controls]=\"collapseId()\">\r\n <!-- Deux pictos, un seul visible selon le theme (jetons --cw-btn-collapse-*-display) : chevron par defaut,\r\n \u00AB + \u00BB / \u00AB \u2212 \u00BB pour l'accordion FO. -->\r\n <cw-icon class=\"btn-collapse-chevron\" [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></cw-icon>\r\n <cw-icon class=\"btn-collapse-toggle\" [icon]=\"isCollapsed() ? spriteIcon.toolbarPlus : spriteIcon.toolbarMinus\" [iconSize]=\"iconSize['sm']\"></cw-icon>\r\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.EXPAND_COLLAPSE' | translate }}</span>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #content>\r\n @if (shouldRenderBody()) {\r\n <!-- Listes pleine largeur, avant (`[card-list-top]`) ou apres (`[card-list-bottom]`) le corps :\r\n une ligne par enfant direct, separees par une bordure. -->\r\n <ng-content select=\"[card-list-top]\"></ng-content>\r\n\r\n <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <ng-content select=\"[card-list-bottom]\"></ng-content>\r\n\r\n <div class=\"card-footer\" #cardFooter [class.d-none]=\"!showFooter()\">\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n</ng-template>\r\n" }]
|
|
858
859
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleParams", required: false }] }], translateTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateTitle", required: false }] }], titleId: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleId", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], subtitleKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitleKey", required: false }] }], subtitleParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitleParams", required: false }] }], truncateSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "truncateSubtitle", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], titleRank: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleRank", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }, { type: i0.Output, args: ["collapsibleChange"] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], collapseLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseLocked", required: false }] }], collapseStretched: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseStretched", required: false }] }], collapseId: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseId", required: false }] }], destroyOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "destroyOnHide", required: false }] }, { type: i0.Output, args: ["destroyOnHideChange"] }], fullHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullHeight", required: false }] }], collapseClicked: [{ type: i0.Output, args: ["collapseClicked"] }], collapseDirective: [{ type: i0.ViewChild, args: ['collapse', { isSignal: true }] }], cardFooter: [{ type: i0.ViewChild, args: ['cardFooter', { isSignal: true }] }], cardHeader: [{ type: i0.ViewChild, args: ['cardHeader', { isSignal: true }] }] } });
|
|
859
860
|
/**
|
|
860
861
|
* Observe les enfants de `el` et appelle `update` a chaque ajout / retrait. Renvoie la fonction
|
|
@@ -1788,7 +1789,12 @@ function resolveArrowPos(pair) {
|
|
|
1788
1789
|
class ResponsiveService {
|
|
1789
1790
|
constructor() {
|
|
1790
1791
|
this.destroyRef = inject(DestroyRef);
|
|
1792
|
+
// Rendu serveur (SSR) : pas de `window`, donc ni mesure ni ecoute du resize (desktop par defaut).
|
|
1793
|
+
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
1791
1794
|
this.checkIsMobileResolution$ = new BehaviorSubject(this.checkIsMobileResolution());
|
|
1795
|
+
if (!this.isBrowser) {
|
|
1796
|
+
return;
|
|
1797
|
+
}
|
|
1792
1798
|
// takeUntilDestroyed => plus de souscription orpheline ; distinctUntilChanged => on
|
|
1793
1799
|
// n'emet que quand le booleen bascule (auparavant : un next() a chaque resize).
|
|
1794
1800
|
fromEvent(window, 'resize')
|
|
@@ -1796,7 +1802,7 @@ class ResponsiveService {
|
|
|
1796
1802
|
.subscribe(isMobile => this.checkIsMobileResolution$.next(isMobile));
|
|
1797
1803
|
}
|
|
1798
1804
|
checkIsMobileResolution() {
|
|
1799
|
-
return window.innerWidth < 768;
|
|
1805
|
+
return this.isBrowser && window.innerWidth < 768;
|
|
1800
1806
|
}
|
|
1801
1807
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ResponsiveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1802
1808
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ResponsiveService, providedIn: 'root' }); }
|
|
@@ -5754,16 +5760,30 @@ class BreadcrumbComponent {
|
|
|
5754
5760
|
constructor() {
|
|
5755
5761
|
this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
5756
5762
|
this.ariaLabel = input('_COMMON._BREADCRUMB.NAV_LABEL', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
5763
|
+
/**
|
|
5764
|
+
* Replie les niveaux intermediaires (entre le premier et le dernier item) derriere un « … » :
|
|
5765
|
+
* `always`, ou sous un point de rupture (`sm` < 720 px, `md` < 1000 px). Defaut `none`.
|
|
5766
|
+
* Sans effet s'il n'y a pas de niveau intermediaire.
|
|
5767
|
+
*/
|
|
5768
|
+
this.collapseIntermediate = input('none', ...(ngDevMode ? [{ debugName: "collapseIntermediate" }] : []));
|
|
5769
|
+
/** Classe de repli posee sur le `<nav>` (vide si rien a replier). */
|
|
5770
|
+
this.collapseClass = computed(() => this.collapseIntermediate() !== 'none' && this.items().length > 2
|
|
5771
|
+
? `breadcrumb-collapse-${this.collapseIntermediate()}`
|
|
5772
|
+
: null, ...(ngDevMode ? [{ debugName: "collapseClass" }] : []));
|
|
5757
5773
|
// Séparateur DS : picto chevron 2xs (10px). À ajuster si le sprite ne correspond pas.
|
|
5758
5774
|
this.separatorIcon = SpriteIconEnum.navRight;
|
|
5759
5775
|
this.iconSizeEnum = IconSizeEnum;
|
|
5760
5776
|
this.iconType = IconTypeEnum;
|
|
5761
5777
|
}
|
|
5778
|
+
/** Niveau intermediaire : ni le premier ni le dernier item. */
|
|
5779
|
+
isIntermediate(index) {
|
|
5780
|
+
return index > 0 && index < this.items().length - 1;
|
|
5781
|
+
}
|
|
5762
5782
|
isClickable(item) {
|
|
5763
5783
|
return !!item.link && item.isCurrent !== true;
|
|
5764
5784
|
}
|
|
5765
5785
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5766
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: BreadcrumbComponent, isStandalone: true, selector: "cw-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (items().length > 0) {\n <nav class=\"breadcrumb\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol class=\"breadcrumb-list list-unstyled d-flex-h mb-0\">\n @for (item of items(); track $index; let first = $first) {\n <li\n class=\"breadcrumb-item\"\n [class.breadcrumb-item-home]=\"first\"\n [class.active]=\"item.isCurrent === true\"\n >\n @if (!first) {\n <cw-icon\n class=\"breadcrumb-separator\"\n [icon]=\"separatorIcon\"\n [iconSize]=\"iconSizeEnum['2xs']\"\n [type]=\"iconType.default\"\n aria-hidden=\"true\"\n ></cw-icon>\n }\n @if (isClickable(item)) {\n <a class=\"breadcrumb-link\" [routerLink]=\"item.link\">{{ item.label | translate }}</a>\n } @else {\n <span\n class=\"breadcrumb-text\"\n [attr.aria-current]=\"item.isCurrent === true ? 'page' : null\"\n >{{ item.label | translate }}</span>\n }\n </li>\n }\n </ol>\n </nav>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5786
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: BreadcrumbComponent, isStandalone: true, selector: "cw-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, collapseIntermediate: { classPropertyName: "collapseIntermediate", publicName: "collapseIntermediate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (items().length > 0) {\n <nav class=\"breadcrumb\" [ngClass]=\"collapseClass()\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol class=\"breadcrumb-list list-unstyled d-flex-h mb-0\">\n @for (item of items(); track $index; let first = $first) {\n @if (collapseClass() && $index === 1) {\n <!-- Repli : \u00AB \u2026 \u00BB a la place des niveaux intermediaires (masques en CSS selon le point de rupture) -->\n <li class=\"breadcrumb-item breadcrumb-item-ellipsis\" aria-hidden=\"true\">\n <cw-icon class=\"breadcrumb-separator\" [icon]=\"separatorIcon\" [iconSize]=\"iconSizeEnum['2xs']\" [type]=\"iconType.default\"></cw-icon>\n <span class=\"breadcrumb-text\">…</span>\n </li>\n }\n <li\n class=\"breadcrumb-item\"\n [class.breadcrumb-item-intermediate]=\"isIntermediate($index)\"\n [class.breadcrumb-item-home]=\"first\"\n [class.active]=\"item.isCurrent === true\"\n >\n @if (!first) {\n <cw-icon\n class=\"breadcrumb-separator\"\n [icon]=\"separatorIcon\"\n [iconSize]=\"iconSizeEnum['2xs']\"\n [type]=\"iconType.default\"\n aria-hidden=\"true\"\n ></cw-icon>\n }\n @if (isClickable(item)) {\n <a class=\"breadcrumb-link\" [routerLink]=\"item.link\" [queryParams]=\"item.queryParams\">{{ item.label | translate }}</a>\n } @else {\n <span\n class=\"breadcrumb-text\"\n [attr.aria-current]=\"item.isCurrent === true ? 'page' : null\"\n >{{ item.label | translate }}</span>\n }\n </li>\n }\n </ol>\n </nav>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5767
5787
|
}
|
|
5768
5788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
5769
5789
|
type: Component,
|
|
@@ -5772,8 +5792,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
|
|
|
5772
5792
|
RouterLink,
|
|
5773
5793
|
TranslateModule,
|
|
5774
5794
|
IconComponent
|
|
5775
|
-
], template: "@if (items().length > 0) {\n <nav class=\"breadcrumb\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol class=\"breadcrumb-list list-unstyled d-flex-h mb-0\">\n @for (item of items(); track $index; let first = $first) {\n <li\n class=\"breadcrumb-item\"\n [class.breadcrumb-item-home]=\"first\"\n [class.active]=\"item.isCurrent === true\"\n >\n @if (!first) {\n <cw-icon\n class=\"breadcrumb-separator\"\n [icon]=\"separatorIcon\"\n [iconSize]=\"iconSizeEnum['2xs']\"\n [type]=\"iconType.default\"\n aria-hidden=\"true\"\n ></cw-icon>\n }\n @if (isClickable(item)) {\n <a class=\"breadcrumb-link\" [routerLink]=\"item.link\">{{ item.label | translate }}</a>\n } @else {\n <span\n class=\"breadcrumb-text\"\n [attr.aria-current]=\"item.isCurrent === true ? 'page' : null\"\n >{{ item.label | translate }}</span>\n }\n </li>\n }\n </ol>\n </nav>\n}\n" }]
|
|
5776
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
5795
|
+
], template: "@if (items().length > 0) {\n <nav class=\"breadcrumb\" [ngClass]=\"collapseClass()\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol class=\"breadcrumb-list list-unstyled d-flex-h mb-0\">\n @for (item of items(); track $index; let first = $first) {\n @if (collapseClass() && $index === 1) {\n <!-- Repli : \u00AB \u2026 \u00BB a la place des niveaux intermediaires (masques en CSS selon le point de rupture) -->\n <li class=\"breadcrumb-item breadcrumb-item-ellipsis\" aria-hidden=\"true\">\n <cw-icon class=\"breadcrumb-separator\" [icon]=\"separatorIcon\" [iconSize]=\"iconSizeEnum['2xs']\" [type]=\"iconType.default\"></cw-icon>\n <span class=\"breadcrumb-text\">…</span>\n </li>\n }\n <li\n class=\"breadcrumb-item\"\n [class.breadcrumb-item-intermediate]=\"isIntermediate($index)\"\n [class.breadcrumb-item-home]=\"first\"\n [class.active]=\"item.isCurrent === true\"\n >\n @if (!first) {\n <cw-icon\n class=\"breadcrumb-separator\"\n [icon]=\"separatorIcon\"\n [iconSize]=\"iconSizeEnum['2xs']\"\n [type]=\"iconType.default\"\n aria-hidden=\"true\"\n ></cw-icon>\n }\n @if (isClickable(item)) {\n <a class=\"breadcrumb-link\" [routerLink]=\"item.link\" [queryParams]=\"item.queryParams\">{{ item.label | translate }}</a>\n } @else {\n <span\n class=\"breadcrumb-text\"\n [attr.aria-current]=\"item.isCurrent === true ? 'page' : null\"\n >{{ item.label | translate }}</span>\n }\n </li>\n }\n </ol>\n </nav>\n}\n" }]
|
|
5796
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], collapseIntermediate: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseIntermediate", required: false }] }] } });
|
|
5777
5797
|
|
|
5778
5798
|
// Types du composant `cw-file-drop` — alignes sur le DS (BOU) page Form
|
|
5779
5799
|
// `File Upload / Dropzone / *`.
|
|
@@ -6218,6 +6238,11 @@ class LanguageSelectorComponent {
|
|
|
6218
6238
|
this.currentLang = input.required(...(ngDevMode ? [{ debugName: "currentLang" }] : []));
|
|
6219
6239
|
/** Affiche/masque la ligne d'avertissement « recharge la page ». Défaut: true. */
|
|
6220
6240
|
this.showReloadHint = input(true, ...(ngDevMode ? [{ debugName: "showReloadHint" }] : []));
|
|
6241
|
+
/**
|
|
6242
|
+
* Position du panneau, relayée au `cw-button` interne : `right` (défaut, menu déroulant aligné à droite), `left`,
|
|
6243
|
+
* ou `static` (liste dans le flux, sans surcouche : menu mobile d'un site).
|
|
6244
|
+
*/
|
|
6245
|
+
this.dropdownPosition = input(DropdownPositionEnum.right, ...(ngDevMode ? [{ debugName: "dropdownPosition" }] : []));
|
|
6221
6246
|
/** Émis au clic sur une langue différente de l'active. Émet le CODE (ex. 'en'). */
|
|
6222
6247
|
this.languageChange = output();
|
|
6223
6248
|
this.trigger = viewChild(ButtonComponent, ...(ngDevMode ? [{ debugName: "trigger" }] : []));
|
|
@@ -6255,7 +6280,7 @@ class LanguageSelectorComponent {
|
|
|
6255
6280
|
this.trigger()?.closeDropdown();
|
|
6256
6281
|
}
|
|
6257
6282
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6258
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LanguageSelectorComponent, isStandalone: true, selector: "cw-language-selector", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null }, currentLang: { classPropertyName: "currentLang", publicName: "currentLang", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { languageChange: "languageChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._LANG.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._LANG.LBL_LANG' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (item of langItems(); track item.code) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"item.code === currentLang()\"\n [attr.aria-checked]=\"item.code === currentLang()\"\n (click)=\"onSelect(item.code)\">\n <span class=\"flex-1\">@if (item.hasName) { {{ item.code | uppercase }} - {{ item.nameKey | translate }} } @else { {{ item.code | uppercase }} }</span>\n @if (item.code === currentLang()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "labelParams", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "ariaLabel", "ariaExpanded", "ariaControls", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6283
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LanguageSelectorComponent, isStandalone: true, selector: "cw-language-selector", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null }, currentLang: { classPropertyName: "currentLang", publicName: "currentLang", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { languageChange: "languageChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\"\n [dropdownPosition]=\"dropdownPosition()\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._LANG.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._LANG.LBL_LANG' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (item of langItems(); track item.code) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"item.code === currentLang()\"\n [attr.aria-checked]=\"item.code === currentLang()\"\n (click)=\"onSelect(item.code)\">\n <span class=\"flex-1\">@if (item.hasName) { {{ item.code | uppercase }} - {{ item.nameKey | translate }} } @else { {{ item.code | uppercase }} }</span>\n @if (item.code === currentLang()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "labelParams", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "ariaLabel", "ariaExpanded", "ariaControls", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6259
6284
|
}
|
|
6260
6285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
|
|
6261
6286
|
type: Component,
|
|
@@ -6265,8 +6290,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
|
|
|
6265
6290
|
ButtonComponent,
|
|
6266
6291
|
IconComponent,
|
|
6267
6292
|
MenuKeyboardDirective
|
|
6268
|
-
], template: "<cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._LANG.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._LANG.LBL_LANG' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (item of langItems(); track item.code) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"item.code === currentLang()\"\n [attr.aria-checked]=\"item.code === currentLang()\"\n (click)=\"onSelect(item.code)\">\n <span class=\"flex-1\">@if (item.hasName) { {{ item.code | uppercase }} - {{ item.nameKey | translate }} } @else { {{ item.code | uppercase }} }</span>\n @if (item.code === currentLang()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n" }]
|
|
6269
|
-
}], propDecorators: { languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }], currentLang: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentLang", required: true }] }], showReloadHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "showReloadHint", required: false }] }], languageChange: [{ type: i0.Output, args: ["languageChange"] }], trigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ButtonComponent), { isSignal: true }] }] } });
|
|
6293
|
+
], template: "<cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\"\n [dropdownPosition]=\"dropdownPosition()\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._LANG.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._LANG.LBL_LANG' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (item of langItems(); track item.code) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"item.code === currentLang()\"\n [attr.aria-checked]=\"item.code === currentLang()\"\n (click)=\"onSelect(item.code)\">\n <span class=\"flex-1\">@if (item.hasName) { {{ item.code | uppercase }} - {{ item.nameKey | translate }} } @else { {{ item.code | uppercase }} }</span>\n @if (item.code === currentLang()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n" }]
|
|
6294
|
+
}], propDecorators: { languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }], currentLang: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentLang", required: true }] }], showReloadHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "showReloadHint", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], languageChange: [{ type: i0.Output, args: ["languageChange"] }], trigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ButtonComponent), { isSignal: true }] }] } });
|
|
6270
6295
|
|
|
6271
6296
|
/**
|
|
6272
6297
|
* Sélecteur de thème présentationnel.
|