@cityway/basic-ui 1.1.0-beta023 → 1.1.0-beta025

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.
@@ -1,9 +1,10 @@
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, untracked, contentChildren, DestroyRef, computed, Injectable, NgZone, Renderer2, ViewContainerRef, PLATFORM_ID, Pipe, EventEmitter, TemplateRef, ContentChild, Output, Input, ApplicationRef, Injector, createComponent, viewChildren, forwardRef } 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, PLATFORM_ID, Pipe, EventEmitter, TemplateRef, ContentChild, Output, Input, ApplicationRef, Injector, createComponent, 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
+ import { LiveAnnouncer } from '@angular/cdk/a11y';
7
8
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
9
  import { RouterLink, Router, ActivatedRoute } from '@angular/router';
9
10
  import { ComponentPortal } from '@angular/cdk/portal';
@@ -629,6 +630,11 @@ var SpriteIconEnum;
629
630
  class IconComponent {
630
631
  constructor() {
631
632
  this.icon = input(SpriteIconEnum.alertHelp, ...(ngDevMode ? [{ debugName: "icon" }] : []));
633
+ /**
634
+ * Texte court affiché à la place du picto (numéro, trigramme…). Prioritaire sur `icon`.
635
+ * Pensé pour les formes `circular` / `square` ; en `default`, la boîte s'élargit au texte.
636
+ */
637
+ this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : []));
632
638
  this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
633
639
  this.type = input(IconTypeEnum.default, ...(ngDevMode ? [{ debugName: "type" }] : []));
634
640
  this.iconSize = input(IconSizeEnum['sm'], ...(ngDevMode ? [{ debugName: "iconSize" }] : []));
@@ -645,15 +651,15 @@ class IconComponent {
645
651
  if (this.type() === IconTypeEnum.square) {
646
652
  return `icon-square icon-square-${this.iconSize()} icon-square-${this.iconUiType()}`;
647
653
  }
648
- return `icon icon-${this.iconSize()}`;
654
+ return `icon icon-${this.iconSize()}${this.text() ? ' icon-with-text' : ''}`;
649
655
  }
650
656
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
651
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: IconComponent, isStandalone: true, selector: "cw-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconCssClass: { classPropertyName: "iconCssClass", publicName: "iconCssClass", isSignal: true, isRequired: false, transformFunction: null }, iconUiType: { classPropertyName: "iconUiType", publicName: "iconUiType", isSignal: true, isRequired: false, transformFunction: null }, iconColorCustom: { classPropertyName: "iconColorCustom", publicName: "iconColorCustom", isSignal: true, isRequired: false, transformFunction: null }, spritePath: { classPropertyName: "spritePath", publicName: "spritePath", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "@if (type() === iconTypeEnum.circular || type() === iconTypeEnum.square) {\n <span class=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n </span>\n} @else {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n}\n\n<ng-template #iconContent>\n <svg class=\"icon-svg\" [ngClass]=\"iconCssClass()\" aria-hidden=\"true\"\n [attr.style]=\"iconColorCustom() ? 'color: ' + iconColorCustom() : null\">\n <use [attr.href]=\"spritePath() + '#' + icon()\" />\n </svg>\n @if (label()) {\n <span class=\"visually-hidden\">{{ label() }}</span>\n }\n</ng-template>\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
657
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: IconComponent, isStandalone: true, selector: "cw-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconCssClass: { classPropertyName: "iconCssClass", publicName: "iconCssClass", isSignal: true, isRequired: false, transformFunction: null }, iconUiType: { classPropertyName: "iconUiType", publicName: "iconUiType", isSignal: true, isRequired: false, transformFunction: null }, iconColorCustom: { classPropertyName: "iconColorCustom", publicName: "iconColorCustom", isSignal: true, isRequired: false, transformFunction: null }, spritePath: { classPropertyName: "spritePath", publicName: "spritePath", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "@if (type() === iconTypeEnum.circular || type() === iconTypeEnum.square) {\n @if (text()) {\n <!-- Texte : pos\u00E9 directement dans la forme, sans la bo\u00EEte `.icon` taill\u00E9e pour le picto. -->\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n } @else {\n <span class=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n </span>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n}\n\n<ng-template #iconContent>\n @if (text()) {\n <!-- Le texte est lu tel quel, sauf si un `label` plus explicite est fourni. -->\n <span class=\"icon-text\" [ngClass]=\"iconCssClass()\" [attr.aria-hidden]=\"label() ? 'true' : null\"\n [attr.style]=\"iconColorCustom() ? 'color: ' + iconColorCustom() : null\">{{ text() }}</span>\n } @else {\n <svg class=\"icon-svg\" [ngClass]=\"iconCssClass()\" aria-hidden=\"true\"\n [attr.style]=\"iconColorCustom() ? 'color: ' + iconColorCustom() : null\">\n <use [attr.href]=\"spritePath() + '#' + icon()\" />\n </svg>\n }\n @if (label()) {\n <span class=\"visually-hidden\">{{ label() }}</span>\n }\n</ng-template>\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
652
658
  }
653
659
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: IconComponent, decorators: [{
654
660
  type: Component,
655
- args: [{ selector: 'cw-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "@if (type() === iconTypeEnum.circular || type() === iconTypeEnum.square) {\n <span class=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n </span>\n} @else {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n}\n\n<ng-template #iconContent>\n <svg class=\"icon-svg\" [ngClass]=\"iconCssClass()\" aria-hidden=\"true\"\n [attr.style]=\"iconColorCustom() ? 'color: ' + iconColorCustom() : null\">\n <use [attr.href]=\"spritePath() + '#' + icon()\" />\n </svg>\n @if (label()) {\n <span class=\"visually-hidden\">{{ label() }}</span>\n }\n</ng-template>\n" }]
656
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconCssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconCssClass", required: false }] }], iconUiType: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconUiType", required: false }] }], iconColorCustom: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColorCustom", required: false }] }], spritePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "spritePath", required: false }] }], hostClasses: [{
661
+ args: [{ selector: 'cw-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "@if (type() === iconTypeEnum.circular || type() === iconTypeEnum.square) {\n @if (text()) {\n <!-- Texte : pos\u00E9 directement dans la forme, sans la bo\u00EEte `.icon` taill\u00E9e pour le picto. -->\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n } @else {\n <span class=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n </span>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n}\n\n<ng-template #iconContent>\n @if (text()) {\n <!-- Le texte est lu tel quel, sauf si un `label` plus explicite est fourni. -->\n <span class=\"icon-text\" [ngClass]=\"iconCssClass()\" [attr.aria-hidden]=\"label() ? 'true' : null\"\n [attr.style]=\"iconColorCustom() ? 'color: ' + iconColorCustom() : null\">{{ text() }}</span>\n } @else {\n <svg class=\"icon-svg\" [ngClass]=\"iconCssClass()\" aria-hidden=\"true\"\n [attr.style]=\"iconColorCustom() ? 'color: ' + iconColorCustom() : null\">\n <use [attr.href]=\"spritePath() + '#' + icon()\" />\n </svg>\n }\n @if (label()) {\n <span class=\"visually-hidden\">{{ label() }}</span>\n }\n</ng-template>\n" }]
662
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconCssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconCssClass", required: false }] }], iconUiType: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconUiType", required: false }] }], iconColorCustom: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColorCustom", required: false }] }], spritePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "spritePath", required: false }] }], hostClasses: [{
657
663
  type: HostBinding,
658
664
  args: ['class']
659
665
  }] } });
@@ -683,6 +689,12 @@ class CardComponent {
683
689
  constructor() {
684
690
  this.cdRef = inject(ChangeDetectorRef);
685
691
  this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
692
+ /**
693
+ * Id du titre (`h2`/`h3`), pour le citer dans un `aria-labelledby` / `aria-describedby`.
694
+ * Auto-genere si absent.
695
+ */
696
+ this.titleId = input(uniqueId('card-title'), ...(ngDevMode ? [{ debugName: "titleId" }] : []));
697
+ /** Sous-titre en texte brut (interpole, non traduit) : `<` et `&` sont affiches tels quels. */
686
698
  this.subtitle = input(...(ngDevMode ? [undefined, { debugName: "subtitle" }] : []));
687
699
  /** Sous-titre sur une ligne, tronque avec ellipse. Par defaut le texte passe a la ligne. */
688
700
  this.truncateSubtitle = input(false, ...(ngDevMode ? [{ debugName: "truncateSubtitle" }] : []));
@@ -729,7 +741,16 @@ class CardComponent {
729
741
  this.collapseClicked = output();
730
742
  this.collapseDirective = viewChild('collapse', ...(ngDevMode ? [{ debugName: "collapseDirective" }] : []));
731
743
  this.cardFooter = viewChild('cardFooter', ...(ngDevMode ? [{ debugName: "cardFooter" }] : []));
744
+ this.cardHeader = viewChild('cardHeader', ...(ngDevMode ? [{ debugName: "cardHeader" }] : []));
732
745
  this.showFooter = signal(true, ...(ngDevMode ? [{ debugName: "showFooter" }] : []));
746
+ /**
747
+ * Contenu projete dans les slots d'en-tete (`header-start` / `header-custom-area`).
748
+ * Vaut `true` jusqu'au premier rendu pour que l'en-tete existe et recoive la projection,
749
+ * puis est recalcule depuis le DOM dans `ngAfterViewInit` (meme principe que le pied).
750
+ */
751
+ this.hasProjectedHeader = signal(true, ...(ngDevMode ? [{ debugName: "hasProjectedHeader" }] : []));
752
+ /** En-tete rendu des qu'il a quelque chose a afficher : titre, sous-titre ou slot projete. */
753
+ this.hasHeader = computed(() => !!this.title() || !!this.subtitle() || this.hasProjectedHeader(), ...(ngDevMode ? [{ debugName: "hasHeader" }] : []));
733
754
  this.titleRankEnum = CardTitleRankEnum;
734
755
  this.typeEnum = CardTypeEnum;
735
756
  this.isCollapsed = signal(false, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : []));
@@ -756,8 +777,19 @@ class CardComponent {
756
777
  ngAfterViewInit() {
757
778
  const el = this.cardFooter()?.nativeElement;
758
779
  this.showFooter.set(!!el && el.children.length > 0);
780
+ this.hasProjectedHeader.set(this.headerHasProjection());
759
781
  this.cdRef.detectChanges();
760
782
  }
783
+ /** Vrai si l'en-tete contient un element projete (hors elements rendus par la carte elle-meme). */
784
+ headerHasProjection() {
785
+ const header = this.cardHeader()?.nativeElement;
786
+ if (!header)
787
+ return false;
788
+ const customArea = header.querySelector(':scope > .card-header-custom-area');
789
+ if (customArea && customArea.children.length > 0)
790
+ return true;
791
+ return Array.from(header.children).some(child => !child.matches('.card-header-content, .card-header-custom-area, .btn-collapse'));
792
+ }
761
793
  toggleCollapse() {
762
794
  if (this.collapsible() && !this.disabled() && !this.collapseLocked()) {
763
795
  const newCollapsedState = !this.isCollapsed();
@@ -797,7 +829,7 @@ class CardComponent {
797
829
  return this.isCollapsed();
798
830
  }
799
831
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
800
- 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 }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", 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 }], ngImport: i0, template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\">\n @if (title()) {\n <div class=\"card-header\" [class.card-header-collapse]=\"collapsible()\"\n [class.card-header-collapsed]=\"collapsible() && isCollapsed()\">\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\n </div>\n }\n\n @if(collapsible()) {\n <div [cwCollapse]=\"isCollapsed()\" [id]=\"collapseId()\" #collapse=\"cwCollapse\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n }\n @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</div>\n\n<ng-template #header>\n <ng-content select=\"[header-start]\"></ng-content>\n\n <div class=\"card-header-content\">\n @if (titleRank() === titleRankEnum.h2) {\n <h2 class=\"text-truncate\">{{ (title() ?? '') | translate }}</h2>\n }\n @else if (titleRank() === titleRankEnum.h3) {\n <h3 class=\"text-truncate\">{{ (title() ?? '') | translate }}</h3>\n }\n\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\" [innerHTML]=\"subtitle()\"></div>\n </div>\n\n <div class=\"card-header-custom-area\">\n <ng-content select=\"[header-custom-area]\"></ng-content>\n </div>\n\n <!-- collapseLocked : pas de chevron, donc pas de stretched-link -> en-tete non cliquable,\n sans passer par `disabled` (qui grise titre et sous-titre). -->\n @if (collapsible() && !collapseLocked()) {\n <button type=\"button\" class=\"btn btn-collapse\" [class.stretched-link]=\"collapseStretched() && !disabled()\"\n (click)=\"toggleCollapse()\" [disabled]=\"disabled()\" [attr.aria-disabled]=\"disabled()\"\n [attr.aria-expanded]=\"!isCollapsed()\" [class.collapsed]=\"isCollapsed()\" [attr.aria-controls]=\"collapseId()\">\n <cw-icon [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></cw-icon>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.EXPAND_COLLAPSE' | translate }}</span>\n </button>\n }\n</ng-template>\n\n<ng-template #content>\n @if (shouldRenderBody()) {\n <div class=\"card-body\">\n <ng-content></ng-content>\n </div>\n\n @if (showFooter()) {\n <div class=\"card-footer\" #cardFooter>\n <ng-content select=\"[card-footer]\"></ng-content>\n </div>\n }\n }\n</ng-template>\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", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
832
+ 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 }, titleId: { classPropertyName: "titleId", publicName: "titleId", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", 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 @if (hasHeader()) {\r\n <div #cardHeader class=\"card-header\" [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\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 @if (titleRank() === titleRankEnum.h2) {\r\n <h2 class=\"text-truncate\" [id]=\"titleId()\">{{ title | translate }}</h2>\r\n }\r\n @else if (titleRank() === titleRankEnum.h3) {\r\n <h3 class=\"text-truncate\" [id]=\"titleId()\">{{ title | translate }}</h3>\r\n }\r\n }\r\n\r\n @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 <cw-icon [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></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 <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (showFooter()) {\r\n <div class=\"card-footer\" #cardFooter>\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\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 }); }
801
833
  }
802
834
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: CardComponent, decorators: [{
803
835
  type: Component,
@@ -808,8 +840,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
808
840
  CollapseDirective,
809
841
  IconComponent,
810
842
  TranslatePipe
811
- ], template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\">\n @if (title()) {\n <div class=\"card-header\" [class.card-header-collapse]=\"collapsible()\"\n [class.card-header-collapsed]=\"collapsible() && isCollapsed()\">\n <ng-container *ngTemplateOutlet=\"header\"></ng-container>\n </div>\n }\n\n @if(collapsible()) {\n <div [cwCollapse]=\"isCollapsed()\" [id]=\"collapseId()\" #collapse=\"cwCollapse\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n }\n @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</div>\n\n<ng-template #header>\n <ng-content select=\"[header-start]\"></ng-content>\n\n <div class=\"card-header-content\">\n @if (titleRank() === titleRankEnum.h2) {\n <h2 class=\"text-truncate\">{{ (title() ?? '') | translate }}</h2>\n }\n @else if (titleRank() === titleRankEnum.h3) {\n <h3 class=\"text-truncate\">{{ (title() ?? '') | translate }}</h3>\n }\n\n <div class=\"card-subtitle fs fs-xs text-light\" [class.text-truncate]=\"truncateSubtitle()\" [innerHTML]=\"subtitle()\"></div>\n </div>\n\n <div class=\"card-header-custom-area\">\n <ng-content select=\"[header-custom-area]\"></ng-content>\n </div>\n\n <!-- collapseLocked : pas de chevron, donc pas de stretched-link -> en-tete non cliquable,\n sans passer par `disabled` (qui grise titre et sous-titre). -->\n @if (collapsible() && !collapseLocked()) {\n <button type=\"button\" class=\"btn btn-collapse\" [class.stretched-link]=\"collapseStretched() && !disabled()\"\n (click)=\"toggleCollapse()\" [disabled]=\"disabled()\" [attr.aria-disabled]=\"disabled()\"\n [attr.aria-expanded]=\"!isCollapsed()\" [class.collapsed]=\"isCollapsed()\" [attr.aria-controls]=\"collapseId()\">\n <cw-icon [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></cw-icon>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.EXPAND_COLLAPSE' | translate }}</span>\n </button>\n }\n</ng-template>\n\n<ng-template #content>\n @if (shouldRenderBody()) {\n <div class=\"card-body\">\n <ng-content></ng-content>\n </div>\n\n @if (showFooter()) {\n <div class=\"card-footer\" #cardFooter>\n <ng-content select=\"[card-footer]\"></ng-content>\n </div>\n }\n }\n</ng-template>\n" }]
812
- }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", 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 }] }] } });
843
+ ], template: "<div class=\"card\" [ngClass]=\"cssClass()\" [class.card-collapse]=\"collapsible()\" [class.card-disabled]=\"collapsible() && disabled()\" [class.card-light]=\"type() === typeEnum.light\">\r\n @if (hasHeader()) {\r\n <div #cardHeader class=\"card-header\" [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\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 @if (titleRank() === titleRankEnum.h2) {\r\n <h2 class=\"text-truncate\" [id]=\"titleId()\">{{ title | translate }}</h2>\r\n }\r\n @else if (titleRank() === titleRankEnum.h3) {\r\n <h3 class=\"text-truncate\" [id]=\"titleId()\">{{ title | translate }}</h3>\r\n }\r\n }\r\n\r\n @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 <cw-icon [icon]=\"spriteIcon.up\" [iconSize]=\"iconSize['xs']\"></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 <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (showFooter()) {\r\n <div class=\"card-footer\" #cardFooter>\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n }\r\n</ng-template>\r\n" }]
844
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleId: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleId", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", 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 }] }] } });
813
845
 
814
846
  class AccordionComponent {
815
847
  constructor() {
@@ -923,6 +955,13 @@ var AlertTypeEnum;
923
955
  AlertTypeEnum["warning"] = "warning";
924
956
  AlertTypeEnum["danger"] = "danger";
925
957
  })(AlertTypeEnum || (AlertTypeEnum = {}));
958
+ /** Annonce d'une `cw-alert` aux lecteurs d'ecran (input `live`). */
959
+ var AlertLiveEnum;
960
+ (function (AlertLiveEnum) {
961
+ AlertLiveEnum["off"] = "off";
962
+ AlertLiveEnum["polite"] = "polite";
963
+ AlertLiveEnum["assertive"] = "assertive";
964
+ })(AlertLiveEnum || (AlertLiveEnum = {}));
926
965
 
927
966
  var IconNotifSizeEnum;
