@cityway/basic-ui 1.1.0-beta007 → 1.1.0-beta009

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.
@@ -20,7 +20,6 @@ import itiEn from 'intl-tel-input/dist/js/i18n/en.js';
20
20
  import itiFr from 'intl-tel-input/dist/js/i18n/fr.js';
21
21
  import * as i3 from '@ng-select/ng-select';
22
22
  import { NgSelectModule } from '@ng-select/ng-select';
23
- import Quill from 'quill';
24
23
 
25
24
  class CollapseDirective {
26
25
  constructor() {
@@ -1684,6 +1683,15 @@ class ButtonComponent {
1684
1683
  this.isMinWidth = input(false, ...(ngDevMode ? [{ debugName: "isMinWidth" }] : []));
1685
1684
  this.isDisabled = input(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
1686
1685
  this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
1686
+ /**
1687
+ * Rend le spinner de `isLoading` SANS la region live qui l'accompagne.
1688
+ *
1689
+ * A passer a `false` quand l'hote annonce DEJA l'operation dans sa propre region
1690
+ * `role="status"` : deux regions concurrentes pour un seul evenement se marchent dessus
1691
+ * (cf. `cw-export-button`). Le spinner, lui, reste rendu — l'affordance visuelle ne doit
1692
+ * pas etre le prix de la correction a11y.
1693
+ */
1694
+ this.loadingAnnounce = input(true, ...(ngDevMode ? [{ debugName: "loadingAnnounce" }] : []));
1687
1695
  this.cssClass = input('', ...(ngDevMode ? [{ debugName: "cssClass" }] : []));
1688
1696
  this.dataTest = input(...(ngDevMode ? [undefined, { debugName: "dataTest" }] : []));
1689
1697
  this.skeletonMode = input(false, ...(ngDevMode ? [{ debugName: "skeletonMode" }] : []));
@@ -1812,7 +1820,7 @@ class ButtonComponent {
1812
1820
  this.destroyRef.onDestroy(unlisten);
1813
1821
  }
1814
1822
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1815
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ButtonComponent, isStandalone: true, selector: "cw-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, isDropdown: { classPropertyName: "isDropdown", publicName: "isDropdown", isSignal: true, isRequired: false, transformFunction: null }, hideCaret: { classPropertyName: "hideCaret", publicName: "hideCaret", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, withOnlyIcon: { classPropertyName: "withOnlyIcon", publicName: "withOnlyIcon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, isMinWidth: { classPropertyName: "isMinWidth", publicName: "isMinWidth", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, 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 }, withTooltip: { classPropertyName: "withTooltip", publicName: "withTooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTrigger: { classPropertyName: "tooltipTrigger", publicName: "tooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipType: { classPropertyName: "tooltipType", publicName: "tooltipType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction: "btnAction", dropDownClicked: "dropDownClicked" }, host: { properties: { "class.skeleton": "skeletonMode()", "class.btn": "skeletonMode()" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }, { propertyName: "dropdownToggle", first: true, predicate: ["dropdownToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\n<!-- Template du bouton (code existant envelopp\u00E9) -->\n<ng-template #buttonTemplate>\n @if (!isDropdown()) {\n @if (link() != null) {\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.disabled]=\"isDisabled()\"\n [routerLink]=\"isDisabled() ? null : link()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\n (click)=\"onLinkClick($event)\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </a>\n } @else {\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" (click)=\"onBtnAction()\" [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n }\n }\n @else {\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\n [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"toggleDropdown()\" #dropdownToggle\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n\n @if(!hideCaret()) {\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\n }\n </button>\n\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\n <div class=\"dropdown-menu-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Template existant du contenu du bouton -->\n<ng-template #buttonContent>\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n\n @if(withOnlyIcon()) {\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate }}</span>\n }\n @else {\n {{ (label() ?? '') | translate }}\n }\n\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n</ng-template>\n\n<ng-template #iconContent>\n @if(withOnlyIcon()) {\n @switch(iconSize()) {\n @case(buttonIconSizeEnum.xsmall) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @case(buttonIconSizeEnum.small) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @default {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n }\n }\n @else {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: CwTooltipDirective, selector: "[cwTooltip]", inputs: ["cwTooltip", "cwTooltipTitle", "cwTooltipType", "cwTooltipTrigger", "cwTooltipPosition", "cwTooltipDisabled"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
1823
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ButtonComponent, isStandalone: true, selector: "cw-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, isDropdown: { classPropertyName: "isDropdown", publicName: "isDropdown", isSignal: true, isRequired: false, transformFunction: null }, hideCaret: { classPropertyName: "hideCaret", publicName: "hideCaret", isSignal: true, isRequired: false, transformFunction: null }, withIcon: { classPropertyName: "withIcon", publicName: "withIcon", isSignal: true, isRequired: false, transformFunction: null }, withOnlyIcon: { classPropertyName: "withOnlyIcon", publicName: "withOnlyIcon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: true, isRequired: false, transformFunction: null }, isMinWidth: { classPropertyName: "isMinWidth", publicName: "isMinWidth", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingAnnounce: { classPropertyName: "loadingAnnounce", publicName: "loadingAnnounce", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: true, isRequired: false, transformFunction: null }, withTooltip: { classPropertyName: "withTooltip", publicName: "withTooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTrigger: { classPropertyName: "tooltipTrigger", publicName: "tooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipType: { classPropertyName: "tooltipType", publicName: "tooltipType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction: "btnAction", dropDownClicked: "dropDownClicked" }, host: { properties: { "class.skeleton": "skeletonMode()", "class.btn": "skeletonMode()" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true, isSignal: true }, { propertyName: "dropdownToggle", first: true, predicate: ["dropdownToggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\n<!-- Template du bouton (code existant envelopp\u00E9) -->\n<ng-template #buttonTemplate>\n @if (!isDropdown()) {\n @if (link() != null) {\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.disabled]=\"isDisabled()\"\n [routerLink]=\"isDisabled() ? null : link()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\n (click)=\"onLinkClick($event)\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </a>\n } @else {\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" (click)=\"onBtnAction()\" [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n }\n }\n @else {\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\n [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"toggleDropdown()\" #dropdownToggle\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n\n @if(!hideCaret()) {\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\n }\n </button>\n\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\n <div class=\"dropdown-menu-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Template existant du contenu du bouton -->\n<ng-template #buttonContent>\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n\n @if(withOnlyIcon()) {\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate }}</span>\n }\n @else {\n {{ (label() ?? '') | translate }}\n }\n\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n</ng-template>\n\n<ng-template #iconContent>\n @if(withOnlyIcon()) {\n @switch(iconSize()) {\n @case(buttonIconSizeEnum.xsmall) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @case(buttonIconSizeEnum.small) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @default {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n }\n }\n @else {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: CwTooltipDirective, selector: "[cwTooltip]", inputs: ["cwTooltip", "cwTooltipTitle", "cwTooltipType", "cwTooltipTrigger", "cwTooltipPosition", "cwTooltipDisabled"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
1816
1824
  }
1817
1825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ButtonComponent, decorators: [{
1818
1826
  type: Component,
@@ -1826,8 +1834,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
1826
1834
  ClickOutsideDirective,
1827
1835
  CwTooltipDirective,
1828
1836
  RouterLink
1829
- ], template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\n<!-- Template du bouton (code existant envelopp\u00E9) -->\n<ng-template #buttonTemplate>\n @if (!isDropdown()) {\n @if (link() != null) {\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.disabled]=\"isDisabled()\"\n [routerLink]=\"isDisabled() ? null : link()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\n (click)=\"onLinkClick($event)\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </a>\n } @else {\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" (click)=\"onBtnAction()\" [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n }\n }\n @else {\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\n [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"toggleDropdown()\" #dropdownToggle\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n\n @if(!hideCaret()) {\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\n }\n </button>\n\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\n <div class=\"dropdown-menu-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Template existant du contenu du bouton -->\n<ng-template #buttonContent>\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n\n @if(withOnlyIcon()) {\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate }}</span>\n }\n @else {\n {{ (label() ?? '') | translate }}\n }\n\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n</ng-template>\n\n<ng-template #iconContent>\n @if(withOnlyIcon()) {\n @switch(iconSize()) {\n @case(buttonIconSizeEnum.xsmall) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @case(buttonIconSizeEnum.small) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @default {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n }\n }\n @else {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n</ng-template>\n" }]
1830
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], isDropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDropdown", required: false }] }], hideCaret: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCaret", required: false }] }], withIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withIcon", required: false }] }], withOnlyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withOnlyIcon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], isMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMinWidth", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], 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 }] }], 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 }] }] } });
1837
+ ], template: "<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\n<!-- Template du bouton (code existant envelopp\u00E9) -->\n<ng-template #buttonTemplate>\n @if (!isDropdown()) {\n @if (link() != null) {\n <a class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [class.disabled]=\"isDisabled()\"\n [routerLink]=\"isDisabled() ? null : link()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : null\"\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\"\n (click)=\"onLinkClick($event)\">\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </a>\n } @else {\n <button type=\"button\" class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" (click)=\"onBtnAction()\" [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n }\n }\n @else {\n <div (clickOutside)=\"onClickOutside()\" ctwClickOutside #dropdown class=\"dropdown d-inline-block\">\n <button class=\"btn\" [class]=\"'btn-' + type() + ' ' + cssClass()\" type=\"button\"\n [ngClass]=\"getButtonClasses()\"\n [disabled]=\"isDisabled()\" [id]=\"id()\" [attr.aria-expanded]=\"isOpen\" (click)=\"toggleDropdown()\" #dropdownToggle\n [attr.data-test-ctw]=\"resolvedDataTest()\"\n [cwTooltip]=\"tooltipText()\" [cwTooltipDisabled]=\"!withTooltip()\" [cwTooltipTitle]=\"tooltipTitle()\"\n [cwTooltipType]=\"tooltipType()\" [cwTooltipTrigger]=\"tooltipTrigger()\" [cwTooltipPosition]=\"tooltipPositionResolved\">\n\n @if (isLoading()) {\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n @if (loadingAnnounce()) {\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\n }\n }\n\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n\n @if(!hideCaret()) {\n <cw-icon [icon]=\"spriteIcon.down\" [iconSize]=\"iconSizeEnum['2xs']\" class=\"dropdown-icon\"></cw-icon>\n }\n </button>\n\n <div [attr.aria-labelledby]=\"id()\" class=\"dropdown-menu\" [ngClass]=\"placementCss\" #dropdownMenu>\n <div class=\"dropdown-menu-inner\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n }\n</ng-template>\n\n<!-- Template existant du contenu du bouton -->\n<ng-template #buttonContent>\n @if (withIcon() && iconPosition() === buttonPositionEnum.left) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n\n @if(withOnlyIcon()) {\n <span class=\"visually-hidden\">{{ (label() ?? '') | translate }}</span>\n }\n @else {\n {{ (label() ?? '') | translate }}\n }\n\n @if (withIcon() && iconPosition() === buttonPositionEnum.right) {\n <ng-container *ngTemplateOutlet=\"iconContent\"></ng-container>\n }\n</ng-template>\n\n<ng-template #iconContent>\n @if(withOnlyIcon()) {\n @switch(iconSize()) {\n @case(buttonIconSizeEnum.xsmall) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @case(buttonIconSizeEnum.small) {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['xs']\"></cw-icon>\n }\n @default {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n }\n }\n @else {\n <cw-icon [icon]=\"withIcon()!\" [iconSize]=\"iconSizeEnum['sm']\"></cw-icon>\n }\n</ng-template>\n" }]
1838
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], isDropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDropdown", required: false }] }], hideCaret: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCaret", required: false }] }], withIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withIcon", required: false }] }], withOnlyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withOnlyIcon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], dropdownPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownPosition", required: false }] }], isMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMinWidth", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], loadingAnnounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingAnnounce", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], skeletonMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonMode", required: false }] }], 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 }] }] } });
1831
1839
 
