@cityway/basic-ui 1.1.0-beta033 → 1.1.0-beta034

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.
@@ -1360,19 +1360,24 @@ class ToastComponent {
1360
1360
  }
1361
1361
  ngAfterViewInit() {
1362
1362
  // Listener enregistre via Renderer2 + teardown DestroyRef (auparavant addEventListener jamais retire).
1363
- const unlisten = this.renderer.listen('document', 'scroll', () => {
1364
- // Offset document (invariant au scroll, mais recalcule => reflete les changements de layout ;
1365
- // auparavant getBoundingClientRect() etait fige une seule fois dans ngAfterViewInit).
1366
- const rect = this.elRef.nativeElement.getBoundingClientRect();
1367
- const elemDocTop = rect.top + window.scrollY;
1368
- if (window.scrollY >= elemDocTop * 2) {
1369
- this.elRef.nativeElement.classList.remove('is-absolute');
1370
- }
1371
- else {
1372
- this.elRef.nativeElement.classList.add('is-absolute');
1373
- }
1374
- });
1363
+ const unlisten = this.renderer.listen('document', 'scroll', () => this.updatePosition());
1375
1364
  this.destroyRef.onDestroy(unlisten);
1365
+ this.updatePosition();
1366
+ }
1367
+ /**
1368
+ * En haut de page, le toast reste a sa place dans le flux (`.is-absolute`) ; une fois cette place sortie de la
1369
+ * fenetre, il passe en `fixed` pour rester visible.
1370
+ * La mesure se fait TOUJOURS en `.is-absolute` (position dans le flux) : en `fixed`, `getBoundingClientRect()` ne
1371
+ * donne que le `top` du toast (16 px), pas sa place dans le document, et la decision s'inversait a chaque
1372
+ * defilement (toast hors ecran ou qui clignote). Meme tour de boucle : pas de rendu intermediaire.
1373
+ */
1374
+ updatePosition() {
1375
+ const host = this.elRef.nativeElement;
1376
+ host.classList.add('is-absolute');
1377
+ const docTop = host.getBoundingClientRect().top + window.scrollY;
1378
+ if (window.scrollY >= docTop) {
1379
+ host.classList.remove('is-absolute');
1380
+ }
1376
1381
  }
1377
1382
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1378
1383
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ToastComponent, isStandalone: true, selector: "cw-toast", outputs: { action: "action" }, host: { properties: { "class.toast": "true" } }, ngImport: i0, template: "@for (toast of toastService.toasts(); track toast.id) {\n <cw-toast-item [toast]=\"toast\" (action)=\"action.emit($event)\"></cw-toast-item>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToastItemComponent, selector: "cw-toast-item", inputs: ["toast"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -1864,6 +1869,8 @@ class ButtonComponent {
1864
1869
  this.withIcon = input(...(ngDevMode ? [undefined, { debugName: "withIcon" }] : []));
1865
1870
  this.withOnlyIcon = input(false, ...(ngDevMode ? [{ debugName: "withOnlyIcon" }] : []));
1866
1871
  this.iconSize = input(ButtonIconSizeEnum.default, ...(ngDevMode ? [{ debugName: "iconSize" }] : []));
1872
+ /** Taille du picto, indépendante de celle du bouton (`iconSize`). Par défaut : 16 px (12 px pour `small` et `xsmall`). `md` (20 px) pour un trait plus net. */
1873
+ this.glyphSize = input(...(ngDevMode ? [undefined, { debugName: "glyphSize" }] : []));
1867
1874
  this.iconPosition = input(ButtonPositionEnum.left, ...(ngDevMode ? [{ debugName: "iconPosition" }] : []));
1868
1875
  this.dropdownPosition = input(DropdownPositionEnum.right, ...(ngDevMode ? [{ debugName: "dropdownPosition" }] : []));
1869
1876
  this.isMinWidth = input(false, ...(ngDevMode ? [{ debugName: "isMinWidth" }] : []));
@@ -1936,6 +1943,16 @@ class ButtonComponent {
1936
1943
  * navigateurs). On le desactive alors par `aria-disabled` + classe `.disabled` (meme rendu),
1937
1944
  * il reste focusable et les clics sont bloques dans les handlers.
1938
1945
  */
1946
+ /** Taille effective du picto : `glyphSize` si fournie, sinon déduite de `iconSize` (icône seule) ou 16 px. */
1947
+ this.resolvedGlyphSize = computed(() => {
1948
+ const forced = this.glyphSize();
1949
+ if (forced)
1950
+ return forced;
1951
+ if (!this.withOnlyIcon())
1952
+ return IconSizeEnum.sm;
1953
+ const size = this.iconSize();
1954
+ return size === ButtonIconSizeEnum.xsmall || size === ButtonIconSizeEnum.small ? IconSizeEnum.xs : IconSizeEnum.sm;
1955
+ }, ...(ngDevMode ? [{ debugName: "resolvedGlyphSize" }] : []));
1939
1956
  this.isSoftDisabled = computed(() => this.isDisabled() && this.withTooltip(), ...(ngDevMode ? [{ debugName: "isSoftDisabled" }] : []));
1940
1957
  this.isNativeDisabled = computed(() => this.isDisabled() && !this.withTooltip(), ...(ngDevMode ? [{ debugName: "isNativeDisabled" }] : []));
1941
1958
  }
@@ -2111,7 +2128,7 @@ class ButtonComponent {
2111
2128
  this.destroyRef.onDestroy(unlisten);
2112
2129
  }
2113
2130
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2114
- 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" }] }); }
2131
+ 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 }, glyphSize: { classPropertyName: "glyphSize", publicName: "glyphSize", 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>\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"resolvedGlyphSize()\"></cw-icon>\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" }] }); }
2115
2132
  }
2116
2133
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ButtonComponent, decorators: [{
2117
2134
  type: Component,
@@ -2125,8 +2142,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
2125
2142
  ClickOutsideDirective,
2126
2143
  CwTooltipDirective,
2127
2144
  RouterLink
2128
- ], 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" }]
2129
- }], 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 }] }] } });
2145
+ ], 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>\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"resolvedGlyphSize()\"></cw-icon>\n</ng-template>\r\n" }]
2146
+ }], 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 }] }], glyphSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "glyphSize", 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 }] }] } });
2130
2147
 