928
967
  (function (IconNotifSizeEnum) {
@@ -957,7 +996,7 @@ class IconNotificationComponent {
957
996
  return 'icon-notification icon-notification-' + this.type();
958
997
  }
959
998
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: IconNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
960
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.20", type: IconNotificationComponent, isStandalone: true, selector: "cw-icon-notification", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "\r\n<span class=\"icon\">\r\n <cw-icon [label]=\"labelKey() | translate\" [iconSize]=\"iconSizeEnum['sm']\" [icon]=\"icon()\"></cw-icon>\r\n</span>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
999
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.20", type: IconNotificationComponent, isStandalone: true, selector: "cw-icon-notification", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "\r\n<span class=\"icon\">\r\n <cw-icon [label]=\"labelKey() | translate\" [iconSize]=\"iconSizeEnum['sm']\" [icon]=\"icon()\"></cw-icon>\r\n</span>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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 }); }
961
1000
  }
962
1001
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: IconNotificationComponent, decorators: [{
963
1002
  type: Component,
@@ -974,16 +1013,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
974
1013
  class AlertComponent {
975
1014
  constructor() {
976
1015
  this.cdRef = inject(ChangeDetectorRef);
1016
+ this.liveAnnouncer = inject(LiveAnnouncer);
1017
+ this.lastAnnounced = '';
977
1018
  this.type = input(AlertTypeEnum.info, ...(ngDevMode ? [{ debugName: "type" }] : []));
978
1019
  this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
1020
+ /** Parametres de traduction du `title` (ex. `{ count: 3 }`), passes au pipe `translate`. */
1021
+ this.titleParams = input(...(ngDevMode ? [undefined, { debugName: "titleParams" }] : []));
979
1022
  this.isDismissible = input(false, ...(ngDevMode ? [{ debugName: "isDismissible" }] : []));
980
1023
  this.cssClass = input('', ...(ngDevMode ? [{ debugName: "cssClass" }] : []));
981
1024
  this.dataTest = input(...(ngDevMode ? [undefined, { debugName: "dataTest" }] : []));
1025
+ /**
1026
+ * Annonce de l'alerte aux lecteurs d'ecran quand elle apparait sans action de l'utilisateur
1027
+ * (RGAA 7.5) : `polite` attend la fin de la lecture en cours, `assertive` l'interrompt
1028
+ * (a reserver aux erreurs). `off` (defaut) : alerte statique, rien n'est annonce.
1029
+ *
1030
+ * Le texte (titre + contenu) passe par le `LiveAnnouncer` du CDK, dont la region live existe
1031
+ * deja dans la page : un `role="status"` pose sur une alerte inseree avec son contenu n'est
1032
+ * pas annonce de facon fiable. Un changement de texte ulterieur est annonce a nouveau.
1033
+ */
1034
+ this.live = input(AlertLiveEnum.off, ...(ngDevMode ? [{ debugName: "live" }] : []));
982
1035
  // Nom expose dans la public-api (consomme via `(close)`) : renommer serait un
983
1036
  // breaking change. Candidat a renommer (ex: `closed`) lors d'un futur bump majeur.
984
1037
  // eslint-disable-next-line @angular-eslint/no-output-native
985
1038
  this.close = output();
986
1039
  this.alertContent = viewChild('alertContent', ...(ngDevMode ? [{ debugName: "alertContent" }] : []));
1040
+ this.alertBody = viewChild('alertBody', ...(ngDevMode ? [{ debugName: "alertBody" }] : []));
987
1041
  this.isVisible = true;
988
1042
  this.showContent = true;
989
1043
  this.iconSize = IconSizeEnum;
@@ -1004,17 +1058,42 @@ class AlertComponent {
1004
1058
  if (!el)
1005
1059
  return;
1006
1060
  this.updateShowContent(el);
1061
+ this.scheduleAnnounce();
1007
1062
  // Le contenu projeté peut arriver de façon asynchrone (ex. clé i18n traduite via un
1008
1063
  // loader HTTP, données chargées plus tard). On observe donc les mutations plutôt que
1009
1064
  // de figer `showContent` une seule fois : l'alerte ne se vide plus quand le contenu
1010
1065
  // arrive après le premier rendu.
1011
1066
  if (typeof MutationObserver !== 'undefined') {
1012
- this.contentObserver = new MutationObserver(() => this.updateShowContent(el));
1067
+ this.contentObserver = new MutationObserver(() => {
1068
+ this.updateShowContent(el);
1069
+ this.scheduleAnnounce();
1070
+ });
1013
1071
  this.contentObserver.observe(el, { childList: true, characterData: true, subtree: true });
1014
1072
  }
1015
1073
  }
1016
1074
  ngOnDestroy() {
1017
1075
  this.contentObserver?.disconnect();
1076
+ clearTimeout(this.announceTimer);
1077
+ }
1078
+ /**
1079
+ * Annonce differee et regroupee : le contenu projete arrive souvent en plusieurs mutations
1080
+ * (traduction chargee apres coup), on n'annonce que le texte stabilise, et une seule fois.
1081
+ */
1082
+ scheduleAnnounce() {
1083
+ if (this.live() === AlertLiveEnum.off)
1084
+ return;
1085
+ clearTimeout(this.announceTimer);
1086
+ this.announceTimer = setTimeout(() => {
1087
+ const live = this.live();
1088
+ // Titre et contenu sont des blocs voisins : on les joint par une espace, sinon
1089
+ // `textContent` les colle (« TitreTexte »).
1090
+ const blocks = Array.from(this.alertBody()?.nativeElement.children ?? []);
1091
+ const text = blocks.map(block => block.textContent ?? '').join(' ').replace(/\s+/g, ' ').trim();
1092
+ if (live === AlertLiveEnum.off || !this.isVisible || !text || text === this.lastAnnounced)
1093
+ return;
1094
+ this.lastAnnounced = text;
1095
+ this.liveAnnouncer.announce(text, live);
1096
+ }, 150);
1018
1097
  }
1019
1098
  updateShowContent(el) {
1020
1099
  const hasContent = el.children.length > 0 || (el.textContent ?? '').trim().length > 0;
@@ -1028,7 +1107,7 @@ class AlertComponent {
1028
1107
  this.close.emit(true);
1029
1108
  }
1030
1109
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1031
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: AlertComponent, isStandalone: true, selector: "cw-alert", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, isDismissible: { classPropertyName: "isDismissible", publicName: "isDismissible", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, viewQueries: [{ propertyName: "alertContent", first: true, predicate: ["alertContent"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isVisible) {\n <div [class]=\"'alert alert-' + type() + ' '+ cssClass()\" [ngClass]=\"{ 'alert-dismissible fade show': isDismissible() }\"\n [attr.data-test-ctw]=\"resolvedDataTest()\">\n <cw-icon-notification [type]=\"iconNotifType()\"></cw-icon-notification>\n <div class=\"alert-content\">\n @if (title(); as title) {\n <div class=\"fw-bold\">{{ title | translate }}</div>\n }\n\n <!-- <div> et non <p> : le contenu projet\u00E9 peut \u00EAtre un bloc (liste, plusieurs paragraphes). -->\n <div #alertContent class=\"alert-text\" [hidden]=\"!showContent\">\n <ng-content></ng-content>\n </div>\n </div>\n @if (isDismissible()) {\n <button type=\"button\" class=\"btn-close\" (click)=\"closeAlert()\"\n [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n [attr.data-test-ctw]=\"'close-' + resolvedDataTest()\">\n <cw-icon [label]=\"'_COMMON._ACTION.CLOSE' | translate\" [iconSize]=\"iconSize['sm']\" [icon]=\"spriteIcon.toolbarClose\"></cw-icon>\n </button>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconNotificationComponent, selector: "cw-icon-notification", inputs: ["type"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1110
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: AlertComponent, isStandalone: true, selector: "cw-alert", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, titleParams: { classPropertyName: "titleParams", publicName: "titleParams", isSignal: true, isRequired: false, transformFunction: null }, isDismissible: { classPropertyName: "isDismissible", publicName: "isDismissible", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null }, live: { classPropertyName: "live", publicName: "live", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, viewQueries: [{ propertyName: "alertContent", first: true, predicate: ["alertContent"], descendants: true, isSignal: true }, { propertyName: "alertBody", first: true, predicate: ["alertBody"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isVisible) {\r\n <div [class]=\"'alert alert-' + type() + ' '+ cssClass()\" [ngClass]=\"{ 'alert-dismissible fade show': isDismissible() }\"\r\n [attr.data-test-ctw]=\"resolvedDataTest()\">\r\n <cw-icon-notification [type]=\"iconNotifType()\"></cw-icon-notification>\r\n <div #alertBody class=\"alert-content\">\r\n @if (title(); as title) {\r\n <div class=\"fw-bold\">{{ title | translate: titleParams() }}</div>\r\n }\r\n\r\n <!-- <div> et non <p> : le contenu projet\u00E9 peut \u00EAtre un bloc (liste, plusieurs paragraphes). -->\r\n <div #alertContent class=\"alert-text\" [hidden]=\"!showContent\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n @if (isDismissible()) {\r\n <button type=\"button\" class=\"btn-close\" (click)=\"closeAlert()\"\r\n [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n [attr.data-test-ctw]=\"'close-' + resolvedDataTest()\">\r\n <cw-icon [label]=\"'_COMMON._ACTION.CLOSE' | translate\" [iconSize]=\"iconSize['sm']\" [icon]=\"spriteIcon.toolbarClose\"></cw-icon>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconNotificationComponent, selector: "cw-icon-notification", inputs: ["type"] }, { 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 }); }
1032
1111
  }
1033
1112
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: AlertComponent, decorators: [{
1034
1113
  type: Component,
@@ -1037,8 +1116,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
1037
1116
  TranslateModule,
1038
1117
  IconNotificationComponent,
1039
1118
  IconComponent
1040
- ], template: "@if (isVisible) {\n <div [class]=\"'alert alert-' + type() + ' '+ cssClass()\" [ngClass]=\"{ 'alert-dismissible fade show': isDismissible() }\"\n [attr.data-test-ctw]=\"resolvedDataTest()\">\n <cw-icon-notification [type]=\"iconNotifType()\"></cw-icon-notification>\n <div class=\"alert-content\">\n @if (title(); as title) {\n <div class=\"fw-bold\">{{ title | translate }}</div>\n }\n\n <!-- <div> et non <p> : le contenu projet\u00E9 peut \u00EAtre un bloc (liste, plusieurs paragraphes). -->\n <div #alertContent class=\"alert-text\" [hidden]=\"!showContent\">\n <ng-content></ng-content>\n </div>\n </div>\n @if (isDismissible()) {\n <button type=\"button\" class=\"btn-close\" (click)=\"closeAlert()\"\n [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n [attr.data-test-ctw]=\"'close-' + resolvedDataTest()\">\n <cw-icon [label]=\"'_COMMON._ACTION.CLOSE' | translate\" [iconSize]=\"iconSize['sm']\" [icon]=\"spriteIcon.toolbarClose\"></cw-icon>\n </button>\n }\n </div>\n}\n" }]
1041
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], isDismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDismissible", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], alertContent: [{ type: i0.ViewChild, args: ['alertContent', { isSignal: true }] }] } });
1119
+ ], template: "@if (isVisible) {\r\n <div [class]=\"'alert alert-' + type() + ' '+ cssClass()\" [ngClass]=\"{ 'alert-dismissible fade show': isDismissible() }\"\r\n [attr.data-test-ctw]=\"resolvedDataTest()\">\r\n <cw-icon-notification [type]=\"iconNotifType()\"></cw-icon-notification>\r\n <div #alertBody class=\"alert-content\">\r\n @if (title(); as title) {\r\n <div class=\"fw-bold\">{{ title | translate: titleParams() }}</div>\r\n }\r\n\r\n <!-- <div> et non <p> : le contenu projet\u00E9 peut \u00EAtre un bloc (liste, plusieurs paragraphes). -->\r\n <div #alertContent class=\"alert-text\" [hidden]=\"!showContent\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n @if (isDismissible()) {\r\n <button type=\"button\" class=\"btn-close\" (click)=\"closeAlert()\"\r\n [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n [attr.data-test-ctw]=\"'close-' + resolvedDataTest()\">\r\n <cw-icon [label]=\"'_COMMON._ACTION.CLOSE' | translate\" [iconSize]=\"iconSize['sm']\" [icon]=\"spriteIcon.toolbarClose\"></cw-icon>\r\n </button>\r\n }\r\n </div>\r\n}\r\n" }]
1120
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleParams", required: false }] }], isDismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDismissible", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], live: [{ type: i0.Input, args: [{ isSignal: true, alias: "live", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], alertContent: [{ type: i0.ViewChild, args: ['alertContent', { isSignal: true }] }], alertBody: [{ type: i0.ViewChild, args: ['alertBody', { isSignal: true }] }] } });
1042
1121
 
1043
1122
  class FocusTrackerService {
1044
1123
  constructor() {
@@ -1233,7 +1312,7 @@ class ToastItemComponent {
1233
1312
  }
1234
1313
  }
1235
1314
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ToastItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1236
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ToastItemComponent, isStandalone: true, selector: "cw-toast-item", inputs: { toast: { classPropertyName: "toast", publicName: "toast", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { action: "action" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focusin": "onFocusIn()", "focusout": "onFocusOut($event)" } }, ngImport: i0, template: "<cw-alert\n [type]=\"toast().type\"\n [isDismissible]=\"true\"\n [title]=\"(toast().title ?? '') | translate\"\n (close)=\"onClose()\"\n [dataTest]=\"'toast-' + toast().type\">\n <span [innerHTML]=\"toast().message | translate\"></span>&nbsp;\n @if (toast().action; as action) {\n <button type=\"button\" class=\"alert-link\" (click)=\"onAction()\">{{ action.label }}</button>\n }\n</cw-alert>\n\n@if (toast().autohide) {\n <div class=\"toast-progress\" [style.width.%]=\"progress()\"></div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AlertComponent, selector: "cw-alert", inputs: ["type", "title", "isDismissible", "cssClass", "dataTest"], outputs: ["close"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1315
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ToastItemComponent, isStandalone: true, selector: "cw-toast-item", inputs: { toast: { classPropertyName: "toast", publicName: "toast", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { action: "action" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focusin": "onFocusIn()", "focusout": "onFocusOut($event)" } }, ngImport: i0, template: "<cw-alert\n [type]=\"toast().type\"\n [isDismissible]=\"true\"\n [title]=\"(toast().title ?? '') | translate\"\n (close)=\"onClose()\"\n [dataTest]=\"'toast-' + toast().type\">\n <span [innerHTML]=\"toast().message | translate\"></span>&nbsp;\n @if (toast().action; as action) {\n <button type=\"button\" class=\"alert-link\" (click)=\"onAction()\">{{ action.label }}</button>\n }\n</cw-alert>\n\n@if (toast().autohide) {\n <div class=\"toast-progress\" [style.width.%]=\"progress()\"></div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AlertComponent, selector: "cw-alert", inputs: ["type", "title", "titleParams", "isDismissible", "cssClass", "dataTest", "live"], outputs: ["close"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1237
1316
  }
1238
1317
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ToastItemComponent, decorators: [{
1239
1318
  type: Component,
@@ -1306,6 +1385,8 @@ class BadgeComponent {
1306
1385
  this.badgePositionEnum = BadgePositionEnum;
1307
1386
  this.type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
1308
1387
  this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
1388
+ /** Parametres de traduction du `label` (ex. `{ count: 3 }`), passes au pipe `translate`. */
1389
+ this.labelParams = input(...(ngDevMode ? [undefined, { debugName: "labelParams" }] : []));
1309
1390
  this.withIcon = input(...(ngDevMode ? [undefined, { debugName: "withIcon" }] : []));
1310
1391
  /**
1311
1392
  * Position de l'icone. `undefined` retombe sur le defaut : un hote qui relaie une
@@ -1325,12 +1406,12 @@ class BadgeComponent {
1325
1406
  return this.skeletonMode() ? 'skeleton badge' : '';
1326
1407
  }
1327
1408
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1328
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: BadgeComponent, isStandalone: true, selector: "cw-badge", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<div [class]=\"'badge badge-' + type() + ' '+ cssClass()\" [attr.data-test-ctw]=\"dataTest() ? dataTest() : null\">\n\n @if (withIcon() && iconPosition() === badgePositionEnum.left) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\n }\n\n @if (label(); as label) {\n {{ label | translate }}\n }\n\n @if (withIcon() && iconPosition() === badgePositionEnum.right) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1409
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: BadgeComponent, isStandalone: true, selector: "cw-badge", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelParams: { classPropertyName: "labelParams", publicName: "labelParams", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<div [class]=\"'badge badge-' + type() + ' '+ cssClass()\" [attr.data-test-ctw]=\"dataTest() ? dataTest() : null\">\r\n\r\n @if (withIcon() && iconPosition() === badgePositionEnum.left) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\r\n }\r\n\r\n @if (label(); as label) {\r\n {{ label | translate: labelParams() }}\r\n }\r\n\r\n @if (withIcon() && iconPosition() === badgePositionEnum.right) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\r\n }\r\n</div>\r\n", dependencies: [{ 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 }); }
1329
1410
  }
1330
1411
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: BadgeComponent, decorators: [{
1331
1412
  type: Component,
1332
- args: [{ selector: 'cw-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [IconComponent, TranslatePipe], template: "<div [class]=\"'badge badge-' + type() + ' '+ cssClass()\" [attr.data-test-ctw]=\"dataTest() ? dataTest() : null\">\n\n @if (withIcon() && iconPosition() === badgePositionEnum.left) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\n }\n\n @if (label(); as label) {\n {{ label | translate }}\n }\n\n @if (withIcon() && iconPosition() === badgePositionEnum.right) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\n }\n</div>\n" }]
1333
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], withIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withIcon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], skeletonMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonMode", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], hostClasses: [{
1413
+ args: [{ selector: 'cw-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [IconComponent, TranslatePipe], template: "<div [class]=\"'badge badge-' + type() + ' '+ cssClass()\" [attr.data-test-ctw]=\"dataTest() ? dataTest() : null\">\r\n\r\n @if (withIcon() && iconPosition() === badgePositionEnum.left) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\r\n }\r\n\r\n @if (label(); as label) {\r\n {{ label | translate: labelParams() }}\r\n }\r\n\r\n @if (withIcon() && iconPosition() === badgePositionEnum.right) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['2xs']\"></cw-icon>\r\n }\r\n</div>\r\n" }]
1414
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelParams", required: false }] }], withIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withIcon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], skeletonMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonMode", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], hostClasses: [{
1334
1415
  type: HostBinding,
1335
1416
  args: ['class']
1336
1417
  }] } });
@@ -1723,6 +1804,8 @@ class ButtonComponent {
1723
1804
  this.buttonPositionEnum = ButtonPositionEnum;
1724
1805
  this.type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
1725
1806
  this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
1807
+ /** Parametres de traduction du `label` (ex. `{ count: 3 }`), passes au pipe `translate`. */
1808
+ this.labelParams = input(...(ngDevMode ? [undefined, { debugName: "labelParams" }] : []));
1726
1809
  this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
1727
1810
  /**
1728
1811
  * Si défini, le bouton est rendu comme `<a [routerLink]="link">` au lieu d'un `<button>`.
@@ -1765,6 +1848,20 @@ class ButtonComponent {
1765
1848
  * le `cwTooltip`, qui n'ajoute / retire que son propre id.
1766
1849
  */
1767
1850
  this.ariaDescribedBy = input(undefined, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
1851
+ /**
1852
+ * Nom accessible du `<button>` natif quand le libellé visible ne suffit pas (ex. compteur affiché
1853
+ * à côté : « Plus de filtres, 2 actifs »). Doit COMMENCER par le libellé visible (WCAG 2.5.3).
1854
+ * Texte déjà traduit, ou clé i18n traduite avec `labelParams`. Sans effet en mode lien / dropdown.
1855
+ */
1856
+ this.ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
1857
+ /**
1858
+ * Bouton de divulgation (déplie / replie une zone) : `true` / `false` pose `aria-expanded`
1859
+ * sur le `<button>` natif, à combiner avec `ariaControls`. `undefined` (défaut) : rien.
1860
+ * Sans effet en mode lien ou dropdown (le dropdown gère déjà son `aria-expanded`).
1861
+ */
1862
+ this.ariaExpanded = input(undefined, ...(ngDevMode ? [{ debugName: "ariaExpanded" }] : []));
1863
+ /** Id de la zone pilotée par le bouton, posé en `aria-controls` (avec `ariaExpanded`). */
1864
+ this.ariaControls = input(undefined, ...(ngDevMode ? [{ debugName: "ariaControls" }] : []));
1768
1865
  this.withTooltip = input(false, ...(ngDevMode ? [{ debugName: "withTooltip" }] : []));
1769
1866
  this.tooltipText = input('', ...(ngDevMode ? [{ debugName: "tooltipText" }] : []));
1770
1867
  this.tooltipTitle = input('', ...(ngDevMode ? [{ debugName: "tooltipTitle" }] : []));
@@ -1786,6 +1883,14 @@ class ButtonComponent {
1786
1883
  this.focusOutInitialized = false;
1787
1884
  /** `data-test-ctw` : valeur fournie, sinon derivee du label. */
1788
1885
  this.resolvedDataTest = computed(() => this.dataTest() ?? `btn-${UtilsHelper.slugify(this.label() ?? '')}`, ...(ngDevMode ? [{ debugName: "resolvedDataTest" }] : []));
1886
+ /**
1887
+ * Bouton desactive qui porte un tooltip : le `disabled` natif le retirerait de l'ordre de
1888
+ * tabulation et le tooltip ne serait plus jamais lu au clavier (ni survole sur certains
1889
+ * navigateurs). On le desactive alors par `aria-disabled` + classe `.disabled` (meme rendu),
1890
+ * il reste focusable et les clics sont bloques dans les handlers.
1891
+ */
1892
+ this.isSoftDisabled = computed(() => this.isDisabled() && this.withTooltip(), ...(ngDevMode ? [{ debugName: "isSoftDisabled" }] : []));
1893
+ this.isNativeDisabled = computed(() => this.isDisabled() && !this.withTooltip(), ...(ngDevMode ? [{ debugName: "isNativeDisabled" }] : []));
1789
1894
  }
1790
1895
  /** Mappe `tooltipPosition` (qui peut valoir `static`) vers une position de tooltip exploitable. */
1791
1896
  get tooltipPositionResolved() {
@@ -1815,16 +1920,26 @@ class ButtonComponent {
1815
1920
  [`btn-icon-${this.iconSize()}`]: !!this.iconSize() && this.withOnlyIcon()
1816
1921
  };
1817
1922
  }
1818
- onBtnAction() {
1923
+ onBtnAction(event) {
1924
+ if (this.blockIfDisabled(event))
1925
+ return;
1819
1926
  this.btnAction.emit();
1820
1927
  }
1821
- onLinkClick(event) {
1822
- if (this.isDisabled()) {
1823
- event.preventDefault();
1824
- event.stopPropagation();
1928
+ onDropdownToggleClick(event) {
1929
+ if (this.blockIfDisabled(event))
1825
1930
  return;
1826
- }
1827
- this.btnAction.emit();
1931
+ this.toggleDropdown();
1932
+ }
1933
+ /** Bloque le clic d'un bouton desactive (y compris la propagation vers l'hote `cw-button`). */
1934
+ blockIfDisabled(event) {
1935
+ if (!this.isDisabled())
1936
+ return false;
1937
+ event?.preventDefault();
1938
+ event?.stopPropagation();
1939
+ return true;
1940
+ }
1941
+ onLinkClick(event) {
1942
+ this.onBtnAction(event);
1828
1943
  }
1829
1944
  toggleDropdown() {
1830
1945
  this.getPlacement(this.dropdownPosition());
@@ -1890,7 +2005,7 @@ class ButtonComponent {
1890
2005
  this.destroyRef.onDestroy(unlisten);
1891
2006
  }
1892
2007
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1893
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ButtonComponent, isStandalone: true, selector: "cw-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, isDropdown: { classPropertyName: "isDropdown", publicName: "isDropdown", isSignal: true, isRequired: false, transformFunction: null }, hideCaret: { classPropertyName: "hideCaret", publicName: "hideCaret", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, withOnlyIcon: { classPropertyName: "withOnlyIcon", publicName: "withOnlyIcon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, isMinWidth: { classPropertyName: "isMinWidth", publicName: "isMinWidth", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingAnnounce: { classPropertyName: "loadingAnnounce", publicName: "loadingAnnounce", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: true, isRequired: false, transformFunction: null }, isPressed: { classPropertyName: "isPressed", publicName: "isPressed", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, withTooltip: { classPropertyName: "withTooltip", publicName: "withTooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTrigger: { classPropertyName: "tooltipTrigger", publicName: "tooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipType: { classPropertyName: "tooltipType", publicName: "tooltipType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction: "btnAction", dropDownClicked: "dropDownClicked" }, host: { properties: { "class.skeleton": "skeletonMode()", "class.btn": "skeletonMode()" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }, { propertyName: "dropdownToggle", first: true, predicate: ["dropdownToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\n<!-- Template du bouton (code existant envelopp\u00E9) -->\n<ng-template #buttonTemplate>\n @if (!isDropdown()) {\n @if (link() != null) {\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.disabled]=\"isDisabled()\"\n [routerLink]=\"isDisabled() ? null : link()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\n (click)=\"onLinkClick($event)\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </a>\n } @else {\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.active]=\"isPressed() === true\" [attr.aria-pressed]=\"isPressed() ?? null\"\n [disabled]=\"isDisabled()\" (click)=\"onBtnAction()\" [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n }\n }\n @else {\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\n [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"toggleDropdown()\" #dropdownToggle\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n\n @if(!hideCaret()) {\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\n }\n </button>\n\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\n <div class=\"dropdown-menu-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Template existant du contenu du bouton -->\n<ng-template #buttonContent>\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n\n @if(withOnlyIcon()) {\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate }}</span>\n }\n @else {\n {{ (label() ?? '') | translate }}\n }\n\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n</ng-template>\n\n<ng-template #iconContent>\n @if(withOnlyIcon()) {\n @switch(iconSize()) {\n @case(buttonIconSizeEnum.xsmall) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @case(buttonIconSizeEnum.small) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @default {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n }\n }\n @else {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n</ng-template>\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: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: CwTooltipDirective, selector: "[cwTooltip]", inputs: ["cwTooltip", "cwTooltipTitle", "cwTooltipType", "cwTooltipTrigger", "cwTooltipPosition", "cwTooltipDisabled"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
2008
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ButtonComponent, isStandalone: true, selector: "cw-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelParams: { classPropertyName: "labelParams", publicName: "labelParams", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, isDropdown: { classPropertyName: "isDropdown", publicName: "isDropdown", isSignal: true, isRequired: false, transformFunction: null }, hideCaret: { classPropertyName: "hideCaret", publicName: "hideCaret", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, withOnlyIcon: { classPropertyName: "withOnlyIcon", publicName: "withOnlyIcon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, isMinWidth: { classPropertyName: "isMinWidth", publicName: "isMinWidth", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingAnnounce: { classPropertyName: "loadingAnnounce", publicName: "loadingAnnounce", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: true, isRequired: false, transformFunction: null }, isPressed: { classPropertyName: "isPressed", publicName: "isPressed", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, withTooltip: { classPropertyName: "withTooltip", publicName: "withTooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTrigger: { classPropertyName: "tooltipTrigger", publicName: "tooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipType: { classPropertyName: "tooltipType", publicName: "tooltipType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction: "btnAction", dropDownClicked: "dropDownClicked" }, host: { properties: { "class.skeleton": "skeletonMode()", "class.btn": "skeletonMode()" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }, { propertyName: "dropdownToggle", first: true, predicate: ["dropdownToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\r\n\r\n<!-- Template du bouton (code existant envelopp\u00E9) -->\r\n<ng-template #buttonTemplate>\r\n @if (!isDropdown()) {\r\n @if (link() != null) {\r\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\r\n [class.disabled]=\"isDisabled()\"\r\n [routerLink]=\"isDisabled() ? null : link()\"\r\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\r\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\r\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\r\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\r\n (click)=\"onLinkClick($event)\">\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\r\n </a>\r\n } @else {\r\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\r\n [class.active]=\"isPressed() === true\" [attr.aria-pressed]=\"isPressed() ?? null\"\r\n [attr.aria-expanded]=\"ariaExpanded() ?? null\" [attr.aria-controls]=\"ariaControls() ?? null\"\r\n [attr.aria-label]=\"ariaLabel() ? (ariaLabel()! | translate: labelParams()) : null\"\r\n [disabled]=\"isNativeDisabled()\" [class.disabled]=\"isSoftDisabled()\" [attr.aria-disabled]=\"isSoftDisabled() ? 'true' : null\"\r\n (click)=\"onBtnAction($event)\" [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\r\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\r\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\r\n\r\n @if (isLoading()) {\r\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\r\n @if (loadingAnnounce()) {\r\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\r\n }\r\n }\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\r\n </button>\r\n }\r\n }\r\n @else {\r\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\r\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\r\n [ngClass]=\"getButtonClasses()\"\r\n [disabled]=\"isNativeDisabled()\" [class.disabled]=\"isSoftDisabled()\" [attr.aria-disabled]=\"isSoftDisabled() ? 'true' : null\"\r\n [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"onDropdownToggleClick($event)\" #dropdownToggle\r\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\r\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\r\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\r\n\r\n @if (isLoading()) {\r\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\r\n @if (loadingAnnounce()) {\r\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\r\n }\r\n }\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\r\n\r\n @if(!hideCaret()) {\r\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\r\n }\r\n </button>\r\n\r\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\r\n <div class=\"dropdown-menu-inner\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Template existant du contenu du bouton -->\r\n<ng-template #buttonContent>\r\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\r\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\r\n }\r\n\r\n @if(withOnlyIcon()) {\r\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate: labelParams() }}</span>\r\n }\r\n @else {\r\n {{ (label() ?? '') | translate: labelParams() }}\r\n }\r\n\r\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\r\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #iconContent>\r\n @if(withOnlyIcon()) {\r\n @switch(iconSize()) {\r\n @case(buttonIconSizeEnum.xsmall) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\r\n }\r\n @case(buttonIconSizeEnum.small) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\r\n }\r\n @default {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\r\n }\r\n }\r\n }\r\n @else {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\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: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: CwTooltipDirective, selector: "[cwTooltip]", inputs: ["cwTooltip", "cwTooltipTitle", "cwTooltipType", "cwTooltipTrigger", "cwTooltipPosition", "cwTooltipDisabled"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
1894
2009
  }
1895
2010
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ButtonComponent, decorators: [{
1896
2011
  type: Component,
@@ -1904,8 +2019,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
1904
2019
  ClickOutsideDirective,
1905
2020
  CwTooltipDirective,
1906
2021
  RouterLink
1907
- ], template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\n<!-- Template du bouton (code existant envelopp\u00E9) -->\n<ng-template #buttonTemplate>\n @if (!isDropdown()) {\n @if (link() != null) {\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.disabled]=\"isDisabled()\"\n [routerLink]=\"isDisabled() ? null : link()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\n (click)=\"onLinkClick($event)\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </a>\n } @else {\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.active]=\"isPressed() === true\" [attr.aria-pressed]=\"isPressed() ?? null\"\n [disabled]=\"isDisabled()\" (click)=\"onBtnAction()\" [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n }\n }\n @else {\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\n [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"toggleDropdown()\" #dropdownToggle\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n\n @if(!hideCaret()) {\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\n }\n </button>\n\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\n <div class=\"dropdown-menu-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Template existant du contenu du bouton -->\n<ng-template #buttonContent>\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n\n @if(withOnlyIcon()) {\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate }}</span>\n }\n @else {\n {{ (label() ?? '') | translate }}\n }\n\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n</ng-template>\n\n<ng-template #iconContent>\n @if(withOnlyIcon()) {\n @switch(iconSize()) {\n @case(buttonIconSizeEnum.xsmall) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @case(buttonIconSizeEnum.small) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @default {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n }\n }\n @else {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n</ng-template>\n" }]
1908
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], isDropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDropdown", required: false }] }], hideCaret: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCaret", required: false }] }], withIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withIcon", required: false }] }], withOnlyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withOnlyIcon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], isMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMinWidth", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], loadingAnnounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingAnnounce", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], skeletonMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonMode", required: false }] }], isPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPressed", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], withTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "withTooltip", required: false }] }], tooltipText: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipText", required: false }] }], tooltipTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitle", required: false }] }], tooltipTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTrigger", required: false }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], tooltipType: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipType", required: false }] }], btnAction: [{ type: i0.Output, args: ["btnAction"] }], dropDownClicked: [{ type: i0.Output, args: ["dropDownClicked"] }], dropdown: [{ type: i0.ViewChild, args: ['dropdown', { isSignal: true }] }], dropdownMenu: [{ type: i0.ViewChild, args: ['dropdownMenu', { isSignal: true }] }], dropdownToggle: [{ type: i0.ViewChild, args: ['dropdownToggle', { isSignal: true }] }] } });
2022
+ ], template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\r\n\r\n<!-- Template du bouton (code existant envelopp\u00E9) -->\r\n<ng-template #buttonTemplate>\r\n @if (!isDropdown()) {\r\n @if (link() != null) {\r\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\r\n [class.disabled]=\"isDisabled()\"\r\n [routerLink]=\"isDisabled() ? null : link()\"\r\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\r\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\r\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\r\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\r\n (click)=\"onLinkClick($event)\">\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\r\n </a>\r\n } @else {\r\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\r\n [class.active]=\"isPressed() === true\" [attr.aria-pressed]=\"isPressed() ?? null\"\r\n [attr.aria-expanded]=\"ariaExpanded() ?? null\" [attr.aria-controls]=\"ariaControls() ?? null\"\r\n [attr.aria-label]=\"ariaLabel() ? (ariaLabel()! | translate: labelParams()) : null\"\r\n [disabled]=\"isNativeDisabled()\" [class.disabled]=\"isSoftDisabled()\" [attr.aria-disabled]=\"isSoftDisabled() ? 'true' : null\"\r\n (click)=\"onBtnAction($event)\" [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\r\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\r\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\r\n\r\n @if (isLoading()) {\r\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\r\n @if (loadingAnnounce()) {\r\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\r\n }\r\n }\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\r\n </button>\r\n }\r\n }\r\n @else {\r\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\r\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\r\n [ngClass]=\"getButtonClasses()\"\r\n [disabled]=\"isNativeDisabled()\" [class.disabled]=\"isSoftDisabled()\" [attr.aria-disabled]=\"isSoftDisabled() ? 'true' : null\"\r\n [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"onDropdownToggleClick($event)\" #dropdownToggle\r\n [attr.data-test-ctw]=\"resolvedDataTest()\" [attr.aria-describedby]=\"ariaDescribedBy() || null\"\r\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\r\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\r\n\r\n @if (isLoading()) {\r\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\r\n @if (loadingAnnounce()) {\r\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\r\n }\r\n }\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\r\n\r\n @if(!hideCaret()) {\r\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\r\n }\r\n </button>\r\n\r\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\r\n <div class=\"dropdown-menu-inner\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Template existant du contenu du bouton -->\r\n<ng-template #buttonContent>\r\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\r\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\r\n }\r\n\r\n @if(withOnlyIcon()) {\r\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate: labelParams() }}</span>\r\n }\r\n @else {\r\n {{ (label() ?? '') | translate: labelParams() }}\r\n }\r\n\r\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\r\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #iconContent>\r\n @if(withOnlyIcon()) {\r\n @switch(iconSize()) {\r\n @case(buttonIconSizeEnum.xsmall) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\r\n }\r\n @case(buttonIconSizeEnum.small) {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\r\n }\r\n @default {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\r\n }\r\n }\r\n }\r\n @else {\r\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\r\n }\r\n</ng-template>\r\n" }]
2023
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelParams", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], isDropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDropdown", required: false }] }], hideCaret: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCaret", required: false }] }], withIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withIcon", required: false }] }], withOnlyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withOnlyIcon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], isMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMinWidth", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], loadingAnnounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingAnnounce", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], skeletonMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonMode", required: false }] }], isPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPressed", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], withTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "withTooltip", required: false }] }], tooltipText: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipText", required: false }] }], tooltipTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitle", required: false }] }], tooltipTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTrigger", required: false }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], tooltipType: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipType", required: false }] }], btnAction: [{ type: i0.Output, args: ["btnAction"] }], dropDownClicked: [{ type: i0.Output, args: ["dropDownClicked"] }], dropdown: [{ type: i0.ViewChild, args: ['dropdown', { isSignal: true }] }], dropdownMenu: [{ type: i0.ViewChild, args: ['dropdownMenu', { isSignal: true }] }], dropdownToggle: [{ type: i0.ViewChild, args: ['dropdownToggle', { isSignal: true }] }] } });
1909
2024
 