1832
1840
  /**
1833
1841
  * Navigation clavier ARIA d'un conteneur de menu.
@@ -2719,13 +2727,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
2719
2727
  * d'icônes Quill (global) pour que la toolbar la rende sur le bouton `code-view`.
2720
2728
  * Utilise `ql-stroke` pour hériter de la couleur des autres icônes de la toolbar.
2721
2729
  */
2722
- const quillIcons = Quill.import('ui/icons');
2723
- quillIcons['code-view'] =
2724
- '<svg viewBox="0 0 18 18">' +
2725
- '<polyline class="ql-stroke" points="5 7 3 9 5 11"></polyline>' +
2726
- '<polyline class="ql-stroke" points="13 7 15 9 13 11"></polyline>' +
2727
- '<line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"></line>' +
2728
- '</svg>';
2730
+ let customIconsRegistered = false;
2731
+ function registerCustomIcons(quill) {
2732
+ // Le registre d'icones est GLOBAL a Quill : on n'y touche qu'une fois le module charge,
2733
+ // et une seule fois quel que soit le nombre d'editeurs montes.
2734
+ if (customIconsRegistered)
2735
+ return;
2736
+ const quillIcons = quill.import('ui/icons');
2737
+ quillIcons['code-view'] =
2738
+ '<svg viewBox="0 0 18 18">' +
2739
+ '<polyline class="ql-stroke" points="5 7 3 9 5 11"></polyline>' +
2740
+ '<polyline class="ql-stroke" points="13 7 15 9 13 11"></polyline>' +
2741
+ '<line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"></line>' +
2742
+ '</svg>';
2743
+ customIconsRegistered = true;
2744
+ }
2729
2745
  /**
2730
2746
  * Mapping preset → toolbar Quill. Interne au composant : Quill reste un détail
2731
2747
  * d'implémentation, le consommateur ne manipule que des presets (ou un override
@@ -2774,7 +2790,8 @@ const TOOLBAR_PRESETS = {
2774
2790
  * - Collage : toujours sans mise en forme (texte brut), cf. `onPaste`.
2775
2791
  * - Preset `expert` : ajoute un bouton d'édition HTML (mode source `<textarea>`),
2776
2792
  * à réserver aux profils techniques.
2777
- * - Quill : peerDependency (`quill`), CSS `quill.snow.css` importé par le
2793
+ * - Quill : `dependency` de la lib, chargée à la demande (cf. l'import dynamique en tête de
2794
+ * fichier). CSS `quill.snow.css` importé par le
2778
2795
  * bundle de styles basic-ui (thème BO).
2779
2796
  */
2780
2797
  class RichTextEditorComponent {
@@ -2806,6 +2823,8 @@ class RichTextEditorComponent {
2806
2823
  this.zone = inject(NgZone);
2807
2824
  this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
2808
2825
  this.quill = null;
2826
+ /** Vrai des la destruction : coupe le montage si le chargement de Quill est encore en vol. */
2827
+ this.destroyed = false;
2809
2828
  /** Garde anti-boucle : true pendant qu'on répercute une édition vers le control. */
2810
2829
  this.syncingFromEditor = false;
2811
2830
  /** Mode « source HTML » actif (preset `expert`) : la zone de texte remplace l'éditeur riche. */
@@ -2896,6 +2915,24 @@ class RichTextEditorComponent {
2896
2915
  // SSR-safe : Quill manipule le DOM, on n'instancie que côté navigateur.
2897
2916
  if (!this.isBrowser)
2898
2917
  return;
2918
+ this.initEditor().catch((error) => {
2919
+ // Le chargement du chunk Quill peut echouer (reseau, deploiement partiel), et le
2920
+ // montage lui-meme peut lever. Sans ce catch, `void` avalait la rejection :
2921
+ // l'editeur restait vide, sans la moindre trace.
2922
+ console.error("[cw-rich-text-editor] montage de l'editeur impossible", error);
2923
+ });
2924
+ }
2925
+ /**
2926
+ * Charge Quill a la demande, puis monte l'editeur. Le montage devient asynchrone : tous
2927
+ * les acces a `this.quill` ailleurs dans la classe sont deja gardes (`if (!this.quill)`),
2928
+ * l'instance pouvant de toute facon ne pas exister au premier run des `effect`.
2929
+ */
2930
+ async initEditor() {
2931
+ const QuillCtor = (await import('quill')).default;
2932
+ // Le composant a pu etre detruit pendant le chargement du module.
2933
+ if (this.destroyed)
2934
+ return;
2935
+ registerCustomIcons(QuillCtor);
2899
2936
  const opts = this.options();
2900
2937
  const toolbar = opts?.toolbar ?? TOOLBAR_PRESETS[opts?.preset ?? 'standard'];
2901
2938
  const config = {
@@ -2926,7 +2963,7 @@ class RichTextEditorComponent {
2926
2963
  },
2927
2964
  },
2928
2965
  };
2929
- this.quill = new Quill(this.editorRef().nativeElement, config);
2966
+ this.quill = new QuillCtor(this.editorRef().nativeElement, config);
2930
2967
  // A11y (WCAG 2.1.2, pas de piège clavier) : par défaut Quill capture Tab pour
2931
2968
  // insérer une tabulation / indenter, ce qui empêche de sortir du champ au clavier.
2932
2969
  // On retire toutes les liaisons Tab → Tab / Shift+Tab déplacent le focus nativement
@@ -2984,6 +3021,7 @@ class RichTextEditorComponent {
2984
3021
  });
2985
3022
  }