2131
2148
  /**
2132
2149
  * Navigation clavier ARIA d'un conteneur de menu.
@@ -3582,7 +3599,7 @@ class FilePreviewComponent {
3582
3599
  });
3583
3600
  }
3584
3601
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3585
- 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 }); }
3602
+ 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", "glyphSize", "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 }); }
3586
3603
  }
3587
3604
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FilePreviewComponent, decorators: [{
3588
3605
  type: Component,
@@ -4639,7 +4656,7 @@ class FormFieldComponent {
4639
4656
  this.formControl.markAsTouched();
4640
4657
  }
4641
4658
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4642
- 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 }, labelParams: { classPropertyName: "labelParams", publicName: "labelParams", 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 }, requiredStart: { classPropertyName: "requiredStart", publicName: "requiredStart", isSignal: false, isRequired: false, transformFunction: null }, requiredEnd: { classPropertyName: "requiredEnd", publicName: "requiredEnd", isSignal: false, isRequired: false, transformFunction: null }, periodShortcuts: { classPropertyName: "periodShortcuts", publicName: "periodShortcuts", isSignal: false, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, helpParams: { classPropertyName: "helpParams", publicName: "helpParams", 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 }, { propertyName: "autocompleteOptionTpl", first: true, predicate: CwAutocompleteOptionDirective, descendants: true }], 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: ["ngSelect"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!isInAddon) {\r\n @if (\r\n type !== typeField.checkbox &&\r\n type !== typeField.radio &&\r\n type !== typeField.checkboxButton &&\r\n type !== typeField.radioButton &&\r\n type !== typeField.checkboxInline &&\r\n type !== typeField.radioInline &&\r\n type !== typeField.switch &&\r\n type !== typeField.range &&\r\n type !== typeField.switchSmall &&\r\n !isChoiceCard &&\r\n !isPeriod\r\n ) {\r\n <!-- Bouton d'aide HORS du <label> (bouton dans un label = HTML invalide, son libelle\r\n polluerait le nom accessible du champ et un clic activerait le label) : on aligne\r\n label + bouton dans un conteneur flex, seulement quand il y a une aide. -->\r\n @if (hasFieldTooltip) {\r\n <div class=\"d-flex-h gap-2xs\">\r\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n </div>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\r\n }\r\n }\r\n\r\n <!-- Une p\u00E9riode rend ses addons dans son propre field-group (entre les bornes et le fieldset). -->\r\n @if ((addonLeft || addonRight) && !isPeriod) {\r\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\r\n @if(addonLeft) {\r\n <div class=\"field-group-addon-left\">\r\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\r\n </div>\r\n }\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n @if(addonRight) {\r\n <div class=\"field-group-addon-right\">\r\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @else {\r\n @if ( isInInputGroup() ) {\r\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n }\r\n }\r\n\r\n <!-- Error message -->\r\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\r\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\r\n @if (\r\n !errorMessages?.['required'] &&\r\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\r\n ) {\r\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate: labelParams}\"></span>\r\n }\r\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\r\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\r\n }\r\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\r\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\r\n }\r\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\r\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\r\n }\r\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\r\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\r\n }\r\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\r\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\r\n }\r\n @if (errorMessages) {\r\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\r\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\r\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (help || autoHelpEntries.length) {\r\n <div [id]=\"name + '-help'\" class=\"field-text\">\r\n @if (help) {\r\n <span>{{ help | translate: helpParams }}</span>\r\n }\r\n @for (entry of autoHelpEntries; track entry.key) {\r\n <!-- Espace explicite : les blancs entre balises sont supprim\u00E9s \u00E0 la compilation. -->\r\n {{ ' ' }}<span>{{ entry.key | translate: entry.params }}</span>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Aper\u00E7u du fichier (type=file, opt-in) : sous le champ et ses aides, comme dans la\r\n maquette DS. La croix native du champ n'est pas retir\u00E9e \u2014 les deux vident le m\u00EAme\r\n control, l'aper\u00E7u ajoute juste \u00AB Visualiser \u00BB et une cible plus grande. -->\r\n @if (isPreviewVisible) {\r\n <cw-file-preview [file]=\"previewFile\" [existingFile]=\"existingFile ?? null\"\r\n [disabled]=\"!!isDisabledOrReadonly\" (remove)=\"onPreviewRemove()\" />\r\n }\r\n\r\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\r\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\r\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\r\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\r\n <ul class=\"autocomplete-chips\" role=\"list\">\r\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\r\n <li>\r\n <button type=\"button\" class=\"autocomplete-chip\"\r\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\r\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\r\n <span>{{ chip.label }}</span>\r\n @if (!isEffectivelyDisabled && !isReadonly) {\r\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n}\r\n@else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n}\r\n\r\n<ng-template #field>\r\n <!-- Autocomplete (mono / multi) -->\r\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\r\n <cw-autocomplete\r\n [id]=\"name\"\r\n [control]=\"formControl\"\r\n [fetcher]=\"autocompleteOptions.fetcher\"\r\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\r\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\r\n [columns]=\"autocompleteOptions.columns ?? []\"\r\n [optionTemplate]=\"autocompleteOptions.optionTemplate ?? autocompleteOptionTpl?.templateRef ?? null\"\r\n [resolver]=\"autocompleteOptions.resolver ?? null\"\r\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\r\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\r\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\r\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\r\n [multiple]=\"type === typeField.autocompleteMultiple\"\r\n [isRequired]=\"isRequired\"\r\n [isReadonly]=\"!!isReadonly\"\r\n [isDisabled]=\"isEffectivelyDisabled\"\r\n [ariaInvalid]=\"control.invalid && control.touched\"\r\n [ariaDescribedBy]=\"getDescribedBy(control)\"\r\n [placeholder]=\"placeholder\">\r\n </cw-autocomplete>\r\n }\r\n\r\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\r\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\r\n @if (type === typeField.richText) {\r\n <cw-rich-text-editor\r\n [id]=\"name\"\r\n [control]=\"formControl\"\r\n [options]=\"richTextOptions\"\r\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\r\n [isRequired]=\"isRequired\"\r\n [isReadonly]=\"!!isReadonly\"\r\n [isDisabled]=\"isEffectivelyDisabled\"\r\n [ariaInvalid]=\"control.invalid && control.touched\"\r\n [ariaDescribedBy]=\"getDescribedBy(control)\">\r\n </cw-rich-text-editor>\r\n }\r\n\r\n <!-- Text -->\r\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\r\n typeField.email,\r\n typeField.color, typeField.zipCode].includes(type)) {\r\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\r\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n }\r\n\r\n <!-- Phone (intl-tel-input) -->\r\n @if (type === typeField.phone) {\r\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\r\n }\r\n\r\n <!-- File -->\r\n @if (type === typeField.file) {\r\n <!-- L'input natif reste LE controle (focus, clavier, restitution aux lecteurs d'ecran,\r\n validation), mais il est masque visuellement : le libelle de son bouton et son\r\n \u00AB aucun fichier choisi \u00BB sont ecrits par le NAVIGATEUR, dans SA langue. Ils sont\r\n intraduisibles et ne suivent pas la langue de l'application \u2014 un utilisateur qui\r\n bascule en anglais garderait \u00AB Choisir un fichier \u00BB. On les reecrit donc a cote,\r\n traduits, dans une couche purement visuelle. -->\r\n <input #fileInput type=\"file\" class=\"field-control visually-hidden\" [id]=\"name\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\r\n [attr.accept]=\"acceptAttr\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n\r\n <!-- `aria-hidden` : doublon visuel de l'input, que les lecteurs d'ecran restituent deja\r\n (nom du champ, bouton de parcours, fichier selectionne). L'annoncer une seconde fois\r\n ne ferait que bavarder. Le clic est relaye a l'input, le clavier passe par lui. -->\r\n <span class=\"field-file\" aria-hidden=\"true\" (click)=\"openFilePicker()\">\r\n <span class=\"field-file-button\">{{ '_COMMON._FORM.CHOOSE_FILE' | translate }}</span>\r\n <span class=\"field-file-name\" [class.field-file-name-empty]=\"!selectedFileName\">\r\n {{ selectedFileName ?? ('_COMMON._FORM.NO_FILE_SELECTED' | translate) }}\r\n </span>\r\n </span>\r\n }\r\n\r\n @if (type === typeField.password) {\r\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n <cw-button [type]=\"buttonType.ghost\"\r\n cssClass=\"btn-password-field\"\r\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\r\n [withOnlyIcon]=\"true\"\r\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\r\n (btnAction)=\"togglePasswordVisibility()\">\r\n </cw-button>\r\n }\r\n\r\n <!-- Textarea -->\r\n @if (type === typeField.textarea) {\r\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\r\n }\r\n\r\n <!-- Select -->\r\n @if (type === typeField.select) {\r\n @defer (on immediate) {\r\n <ng-select #ngSelect [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\r\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\r\n\r\n <!-- Template pour les options -->\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\r\n @if (optionTemplate) {\r\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\r\n }\r\n @else {\r\n <div>{{ item.label | translate }}</div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Template pour le label -->\r\n <ng-template ng-label-tmp let-item=\"item\">\r\n @if (labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\r\n }\r\n @else {\r\n {{ (item.label | translate) || (placeholder | translate) }}\r\n }\r\n </ng-template>\r\n </ng-select>\r\n } @placeholder {\r\n <div class=\"field-control\" aria-hidden=\"true\"></div>\r\n }\r\n }\r\n\r\n <!-- NgSelect -->\r\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\r\n @defer (on immediate) {\r\n <ng-select #ngSelect [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\r\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\r\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\r\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\"\r\n (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\r\n\r\n <!-- Template pour les options -->\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\r\n @if (optionTemplate) {\r\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\r\n }\r\n @else {\r\n <div>{{ item.label | translate }}</div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Template pour le label -->\r\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\r\n @if (labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\r\n }\r\n @else {\r\n {{ (item.label | translate) || (placeholder | translate) }}\r\n }\r\n </ng-template>\r\n </ng-select>\r\n } @placeholder {\r\n <div class=\"field-control\" aria-hidden=\"true\"></div>\r\n }\r\n }\r\n\r\n <!-- Radio -->\r\n @if (type === typeField.radioInline || type === typeField.radio) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v gap-sm'\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"field-check\">\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n\r\n <!-- Radio button -->\r\n @if (type === typeField.radioButton) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <div class=\"field-group field-group-btn\">\r\n @for (opt of options; track opt.value) {\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n <!-- Cartes : checkbox / radio / switch (contr\u00F4le \u00E0 gauche, titre, description facultative) -->\r\n @if (isChoiceCard) {\r\n @if (isBooleanChoiceCard) {\r\n <!-- Carte bool\u00E9enne (sans options) : une case li\u00E9e au FormControl<boolean>, nomm\u00E9e par le titre. -->\r\n <div class=\"field-card-list\" [class.field-card-list-compact]=\"isChoiceCardCompact\">\r\n <label class=\"field-card d-flex-h items-start gap-xs\" [for]=\"name\" [class.field-switch]=\"isSwitchCard\" [class.field-switch-small]=\"isSwitchCard\">\r\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\"\r\n [attr.role]=\"isSwitchCard ? 'switch' : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"booleanCardDescribedBy\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\r\n <span class=\"d-flex-v gap-5xs\">\r\n <span class=\"field-card-title\">\r\n {{ label | translate: labelParams }}\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (!isChoiceCardCompact && description) {\r\n <span class=\"field-text\" [id]=\"name + '-desc'\">{{ description | translate }}</span>\r\n }\r\n </span>\r\n </label>\r\n </div>\r\n } @else {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"field-card-list list-unstyled mb-none\" [class.field-card-list-compact]=\"isChoiceCardCompact\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"d-flex-v\">\r\n <!-- Le label englobe toute la carte : un clic n'importe o\u00F9 coche l'option. -->\r\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\">\r\n @if (isRadioCard) {\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"field-check-input\"\r\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\r\n } @else {\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\r\n [attr.role]=\"isSwitchCard ? 'switch' : null\"\r\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n }\r\n <span class=\"d-flex-v gap-5xs\">\r\n <span class=\"field-card-title\">{{ opt.label | translate }}</span>\r\n @if (!isChoiceCardCompact && opt.description) {\r\n <span class=\"field-text\" [id]=\"name + '_' + opt.value + '-desc'\">{{ opt.description | translate }}</span>\r\n }\r\n </span>\r\n </label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n }\r\n\r\n <!-- Checkbox Switch -->\r\n @if ( type === typeField.switch || type === typeField.switchSmall)\r\n {\r\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\r\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\r\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate: labelParams }}</label>\r\n </div>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\r\n @if (isSingleCheckbox()) {\r\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\r\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\r\n class=\"field-check-input\"\r\n [class.is-invalid]=\"control?.invalid && control?.touched\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\r\n <label [for]=\"name\" class=\"field-check-label\">\r\n {{ label | translate: labelParams }}\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n </div>\r\n }\r\n @else if( options.length > 1) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\r\n {{ opt.label | translate }}\r\n </label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n @else {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\r\n {{ opt.label | translate }}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n }\r\n\r\n <!-- Checkbox button -->\r\n @if (type === typeField.checkboxButton && options.length > 0) {\r\n\r\n @if(options.length > 1) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <div class=\"field-group field-group-btn\">\r\n @for (opt of options; track opt.value) {\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n @else {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <div class=\"btn-group btn-group-secondary\">\r\n @for (opt of options; track opt.value) {\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\r\n {{ opt.label | translate}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n }\r\n\r\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\r\n @if (isPeriod) {\r\n <!-- Fieldset : le legend nomme la p\u00E9riode, \u00AB Du \u00BB / \u00AB au \u00BB sont les labels de chaque input. -->\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n <!-- Deux bornes obligatoires : ast\u00E9risque sur la p\u00E9riode ; une seule : sur sa borne. -->\r\n @if(isStartRequired && isEndRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <!-- \u00C9tats invalide / d\u00E9sactiv\u00E9 pos\u00E9s seulement avec addon ou raccourcis (rendu historique sinon). -->\r\n <div class=\"field-group\"\r\n [class.field-group-invalid]=\"hasPeriodAddons && isInvalid\"\r\n [class.field-group-disabled]=\"hasPeriodAddons && isDisabledOrReadonly\">\r\n @if (addonLeft) {\r\n <div class=\"field-group-addon-left\">\r\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\r\n </div>\r\n }\r\n <label class=\"field-group-addon-left\" [for]=\"name + '_start'\">\r\n {{ '_COMMON._DATES.FROM_TO_1' | translate }}\r\n @if(isStartRequired && !isEndRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_1' | translate) : null\"\r\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\r\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isStartRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isStartRequired\"\r\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\r\n (focus)=\"onFocusRange('start')\" (blur)=\"onBlurRange('start')\" />\r\n\r\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\r\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_START' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearFieldPeriod('start')\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n }\r\n <label class=\"field-group-addon-center\" [for]=\"name + '_end'\">\r\n {{ '_COMMON._DATES.FROM_TO_2' | translate }}\r\n @if(isEndRequired && !isStartRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_2' | translate) : null\"\r\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\r\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isEndRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isEndRequired\"\r\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\r\n (focus)=\"onFocusRange('end')\" (blur)=\"onBlurRange('end')\" />\r\n\r\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\r\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_END' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearFieldPeriod('end')\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n }\r\n\r\n <!-- Raccourcis (dateToDate) puis addon droit : dans le fieldset, apr\u00E8s la borne de fin. -->\r\n @for (shortcut of activePeriodShortcuts; track $index) {\r\n <div class=\"field-group-addon-right\">\r\n <button type=\"button\" class=\"btn btn-ghost\"\r\n [class.active]=\"isPeriodShortcutActive(shortcut)\"\r\n [attr.aria-pressed]=\"isPeriodShortcutActive(shortcut)\"\r\n [attr.aria-label]=\"shortcut.ariaLabel ? (shortcut.ariaLabel | translate) : null\"\r\n [attr.disabled]=\"isDisabledOrReadonly ? 'disabled' : null\"\r\n (click)=\"onPeriodShortcut(shortcut)\">\r\n {{ shortcut.label | translate }}\r\n </button>\r\n </div>\r\n }\r\n @if (addonRight) {\r\n <div class=\"field-group-addon-right\">\r\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\r\n\r\n <div class=\"field-group\">\r\n @if (type === typeField.dateComplexe) {\r\n <div class=\"field-group-addon-left\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n\r\n @if(formControl?.value && !isDisabledOrReadonly) {\r\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n\r\n\r\n @if (type === typeField.dateComplexe) {\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\r\n </button>\r\n </div>\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J\r\n <span class=\"visually-hidden\">Aujourd'hui</span>\r\n </button>\r\n </div>\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J+1\r\n <span class=\"visually-hidden\">Demain</span>\r\n </button>\r\n </div>\r\n\r\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J+2\r\n <span class=\"visually-hidden\">Dans 2 jours</span>\r\n </button>\r\n </div>\r\n\r\n @if (type !== typeField.datePlusTwo) {\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J+7\r\n <span class=\"visually-hidden\">Dans 7 jours</span>\r\n </button>\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (type === typeField.slider) {\r\n @defer (on immediate) {\r\n <cw-slider-field [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [control]=\"formControl\" />\r\n }\r\n }\r\n\r\n @if (type === typeField.range) {\r\n <div class=\"slider\">\r\n\r\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\r\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\r\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\r\n </cw-button>\r\n\r\n <div class=\"slider-input\">\r\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\r\n aria-atomic=\"true\">\r\n {{ label | translate: labelParams }} {{ formControl.value }}\r\n @if (rangeOptions.unit) {\r\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\r\n }\r\n </label>\r\n\r\n <div class=\"slider-custom-bar\">\r\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\r\n </div>\r\n </div>\r\n\r\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\r\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\">\r\n </div>\r\n\r\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\r\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\r\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\r\n </cw-button>\r\n </div>\r\n }\r\n\r\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\r\n @if (type === typeField.autocomplete) {\r\n @if (autocompleteRef()?.hasAnyContent()) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearAutocomplete()\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n } @else if (type === typeField.ngSelectMultiple) {\r\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. -->\r\n @if (formControl?.value?.length) {\r\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n } @else {\r\n @if(formControl?.value) {\r\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n }\r\n }\r\n\r\n</ng-template>\r\n\r\n<ng-template #fieldLabel>\r\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\r\n {{ label | translate: labelParams }}\r\n\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n</ng-template>\r\n\r\n<!-- Bouton d'aide (tooltip) partage label/legend. Hors du <label> (sinon son libelle\r\n s'ajoute au nom du champ et le clic active le label) ; dans un <legend>, le fieldset\r\n est nomme par aria-labelledby sur le seul texte (legendId) pour la meme raison. -->\r\n<ng-template #fieldTooltip>\r\n <button type=\"button\" class=\"btn btn-ghost btn-field-tooltip\"\r\n [cwTooltip]=\"tooltip ?? ''\"\r\n [attr.data-test-ctw]=\"'tooltip-' + name\">\r\n <cw-icon [icon]=\"spriteIcon.alertHelp\" [type]=\"iconType.circular\" [iconUiType]=\"iconUiType.info\"\r\n [iconSize]=\"iconSize.xs\" [label]=\"'_COMMON._FORM.TOOLTIP_HELP' | translate\"></cw-icon>\r\n </button>\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: "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: "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", "optionTemplate", "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" }], deferBlockDependencies: [() => [i1.NgClass, i1.NgTemplateOutlet, i2$1.NgControlStatus, i2$1.FormControlDirective, import('@ng-select/ng-select').then(m => m.NgSelectComponent), import('@ng-select/ng-select').then(m => m.NgOptionTemplateDirective), import('@ng-select/ng-select').then(m => m.NgLabelTemplateDirective), i2.TranslatePipe], () => [i1.NgClass, i1.NgTemplateOutlet, i2$1.NgControlStatus, i2$1.FormControlDirective, import('@ng-select/ng-select').then(m => m.NgSelectComponent), import('@ng-select/ng-select').then(m => m.NgOptionTemplateDirective), import('@ng-select/ng-select').then(m => m.NgLabelTemplateDirective), i2.TranslatePipe], () => [import('./cityway-basic-ui-slider-field.component-DNoKU63R.mjs').then(m => m.SliderFieldComponent)]] }); }
4659
+ 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 }, labelParams: { classPropertyName: "labelParams", publicName: "labelParams", 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 }, requiredStart: { classPropertyName: "requiredStart", publicName: "requiredStart", isSignal: false, isRequired: false, transformFunction: null }, requiredEnd: { classPropertyName: "requiredEnd", publicName: "requiredEnd", isSignal: false, isRequired: false, transformFunction: null }, periodShortcuts: { classPropertyName: "periodShortcuts", publicName: "periodShortcuts", isSignal: false, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, helpParams: { classPropertyName: "helpParams", publicName: "helpParams", 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 }, { propertyName: "autocompleteOptionTpl", first: true, predicate: CwAutocompleteOptionDirective, descendants: true }], 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: ["ngSelect"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!isInAddon) {\r\n @if (\r\n type !== typeField.checkbox &&\r\n type !== typeField.radio &&\r\n type !== typeField.checkboxButton &&\r\n type !== typeField.radioButton &&\r\n type !== typeField.checkboxInline &&\r\n type !== typeField.radioInline &&\r\n type !== typeField.switch &&\r\n type !== typeField.range &&\r\n type !== typeField.switchSmall &&\r\n !isChoiceCard &&\r\n !isPeriod\r\n ) {\r\n <!-- Bouton d'aide HORS du <label> (bouton dans un label = HTML invalide, son libelle\r\n polluerait le nom accessible du champ et un clic activerait le label) : on aligne\r\n label + bouton dans un conteneur flex, seulement quand il y a une aide. -->\r\n @if (hasFieldTooltip) {\r\n <div class=\"d-flex-h gap-2xs\">\r\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n </div>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"fieldLabel\"></ng-container>\r\n }\r\n }\r\n\r\n <!-- Une p\u00E9riode rend ses addons dans son propre field-group (entre les bornes et le fieldset). -->\r\n @if ((addonLeft || addonRight) && !isPeriod) {\r\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\r\n @if(addonLeft) {\r\n <div class=\"field-group-addon-left\">\r\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\r\n </div>\r\n }\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n @if(addonRight) {\r\n <div class=\"field-group-addon-right\">\r\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @else {\r\n @if ( isInInputGroup() ) {\r\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n }\r\n }\r\n\r\n <!-- Error message -->\r\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\r\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\r\n @if (\r\n !errorMessages?.['required'] &&\r\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\r\n ) {\r\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate: labelParams}\"></span>\r\n }\r\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\r\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\r\n }\r\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\r\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\r\n }\r\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\r\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\r\n }\r\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\r\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\r\n }\r\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\r\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\r\n }\r\n @if (errorMessages) {\r\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\r\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\r\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (help || autoHelpEntries.length) {\r\n <div [id]=\"name + '-help'\" class=\"field-text\">\r\n @if (help) {\r\n <span>{{ help | translate: helpParams }}</span>\r\n }\r\n @for (entry of autoHelpEntries; track entry.key) {\r\n <!-- Espace explicite : les blancs entre balises sont supprim\u00E9s \u00E0 la compilation. -->\r\n {{ ' ' }}<span>{{ entry.key | translate: entry.params }}</span>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Aper\u00E7u du fichier (type=file, opt-in) : sous le champ et ses aides, comme dans la\r\n maquette DS. La croix native du champ n'est pas retir\u00E9e \u2014 les deux vident le m\u00EAme\r\n control, l'aper\u00E7u ajoute juste \u00AB Visualiser \u00BB et une cible plus grande. -->\r\n @if (isPreviewVisible) {\r\n <cw-file-preview [file]=\"previewFile\" [existingFile]=\"existingFile ?? null\"\r\n [disabled]=\"!!isDisabledOrReadonly\" (remove)=\"onPreviewRemove()\" />\r\n }\r\n\r\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\r\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\r\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\r\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\r\n <ul class=\"autocomplete-chips\" role=\"list\">\r\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\r\n <li>\r\n <button type=\"button\" class=\"autocomplete-chip\"\r\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\r\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\r\n <span>{{ chip.label }}</span>\r\n @if (!isEffectivelyDisabled && !isReadonly) {\r\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n}\r\n@else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n}\r\n\r\n<ng-template #field>\r\n <!-- Autocomplete (mono / multi) -->\r\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\r\n <cw-autocomplete\r\n [id]=\"name\"\r\n [control]=\"formControl\"\r\n [fetcher]=\"autocompleteOptions.fetcher\"\r\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\r\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\r\n [columns]=\"autocompleteOptions.columns ?? []\"\r\n [optionTemplate]=\"autocompleteOptions.optionTemplate ?? autocompleteOptionTpl?.templateRef ?? null\"\r\n [resolver]=\"autocompleteOptions.resolver ?? null\"\r\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\r\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\r\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\r\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\r\n [multiple]=\"type === typeField.autocompleteMultiple\"\r\n [isRequired]=\"isRequired\"\r\n [isReadonly]=\"!!isReadonly\"\r\n [isDisabled]=\"isEffectivelyDisabled\"\r\n [ariaInvalid]=\"control.invalid && control.touched\"\r\n [ariaDescribedBy]=\"getDescribedBy(control)\"\r\n [placeholder]=\"placeholder\">\r\n </cw-autocomplete>\r\n }\r\n\r\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\r\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\r\n @if (type === typeField.richText) {\r\n <cw-rich-text-editor\r\n [id]=\"name\"\r\n [control]=\"formControl\"\r\n [options]=\"richTextOptions\"\r\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\r\n [isRequired]=\"isRequired\"\r\n [isReadonly]=\"!!isReadonly\"\r\n [isDisabled]=\"isEffectivelyDisabled\"\r\n [ariaInvalid]=\"control.invalid && control.touched\"\r\n [ariaDescribedBy]=\"getDescribedBy(control)\">\r\n </cw-rich-text-editor>\r\n }\r\n\r\n <!-- Text -->\r\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\r\n typeField.email,\r\n typeField.color, typeField.zipCode].includes(type)) {\r\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\r\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n }\r\n\r\n <!-- Phone (intl-tel-input) -->\r\n @if (type === typeField.phone) {\r\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\r\n }\r\n\r\n <!-- File -->\r\n @if (type === typeField.file) {\r\n <!-- L'input natif reste LE controle (focus, clavier, restitution aux lecteurs d'ecran,\r\n validation), mais il est masque visuellement : le libelle de son bouton et son\r\n \u00AB aucun fichier choisi \u00BB sont ecrits par le NAVIGATEUR, dans SA langue. Ils sont\r\n intraduisibles et ne suivent pas la langue de l'application \u2014 un utilisateur qui\r\n bascule en anglais garderait \u00AB Choisir un fichier \u00BB. On les reecrit donc a cote,\r\n traduits, dans une couche purement visuelle. -->\r\n <input #fileInput type=\"file\" class=\"field-control visually-hidden\" [id]=\"name\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\r\n [attr.accept]=\"acceptAttr\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n\r\n <!-- `aria-hidden` : doublon visuel de l'input, que les lecteurs d'ecran restituent deja\r\n (nom du champ, bouton de parcours, fichier selectionne). L'annoncer une seconde fois\r\n ne ferait que bavarder. Le clic est relaye a l'input, le clavier passe par lui. -->\r\n <span class=\"field-file\" aria-hidden=\"true\" (click)=\"openFilePicker()\">\r\n <span class=\"field-file-button\">{{ '_COMMON._FORM.CHOOSE_FILE' | translate }}</span>\r\n <span class=\"field-file-name\" [class.field-file-name-empty]=\"!selectedFileName\">\r\n {{ selectedFileName ?? ('_COMMON._FORM.NO_FILE_SELECTED' | translate) }}\r\n </span>\r\n </span>\r\n }\r\n\r\n @if (type === typeField.password) {\r\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n <cw-button [type]=\"buttonType.ghost\"\r\n cssClass=\"btn-password-field\"\r\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\r\n [withOnlyIcon]=\"true\"\r\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\r\n (btnAction)=\"togglePasswordVisibility()\">\r\n </cw-button>\r\n }\r\n\r\n <!-- Textarea -->\r\n @if (type === typeField.textarea) {\r\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\r\n }\r\n\r\n <!-- Select -->\r\n @if (type === typeField.select) {\r\n @defer (on immediate) {\r\n <ng-select #ngSelect [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\r\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\r\n\r\n <!-- Template pour les options -->\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\r\n @if (optionTemplate) {\r\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\r\n }\r\n @else {\r\n <div>{{ item.label | translate }}</div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Template pour le label -->\r\n <ng-template ng-label-tmp let-item=\"item\">\r\n @if (labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\r\n }\r\n @else {\r\n {{ (item.label | translate) || (placeholder | translate) }}\r\n }\r\n </ng-template>\r\n </ng-select>\r\n } @placeholder {\r\n <div class=\"field-control\" aria-hidden=\"true\"></div>\r\n }\r\n }\r\n\r\n <!-- NgSelect -->\r\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\r\n @defer (on immediate) {\r\n <ng-select #ngSelect [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\r\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\r\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\r\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\"\r\n (open)=\"onDropdownOpen()\" (close)=\"onDropdownClose()\">\r\n\r\n <!-- Template pour les options -->\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\r\n @if (optionTemplate) {\r\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\r\n }\r\n @else {\r\n <div>{{ item.label | translate }}</div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Template pour le label -->\r\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\r\n @if (labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\r\n }\r\n @else {\r\n {{ (item.label | translate) || (placeholder | translate) }}\r\n }\r\n </ng-template>\r\n </ng-select>\r\n } @placeholder {\r\n <div class=\"field-control\" aria-hidden=\"true\"></div>\r\n }\r\n }\r\n\r\n <!-- Radio -->\r\n @if (type === typeField.radioInline || type === typeField.radio) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v gap-sm'\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"field-check\">\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n\r\n <!-- Radio button -->\r\n @if (type === typeField.radioButton) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <div class=\"field-group field-group-btn\">\r\n @for (opt of options; track opt.value) {\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n <!-- Cartes : checkbox / radio / switch (contr\u00F4le \u00E0 gauche, titre, description facultative) -->\r\n @if (isChoiceCard) {\r\n @if (isBooleanChoiceCard) {\r\n <!-- Carte bool\u00E9enne (sans options) : une case li\u00E9e au FormControl<boolean>, nomm\u00E9e par le titre. -->\r\n <div class=\"field-card-list\" [class.field-card-list-compact]=\"isChoiceCardCompact\">\r\n <label class=\"field-card d-flex-h items-start gap-xs\" [for]=\"name\" [class.field-switch]=\"isSwitchCard\" [class.field-switch-small]=\"isSwitchCard\">\r\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\"\r\n [attr.role]=\"isSwitchCard ? 'switch' : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"booleanCardDescribedBy\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\r\n <span class=\"d-flex-v gap-5xs\">\r\n <span class=\"field-card-title\">\r\n {{ label | translate: labelParams }}\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (!isChoiceCardCompact && description) {\r\n <span class=\"field-text\" [id]=\"name + '-desc'\">{{ description | translate }}</span>\r\n }\r\n </span>\r\n </label>\r\n </div>\r\n } @else {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"field-card-list list-unstyled mb-none\" [class.field-card-list-compact]=\"isChoiceCardCompact\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"d-flex-v\">\r\n <!-- Le label englobe toute la carte : un clic n'importe o\u00F9 coche l'option. -->\r\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\">\r\n @if (isRadioCard) {\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [attr.name]=\"name\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"field-check-input\"\r\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\r\n } @else {\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\r\n [attr.role]=\"isSwitchCard ? 'switch' : null\"\r\n [attr.aria-describedby]=\"(!isChoiceCardCompact && opt.description) ? name + '_' + opt.value + '-desc' : null\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n }\r\n <span class=\"d-flex-v gap-5xs\">\r\n <span class=\"field-card-title\">{{ opt.label | translate }}</span>\r\n @if (!isChoiceCardCompact && opt.description) {\r\n <span class=\"field-text\" [id]=\"name + '_' + opt.value + '-desc'\">{{ opt.description | translate }}</span>\r\n }\r\n </span>\r\n </label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n }\r\n\r\n <!-- Checkbox Switch -->\r\n @if ( type === typeField.switch || type === typeField.switchSmall)\r\n {\r\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\r\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\r\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate: labelParams }}</label>\r\n </div>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\r\n @if (isSingleCheckbox()) {\r\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\r\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\r\n class=\"field-check-input\"\r\n [class.is-invalid]=\"control?.invalid && control?.touched\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\r\n <label [for]=\"name\" class=\"field-check-label\">\r\n {{ label | translate: labelParams }}\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n </div>\r\n }\r\n @else if( options.length > 1) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\r\n {{ opt.label | translate }}\r\n </label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n @else {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v gap-sm'\">\r\n @for (opt of options; track opt.value) {\r\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\r\n {{ opt.label | translate }}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n </li>\r\n }\r\n </ul>\r\n </fieldset>\r\n }\r\n }\r\n\r\n <!-- Checkbox button -->\r\n @if (type === typeField.checkboxButton && options.length > 0) {\r\n\r\n @if(options.length > 1) {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <div class=\"field-group field-group-btn\">\r\n @for (opt of options; track opt.value) {\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n @else {\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <div class=\"btn-group btn-group-secondary\">\r\n @for (opt of options; track opt.value) {\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\r\n [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\r\n {{ opt.label | translate}}\r\n @if(isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n }\r\n\r\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\r\n @if (isPeriod) {\r\n <!-- Fieldset : le legend nomme la p\u00E9riode, \u00AB Du \u00BB / \u00AB au \u00BB sont les labels de chaque input. -->\r\n <fieldset [attr.aria-labelledby]=\"hasFieldTooltip ? legendId : null\">\r\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\" [class.d-flex-h]=\"hasFieldTooltip\" [class.gap-2xs]=\"hasFieldTooltip\">\r\n <span [id]=\"legendId\">\r\n {{label | translate: labelParams}}\r\n <!-- Deux bornes obligatoires : ast\u00E9risque sur la p\u00E9riode ; une seule : sur sa borne. -->\r\n @if(isStartRequired && isEndRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </span>\r\n @if (hasFieldTooltip) {\r\n <ng-container *ngTemplateOutlet=\"fieldTooltip\"></ng-container>\r\n }\r\n </legend>\r\n <!-- \u00C9tats invalide / d\u00E9sactiv\u00E9 pos\u00E9s seulement avec addon ou raccourcis (rendu historique sinon). -->\r\n <div class=\"field-group\"\r\n [class.field-group-invalid]=\"hasPeriodAddons && isInvalid\"\r\n [class.field-group-disabled]=\"hasPeriodAddons && isDisabledOrReadonly\">\r\n @if (addonLeft) {\r\n <div class=\"field-group-addon-left\">\r\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\r\n </div>\r\n }\r\n <label class=\"field-group-addon-left\" [for]=\"name + '_start'\">\r\n {{ '_COMMON._DATES.FROM_TO_1' | translate }}\r\n @if(isStartRequired && !isEndRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_1' | translate) : null\"\r\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\r\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isStartRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isStartRequired\"\r\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\r\n (focus)=\"onFocusRange('start')\" (blur)=\"onBlurRange('start')\" />\r\n\r\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\r\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_START' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearFieldPeriod('start')\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n }\r\n <label class=\"field-group-addon-center\" [for]=\"name + '_end'\">\r\n {{ '_COMMON._DATES.FROM_TO_2' | translate }}\r\n @if(isEndRequired && !isStartRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) + ' \u2013 ' + ('_COMMON._DATES.FROM_TO_2' | translate) : null\"\r\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\r\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isEndRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isEndRequired\"\r\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\r\n (focus)=\"onFocusRange('end')\" (blur)=\"onBlurRange('end')\" />\r\n\r\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\r\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_END' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearFieldPeriod('end')\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n }\r\n\r\n <!-- Raccourcis (dateToDate) puis addon droit : dans le fieldset, apr\u00E8s la borne de fin. -->\r\n @for (shortcut of activePeriodShortcuts; track $index) {\r\n <div class=\"field-group-addon-right\">\r\n <button type=\"button\" class=\"btn btn-ghost\"\r\n [class.active]=\"isPeriodShortcutActive(shortcut)\"\r\n [attr.aria-pressed]=\"isPeriodShortcutActive(shortcut)\"\r\n [attr.aria-label]=\"shortcut.ariaLabel ? (shortcut.ariaLabel | translate) : null\"\r\n [attr.disabled]=\"isDisabledOrReadonly ? 'disabled' : null\"\r\n (click)=\"onPeriodShortcut(shortcut)\">\r\n {{ shortcut.label | translate }}\r\n </button>\r\n </div>\r\n }\r\n @if (addonRight) {\r\n <div class=\"field-group-addon-right\">\r\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\r\n\r\n <div class=\"field-group\">\r\n @if (type === typeField.dateComplexe) {\r\n <div class=\"field-group-addon-left\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [attr.title]=\"fieldTitle ? (fieldTitle | translate) : null\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"getDescribedBy(control)\"\r\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\r\n\r\n @if(formControl?.value && !isDisabledOrReadonly) {\r\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n\r\n\r\n @if (type === typeField.dateComplexe) {\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\r\n </button>\r\n </div>\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J\r\n <span class=\"visually-hidden\">Aujourd'hui</span>\r\n </button>\r\n </div>\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J+1\r\n <span class=\"visually-hidden\">Demain</span>\r\n </button>\r\n </div>\r\n\r\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J+2\r\n <span class=\"visually-hidden\">Dans 2 jours</span>\r\n </button>\r\n </div>\r\n\r\n @if (type !== typeField.datePlusTwo) {\r\n <div class=\"field-group-addon-right\">\r\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\r\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\r\n J+7\r\n <span class=\"visually-hidden\">Dans 7 jours</span>\r\n </button>\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (type === typeField.slider) {\r\n @defer (on immediate) {\r\n <cw-slider-field [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [control]=\"formControl\" />\r\n }\r\n }\r\n\r\n @if (type === typeField.range) {\r\n <div class=\"slider\">\r\n\r\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\r\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\r\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\r\n </cw-button>\r\n\r\n <div class=\"slider-input\">\r\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\r\n aria-atomic=\"true\">\r\n {{ label | translate: labelParams }} {{ formControl.value }}\r\n @if (rangeOptions.unit) {\r\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\r\n }\r\n </label>\r\n\r\n <div class=\"slider-custom-bar\">\r\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\r\n </div>\r\n </div>\r\n\r\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\r\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\">\r\n </div>\r\n\r\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\r\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\r\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\r\n </cw-button>\r\n </div>\r\n }\r\n\r\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\r\n @if (type === typeField.autocomplete) {\r\n @if (autocompleteRef()?.hasAnyContent()) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearAutocomplete()\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n } @else if (type === typeField.ngSelectMultiple) {\r\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. -->\r\n @if (formControl?.value?.length) {\r\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n } @else {\r\n @if(formControl?.value) {\r\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\r\n [attr.aria-label]=\"'_COMMON._FORM.CLEAR_FIELD' | translate: { label: label | translate: labelParams }\"\r\n (click)=\"onClearField(formControl)\"><span aria-hidden=\"true\">&times;</span></button>\r\n }\r\n }\r\n }\r\n\r\n</ng-template>\r\n\r\n<ng-template #fieldLabel>\r\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\r\n {{ label | translate: labelParams }}\r\n\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n</ng-template>\r\n\r\n<!-- Bouton d'aide (tooltip) partage label/legend. Hors du <label> (sinon son libelle\r\n s'ajoute au nom du champ et le clic active le label) ; dans un <legend>, le fieldset\r\n est nomme par aria-labelledby sur le seul texte (legendId) pour la meme raison. -->\r\n<ng-template #fieldTooltip>\r\n <button type=\"button\" class=\"btn btn-ghost btn-field-tooltip\"\r\n [cwTooltip]=\"tooltip ?? ''\"\r\n [attr.data-test-ctw]=\"'tooltip-' + name\">\r\n <cw-icon [icon]=\"spriteIcon.alertHelp\" [type]=\"iconType.circular\" [iconUiType]=\"iconUiType.info\"\r\n [iconSize]=\"iconSize.xs\" [label]=\"'_COMMON._FORM.TOOLTIP_HELP' | translate\"></cw-icon>\r\n </button>\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: "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: "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", "glyphSize", "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", "optionTemplate", "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" }], deferBlockDependencies: [() => [i1.NgClass, i1.NgTemplateOutlet, i2$1.NgControlStatus, i2$1.FormControlDirective, import('@ng-select/ng-select').then(m => m.NgSelectComponent), import('@ng-select/ng-select').then(m => m.NgOptionTemplateDirective), import('@ng-select/ng-select').then(m => m.NgLabelTemplateDirective), i2.TranslatePipe], () => [i1.NgClass, i1.NgTemplateOutlet, i2$1.NgControlStatus, i2$1.FormControlDirective, import('@ng-select/ng-select').then(m => m.NgSelectComponent), import('@ng-select/ng-select').then(m => m.NgOptionTemplateDirective), import('@ng-select/ng-select').then(m => m.NgLabelTemplateDirective), i2.TranslatePipe], () => [import('./cityway-basic-ui-slider-field.component-DNoKU63R.mjs').then(m => m.SliderFieldComponent)]] }); }
4643
4660
  }
4644
4661
  i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "20.3.20", ngImport: i0, type: FormFieldComponent, resolveDeferredDeps: () => [import('@ng-select/ng-select').then(m => m.NgSelectComponent), import('@ng-select/ng-select').then(m => m.NgOptionTemplateDirective), import('@ng-select/ng-select').then(m => m.NgLabelTemplateDirective), import('./cityway-basic-ui-slider-field.component-DNoKU63R.mjs').then(m => m.SliderFieldComponent)], resolveMetadata: (NgSelectComponent, NgOptionTemplateDirective, NgLabelTemplateDirective, SliderFieldComponent) => ({ decorators: [{
4645
4662
  type: Component,
@@ -5246,7 +5263,7 @@ class ModalsComponent {
5246
5263
  this.destroyRef.onDestroy(unlisten);
5247
5264
  }
5248
5265
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ModalsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5249
- 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 }, modalSubtitle: { classPropertyName: "modalSubtitle", publicName: "modalSubtitle", 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 [attr.aria-describedby]=\"modalSubtitle() && !isStateLike() && type() !== modalsType.loader ? subtitleId : 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 <!-- Titre + sous-titre empiles ; sous-titre aux classes du sous-titre de cw-card. -->\r\n <div class=\"flex-1\">\r\n <h1 class=\"modal-title\" [id]=\"titleId\">\r\n {{ (modalTitle() ?? '') | translate: modalTitleParams() }}\r\n </h1>\r\n @if (modalSubtitle(); as subtitle) {\r\n <div class=\"modal-subtitle fs fs-xs text-light\" [id]=\"subtitleId\">{{ subtitle }}</div>\r\n }\r\n </div>\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 }); }
5266
+ 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 }, modalSubtitle: { classPropertyName: "modalSubtitle", publicName: "modalSubtitle", 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 [attr.aria-describedby]=\"modalSubtitle() && !isStateLike() && type() !== modalsType.loader ? subtitleId : 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 <!-- Titre + sous-titre empiles ; sous-titre aux classes du sous-titre de cw-card. -->\r\n <div class=\"flex-1\">\r\n <h1 class=\"modal-title\" [id]=\"titleId\">\r\n {{ (modalTitle() ?? '') | translate: modalTitleParams() }}\r\n </h1>\r\n @if (modalSubtitle(); as subtitle) {\r\n <div class=\"modal-subtitle fs fs-xs text-light\" [id]=\"subtitleId\">{{ subtitle }}</div>\r\n }\r\n </div>\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", "glyphSize", "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 }); }
5250
5267
  }
5251
5268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ModalsComponent, decorators: [{
5252
5269
  type: Component,
@@ -5671,7 +5688,7 @@ class NumericalRangeComponent {
5671
5688
  this.newAmount.emit(next);
5672
5689
  }
5673
5690
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: NumericalRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5674
- 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 }); }
5691
+ 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", "glyphSize", "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 }); }
5675
5692
  }
5676
5693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: NumericalRangeComponent, decorators: [{
5677
5694
  type: Component,
@@ -6082,7 +6099,7 @@ class FileDropComponent {
6082
6099
  useExisting: forwardRef(() => FileDropComponent),
6083
6100
  multi: true,
6084
6101
  },
6085
- ], 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 }); }
6102
+ ], 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", "glyphSize", "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 }); }
6086
6103
  }
6087
6104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FileDropComponent, decorators: [{
6088
6105
  type: Component,
@@ -6174,7 +6191,7 @@ class EmptyStateComponent {
6174
6191
  }, ...(ngDevMode ? [{ debugName: "illustrationSrc" }] : []));
6175
6192
  }
6176
6193
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6177
- 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 }); }
6194
+ 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", "glyphSize", "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 }); }
6178
6195
  }
6179
6196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, decorators: [{
6180
6197
  type: Component,
@@ -6286,7 +6303,7 @@ class LanguageSelectorComponent {
6286
6303
  this.trigger()?.closeDropdown();
6287
6304
  }
6288
6305
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6289
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LanguageSelectorComponent, isStandalone: true, selector: "cw-language-selector", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null }, currentLang: { classPropertyName: "currentLang", publicName: "currentLang", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", 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: "@if (inline()) {\n <!-- Liste visible dans le flux : m\u00EAmes styles d'items que le menu d\u00E9roulant, sans position absolue ni ombre -->\n <div class=\"dropdown-menu dropdown-menu-inline show\">\n <div class=\"dropdown-menu-inner\">\n <ng-container [ngTemplateOutlet]=\"panel\"></ng-container>\n </div>\n </div>\n} @else {\n <cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\"\n [dropdownPosition]=\"dropdownPosition()\">\n <ng-container [ngTemplateOutlet]=\"panel\"></ng-container>\n </cw-button>\n}\n\n<ng-template #panel>\n <div class=\"selector-menu d-flex-v gap-md\" [attr.role]=\"inline() ? 'radiogroup' : 'menu'\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard [menuItemSelector]=\"inline() ? '[role=radio]' : '[role=menuitemradio]'\" (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 [attr.role]=\"inline() ? 'radio' : '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</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: 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 }); }
6306
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LanguageSelectorComponent, isStandalone: true, selector: "cw-language-selector", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null }, currentLang: { classPropertyName: "currentLang", publicName: "currentLang", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", 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: "@if (inline()) {\n <!-- Liste visible dans le flux : m\u00EAmes styles d'items que le menu d\u00E9roulant, sans position absolue ni ombre -->\n <div class=\"dropdown-menu dropdown-menu-inline show\">\n <div class=\"dropdown-menu-inner\">\n <ng-container [ngTemplateOutlet]=\"panel\"></ng-container>\n </div>\n </div>\n} @else {\n <cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\"\n [dropdownPosition]=\"dropdownPosition()\">\n <ng-container [ngTemplateOutlet]=\"panel\"></ng-container>\n </cw-button>\n}\n\n<ng-template #panel>\n <div class=\"selector-menu d-flex-v gap-md\" [attr.role]=\"inline() ? 'radiogroup' : 'menu'\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard [menuItemSelector]=\"inline() ? '[role=radio]' : '[role=menuitemradio]'\" (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 [attr.role]=\"inline() ? 'radio' : '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</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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", "glyphSize", "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 }); }
6290
6307
  }
6291
6308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
6292
6309
  type: Component,
@@ -6335,7 +6352,7 @@ class ThemeSelectorComponent {
6335
6352
  this.trigger()?.closeDropdown();
6336
6353
  }
6337
6354
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ThemeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6338
- 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 }); }
6355
+ 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", "glyphSize", "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 }); }
6339
6356
  }
6340
6357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ThemeSelectorComponent, decorators: [{
6341
6358
  type: Component,