1910
2025
  /**
1911
2026
  * Navigation clavier ARIA d'un conteneur de menu.
@@ -2041,7 +2156,7 @@ class DropdownComponent {
2041
2156
  }
2042
2157
  }
2043
2158
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2044
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: DropdownComponent, isStandalone: true, selector: "cw-dropdown", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, btnCustom: { classPropertyName: "btnCustom", publicName: "btnCustom", isSignal: true, isRequired: false, transformFunction: null }, btnCssClass: { classPropertyName: "btnCssClass", publicName: "btnCssClass", isSignal: true, isRequired: false, transformFunction: null }, menuClass: { classPropertyName: "menuClass", publicName: "menuClass", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, viewQueries: [{ propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }, { propertyName: "dropdownToggle", first: true, predicate: ["dropdownToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Conteneur : Escape delegue depuis les enfants (bouton natif focusable +\r\n items via cwMenuKeyboard) ; le wrapper n'a pas a etre focusable. -->\r\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n<div class=\"dropdown\" [class.show]=\"isOpen()\" (clickOutside)=\"onClickOutside()\" clickOutside (keydown.escape)=\"onEscape()\" #dropdown>\r\n\r\n <button type=\"button\" class=\"dropdown-toggle btn\" [id]=\"dropdownId\" [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-haspopup]=\"true\" (click)=\"toggleDropdown()\" [ngClass]=\"btnCssClass()\" #dropdownToggle>\r\n\r\n <!-- Custom button content -->\r\n <ng-content select=\"[button]\"></ng-content>\r\n\r\n <!-- Classic button with icon -->\r\n @if (!btnCustom()) {\r\n <cw-icon [icon]=\"icon()\" [label]=\"title() | translate\"></cw-icon>\r\n }\r\n </button>\r\n\r\n <div [attr.aria-labelledby]=\"dropdownId\" class=\"dropdown-menu\" [class.show]=\"isOpen()\"\r\n [ngClass]=\"placementCss + ' ' + menuClass()\" cwMenuKeyboard\r\n [menuItemSelector]=\"'.dropdown-item:not([disabled]):not(.disabled)'\" #dropdownMenu>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2159
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: DropdownComponent, isStandalone: true, selector: "cw-dropdown", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, btnCustom: { classPropertyName: "btnCustom", publicName: "btnCustom", isSignal: true, isRequired: false, transformFunction: null }, btnCssClass: { classPropertyName: "btnCssClass", publicName: "btnCssClass", isSignal: true, isRequired: false, transformFunction: null }, menuClass: { classPropertyName: "menuClass", publicName: "menuClass", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, viewQueries: [{ propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }, { propertyName: "dropdownToggle", first: true, predicate: ["dropdownToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Conteneur : Escape delegue depuis les enfants (bouton natif focusable +\r\n items via cwMenuKeyboard) ; le wrapper n'a pas a etre focusable. -->\r\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n<div class=\"dropdown\" [class.show]=\"isOpen()\" (clickOutside)=\"onClickOutside()\" clickOutside (keydown.escape)=\"onEscape()\" #dropdown>\r\n\r\n <button type=\"button\" class=\"dropdown-toggle btn\" [id]=\"dropdownId\" [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-haspopup]=\"true\" (click)=\"toggleDropdown()\" [ngClass]=\"btnCssClass()\" #dropdownToggle>\r\n\r\n <!-- Custom button content -->\r\n <ng-content select=\"[button]\"></ng-content>\r\n\r\n <!-- Classic button with icon -->\r\n @if (!btnCustom()) {\r\n <cw-icon [icon]=\"icon()\" [label]=\"title() | translate\"></cw-icon>\r\n }\r\n </button>\r\n\r\n <div [attr.aria-labelledby]=\"dropdownId\" class=\"dropdown-menu\" [class.show]=\"isOpen()\"\r\n [ngClass]=\"placementCss + ' ' + menuClass()\" cwMenuKeyboard\r\n [menuItemSelector]=\"'.dropdown-item:not([disabled]):not(.disabled)'\" #dropdownMenu>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { 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 }); }
2045
2160
  }
2046
2161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: DropdownComponent, decorators: [{
2047
2162
  type: Component,
@@ -2066,11 +2181,17 @@ var FormFieldTypeEnum;
2066
2181
  FormFieldTypeEnum["radio"] = "radio";
2067
2182
  FormFieldTypeEnum["radioInline"] = "radioInline";
2068
2183
  FormFieldTypeEnum["radioButton"] = "radioButton";
2184
+ FormFieldTypeEnum["radioCard"] = "radioCard";
2185
+ FormFieldTypeEnum["radioCardCompact"] = "radioCardCompact";
2069
2186
  FormFieldTypeEnum["checkbox"] = "checkbox";
2070
2187
  FormFieldTypeEnum["checkboxInline"] = "checkboxInline";
2071
2188
  FormFieldTypeEnum["checkboxButton"] = "checkboxButton";
2189
+ FormFieldTypeEnum["checkboxCard"] = "checkboxCard";
2190
+ FormFieldTypeEnum["checkboxCardCompact"] = "checkboxCardCompact";
2072
2191
  FormFieldTypeEnum["switch"] = "switch";
2073
2192
  FormFieldTypeEnum["switchSmall"] = "switchSmall";
2193
+ FormFieldTypeEnum["switchCard"] = "switchCard";
2194
+ FormFieldTypeEnum["switchCardCompact"] = "switchCardCompact";
2074
2195
  FormFieldTypeEnum["ngSelect"] = "ngSelect";
2075
2196
  FormFieldTypeEnum["ngSelectMultiple"] = "ngSelectMultiple";
2076
2197
  FormFieldTypeEnum["number"] = "number";
@@ -3292,7 +3413,7 @@ class FilePreviewComponent {
3292
3413
  });
3293
3414
  }
3294
3415
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3295
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FilePreviewComponent, isStandalone: true, selector: "cw-file-preview", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, existingFile: { classPropertyName: "existingFile", publicName: "existingFile", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, ngImport: i0, template: "@if (name()) {\n <figure class=\"file-preview\" [attr.data-test-ctw]=\"dataTest() || null\">\n <div class=\"file-preview-tile\" [class.file-preview-tile-icon]=\"!isImage() || !url()\">\n @if (isImage() && url(); as source) {\n <img class=\"file-preview-img\" [src]=\"source\" [alt]=\"name()\" />\n } @else {\n <!-- Pas de miniature possible (pdf, doc, archive\u2026) : picto de la famille d'extension. -->\n <cw-icon [icon]=\"icon()\" [iconSize]=\"iconSize['2xl']\" />\n }\n\n @if (showActions()) {\n <div class=\"file-preview-actions\">\n @if (url(); as href) {\n <!-- Vrai lien : c'est une navigation, pas une commande. Reste correct au clavier,\n annonce comme lien, et ouvrable dans un onglet par le menu contextuel.\n `cw-button` n'est pas utilisable ici : son input `link` pose un `routerLink`\n (route interne), pas un href externe ouvert dans un onglet. On reprend donc\n a la main les classes qu'il aurait emises, pour un rendu strictement identique. -->\n <a class=\"btn btn-secondary btn-icon btn-icon-xsmall\" [href]=\"href\" target=\"_blank\" rel=\"noopener\"\n [attr.aria-label]=\"'_COMMON._ACTION.VIEW' | translate\">\n <cw-icon [icon]=\"spriteIcon.newWindow\" [iconSize]=\"iconSize.xs\" />\n </a>\n }\n\n <cw-button [type]=\"buttonType.secondary\" [withIcon]=\"spriteIcon.trash\" [withOnlyIcon]=\"true\"\n [iconSize]=\"buttonIconSize.xsmall\" [label]=\"'_COMMON._ACTION.DELETE'\"\n [isDisabled]=\"disabled()\" (btnAction)=\"remove.emit()\" />\n </div>\n }\n </div>\n\n <figcaption class=\"file-preview-meta\">\n <span class=\"file-preview-name\">{{ name() }}</span>\n\n <span class=\"file-preview-info\">\n @if (extension()) {\n <span>{{ extension().toUpperCase() }}</span>\n }\n @if (sizeInBytes(); as bytes) {\n <span>{{ bytes | formatFileSize }}</span>\n }\n </span>\n </figcaption>\n </figure>\n}\n", dependencies: [{ kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3416
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FilePreviewComponent, isStandalone: true, selector: "cw-file-preview", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, existingFile: { classPropertyName: "existingFile", publicName: "existingFile", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, ngImport: i0, template: "@if (name()) {\n <figure class=\"file-preview\" [attr.data-test-ctw]=\"dataTest() || null\">\n <div class=\"file-preview-tile\" [class.file-preview-tile-icon]=\"!isImage() || !url()\">\n @if (isImage() && url(); as source) {\n <img class=\"file-preview-img\" [src]=\"source\" [alt]=\"name()\" />\n } @else {\n <!-- Pas de miniature possible (pdf, doc, archive\u2026) : picto de la famille d'extension. -->\n <cw-icon [icon]=\"icon()\" [iconSize]=\"iconSize['2xl']\" />\n }\n\n @if (showActions()) {\n <div class=\"file-preview-actions\">\n @if (url(); as href) {\n <!-- Vrai lien : c'est une navigation, pas une commande. Reste correct au clavier,\n annonce comme lien, et ouvrable dans un onglet par le menu contextuel.\n `cw-button` n'est pas utilisable ici : son input `link` pose un `routerLink`\n (route interne), pas un href externe ouvert dans un onglet. On reprend donc\n a la main les classes qu'il aurait emises, pour un rendu strictement identique. -->\n <a class=\"btn btn-secondary btn-icon btn-icon-xsmall\" [href]=\"href\" target=\"_blank\" rel=\"noopener\"\n [attr.aria-label]=\"'_COMMON._ACTION.VIEW' | translate\">\n <cw-icon [icon]=\"spriteIcon.newWindow\" [iconSize]=\"iconSize.xs\" />\n </a>\n }\n\n <cw-button [type]=\"buttonType.secondary\" [withIcon]=\"spriteIcon.trash\" [withOnlyIcon]=\"true\"\n [iconSize]=\"buttonIconSize.xsmall\" [label]=\"'_COMMON._ACTION.DELETE'\"\n [isDisabled]=\"disabled()\" (btnAction)=\"remove.emit()\" />\n </div>\n }\n </div>\n\n <figcaption class=\"file-preview-meta\">\n <span class=\"file-preview-name\">{{ name() }}</span>\n\n <span class=\"file-preview-info\">\n @if (extension()) {\n <span>{{ extension().toUpperCase() }}</span>\n }\n @if (sizeInBytes(); as bytes) {\n <span>{{ bytes | formatFileSize }}</span>\n }\n </span>\n </figcaption>\n </figure>\n}\n", dependencies: [{ kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { 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: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3296
3417
  }
3297
3418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FilePreviewComponent, decorators: [{
3298
3419
  type: Component,
@@ -3458,6 +3579,28 @@ class FormFieldComponent {
3458
3579
  return (this.type === this.typeField.checkbox || this.type === this.typeField.checkboxInline)
3459
3580
  && (!this.options || this.options.length === 0);
3460
3581
  }
3582
+ /** Types « carte » : checkbox, radio et switch partagent le même rendu (contrôle, titre, description). */
3583
+ get isChoiceCard() {
3584
+ return this.isRadioCard || this.isMultiChoiceCard;
3585
+ }
3586
+ /** Variante compacte : titre seul, cartes en grille. */
3587
+ get isChoiceCardCompact() {
3588
+ return this.type === this.typeField.checkboxCardCompact
3589
+ || this.type === this.typeField.radioCardCompact
3590
+ || this.type === this.typeField.switchCardCompact;
3591
+ }
3592
+ get isRadioCard() {
3593
+ return this.type === this.typeField.radioCard || this.type === this.typeField.radioCardCompact;
3594
+ }
3595
+ get isSwitchCard() {
3596
+ return this.type === this.typeField.switchCard || this.type === this.typeField.switchCardCompact;
3597
+ }
3598
+ /** Checkbox et switch en cartes : sélection multiple, la valeur du control est un tableau. */
3599
+ get isMultiChoiceCard() {
3600
+ return this.type === this.typeField.checkboxCard
3601
+ || this.type === this.typeField.checkboxCardCompact
3602
+ || this.isSwitchCard;
3603
+ }
3461
3604
  get isRange() {
3462
3605
  if (!this.control)
3463
3606
  return false;
@@ -3588,16 +3731,16 @@ class FormFieldComponent {
3588
3731
  ?.map(a => a.startsWith('.') ? a.slice(1).toUpperCase() : a)
3589
3732
  .join(', ') ?? '';
3590
3733
  }
3734
+ /** Bouton d'aide rendu seulement si une aide est fournie et le libellé visible. */
3591
3735
  /**
3592
- * Lignes d'aide auto-générées à partir de `validationOptions`, affichées après le `help` input.
3593
- * Couvre : longueur min/max sur les types texte, valeur min/max sur number, et accept/maxSize sur file.
3594
- */
3595
- /**
3596
- * Concatène les ids à exposer dans `aria-describedby` :
3597
- * l'id du bloc d'erreur (si le control est invalide+touched) et l'id du bloc help (si présent).
3598
- * Retourne `null` si aucun, pour ne pas polluer le DOM avec un attribut vide.
3736
+ * Période (dateToDate / timeToTime / dateTimeToDateTime sur un FormGroup `{ start, end }`) :
3737
+ * rendue en `<fieldset>` dont le `<legend>` porte le libellé, « Du » / « au » étant les
3738
+ * `<label>` des deux inputs (un `<label for>` unique ne peut pas nommer deux champs).
3599
3739
  */
3600
- /** Bouton d'aide rendu seulement si une aide est fournie et le libellé visible. */
3740
+ get isPeriod() {
3741
+ return [FormFieldTypeEnum.dateToDate, FormFieldTypeEnum.timeToTime, FormFieldTypeEnum.dateTimeToDateTime]
3742
+ .includes(this.type) && this.isRange;
3743
+ }
3601
3744
  get hasFieldTooltip() {
3602
3745
  return !!this.tooltip && this.displayLabel;
3603
3746
  }
@@ -3605,6 +3748,11 @@ class FormFieldComponent {
3605
3748
  get legendId() {
3606
3749
  return `${this.name}-legend`;
3607
3750
  }
3751
+ /**
3752
+ * Concatène les ids à exposer dans `aria-describedby` : l'id du bloc d'erreur (si le control
3753
+ * est invalide+touched), l'id du bloc help (si présent) puis les ids fournis par l'écran
3754
+ * (`ariaDescribedBy`). Retourne `null` si aucun, pour ne pas polluer le DOM avec un attribut vide.
3755
+ */
3608
3756
  getDescribedBy(target) {
3609
3757
  const ids = [];
3610
3758
  if (target?.invalid && target?.touched) {
@@ -3613,8 +3761,15 @@ class FormFieldComponent {
3613
3761
  if (this.help || this.autoHelpEntries.length) {
3614
3762
  ids.push(`${this.name}-help`);
3615
3763
  }
3764
+ if (this.ariaDescribedBy) {
3765
+ ids.push(...this.ariaDescribedBy.split(/\s+/).filter(Boolean));
3766
+ }
3616
3767
  return ids.length ? ids.join(' ') : null;
3617
3768
  }
3769
+ /**
3770
+ * Lignes d'aide auto-générées à partir de `validationOptions`, affichées après le `help` input.
3771
+ * Couvre : longueur min/max sur les types texte, valeur min/max sur number, et accept/maxSize sur file.
3772
+ */
3618
3773
  get autoHelpEntries() {
3619
3774
  const entries = [];
3620
3775
  const opts = this.validationOptions;
@@ -3663,7 +3818,7 @@ class FormFieldComponent {
3663
3818
  group.setValidators(g => rangeValidator(g, 'datetime'));
3664
3819
  break;
3665
3820
  }
3666
- group.updateValueAndValidity();
3821
+ group.updateValueAndValidity({ emitEvent: false });
3667
3822
  }
3668
3823
  }
3669
3824
  // Pour `type=file`, on applique TOUJOURS les validators Angular dès qu'au moins
@@ -3678,9 +3833,11 @@ class FormFieldComponent {
3678
3833
  if (opts?.applyValidators || fileHasValidationOpts) {
3679
3834
  this.applyAngularValidators();
3680
3835
  }
3836
+ // Les recalculs de validite poses par le composant (ici et dans les helpers de validators)
3837
+ // passent `emitEvent: false` : la valeur n'a pas change, `valueChanges` ne doit pas emettre.
3681
3838
  if (this.type === this.typeField.email && this.control && !this.control.hasValidator(Validators.email)) {
3682
3839
  this.control.addValidators(Validators.email);
3683
- this.control.updateValueAndValidity();
3840
+ this.control.updateValueAndValidity({ emitEvent: false });
3684
3841
  }
3685
3842
  this.syncRequiredValidator();
3686
3843
  this.syncDisabledState();
@@ -3722,14 +3879,14 @@ class FormFieldComponent {
3722
3879
  if (this.isRequired) {
3723
3880
  if (!ctrl.hasValidator(Validators.required)) {
3724
3881
  ctrl.addValidators(Validators.required);
3725
- ctrl.updateValueAndValidity();
3882
+ ctrl.updateValueAndValidity({ emitEvent: false });
3726
3883
  return true;
3727
3884
  }
3728
3885
  return alreadyApplied;
3729
3886
  }
3730
3887
  if (alreadyApplied) {
3731
3888
  ctrl.removeValidators(Validators.required);
3732
- ctrl.updateValueAndValidity();
3889
+ ctrl.updateValueAndValidity({ emitEvent: false });
3733
3890
  return false;
3734
3891
  }
3735
3892
  return false;
@@ -3783,16 +3940,16 @@ class FormFieldComponent {
3783
3940
  const endCtrl = this.getControl('end');
3784
3941
  if (startCtrl && startValidators.length) {
3785
3942
  startCtrl.addValidators(startValidators);
3786
- startCtrl.updateValueAndValidity();
3943
+ startCtrl.updateValueAndValidity({ emitEvent: false });
3787
3944
  }
3788
3945
  if (endCtrl && endValidators.length) {
3789
3946
  endCtrl.addValidators(endValidators);
3790
- endCtrl.updateValueAndValidity();
3947
+ endCtrl.updateValueAndValidity({ emitEvent: false });
3791
3948
  }
3792
3949
  }
3793
3950
  else if (validators.length && this.control) {
3794
3951
  this.control.addValidators(validators);
3795
- this.control.updateValueAndValidity();
3952
+ this.control.updateValueAndValidity({ emitEvent: false });
3796
3953
  }
3797
3954
  }
3798
3955
  /** Validator d'extension/MIME : vérifie que le File ou son nom matche l'une des entrées `accept`. */
@@ -3994,6 +4151,7 @@ class FormFieldComponent {
3994
4151
  else {
3995
4152
  this.control.setValue(valueArray.filter((v) => v !== checkbox.value));
3996
4153
  }
4154
+ this.control.markAsDirty();
3997
4155
  this.control.markAsTouched();
3998
4156
  this.valueChange.emit(this.control.value);
3999
4157
  }
@@ -4230,7 +4388,7 @@ class FormFieldComponent {
4230
4388
  this.formControl.markAsTouched();
4231
4389
  }
4232
4390
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FormFieldComponent, isStandalone: true, selector: "cw-form-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: false, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, displayLabel: { classPropertyName: "displayLabel", publicName: "displayLabel", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, rangeOptions: { classPropertyName: "rangeOptions", publicName: "rangeOptions", isSignal: false, isRequired: false, transformFunction: null }, validationOptions: { classPropertyName: "validationOptions", publicName: "validationOptions", isSignal: false, isRequired: false, transformFunction: null }, autocompleteOptions: { classPropertyName: "autocompleteOptions", publicName: "autocompleteOptions", isSignal: false, isRequired: false, transformFunction: null }, richTextOptions: { classPropertyName: "richTextOptions", publicName: "richTextOptions", isSignal: false, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: false, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null }, addonLeft: { classPropertyName: "addonLeft", publicName: "addonLeft", isSignal: false, isRequired: false, transformFunction: null }, addonRight: { classPropertyName: "addonRight", publicName: "addonRight", isSignal: false, isRequired: false, transformFunction: null }, isInAddon: { classPropertyName: "isInAddon", publicName: "isInAddon", isSignal: false, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: false, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: false, isRequired: false, transformFunction: null }, sliderValue: { classPropertyName: "sliderValue", publicName: "sliderValue", isSignal: false, isRequired: false, transformFunction: null }, sliderOptions: { classPropertyName: "sliderOptions", publicName: "sliderOptions", isSignal: false, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: false, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: false, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, initialCountry: { classPropertyName: "initialCountry", publicName: "initialCountry", isSignal: false, isRequired: false, transformFunction: null }, recommendedDimensions: { classPropertyName: "recommendedDimensions", publicName: "recommendedDimensions", isSignal: false, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: false, isRequired: false, transformFunction: null }, existingFile: { classPropertyName: "existingFile", publicName: "existingFile", isSignal: false, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refreshEvent: "refreshEvent", fileRemoved: "fileRemoved", textChanged: "textChanged", valueChange: "valueChange", phoneRegionChange: "phoneRegionChange" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "optionTemplate", first: true, predicate: ["ngOptionTpl"], descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: ["ngLabelTpl"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "checkboxInputRef", first: true, predicate: ["checkboxInput"], descendants: true, isSignal: true }, { propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }, { propertyName: "phoneInputRef", first: true, predicate: ["phoneInput"], descendants: true, isSignal: true }, { propertyName: "autocompleteRef", first: true, predicate: AutocompleteComponent, descendants: true, isSignal: true }, { propertyName: "ngSelectRef", first: true, predicate: NgSelectComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!isInAddon) {\n @if (\n type !== typeField.checkbox &&\n type !== typeField.radio &&\n type !== typeField.checkboxButton &&\n type !== typeField.radioButton &&\n type !== typeField.checkboxInline &&\n type !== typeField.radioInline &&\n type !== typeField.switch &&\n type !== typeField.range &&\n type !== typeField.switchSmall\n ) {\n <!-- Bouton d'aide HORS du <label> (bouton dans un label = HTML invalide, son libelle\n polluerait le nom accessible du champ et un clic activerait le label) : on aligne\n label + bouton dans un conteneur flex, seulement quand il y a une aide. -->\n @if (hasFieldTooltip) {\n <div class=\"d-flex-h gap-2xs\">\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n }\n }\n\n @if (addonLeft || addonRight) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n @if(addonLeft) {\n <div class=\"field-group-addon-left\">\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n @if(addonRight) {\n <div class=\"field-group-addon-right\">\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\n </div>\n }\n </div>\n }\n @else {\n @if ( isInInputGroup() ) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n </div>\n }\n @else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n }\n }\n\n <!-- Error message -->\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\n @if (\n !errorMessages?.['required'] &&\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\n ) {\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate}\"></span>\n }\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\n }\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\n }\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\n }\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\n }\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\n }\n @if (errorMessages) {\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\n }\n }\n }\n </div>\n }\n\n @if (help || autoHelpEntries.length) {\n <div [id]=\"name + '-help'\" class=\"field-text\">\n @if (help) {\n <span>{{ help | translate }}</span>\n }\n @for (entry of autoHelpEntries; track entry.key) {\n <!-- Espace explicite : les blancs entre balises sont supprim\u00E9s \u00E0 la compilation. -->\n {{ ' ' }}<span>{{ entry.key | translate: entry.params }}</span>\n }\n </div>\n }\n\n <!-- Aper\u00E7u du fichier (type=file, opt-in) : sous le champ et ses aides, comme dans la\n maquette DS. La croix native du champ n'est pas retir\u00E9e \u2014 les deux vident le m\u00EAme\n control, l'aper\u00E7u ajoute juste \u00AB Visualiser \u00BB et une cible plus grande. -->\n @if (isPreviewVisible) {\n <cw-file-preview [file]=\"previewFile\" [existingFile]=\"existingFile ?? null\"\n [disabled]=\"!!isDisabledOrReadonly\" (remove)=\"onPreviewRemove()\" />\n }\n\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\n <ul class=\"autocomplete-chips\" role=\"list\">\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\n <li>\n <button type=\"button\" class=\"autocomplete-chip\"\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\n <span>{{ chip.label }}</span>\n @if (!isEffectivelyDisabled && !isReadonly) {\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n}\n@else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n}\n\n<ng-template #field>\n <!-- Autocomplete (mono / multi) -->\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\n <cw-autocomplete\n [id]=\"name\"\n [control]=\"formControl\"\n [fetcher]=\"autocompleteOptions.fetcher\"\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\n [columns]=\"autocompleteOptions.columns ?? []\"\n [resolver]=\"autocompleteOptions.resolver ?? null\"\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\n [multiple]=\"type === typeField.autocompleteMultiple\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\"\n [placeholder]=\"placeholder\">\n </cw-autocomplete>\n }\n\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\n @if (type === typeField.richText) {\n <cw-rich-text-editor\n [id]=\"name\"\n [control]=\"formControl\"\n [options]=\"richTextOptions\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\">\n </cw-rich-text-editor>\n }\n\n <!-- Text -->\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\n typeField.email,\n typeField.color, typeField.zipCode].includes(type)) {\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n <!-- Phone (intl-tel-input) -->\n @if (type === typeField.phone) {\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\n }\n\n <!-- File -->\n @if (type === typeField.file) {\n <!-- L'input natif reste LE controle (focus, clavier, restitution aux lecteurs d'ecran,\n validation), mais il est masque visuellement : le libelle de son bouton et son\n \u00AB aucun fichier choisi \u00BB sont ecrits par le NAVIGATEUR, dans SA langue. Ils sont\n intraduisibles et ne suivent pas la langue de l'application \u2014 un utilisateur qui\n bascule en anglais garderait \u00AB Choisir un fichier \u00BB. On les reecrit donc a cote,\n traduits, dans une couche purement visuelle. -->\n <input #fileInput type=\"file\" class=\"field-control visually-hidden\" [id]=\"name\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.accept]=\"acceptAttr\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n <!-- `aria-hidden` : doublon visuel de l'input, que les lecteurs d'ecran restituent deja\n (nom du champ, bouton de parcours, fichier selectionne). L'annoncer une seconde fois\n ne ferait que bavarder. Le clic est relaye a l'input, le clavier passe par lui. -->\n <span class=\"field-file\" aria-hidden=\"true\" (click)=\"openFilePicker()\">\n <span class=\"field-file-button\">{{ '_COMMON._FORM.CHOOSE_FILE' | translate }}</span>\n <span class=\"field-file-name\" [class.field-file-name-empty]=\"!selectedFileName\">\n {{ selectedFileName ?? ('_COMMON._FORM.NO_FILE_SELECTED' | translate) }}\n </span>\n </span>\n }\n\n @if (type === typeField.password) {\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n <cw-button [type]=\"buttonType.ghost\"\n cssClass=\"btn-password-field\"\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\n [withOnlyIcon]=\"true\"\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\n (btnAction)=\"togglePasswordVisibility()\">\n </cw-button>\n }\n\n <!-- Textarea -->\n @if (type === typeField.textarea) {\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\n }\n\n <!-- Select -->\n @if (type === typeField.select) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\">\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- NgSelect -->\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\"\n (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- Radio -->\n @if (type === typeField.radioInline || type === typeField.radio) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\">\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Radio button -->\n @if (type === typeField.radioButton) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n\n <!-- Checkbox Switch -->\n @if ( type === typeField.switch || type === typeField.switchSmall)\n {\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate }}</label>\n </div>\n }\n\n <!-- Checkbox -->\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\n @if (isSingleCheckbox()) {\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [class.is-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\n <label [for]=\"name\" class=\"field-check-label\">\n {{ label | translate }}\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </div>\n }\n @else if( options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n }\n\n <!-- Checkbox button -->\n @if (type === typeField.checkboxButton && options.length > 0) {\n\n @if(options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"btn-group btn-group-secondary\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\n {{ opt.label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n }\n </div>\n </fieldset>\n }\n }\n\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\n @if ([typeField.dateToDate, typeField.timeToTime, typeField.dateTimeToDateTime].includes(type) && isRange) {\n\n <div class=\"field-group\">\n <div class=\"field-group-addon-left\">Du</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\n (focus)=\"onFocusRange('start')\" (blur)=\"onBlurRange('start')\" />\n\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\n (click)=\"onClearFieldPeriod('start')\">\n &times;\n </button>\n }\n <div class=\"field-group-addon-center\">au</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\n (focus)=\"onFocusRange('end')\" (blur)=\"onBlurRange('end')\" />\n\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\n (click)=\"onClearFieldPeriod('end')\">\n &times;\n </button>\n }\n </div>\n }\n\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\n\n <div class=\"field-group\">\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-left\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\n </button>\n </div>\n }\n\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n @if(formControl?.value && !isDisabledOrReadonly) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n\n\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\n </button>\n </div>\n }\n\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J\n <span class=\"visually-hidden\">Aujourd'hui</span>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+1\n <span class=\"visually-hidden\">Demain</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+2\n <span class=\"visually-hidden\">Dans 2 jours</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusTwo) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+7\n <span class=\"visually-hidden\">Dans 7 jours</span>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (type === typeField.slider) {\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\n }\n\n @if (type === typeField.range) {\n <div class=\"slider\">\n\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\n </cw-button>\n\n <div class=\"slider-input\">\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ label | translate }} {{ formControl.value }}\n @if (rangeOptions.unit) {\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\n }\n </label>\n\n <div class=\"slider-custom-bar\">\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\n </div>\n </div>\n\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\">\n </div>\n\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\n </cw-button>\n </div>\n }\n\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\n @if (type === typeField.autocomplete) {\n @if (autocompleteRef()?.hasAnyContent()) {\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\n (click)=\"onClearAutocomplete()\">&times;</button>\n }\n } @else if (type === typeField.ngSelectMultiple) {\n <!-- value est un tableau : un [] vide \u00E9tant truthy, on teste .length pour n'afficher le clear global que s'il y a au moins une s\u00E9lection. -->\n @if (formControl?.value?.length) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n } @else {\n @if(formControl?.value) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n }\n }\n\n</ng-template>\n\n<ng-template #fieldLabel>\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{ label | translate }}\n\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n</ng-template>\n\n<!-- Bouton d'aide (tooltip) partage label/legend. Hors du <label> (sinon son libelle\n s'ajoute au nom du champ et le clic active le label) ; dans un <legend>, le fieldset\n est nomme par aria-labelledby sur le seul texte (legendId) pour la meme raison. -->\n<ng-template #fieldTooltip>\n <button type=\"button\" class=\"btn btn-ghost btn-field-tooltip\"\n [cwTooltip]=\"tooltip ?? ''\"\n [attr.data-test-ctw]=\"'tooltip-' + name\">\n <cw-icon [icon]=\"spriteIcon.alertHelp\" [type]=\"iconType.circular\" [iconUiType]=\"iconUiType.info\"\n [iconSize]=\"iconSize.xs\" [label]=\"'_COMMON._FORM.TOOLTIP_HELP' | translate\"></cw-icon>\n </button>\n</ng-template>\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: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "tabFocusOnClearButton", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i3.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i3.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "ngmodule", type: NgxSliderModule }, { kind: "component", type: i4.SliderComponent, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus", "cancelUserChange"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "directive", type: CwTooltipDirective, selector: "[cwTooltip]", inputs: ["cwTooltip", "cwTooltipTitle", "cwTooltipType", "cwTooltipTrigger", "cwTooltipPosition", "cwTooltipDisabled"] }, { kind: "component", type: AutocompleteComponent, selector: "cw-autocomplete", inputs: ["control", "fetcher", "displayField", "valueField", "columns", "multiple", "minChars", "debounceMs", "selectedItem", "resolver", "selectedItems", "placeholder", "id", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["itemSelected", "itemsChange"] }, { kind: "component", type: RichTextEditorComponent, selector: "cw-rich-text-editor", inputs: ["control", "options", "id", "placeholder", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["valueChange"] }, { kind: "component", type: FilePreviewComponent, selector: "cw-file-preview", inputs: ["file", "existingFile", "showActions", "disabled", "dataTest"], outputs: ["remove"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
4391
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FormFieldComponent, isStandalone: true, selector: "cw-form-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: false, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, displayLabel: { classPropertyName: "displayLabel", publicName: "displayLabel", isSignal: false, isRequired: false, transformFunction: null }, fieldTitle: { classPropertyName: "fieldTitle", publicName: "fieldTitle", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, rangeOptions: { classPropertyName: "rangeOptions", publicName: "rangeOptions", isSignal: false, isRequired: false, transformFunction: null }, validationOptions: { classPropertyName: "validationOptions", publicName: "validationOptions", isSignal: false, isRequired: false, transformFunction: null }, autocompleteOptions: { classPropertyName: "autocompleteOptions", publicName: "autocompleteOptions", isSignal: false, isRequired: false, transformFunction: null }, richTextOptions: { classPropertyName: "richTextOptions", publicName: "richTextOptions", isSignal: false, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: false, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: false, isRequired: false, transformFunction: null }, addonLeft: { classPropertyName: "addonLeft", publicName: "addonLeft", isSignal: false, isRequired: false, transformFunction: null }, addonRight: { classPropertyName: "addonRight", publicName: "addonRight", isSignal: false, isRequired: false, transformFunction: null }, isInAddon: { classPropertyName: "isInAddon", publicName: "isInAddon", isSignal: false, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: false, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: false, isRequired: false, transformFunction: null }, sliderValue: { classPropertyName: "sliderValue", publicName: "sliderValue", isSignal: false, isRequired: false, transformFunction: null }, sliderOptions: { classPropertyName: "sliderOptions", publicName: "sliderOptions", isSignal: false, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: false, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: false, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, initialCountry: { classPropertyName: "initialCountry", publicName: "initialCountry", isSignal: false, isRequired: false, transformFunction: null }, recommendedDimensions: { classPropertyName: "recommendedDimensions", publicName: "recommendedDimensions", isSignal: false, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: false, isRequired: false, transformFunction: null }, existingFile: { classPropertyName: "existingFile", publicName: "existingFile", isSignal: false, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refreshEvent: "refreshEvent", fileRemoved: "fileRemoved", textChanged: "textChanged", valueChange: "valueChange", phoneRegionChange: "phoneRegionChange" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "optionTemplate", first: true, predicate: ["ngOptionTpl"], descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: ["ngLabelTpl"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "checkboxInputRef", first: true, predicate: ["checkboxInput"], descendants: true, isSignal: true }, { propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }, { propertyName: "phoneInputRef", first: true, predicate: ["phoneInput"], descendants: true, isSignal: true }, { propertyName: "autocompleteRef", first: true, predicate: AutocompleteComponent, descendants: true, isSignal: true }, { propertyName: "ngSelectRef", first: true, predicate: NgSelectComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!isInAddon) {\n @if (\n type !== typeField.checkbox &&\n type !== typeField.radio &&\n type !== typeField.checkboxButton &&\n type !== typeField.radioButton &&\n type !== typeField.checkboxInline &&\n type !== typeField.radioInline &&\n type !== typeField.switch &&\n type !== typeField.range &&\n type !== typeField.switchSmall &&\n !isChoiceCard &&\n !isPeriod\n ) {\n <!-- Bouton d'aide HORS du <label> (bouton dans un label = HTML invalide, son libelle\n polluerait le nom accessible du champ et un clic activerait le label) : on aligne\n label + bouton dans un conteneur flex, seulement quand il y a une aide. -->\n @if (hasFieldTooltip) {\n <div class=\"d-flex-h gap-2xs\">\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n }\n }\n\n @if (addonLeft || addonRight) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n @if(addonLeft) {\n <div class=\"field-group-addon-left\">\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n @if(addonRight) {\n <div class=\"field-group-addon-right\">\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\n </div>\n }\n </div>\n }\n @else {\n @if ( isInInputGroup() ) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n </div>\n }\n @else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n }\n }\n\n <!-- Error message -->\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\n @if (\n !errorMessages?.['required'] &&\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\n ) {\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate}\"></span>\n }\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\n }\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\n }\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\n }\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\n }\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\n }\n @if (errorMessages) {\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\n }\n }\n }\n </div>\n }\n\n @if (help || autoHelpEntries.length) {\n <div [id]=\"name + '-help'\" class=\"field-text\">\n @if (help) {\n <span>{{ help | translate }}</span>\n }\n @for (entry of autoHelpEntries; track entry.key) {\n <!-- Espace explicite : les blancs entre balises sont supprim\u00E9s \u00E0 la compilation. -->\n {{ ' ' }}<span>{{ entry.key | translate: entry.params }}</span>\n }\n </div>\n }\n\n <!-- Aper\u00E7u du fichier (type=file, opt-in) : sous le champ et ses aides, comme dans la\n maquette DS. La croix native du champ n'est pas retir\u00E9e \u2014 les deux vident le m\u00EAme\n control, l'aper\u00E7u ajoute juste \u00AB Visualiser \u00BB et une cible plus grande. -->\n @if (isPreviewVisible) {\n <cw-file-preview [file]=\"previewFile\" [existingFile]=\"existingFile ?? null\"\n [disabled]=\"!!isDisabledOrReadonly\" (remove)=\"onPreviewRemove()\" />\n }\n\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\n <ul class=\"autocomplete-chips\" role=\"list\">\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\n <li>\n <button type=\"button\" class=\"autocomplete-chip\"\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\n <span>{{ chip.label }}</span>\n @if (!isEffectivelyDisabled && !isReadonly) {\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n}\n@else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n}\n\n<ng-template #field>\n <!-- Autocomplete (mono / multi) -->\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\n <cw-autocomplete\n [id]=\"name\"\n [control]=\"formControl\"\n [fetcher]=\"autocompleteOptions.fetcher\"\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\n [columns]=\"autocompleteOptions.columns ?? []\"\n [resolver]=\"autocompleteOptions.resolver ?? null\"\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\n [multiple]=\"type === typeField.autocompleteMultiple\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\"\n [placeholder]=\"placeholder\">\n </cw-autocomplete>\n }\n\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\n @if (type === typeField.richText) {\n <cw-rich-text-editor\n [id]=\"name\"\n [control]=\"formControl\"\n [options]=\"richTextOptions\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\">\n </cw-rich-text-editor>\n }\n\n <!-- Text -->\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\n typeField.email,\n typeField.color, typeField.zipCode].includes(type)) {\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n <!-- Phone (intl-tel-input) -->\n @if (type === typeField.phone) {\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\n }\n\n <!-- File -->\n @if (type === typeField.file) {\n <!-- L'input natif reste LE controle (focus, clavier, restitution aux lecteurs d'ecran,\n validation), mais il est masque visuellement : le libelle de son bouton et son\n \u00AB aucun fichier choisi \u00BB sont ecrits par le NAVIGATEUR, dans SA langue. Ils sont\n intraduisibles et ne suivent pas la langue de l'application \u2014 un utilisateur qui\n bascule en anglais garderait \u00AB Choisir un fichier \u00BB. On les reecrit donc a cote,\n traduits, dans une couche purement visuelle. -->\n <input #fileInput type=\"file\" class=\"field-control visually-hidden\" [id]=\"name\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.accept]=\"acceptAttr\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n <!-- `aria-hidden` : doublon visuel de l'input, que les lecteurs d'ecran restituent deja\n (nom du champ, bouton de parcours, fichier selectionne). L'annoncer une seconde fois\n ne ferait que bavarder. Le clic est relaye a l'input, le clavier passe par lui. -->\n <span class=\"field-file\" aria-hidden=\"true\" (click)=\"openFilePicker()\">\n <span class=\"field-file-button\">{{ '_COMMON._FORM.CHOOSE_FILE' | translate }}</span>\n <span class=\"field-file-name\" [class.field-file-name-empty]=\"!selectedFileName\">\n {{ selectedFileName ?? ('_COMMON._FORM.NO_FILE_SELECTED' | translate) }}\n </span>\n </span>\n }\n\n @if (type === typeField.password) {\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n <cw-button [type]=\"buttonType.ghost\"\n cssClass=\"btn-password-field\"\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\n [withOnlyIcon]=\"true\"\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\n (btnAction)=\"togglePasswordVisibility()\">\n </cw-button>\n }\n\n <!-- Textarea -->\n @if (type === typeField.textarea) {\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\n }\n\n <!-- Select -->\n @if (type === typeField.select) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\">\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- NgSelect -->\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\"\n (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- Radio -->\n @if (type === typeField.radioInline || type === typeField.radio) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\">\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Radio button -->\n @if (type === typeField.radioButton) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n\n <!-- Cartes : checkbox / radio / switch (contr\u00F4le \u00E0 gauche, titre, description facultative) -->\n @if (isChoiceCard) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"field-card-list list-unstyled mb-none\" [class.field-card-list-compact]=\"isChoiceCardCompact\">\n @for (opt of options; track opt.value) {\n <li class=\"d-flex-v\">\n <!-- Le label englobe toute la carte : un clic n'importe o\u00F9 coche l'option. -->\n <label class=\"field-card d-flex-h items-start gap-xs flex-1\" [for]=\"name + '_' + opt.value\" [class.field-switch]=\"isSwitchCard\" [class.field-switch-small]=\"isSwitchCard\">\n @if (isRadioCard) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n } @else {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.role]=\"isSwitchCard ? 'switch' : null\"\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n }\n <span class=\"d-flex-v gap-5xs\">\n <span class=\"field-card-title\">{{ opt.label | translate }}</span>\n @if (!isChoiceCardCompact && opt.description) {\n <span class=\"field-text\" [id]=\"name + '_' + opt.value + '-desc'\">{{ opt.description | translate }}</span>\n }\n </span>\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Checkbox Switch -->\n @if ( type === typeField.switch || type === typeField.switchSmall)\n {\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate }}</label>\n </div>\n }\n\n <!-- Checkbox -->\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\n @if (isSingleCheckbox()) {\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [class.is-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\n <label [for]=\"name\" class=\"field-check-label\">\n {{ label | translate }}\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </div>\n }\n @else if( options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n }\n\n <!-- Checkbox button -->\n @if (type === typeField.checkboxButton && options.length > 0) {\n\n @if(options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"btn-group btn-group-secondary\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\n {{ opt.label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n }\n </div>\n </fieldset>\n }\n }\n\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\n @if (isPeriod) {\n <!-- Fieldset : le legend nomme la p\u00E9riode, \u00AB Du \u00BB / \u00AB au \u00BB sont les labels de chaque input. -->\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group\">\n <label class=\"field-group-addon-left\" [for]=\"name + '_start'\">{{ '_COMMON._DATES.FROM_TO_1' | translate }}</label>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_1' | translate) : null\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\n (focus)=\"onFocusRange('start')\" (blur)=\"onBlurRange('start')\" />\n\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_START' | translate: { label: label | translate }\"\n (click)=\"onClearFieldPeriod('start')\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n }\n <label class=\"field-group-addon-center\" [for]=\"name + '_end'\">{{ '_COMMON._DATES.FROM_TO_2' | translate }}</label>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_2' | translate) : null\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\n (focus)=\"onFocusRange('end')\" (blur)=\"onBlurRange('end')\" />\n\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_END' | translate: { label: label | translate }\"\n (click)=\"onClearFieldPeriod('end')\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n }\n </div>\n </fieldset>\n }\n\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\n\n <div class=\"field-group\">\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-left\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\n </button>\n </div>\n }\n\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n @if(formControl?.value && !isDisabledOrReadonly) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\n }\n\n\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\n </button>\n </div>\n }\n\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J\n <span class=\"visually-hidden\">Aujourd'hui</span>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+1\n <span class=\"visually-hidden\">Demain</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+2\n <span class=\"visually-hidden\">Dans 2 jours</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusTwo) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+7\n <span class=\"visually-hidden\">Dans 7 jours</span>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (type === typeField.slider) {\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\n }\n\n @if (type === typeField.range) {\n <div class=\"slider\">\n\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\n </cw-button>\n\n <div class=\"slider-input\">\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ label | translate }} {{ formControl.value }}\n @if (rangeOptions.unit) {\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\n }\n </label>\n\n <div class=\"slider-custom-bar\">\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\n </div>\n </div>\n\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\">\n </div>\n\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\n </cw-button>\n </div>\n }\n\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\n @if (type === typeField.autocomplete) {\n @if (autocompleteRef()?.hasAnyContent()) {\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearAutocomplete()\"><span aria-hidden=\"true\">&times;</span></button>\n }\n } @else if (type === typeField.ngSelectMultiple) {\n <!-- value est un tableau : un [] vide \u00E9tant truthy, on teste .length pour n'afficher le clear global que s'il y a au moins une s\u00E9lection. -->\n @if (formControl?.value?.length) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\n }\n } @else {\n @if(formControl?.value) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\n }\n }\n }\n\n</ng-template>\n\n<ng-template #fieldLabel>\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{ label | translate }}\n\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n</ng-template>\n\n<!-- Bouton d'aide (tooltip) partage label/legend. Hors du <label> (sinon son libelle\n s'ajoute au nom du champ et le clic active le label) ; dans un <legend>, le fieldset\n est nomme par aria-labelledby sur le seul texte (legendId) pour la meme raison. -->\n<ng-template #fieldTooltip>\n <button type=\"button\" class=\"btn btn-ghost btn-field-tooltip\"\n [cwTooltip]=\"tooltip ?? ''\"\n [attr.data-test-ctw]=\"'tooltip-' + name\">\n <cw-icon [icon]=\"spriteIcon.alertHelp\" [type]=\"iconType.circular\" [iconUiType]=\"iconUiType.info\"\n [iconSize]=\"iconSize.xs\" [label]=\"'_COMMON._FORM.TOOLTIP_HELP' | translate\"></cw-icon>\n </button>\n</ng-template>\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: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "tabFocusOnClearButton", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i3.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i3.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "ngmodule", type: NgxSliderModule }, { kind: "component", type: i4.SliderComponent, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus", "cancelUserChange"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { 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: "directive", type: CwTooltipDirective, selector: "[cwTooltip]", inputs: ["cwTooltip", "cwTooltipTitle", "cwTooltipType", "cwTooltipTrigger", "cwTooltipPosition", "cwTooltipDisabled"] }, { kind: "component", type: AutocompleteComponent, selector: "cw-autocomplete", inputs: ["control", "fetcher", "displayField", "valueField", "columns", "multiple", "minChars", "debounceMs", "selectedItem", "resolver", "selectedItems", "placeholder", "id", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["itemSelected", "itemsChange"] }, { kind: "component", type: RichTextEditorComponent, selector: "cw-rich-text-editor", inputs: ["control", "options", "id", "placeholder", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["valueChange"] }, { kind: "component", type: FilePreviewComponent, selector: "cw-file-preview", inputs: ["file", "existingFile", "showActions", "disabled", "dataTest"], outputs: ["remove"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
4234
4392
  }
4235
4393
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FormFieldComponent, decorators: [{
4236
4394
  type: Component,
@@ -4247,7 +4405,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
4247
4405
  AutocompleteComponent,
4248
4406
  RichTextEditorComponent,
4249
4407
  FilePreviewComponent
4250
- ], template: "@if (!isInAddon) {\n @if (\n type !== typeField.checkbox &&\n type !== typeField.radio &&\n type !== typeField.checkboxButton &&\n type !== typeField.radioButton &&\n type !== typeField.checkboxInline &&\n type !== typeField.radioInline &&\n type !== typeField.switch &&\n type !== typeField.range &&\n type !== typeField.switchSmall\n ) {\n <!-- Bouton d'aide HORS du <label> (bouton dans un label = HTML invalide, son libelle\n polluerait le nom accessible du champ et un clic activerait le label) : on aligne\n label + bouton dans un conteneur flex, seulement quand il y a une aide. -->\n @if (hasFieldTooltip) {\n <div class=\"d-flex-h gap-2xs\">\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n }\n }\n\n @if (addonLeft || addonRight) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n @if(addonLeft) {\n <div class=\"field-group-addon-left\">\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n @if(addonRight) {\n <div class=\"field-group-addon-right\">\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\n </div>\n }\n </div>\n }\n @else {\n @if ( isInInputGroup() ) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n </div>\n }\n @else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n }\n }\n\n <!-- Error message -->\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\n @if (\n !errorMessages?.['required'] &&\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\n ) {\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate}\"></span>\n }\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\n }\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\n }\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\n }\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\n }\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\n }\n @if (errorMessages) {\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\n }\n }\n }\n </div>\n }\n\n @if (help || autoHelpEntries.length) {\n <div [id]=\"name + '-help'\" class=\"field-text\">\n @if (help) {\n <span>{{ help | translate }}</span>\n }\n @for (entry of autoHelpEntries; track entry.key) {\n <!-- Espace explicite : les blancs entre balises sont supprim\u00E9s \u00E0 la compilation. -->\n {{ ' ' }}<span>{{ entry.key | translate: entry.params }}</span>\n }\n </div>\n }\n\n <!-- Aper\u00E7u du fichier (type=file, opt-in) : sous le champ et ses aides, comme dans la\n maquette DS. La croix native du champ n'est pas retir\u00E9e \u2014 les deux vident le m\u00EAme\n control, l'aper\u00E7u ajoute juste \u00AB Visualiser \u00BB et une cible plus grande. -->\n @if (isPreviewVisible) {\n <cw-file-preview [file]=\"previewFile\" [existingFile]=\"existingFile ?? null\"\n [disabled]=\"!!isDisabledOrReadonly\" (remove)=\"onPreviewRemove()\" />\n }\n\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\n <ul class=\"autocomplete-chips\" role=\"list\">\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\n <li>\n <button type=\"button\" class=\"autocomplete-chip\"\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\n <span>{{ chip.label }}</span>\n @if (!isEffectivelyDisabled && !isReadonly) {\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n}\n@else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n}\n\n<ng-template #field>\n <!-- Autocomplete (mono / multi) -->\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\n <cw-autocomplete\n [id]=\"name\"\n [control]=\"formControl\"\n [fetcher]=\"autocompleteOptions.fetcher\"\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\n [columns]=\"autocompleteOptions.columns ?? []\"\n [resolver]=\"autocompleteOptions.resolver ?? null\"\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\n [multiple]=\"type === typeField.autocompleteMultiple\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\"\n [placeholder]=\"placeholder\">\n </cw-autocomplete>\n }\n\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\n @if (type === typeField.richText) {\n <cw-rich-text-editor\n [id]=\"name\"\n [control]=\"formControl\"\n [options]=\"richTextOptions\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\">\n </cw-rich-text-editor>\n }\n\n <!-- Text -->\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\n typeField.email,\n typeField.color, typeField.zipCode].includes(type)) {\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n <!-- Phone (intl-tel-input) -->\n @if (type === typeField.phone) {\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\n }\n\n <!-- File -->\n @if (type === typeField.file) {\n <!-- L'input natif reste LE controle (focus, clavier, restitution aux lecteurs d'ecran,\n validation), mais il est masque visuellement : le libelle de son bouton et son\n \u00AB aucun fichier choisi \u00BB sont ecrits par le NAVIGATEUR, dans SA langue. Ils sont\n intraduisibles et ne suivent pas la langue de l'application \u2014 un utilisateur qui\n bascule en anglais garderait \u00AB Choisir un fichier \u00BB. On les reecrit donc a cote,\n traduits, dans une couche purement visuelle. -->\n <input #fileInput type=\"file\" class=\"field-control visually-hidden\" [id]=\"name\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.accept]=\"acceptAttr\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n <!-- `aria-hidden` : doublon visuel de l'input, que les lecteurs d'ecran restituent deja\n (nom du champ, bouton de parcours, fichier selectionne). L'annoncer une seconde fois\n ne ferait que bavarder. Le clic est relaye a l'input, le clavier passe par lui. -->\n <span class=\"field-file\" aria-hidden=\"true\" (click)=\"openFilePicker()\">\n <span class=\"field-file-button\">{{ '_COMMON._FORM.CHOOSE_FILE' | translate }}</span>\n <span class=\"field-file-name\" [class.field-file-name-empty]=\"!selectedFileName\">\n {{ selectedFileName ?? ('_COMMON._FORM.NO_FILE_SELECTED' | translate) }}\n </span>\n </span>\n }\n\n @if (type === typeField.password) {\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n <cw-button [type]=\"buttonType.ghost\"\n cssClass=\"btn-password-field\"\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\n [withOnlyIcon]=\"true\"\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\n (btnAction)=\"togglePasswordVisibility()\">\n </cw-button>\n }\n\n <!-- Textarea -->\n @if (type === typeField.textarea) {\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\n }\n\n <!-- Select -->\n @if (type === typeField.select) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\">\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- NgSelect -->\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\"\n (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- Radio -->\n @if (type === typeField.radioInline || type === typeField.radio) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\">\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Radio button -->\n @if (type === typeField.radioButton) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n\n <!-- Checkbox Switch -->\n @if ( type === typeField.switch || type === typeField.switchSmall)\n {\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate }}</label>\n </div>\n }\n\n <!-- Checkbox -->\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\n @if (isSingleCheckbox()) {\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [class.is-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\n <label [for]=\"name\" class=\"field-check-label\">\n {{ label | translate }}\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </div>\n }\n @else if( options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n }\n\n <!-- Checkbox button -->\n @if (type === typeField.checkboxButton && options.length > 0) {\n\n @if(options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"btn-group btn-group-secondary\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\n {{ opt.label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n }\n </div>\n </fieldset>\n }\n }\n\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\n @if ([typeField.dateToDate, typeField.timeToTime, typeField.dateTimeToDateTime].includes(type) && isRange) {\n\n <div class=\"field-group\">\n <div class=\"field-group-addon-left\">Du</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\n (focus)=\"onFocusRange('start')\" (blur)=\"onBlurRange('start')\" />\n\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\n (click)=\"onClearFieldPeriod('start')\">\n &times;\n </button>\n }\n <div class=\"field-group-addon-center\">au</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\n (focus)=\"onFocusRange('end')\" (blur)=\"onBlurRange('end')\" />\n\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\n (click)=\"onClearFieldPeriod('end')\">\n &times;\n </button>\n }\n </div>\n }\n\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\n\n <div class=\"field-group\">\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-left\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\n </button>\n </div>\n }\n\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n @if(formControl?.value && !isDisabledOrReadonly) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n\n\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\n </button>\n </div>\n }\n\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J\n <span class=\"visually-hidden\">Aujourd'hui</span>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+1\n <span class=\"visually-hidden\">Demain</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+2\n <span class=\"visually-hidden\">Dans 2 jours</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusTwo) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+7\n <span class=\"visually-hidden\">Dans 7 jours</span>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (type === typeField.slider) {\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\n }\n\n @if (type === typeField.range) {\n <div class=\"slider\">\n\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\n </cw-button>\n\n <div class=\"slider-input\">\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ label | translate }} {{ formControl.value }}\n @if (rangeOptions.unit) {\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\n }\n </label>\n\n <div class=\"slider-custom-bar\">\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\n </div>\n </div>\n\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\">\n </div>\n\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\n </cw-button>\n </div>\n }\n\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\n @if (type === typeField.autocomplete) {\n @if (autocompleteRef()?.hasAnyContent()) {\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\n (click)=\"onClearAutocomplete()\">&times;</button>\n }\n } @else if (type === typeField.ngSelectMultiple) {\n <!-- value est un tableau : un [] vide \u00E9tant truthy, on teste .length pour n'afficher le clear global que s'il y a au moins une s\u00E9lection. -->\n @if (formControl?.value?.length) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n } @else {\n @if(formControl?.value) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n }\n }\n\n</ng-template>\n\n<ng-template #fieldLabel>\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{ label | translate }}\n\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n</ng-template>\n\n<!-- Bouton d'aide (tooltip) partage label/legend. Hors du <label> (sinon son libelle\n s'ajoute au nom du champ et le clic active le label) ; dans un <legend>, le fieldset\n est nomme par aria-labelledby sur le seul texte (legendId) pour la meme raison. -->\n<ng-template #fieldTooltip>\n <button type=\"button\" class=\"btn btn-ghost btn-field-tooltip\"\n [cwTooltip]=\"tooltip ?? ''\"\n [attr.data-test-ctw]=\"'tooltip-' + name\">\n <cw-icon [icon]=\"spriteIcon.alertHelp\" [type]=\"iconType.circular\" [iconUiType]=\"iconUiType.info\"\n [iconSize]=\"iconSize.xs\" [label]=\"'_COMMON._FORM.TOOLTIP_HELP' | translate\"></cw-icon>\n </button>\n</ng-template>\n" }]
4408
+ ], template: "@if (!isInAddon) {\n @if (\n type !== typeField.checkbox &&\n type !== typeField.radio &&\n type !== typeField.checkboxButton &&\n type !== typeField.radioButton &&\n type !== typeField.checkboxInline &&\n type !== typeField.radioInline &&\n type !== typeField.switch &&\n type !== typeField.range &&\n type !== typeField.switchSmall &&\n !isChoiceCard &&\n !isPeriod\n ) {\n <!-- Bouton d'aide HORS du <label> (bouton dans un label = HTML invalide, son libelle\n polluerait le nom accessible du champ et un clic activerait le label) : on aligne\n label + bouton dans un conteneur flex, seulement quand il y a une aide. -->\n @if (hasFieldTooltip) {\n <div class=\"d-flex-h gap-2xs\">\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\n }\n }\n\n @if (addonLeft || addonRight) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n @if(addonLeft) {\n <div class=\"field-group-addon-left\">\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n @if(addonRight) {\n <div class=\"field-group-addon-right\">\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\n </div>\n }\n </div>\n }\n @else {\n @if ( isInInputGroup() ) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n </div>\n }\n @else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n }\n }\n\n <!-- Error message -->\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\n @if (\n !errorMessages?.['required'] &&\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\n ) {\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate}\"></span>\n }\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\n }\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\n }\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\n }\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\n }\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\n }\n @if (errorMessages) {\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\n }\n }\n }\n </div>\n }\n\n @if (help || autoHelpEntries.length) {\n <div [id]=\"name + '-help'\" class=\"field-text\">\n @if (help) {\n <span>{{ help | translate }}</span>\n }\n @for (entry of autoHelpEntries; track entry.key) {\n <!-- Espace explicite : les blancs entre balises sont supprim\u00E9s \u00E0 la compilation. -->\n {{ ' ' }}<span>{{ entry.key | translate: entry.params }}</span>\n }\n </div>\n }\n\n <!-- Aper\u00E7u du fichier (type=file, opt-in) : sous le champ et ses aides, comme dans la\n maquette DS. La croix native du champ n'est pas retir\u00E9e \u2014 les deux vident le m\u00EAme\n control, l'aper\u00E7u ajoute juste \u00AB Visualiser \u00BB et une cible plus grande. -->\n @if (isPreviewVisible) {\n <cw-file-preview [file]=\"previewFile\" [existingFile]=\"existingFile ?? null\"\n [disabled]=\"!!isDisabledOrReadonly\" (remove)=\"onPreviewRemove()\" />\n }\n\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\n <ul class=\"autocomplete-chips\" role=\"list\">\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\n <li>\n <button type=\"button\" class=\"autocomplete-chip\"\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\n <span>{{ chip.label }}</span>\n @if (!isEffectivelyDisabled && !isReadonly) {\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n}\n@else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n}\n\n<ng-template #field>\n <!-- Autocomplete (mono / multi) -->\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\n <cw-autocomplete\n [id]=\"name\"\n [control]=\"formControl\"\n [fetcher]=\"autocompleteOptions.fetcher\"\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\n [columns]=\"autocompleteOptions.columns ?? []\"\n [resolver]=\"autocompleteOptions.resolver ?? null\"\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\n [multiple]=\"type === typeField.autocompleteMultiple\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\"\n [placeholder]=\"placeholder\">\n </cw-autocomplete>\n }\n\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\n @if (type === typeField.richText) {\n <cw-rich-text-editor\n [id]=\"name\"\n [control]=\"formControl\"\n [options]=\"richTextOptions\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\">\n </cw-rich-text-editor>\n }\n\n <!-- Text -->\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\n typeField.email,\n typeField.color, typeField.zipCode].includes(type)) {\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n <!-- Phone (intl-tel-input) -->\n @if (type === typeField.phone) {\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\n }\n\n <!-- File -->\n @if (type === typeField.file) {\n <!-- L'input natif reste LE controle (focus, clavier, restitution aux lecteurs d'ecran,\n validation), mais il est masque visuellement : le libelle de son bouton et son\n \u00AB aucun fichier choisi \u00BB sont ecrits par le NAVIGATEUR, dans SA langue. Ils sont\n intraduisibles et ne suivent pas la langue de l'application \u2014 un utilisateur qui\n bascule en anglais garderait \u00AB Choisir un fichier \u00BB. On les reecrit donc a cote,\n traduits, dans une couche purement visuelle. -->\n <input #fileInput type=\"file\" class=\"field-control visually-hidden\" [id]=\"name\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.accept]=\"acceptAttr\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n <!-- `aria-hidden` : doublon visuel de l'input, que les lecteurs d'ecran restituent deja\n (nom du champ, bouton de parcours, fichier selectionne). L'annoncer une seconde fois\n ne ferait que bavarder. Le clic est relaye a l'input, le clavier passe par lui. -->\n <span class=\"field-file\" aria-hidden=\"true\" (click)=\"openFilePicker()\">\n <span class=\"field-file-button\">{{ '_COMMON._FORM.CHOOSE_FILE' | translate }}</span>\n <span class=\"field-file-name\" [class.field-file-name-empty]=\"!selectedFileName\">\n {{ selectedFileName ?? ('_COMMON._FORM.NO_FILE_SELECTED' | translate) }}\n </span>\n </span>\n }\n\n @if (type === typeField.password) {\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n <cw-button [type]=\"buttonType.ghost\"\n cssClass=\"btn-password-field\"\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\n [withOnlyIcon]=\"true\"\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\n (btnAction)=\"togglePasswordVisibility()\">\n </cw-button>\n }\n\n <!-- Textarea -->\n @if (type === typeField.textarea) {\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\n }\n\n <!-- Select -->\n @if (type === typeField.select) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\">\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- NgSelect -->\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\"\n (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- Radio -->\n @if (type === typeField.radioInline || type === typeField.radio) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\">\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Radio button -->\n @if (type === typeField.radioButton) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n\n <!-- Cartes : checkbox / radio / switch (contr\u00F4le \u00E0 gauche, titre, description facultative) -->\n @if (isChoiceCard) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"field-card-list list-unstyled mb-none\" [class.field-card-list-compact]=\"isChoiceCardCompact\">\n @for (opt of options; track opt.value) {\n <li class=\"d-flex-v\">\n <!-- Le label englobe toute la carte : un clic n'importe o\u00F9 coche l'option. -->\n <label class=\"field-card d-flex-h items-start gap-xs flex-1\" [for]=\"name + '_' + opt.value\" [class.field-switch]=\"isSwitchCard\" [class.field-switch-small]=\"isSwitchCard\">\n @if (isRadioCard) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n } @else {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.role]=\"isSwitchCard ? 'switch' : null\"\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n }\n <span class=\"d-flex-v gap-5xs\">\n <span class=\"field-card-title\">{{ opt.label | translate }}</span>\n @if (!isChoiceCardCompact && opt.description) {\n <span class=\"field-text\" [id]=\"name + '_' + opt.value + '-desc'\">{{ opt.description | translate }}</span>\n }\n </span>\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Checkbox Switch -->\n @if ( type === typeField.switch || type === typeField.switchSmall)\n {\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate }}</label>\n </div>\n }\n\n <!-- Checkbox -->\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\n @if (isSingleCheckbox()) {\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [class.is-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\n <label [for]=\"name\" class=\"field-check-label\">\n {{ label | translate }}\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </div>\n }\n @else if( options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n }\n\n <!-- Checkbox button -->\n @if (type === typeField.checkboxButton && options.length > 0) {\n\n @if(options.length > 1) {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n @else {\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"btn-group btn-group-secondary\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\n {{ opt.label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n }\n </div>\n </fieldset>\n }\n }\n\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\n @if (isPeriod) {\n <!-- Fieldset : le legend nomme la p\u00E9riode, \u00AB Du \u00BB / \u00AB au \u00BB sont les labels de chaque input. -->\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\n <span [id]=\"legendId\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </span>\n @if (hasFieldTooltip) {\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\n }\n </legend>\n <div class=\"field-group\">\n <label class=\"field-group-addon-left\" [for]=\"name + '_start'\">{{ '_COMMON._DATES.FROM_TO_1' | translate }}</label>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_1' | translate) : null\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\n (focus)=\"onFocusRange('start')\" (blur)=\"onBlurRange('start')\" />\n\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_START' | translate: { label: label | translate }\"\n (click)=\"onClearFieldPeriod('start')\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n }\n <label class=\"field-group-addon-center\" [for]=\"name + '_end'\">{{ '_COMMON._DATES.FROM_TO_2' | translate }}</label>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_2' | translate) : null\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\n (focus)=\"onFocusRange('end')\" (blur)=\"onBlurRange('end')\" />\n\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_END' | translate: { label: label | translate }\"\n (click)=\"onClearFieldPeriod('end')\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n }\n </div>\n </fieldset>\n }\n\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\n\n <div class=\"field-group\">\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-left\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\n </button>\n </div>\n }\n\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n @if(formControl?.value && !isDisabledOrReadonly) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\n }\n\n\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\n </button>\n </div>\n }\n\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J\n <span class=\"visually-hidden\">Aujourd'hui</span>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+1\n <span class=\"visually-hidden\">Demain</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+2\n <span class=\"visually-hidden\">Dans 2 jours</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusTwo) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+7\n <span class=\"visually-hidden\">Dans 7 jours</span>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (type === typeField.slider) {\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\n }\n\n @if (type === typeField.range) {\n <div class=\"slider\">\n\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\n </cw-button>\n\n <div class=\"slider-input\">\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ label | translate }} {{ formControl.value }}\n @if (rangeOptions.unit) {\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\n }\n </label>\n\n <div class=\"slider-custom-bar\">\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\n </div>\n </div>\n\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\">\n </div>\n\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\n </cw-button>\n </div>\n }\n\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\n @if (type === typeField.autocomplete) {\n @if (autocompleteRef()?.hasAnyContent()) {\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearAutocomplete()\"><span aria-hidden=\"true\">&times;</span></button>\n }\n } @else if (type === typeField.ngSelectMultiple) {\n <!-- value est un tableau : un [] vide \u00E9tant truthy, on teste .length pour n'afficher le clear global que s'il y a au moins une s\u00E9lection. -->\n @if (formControl?.value?.length) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\n }\n } @else {\n @if(formControl?.value) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate }\"\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\n }\n }\n }\n\n</ng-template>\n\n<ng-template #fieldLabel>\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{ label | translate }}\n\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n</ng-template>\n\n<!-- Bouton d'aide (tooltip) partage label/legend. Hors du <label> (sinon son libelle\n s'ajoute au nom du champ et le clic active le label) ; dans un <legend>, le fieldset\n est nomme par aria-labelledby sur le seul texte (legendId) pour la meme raison. -->\n<ng-template #fieldTooltip>\n <button type=\"button\" class=\"btn btn-ghost btn-field-tooltip\"\n [cwTooltip]=\"tooltip ?? ''\"\n [attr.data-test-ctw]=\"'tooltip-' + name\">\n <cw-icon [icon]=\"spriteIcon.alertHelp\" [type]=\"iconType.circular\" [iconUiType]=\"iconUiType.info\"\n [iconSize]=\"iconSize.xs\" [label]=\"'_COMMON._FORM.TOOLTIP_HELP' | translate\"></cw-icon>\n </button>\n</ng-template>\n" }]
4251
4409
  }], ctorParameters: () => [], propDecorators: { control: [{
4252
4410
  type: Input
4253
4411
  }], formGroup: [{
@@ -4258,6 +4416,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
4258
4416
  type: Input
4259
4417
  }], displayLabel: [{
4260
4418
  type: Input
4419
+ }], fieldTitle: [{
4420
+ type: Input
4261
4421
  }], name: [{
4262
4422
  type: Input
4263
4423
  }], placeholder: [{
@@ -4282,6 +4442,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
4282
4442
  type: Input
4283
4443
  }], tooltip: [{
4284
4444
  type: Input
4445
+ }], ariaDescribedBy: [{
4446
+ type: Input
4285
4447
  }], addonLeft: [{
4286
4448
  type: Input
4287
4449
  }], addonRight: [{
@@ -4367,7 +4529,7 @@ class LegendComponent {
4367
4529
  this.legendTypeEnum = LegendTypeEnum;
4368
4530
  }
4369
4531
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4370
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LegendComponent, isStandalone: true, selector: "cw-legend", inputs: { legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: true, transformFunction: null }, displayInline: { classPropertyName: "displayInline", publicName: "displayInline", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (legend().title) {\n <div class=\"legend-title\">\n {{ '_COMMON._TABLE.LEGEND' | translate }}\n </div>\n}\n\n<ul class=\"legend-items\" [class.list-inline]=\"displayInline()\">\n @for (item of legend().data; track $index) {\n <li class=\"legend-item\" [class.list-inline-item]=\"displayInline()\">\n @switch (item.type) {\n @case (legendTypeEnum.icon) {\n <cw-icon [icon]=\"item.icon!\" [label]=\"item.label\" [iconCssClass]=\"'text-' + item.colorUi\" [iconColorCustom]=\"item.colorCustom\"></cw-icon>\n }\n @case (legendTypeEnum.badge) {\n <cw-badge [type]=\"item.colorBadge!\" [label]=\"item.labelBadge\"></cw-badge>\n {{item.label}}\n }\n @case (legendTypeEnum.color) {\n <span class=\"legend-item-color\" [ngClass]=\"item.colorUi ?'legend-' + item.colorUi : ''\" [style.background-color]=\"item.colorCustom\"></span>\n {{item.label}}\n }\n }\n </li>\n }\n</ul>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4532
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LegendComponent, isStandalone: true, selector: "cw-legend", inputs: { legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: true, transformFunction: null }, displayInline: { classPropertyName: "displayInline", publicName: "displayInline", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (legend().title) {\n <div class=\"legend-title\">\n {{ '_COMMON._TABLE.LEGEND' | translate }}\n </div>\n}\n\n<ul class=\"legend-items\" [class.list-inline]=\"displayInline()\">\n @for (item of legend().data; track $index) {\n <li class=\"legend-item\" [class.list-inline-item]=\"displayInline()\">\n @switch (item.type) {\n @case (legendTypeEnum.icon) {\n <cw-icon [icon]=\"item.icon!\" [label]=\"item.label\" [iconCssClass]=\"'text-' + item.colorUi\" [iconColorCustom]=\"item.colorCustom\"></cw-icon>\n }\n @case (legendTypeEnum.badge) {\n <cw-badge [type]=\"item.colorBadge!\" [label]=\"item.labelBadge\"></cw-badge>\n {{item.label}}\n }\n @case (legendTypeEnum.color) {\n <span class=\"legend-item-color\" [ngClass]=\"item.colorUi ?'legend-' + item.colorUi : ''\" [style.background-color]=\"item.colorCustom\"></span>\n {{item.label}}\n }\n }\n </li>\n }\n</ul>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "labelParams", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4371
4533
  }
4372
4534
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LegendComponent, decorators: [{
4373
4535
  type: Component,
@@ -4591,6 +4753,8 @@ class ModalsComponent {
4591
4753
  this.state = input(ModalsState.info, ...(ngDevMode ? [{ debugName: "state" }] : []));
4592
4754
  this.textType = input(...(ngDevMode ? [undefined, { debugName: "textType" }] : []));
4593
4755
  this.modalTitle = input(...(ngDevMode ? [undefined, { debugName: "modalTitle" }] : []));
4756
+ /** Parametres de traduction de `modalTitle` (ex. `{ count: 3 }`), passes au pipe `translate`. */
4757
+ this.modalTitleParams = input(...(ngDevMode ? [undefined, { debugName: "modalTitleParams" }] : []));
4594
4758
  this.itemsToDelete = input([], ...(ngDevMode ? [{ debugName: "itemsToDelete" }] : []));
4595
4759
  this.itemsToDeleteTitle = input('_COMMON._MODAL_DELETE.DEFAULT_TYPE', ...(ngDevMode ? [{ debugName: "itemsToDeleteTitle" }] : []));
4596
4760
  this.labelBtnAction1 = input(...(ngDevMode ? [undefined, { debugName: "labelBtnAction1" }] : []));
@@ -4808,12 +4972,12 @@ class ModalsComponent {
4808
4972
  this.destroyRef.onDestroy(unlisten);
4809
4973
  }
4810
4974
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ModalsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4811
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ModalsComponent, isStandalone: true, selector: "cw-modals", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, isAutcompModal: { classPropertyName: "isAutcompModal", publicName: "isAutcompModal", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, textType: { classPropertyName: "textType", publicName: "textType", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, itemsToDelete: { classPropertyName: "itemsToDelete", publicName: "itemsToDelete", isSignal: true, isRequired: false, transformFunction: null }, itemsToDeleteTitle: { classPropertyName: "itemsToDeleteTitle", publicName: "itemsToDeleteTitle", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction1: { classPropertyName: "labelBtnAction1", publicName: "labelBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction2: { classPropertyName: "labelBtnAction2", publicName: "labelBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction1: { classPropertyName: "disableBtnAction1", publicName: "disableBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction2: { classPropertyName: "disableBtnAction2", publicName: "disableBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, customBodyTemplate: { classPropertyName: "customBodyTemplate", publicName: "customBodyTemplate", isSignal: true, isRequired: false, transformFunction: null }, customBodyContext: { classPropertyName: "customBodyContext", publicName: "customBodyContext", isSignal: true, isRequired: false, transformFunction: null }, closeLocked: { classPropertyName: "closeLocked", publicName: "closeLocked", isSignal: true, isRequired: false, transformFunction: null }, closeLockedMessage: { classPropertyName: "closeLockedMessage", publicName: "closeLockedMessage", isSignal: true, isRequired: false, transformFunction: null }, keepOpenOnAction1: { classPropertyName: "keepOpenOnAction1", publicName: "keepOpenOnAction1", isSignal: true, isRequired: false, transformFunction: null }, keepOpenOnAction2: { classPropertyName: "keepOpenOnAction2", publicName: "keepOpenOnAction2", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction1: "btnAction1", btnAction2: "btnAction2" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"cityway-v8 modal-backdrop fade show\" style=\"z-index: 1050;\" aria-hidden=\"true\"></div>\n\n<div role=\"dialog\" tabindex=\"-1\" aria-modal=\"true\"\n [attr.aria-labelledby]=\"type() === modalsType.loader ? null : titleId\"\n [attr.aria-label]=\"type() === modalsType.loader ? ('_COMMON._HTTP.TXT_LOADING' | translate) : null\"\n class=\"cityway-v8 d-flex modal show\" [ngClass]=\"customClass()\" data-test-ctw=\"modal\" (keydown)=\"onKeyDown($event)\">\n\n <!-- Backdrop : fermeture a la souris (confort). Le clavier (Escape) est gere\n par onKeyDown du dialog ; le backdrop n'est pas un element interactif focusable.\n requestClose() applique le verrou (cf. isCloseLocked) : plus de test sur le type ici. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"modal-inner-backdrop\" (click)=\"requestClose()\"></div>\n\n <div #modalContainer role=\"document\" class=\"modal-dialog\"\n [ngClass]=\"['modal-' + size(), scrollable() ? 'modal-dialog-scrollable' : '']\">\n\n <div class=\"modal-content\">\n\n <!-- Verrou actif : region live qui annonce chaque tentative de fermeture refusee\n (Echap, backdrop, croix). Rendue vide au repos car une region live doit\n pre-exister dans le DOM pour que son remplissage soit annonce. Absente pour\n le loader, qui possede deja la sienne dans cw-loader. -->\n @if (showCloseLockedStatus()) {\n <span class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">{{ closeLockedAnnouncement() | translate }}</span>\n }\n\n @if (type() === modalsType.loader) {\n <div class=\"modal-body\">\n <cw-loader></cw-loader>\n </div>\n }\n @else {\n @if (isStateLike()) {\n <!-- state + delete : close en absolu (top-right, hors flux donc ne reserve\n pas de hauteur), body centre avec le picto de statut EN TETE du flux\n (il pousse donc le titre normalement) -->\n <!-- aria-disabled + .disabled (Bootstrap) plutot que `disabled` natif : la croix\n reste focusable et annoncee \u00AB desactivee \u00BB, et le focus trap conserve une\n cible. Un `disabled` natif la sortirait du selecteur de focusables. -->\n <button type=\"button\" class=\"btn-close modal-close-floating\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n\n <div class=\"modal-body modal-body-state d-flex-v gap-md items-center\" [class.modal-text-center]=\"isBodyCentered()\">\n <cw-icon [icon]=\"statusIcon()\" [iconSize]=\"iconSize['xl']\" [type]=\"iconType.square\"\n [iconUiType]=\"statusUiType()\" aria-hidden=\"true\"></cw-icon>\n\n <h1 class=\"modal-title\" [id]=\"titleId\">\n @if (type() === modalsType.delete) {\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete().length, name: itemsToDeleteTitle() | translate } }}\n }\n @else {\n {{ (modalTitle() ?? '') | translate }}\n }\n </h1>\n\n @if (type() === modalsType.delete) {\n <!-- zone delete en dur : texte + liste + avertissement, pleine largeur aligne a gauche -->\n <div class=\"w-100 d-flex-v gap-md\">\n @if (itemsToDelete().length > 1) {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\n }\n @else {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\n }\n\n @if (itemsToDelete().length > 0) {\n <ul class=\"mb-none\">\n @for (item of itemsToDelete(); track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.IRREVERSIBLE' | translate\"></div>\n </div>\n }\n\n @if (customBodyTemplate()) {\n <div class=\"w-100\">\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n </div>\n }\n </div>\n }\n @else {\n <!-- default + sidepanel : header titre + close, body = contenu libre (slot) -->\n <div class=\"modal-header\">\n <h1 class=\"modal-title\" [id]=\"titleId\">\n {{ (modalTitle() ?? '') | translate }}\n </h1>\n\n <!-- cf. croix state/delete : aria-disabled, pas `disabled` natif -->\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n </div>\n\n <div class=\"modal-body d-flex-v gap-md\">\n @if (customBodyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n }\n </div>\n }\n\n <!-- footer commun : secondaire a gauche, primaire/danger a droite (ordre DS) -->\n <div class=\"modal-footer\">\n @if (type() === modalsType.delete) {\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"isCloseLocked()\" (btnAction)=\"requestClose()\" dataTest=\"btn-close-modal\">\n </cw-button>\n\n <cw-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n @if (labelBtnAction2()) {\n <cw-button [label]=\"labelBtnAction2()\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"disableBtnAction2()\" (btnAction)=\"action2Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n <!-- Bouton de repli : il occupe la place de l'action 2, il applique donc\n disableBtnAction2 (auparavant le seul bouton du composant a ignorer\n son input de desactivation). -->\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"isCloseLocked() || disableBtnAction2()\"\n (btnAction)=\"fallbackCloseClick()\" dataTest=\"btn-close-modal\">\n </cw-button>\n }\n @if (labelBtnAction1()) {\n <cw-button [label]=\"labelBtnAction1()\" [type]=\"buttonTypeEnum.primary\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n }\n </div>\n }\n\n </div>\n </div>\n</div>\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: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4975
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ModalsComponent, isStandalone: true, selector: "cw-modals", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, isAutcompModal: { classPropertyName: "isAutcompModal", publicName: "isAutcompModal", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, textType: { classPropertyName: "textType", publicName: "textType", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, modalTitleParams: { classPropertyName: "modalTitleParams", publicName: "modalTitleParams", isSignal: true, isRequired: false, transformFunction: null }, itemsToDelete: { classPropertyName: "itemsToDelete", publicName: "itemsToDelete", isSignal: true, isRequired: false, transformFunction: null }, itemsToDeleteTitle: { classPropertyName: "itemsToDeleteTitle", publicName: "itemsToDeleteTitle", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction1: { classPropertyName: "labelBtnAction1", publicName: "labelBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction2: { classPropertyName: "labelBtnAction2", publicName: "labelBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction1: { classPropertyName: "disableBtnAction1", publicName: "disableBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction2: { classPropertyName: "disableBtnAction2", publicName: "disableBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, customBodyTemplate: { classPropertyName: "customBodyTemplate", publicName: "customBodyTemplate", isSignal: true, isRequired: false, transformFunction: null }, customBodyContext: { classPropertyName: "customBodyContext", publicName: "customBodyContext", isSignal: true, isRequired: false, transformFunction: null }, closeLocked: { classPropertyName: "closeLocked", publicName: "closeLocked", isSignal: true, isRequired: false, transformFunction: null }, closeLockedMessage: { classPropertyName: "closeLockedMessage", publicName: "closeLockedMessage", isSignal: true, isRequired: false, transformFunction: null }, keepOpenOnAction1: { classPropertyName: "keepOpenOnAction1", publicName: "keepOpenOnAction1", isSignal: true, isRequired: false, transformFunction: null }, keepOpenOnAction2: { classPropertyName: "keepOpenOnAction2", publicName: "keepOpenOnAction2", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction1: "btnAction1", btnAction2: "btnAction2" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"cityway-v8 modal-backdrop fade show\" style=\"z-index: 1050;\" aria-hidden=\"true\"></div>\r\n\r\n<div role=\"dialog\" tabindex=\"-1\" aria-modal=\"true\"\r\n [attr.aria-labelledby]=\"type() === modalsType.loader ? null : titleId\"\r\n [attr.aria-label]=\"type() === modalsType.loader ? ('_COMMON._HTTP.TXT_LOADING' | translate) : null\"\r\n class=\"cityway-v8 d-flex modal show\" [ngClass]=\"customClass()\" data-test-ctw=\"modal\" (keydown)=\"onKeyDown($event)\">\r\n\r\n <!-- Backdrop : fermeture a la souris (confort). Le clavier (Escape) est gere\r\n par onKeyDown du dialog ; le backdrop n'est pas un element interactif focusable.\r\n requestClose() applique le verrou (cf. isCloseLocked) : plus de test sur le type ici. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\r\n <div class=\"modal-inner-backdrop\" (click)=\"requestClose()\"></div>\r\n\r\n <div #modalContainer role=\"document\" class=\"modal-dialog\"\r\n [ngClass]=\"['modal-' + size(), scrollable() ? 'modal-dialog-scrollable' : '']\">\r\n\r\n <div class=\"modal-content\">\r\n\r\n <!-- Verrou actif : region live qui annonce chaque tentative de fermeture refusee\r\n (Echap, backdrop, croix). Rendue vide au repos car une region live doit\r\n pre-exister dans le DOM pour que son remplissage soit annonce. Absente pour\r\n le loader, qui possede deja la sienne dans cw-loader. -->\r\n @if (showCloseLockedStatus()) {\r\n <span class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">{{ closeLockedAnnouncement() | translate }}</span>\r\n }\r\n\r\n @if (type() === modalsType.loader) {\r\n <div class=\"modal-body\">\r\n <cw-loader></cw-loader>\r\n </div>\r\n }\r\n @else {\r\n @if (isStateLike()) {\r\n <!-- state + delete : close en absolu (top-right, hors flux donc ne reserve\r\n pas de hauteur), body centre avec le picto de statut EN TETE du flux\r\n (il pousse donc le titre normalement) -->\r\n <!-- aria-disabled + .disabled (Bootstrap) plutot que `disabled` natif : la croix\r\n reste focusable et annoncee \u00AB desactivee \u00BB, et le focus trap conserve une\r\n cible. Un `disabled` natif la sortirait du selecteur de focusables. -->\r\n <button type=\"button\" class=\"btn-close modal-close-floating\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\r\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\r\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\r\n </button>\r\n\r\n <div class=\"modal-body modal-body-state d-flex-v gap-md items-center\" [class.modal-text-center]=\"isBodyCentered()\">\r\n <cw-icon [icon]=\"statusIcon()\" [iconSize]=\"iconSize['xl']\" [type]=\"iconType.square\"\r\n [iconUiType]=\"statusUiType()\" aria-hidden=\"true\"></cw-icon>\r\n\r\n <h1 class=\"modal-title\" [id]=\"titleId\">\r\n @if (type() === modalsType.delete) {\r\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete().length, name: itemsToDeleteTitle() | translate } }}\r\n }\r\n @else {\r\n {{ (modalTitle() ?? '') | translate: modalTitleParams() }}\r\n }\r\n </h1>\r\n\r\n @if (type() === modalsType.delete) {\r\n <!-- zone delete en dur : texte + liste + avertissement, pleine largeur aligne a gauche -->\r\n <div class=\"w-100 d-flex-v gap-md\">\r\n @if (itemsToDelete().length > 1) {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\r\n }\r\n @else {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\r\n }\r\n\r\n @if (itemsToDelete().length > 0) {\r\n <ul class=\"mb-none\">\r\n @for (item of itemsToDelete(); track item) {\r\n <li>{{ item }}</li>\r\n }\r\n </ul>\r\n }\r\n\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.IRREVERSIBLE' | translate\"></div>\r\n </div>\r\n }\r\n\r\n @if (customBodyTemplate()) {\r\n <div class=\"w-100\">\r\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @else {\r\n <!-- default + sidepanel : header titre + close, body = contenu libre (slot) -->\r\n <div class=\"modal-header\">\r\n <h1 class=\"modal-title\" [id]=\"titleId\">\r\n {{ (modalTitle() ?? '') | translate: modalTitleParams() }}\r\n </h1>\r\n\r\n <!-- cf. croix state/delete : aria-disabled, pas `disabled` natif -->\r\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\r\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\r\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body d-flex-v gap-md\">\r\n @if (customBodyTemplate()) {\r\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- footer commun : secondaire a gauche, primaire/danger a droite (ordre DS) -->\r\n <div class=\"modal-footer\">\r\n @if (type() === modalsType.delete) {\r\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\r\n [isDisabled]=\"isCloseLocked()\" (btnAction)=\"requestClose()\" dataTest=\"btn-close-modal\">\r\n </cw-button>\r\n\r\n <cw-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\"\r\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\r\n </cw-button>\r\n }\r\n @else {\r\n @if (labelBtnAction2()) {\r\n <cw-button [label]=\"labelBtnAction2()\" [type]=\"buttonTypeEnum.secondary\"\r\n [isDisabled]=\"disableBtnAction2()\" (btnAction)=\"action2Click()\" dataTest=\"btn-action-modal\">\r\n </cw-button>\r\n }\r\n @else {\r\n <!-- Bouton de repli : il occupe la place de l'action 2, il applique donc\r\n disableBtnAction2 (auparavant le seul bouton du composant a ignorer\r\n son input de desactivation). -->\r\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\r\n [isDisabled]=\"isCloseLocked() || disableBtnAction2()\"\r\n (btnAction)=\"fallbackCloseClick()\" dataTest=\"btn-close-modal\">\r\n </cw-button>\r\n }\r\n @if (labelBtnAction1()) {\r\n <cw-button [label]=\"labelBtnAction1()\" [type]=\"buttonTypeEnum.primary\"\r\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\r\n </cw-button>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>\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: "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: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { 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 }); }
4812
4976
  }
4813
4977
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ModalsComponent, decorators: [{
4814
4978
  type: Component,
4815
- args: [{ selector: 'cw-modals', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, TranslateModule, NgClass, NgTemplateOutlet, ButtonComponent, LoaderComponent, IconComponent], template: "<div class=\"cityway-v8 modal-backdrop fade show\" style=\"z-index: 1050;\" aria-hidden=\"true\"></div>\n\n<div role=\"dialog\" tabindex=\"-1\" aria-modal=\"true\"\n [attr.aria-labelledby]=\"type() === modalsType.loader ? null : titleId\"\n [attr.aria-label]=\"type() === modalsType.loader ? ('_COMMON._HTTP.TXT_LOADING' | translate) : null\"\n class=\"cityway-v8 d-flex modal show\" [ngClass]=\"customClass()\" data-test-ctw=\"modal\" (keydown)=\"onKeyDown($event)\">\n\n <!-- Backdrop : fermeture a la souris (confort). Le clavier (Escape) est gere\n par onKeyDown du dialog ; le backdrop n'est pas un element interactif focusable.\n requestClose() applique le verrou (cf. isCloseLocked) : plus de test sur le type ici. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"modal-inner-backdrop\" (click)=\"requestClose()\"></div>\n\n <div #modalContainer role=\"document\" class=\"modal-dialog\"\n [ngClass]=\"['modal-' + size(), scrollable() ? 'modal-dialog-scrollable' : '']\">\n\n <div class=\"modal-content\">\n\n <!-- Verrou actif : region live qui annonce chaque tentative de fermeture refusee\n (Echap, backdrop, croix). Rendue vide au repos car une region live doit\n pre-exister dans le DOM pour que son remplissage soit annonce. Absente pour\n le loader, qui possede deja la sienne dans cw-loader. -->\n @if (showCloseLockedStatus()) {\n <span class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">{{ closeLockedAnnouncement() | translate }}</span>\n }\n\n @if (type() === modalsType.loader) {\n <div class=\"modal-body\">\n <cw-loader></cw-loader>\n </div>\n }\n @else {\n @if (isStateLike()) {\n <!-- state + delete : close en absolu (top-right, hors flux donc ne reserve\n pas de hauteur), body centre avec le picto de statut EN TETE du flux\n (il pousse donc le titre normalement) -->\n <!-- aria-disabled + .disabled (Bootstrap) plutot que `disabled` natif : la croix\n reste focusable et annoncee \u00AB desactivee \u00BB, et le focus trap conserve une\n cible. Un `disabled` natif la sortirait du selecteur de focusables. -->\n <button type=\"button\" class=\"btn-close modal-close-floating\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n\n <div class=\"modal-body modal-body-state d-flex-v gap-md items-center\" [class.modal-text-center]=\"isBodyCentered()\">\n <cw-icon [icon]=\"statusIcon()\" [iconSize]=\"iconSize['xl']\" [type]=\"iconType.square\"\n [iconUiType]=\"statusUiType()\" aria-hidden=\"true\"></cw-icon>\n\n <h1 class=\"modal-title\" [id]=\"titleId\">\n @if (type() === modalsType.delete) {\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete().length, name: itemsToDeleteTitle() | translate } }}\n }\n @else {\n {{ (modalTitle() ?? '') | translate }}\n }\n </h1>\n\n @if (type() === modalsType.delete) {\n <!-- zone delete en dur : texte + liste + avertissement, pleine largeur aligne a gauche -->\n <div class=\"w-100 d-flex-v gap-md\">\n @if (itemsToDelete().length > 1) {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\n }\n @else {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\n }\n\n @if (itemsToDelete().length > 0) {\n <ul class=\"mb-none\">\n @for (item of itemsToDelete(); track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.IRREVERSIBLE' | translate\"></div>\n </div>\n }\n\n @if (customBodyTemplate()) {\n <div class=\"w-100\">\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n </div>\n }\n </div>\n }\n @else {\n <!-- default + sidepanel : header titre + close, body = contenu libre (slot) -->\n <div class=\"modal-header\">\n <h1 class=\"modal-title\" [id]=\"titleId\">\n {{ (modalTitle() ?? '') | translate }}\n </h1>\n\n <!-- cf. croix state/delete : aria-disabled, pas `disabled` natif -->\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n </div>\n\n <div class=\"modal-body d-flex-v gap-md\">\n @if (customBodyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n }\n </div>\n }\n\n <!-- footer commun : secondaire a gauche, primaire/danger a droite (ordre DS) -->\n <div class=\"modal-footer\">\n @if (type() === modalsType.delete) {\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"isCloseLocked()\" (btnAction)=\"requestClose()\" dataTest=\"btn-close-modal\">\n </cw-button>\n\n <cw-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n @if (labelBtnAction2()) {\n <cw-button [label]=\"labelBtnAction2()\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"disableBtnAction2()\" (btnAction)=\"action2Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n <!-- Bouton de repli : il occupe la place de l'action 2, il applique donc\n disableBtnAction2 (auparavant le seul bouton du composant a ignorer\n son input de desactivation). -->\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"isCloseLocked() || disableBtnAction2()\"\n (btnAction)=\"fallbackCloseClick()\" dataTest=\"btn-close-modal\">\n </cw-button>\n }\n @if (labelBtnAction1()) {\n <cw-button [label]=\"labelBtnAction1()\" [type]=\"buttonTypeEnum.primary\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n }\n </div>\n }\n\n </div>\n </div>\n</div>\n" }]
4816
- }], propDecorators: { modalContainer: [{ type: i0.ViewChild, args: ['modalContainer', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }], scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], isAutcompModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAutcompModal", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], textType: [{ type: i0.Input, args: [{ isSignal: true, alias: "textType", required: false }] }], modalTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalTitle", required: false }] }], itemsToDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsToDelete", required: false }] }], itemsToDeleteTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsToDeleteTitle", required: false }] }], labelBtnAction1: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelBtnAction1", required: false }] }], labelBtnAction2: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelBtnAction2", required: false }] }], disableBtnAction1: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBtnAction1", required: false }] }], disableBtnAction2: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBtnAction2", required: false }] }], customBodyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "customBodyTemplate", required: false }] }], customBodyContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "customBodyContext", required: false }] }], closeLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLocked", required: false }] }], closeLockedMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLockedMessage", required: false }] }], keepOpenOnAction1: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepOpenOnAction1", required: false }] }], keepOpenOnAction2: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepOpenOnAction2", required: false }] }], btnAction1: [{ type: i0.Output, args: ["btnAction1"] }], btnAction2: [{ type: i0.Output, args: ["btnAction2"] }] } });
4979
+ args: [{ selector: 'cw-modals', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, TranslateModule, NgClass, NgTemplateOutlet, ButtonComponent, LoaderComponent, IconComponent], template: "<div class=\"cityway-v8 modal-backdrop fade show\" style=\"z-index: 1050;\" aria-hidden=\"true\"></div>\r\n\r\n<div role=\"dialog\" tabindex=\"-1\" aria-modal=\"true\"\r\n [attr.aria-labelledby]=\"type() === modalsType.loader ? null : titleId\"\r\n [attr.aria-label]=\"type() === modalsType.loader ? ('_COMMON._HTTP.TXT_LOADING' | translate) : null\"\r\n class=\"cityway-v8 d-flex modal show\" [ngClass]=\"customClass()\" data-test-ctw=\"modal\" (keydown)=\"onKeyDown($event)\">\r\n\r\n <!-- Backdrop : fermeture a la souris (confort). Le clavier (Escape) est gere\r\n par onKeyDown du dialog ; le backdrop n'est pas un element interactif focusable.\r\n requestClose() applique le verrou (cf. isCloseLocked) : plus de test sur le type ici. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\r\n <div class=\"modal-inner-backdrop\" (click)=\"requestClose()\"></div>\r\n\r\n <div #modalContainer role=\"document\" class=\"modal-dialog\"\r\n [ngClass]=\"['modal-' + size(), scrollable() ? 'modal-dialog-scrollable' : '']\">\r\n\r\n <div class=\"modal-content\">\r\n\r\n <!-- Verrou actif : region live qui annonce chaque tentative de fermeture refusee\r\n (Echap, backdrop, croix). Rendue vide au repos car une region live doit\r\n pre-exister dans le DOM pour que son remplissage soit annonce. Absente pour\r\n le loader, qui possede deja la sienne dans cw-loader. -->\r\n @if (showCloseLockedStatus()) {\r\n <span class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">{{ closeLockedAnnouncement() | translate }}</span>\r\n }\r\n\r\n @if (type() === modalsType.loader) {\r\n <div class=\"modal-body\">\r\n <cw-loader></cw-loader>\r\n </div>\r\n }\r\n @else {\r\n @if (isStateLike()) {\r\n <!-- state + delete : close en absolu (top-right, hors flux donc ne reserve\r\n pas de hauteur), body centre avec le picto de statut EN TETE du flux\r\n (il pousse donc le titre normalement) -->\r\n <!-- aria-disabled + .disabled (Bootstrap) plutot que `disabled` natif : la croix\r\n reste focusable et annoncee \u00AB desactivee \u00BB, et le focus trap conserve une\r\n cible. Un `disabled` natif la sortirait du selecteur de focusables. -->\r\n <button type=\"button\" class=\"btn-close modal-close-floating\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\r\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\r\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\r\n </button>\r\n\r\n <div class=\"modal-body modal-body-state d-flex-v gap-md items-center\" [class.modal-text-center]=\"isBodyCentered()\">\r\n <cw-icon [icon]=\"statusIcon()\" [iconSize]=\"iconSize['xl']\" [type]=\"iconType.square\"\r\n [iconUiType]=\"statusUiType()\" aria-hidden=\"true\"></cw-icon>\r\n\r\n <h1 class=\"modal-title\" [id]=\"titleId\">\r\n @if (type() === modalsType.delete) {\r\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete().length, name: itemsToDeleteTitle() | translate } }}\r\n }\r\n @else {\r\n {{ (modalTitle() ?? '') | translate: modalTitleParams() }}\r\n }\r\n </h1>\r\n\r\n @if (type() === modalsType.delete) {\r\n <!-- zone delete en dur : texte + liste + avertissement, pleine largeur aligne a gauche -->\r\n <div class=\"w-100 d-flex-v gap-md\">\r\n @if (itemsToDelete().length > 1) {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\r\n }\r\n @else {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\r\n }\r\n\r\n @if (itemsToDelete().length > 0) {\r\n <ul class=\"mb-none\">\r\n @for (item of itemsToDelete(); track item) {\r\n <li>{{ item }}</li>\r\n }\r\n </ul>\r\n }\r\n\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.IRREVERSIBLE' | translate\"></div>\r\n </div>\r\n }\r\n\r\n @if (customBodyTemplate()) {\r\n <div class=\"w-100\">\r\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @else {\r\n <!-- default + sidepanel : header titre + close, body = contenu libre (slot) -->\r\n <div class=\"modal-header\">\r\n <h1 class=\"modal-title\" [id]=\"titleId\">\r\n {{ (modalTitle() ?? '') | translate: modalTitleParams() }}\r\n </h1>\r\n\r\n <!-- cf. croix state/delete : aria-disabled, pas `disabled` natif -->\r\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n [class.disabled]=\"isCloseLocked()\" [attr.aria-disabled]=\"isCloseLocked() ? 'true' : null\"\r\n (click)=\"requestClose()\" data-test-ctw=\"btn-close-modal\">\r\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body d-flex-v gap-md\">\r\n @if (customBodyTemplate()) {\r\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- footer commun : secondaire a gauche, primaire/danger a droite (ordre DS) -->\r\n <div class=\"modal-footer\">\r\n @if (type() === modalsType.delete) {\r\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\r\n [isDisabled]=\"isCloseLocked()\" (btnAction)=\"requestClose()\" dataTest=\"btn-close-modal\">\r\n </cw-button>\r\n\r\n <cw-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\"\r\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\r\n </cw-button>\r\n }\r\n @else {\r\n @if (labelBtnAction2()) {\r\n <cw-button [label]=\"labelBtnAction2()\" [type]=\"buttonTypeEnum.secondary\"\r\n [isDisabled]=\"disableBtnAction2()\" (btnAction)=\"action2Click()\" dataTest=\"btn-action-modal\">\r\n </cw-button>\r\n }\r\n @else {\r\n <!-- Bouton de repli : il occupe la place de l'action 2, il applique donc\r\n disableBtnAction2 (auparavant le seul bouton du composant a ignorer\r\n son input de desactivation). -->\r\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\r\n [isDisabled]=\"isCloseLocked() || disableBtnAction2()\"\r\n (btnAction)=\"fallbackCloseClick()\" dataTest=\"btn-close-modal\">\r\n </cw-button>\r\n }\r\n @if (labelBtnAction1()) {\r\n <cw-button [label]=\"labelBtnAction1()\" [type]=\"buttonTypeEnum.primary\"\r\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\r\n </cw-button>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>\r\n" }]
4980
+ }], propDecorators: { modalContainer: [{ type: i0.ViewChild, args: ['modalContainer', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }], scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], isAutcompModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAutcompModal", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], textType: [{ type: i0.Input, args: [{ isSignal: true, alias: "textType", required: false }] }], modalTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalTitle", required: false }] }], modalTitleParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalTitleParams", required: false }] }], itemsToDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsToDelete", required: false }] }], itemsToDeleteTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsToDeleteTitle", required: false }] }], labelBtnAction1: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelBtnAction1", required: false }] }], labelBtnAction2: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelBtnAction2", required: false }] }], disableBtnAction1: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBtnAction1", required: false }] }], disableBtnAction2: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBtnAction2", required: false }] }], customBodyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "customBodyTemplate", required: false }] }], customBodyContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "customBodyContext", required: false }] }], closeLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLocked", required: false }] }], closeLockedMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLockedMessage", required: false }] }], keepOpenOnAction1: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepOpenOnAction1", required: false }] }], keepOpenOnAction2: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepOpenOnAction2", required: false }] }], btnAction1: [{ type: i0.Output, args: ["btnAction1"] }], btnAction2: [{ type: i0.Output, args: ["btnAction2"] }] } });
4817
4981
 