2986
3023
  ngOnDestroy() {
3024
+ this.destroyed = true;
2987
3025
  // Quill 2 n'expose pas de destroy() : on retire nos listeners et on lâche
2988
3026
  // l'instance (le DOM de l'éditeur est supprimé avec le composant).
2989
3027
  if (this.quill) {
@@ -3895,7 +3933,7 @@ class FormFieldComponent {
3895
3933
  this.formControl.markAsTouched();
3896
3934
  }
3897
3935
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3898
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FormFieldComponent, isStandalone: true, selector: "cw-form-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: false, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, displayLabel: { classPropertyName: "displayLabel", publicName: "displayLabel", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, rangeOptions: { classPropertyName: "rangeOptions", publicName: "rangeOptions", isSignal: false, isRequired: false, transformFunction: null }, validationOptions: { classPropertyName: "validationOptions", publicName: "validationOptions", isSignal: false, isRequired: false, transformFunction: null }, autocompleteOptions: { classPropertyName: "autocompleteOptions", publicName: "autocompleteOptions", isSignal: false, isRequired: false, transformFunction: null }, richTextOptions: { classPropertyName: "richTextOptions", publicName: "richTextOptions", isSignal: false, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: false, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null }, addonLeft: { classPropertyName: "addonLeft", publicName: "addonLeft", isSignal: false, isRequired: false, transformFunction: null }, addonRight: { classPropertyName: "addonRight", publicName: "addonRight", isSignal: false, isRequired: false, transformFunction: null }, isInAddon: { classPropertyName: "isInAddon", publicName: "isInAddon", isSignal: false, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: false, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: false, isRequired: false, transformFunction: null }, sliderValue: { classPropertyName: "sliderValue", publicName: "sliderValue", isSignal: false, isRequired: false, transformFunction: null }, sliderOptions: { classPropertyName: "sliderOptions", publicName: "sliderOptions", isSignal: false, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: false, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: false, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, initialCountry: { classPropertyName: "initialCountry", publicName: "initialCountry", isSignal: false, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refreshEvent: "refreshEvent", textChanged: "textChanged", valueChange: "valueChange", phoneRegionChange: "phoneRegionChange" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "optionTemplate", first: true, predicate: ["ngOptionTpl"], descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: ["ngLabelTpl"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "checkboxInputRef", first: true, predicate: ["checkboxInput"], descendants: true, isSignal: true }, { propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }, { propertyName: "phoneInputRef", first: true, predicate: ["phoneInput"], descendants: true, isSignal: true }, { propertyName: "autocompleteRef", first: true, predicate: AutocompleteComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!isInAddon) {\n @if (\n type !== typeField.checkbox &&\n type !== typeField.radio &&\n type !== typeField.checkboxButton &&\n type !== typeField.radioButton &&\n type !== typeField.checkboxInline &&\n type !== typeField.radioInline &&\n type !== typeField.switch &&\n type !== typeField.range &&\n type !== typeField.switchSmall\n ) {\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{ label | translate }}\n\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n\n @if (tooltip) {\n <!-- <button type=\"button\" class=\"btn btn-link btn-popover\" placement=\"bottom\" [ngbPopover]=\"popContent\" container=\"body\"\n triggers=\"mouseenter:mouseleave\">\n <span class=\"btn-popover-icon bo-icons bo-help\"></span>\n </button>\n <ng-template #popContent>\n <div [innerHTML]=\"tooltip\"></div>\n </ng-template> -->\n }\n </label>\n }\n\n @if (addonLeft || addonRight) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n @if(addonLeft) {\n <div class=\"field-group-addon-left\">\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n @if(addonRight) {\n <div class=\"field-group-addon-right\">\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\n </div>\n }\n </div>\n }\n @else {\n @if ( isInInputGroup() ) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n </div>\n }\n @else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n }\n }\n\n <!-- Error message -->\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\n @if (\n !errorMessages?.['required'] &&\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\n ) {\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate}\"></span>\n }\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\n }\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\n }\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\n }\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\n }\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\n }\n @if (errorMessages) {\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\n }\n }\n }\n </div>\n }\n\n @if (help || autoHelpEntries.length) {\n <div [id]=\"name + '-help'\" class=\"field-text\">\n @if (help) {\n <span>{{ help | translate }}</span>\n }\n @for (entry of autoHelpEntries; track entry.key) {\n <span>{{ entry.key | translate: entry.params }}</span>\n }\n </div>\n }\n\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\n <ul class=\"autocomplete-chips\" role=\"list\">\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\n <li>\n <button type=\"button\" class=\"autocomplete-chip\"\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\n <span>{{ chip.label }}</span>\n @if (!isEffectivelyDisabled && !isReadonly) {\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n}\n@else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n}\n\n<ng-template #field>\n <!-- Autocomplete (mono / multi) -->\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\n <cw-autocomplete\n [id]=\"name\"\n [control]=\"formControl\"\n [fetcher]=\"autocompleteOptions.fetcher\"\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\n [columns]=\"autocompleteOptions.columns ?? []\"\n [resolver]=\"autocompleteOptions.resolver ?? null\"\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\n [multiple]=\"type === typeField.autocompleteMultiple\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\"\n [placeholder]=\"placeholder\">\n </cw-autocomplete>\n }\n\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\n @if (type === typeField.richText) {\n <cw-rich-text-editor\n [id]=\"name\"\n [control]=\"formControl\"\n [options]=\"richTextOptions\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\">\n </cw-rich-text-editor>\n }\n\n <!-- Text -->\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\n typeField.email,\n typeField.color, typeField.zipCode].includes(type)) {\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n <!-- Phone (intl-tel-input) -->\n @if (type === typeField.phone) {\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\n }\n\n <!-- File -->\n @if (type === typeField.file) {\n <input #fileInput type=\"file\" class=\"field-control\" [id]=\"name\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.accept]=\"acceptAttr\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n @if (type === typeField.password) {\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n <cw-button [type]=\"buttonType.ghost\"\n cssClass=\"btn-password-field\"\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\n [withOnlyIcon]=\"true\"\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\n (btnAction)=\"togglePasswordVisibility()\">\n </cw-button>\n }\n\n <!-- Textarea -->\n @if (type === typeField.textarea) {\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\n }\n\n <!-- Select -->\n @if (type === typeField.select) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\">\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- NgSelect -->\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- Radio -->\n @if (type === typeField.radioInline || type === typeField.radio) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\">\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Radio button -->\n @if (type === typeField.radioButton) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n\n <!-- Checkbox Switch -->\n @if ( type === typeField.switch || type === typeField.switchSmall)\n {\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate }}</label>\n </div>\n }\n\n <!-- Checkbox -->\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\n @if (isSingleCheckbox()) {\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [class.is-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\n <label [for]=\"name\" class=\"field-check-label\">\n {{ label | translate }}\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </div>\n }\n @else if( options.length > 1) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n @else {\n <fieldset>\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n }\n\n <!-- Checkbox button -->\n @if (type === typeField.checkboxButton && options.length > 0) {\n\n @if(options.length > 1) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n @else {\n <fieldset>\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n </legend>\n <div class=\"btn-group btn-group-secondary\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\n {{ opt.label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n }\n </div>\n </fieldset>\n }\n }\n\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\n @if ([typeField.dateToDate, typeField.timeToTime, typeField.dateTimeToDateTime].includes(type) && isRange) {\n\n <div class=\"field-group\">\n <div class=\"field-group-addon-left\">Du</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\n (focus)=\"onFocusRange('start')\" />\n\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\n (click)=\"onClearFieldPeriod('start')\">\n &times;\n </button>\n }\n <div class=\"field-group-addon-center\">au</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\n (focus)=\"onFocusRange('end')\" />\n\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\n (click)=\"onClearFieldPeriod('end')\">\n &times;\n </button>\n }\n </div>\n }\n\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\n\n <div class=\"field-group\">\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-left\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\n </button>\n </div>\n }\n\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n @if(formControl?.value && !isDisabledOrReadonly) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n\n\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\n </button>\n </div>\n }\n\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J\n <span class=\"visually-hidden\">Aujourd'hui</span>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+1\n <span class=\"visually-hidden\">Demain</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+2\n <span class=\"visually-hidden\">Dans 2 jours</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusTwo) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+7\n <span class=\"visually-hidden\">Dans 7 jours</span>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (type === typeField.slider) {\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\n }\n\n @if (type === typeField.range) {\n <div class=\"slider\">\n\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\n </cw-button>\n\n <div class=\"slider-input\">\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ label | translate }} {{ formControl.value }}\n @if (rangeOptions.unit) {\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\n }\n </label>\n\n <div class=\"slider-custom-bar\">\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\n </div>\n </div>\n\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\">\n </div>\n\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\n </cw-button>\n </div>\n }\n\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\n @if (type === typeField.autocomplete) {\n @if (autocompleteRef()?.hasAnyContent()) {\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\n (click)=\"onClearAutocomplete()\">&times;</button>\n }\n } @else if (type === typeField.ngSelectMultiple) {\n <!-- value est un tableau : un [] vide \u00E9tant truthy, on teste .length pour n'afficher le clear global que s'il y a au moins une s\u00E9lection. -->\n @if (formControl?.value?.length) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n } @else {\n @if(formControl?.value) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n }\n }\n\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "tabFocusOnClearButton", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i3.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i3.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "ngmodule", type: NgxSliderModule }, { kind: "component", type: i4.SliderComponent, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus", "cancelUserChange"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: AutocompleteComponent, selector: "cw-autocomplete", inputs: ["control", "fetcher", "displayField", "valueField", "columns", "multiple", "minChars", "debounceMs", "selectedItem", "resolver", "selectedItems", "placeholder", "id", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["itemSelected", "itemsChange"] }, { kind: "component", type: RichTextEditorComponent, selector: "cw-rich-text-editor", inputs: ["control", "options", "id", "placeholder", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["valueChange"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
3936
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: FormFieldComponent, isStandalone: true, selector: "cw-form-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: false, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, displayLabel: { classPropertyName: "displayLabel", publicName: "displayLabel", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, rangeOptions: { classPropertyName: "rangeOptions", publicName: "rangeOptions", isSignal: false, isRequired: false, transformFunction: null }, validationOptions: { classPropertyName: "validationOptions", publicName: "validationOptions", isSignal: false, isRequired: false, transformFunction: null }, autocompleteOptions: { classPropertyName: "autocompleteOptions", publicName: "autocompleteOptions", isSignal: false, isRequired: false, transformFunction: null }, richTextOptions: { classPropertyName: "richTextOptions", publicName: "richTextOptions", isSignal: false, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: false, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null }, addonLeft: { classPropertyName: "addonLeft", publicName: "addonLeft", isSignal: false, isRequired: false, transformFunction: null }, addonRight: { classPropertyName: "addonRight", publicName: "addonRight", isSignal: false, isRequired: false, transformFunction: null }, isInAddon: { classPropertyName: "isInAddon", publicName: "isInAddon", isSignal: false, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: false, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: false, isRequired: false, transformFunction: null }, sliderValue: { classPropertyName: "sliderValue", publicName: "sliderValue", isSignal: false, isRequired: false, transformFunction: null }, sliderOptions: { classPropertyName: "sliderOptions", publicName: "sliderOptions", isSignal: false, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: false, isRequired: false, transformFunction: null }, skeletonMode: { classPropertyName: "skeletonMode", publicName: "skeletonMode", isSignal: false, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, initialCountry: { classPropertyName: "initialCountry", publicName: "initialCountry", isSignal: false, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refreshEvent: "refreshEvent", textChanged: "textChanged", valueChange: "valueChange", phoneRegionChange: "phoneRegionChange" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "optionTemplate", first: true, predicate: ["ngOptionTpl"], descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: ["ngLabelTpl"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "checkboxInputRef", first: true, predicate: ["checkboxInput"], descendants: true, isSignal: true }, { propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }, { propertyName: "phoneInputRef", first: true, predicate: ["phoneInput"], descendants: true, isSignal: true }, { propertyName: "autocompleteRef", first: true, predicate: AutocompleteComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!isInAddon) {\n @if (\n type !== typeField.checkbox &&\n type !== typeField.radio &&\n type !== typeField.checkboxButton &&\n type !== typeField.radioButton &&\n type !== typeField.checkboxInline &&\n type !== typeField.radioInline &&\n type !== typeField.switch &&\n type !== typeField.range &&\n type !== typeField.switchSmall\n ) {\n <label [for]=\"name\" class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{ label | translate }}\n\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n\n @if (tooltip) {\n <!-- <button type=\"button\" class=\"btn btn-link btn-popover\" placement=\"bottom\" [ngbPopover]=\"popContent\" container=\"body\"\n triggers=\"mouseenter:mouseleave\">\n <span class=\"btn-popover-icon bo-icons bo-help\"></span>\n </button>\n <ng-template #popContent>\n <div [innerHTML]=\"tooltip\"></div>\n </ng-template> -->\n }\n </label>\n }\n\n @if (addonLeft || addonRight) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n @if(addonLeft) {\n <div class=\"field-group-addon-left\">\n <ng-container [ngTemplateOutlet]=\"addonLeft\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n @if(addonRight) {\n <div class=\"field-group-addon-right\">\n <ng-container [ngTemplateOutlet]=\"addonRight\"></ng-container>\n </div>\n }\n </div>\n }\n @else {\n @if ( isInInputGroup() ) {\n <div class=\"field-group\" [class.field-group-invalid]=\"isInvalid\" [class.field-group-disabled]=\"isDisabledOrReadonly\">\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n </div>\n }\n @else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n }\n }\n\n <!-- Error message -->\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\n <div class=\"field-invalid\" [id]=\"'error-' + name\">\n @if (\n !errorMessages?.['required'] &&\n ((controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required']))\n ) {\n <span [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label | translate}\"></span>\n }\n @if (!errorMessages?.['rangeInvalid'] && controlOrGroup?.errors?.['rangeInvalid']) {\n <span>{{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}</span>\n }\n @if (!errorMessages?.['fileExtension'] && controlOrGroup?.errors?.['fileExtension']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_EXTENSION' | translate: { accept: acceptLabel } }}</span>\n }\n @if (!errorMessages?.['fileSize'] && controlOrGroup?.errors?.['fileSize']) {\n <span>{{ '_COMMON._FORM.ERROR_FILE_SIZE' | translate: { maxSize: maxSizeLabel } }}</span>\n }\n @if (!errorMessages?.['email'] && controlOrGroup?.errors?.['email']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_EMAIL' | translate }}</span>\n }\n @if (!errorMessages?.['phone'] && controlOrGroup?.errors?.['phone']) {\n <span>{{ '_COMMON._FORM.ERROR_INVALID_PHONE' | translate }}</span>\n }\n @if (errorMessages) {\n @for (entry of errorMessages | keyvalue: keepOrder; track entry.key) {\n @if (controlOrGroup?.errors?.[entry.key]; as errVal) {\n <span>{{ entry.value | translate: (errVal === true ? null : errVal) }}</span>\n }\n }\n }\n </div>\n }\n\n @if (help || autoHelpEntries.length) {\n <div [id]=\"name + '-help'\" class=\"field-text\">\n @if (help) {\n <span>{{ help | translate }}</span>\n }\n @for (entry of autoHelpEntries; track entry.key) {\n <span>{{ entry.key | translate: entry.params }}</span>\n }\n </div>\n }\n\n <!-- Chips de la multi-s\u00E9lection (autocomplete) : rendus ici, hors du field-group et apr\u00E8s\n erreur/help, pour \u00EAtre visuellement d\u00E9tach\u00E9s du champ. La donn\u00E9e et le retrait restent\n port\u00E9s par cw-autocomplete (`chips()` / `onChipRemove()`), seul l'affichage est d\u00E9l\u00E9gu\u00E9. -->\n @if (type === typeField.autocompleteMultiple && autocompleteRef()?.chips()?.length) {\n <ul class=\"autocomplete-chips\" role=\"list\">\n @for (chip of autocompleteRef()!.chips(); track chip.item) {\n <li>\n <button type=\"button\" class=\"autocomplete-chip\"\n [disabled]=\"isEffectivelyDisabled || isReadonly\"\n (click)=\"autocompleteRef()!.onChipRemove(chip.item)\">\n <span>{{ chip.label }}</span>\n @if (!isEffectivelyDisabled && !isReadonly) {\n <span aria-hidden=\"true\" class=\"autocomplete-chip-x\">&times;</span>\n <span class=\"visually-hidden\">{{ '_COMMON._ACTION.DELETE' | translate }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n}\n@else {\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\n}\n\n<ng-template #field>\n <!-- Autocomplete (mono / multi) -->\n @if ((type === typeField.autocomplete || type === typeField.autocompleteMultiple) && autocompleteOptions) {\n <cw-autocomplete\n [id]=\"name\"\n [control]=\"formControl\"\n [fetcher]=\"autocompleteOptions.fetcher\"\n [displayField]=\"autocompleteOptions.displayField ?? 'label'\"\n [valueField]=\"autocompleteOptions.valueField ?? 'id'\"\n [columns]=\"autocompleteOptions.columns ?? []\"\n [resolver]=\"autocompleteOptions.resolver ?? null\"\n [selectedItem]=\"autocompleteOptions.selectedItem ?? null\"\n [selectedItems]=\"autocompleteOptions.selectedItems ?? []\"\n [minChars]=\"autocompleteOptions.minChars ?? 2\"\n [debounceMs]=\"autocompleteOptions.debounceMs ?? 250\"\n [multiple]=\"type === typeField.autocompleteMultiple\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\"\n [placeholder]=\"placeholder\">\n </cw-autocomplete>\n }\n\n <!-- Rich text editor (Quill) : sous-composant interne, sans field-group ni bouton clear\n (il porte sa propre bordure + toolbar). Le label statique du form-field reste au-dessus. -->\n @if (type === typeField.richText) {\n <cw-rich-text-editor\n [id]=\"name\"\n [control]=\"formControl\"\n [options]=\"richTextOptions\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\"\n [isRequired]=\"isRequired\"\n [isReadonly]=\"!!isReadonly\"\n [isDisabled]=\"isEffectivelyDisabled\"\n [ariaInvalid]=\"control.invalid && control.touched\"\n [ariaDescribedBy]=\"getDescribedBy(control)\">\n </cw-rich-text-editor>\n }\n\n <!-- Text -->\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number,\n typeField.email,\n typeField.color, typeField.zipCode].includes(type)) {\n <input [type]=\"type === typeField.zipCode ? 'text' : type\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '', type === typeField.zipCode ? 'field-control-zipcode' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n <!-- Phone (intl-tel-input) -->\n @if (type === typeField.phone) {\n <input #phoneInput type=\"tel\" class=\"field-control\" [id]=\"name\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onPhoneBlur($event)\" />\n }\n\n <!-- File -->\n @if (type === typeField.file) {\n <input #fileInput type=\"file\" class=\"field-control\" [id]=\"name\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isEffectivelyDisabled\" [attr.aria-required]=\"isRequired\"\n [attr.accept]=\"acceptAttr\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (change)=\"onFileChange($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n }\n\n @if (type === typeField.password) {\n <input [type]=\"isPasswordShown ? 'text' : 'password'\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n <cw-button [type]=\"buttonType.ghost\"\n cssClass=\"btn-password-field\"\n [withIcon]=\"isPasswordShown ? spriteIcon.toolbarHidePassword : spriteIcon.toolbarShowPassword\"\n [withOnlyIcon]=\"true\"\n [label]=\"isPasswordShown ? '_COMMON._FORM._SHOW_HIDE_PWD.HIDE' : '_COMMON._FORM._SHOW_HIDE_PWD.SHOW'\"\n (btnAction)=\"togglePasswordVisibility()\">\n </cw-button>\n }\n\n <!-- Textarea -->\n @if (type === typeField.textarea) {\n <textarea class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? (placeholder | translate) : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.minlength]=\"minLengthAttr\" [attr.maxlength]=\"maxLengthAttr\" [attr.pattern]=\"patternAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\"></textarea>\n }\n\n <!-- Select -->\n @if (type === typeField.select) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\" [clearable]=\"false\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item | translate, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\">\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- NgSelect -->\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" [appendTo]=\"appendTo ?? ''\" bindValue=\"value\"\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\" [clearable]=\"false\"\n [placeholder]=\"placeholder ? (placeholder | translate) : ''\" [readonly]=\"isReadonly\"\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\" [attr.id]=\"name\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" (search)=\"textChanged.emit($event?.term)\">\n\n <!-- Template pour les options -->\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n @if (optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { item: item, index: index, searchTerm: search }\"></ng-container>\n }\n @else {\n <div>{{ item.label | translate }}</div>\n }\n </ng-template>\n\n <!-- Template pour le label -->\n <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n <span class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\n @if (labelTemplate) {\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { item: item | translate }\"></ng-container>\n }\n @else {\n {{ (item.label | translate) || (placeholder | translate) }}\n }\n </ng-template>\n </ng-select>\n }\n\n <!-- Radio -->\n @if (type === typeField.radioInline || type === typeField.radio) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.radioInline ? 'd-flex-h gap-md flex-wrap' : 'd-flex-v'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\">\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"field-check-input\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">{{ opt.label | translate }}</label>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n <!-- Radio button -->\n @if (type === typeField.radioButton) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\n class=\"visually-hidden\" [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" (change)=\"onRadioChange(opt.value)\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n\n <!-- Checkbox Switch -->\n @if ( type === typeField.switch || type === typeField.switchSmall)\n {\n <div class=\"field-check field-switch\" [ngClass]=\"{'field-switch-small': type === typeField.switchSmall}\">\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"field-check-input\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"/>\n <label [for]=\"name\" class=\"field-check-label\">{{ label | translate }}</label>\n </div>\n }\n\n <!-- Checkbox -->\n @if (type === typeField.checkboxInline || type === typeField.checkbox) {\n @if (isSingleCheckbox()) {\n <div class=\"field-check\" [class.field-check-inline]=\"type === typeField.checkboxInline\">\n <input #checkboxInput type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\"\n class=\"field-check-input\"\n [class.is-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control?.invalid && control?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" />\n <label [for]=\"name\" class=\"field-check-label\">\n {{ label | translate }}\n @if (isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </div>\n }\n @else if( options.length > 1) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n @else {\n <fieldset>\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n </legend>\n <ul class=\"list-unstyled mb-none\" [ngClass]=\"type === typeField.checkboxInline ? 'd-flex-h gap-md' : 'd-flex-v'\">\n @for (opt of options; track opt.value) {\n <li class=\"field-check\" [ngClass]=\"{ 'field-check-inline': type === typeField.checkboxInline }\">\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"field-check-input\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"field-check-label\">\n {{ opt.label | translate }}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n </li>\n }\n </ul>\n </fieldset>\n }\n }\n\n <!-- Checkbox button -->\n @if (type === typeField.checkboxButton && options.length > 0) {\n\n @if(options.length > 1) {\n <fieldset\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\">\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </legend>\n <div class=\"field-group field-group-btn\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\" />\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">{{ opt.label | translate }}</label>\n }\n </div>\n </fieldset>\n }\n @else {\n <fieldset>\n <legend class=\"field-label\" [class.visually-hidden]=\"!displayLabel\">\n {{label | translate}}\n </legend>\n <div class=\"btn-group btn-group-secondary\">\n @for (opt of options; track opt.value) {\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n [attr.disabled]=\"(isEffectivelyDisabled || opt.disabled) ? 'disabled' : null\"/>\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-field-group\">\n {{ opt.label | translate}}\n @if(isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n }\n </div>\n </fieldset>\n }\n }\n\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\n @if ([typeField.dateToDate, typeField.timeToTime, typeField.dateTimeToDateTime].includes(type) && isRange) {\n\n <div class=\"field-group\">\n <div class=\"field-group-addon-left\">Du</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minStartAttr\" [attr.max]=\"maxStartAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('start'))\"\n (focus)=\"onFocusRange('start')\" />\n\n @if(getControl('start')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-secondary btn-clear-field\"\n (click)=\"onClearFieldPeriod('start')\">\n &times;\n </button>\n }\n <div class=\"field-group-addon-center\">au</div>\n <input [type]=\"getInputType()\" class=\"field-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')!\"\n [attr.placeholder]=\"type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)\"\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\"\n [attr.min]=\"minEndAttr\" [attr.max]=\"maxEndAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\n [attr.aria-describedby]=\"getDescribedBy(getControl('end'))\"\n (focus)=\"onFocusRange('end')\" />\n\n @if(getControl('end')?.value && !isDisabledOrReadonly) {\n <button type=\"button\" class=\"btn btn-ghost btn-clear-field\"\n (click)=\"onClearFieldPeriod('end')\">\n &times;\n </button>\n }\n </div>\n }\n\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\n\n <div class=\"field-group\">\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-left\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('prev')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextLeft\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></cw-icon>\n </button>\n </div>\n }\n\n <input type=\"date\" class=\"field-control\" [id]=\"name\" [formControl]=\"formControl\"\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.aria-required]=\"isRequired\"\n [attr.min]=\"minAttr\" [attr.max]=\"maxAttr\" [attr.step]=\"stepAttr\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.aria-invalid]=\"control.invalid && control.touched\"\n [attr.aria-describedby]=\"getDescribedBy(control)\"\n (focus)=\"onFocus()\" (blur)=\"onBlur()\" />\n\n @if(formControl?.value && !isDisabledOrReadonly) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n\n\n @if (type === typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onDateAddDay('next')\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.nextRight\" [label]=\"'Jour suivant'\"></cw-icon>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onRefresh()\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n <cw-icon font=\"optyweb\" [icon]=\"spriteIcon.toolbarRefresh\" [label]=\"'Rafra\u00EEchir'\"></cw-icon>\n </button>\n </div>\n }\n\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(0)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J\n <span class=\"visually-hidden\">Aujourd'hui</span>\n </button>\n </div>\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(1)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+1\n <span class=\"visually-hidden\">Demain</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost \" type=\"button\" (click)=\"onTodayAddDay(2)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+2\n <span class=\"visually-hidden\">Dans 2 jours</span>\n </button>\n </div>\n\n @if (type !== typeField.datePlusTwo) {\n <div class=\"field-group-addon-right\">\n <button class=\"btn btn-ghost\" type=\"button\" (click)=\"onTodayAddDay(7)\"\n [attr.disabled]=\"isEffectivelyDisabled ? 'disabled' : null\">\n J+7\n <span class=\"visually-hidden\">Dans 7 jours</span>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (type === typeField.slider) {\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\n }\n\n @if (type === typeField.range) {\n <div class=\"slider\">\n\n <cw-button [isDisabled]=\"formControl.value <= rangeOptions.floor\" [label]=\"'Diminuer ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarMinus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('decrease')\">\n </cw-button>\n\n <div class=\"slider-input\">\n <label [for]=\"name\" class=\"slider-tooltip\" [style.left]=\"getRangePercent() + '%'\" aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ label | translate }} {{ formControl.value }}\n @if (rangeOptions.unit) {\n <abbr [title]=\"rangeOptions.unit\">{{ rangeOptions.unit }}</abbr>\n }\n </label>\n\n <div class=\"slider-custom-bar\">\n <div class=\"slider-custom-bar-selection\" [style.width]=\"getRangePercent() + '%'\">\n </div>\n </div>\n\n <input type=\"range\" [id]=\"name\" [formControl]=\"formControl\" [min]=\"rangeOptions.floor\" [max]=\"rangeOptions.ceil\"\n [step]=\"rangeOptions.step || 1\" class=\"field-control-range\" [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"control.invalid && control.touched\">\n </div>\n\n <cw-button [isDisabled]=\"formControl.value >= rangeOptions.ceil\" [label]=\"'Augmenter ' + formControl.value + ' ' + label\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"onRangeStep('increase')\">\n </cw-button>\n </div>\n }\n\n @if (isInInputGroup() && clearable && !isDisabledOrReadonly && type !== typeField.autocompleteMultiple) {\n @if (type === typeField.autocomplete) {\n @if (autocompleteRef()?.hasAnyContent()) {\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\"\n (click)=\"onClearAutocomplete()\">&times;</button>\n }\n } @else if (type === typeField.ngSelectMultiple) {\n <!-- value est un tableau : un [] vide \u00E9tant truthy, on teste .length pour n'afficher le clear global que s'il y a au moins une s\u00E9lection. -->\n @if (formControl?.value?.length) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n } @else {\n @if(formControl?.value) {\n <button class=\"btn btn-ghost btn-clear-field\" type=\"button\"\n (click)=\"onClearField(formControl)\">&times;</button>\n }\n }\n }\n\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "tabFocusOnClearButton", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i3.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i3.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "ngmodule", type: NgxSliderModule }, { kind: "component", type: i4.SliderComponent, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus", "cancelUserChange"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: AutocompleteComponent, selector: "cw-autocomplete", inputs: ["control", "fetcher", "displayField", "valueField", "columns", "multiple", "minChars", "debounceMs", "selectedItem", "resolver", "selectedItems", "placeholder", "id", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["itemSelected", "itemsChange"] }, { kind: "component", type: RichTextEditorComponent, selector: "cw-rich-text-editor", inputs: ["control", "options", "id", "placeholder", "isRequired", "isReadonly", "isDisabled", "ariaInvalid", "ariaDescribedBy"], outputs: ["valueChange"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
3899
3937
  }
3900
3938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FormFieldComponent, decorators: [{
3901
3939
  type: Component,
@@ -4340,7 +4378,7 @@ class ModalsComponent {
4340
4378
  this.destroyRef.onDestroy(unlisten);
4341
4379
  }
4342
4380
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ModalsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4343
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ModalsComponent, isStandalone: true, selector: "cw-modals", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, isAutcompModal: { classPropertyName: "isAutcompModal", publicName: "isAutcompModal", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, textType: { classPropertyName: "textType", publicName: "textType", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, itemsToDelete: { classPropertyName: "itemsToDelete", publicName: "itemsToDelete", isSignal: true, isRequired: false, transformFunction: null }, itemsToDeleteTitle: { classPropertyName: "itemsToDeleteTitle", publicName: "itemsToDeleteTitle", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction1: { classPropertyName: "labelBtnAction1", publicName: "labelBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction2: { classPropertyName: "labelBtnAction2", publicName: "labelBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction1: { classPropertyName: "disableBtnAction1", publicName: "disableBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction2: { classPropertyName: "disableBtnAction2", publicName: "disableBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, customBodyTemplate: { classPropertyName: "customBodyTemplate", publicName: "customBodyTemplate", isSignal: true, isRequired: false, transformFunction: null }, customBodyContext: { classPropertyName: "customBodyContext", publicName: "customBodyContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction1: "btnAction1", btnAction2: "btnAction2" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"cityway-v8 modal-backdrop fade show\" style=\"z-index: 1050;\" aria-hidden=\"true\"></div>\n\n<div role=\"dialog\" tabindex=\"-1\" aria-modal=\"true\"\n [attr.aria-labelledby]=\"type() === modalsType.loader ? null : 'modal-basic-title'\"\n [attr.aria-label]=\"type() === modalsType.loader ? ('_COMMON._HTTP.TXT_LOADING' | translate) : null\"\n class=\"cityway-v8 d-flex modal show\" [ngClass]=\"customClass()\" data-test-ctw=\"modal\" (keydown)=\"onKeyDown($event)\">\n\n <!-- Backdrop : fermeture a la souris (confort). Le clavier (Escape) est gere\n par onKeyDown du dialog ; le backdrop n'est pas un element interactif focusable. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"modal-inner-backdrop\" (click)=\"type() !== modalsType.loader && closeModal()\"></div>\n\n <div #modalContainer role=\"document\" class=\"modal-dialog modal-dialog-centered\"\n [ngClass]=\"['modal-' + size(), scrollable() ? 'modal-dialog-scrollable' : '']\">\n\n <div class=\"modal-content\">\n\n @if (type() === modalsType.loader) {\n <div class=\"modal-body\">\n <cw-loader></cw-loader>\n </div>\n }\n @else {\n @if (isStateLike()) {\n <!-- state + delete : close en absolu (top-right, hors flux donc ne reserve\n pas de hauteur), body centre avec le picto de statut EN TETE du flux\n (il pousse donc le titre normalement) -->\n <button type=\"button\" class=\"btn-close modal-close-floating\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n (click)=\"closeModal()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n\n <div class=\"modal-body modal-body-state d-flex-v gap-md items-center\" [class.modal-text-center]=\"isBodyCentered()\">\n <cw-icon [icon]=\"statusIcon()\" [iconSize]=\"iconSize['xl']\" [type]=\"iconType.square\"\n [iconUiType]=\"statusUiType()\" aria-hidden=\"true\"></cw-icon>\n\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\n @if (type() === modalsType.delete) {\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete().length, name: itemsToDeleteTitle() | translate } }}\n }\n @else {\n {{ (modalTitle() ?? '') | translate }}\n }\n </h1>\n\n @if (type() === modalsType.delete) {\n <!-- zone delete en dur : texte + liste + avertissement, pleine largeur aligne a gauche -->\n <div class=\"w-100 d-flex-v gap-md\">\n @if (itemsToDelete().length > 1) {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\n }\n @else {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\n }\n\n @if (itemsToDelete().length > 0) {\n <ul class=\"mb-none\">\n @for (item of itemsToDelete(); track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.IRREVERSIBLE' | translate\"></div>\n </div>\n }\n\n @if (customBodyTemplate()) {\n <div class=\"w-100\">\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n </div>\n }\n </div>\n }\n @else {\n <!-- default + sidepanel : header titre + close, body = contenu libre (slot) -->\n <div class=\"modal-header\">\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\n {{ (modalTitle() ?? '') | translate }}\n </h1>\n\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n (click)=\"closeModal()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n </div>\n\n <div class=\"modal-body d-flex-v gap-md\">\n @if (customBodyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n }\n </div>\n }\n\n <!-- footer commun : secondaire a gauche, primaire/danger a droite (ordre DS) -->\n <div class=\"modal-footer\">\n @if (type() === modalsType.delete) {\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n (btnAction)=\"closeModal()\" dataTest=\"btn-close-modal\">\n </cw-button>\n\n <cw-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n @if (labelBtnAction2()) {\n <cw-button [label]=\"labelBtnAction2()\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"disableBtnAction2()\" (btnAction)=\"action2Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n (btnAction)=\"closeModal()\" dataTest=\"btn-close-modal\">\n </cw-button>\n }\n @if (labelBtnAction1()) {\n <cw-button [label]=\"labelBtnAction1()\" [type]=\"buttonTypeEnum.primary\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n }\n </div>\n }\n\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4381
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ModalsComponent, isStandalone: true, selector: "cw-modals", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, isAutcompModal: { classPropertyName: "isAutcompModal", publicName: "isAutcompModal", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, textType: { classPropertyName: "textType", publicName: "textType", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, itemsToDelete: { classPropertyName: "itemsToDelete", publicName: "itemsToDelete", isSignal: true, isRequired: false, transformFunction: null }, itemsToDeleteTitle: { classPropertyName: "itemsToDeleteTitle", publicName: "itemsToDeleteTitle", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction1: { classPropertyName: "labelBtnAction1", publicName: "labelBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, labelBtnAction2: { classPropertyName: "labelBtnAction2", publicName: "labelBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction1: { classPropertyName: "disableBtnAction1", publicName: "disableBtnAction1", isSignal: true, isRequired: false, transformFunction: null }, disableBtnAction2: { classPropertyName: "disableBtnAction2", publicName: "disableBtnAction2", isSignal: true, isRequired: false, transformFunction: null }, customBodyTemplate: { classPropertyName: "customBodyTemplate", publicName: "customBodyTemplate", isSignal: true, isRequired: false, transformFunction: null }, customBodyContext: { classPropertyName: "customBodyContext", publicName: "customBodyContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnAction1: "btnAction1", btnAction2: "btnAction2" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"cityway-v8 modal-backdrop fade show\" style=\"z-index: 1050;\" aria-hidden=\"true\"></div>\n\n<div role=\"dialog\" tabindex=\"-1\" aria-modal=\"true\"\n [attr.aria-labelledby]=\"type() === modalsType.loader ? null : 'modal-basic-title'\"\n [attr.aria-label]=\"type() === modalsType.loader ? ('_COMMON._HTTP.TXT_LOADING' | translate) : null\"\n class=\"cityway-v8 d-flex modal show\" [ngClass]=\"customClass()\" data-test-ctw=\"modal\" (keydown)=\"onKeyDown($event)\">\n\n <!-- Backdrop : fermeture a la souris (confort). Le clavier (Escape) est gere\n par onKeyDown du dialog ; le backdrop n'est pas un element interactif focusable. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"modal-inner-backdrop\" (click)=\"type() !== modalsType.loader && closeModal()\"></div>\n\n <div #modalContainer role=\"document\" class=\"modal-dialog modal-dialog-centered\"\n [ngClass]=\"['modal-' + size(), scrollable() ? 'modal-dialog-scrollable' : '']\">\n\n <div class=\"modal-content\">\n\n @if (type() === modalsType.loader) {\n <div class=\"modal-body\">\n <cw-loader></cw-loader>\n </div>\n }\n @else {\n @if (isStateLike()) {\n <!-- state + delete : close en absolu (top-right, hors flux donc ne reserve\n pas de hauteur), body centre avec le picto de statut EN TETE du flux\n (il pousse donc le titre normalement) -->\n <button type=\"button\" class=\"btn-close modal-close-floating\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n (click)=\"closeModal()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n\n <div class=\"modal-body modal-body-state d-flex-v gap-md items-center\" [class.modal-text-center]=\"isBodyCentered()\">\n <cw-icon [icon]=\"statusIcon()\" [iconSize]=\"iconSize['xl']\" [type]=\"iconType.square\"\n [iconUiType]=\"statusUiType()\" aria-hidden=\"true\"></cw-icon>\n\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\n @if (type() === modalsType.delete) {\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete().length, name: itemsToDeleteTitle() | translate } }}\n }\n @else {\n {{ (modalTitle() ?? '') | translate }}\n }\n </h1>\n\n @if (type() === modalsType.delete) {\n <!-- zone delete en dur : texte + liste + avertissement, pleine largeur aligne a gauche -->\n <div class=\"w-100 d-flex-v gap-md\">\n @if (itemsToDelete().length > 1) {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\n }\n @else {\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\n }\n\n @if (itemsToDelete().length > 0) {\n <ul class=\"mb-none\">\n @for (item of itemsToDelete(); track item) {\n <li>{{ item }}</li>\n }\n </ul>\n }\n\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.IRREVERSIBLE' | translate\"></div>\n </div>\n }\n\n @if (customBodyTemplate()) {\n <div class=\"w-100\">\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n </div>\n }\n </div>\n }\n @else {\n <!-- default + sidepanel : header titre + close, body = contenu libre (slot) -->\n <div class=\"modal-header\">\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\n {{ (modalTitle() ?? '') | translate }}\n </h1>\n\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\n (click)=\"closeModal()\" data-test-ctw=\"btn-close-modal\">\n <cw-icon [icon]=\"spriteIcon.toolbarClose\" [iconSize]=\"iconSize['lg']\" [type]=\"iconType.default\" aria-hidden=\"true\"></cw-icon>\n </button>\n </div>\n\n <div class=\"modal-body d-flex-v gap-md\">\n @if (customBodyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate()\" [ngTemplateOutletContext]=\"customBodyContext()\">\n </ng-container>\n }\n </div>\n }\n\n <!-- footer commun : secondaire a gauche, primaire/danger a droite (ordre DS) -->\n <div class=\"modal-footer\">\n @if (type() === modalsType.delete) {\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n (btnAction)=\"closeModal()\" dataTest=\"btn-close-modal\">\n </cw-button>\n\n <cw-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n @if (labelBtnAction2()) {\n <cw-button [label]=\"labelBtnAction2()\" [type]=\"buttonTypeEnum.secondary\"\n [isDisabled]=\"disableBtnAction2()\" (btnAction)=\"action2Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n @else {\n <cw-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\"\n (btnAction)=\"closeModal()\" dataTest=\"btn-close-modal\">\n </cw-button>\n }\n @if (labelBtnAction1()) {\n <cw-button [label]=\"labelBtnAction1()\" [type]=\"buttonTypeEnum.primary\"\n [isDisabled]=\"disableBtnAction1()\" (btnAction)=\"action1Click()\" dataTest=\"btn-action-modal\">\n </cw-button>\n }\n }\n </div>\n }\n\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: LoaderComponent, selector: "cw-loader", inputs: ["size", "displayText"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4344
4382
  }
4345
4383
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ModalsComponent, decorators: [{
4346
4384
  type: Component,
@@ -4650,7 +4688,7 @@ class NumericalRangeComponent {
4650
4688
  this.newAmount.emit(next);
4651
4689
  }
4652
4690
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: NumericalRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4653
- 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 <cw-button [isDisabled]=\"isDisabled() || amount() <= floor()\" [label]=\"'Diminuer ' + amount() + ' ' + label()\"\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=\"sr-only\">{{ 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()\" [label]=\"'Augmenter ' + amount() + ' ' + label()\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"increaseAmount()\">\n </cw-button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4691
+ 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 <cw-button [isDisabled]=\"isDisabled() || amount() <= floor()\" [label]=\"'Diminuer ' + amount() + ' ' + label()\"\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=\"sr-only\">{{ 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()\" [label]=\"'Augmenter ' + amount() + ' ' + label()\"\n [withIcon]=\"spriteIcon.toolbarPlus\" [withOnlyIcon]=\"true\" [type]=\"buttonType.primary\"\n [iconSize]=\"buttonIconSize.small\" (btnAction)=\"increaseAmount()\">\n </cw-button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4654
4692
  }
4655
4693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: NumericalRangeComponent, decorators: [{
4656
4694
  type: Component,
@@ -5047,7 +5085,7 @@ class FileDropComponent {
5047
5085
  useExisting: forwardRef(() => FileDropComponent),
5048
5086
  multi: true,
5049
5087
  },
5050
- ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #fileInput\n type=\"file\"\n hidden\n [accept]=\"effectiveAccept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\" />\n\n@if (label()) {\n <span class=\"file-drop-label\">{{ label()! | translate }}</span>\n}\n\n@if (errorMessage()) {\n <!-- Etat erreur global (DS : Dropzone / Connexion Error) -->\n <div class=\"file-drop file-drop-error\" [attr.data-test-ctw]=\"dataTest() || null\">\n <cw-icon class=\"file-drop-icon\" [icon]=\"spriteIcon.error\" [iconSize]=\"iconSize['2xl']\"></cw-icon>\n <p class=\"file-drop-text\">{{ errorMessage() }}</p>\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._FILE_DROP.RETRY' | translate\"\n [withIcon]=\"spriteIcon.refresh\"\n (click)=\"onRetry()\"></cw-button>\n </div>\n} @else {\n <!-- Zone de depot (masquee quand la limite de fichiers est atteinte) -->\n @if (!limitReached()) {\n <div\n class=\"file-drop\"\n [class.file-drop-dragging]=\"isDragging()\"\n [class.file-drop-disabled]=\"disabled()\"\n [class.file-drop-picture]=\"isPicture()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-label]=\"((label() ?? '') | translate) || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-test-ctw]=\"dataTest() || null\"\n (click)=\"openPicker()\"\n (keydown)=\"onKeydown($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n @if (isPicture()) {\n <span class=\"file-drop-illustration\" aria-hidden=\"true\">\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"cw-file-drop-illu\"><rect width=\"64\" height=\"64\" rx=\"8\" /></clipPath>\n </defs>\n <g clip-path=\"url(#cw-file-drop-illu)\">\n <rect width=\"64\" height=\"64\" fill=\"#dde8f5\" />\n <circle cx=\"45\" cy=\"19\" r=\"7\" fill=\"#ffd166\" />\n <path d=\"M0 64 L22 36 L38 58 L50 28 L64 50 L64 64 Z\" fill=\"#8bbd5a\" />\n <path d=\"M0 64 L16 44 L32 64 Z\" fill=\"#a8c97a\" />\n </g>\n <rect x=\"0.5\" y=\"0.5\" width=\"63\" height=\"63\" rx=\"7.5\" fill=\"none\" stroke=\"#c8d6df\" />\n </svg>\n </span>\n } @else {\n <svg\n class=\"file-drop-icon\"\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 16.5h1.5a3.5 3.5 0 0 0 .4-6.98A5.5 5.5 0 0 0 7.5 8.6 4 4 0 0 0 7 16.5h1\" />\n <path d=\"M12 20.5V12\" />\n <path d=\"M8.75 15.25 12 12l3.25 3.25\" />\n </svg>\n }\n\n <p class=\"file-drop-text\">\n <span class=\"file-drop-link\">{{ '_COMMON._FILE_DROP.EXPLORE' | translate }}</span>\n {{ (isPicture() ? '_COMMON._FILE_DROP.DROP_HINT_PICTURE' : '_COMMON._FILE_DROP.DROP_HINT') | translate }}\n </p>\n\n @if (acceptLabel() || maxSizeMb() != null || (isPicture() && recommendedDimensions())) {\n <ul class=\"file-drop-hints\">\n @if (acceptLabel()) {\n <li>{{ '_COMMON._FILE_DROP.ACCEPTED_FORMATS' | translate: { formats: acceptLabel() } }}</li>\n }\n @if (maxSizeMb() != null) {\n <li>{{ '_COMMON._FILE_DROP.MAX_SIZE' | translate: { size: maxSizeMb() + ' Mo' } }}</li>\n }\n @if (isPicture() && recommendedDimensions()) {\n <li>{{ '_COMMON._FILE_DROP.RECOMMENDED_DIMENSIONS' | translate: { dimensions: recommendedDimensions() } }}</li>\n }\n </ul>\n }\n </div>\n }\n\n <!-- Liste des fichiers / miniatures -->\n @if (items().length) {\n @if (isPicture()) {\n <ul class=\"file-drop-previews\">\n @for (item of items(); track item.file) {\n <li class=\"file-drop-preview\" [class.file-drop-preview-error]=\"item.status === statusEnum.error\">\n @if (item.previewUrl) {\n <img class=\"file-drop-preview-img\" [src]=\"item.previewUrl\" [alt]=\"item.file.name\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiPhoto\" [iconSize]=\"iconSize.lg\"></cw-icon>\n }\n <button\n type=\"button\"\n class=\"file-drop-remove\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.close\" [iconSize]=\"iconSize.xs\"></cw-icon>\n </button>\n @if (item.status === statusEnum.error) {\n <span class=\"file-drop-preview-reason\">{{ reasonKey(item) | translate }}</span>\n }\n </li>\n }\n </ul>\n } @else {\n <ul class=\"file-drop-list\">\n @for (item of items(); track item.file) {\n <li\n class=\"file-drop-file\"\n [class.file-drop-file-error]=\"item.status === statusEnum.error\">\n <span class=\"file-drop-file-label\">\n {{ '_COMMON._FILE_DROP.SELECTED_FILE' | translate }}\n <span class=\"file-drop-file-name\">{{ item.file.name }}</span>\n <span class=\"file-drop-file-size\">({{ humanSize(item.file.size) }})</span>\n </span>\n\n @if (item.status === statusEnum.error) {\n <cw-badge [type]=\"badgeType.lightDanger\" [label]=\"reasonKey(item)\"></cw-badge>\n } @else {\n <cw-badge [type]=\"badgeType.lightSuccess\" [label]=\"'_COMMON._FILE_DROP.IMPORTED'\"></cw-badge>\n }\n\n <button\n type=\"button\"\n class=\"file-drop-remove file-drop-remove-danger\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.trash\" [iconSize]=\"iconSize.sm\"></cw-icon>\n </button>\n </li>\n }\n </ul>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5088
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #fileInput\n type=\"file\"\n hidden\n [accept]=\"effectiveAccept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\" />\n\n@if (label()) {\n <span class=\"file-drop-label\">{{ label()! | translate }}</span>\n}\n\n@if (errorMessage()) {\n <!-- Etat erreur global (DS : Dropzone / Connexion Error) -->\n <div class=\"file-drop file-drop-error\" [attr.data-test-ctw]=\"dataTest() || null\">\n <cw-icon class=\"file-drop-icon\" [icon]=\"spriteIcon.error\" [iconSize]=\"iconSize['2xl']\"></cw-icon>\n <p class=\"file-drop-text\">{{ errorMessage() }}</p>\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._FILE_DROP.RETRY' | translate\"\n [withIcon]=\"spriteIcon.refresh\"\n (click)=\"onRetry()\"></cw-button>\n </div>\n} @else {\n <!-- Zone de depot (masquee quand la limite de fichiers est atteinte) -->\n @if (!limitReached()) {\n <div\n class=\"file-drop\"\n [class.file-drop-dragging]=\"isDragging()\"\n [class.file-drop-disabled]=\"disabled()\"\n [class.file-drop-picture]=\"isPicture()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-label]=\"((label() ?? '') | translate) || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-test-ctw]=\"dataTest() || null\"\n (click)=\"openPicker()\"\n (keydown)=\"onKeydown($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n @if (isPicture()) {\n <span class=\"file-drop-illustration\" aria-hidden=\"true\">\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"cw-file-drop-illu\"><rect width=\"64\" height=\"64\" rx=\"8\" /></clipPath>\n </defs>\n <g clip-path=\"url(#cw-file-drop-illu)\">\n <rect width=\"64\" height=\"64\" fill=\"#dde8f5\" />\n <circle cx=\"45\" cy=\"19\" r=\"7\" fill=\"#ffd166\" />\n <path d=\"M0 64 L22 36 L38 58 L50 28 L64 50 L64 64 Z\" fill=\"#8bbd5a\" />\n <path d=\"M0 64 L16 44 L32 64 Z\" fill=\"#a8c97a\" />\n </g>\n <rect x=\"0.5\" y=\"0.5\" width=\"63\" height=\"63\" rx=\"7.5\" fill=\"none\" stroke=\"#c8d6df\" />\n </svg>\n </span>\n } @else {\n <svg\n class=\"file-drop-icon\"\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 16.5h1.5a3.5 3.5 0 0 0 .4-6.98A5.5 5.5 0 0 0 7.5 8.6 4 4 0 0 0 7 16.5h1\" />\n <path d=\"M12 20.5V12\" />\n <path d=\"M8.75 15.25 12 12l3.25 3.25\" />\n </svg>\n }\n\n <p class=\"file-drop-text\">\n <span class=\"file-drop-link\">{{ '_COMMON._FILE_DROP.EXPLORE' | translate }}</span>\n {{ (isPicture() ? '_COMMON._FILE_DROP.DROP_HINT_PICTURE' : '_COMMON._FILE_DROP.DROP_HINT') | translate }}\n </p>\n\n @if (acceptLabel() || maxSizeMb() != null || (isPicture() && recommendedDimensions())) {\n <ul class=\"file-drop-hints\">\n @if (acceptLabel()) {\n <li>{{ '_COMMON._FILE_DROP.ACCEPTED_FORMATS' | translate: { formats: acceptLabel() } }}</li>\n }\n @if (maxSizeMb() != null) {\n <li>{{ '_COMMON._FILE_DROP.MAX_SIZE' | translate: { size: maxSizeMb() + ' Mo' } }}</li>\n }\n @if (isPicture() && recommendedDimensions()) {\n <li>{{ '_COMMON._FILE_DROP.RECOMMENDED_DIMENSIONS' | translate: { dimensions: recommendedDimensions() } }}</li>\n }\n </ul>\n }\n </div>\n }\n\n <!-- Liste des fichiers / miniatures -->\n @if (items().length) {\n @if (isPicture()) {\n <ul class=\"file-drop-previews\">\n @for (item of items(); track item.file) {\n <li class=\"file-drop-preview\" [class.file-drop-preview-error]=\"item.status === statusEnum.error\">\n @if (item.previewUrl) {\n <img class=\"file-drop-preview-img\" [src]=\"item.previewUrl\" [alt]=\"item.file.name\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiPhoto\" [iconSize]=\"iconSize.lg\"></cw-icon>\n }\n <button\n type=\"button\"\n class=\"file-drop-remove\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.close\" [iconSize]=\"iconSize.xs\"></cw-icon>\n </button>\n @if (item.status === statusEnum.error) {\n <span class=\"file-drop-preview-reason\">{{ reasonKey(item) | translate }}</span>\n }\n </li>\n }\n </ul>\n } @else {\n <ul class=\"file-drop-list\">\n @for (item of items(); track item.file) {\n <li\n class=\"file-drop-file\"\n [class.file-drop-file-error]=\"item.status === statusEnum.error\">\n <span class=\"file-drop-file-label\">\n {{ '_COMMON._FILE_DROP.SELECTED_FILE' | translate }}\n <span class=\"file-drop-file-name\">{{ item.file.name }}</span>\n <span class=\"file-drop-file-size\">({{ humanSize(item.file.size) }})</span>\n </span>\n\n @if (item.status === statusEnum.error) {\n <cw-badge [type]=\"badgeType.lightDanger\" [label]=\"reasonKey(item)\"></cw-badge>\n } @else {\n <cw-badge [type]=\"badgeType.lightSuccess\" [label]=\"'_COMMON._FILE_DROP.IMPORTED'\"></cw-badge>\n }\n\n <button\n type=\"button\"\n class=\"file-drop-remove file-drop-remove-danger\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.trash\" [iconSize]=\"iconSize.sm\"></cw-icon>\n </button>\n </li>\n }\n </ul>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: BadgeComponent, selector: "cw-badge", inputs: ["type", "label", "withIcon", "iconPosition", "cssClass", "skeletonMode", "dataTest"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5051
5089
  }
5052
5090
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: FileDropComponent, decorators: [{
5053
5091
  type: Component,
@@ -5129,7 +5167,7 @@ class EmptyStateComponent {
5129
5167
  }, ...(ngDevMode ? [{ debugName: "illustrationSrc" }] : []));
5130
5168
  }
5131
5169
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5132
- 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 }, description: { classPropertyName: "description", publicName: "description", 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 }}</p>\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5170
+ 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 }, description: { classPropertyName: "description", publicName: "description", 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 }}</p>\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5133
5171
  }
5134
5172
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, decorators: [{
5135
5173
  type: Component,
@@ -5193,7 +5231,7 @@ class LanguageSelectorComponent {
5193
5231
  this.trigger()?.closeDropdown();
5194
5232
  }
5195
5233
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5196
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LanguageSelectorComponent, isStandalone: true, selector: "cw-language-selector", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null }, currentLang: { classPropertyName: "currentLang", publicName: "currentLang", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { languageChange: "languageChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._LANG.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._LANG.LBL_LANG' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (item of langItems(); track item.code) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"item.code === currentLang()\"\n [attr.aria-checked]=\"item.code === currentLang()\"\n (click)=\"onSelect(item.code)\">\n <span class=\"flex-1\">@if (item.hasName) { {{ item.code | uppercase }} - {{ item.nameKey | translate }} } @else { {{ item.code | uppercase }} }</span>\n @if (item.code === currentLang()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5234
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: LanguageSelectorComponent, isStandalone: true, selector: "cw-language-selector", inputs: { languages: { classPropertyName: "languages", publicName: "languages", isSignal: true, isRequired: false, transformFunction: null }, currentLang: { classPropertyName: "currentLang", publicName: "currentLang", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { languageChange: "languageChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"currentLang() | uppercase\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"spriteIcon.language\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._LANG.LBL_LANG' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._LANG.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._LANG.LBL_LANG' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (item of langItems(); track item.code) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"item.code === currentLang()\"\n [attr.aria-checked]=\"item.code === currentLang()\"\n (click)=\"onSelect(item.code)\">\n <span class=\"flex-1\">@if (item.hasName) { {{ item.code | uppercase }} - {{ item.nameKey | translate }} } @else { {{ item.code | uppercase }} }</span>\n @if (item.code === currentLang()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5197
5235
  }
5198
5236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
5199
5237
  type: Component,
@@ -5242,7 +5280,7 @@ class ThemeSelectorComponent {
5242
5280
  this.trigger()?.closeDropdown();
5243
5281
  }
5244
5282
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ThemeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5245
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ThemeSelectorComponent, isStandalone: true, selector: "cw-theme-selector", inputs: { themes: { classPropertyName: "themes", publicName: "themes", isSignal: true, isRequired: false, transformFunction: null }, currentTheme: { classPropertyName: "currentTheme", publicName: "currentTheme", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { themeChange: "themeChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"activeOption()?.labelKey ?? '_COMMON._THEME.LBL_THEME'\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"activeOption()?.icon\"\n [withOnlyIcon]=\"true\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._THEME.LBL_THEME' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._THEME.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._THEME.LBL_THEME' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (theme of themes(); track theme.key) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"theme.key === currentTheme()\"\n [attr.aria-checked]=\"theme.key === currentTheme()\"\n (click)=\"onSelect(theme.key)\">\n <cw-icon [icon]=\"theme.icon\" [iconSize]=\"iconSizeEnum.sm\"></cw-icon>\n <span class=\"flex-1\">{{ theme.labelKey | translate }}</span>\n @if (theme.key === currentTheme()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5283
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: ThemeSelectorComponent, isStandalone: true, selector: "cw-theme-selector", inputs: { themes: { classPropertyName: "themes", publicName: "themes", isSignal: true, isRequired: false, transformFunction: null }, currentTheme: { classPropertyName: "currentTheme", publicName: "currentTheme", isSignal: true, isRequired: true, transformFunction: null }, showReloadHint: { classPropertyName: "showReloadHint", publicName: "showReloadHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { themeChange: "themeChange" }, host: { classAttribute: "d-flex-h" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<cw-button\n [label]=\"activeOption()?.labelKey ?? '_COMMON._THEME.LBL_THEME'\"\n [type]=\"btnType.ghost\"\n [withIcon]=\"activeOption()?.icon\"\n [withOnlyIcon]=\"true\"\n [isDropdown]=\"true\">\n\n <div class=\"selector-menu d-flex-v gap-md\" role=\"menu\" [attr.aria-label]=\"'_COMMON._THEME.LBL_THEME' | translate\" cwMenuKeyboard (escapePressed)=\"trigger()?.closeDropdown()\">\n @if (showReloadHint()) {\n <p class=\"selector-menu-hint fs-xs\">{{ '_COMMON._THEME.RELOAD_HINT' | translate }}</p>\n }\n\n <div class=\"d-flex-v gap-2xs\">\n <div class=\"selector-menu-title fs-sm fw-bold\">{{ '_COMMON._THEME.LBL_THEME' | translate }}</div>\n\n <ul class=\"list-unstyled\" role=\"group\">\n @for (theme of themes(); track theme.key) {\n <li role=\"none\">\n <button\n type=\"button\"\n role=\"menuitemradio\"\n class=\"justify-between\"\n [class.active]=\"theme.key === currentTheme()\"\n [attr.aria-checked]=\"theme.key === currentTheme()\"\n (click)=\"onSelect(theme.key)\">\n <cw-icon [icon]=\"theme.icon\" [iconSize]=\"iconSizeEnum.sm\"></cw-icon>\n <span class=\"flex-1\">{{ theme.labelKey | translate }}</span>\n @if (theme.key === currentTheme()) {\n <cw-icon [icon]=\"spriteIcon.check\" [iconSize]=\"iconSizeEnum.xs\"></cw-icon>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</cw-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "loadingAnnounce", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "component", type: IconComponent, selector: "cw-icon", inputs: ["icon", "label", "type", "iconSize", "iconCssClass", "iconUiType", "iconColorCustom", "spritePath"] }, { kind: "directive", type: MenuKeyboardDirective, selector: "[cwMenuKeyboard]", inputs: ["menuItemSelector"], outputs: ["escapePressed"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5246
5284
  }
5247
5285
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: ThemeSelectorComponent, decorators: [{
5248
5286
  type: Component,