4818
4982
  class TabContentComponent {
4819
4983
  constructor() {
@@ -4997,7 +5161,7 @@ class TabComponent {
4997
5161
  }
4998
5162
  }
4999
5163
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: TabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5000
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: TabComponent, isStandalone: true, selector: "cw-tab", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, useFragment: { classPropertyName: "useFragment", publicName: "useFragment", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, tabContentCssClass: { classPropertyName: "tabContentCssClass", publicName: "tabContentCssClass", isSignal: true, isRequired: false, transformFunction: null }, activeTabIndex: { classPropertyName: "activeTabIndex", publicName: "activeTabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabChanged: "tabChanged" }, host: { classAttribute: "cw-tab" }, queries: [{ propertyName: "tabs", predicate: TabContentComponent, isSignal: true }], viewQueries: [{ propertyName: "tabLinks", predicate: ["tabLink"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tab\" [ngClass]=\"'tab-' + type()\">\r\n @if (title(); as title) {\r\n <h2>{{ title | translate }}</h2>\r\n }\r\n <ul class=\"tab-items d-flex-h\" [ngClass]=\"'tab-items-' + type()\" role=\"tablist\">\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <li class=\"tab-item\" role=\"presentation\">\r\n <button #tabLink type=\"button\" class=\"tab-link btn\" [class.active]=\"tab.active()\" [class.disabled]=\"tab.disabled()\"\r\n [disabled]=\"tab.disabled()\" [attr.id]=\"'cw-nav-' + i\" [attr.data-test-ctw]=\"'link-tab-' + id() + '-' + i\"\r\n [attr.aria-selected]=\"tab.active()\" [attr.aria-controls]=\"'cw-nav-' + i + '-panel'\"\r\n [attr.tabindex]=\"tab.active() ? '0' : '-1'\" (click)=\"selectTab(tab)\" (keydown)=\"onKeydown($event)\" role=\"tab\">\r\n @if (tab.withIcon(); as icon) {\r\n <cw-icon [icon]=\"icon\" [iconSize]=\"iconSize\"></cw-icon>\r\n }\r\n {{ tab.title() | translate }}\r\n @if (tab.badge(); as badge) {\r\n <cw-badge [type]=\"badge.type\" [label]=\"badge.label\" [withIcon]=\"badge.withIcon\"\r\n [iconPosition]=\"badge.iconPosition\" [cssClass]=\"badge.cssClass ?? ''\" [dataTest]=\"badge.dataTest\"></cw-badge>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n<div [class]=\"'tab-content ' + tabContentCssClass()\" [ngClass]=\"'tab-content-' + type()\">\r\n <ng-content></ng-content>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5164
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: TabComponent, isStandalone: true, selector: "cw-tab", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, useFragment: { classPropertyName: "useFragment", publicName: "useFragment", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, tabContentCssClass: { classPropertyName: "tabContentCssClass", publicName: "tabContentCssClass", isSignal: true, isRequired: false, transformFunction: null }, activeTabIndex: { classPropertyName: "activeTabIndex", publicName: "activeTabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabChanged: "tabChanged" }, host: { classAttribute: "cw-tab" }, queries: [{ propertyName: "tabs", predicate: TabContentComponent, isSignal: true }], viewQueries: [{ propertyName: "tabLinks", predicate: ["tabLink"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tab\" [ngClass]=\"'tab-' + type()\">\r\n @if (title(); as title) {\r\n <h2>{{ title | translate }}</h2>\r\n }\r\n <ul class=\"tab-items d-flex-h\" [ngClass]=\"'tab-items-' + type()\" role=\"tablist\">\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <li class=\"tab-item\" role=\"presentation\">\r\n <button #tabLink type=\"button\" class=\"tab-link btn\" [class.active]=\"tab.active()\" [class.disabled]=\"tab.disabled()\"\r\n [disabled]=\"tab.disabled()\" [attr.id]=\"'cw-nav-' + i\" [attr.data-test-ctw]=\"'link-tab-' + id() + '-' + i\"\r\n [attr.aria-selected]=\"tab.active()\" [attr.aria-controls]=\"'cw-nav-' + i + '-panel'\"\r\n [attr.tabindex]=\"tab.active() ? '0' : '-1'\" (click)=\"selectTab(tab)\" (keydown)=\"onKeydown($event)\" role=\"tab\">\r\n @if (tab.withIcon(); as icon) {\r\n <cw-icon [icon]=\"icon\" [iconSize]=\"iconSize\"></cw-icon>\r\n }\r\n {{ tab.title() | translate }}\r\n @if (tab.badge(); as badge) {\r\n <cw-badge [type]=\"badge.type\" [label]=\"badge.label\" [withIcon]=\"badge.withIcon\"\r\n [iconPosition]=\"badge.iconPosition\" [cssClass]=\"badge.cssClass ?? ''\" [dataTest]=\"badge.dataTest\"></cw-badge>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n<div [class]=\"'tab-content ' + tabContentCssClass()\" [ngClass]=\"'tab-content-' + type()\">\r\n <ng-content></ng-content>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "labelParams", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5001
5165
  }
5002
5166
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: TabComponent, decorators: [{
5003
5167
  type: Component,
@@ -5038,7 +5202,7 @@ class FileToDownloadComponent {
5038
5202
  this.attachments = input.required(...(ngDevMode ? [{ debugName: "attachments" }] : []));
5039
5203
  }
5040
5204
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FileToDownloadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5041
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FileToDownloadComponent, isStandalone: true, selector: "cw-file-to-download", inputs: { attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<!-- If one file -->\n@if (attachments().length === 1 ) {\n<ng-container *ngTemplateOutlet=\"file;context:{attachment:attachments()[0]}\"></ng-container>\n}\n\n<!-- If two files or more, li loop -->\n@if (attachments().length > 1) {\n<ul class=\"list-unstyled file-to-download-items\">\n @for (attachment of attachments(); track attachment) {\n <li class=\"file-to-download-list-item\">\n <ng-container *ngTemplateOutlet=\"file;context:{attachment:attachment}\"></ng-container>\n </li>\n }\n</ul>\n}\n\n<ng-template #file let-attachment=\"attachment\">\n <a [href]=\"attachment.url\" class=\"file-to-download-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n <span class=\"file-to-download-name\">\n {{ attachment.label ? attachment.label : ('_SHARED.ATTACHMENT_DEFAULT_LABEL' | translate ) }}\n </span>\n <span class=\"file-to-download-info\">\n @if (attachment.extension && attachment.size) {\n {{attachment.extension.toUpperCase()}} {{attachment.size * 1024 | formatFileSize}}\n }\n <cw-icon [icon]=\"spriteIcon\" font=\"optyweb\" [label]=\"'_COMMON.NEW_WINDOW' |translate\" [type]=\"iconType.default\"\n [iconSize]=\"iconSize['md']\" iconCssClass=\"file-to-download-download\"></cw-icon>\n </span>\n </a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5205
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FileToDownloadComponent, isStandalone: true, selector: "cw-file-to-download", inputs: { attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<!-- If one file -->\n@if (attachments().length === 1 ) {\n<ng-container *ngTemplateOutlet=\"file;context:{attachment:attachments()[0]}\"></ng-container>\n}\n\n<!-- If two files or more, li loop -->\n@if (attachments().length > 1) {\n<ul class=\"list-unstyled file-to-download-items\">\n @for (attachment of attachments(); track attachment) {\n <li class=\"file-to-download-list-item\">\n <ng-container *ngTemplateOutlet=\"file;context:{attachment:attachment}\"></ng-container>\n </li>\n }\n</ul>\n}\n\n<ng-template #file let-attachment=\"attachment\">\n <a [href]=\"attachment.url\" class=\"file-to-download-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n <span class=\"file-to-download-name\">\n {{ attachment.label ? attachment.label : ('_SHARED.ATTACHMENT_DEFAULT_LABEL' | translate ) }}\n </span>\n <span class=\"file-to-download-info\">\n @if (attachment.extension && attachment.size) {\n {{attachment.extension.toUpperCase()}} {{attachment.size * 1024 | formatFileSize}}\n }\n <cw-icon [icon]=\"spriteIcon\" font=\"optyweb\" [label]=\"'_COMMON.NEW_WINDOW' |translate\" [type]=\"iconType.default\"\n [iconSize]=\"iconSize['md']\" iconCssClass=\"file-to-download-download\"></cw-icon>\n </span>\n </a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5042
5206
  }
5043
5207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FileToDownloadComponent, decorators: [{
5044
5208
  type: Component,
@@ -5100,7 +5264,7 @@ class NumericalRangeComponent {
5100
5264
  this.newAmount.emit(next);
5101
5265
  }
5102
5266
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: NumericalRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5103
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: NumericalRangeComponent, isStandalone: true, selector: "cw-numerical-range", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, amount: { classPropertyName: "amount", publicName: "amount", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, withLabelVisible: { classPropertyName: "withLabelVisible", publicName: "withLabelVisible", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, ceil: { classPropertyName: "ceil", publicName: "ceil", isSignal: true, isRequired: false, transformFunction: null }, floor: { classPropertyName: "floor", publicName: "floor", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, autoChangeAmount: { classPropertyName: "autoChangeAmount", publicName: "autoChangeAmount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { amount: "amountChange", newAmount: "newAmount" }, ngImport: i0, template: "<div class=\"numerical-range text-center\" [ngClass]=\"'numerical-range-' + type()\">\n\n @if (labelPosition() === labelPositionValue.outside && withLabelVisible()) {\n <div class=\"numerical-range-label\" aria-hidden=\"true\">\n @if (withIcon() && (type() === numericalRangeType.largeWhite || type() === numericalRangeType.largeGrey)) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSize['lg']\"></cw-icon>\n }\n <span>{{ label() }}</span>\n </div>\n }\n\n <div class=\"numerical-range-container\">\n <!-- Libelle deja traduit (cle a parametres) : cw-button le repasse au translate sans effet. -->\n <cw-button [isDisabled]=\"isDisabled() || amount() <= floor()\"\n [label]=\"'_COMMON._NUMERICAL_RANGE.DECREASE' | translate: { label: label(), amount: amount() }\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"decreaseAmount()\">\n </cw-button>\n\n <div class=\"numerical-range-wrapper\">\n <div class=\"numerical-range-amount\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ amount() }}\n @if (!withLabelVisible() && !withIcon()) {\n <span class=\"visually-hidden\">{{ label() }}</span>\n }\n </div>\n\n @if ((type() !== numericalRangeType.largeGrey && type() !== numericalRangeType.largeWhite) && (withIcon() ||\n withLabelVisible())) {\n <div class=\"numerical-range-label\">\n @if (withLabelVisible() && labelPosition() === labelPositionValue.inside) {\n @if (withIcon()) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSize['lg']\" aria-hidden=\"true\"></cw-icon>\n }\n <span>{{ label() }}</span>\n }\n @else {\n @if (withIcon()) {\n <cw-icon [icon]=\"withIcon()!\" [label]=\"label()\" [iconSize]=\"iconSize['lg']\"></cw-icon>\n }\n }\n </div>\n }\n </div>\n\n <cw-button [isDisabled]=\"isDisabled() || amount() >= ceil()\"\n [label]=\"'_COMMON._NUMERICAL_RANGE.INCREASE' | translate: { label: label(), amount: amount() }\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"increaseAmount()\">\n </cw-button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5267
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: NumericalRangeComponent, isStandalone: true, selector: "cw-numerical-range", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, amount: { classPropertyName: "amount", publicName: "amount", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, withLabelVisible: { classPropertyName: "withLabelVisible", publicName: "withLabelVisible", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, ceil: { classPropertyName: "ceil", publicName: "ceil", isSignal: true, isRequired: false, transformFunction: null }, floor: { classPropertyName: "floor", publicName: "floor", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, autoChangeAmount: { classPropertyName: "autoChangeAmount", publicName: "autoChangeAmount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { amount: "amountChange", newAmount: "newAmount" }, ngImport: i0, template: "<div class=\"numerical-range text-center\" [ngClass]=\"'numerical-range-' + type()\">\n\n @if (labelPosition() === labelPositionValue.outside && withLabelVisible()) {\n <div class=\"numerical-range-label\" aria-hidden=\"true\">\n @if (withIcon() && (type() === numericalRangeType.largeWhite || type() === numericalRangeType.largeGrey)) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSize['lg']\"></cw-icon>\n }\n <span>{{ label() }}</span>\n </div>\n }\n\n <div class=\"numerical-range-container\">\n <!-- Libelle deja traduit (cle a parametres) : cw-button le repasse au translate sans effet. -->\n <cw-button [isDisabled]=\"isDisabled() || amount() <= floor()\"\n [label]=\"'_COMMON._NUMERICAL_RANGE.DECREASE' | translate: { label: label(), amount: amount() }\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"decreaseAmount()\">\n </cw-button>\n\n <div class=\"numerical-range-wrapper\">\n <div class=\"numerical-range-amount\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ amount() }}\n @if (!withLabelVisible() && !withIcon()) {\n <span class=\"visually-hidden\">{{ label() }}</span>\n }\n </div>\n\n @if ((type() !== numericalRangeType.largeGrey && type() !== numericalRangeType.largeWhite) && (withIcon() ||\n withLabelVisible())) {\n <div class=\"numerical-range-label\">\n @if (withLabelVisible() && labelPosition() === labelPositionValue.inside) {\n @if (withIcon()) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSize['lg']\" aria-hidden=\"true\"></cw-icon>\n }\n <span>{{ label() }}</span>\n }\n @else {\n @if (withIcon()) {\n <cw-icon [icon]=\"withIcon()!\" [label]=\"label()\" [iconSize]=\"iconSize['lg']\"></cw-icon>\n }\n }\n </div>\n }\n </div>\n\n <cw-button [isDisabled]=\"isDisabled() || amount() >= ceil()\"\n [label]=\"'_COMMON._NUMERICAL_RANGE.INCREASE' | translate: { label: label(), amount: amount() }\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"increaseAmount()\">\n </cw-button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { 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: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5104
5268
  }
5105
5269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: NumericalRangeComponent, decorators: [{
5106
5270
  type: Component,
@@ -5198,7 +5362,7 @@ class BreadcrumbComponent {
5198
5362
  return !!item.link && item.isCurrent !== true;
5199
5363
  }
5200
5364
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5201
- 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", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5365
+ 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 }); }
5202
5366
  }
5203
5367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: BreadcrumbComponent, decorators: [{
5204
5368
  type: Component,
@@ -5497,7 +5661,7 @@ class FileDropComponent {
5497
5661
  useExisting: forwardRef(() => FileDropComponent),
5498
5662
  multi: true,
5499
5663
  },
5500
- ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #fileInput\n type=\"file\"\n hidden\n [accept]=\"effectiveAccept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\" />\n\n@if (label()) {\n <span class=\"file-drop-label\">{{ label()! | translate }}</span>\n}\n\n@if (errorMessage()) {\n <!-- Etat erreur global (DS : Dropzone / Connexion Error) -->\n <div class=\"file-drop file-drop-error\" [attr.data-test-ctw]=\"dataTest() || null\">\n <cw-icon class=\"file-drop-icon\" [icon]=\"spriteIcon.error\" [iconSize]=\"iconSize['2xl']\"></cw-icon>\n <p class=\"file-drop-text\">{{ errorMessage() }}</p>\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._FILE_DROP.RETRY' | translate\"\n [withIcon]=\"spriteIcon.refresh\"\n (click)=\"onRetry()\"></cw-button>\n </div>\n} @else {\n <!-- Zone de depot (masquee quand la limite de fichiers est atteinte) -->\n @if (!limitReached()) {\n <div\n class=\"file-drop\"\n [class.file-drop-dragging]=\"isDragging()\"\n [class.file-drop-disabled]=\"disabled()\"\n [class.file-drop-picture]=\"isPicture()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-label]=\"((label() ?? '') | translate) || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-test-ctw]=\"dataTest() || null\"\n (click)=\"openPicker()\"\n (keydown)=\"onKeydown($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n @if (isPicture()) {\n <span class=\"file-drop-illustration\" aria-hidden=\"true\">\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"cw-file-drop-illu\"><rect width=\"64\" height=\"64\" rx=\"8\" /></clipPath>\n </defs>\n <g clip-path=\"url(#cw-file-drop-illu)\">\n <rect width=\"64\" height=\"64\" fill=\"#dde8f5\" />\n <circle cx=\"45\" cy=\"19\" r=\"7\" fill=\"#ffd166\" />\n <path d=\"M0 64 L22 36 L38 58 L50 28 L64 50 L64 64 Z\" fill=\"#8bbd5a\" />\n <path d=\"M0 64 L16 44 L32 64 Z\" fill=\"#a8c97a\" />\n </g>\n <rect x=\"0.5\" y=\"0.5\" width=\"63\" height=\"63\" rx=\"7.5\" fill=\"none\" stroke=\"#c8d6df\" />\n </svg>\n </span>\n } @else {\n <svg\n class=\"file-drop-icon\"\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 16.5h1.5a3.5 3.5 0 0 0 .4-6.98A5.5 5.5 0 0 0 7.5 8.6 4 4 0 0 0 7 16.5h1\" />\n <path d=\"M12 20.5V12\" />\n <path d=\"M8.75 15.25 12 12l3.25 3.25\" />\n </svg>\n }\n\n <p class=\"file-drop-text\">\n <span class=\"file-drop-link\">{{ '_COMMON._FILE_DROP.EXPLORE' | translate }}</span>\n {{ (isPicture() ? '_COMMON._FILE_DROP.DROP_HINT_PICTURE' : '_COMMON._FILE_DROP.DROP_HINT') | translate }}\n </p>\n\n @if (acceptLabel() || maxSizeMb() != null || (isPicture() && recommendedDimensions())) {\n <ul class=\"file-drop-hints\">\n @if (acceptLabel()) {\n <li>{{ '_COMMON._FILE_DROP.ACCEPTED_FORMATS' | translate: { formats: acceptLabel() } }}</li>\n }\n @if (maxSizeMb() != null) {\n <li>{{ '_COMMON._FILE_DROP.MAX_SIZE' | translate: { size: maxSizeMb() + ' Mo' } }}</li>\n }\n @if (isPicture() && recommendedDimensions()) {\n <li>{{ '_COMMON._FILE_DROP.RECOMMENDED_DIMENSIONS' | translate: { dimensions: recommendedDimensions() } }}</li>\n }\n </ul>\n }\n </div>\n }\n\n <!-- Liste des fichiers / miniatures -->\n @if (items().length) {\n @if (isPicture()) {\n <ul class=\"file-drop-previews\">\n @for (item of items(); track item.file) {\n <li class=\"file-drop-preview\" [class.file-drop-preview-error]=\"item.status === statusEnum.error\">\n @if (item.previewUrl) {\n <img class=\"file-drop-preview-img\" [src]=\"item.previewUrl\" [alt]=\"item.file.name\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiPhoto\" [iconSize]=\"iconSize.lg\"></cw-icon>\n }\n <button\n type=\"button\"\n class=\"file-drop-remove\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.close\" [iconSize]=\"iconSize.xs\"></cw-icon>\n </button>\n @if (item.status === statusEnum.error) {\n <span class=\"file-drop-preview-reason\">{{ reasonKey(item) | translate }}</span>\n }\n </li>\n }\n </ul>\n } @else {\n <ul class=\"file-drop-list\">\n @for (item of items(); track item.file) {\n <li\n class=\"file-drop-file\"\n [class.file-drop-file-error]=\"item.status === statusEnum.error\">\n <span class=\"file-drop-file-label\">\n {{ '_COMMON._FILE_DROP.SELECTED_FILE' | translate }}\n <span class=\"file-drop-file-name\">{{ item.file.name }}</span>\n <span class=\"file-drop-file-size\">({{ humanSize(item.file.size) }})</span>\n </span>\n\n @if (item.status === statusEnum.error) {\n <cw-badge [type]=\"badgeType.lightDanger\" [label]=\"reasonKey(item)\"></cw-badge>\n } @else {\n <cw-badge [type]=\"badgeType.lightSuccess\" [label]=\"'_COMMON._FILE_DROP.IMPORTED'\"></cw-badge>\n }\n\n <button\n type=\"button\"\n class=\"file-drop-remove file-drop-remove-danger\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.trash\" [iconSize]=\"iconSize.sm\"></cw-icon>\n </button>\n </li>\n }\n </ul>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5664
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #fileInput\n type=\"file\"\n hidden\n [accept]=\"effectiveAccept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\" />\n\n@if (label()) {\n <span class=\"file-drop-label\">{{ label()! | translate }}</span>\n}\n\n@if (errorMessage()) {\n <!-- Etat erreur global (DS : Dropzone / Connexion Error) -->\n <div class=\"file-drop file-drop-error\" [attr.data-test-ctw]=\"dataTest() || null\">\n <cw-icon class=\"file-drop-icon\" [icon]=\"spriteIcon.error\" [iconSize]=\"iconSize['2xl']\"></cw-icon>\n <p class=\"file-drop-text\">{{ errorMessage() }}</p>\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._FILE_DROP.RETRY' | translate\"\n [withIcon]=\"spriteIcon.refresh\"\n (click)=\"onRetry()\"></cw-button>\n </div>\n} @else {\n <!-- Zone de depot (masquee quand la limite de fichiers est atteinte) -->\n @if (!limitReached()) {\n <div\n class=\"file-drop\"\n [class.file-drop-dragging]=\"isDragging()\"\n [class.file-drop-disabled]=\"disabled()\"\n [class.file-drop-picture]=\"isPicture()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-label]=\"((label() ?? '') | translate) || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-test-ctw]=\"dataTest() || null\"\n (click)=\"openPicker()\"\n (keydown)=\"onKeydown($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n @if (isPicture()) {\n <span class=\"file-drop-illustration\" aria-hidden=\"true\">\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"cw-file-drop-illu\"><rect width=\"64\" height=\"64\" rx=\"8\" /></clipPath>\n </defs>\n <g clip-path=\"url(#cw-file-drop-illu)\">\n <rect width=\"64\" height=\"64\" fill=\"#dde8f5\" />\n <circle cx=\"45\" cy=\"19\" r=\"7\" fill=\"#ffd166\" />\n <path d=\"M0 64 L22 36 L38 58 L50 28 L64 50 L64 64 Z\" fill=\"#8bbd5a\" />\n <path d=\"M0 64 L16 44 L32 64 Z\" fill=\"#a8c97a\" />\n </g>\n <rect x=\"0.5\" y=\"0.5\" width=\"63\" height=\"63\" rx=\"7.5\" fill=\"none\" stroke=\"#c8d6df\" />\n </svg>\n </span>\n } @else {\n <svg\n class=\"file-drop-icon\"\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 16.5h1.5a3.5 3.5 0 0 0 .4-6.98A5.5 5.5 0 0 0 7.5 8.6 4 4 0 0 0 7 16.5h1\" />\n <path d=\"M12 20.5V12\" />\n <path d=\"M8.75 15.25 12 12l3.25 3.25\" />\n </svg>\n }\n\n <p class=\"file-drop-text\">\n <span class=\"file-drop-link\">{{ '_COMMON._FILE_DROP.EXPLORE' | translate }}</span>\n {{ (isPicture() ? '_COMMON._FILE_DROP.DROP_HINT_PICTURE' : '_COMMON._FILE_DROP.DROP_HINT') | translate }}\n </p>\n\n @if (acceptLabel() || maxSizeMb() != null || (isPicture() && recommendedDimensions())) {\n <ul class=\"file-drop-hints\">\n @if (acceptLabel()) {\n <li>{{ '_COMMON._FILE_DROP.ACCEPTED_FORMATS' | translate: { formats: acceptLabel() } }}</li>\n }\n @if (maxSizeMb() != null) {\n <li>{{ '_COMMON._FILE_DROP.MAX_SIZE' | translate: { size: maxSizeMb() + ' Mo' } }}</li>\n }\n @if (isPicture() && recommendedDimensions()) {\n <li>{{ '_COMMON._FILE_DROP.RECOMMENDED_DIMENSIONS' | translate: { dimensions: recommendedDimensions() } }}</li>\n }\n </ul>\n }\n </div>\n }\n\n <!-- Liste des fichiers / miniatures -->\n @if (items().length) {\n @if (isPicture()) {\n <ul class=\"file-drop-previews\">\n @for (item of items(); track item.file) {\n <li class=\"file-drop-preview\" [class.file-drop-preview-error]=\"item.status === statusEnum.error\">\n @if (item.previewUrl) {\n <img class=\"file-drop-preview-img\" [src]=\"item.previewUrl\" [alt]=\"item.file.name\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiPhoto\" [iconSize]=\"iconSize.lg\"></cw-icon>\n }\n <button\n type=\"button\"\n class=\"file-drop-remove\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.close\" [iconSize]=\"iconSize.xs\"></cw-icon>\n </button>\n @if (item.status === statusEnum.error) {\n <span class=\"file-drop-preview-reason\">{{ reasonKey(item) | translate }}</span>\n }\n </li>\n }\n </ul>\n } @else {\n <ul class=\"file-drop-list\">\n @for (item of items(); track item.file) {\n <li\n class=\"file-drop-file\"\n [class.file-drop-file-error]=\"item.status === statusEnum.error\">\n <span class=\"file-drop-file-label\">\n {{ '_COMMON._FILE_DROP.SELECTED_FILE' | translate }}\n <span class=\"file-drop-file-name\">{{ item.file.name }}</span>\n <span class=\"file-drop-file-size\">({{ humanSize(item.file.size) }})</span>\n </span>\n\n @if (item.status === statusEnum.error) {\n <cw-badge [type]=\"badgeType.lightDanger\" [label]=\"reasonKey(item)\"></cw-badge>\n } @else {\n <cw-badge [type]=\"badgeType.lightSuccess\" [label]=\"'_COMMON._FILE_DROP.IMPORTED'\"></cw-badge>\n }\n\n <button\n type=\"button\"\n class=\"file-drop-remove file-drop-remove-danger\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.trash\" [iconSize]=\"iconSize.sm\"></cw-icon>\n </button>\n </li>\n }\n </ul>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "text", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { 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: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "labelParams", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5501
5665
  }
5502
5666
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FileDropComponent, decorators: [{
5503
5667
  type: Component,
@@ -5589,13 +5753,50 @@ class EmptyStateComponent {
5589
5753
  }, ...(ngDevMode ? [{ debugName: "illustrationSrc" }] : []));
5590
5754
  }
5591
5755
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5592
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: EmptyStateComponent, isStandalone: true, selector: "cw-empty-state", inputs: { illustration: { classPropertyName: "illustration", publicName: "illustration", isSignal: true, isRequired: false, transformFunction: null }, illustrationBasePath: { classPropertyName: "illustrationBasePath", publicName: "illustrationBasePath", isSignal: true, isRequired: false, transformFunction: null }, imageSource: { classPropertyName: "imageSource", publicName: "imageSource", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, titleParams: { classPropertyName: "titleParams", publicName: "titleParams", isSignal: true, isRequired: false, transformFunction: null }, titleSuffix: { classPropertyName: "titleSuffix", publicName: "titleSuffix", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, descriptionParams: { classPropertyName: "descriptionParams", publicName: "descriptionParams", isSignal: true, isRequired: false, transformFunction: null }, primaryButton: { classPropertyName: "primaryButton", publicName: "primaryButton", isSignal: true, isRequired: false, transformFunction: null }, secondaryButton: { classPropertyName: "secondaryButton", publicName: "secondaryButton", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryClick: "primaryClick", secondaryClick: "secondaryClick" }, ngImport: i0, template: "<div class=\"empty-state\" [attr.data-test-ctw]=\"dataTest() || null\">\n @if (imageSource()) {\n <img\n class=\"empty-state-illustration\"\n [src]=\"imageSource()!\"\n [alt]=\"imageAlt()\"\n [attr.aria-hidden]=\"imageAlt() ? null : 'true'\" />\n } @else if (showIllustration()) {\n <img class=\"empty-state-illustration\" [src]=\"illustrationSrc()\" alt=\"\" aria-hidden=\"true\" />\n }\n\n <p class=\"empty-state-title\">{{ (title() | translate: titleParams()) + (titleSuffix() ? ' ' + titleSuffix() : '') }}</p>\n <!-- Contenu projete sous le titre (ex. mention de portee ajoutee par cw-table). -->\n <ng-content />\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate: descriptionParams() }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5756
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: EmptyStateComponent, isStandalone: true, selector: "cw-empty-state", inputs: { illustration: { classPropertyName: "illustration", publicName: "illustration", isSignal: true, isRequired: false, transformFunction: null }, illustrationBasePath: { classPropertyName: "illustrationBasePath", publicName: "illustrationBasePath", isSignal: true, isRequired: false, transformFunction: null }, imageSource: { classPropertyName: "imageSource", publicName: "imageSource", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, titleParams: { classPropertyName: "titleParams", publicName: "titleParams", isSignal: true, isRequired: false, transformFunction: null }, titleSuffix: { classPropertyName: "titleSuffix", publicName: "titleSuffix", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, descriptionParams: { classPropertyName: "descriptionParams", publicName: "descriptionParams", isSignal: true, isRequired: false, transformFunction: null }, primaryButton: { classPropertyName: "primaryButton", publicName: "primaryButton", isSignal: true, isRequired: false, transformFunction: null }, secondaryButton: { classPropertyName: "secondaryButton", publicName: "secondaryButton", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryClick: "primaryClick", secondaryClick: "secondaryClick" }, ngImport: i0, template: "<div class=\"empty-state\" [attr.data-test-ctw]=\"dataTest() || null\">\n @if (imageSource()) {\n <img\n class=\"empty-state-illustration\"\n [src]=\"imageSource()!\"\n [alt]=\"imageAlt()\"\n [attr.aria-hidden]=\"imageAlt() ? null : 'true'\" />\n } @else if (showIllustration()) {\n <img class=\"empty-state-illustration\" [src]=\"illustrationSrc()\" alt=\"\" aria-hidden=\"true\" />\n }\n\n <p class=\"empty-state-title\">{{ (title() | translate: titleParams()) + (titleSuffix() ? ' ' + titleSuffix() : '') }}</p>\n <!-- Contenu projete sous le titre (ex. mention de portee ajoutee par cw-table). -->\n <ng-content />\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate: descriptionParams() }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n", dependencies: [{ 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: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5593
5757
  }
5594
5758
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, decorators: [{
5595
5759
  type: Component,
5596
5760
  args: [{ selector: 'cw-empty-state', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TranslatePipe, ButtonComponent], template: "<div class=\"empty-state\" [attr.data-test-ctw]=\"dataTest() || null\">\n @if (imageSource()) {\n <img\n class=\"empty-state-illustration\"\n [src]=\"imageSource()!\"\n [alt]=\"imageAlt()\"\n [attr.aria-hidden]=\"imageAlt() ? null : 'true'\" />\n } @else if (showIllustration()) {\n <img class=\"empty-state-illustration\" [src]=\"illustrationSrc()\" alt=\"\" aria-hidden=\"true\" />\n }\n\n <p class=\"empty-state-title\">{{ (title() | translate: titleParams()) + (titleSuffix() ? ' ' + titleSuffix() : '') }}</p>\n <!-- Contenu projete sous le titre (ex. mention de portee ajoutee par cw-table). -->\n <ng-content />\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate: descriptionParams() }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n" }]
5597
5761
  }], propDecorators: { illustration: [{ type: i0.Input, args: [{ isSignal: true, alias: "illustration", required: false }] }], illustrationBasePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "illustrationBasePath", required: false }] }], imageSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSource", required: false }] }], imageAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageAlt", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], titleParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleParams", required: false }] }], titleSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleSuffix", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], descriptionParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptionParams", required: false }] }], primaryButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryButton", required: false }] }], secondaryButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryButton", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], primaryClick: [{ type: i0.Output, args: ["primaryClick"] }], secondaryClick: [{ type: i0.Output, args: ["secondaryClick"] }] } });
5598
5762
 
5763
+ /**
5764
+ * Separateur horizontal, base sur le DS (BOU) `Layout / Divider` : ligne de 1px a la couleur
5765
+ * `component/divider/surface`, avec ou sans marge verticale (variante `Margin`).
5766
+ *
5767
+ * L'hote porte `cw-divider` : c'est la classe sur laquelle les tokens `component/divider/*`
5768
+ * sont scopes, sans elle `var(--cw-divider-*)` ne resout pas.
5769
+ */
5770
+ class DividerComponent {
5771
+ constructor() {
5772
+ /** Marge verticale DS (`padding/md`, 16px) au-dessus et au-dessous de la ligne. */
5773
+ this.spaced = input(false, ...(ngDevMode ? [{ debugName: "spaced" }] : []));
5774
+ /**
5775
+ * Separateur purement visuel : masque aux lecteurs d'ecran. A utiliser quand les blocs
5776
+ * separes ont deja leurs propres titres ; laisser `false` quand la ligne marque seule
5777
+ * un changement de section.
5778
+ */
5779
+ this.decorative = input(false, ...(ngDevMode ? [{ debugName: "decorative" }] : []));
5780
+ }
5781
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: DividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5782
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.20", type: DividerComponent, isStandalone: true, selector: "cw-divider", inputs: { spaced: { classPropertyName: "spaced", publicName: "spaced", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class.cw-divider-spaced": "spaced()", "attr.aria-hidden": "decorative() ? \"true\" : null" }, classAttribute: "cw-divider" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5783
+ }
5784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: DividerComponent, decorators: [{
5785
+ type: Component,
5786
+ args: [{
5787
+ selector: 'cw-divider',
5788
+ standalone: true,
5789
+ changeDetection: ChangeDetectionStrategy.OnPush,
5790
+ template: '',
5791
+ host: {
5792
+ class: 'cw-divider',
5793
+ role: 'separator',
5794
+ '[class.cw-divider-spaced]': 'spaced()',
5795
+ '[attr.aria-hidden]': 'decorative() ? "true" : null',
5796
+ },
5797
+ }]
5798
+ }], propDecorators: { spaced: [{ type: i0.Input, args: [{ isSignal: true, alias: "spaced", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }] } });
5799
+
5599
5800
  /**
5600
5801
  * Sélecteur de langue présentational.
5601
5802
  *
@@ -5653,7 +5854,7 @@ class LanguageSelectorComponent {
5653
5854
  this.trigger()?.closeDropdown();
5654
5855
  }
5655
5856
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5656
- 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", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "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 }); }
5857
+ 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 }); }
5657
5858
  }
5658
5859
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
5659
5860
  type: Component,
@@ -5702,7 +5903,7 @@ class ThemeSelectorComponent {
5702
5903
  this.trigger()?.closeDropdown();
5703
5904
  }
5704
5905
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ThemeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5705
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ThemeSelectorComponent, isStandalone: true, selector: "cw-theme-selector", inputs: { themes: { classPropertyName: "themes", publicName: "themes", isSignal: true, isRequired: false, transformFunction: null }, currentTheme: { classPropertyName: "currentTheme", publicName: "currentTheme", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { themeChange: "themeChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"activeOption()?.labelKey ?? '_COMMON._THEME.LBL_THEME'\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"activeOption()?.icon\"\n [withOnlyIcon]=\"true\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._THEME.LBL_THEME' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._THEME.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._THEME.LBL_THEME' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (theme of themes(); track theme.key) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"theme.key === currentTheme()\"\n [attr.aria-checked]=\"theme.key === currentTheme()\"\n (click)=\"onSelect(theme.key)\">\n <cw-icon [icon]=\"theme.icon\" [iconSize]=\"iconSizeEnum.sm\"></cw-icon>\n <span class=\"flex-1\">{{ theme.labelKey | translate }}</span>\n @if (theme.key === currentTheme()) {\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", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "isPressed", "ariaDescribedBy", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5906
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ThemeSelectorComponent, isStandalone: true, selector: "cw-theme-selector", inputs: { themes: { classPropertyName: "themes", publicName: "themes", isSignal: true, isRequired: false, transformFunction: null }, currentTheme: { classPropertyName: "currentTheme", publicName: "currentTheme", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { themeChange: "themeChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"activeOption()?.labelKey ?? '_COMMON._THEME.LBL_THEME'\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"activeOption()?.icon\"\n [withOnlyIcon]=\"true\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._THEME.LBL_THEME' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._THEME.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._THEME.LBL_THEME' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (theme of themes(); track theme.key) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"theme.key === currentTheme()\"\n [attr.aria-checked]=\"theme.key === currentTheme()\"\n (click)=\"onSelect(theme.key)\">\n <cw-icon [icon]=\"theme.icon\" [iconSize]=\"iconSizeEnum.sm\"></cw-icon>\n <span class=\"flex-1\">{{ theme.labelKey | translate }}</span>\n @if (theme.key === currentTheme()) {\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: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5706
5907
  }
5707
5908
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ThemeSelectorComponent, decorators: [{
5708
5909
  type: Component,
@@ -5868,5 +6069,5 @@ const CW_DEFAULT_THEME_OPTIONS = [
5868
6069
  * Generated bundle index. Do not edit.
5869
6070
  */
5870
6071
 
5871
- export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, BreadcrumbComponent, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CW_DEFAULT_THEME_OPTIONS, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, CwThemeKeyEnum, CwTooltipDirective, DropdownComponent, DropdownItemDirective, DropdownPositionEnum, EmptyStateComponent, EmptyStateIllustrationEnum, FileDropComponent, FileDropFileStatusEnum, FileDropModeEnum, FileDropRejectReasonEnum, FilePreviewComponent, FileToDownloadComponent, FoButtonTypeEnum, FoTabTypeEnum, FocusTrackerService, FormFieldComponent, FormFieldTypeEnum, IconComponent, IconNotifSizeEnum, IconNotifTypeEnum, IconNotificationComponent, IconSizeEnum, IconTypeEnum, IconUiTypeEnum, ImageComponent, LanguageSelectorComponent, LegendColorEnum, LegendComponent, LegendTypeEnum, LoaderComponent, LoaderSizeEnum, ModalsComponent, ModalsService, ModalsSize, ModalsState, ModalsTextType, ModalsType, NumericalRangeComponent, NumericalRangeLabelPositionEnum, NumericalRangeTypeEnum, PlacementEnum, RequiredInfoComponent, ResponsiveService, SkipLinksComponent, SpriteIconEnum, StepperComponent, TOAST_AUTOHIDE_DELAY_MS, TabComponent, TabContentComponent, ThemeSelectorComponent, ThemeService, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastItemComponent, ToastService, TooltipPositionEnum, TriggerTooltipEnum, TypeTooltipEnum, rangeValidator, resolveArrowPos };
6072
+ export { AccordionComponent, AlertComponent, AlertLiveEnum, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, BreadcrumbComponent, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CW_DEFAULT_THEME_OPTIONS, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, CwThemeKeyEnum, CwTooltipDirective, DividerComponent, DropdownComponent, DropdownItemDirective, DropdownPositionEnum, EmptyStateComponent, EmptyStateIllustrationEnum, FileDropComponent, FileDropFileStatusEnum, FileDropModeEnum, FileDropRejectReasonEnum, FilePreviewComponent, FileToDownloadComponent, FoButtonTypeEnum, FoTabTypeEnum, FocusTrackerService, FormFieldComponent, FormFieldTypeEnum, IconComponent, IconNotifSizeEnum, IconNotifTypeEnum, IconNotificationComponent, IconSizeEnum, IconTypeEnum, IconUiTypeEnum, ImageComponent, LanguageSelectorComponent, LegendColorEnum, LegendComponent, LegendTypeEnum, LoaderComponent, LoaderSizeEnum, ModalsComponent, ModalsService, ModalsSize, ModalsState, ModalsTextType, ModalsType, NumericalRangeComponent, NumericalRangeLabelPositionEnum, NumericalRangeTypeEnum, PlacementEnum, RequiredInfoComponent, ResponsiveService, SkipLinksComponent, SpriteIconEnum, StepperComponent, TOAST_AUTOHIDE_DELAY_MS, TabComponent, TabContentComponent, ThemeSelectorComponent, ThemeService, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastItemComponent, ToastService, TooltipPositionEnum, TriggerTooltipEnum, TypeTooltipEnum, rangeValidator, resolveArrowPos };
5872
6073
  //# sourceMappingURL=cityway-basic-ui.mjs.map