@kksdev/ds-angular 1.7.2 → 1.8.0

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.
@@ -15929,6 +15929,611 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
15929
15929
  args: [{ selector: 'ds-list-group', standalone: true, imports: [CommonModule, FontAwesomeModule, DsBadge], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"groupClasses()\">\n <!-- Header du groupe -->\n <div\n class=\"ds-list-group__header\"\n [attr.role]=\"isCollapsible() ? 'button' : null\"\n [attr.tabindex]=\"isCollapsible() ? 0 : null\"\n [attr.aria-expanded]=\"isCollapsible() ? isExpanded() : null\"\n (click)=\"toggle()\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <!-- Chevron (collapsible uniquement) -->\n @if (isCollapsible()) {\n <fa-icon\n [icon]=\"chevronIcon()\"\n class=\"ds-list-group__chevron\"\n [class.ds-list-group__chevron--expanded]=\"isExpanded()\"\n />\n }\n\n <!-- Ic\u00F4ne personnalis\u00E9e -->\n @if (icon()) {\n <fa-icon [icon]=\"icon()!\" class=\"ds-list-group__icon\" />\n }\n\n <!-- Titre -->\n <span class=\"ds-list-group__title\">{{ title() }}</span>\n\n <!-- Sous-titre -->\n @if (subtitle()) {\n <span class=\"ds-list-group__subtitle\">{{ subtitle() }}</span>\n }\n\n <!-- Compteur (badge) -->\n @if (showCount()) {\n <ds-badge type=\"neutral\" size=\"sm\" class=\"ds-list-group__count\">\n {{ count() }}\n </ds-badge>\n }\n </div>\n\n <!-- Contenu du groupe -->\n @if (isExpanded()) {\n <div\n class=\"ds-list-group__content\"\n role=\"group\"\n [attr.aria-label]=\"title()\"\n >\n <ng-content />\n </div>\n }\n</div>\n", styles: [":host{display:block}.ds-list-group__header{display:flex;align-items:center;gap:var(--space-2, 8px);padding:var(--space-2, 8px) var(--space-3, 12px);font-size:var(--font-size-1, 12px);font-weight:var(--font-weight-semibold, 600);color:var(--text-muted, #9ca3af);text-transform:uppercase;letter-spacing:.05em;-webkit-user-select:none;user-select:none}.ds-list-group--collapsible .ds-list-group__header{cursor:pointer;border-radius:var(--radius-1, 4px);transition:background-color .15s ease}.ds-list-group--collapsible .ds-list-group__header:hover{background-color:var(--background-hover, rgba(255, 255, 255, .05))}.ds-list-group--collapsible .ds-list-group__header:focus-visible{outline:2px solid var(--color-primary, #3b82f6);outline-offset:-2px}.ds-list-group--sticky .ds-list-group__header{position:sticky;top:0;background:var(--background-main, #111827);z-index:10;border-bottom:1px solid var(--border-default, #374151)}.ds-list-group__chevron{font-size:10px;color:var(--text-muted, #9ca3af);transition:transform .2s ease;flex-shrink:0}.ds-list-group__chevron--expanded,.ds-list-group--collapsed .ds-list-group__chevron{transform:rotate(0)}.ds-list-group__icon{font-size:var(--font-size-2, 14px);color:var(--text-muted, #9ca3af);flex-shrink:0}.ds-list-group__title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ds-list-group__subtitle{font-weight:var(--font-weight-normal, 400);color:var(--text-muted, #6b7280);text-transform:none;letter-spacing:normal}.ds-list-group__count{flex-shrink:0}.ds-list-group--collapsed .ds-list-group__content{display:none}\n"] }]
15930
15930
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "sticky", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
15931
15931
 
15932
+ /**
15933
+ * Chip coloré pour afficher une entité sélectionnée dans ds-entity-picker
15934
+ *
15935
+ * @example
15936
+ * ```html
15937
+ * <ds-entity-chip
15938
+ * [option]="{ value: '1', label: 'Important', color: '#ef4444', emoji: '🏷️' }"
15939
+ * [removable]="true"
15940
+ * (removed)="onRemove()"
15941
+ * />
15942
+ * ```
15943
+ */
15944
+ class DsEntityChip {
15945
+ /** Option à afficher */
15946
+ option = input.required(...(ngDevMode ? [{ debugName: "option" }] : []));
15947
+ /** Taille du chip */
15948
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
15949
+ /** Afficher le bouton de suppression */
15950
+ removable = input(true, ...(ngDevMode ? [{ debugName: "removable" }] : []));
15951
+ /** Chip désactivé */
15952
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
15953
+ /** Événement de suppression */
15954
+ removed = output();
15955
+ /** Icône de fermeture */
15956
+ closeIcon = faXmark;
15957
+ /** Couleur du chip (depuis l'option ou fallback) */
15958
+ chipColor = computed(() => {
15959
+ return this.option().color || 'var(--gray-400)';
15960
+ }, ...(ngDevMode ? [{ debugName: "chipColor" }] : []));
15961
+ /** Couleur de fond (10% opacity) */
15962
+ backgroundColor = computed(() => {
15963
+ const color = this.option().color;
15964
+ if (!color) {
15965
+ return 'var(--gray-100)';
15966
+ }
15967
+ // Utilise color-mix pour créer une version transparente
15968
+ return `color-mix(in srgb, ${color} 12%, transparent)`;
15969
+ }, ...(ngDevMode ? [{ debugName: "backgroundColor" }] : []));
15970
+ /** Gestion du clic sur le bouton supprimer */
15971
+ handleRemove(event) {
15972
+ event.stopPropagation();
15973
+ event.preventDefault();
15974
+ if (this.disabled()) {
15975
+ return;
15976
+ }
15977
+ this.removed.emit(this.option());
15978
+ }
15979
+ /** Gestion du clavier */
15980
+ handleKeyDown(event) {
15981
+ if (this.disabled()) {
15982
+ return;
15983
+ }
15984
+ if (this.removable() && (event.key === 'Delete' || event.key === 'Backspace')) {
15985
+ event.preventDefault();
15986
+ this.removed.emit(this.option());
15987
+ }
15988
+ }
15989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DsEntityChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
15990
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DsEntityChip, isStandalone: true, selector: "ds-entity-chip", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { removed: "removed" }, ngImport: i0, template: `
15991
+ <div
15992
+ class="ds-entity-chip"
15993
+ [class.ds-entity-chip--sm]="size() === 'sm'"
15994
+ [class.ds-entity-chip--md]="size() === 'md'"
15995
+ [class.ds-entity-chip--lg]="size() === 'lg'"
15996
+ [class.ds-entity-chip--disabled]="disabled()"
15997
+ [style.--chip-color]="chipColor()"
15998
+ [style.background-color]="backgroundColor()"
15999
+ [style.border-color]="chipColor()"
16000
+ [attr.tabindex]="disabled() ? -1 : 0"
16001
+ (keydown)="handleKeyDown($event)"
16002
+ >
16003
+ @if (option().emoji) {
16004
+ <span class="ds-entity-chip__emoji">{{ option().emoji }}</span>
16005
+ } @else if (option().icon) {
16006
+ <fa-icon
16007
+ class="ds-entity-chip__icon"
16008
+ [icon]="option().icon!"
16009
+ [fixedWidth]="true"
16010
+ [style.color]="chipColor()"
16011
+ />
16012
+ }
16013
+
16014
+ <span class="ds-entity-chip__label">{{ option().label }}</span>
16015
+
16016
+ @if (removable() && !disabled()) {
16017
+ <button
16018
+ type="button"
16019
+ class="ds-entity-chip__remove"
16020
+ [attr.aria-label]="'Supprimer ' + option().label"
16021
+ (click)="handleRemove($event)"
16022
+ >
16023
+ <fa-icon [icon]="closeIcon" [fixedWidth]="true" />
16024
+ </button>
16025
+ }
16026
+ </div>
16027
+ `, isInline: true, styles: [".ds-entity-chip{display:inline-flex;align-items:center;gap:var(--space-1, .25rem);padding:var(--space-1, .25rem) var(--space-2, .5rem);border-radius:var(--radius-md, 6px);font-family:var(--font-family-base, sans-serif);font-size:var(--font-size-sm, .875rem);font-weight:500;line-height:1.4;border:1px solid var(--chip-color, var(--gray-300));background-color:color-mix(in srgb,var(--chip-color, var(--gray-300)) 10%,transparent);color:var(--text-default, #1a1a1a);transition:background-color var(--duration-fast, .15s) var(--easing-default, ease),transform var(--duration-fast, .15s) var(--easing-default, ease);-webkit-user-select:none;user-select:none;outline:none;max-width:200px}.ds-entity-chip:focus-visible{box-shadow:0 0 0 2px var(--background-main, #fff),0 0 0 4px var(--chip-color, var(--color-primary))}.ds-entity-chip__emoji{flex-shrink:0;font-size:1em}.ds-entity-chip__icon{flex-shrink:0;font-size:.875em}.ds-entity-chip__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ds-entity-chip__remove{display:flex;align-items:center;justify-content:center;padding:var(--space-0-5, .125rem);margin:0;margin-left:var(--space-1, .25rem);background:none;border:none;border-radius:var(--radius-sm, 4px);cursor:pointer;color:var(--chip-color, var(--gray-600));opacity:.7;transition:opacity var(--duration-fast, .15s) var(--easing-default, ease),background-color var(--duration-fast, .15s) var(--easing-default, ease),transform var(--duration-fast, .15s) var(--easing-default, ease);flex-shrink:0}.ds-entity-chip__remove:hover{opacity:1;background-color:color-mix(in srgb,var(--chip-color, var(--gray-300)) 20%,transparent)}.ds-entity-chip__remove:active{transform:scale(.9)}.ds-entity-chip__remove:focus-visible{outline:none;opacity:1;box-shadow:0 0 0 2px var(--chip-color, var(--color-primary))}.ds-entity-chip__remove fa-icon{font-size:.75rem}.ds-entity-chip--sm{padding:var(--space-0-5, .125rem) var(--space-1-5, .375rem);font-size:var(--font-size-xs, .75rem);gap:var(--space-0-5, .125rem);max-width:150px}.ds-entity-chip--sm .ds-entity-chip__remove{padding:.0625rem}.ds-entity-chip--sm .ds-entity-chip__remove fa-icon{font-size:.625rem}.ds-entity-chip--lg{padding:var(--space-1-5, .375rem) var(--space-3, .75rem);font-size:var(--font-size-base, 1rem);gap:var(--space-2, .5rem);max-width:250px}.ds-entity-chip--lg .ds-entity-chip__remove fa-icon{font-size:.875rem}.ds-entity-chip--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1$1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16028
+ }
16029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DsEntityChip, decorators: [{
16030
+ type: Component,
16031
+ args: [{ selector: 'ds-entity-chip', standalone: true, imports: [CommonModule, FontAwesomeModule], template: `
16032
+ <div
16033
+ class="ds-entity-chip"
16034
+ [class.ds-entity-chip--sm]="size() === 'sm'"
16035
+ [class.ds-entity-chip--md]="size() === 'md'"
16036
+ [class.ds-entity-chip--lg]="size() === 'lg'"
16037
+ [class.ds-entity-chip--disabled]="disabled()"
16038
+ [style.--chip-color]="chipColor()"
16039
+ [style.background-color]="backgroundColor()"
16040
+ [style.border-color]="chipColor()"
16041
+ [attr.tabindex]="disabled() ? -1 : 0"
16042
+ (keydown)="handleKeyDown($event)"
16043
+ >
16044
+ @if (option().emoji) {
16045
+ <span class="ds-entity-chip__emoji">{{ option().emoji }}</span>
16046
+ } @else if (option().icon) {
16047
+ <fa-icon
16048
+ class="ds-entity-chip__icon"
16049
+ [icon]="option().icon!"
16050
+ [fixedWidth]="true"
16051
+ [style.color]="chipColor()"
16052
+ />
16053
+ }
16054
+
16055
+ <span class="ds-entity-chip__label">{{ option().label }}</span>
16056
+
16057
+ @if (removable() && !disabled()) {
16058
+ <button
16059
+ type="button"
16060
+ class="ds-entity-chip__remove"
16061
+ [attr.aria-label]="'Supprimer ' + option().label"
16062
+ (click)="handleRemove($event)"
16063
+ >
16064
+ <fa-icon [icon]="closeIcon" [fixedWidth]="true" />
16065
+ </button>
16066
+ }
16067
+ </div>
16068
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".ds-entity-chip{display:inline-flex;align-items:center;gap:var(--space-1, .25rem);padding:var(--space-1, .25rem) var(--space-2, .5rem);border-radius:var(--radius-md, 6px);font-family:var(--font-family-base, sans-serif);font-size:var(--font-size-sm, .875rem);font-weight:500;line-height:1.4;border:1px solid var(--chip-color, var(--gray-300));background-color:color-mix(in srgb,var(--chip-color, var(--gray-300)) 10%,transparent);color:var(--text-default, #1a1a1a);transition:background-color var(--duration-fast, .15s) var(--easing-default, ease),transform var(--duration-fast, .15s) var(--easing-default, ease);-webkit-user-select:none;user-select:none;outline:none;max-width:200px}.ds-entity-chip:focus-visible{box-shadow:0 0 0 2px var(--background-main, #fff),0 0 0 4px var(--chip-color, var(--color-primary))}.ds-entity-chip__emoji{flex-shrink:0;font-size:1em}.ds-entity-chip__icon{flex-shrink:0;font-size:.875em}.ds-entity-chip__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ds-entity-chip__remove{display:flex;align-items:center;justify-content:center;padding:var(--space-0-5, .125rem);margin:0;margin-left:var(--space-1, .25rem);background:none;border:none;border-radius:var(--radius-sm, 4px);cursor:pointer;color:var(--chip-color, var(--gray-600));opacity:.7;transition:opacity var(--duration-fast, .15s) var(--easing-default, ease),background-color var(--duration-fast, .15s) var(--easing-default, ease),transform var(--duration-fast, .15s) var(--easing-default, ease);flex-shrink:0}.ds-entity-chip__remove:hover{opacity:1;background-color:color-mix(in srgb,var(--chip-color, var(--gray-300)) 20%,transparent)}.ds-entity-chip__remove:active{transform:scale(.9)}.ds-entity-chip__remove:focus-visible{outline:none;opacity:1;box-shadow:0 0 0 2px var(--chip-color, var(--color-primary))}.ds-entity-chip__remove fa-icon{font-size:.75rem}.ds-entity-chip--sm{padding:var(--space-0-5, .125rem) var(--space-1-5, .375rem);font-size:var(--font-size-xs, .75rem);gap:var(--space-0-5, .125rem);max-width:150px}.ds-entity-chip--sm .ds-entity-chip__remove{padding:.0625rem}.ds-entity-chip--sm .ds-entity-chip__remove fa-icon{font-size:.625rem}.ds-entity-chip--lg{padding:var(--space-1-5, .375rem) var(--space-3, .75rem);font-size:var(--font-size-base, 1rem);gap:var(--space-2, .5rem);max-width:250px}.ds-entity-chip--lg .ds-entity-chip__remove fa-icon{font-size:.875rem}.ds-entity-chip--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}\n"] }]
16069
+ }], propDecorators: { option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], removed: [{ type: i0.Output, args: ["removed"] }] } });
16070
+
16071
+ /**
16072
+ * Entity Picker - Sélecteur d'entités riches
16073
+ *
16074
+ * Permet la sélection d'entités avec icônes, couleurs, emojis.
16075
+ * Supporte la sélection simple et multiple avec affichage en chips colorés.
16076
+ *
16077
+ * @example
16078
+ * ```html
16079
+ * <!-- Sélection simple -->
16080
+ * <ds-entity-picker
16081
+ * [options]="tags"
16082
+ * [(ngModel)]="selectedTag"
16083
+ * placeholder="Choisir un tag"
16084
+ * />
16085
+ *
16086
+ * <!-- Sélection multiple -->
16087
+ * <ds-entity-picker
16088
+ * [options]="categories"
16089
+ * [multiple]="true"
16090
+ * [(ngModel)]="selectedCategories"
16091
+ * [allowCreate]="true"
16092
+ * (createRequested)="onCreateCategory($event)"
16093
+ * />
16094
+ * ```
16095
+ */
16096
+ class DsEntityPicker {
16097
+ // ─────────────────────────────────────────────────────────────────────────────
16098
+ // Inputs
16099
+ // ─────────────────────────────────────────────────────────────────────────────
16100
+ /** Liste des options disponibles */
16101
+ options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
16102
+ /** Active la sélection multiple */
16103
+ multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
16104
+ /** Permet la création d'options à la volée */
16105
+ allowCreate = input(false, ...(ngDevMode ? [{ debugName: "allowCreate" }] : []));
16106
+ /** Placeholder du champ de recherche */
16107
+ placeholder = input('Rechercher...', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
16108
+ /** Taille du composant */
16109
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
16110
+ /** Mode d'affichage des sélections multiples */
16111
+ displayMode = input('chip', ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
16112
+ /** Afficher le bouton clear */
16113
+ clearable = input(true, ...(ngDevMode ? [{ debugName: "clearable" }] : []));
16114
+ /** Nombre maximum de sélections (multi-select) */
16115
+ maxSelections = input(undefined, ...(ngDevMode ? [{ debugName: "maxSelections" }] : []));
16116
+ /** Label du champ */
16117
+ label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
16118
+ /** Message d'erreur */
16119
+ error = input('', ...(ngDevMode ? [{ debugName: "error" }] : []));
16120
+ /** Texte d'aide */
16121
+ helper = input('', ...(ngDevMode ? [{ debugName: "helper" }] : []));
16122
+ /** Champ désactivé */
16123
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
16124
+ /** Champ obligatoire */
16125
+ required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
16126
+ /** Caractères minimum avant filtrage */
16127
+ minChars = input(0, ...(ngDevMode ? [{ debugName: "minChars" }] : []));
16128
+ /** Texte si aucun résultat */
16129
+ noResultsText = input('Aucun résultat', ...(ngDevMode ? [{ debugName: "noResultsText" }] : []));
16130
+ /** Template du texte de création (utiliser {query} comme placeholder) */
16131
+ createText = input('Créer "{query}"', ...(ngDevMode ? [{ debugName: "createText" }] : []));
16132
+ /** Nom du champ (pour formulaires) */
16133
+ name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
16134
+ // ─────────────────────────────────────────────────────────────────────────────
16135
+ // Outputs
16136
+ // ─────────────────────────────────────────────────────────────────────────────
16137
+ /** Émis lors d'un changement de sélection */
16138
+ selectionChange = output();
16139
+ /** Émis lors d'une demande de création */
16140
+ createRequested = output();
16141
+ /** Émis lors d'un changement de recherche */
16142
+ searchChange = output();
16143
+ /** Émis à l'ouverture du panel */
16144
+ opened = output();
16145
+ /** Émis à la fermeture du panel */
16146
+ closed = output();
16147
+ // ─────────────────────────────────────────────────────────────────────────────
16148
+ // Internal state
16149
+ // ─────────────────────────────────────────────────────────────────────────────
16150
+ isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
16151
+ searchQuery = signal('', ...(ngDevMode ? [{ debugName: "searchQuery" }] : []));
16152
+ focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedIndex" }] : []));
16153
+ internalValue = signal(null, ...(ngDevMode ? [{ debugName: "internalValue" }] : []));
16154
+ cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : []));
16155
+ inputElement;
16156
+ listbox;
16157
+ onChange = () => { };
16158
+ onTouched = () => { };
16159
+ // Icons
16160
+ iconPlus = faPlus;
16161
+ iconChevron = faChevronDown;
16162
+ iconClear = faXmark;
16163
+ iconSearch = faSearch;
16164
+ // CDK Overlay positions
16165
+ overlayPositions = AUTOCOMPLETE_POSITIONS;
16166
+ // ─────────────────────────────────────────────────────────────────────────────
16167
+ // Computed
16168
+ // ─────────────────────────────────────────────────────────────────────────────
16169
+ isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
16170
+ /** Options sélectionnées (objets complets) */
16171
+ selectedOptions = computed(() => {
16172
+ const value = this.internalValue();
16173
+ const opts = this.options();
16174
+ if (value === null)
16175
+ return [];
16176
+ if (this.multiple()) {
16177
+ const values = Array.isArray(value) ? value : [value];
16178
+ return opts.filter(opt => values.includes(opt.value));
16179
+ }
16180
+ else {
16181
+ const found = opts.find(opt => opt.value === value);
16182
+ return found ? [found] : [];
16183
+ }
16184
+ }, ...(ngDevMode ? [{ debugName: "selectedOptions" }] : []));
16185
+ /** Texte affiché dans l'input (mode single) */
16186
+ displayValue = computed(() => {
16187
+ if (this.multiple())
16188
+ return '';
16189
+ const selected = this.selectedOptions();
16190
+ return selected.length > 0 ? selected[0].label : '';
16191
+ }, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
16192
+ /** Options filtrées selon la recherche */
16193
+ filteredOptions = computed(() => {
16194
+ const query = this.searchQuery().toLowerCase().trim();
16195
+ const minLen = this.minChars();
16196
+ const selected = this.selectedOptions().map(o => o.value);
16197
+ if (query.length < minLen) {
16198
+ // En multi-select, exclure les options déjà sélectionnées
16199
+ if (this.multiple()) {
16200
+ return this.options().filter(opt => !selected.includes(opt.value));
16201
+ }
16202
+ return this.options();
16203
+ }
16204
+ let results = this.options().filter(opt => {
16205
+ const matchLabel = opt.label.toLowerCase().includes(query);
16206
+ const matchDesc = opt.description?.toLowerCase().includes(query);
16207
+ return matchLabel || matchDesc;
16208
+ });
16209
+ // En multi-select, exclure les options déjà sélectionnées
16210
+ if (this.multiple()) {
16211
+ results = results.filter(opt => !selected.includes(opt.value));
16212
+ }
16213
+ return results;
16214
+ }, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
16215
+ /** Peut créer une nouvelle option */
16216
+ canCreate = computed(() => {
16217
+ if (!this.allowCreate())
16218
+ return false;
16219
+ const query = this.searchQuery().trim();
16220
+ if (!query)
16221
+ return false;
16222
+ // Vérifie si l'option n'existe pas déjà
16223
+ const exists = this.options().some(opt => opt.label.toLowerCase() === query.toLowerCase());
16224
+ return !exists;
16225
+ }, ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
16226
+ /** Afficher le dropdown */
16227
+ shouldShowDropdown = computed(() => {
16228
+ return this.isOpen();
16229
+ }, ...(ngDevMode ? [{ debugName: "shouldShowDropdown" }] : []));
16230
+ /** Classes du container */
16231
+ containerClasses = computed(() => ({
16232
+ 'ds-entity-picker': true,
16233
+ 'ds-entity-picker--open': this.isOpen(),
16234
+ 'ds-entity-picker--disabled': this.isDisabled(),
16235
+ 'ds-entity-picker--error': !!this.error(),
16236
+ 'ds-entity-picker--multiple': this.multiple(),
16237
+ [`ds-entity-picker--${this.size()}`]: true,
16238
+ }), ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
16239
+ /** Classes de l'input */
16240
+ inputClasses = computed(() => ({
16241
+ 'ds-entity-picker__input': true,
16242
+ 'ds-entity-picker__input--has-value': this.multiple()
16243
+ ? this.selectedOptions().length > 0
16244
+ : !!this.internalValue(),
16245
+ }), ...(ngDevMode ? [{ debugName: "inputClasses" }] : []));
16246
+ /** ID unique pour le listbox */
16247
+ listboxId = computed(() => `${this.name() || 'entity-picker'}-listbox`, ...(ngDevMode ? [{ debugName: "listboxId" }] : []));
16248
+ /** ID unique pour l'input */
16249
+ inputId = computed(() => `${this.name() || 'entity-picker'}-input`, ...(ngDevMode ? [{ debugName: "inputId" }] : []));
16250
+ /** Texte du compteur (mode count) */
16251
+ countText = computed(() => {
16252
+ const count = this.selectedOptions().length;
16253
+ if (count === 0)
16254
+ return '';
16255
+ return `${count} sélectionné${count > 1 ? 's' : ''}`;
16256
+ }, ...(ngDevMode ? [{ debugName: "countText" }] : []));
16257
+ /** Limite de sélection atteinte */
16258
+ maxReached = computed(() => {
16259
+ const max = this.maxSelections();
16260
+ if (max === undefined)
16261
+ return false;
16262
+ return this.selectedOptions().length >= max;
16263
+ }, ...(ngDevMode ? [{ debugName: "maxReached" }] : []));
16264
+ /** Texte formaté pour l'option de création */
16265
+ formattedCreateText = computed(() => {
16266
+ return this.createText().replace('{query}', this.searchQuery());
16267
+ }, ...(ngDevMode ? [{ debugName: "formattedCreateText" }] : []));
16268
+ // ─────────────────────────────────────────────────────────────────────────────
16269
+ // ControlValueAccessor
16270
+ // ─────────────────────────────────────────────────────────────────────────────
16271
+ writeValue(value) {
16272
+ this.internalValue.set(value);
16273
+ }
16274
+ registerOnChange(fn) {
16275
+ this.onChange = fn;
16276
+ }
16277
+ registerOnTouched(fn) {
16278
+ this.onTouched = fn;
16279
+ }
16280
+ setDisabledState(isDisabled) {
16281
+ this.cvaDisabled.set(isDisabled);
16282
+ }
16283
+ // ─────────────────────────────────────────────────────────────────────────────
16284
+ // Public methods
16285
+ // ─────────────────────────────────────────────────────────────────────────────
16286
+ onInputFocus() {
16287
+ if (this.isDisabled())
16288
+ return;
16289
+ this.open();
16290
+ }
16291
+ onInputBlur() {
16292
+ this.onTouched();
16293
+ // Fermeture retardée pour permettre le clic sur une option
16294
+ setTimeout(() => {
16295
+ if (!this.isOpen())
16296
+ return;
16297
+ this.close();
16298
+ }, 200);
16299
+ }
16300
+ onSearchInput(event) {
16301
+ const input = event.target;
16302
+ this.searchQuery.set(input.value);
16303
+ this.searchChange.emit(input.value);
16304
+ this.focusedIndex.set(0);
16305
+ if (!this.isOpen() && input.value.length >= this.minChars()) {
16306
+ this.open();
16307
+ }
16308
+ }
16309
+ open() {
16310
+ if (this.isDisabled() || this.isOpen())
16311
+ return;
16312
+ this.isOpen.set(true);
16313
+ this.focusedIndex.set(0);
16314
+ this.opened.emit();
16315
+ }
16316
+ close() {
16317
+ if (!this.isOpen())
16318
+ return;
16319
+ this.isOpen.set(false);
16320
+ this.searchQuery.set('');
16321
+ this.focusedIndex.set(-1);
16322
+ this.closed.emit();
16323
+ }
16324
+ selectOption(option) {
16325
+ if (option.disabled || this.isDisabled())
16326
+ return;
16327
+ if (this.multiple()) {
16328
+ // Mode multi-sélection
16329
+ const current = this.internalValue() || [];
16330
+ const newValues = [...current, option.value];
16331
+ this.internalValue.set(newValues);
16332
+ this.onChange(newValues);
16333
+ // Émettre les options complètes
16334
+ const selectedOpts = this.options().filter(o => newValues.includes(o.value));
16335
+ this.selectionChange.emit(selectedOpts);
16336
+ // Reset recherche mais garde le panel ouvert
16337
+ this.searchQuery.set('');
16338
+ this.inputElement?.nativeElement?.focus();
16339
+ }
16340
+ else {
16341
+ // Mode sélection simple
16342
+ this.internalValue.set(option.value);
16343
+ this.onChange(option.value);
16344
+ this.selectionChange.emit(option);
16345
+ this.close();
16346
+ }
16347
+ }
16348
+ removeOption(option) {
16349
+ if (!this.multiple() || this.isDisabled())
16350
+ return;
16351
+ const current = this.internalValue() || [];
16352
+ const newValues = current.filter(v => v !== option.value);
16353
+ this.internalValue.set(newValues.length > 0 ? newValues : null);
16354
+ this.onChange(newValues.length > 0 ? newValues : null);
16355
+ const selectedOpts = this.options().filter(o => newValues.includes(o.value));
16356
+ this.selectionChange.emit(selectedOpts.length > 0 ? selectedOpts : null);
16357
+ }
16358
+ clear(event) {
16359
+ event?.stopPropagation();
16360
+ event?.preventDefault();
16361
+ if (this.isDisabled())
16362
+ return;
16363
+ this.internalValue.set(this.multiple() ? [] : null);
16364
+ this.onChange(this.multiple() ? [] : null);
16365
+ this.selectionChange.emit(null);
16366
+ this.searchQuery.set('');
16367
+ this.inputElement?.nativeElement?.focus();
16368
+ }
16369
+ requestCreate() {
16370
+ if (!this.canCreate())
16371
+ return;
16372
+ const value = this.searchQuery().trim();
16373
+ this.createRequested.emit(value);
16374
+ this.searchQuery.set('');
16375
+ this.close();
16376
+ }
16377
+ // ─────────────────────────────────────────────────────────────────────────────
16378
+ // Keyboard navigation
16379
+ // ─────────────────────────────────────────────────────────────────────────────
16380
+ onKeyDown(event) {
16381
+ if (this.isDisabled())
16382
+ return;
16383
+ switch (event.key) {
16384
+ case 'ArrowDown':
16385
+ event.preventDefault();
16386
+ if (!this.isOpen()) {
16387
+ this.open();
16388
+ }
16389
+ else {
16390
+ this.moveFocus(1);
16391
+ }
16392
+ break;
16393
+ case 'ArrowUp':
16394
+ event.preventDefault();
16395
+ if (this.isOpen()) {
16396
+ this.moveFocus(-1);
16397
+ }
16398
+ break;
16399
+ case 'Enter':
16400
+ if (this.isOpen()) {
16401
+ event.preventDefault();
16402
+ const idx = this.focusedIndex();
16403
+ const options = this.filteredOptions();
16404
+ if (idx >= 0 && options[idx] && !options[idx].disabled) {
16405
+ this.selectOption(options[idx]);
16406
+ }
16407
+ else if (this.canCreate()) {
16408
+ this.requestCreate();
16409
+ }
16410
+ }
16411
+ break;
16412
+ case 'Escape':
16413
+ if (this.isOpen()) {
16414
+ event.preventDefault();
16415
+ this.close();
16416
+ }
16417
+ break;
16418
+ case 'Backspace':
16419
+ // Supprimer le dernier chip si l'input est vide en mode multi
16420
+ if (this.multiple() && !this.searchQuery()) {
16421
+ const selected = this.selectedOptions();
16422
+ if (selected.length > 0) {
16423
+ this.removeOption(selected[selected.length - 1]);
16424
+ }
16425
+ }
16426
+ break;
16427
+ case 'Tab':
16428
+ if (this.isOpen()) {
16429
+ this.close();
16430
+ }
16431
+ break;
16432
+ }
16433
+ }
16434
+ // ─────────────────────────────────────────────────────────────────────────────
16435
+ // Click outside
16436
+ // ─────────────────────────────────────────────────────────────────────────────
16437
+ onDocumentClick(event) {
16438
+ const target = event.target;
16439
+ if (!target.closest('.ds-entity-picker')) {
16440
+ this.close();
16441
+ }
16442
+ }
16443
+ // ─────────────────────────────────────────────────────────────────────────────
16444
+ // Helpers
16445
+ // ─────────────────────────────────────────────────────────────────────────────
16446
+ moveFocus(delta) {
16447
+ const options = this.filteredOptions();
16448
+ const canCreateOpt = this.canCreate() ? 1 : 0;
16449
+ const total = options.length + canCreateOpt;
16450
+ if (total === 0)
16451
+ return;
16452
+ let newIndex = this.focusedIndex() + delta;
16453
+ // Wrap around
16454
+ if (newIndex < 0)
16455
+ newIndex = total - 1;
16456
+ if (newIndex >= total)
16457
+ newIndex = 0;
16458
+ // Skip disabled options
16459
+ let attempts = 0;
16460
+ while (newIndex < options.length && options[newIndex]?.disabled && attempts < total) {
16461
+ newIndex += delta;
16462
+ if (newIndex < 0)
16463
+ newIndex = total - 1;
16464
+ if (newIndex >= total)
16465
+ newIndex = 0;
16466
+ attempts++;
16467
+ }
16468
+ this.focusedIndex.set(newIndex);
16469
+ this.scrollFocusedOptionIntoView();
16470
+ }
16471
+ scrollFocusedOptionIntoView() {
16472
+ const index = this.focusedIndex();
16473
+ if (index < 0)
16474
+ return;
16475
+ const optionId = this.getOptionId(index);
16476
+ const optionElement = document.getElementById(optionId);
16477
+ if (optionElement) {
16478
+ optionElement.scrollIntoView({
16479
+ block: 'nearest',
16480
+ behavior: 'smooth',
16481
+ });
16482
+ }
16483
+ }
16484
+ isOptionFocused(index) {
16485
+ return this.focusedIndex() === index;
16486
+ }
16487
+ isOptionSelected(option) {
16488
+ const value = this.internalValue();
16489
+ if (value === null)
16490
+ return false;
16491
+ if (this.multiple()) {
16492
+ return value.includes(option.value);
16493
+ }
16494
+ return value === option.value;
16495
+ }
16496
+ getOptionId(index) {
16497
+ return `${this.name() || 'entity-picker'}-option-${index}`;
16498
+ }
16499
+ isCreateFocused() {
16500
+ return this.canCreate() && this.focusedIndex() === this.filteredOptions().length;
16501
+ }
16502
+ trackOption(_, option) {
16503
+ return option.value;
16504
+ }
16505
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DsEntityPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
16506
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DsEntityPicker, isStandalone: true, selector: "ds-entity-picker", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, allowCreate: { classPropertyName: "allowCreate", publicName: "allowCreate", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, maxSelections: { classPropertyName: "maxSelections", publicName: "maxSelections", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, helper: { classPropertyName: "helper", publicName: "helper", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, minChars: { classPropertyName: "minChars", publicName: "minChars", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, createText: { classPropertyName: "createText", publicName: "createText", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", createRequested: "createRequested", searchChange: "searchChange", opened: "opened", closed: "closed" }, host: { listeners: { "keydown": "onKeyDown($event)", "document:click": "onDocumentClick($event)" } }, providers: [
16507
+ {
16508
+ provide: NG_VALUE_ACCESSOR,
16509
+ useExisting: forwardRef(() => DsEntityPicker),
16510
+ multi: true,
16511
+ },
16512
+ ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"containerClasses()\">\n <!-- Label -->\n @if (label()) {\n <label class=\"ds-entity-picker__label\" [attr.for]=\"inputId()\">\n {{ label() }}\n @if (required()) {\n <span class=\"ds-entity-picker__required\">*</span>\n }\n </label>\n }\n\n <!-- Input wrapper -->\n <div class=\"ds-entity-picker__wrapper\"\n #triggerOrigin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin>\n <!-- Chips (mode multiple) -->\n @if (multiple() && displayMode() === 'chip') {\n <div class=\"ds-entity-picker__chips\">\n @for (option of selectedOptions(); track option.value) {\n <ds-entity-chip\n [option]=\"option\"\n [size]=\"size()\"\n [removable]=\"!isDisabled()\"\n [disabled]=\"isDisabled()\"\n (removed)=\"removeOption($event)\"\n />\n }\n </div>\n }\n\n <!-- Count badge (mode count) -->\n @if (multiple() && displayMode() === 'count' && selectedOptions().length > 0) {\n <span class=\"ds-entity-picker__count\">\n {{ countText() }}\n </span>\n }\n\n <!-- Input -->\n <div class=\"ds-entity-picker__input-container\">\n <input\n #inputElement\n type=\"text\"\n [id]=\"inputId()\"\n [ngClass]=\"inputClasses()\"\n [placeholder]=\"multiple() ? placeholder() : (displayValue() || placeholder())\"\n [disabled]=\"isDisabled()\"\n [value]=\"multiple() ? searchQuery() : (searchQuery() || displayValue())\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"focusedIndex() >= 0 ? getOptionId(focusedIndex()) : null\"\n role=\"combobox\"\n autocomplete=\"off\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <!-- Icons -->\n <span class=\"ds-entity-picker__icons\">\n @if (clearable() && (selectedOptions().length > 0 || searchQuery())) {\n <button\n type=\"button\"\n class=\"ds-entity-picker__clear\"\n aria-label=\"Effacer\"\n tabindex=\"-1\"\n (mousedown)=\"clear($event)\"\n >\n <fa-icon [icon]=\"iconClear\" />\n </button>\n }\n <span class=\"ds-entity-picker__arrow\" [class.ds-entity-picker__arrow--open]=\"isOpen()\">\n <fa-icon [icon]=\"iconChevron\" />\n </span>\n </span>\n </div>\n </div>\n\n <!-- Dropdown (CDK Overlay) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"triggerOrigin\"\n [cdkConnectedOverlayOpen]=\"shouldShowDropdown()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"triggerOrigin.elementRef.nativeElement.offsetWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n [cdkConnectedOverlayPanelClass]=\"'ds-entity-picker-overlay'\">\n <div class=\"ds-entity-picker__dropdown\" role=\"presentation\">\n <ul\n #listbox\n [id]=\"listboxId()\"\n class=\"ds-entity-picker__listbox\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || 'Options'\"\n [attr.aria-multiselectable]=\"multiple()\"\n >\n @for (option of filteredOptions(); track trackOption($index, option); let i = $index) {\n <li\n [id]=\"getOptionId(i)\"\n class=\"ds-entity-picker__option\"\n [class.ds-entity-picker__option--focused]=\"isOptionFocused(i)\"\n [class.ds-entity-picker__option--selected]=\"isOptionSelected(option)\"\n [class.ds-entity-picker__option--disabled]=\"option.disabled || maxReached()\"\n [style.--option-color]=\"option.color || 'var(--gray-400)'\"\n role=\"option\"\n [attr.aria-selected]=\"isOptionSelected(option)\"\n [attr.aria-disabled]=\"option.disabled || maxReached()\"\n (mousedown)=\"selectOption(option)\"\n >\n <!-- Indicateur de couleur -->\n @if (option.color) {\n <span\n class=\"ds-entity-picker__option-indicator\"\n [style.background-color]=\"option.color\"\n ></span>\n }\n\n <!-- Emoji ou ic\u00F4ne -->\n @if (option.emoji) {\n <span class=\"ds-entity-picker__option-emoji\">{{ option.emoji }}</span>\n } @else if (option.icon) {\n <fa-icon\n class=\"ds-entity-picker__option-icon\"\n [icon]=\"option.icon\"\n [style.color]=\"option.color\"\n />\n }\n\n <!-- Contenu texte -->\n <span class=\"ds-entity-picker__option-content\">\n <span class=\"ds-entity-picker__option-label\">{{ option.label }}</span>\n @if (option.description) {\n <span class=\"ds-entity-picker__option-description\">{{ option.description }}</span>\n }\n </span>\n\n <!-- Check si s\u00E9lectionn\u00E9 -->\n @if (isOptionSelected(option)) {\n <svg\n class=\"ds-entity-picker__check\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n }\n </li>\n } @empty {\n @if (!canCreate()) {\n <li class=\"ds-entity-picker__empty\" role=\"option\" aria-disabled=\"true\">\n {{ noResultsText() }}\n </li>\n }\n }\n\n <!-- Option de cr\u00E9ation -->\n @if (canCreate()) {\n <li\n class=\"ds-entity-picker__option ds-entity-picker__option--create\"\n [class.ds-entity-picker__option--focused]=\"isCreateFocused()\"\n role=\"option\"\n (mousedown)=\"requestCreate()\"\n >\n <fa-icon class=\"ds-entity-picker__option-icon\" [icon]=\"iconPlus\" />\n <span class=\"ds-entity-picker__option-content\">\n <span class=\"ds-entity-picker__option-label\">\n {{ formattedCreateText() }}\n </span>\n </span>\n </li>\n }\n </ul>\n </div>\n </ng-template>\n\n <!-- Helper / Error -->\n @if (error()) {\n <span class=\"ds-entity-picker__error\" role=\"alert\">{{ error() }}</span>\n } @else if (helper()) {\n <span class=\"ds-entity-picker__helper\">{{ helper() }}</span>\n }\n</div>\n", styles: ["@charset \"UTF-8\";.ds-entity-picker{display:flex;flex-direction:column;gap:var(--space-1, .25rem);position:relative;width:100%;font-family:var(--font-family-base, sans-serif)}.ds-entity-picker__label{display:block;font-size:var(--font-size-sm, .875rem);font-weight:500;color:var(--text-default, #1a1a1a);margin-bottom:var(--space-1, .25rem)}.ds-entity-picker__required{color:var(--error, #ef4444);margin-left:var(--space-0-5, .125rem)}.ds-entity-picker__wrapper{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1, .25rem);padding:var(--space-1-5, .375rem) var(--space-2, .5rem);min-height:var(--input-height-md, 40px);background-color:var(--input-bg, #fff);border:1px solid var(--input-border, #d1d5db);border-radius:var(--radius-md, 6px);transition:border-color var(--duration-fast, .15s) var(--easing-default, ease),box-shadow var(--duration-fast, .15s) var(--easing-default, ease);cursor:text}.ds-entity-picker__wrapper:hover:not(.ds-entity-picker--disabled .ds-entity-picker__wrapper){border-color:var(--input-border-hover, #9ca3af)}.ds-entity-picker--open .ds-entity-picker__wrapper,.ds-entity-picker__wrapper:focus-within{border-color:var(--color-primary, #6366f1);box-shadow:0 0 0 3px var(--primary-100, rgba(99, 102, 241, .1))}.ds-entity-picker--error .ds-entity-picker__wrapper{border-color:var(--error, #ef4444)}.ds-entity-picker--error .ds-entity-picker__wrapper:focus-within{box-shadow:0 0 0 3px var(--error-100, rgba(239, 68, 68, .1))}.ds-entity-picker--disabled .ds-entity-picker__wrapper{background-color:var(--input-bg-disabled, #f3f4f6);border-color:var(--input-border-disabled, #e5e7eb);cursor:not-allowed;opacity:.6}.ds-entity-picker__chips{display:flex;flex-wrap:wrap;gap:var(--space-1, .25rem);max-width:100%}.ds-entity-picker__count{display:inline-flex;align-items:center;padding:var(--space-0-5, .125rem) var(--space-2, .5rem);background-color:var(--primary-100, #eef2ff);color:var(--color-primary, #6366f1);font-size:var(--font-size-sm, .875rem);font-weight:500;border-radius:var(--radius-pill, 9999px)}.ds-entity-picker__input-container{display:flex;align-items:center;flex:1;min-width:120px;position:relative}.ds-entity-picker__input{flex:1;min-width:0;padding:var(--space-1, .25rem) 0;border:none;background:transparent;font-family:inherit;font-size:var(--font-size-base, 1rem);color:var(--text-default, #1a1a1a);outline:none}.ds-entity-picker__input::placeholder{color:var(--text-muted, #9ca3af)}.ds-entity-picker__input:disabled{cursor:not-allowed}.ds-entity-picker__icons{display:flex;align-items:center;gap:var(--space-1, .25rem);margin-left:var(--space-1, .25rem);flex-shrink:0}.ds-entity-picker__clear{display:flex;align-items:center;justify-content:center;padding:var(--space-1, .25rem);border:none;background:none;color:var(--text-muted, #9ca3af);cursor:pointer;border-radius:var(--radius-sm, 4px);transition:color var(--duration-fast, .15s) var(--easing-default, ease),background-color var(--duration-fast, .15s) var(--easing-default, ease)}.ds-entity-picker__clear:hover{color:var(--text-default, #1a1a1a);background-color:var(--gray-100, #f3f4f6)}.ds-entity-picker__arrow{display:flex;align-items:center;color:var(--text-muted, #9ca3af);transition:transform var(--duration-fast, .15s) var(--easing-default, ease)}.ds-entity-picker__arrow--open{transform:rotate(180deg)}.ds-entity-picker__dropdown{background-color:var(--dropdown-bg, #fff);border:1px solid var(--dropdown-border, #e5e7eb);border-radius:var(--radius-md, 6px);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, .1));max-height:280px;overflow-y:auto;animation:slideDown .15s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ds-entity-picker__listbox{list-style:none;margin:0;padding:var(--space-1, .25rem)}.ds-entity-picker__option{display:flex;align-items:center;gap:var(--space-2, .5rem);padding:var(--space-2, .5rem) var(--space-3, .75rem);border-radius:var(--radius-sm, 4px);cursor:pointer;transition:background-color var(--duration-fast, .15s) var(--easing-default, ease)}.ds-entity-picker__option:hover:not(.ds-entity-picker__option--disabled){background-color:var(--gray-50, #f9fafb)}.ds-entity-picker__option--focused:not(.ds-entity-picker__option--disabled){background-color:var(--gray-100, #f3f4f6)}.ds-entity-picker__option--selected{background-color:var(--primary-50, #eef2ff)}.ds-entity-picker__option--selected:hover{background-color:var(--primary-100, #e0e7ff)}.ds-entity-picker__option--disabled{opacity:.5;cursor:not-allowed}.ds-entity-picker__option--create{border-top:1px solid var(--gray-200, #e5e7eb);margin-top:var(--space-1, .25rem);padding-top:var(--space-3, .75rem);color:var(--color-primary, #6366f1)}.ds-entity-picker__option--create .ds-entity-picker__option-icon{color:var(--color-primary, #6366f1)}.ds-entity-picker__option-indicator{width:4px;height:100%;min-height:24px;border-radius:var(--radius-pill, 9999px);flex-shrink:0;margin-right:var(--space-1, .25rem)}.ds-entity-picker__option-emoji{font-size:1.125rem;flex-shrink:0}.ds-entity-picker__option-icon{font-size:1rem;flex-shrink:0;color:var(--option-color, var(--gray-600))}.ds-entity-picker__option-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-0-5, .125rem)}.ds-entity-picker__option-label{font-size:var(--font-size-base, 1rem);color:var(--text-default, #1a1a1a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ds-entity-picker__option-description{font-size:var(--font-size-sm, .875rem);color:var(--text-muted, #6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ds-entity-picker__check{flex-shrink:0;color:var(--color-primary, #6366f1)}.ds-entity-picker__empty{padding:var(--space-3, .75rem);text-align:center;color:var(--text-muted, #9ca3af);font-size:var(--font-size-sm, .875rem)}.ds-entity-picker__helper,.ds-entity-picker__error{font-size:var(--font-size-sm, .875rem);margin-top:var(--space-1, .25rem)}.ds-entity-picker__helper{color:var(--text-muted, #6b7280)}.ds-entity-picker__error{color:var(--error, #ef4444)}.ds-entity-picker--sm .ds-entity-picker__wrapper{min-height:var(--input-height-sm, 32px);padding:var(--space-1, .25rem) var(--space-1-5, .375rem)}.ds-entity-picker--sm .ds-entity-picker__input{font-size:var(--font-size-sm, .875rem)}.ds-entity-picker--sm .ds-entity-picker__option{padding:var(--space-1-5, .375rem) var(--space-2, .5rem)}.ds-entity-picker--sm .ds-entity-picker__option-label{font-size:var(--font-size-sm, .875rem)}.ds-entity-picker--sm .ds-entity-picker__option-description{font-size:var(--font-size-xs, .75rem)}.ds-entity-picker--lg .ds-entity-picker__wrapper{min-height:var(--input-height-lg, 48px);padding:var(--space-2, .5rem) var(--space-3, .75rem)}.ds-entity-picker--lg .ds-entity-picker__input{font-size:var(--font-size-lg, 1.125rem)}.ds-entity-picker--lg .ds-entity-picker__option{padding:var(--space-3, .75rem) var(--space-4, 1rem)}.ds-entity-picker--lg .ds-entity-picker__option-label{font-size:var(--font-size-lg, 1.125rem)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1$1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: DsEntityChip, selector: "ds-entity-chip", inputs: ["option", "size", "removable", "disabled"], outputs: ["removed"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16513
+ }
16514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DsEntityPicker, decorators: [{
16515
+ type: Component,
16516
+ args: [{ selector: 'ds-entity-picker', standalone: true, imports: [CommonModule, FontAwesomeModule, DsEntityChip, CdkConnectedOverlay, CdkOverlayOrigin], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
16517
+ {
16518
+ provide: NG_VALUE_ACCESSOR,
16519
+ useExisting: forwardRef(() => DsEntityPicker),
16520
+ multi: true,
16521
+ },
16522
+ ], template: "<div [ngClass]=\"containerClasses()\">\n <!-- Label -->\n @if (label()) {\n <label class=\"ds-entity-picker__label\" [attr.for]=\"inputId()\">\n {{ label() }}\n @if (required()) {\n <span class=\"ds-entity-picker__required\">*</span>\n }\n </label>\n }\n\n <!-- Input wrapper -->\n <div class=\"ds-entity-picker__wrapper\"\n #triggerOrigin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin>\n <!-- Chips (mode multiple) -->\n @if (multiple() && displayMode() === 'chip') {\n <div class=\"ds-entity-picker__chips\">\n @for (option of selectedOptions(); track option.value) {\n <ds-entity-chip\n [option]=\"option\"\n [size]=\"size()\"\n [removable]=\"!isDisabled()\"\n [disabled]=\"isDisabled()\"\n (removed)=\"removeOption($event)\"\n />\n }\n </div>\n }\n\n <!-- Count badge (mode count) -->\n @if (multiple() && displayMode() === 'count' && selectedOptions().length > 0) {\n <span class=\"ds-entity-picker__count\">\n {{ countText() }}\n </span>\n }\n\n <!-- Input -->\n <div class=\"ds-entity-picker__input-container\">\n <input\n #inputElement\n type=\"text\"\n [id]=\"inputId()\"\n [ngClass]=\"inputClasses()\"\n [placeholder]=\"multiple() ? placeholder() : (displayValue() || placeholder())\"\n [disabled]=\"isDisabled()\"\n [value]=\"multiple() ? searchQuery() : (searchQuery() || displayValue())\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"listboxId()\"\n [attr.aria-activedescendant]=\"focusedIndex() >= 0 ? getOptionId(focusedIndex()) : null\"\n role=\"combobox\"\n autocomplete=\"off\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <!-- Icons -->\n <span class=\"ds-entity-picker__icons\">\n @if (clearable() && (selectedOptions().length > 0 || searchQuery())) {\n <button\n type=\"button\"\n class=\"ds-entity-picker__clear\"\n aria-label=\"Effacer\"\n tabindex=\"-1\"\n (mousedown)=\"clear($event)\"\n >\n <fa-icon [icon]=\"iconClear\" />\n </button>\n }\n <span class=\"ds-entity-picker__arrow\" [class.ds-entity-picker__arrow--open]=\"isOpen()\">\n <fa-icon [icon]=\"iconChevron\" />\n </span>\n </span>\n </div>\n </div>\n\n <!-- Dropdown (CDK Overlay) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"triggerOrigin\"\n [cdkConnectedOverlayOpen]=\"shouldShowDropdown()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"triggerOrigin.elementRef.nativeElement.offsetWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"false\"\n [cdkConnectedOverlayPanelClass]=\"'ds-entity-picker-overlay'\">\n <div class=\"ds-entity-picker__dropdown\" role=\"presentation\">\n <ul\n #listbox\n [id]=\"listboxId()\"\n class=\"ds-entity-picker__listbox\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || 'Options'\"\n [attr.aria-multiselectable]=\"multiple()\"\n >\n @for (option of filteredOptions(); track trackOption($index, option); let i = $index) {\n <li\n [id]=\"getOptionId(i)\"\n class=\"ds-entity-picker__option\"\n [class.ds-entity-picker__option--focused]=\"isOptionFocused(i)\"\n [class.ds-entity-picker__option--selected]=\"isOptionSelected(option)\"\n [class.ds-entity-picker__option--disabled]=\"option.disabled || maxReached()\"\n [style.--option-color]=\"option.color || 'var(--gray-400)'\"\n role=\"option\"\n [attr.aria-selected]=\"isOptionSelected(option)\"\n [attr.aria-disabled]=\"option.disabled || maxReached()\"\n (mousedown)=\"selectOption(option)\"\n >\n <!-- Indicateur de couleur -->\n @if (option.color) {\n <span\n class=\"ds-entity-picker__option-indicator\"\n [style.background-color]=\"option.color\"\n ></span>\n }\n\n <!-- Emoji ou ic\u00F4ne -->\n @if (option.emoji) {\n <span class=\"ds-entity-picker__option-emoji\">{{ option.emoji }}</span>\n } @else if (option.icon) {\n <fa-icon\n class=\"ds-entity-picker__option-icon\"\n [icon]=\"option.icon\"\n [style.color]=\"option.color\"\n />\n }\n\n <!-- Contenu texte -->\n <span class=\"ds-entity-picker__option-content\">\n <span class=\"ds-entity-picker__option-label\">{{ option.label }}</span>\n @if (option.description) {\n <span class=\"ds-entity-picker__option-description\">{{ option.description }}</span>\n }\n </span>\n\n <!-- Check si s\u00E9lectionn\u00E9 -->\n @if (isOptionSelected(option)) {\n <svg\n class=\"ds-entity-picker__check\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n }\n </li>\n } @empty {\n @if (!canCreate()) {\n <li class=\"ds-entity-picker__empty\" role=\"option\" aria-disabled=\"true\">\n {{ noResultsText() }}\n </li>\n }\n }\n\n <!-- Option de cr\u00E9ation -->\n @if (canCreate()) {\n <li\n class=\"ds-entity-picker__option ds-entity-picker__option--create\"\n [class.ds-entity-picker__option--focused]=\"isCreateFocused()\"\n role=\"option\"\n (mousedown)=\"requestCreate()\"\n >\n <fa-icon class=\"ds-entity-picker__option-icon\" [icon]=\"iconPlus\" />\n <span class=\"ds-entity-picker__option-content\">\n <span class=\"ds-entity-picker__option-label\">\n {{ formattedCreateText() }}\n </span>\n </span>\n </li>\n }\n </ul>\n </div>\n </ng-template>\n\n <!-- Helper / Error -->\n @if (error()) {\n <span class=\"ds-entity-picker__error\" role=\"alert\">{{ error() }}</span>\n } @else if (helper()) {\n <span class=\"ds-entity-picker__helper\">{{ helper() }}</span>\n }\n</div>\n", styles: ["@charset \"UTF-8\";.ds-entity-picker{display:flex;flex-direction:column;gap:var(--space-1, .25rem);position:relative;width:100%;font-family:var(--font-family-base, sans-serif)}.ds-entity-picker__label{display:block;font-size:var(--font-size-sm, .875rem);font-weight:500;color:var(--text-default, #1a1a1a);margin-bottom:var(--space-1, .25rem)}.ds-entity-picker__required{color:var(--error, #ef4444);margin-left:var(--space-0-5, .125rem)}.ds-entity-picker__wrapper{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1, .25rem);padding:var(--space-1-5, .375rem) var(--space-2, .5rem);min-height:var(--input-height-md, 40px);background-color:var(--input-bg, #fff);border:1px solid var(--input-border, #d1d5db);border-radius:var(--radius-md, 6px);transition:border-color var(--duration-fast, .15s) var(--easing-default, ease),box-shadow var(--duration-fast, .15s) var(--easing-default, ease);cursor:text}.ds-entity-picker__wrapper:hover:not(.ds-entity-picker--disabled .ds-entity-picker__wrapper){border-color:var(--input-border-hover, #9ca3af)}.ds-entity-picker--open .ds-entity-picker__wrapper,.ds-entity-picker__wrapper:focus-within{border-color:var(--color-primary, #6366f1);box-shadow:0 0 0 3px var(--primary-100, rgba(99, 102, 241, .1))}.ds-entity-picker--error .ds-entity-picker__wrapper{border-color:var(--error, #ef4444)}.ds-entity-picker--error .ds-entity-picker__wrapper:focus-within{box-shadow:0 0 0 3px var(--error-100, rgba(239, 68, 68, .1))}.ds-entity-picker--disabled .ds-entity-picker__wrapper{background-color:var(--input-bg-disabled, #f3f4f6);border-color:var(--input-border-disabled, #e5e7eb);cursor:not-allowed;opacity:.6}.ds-entity-picker__chips{display:flex;flex-wrap:wrap;gap:var(--space-1, .25rem);max-width:100%}.ds-entity-picker__count{display:inline-flex;align-items:center;padding:var(--space-0-5, .125rem) var(--space-2, .5rem);background-color:var(--primary-100, #eef2ff);color:var(--color-primary, #6366f1);font-size:var(--font-size-sm, .875rem);font-weight:500;border-radius:var(--radius-pill, 9999px)}.ds-entity-picker__input-container{display:flex;align-items:center;flex:1;min-width:120px;position:relative}.ds-entity-picker__input{flex:1;min-width:0;padding:var(--space-1, .25rem) 0;border:none;background:transparent;font-family:inherit;font-size:var(--font-size-base, 1rem);color:var(--text-default, #1a1a1a);outline:none}.ds-entity-picker__input::placeholder{color:var(--text-muted, #9ca3af)}.ds-entity-picker__input:disabled{cursor:not-allowed}.ds-entity-picker__icons{display:flex;align-items:center;gap:var(--space-1, .25rem);margin-left:var(--space-1, .25rem);flex-shrink:0}.ds-entity-picker__clear{display:flex;align-items:center;justify-content:center;padding:var(--space-1, .25rem);border:none;background:none;color:var(--text-muted, #9ca3af);cursor:pointer;border-radius:var(--radius-sm, 4px);transition:color var(--duration-fast, .15s) var(--easing-default, ease),background-color var(--duration-fast, .15s) var(--easing-default, ease)}.ds-entity-picker__clear:hover{color:var(--text-default, #1a1a1a);background-color:var(--gray-100, #f3f4f6)}.ds-entity-picker__arrow{display:flex;align-items:center;color:var(--text-muted, #9ca3af);transition:transform var(--duration-fast, .15s) var(--easing-default, ease)}.ds-entity-picker__arrow--open{transform:rotate(180deg)}.ds-entity-picker__dropdown{background-color:var(--dropdown-bg, #fff);border:1px solid var(--dropdown-border, #e5e7eb);border-radius:var(--radius-md, 6px);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, .1));max-height:280px;overflow-y:auto;animation:slideDown .15s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ds-entity-picker__listbox{list-style:none;margin:0;padding:var(--space-1, .25rem)}.ds-entity-picker__option{display:flex;align-items:center;gap:var(--space-2, .5rem);padding:var(--space-2, .5rem) var(--space-3, .75rem);border-radius:var(--radius-sm, 4px);cursor:pointer;transition:background-color var(--duration-fast, .15s) var(--easing-default, ease)}.ds-entity-picker__option:hover:not(.ds-entity-picker__option--disabled){background-color:var(--gray-50, #f9fafb)}.ds-entity-picker__option--focused:not(.ds-entity-picker__option--disabled){background-color:var(--gray-100, #f3f4f6)}.ds-entity-picker__option--selected{background-color:var(--primary-50, #eef2ff)}.ds-entity-picker__option--selected:hover{background-color:var(--primary-100, #e0e7ff)}.ds-entity-picker__option--disabled{opacity:.5;cursor:not-allowed}.ds-entity-picker__option--create{border-top:1px solid var(--gray-200, #e5e7eb);margin-top:var(--space-1, .25rem);padding-top:var(--space-3, .75rem);color:var(--color-primary, #6366f1)}.ds-entity-picker__option--create .ds-entity-picker__option-icon{color:var(--color-primary, #6366f1)}.ds-entity-picker__option-indicator{width:4px;height:100%;min-height:24px;border-radius:var(--radius-pill, 9999px);flex-shrink:0;margin-right:var(--space-1, .25rem)}.ds-entity-picker__option-emoji{font-size:1.125rem;flex-shrink:0}.ds-entity-picker__option-icon{font-size:1rem;flex-shrink:0;color:var(--option-color, var(--gray-600))}.ds-entity-picker__option-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-0-5, .125rem)}.ds-entity-picker__option-label{font-size:var(--font-size-base, 1rem);color:var(--text-default, #1a1a1a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ds-entity-picker__option-description{font-size:var(--font-size-sm, .875rem);color:var(--text-muted, #6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ds-entity-picker__check{flex-shrink:0;color:var(--color-primary, #6366f1)}.ds-entity-picker__empty{padding:var(--space-3, .75rem);text-align:center;color:var(--text-muted, #9ca3af);font-size:var(--font-size-sm, .875rem)}.ds-entity-picker__helper,.ds-entity-picker__error{font-size:var(--font-size-sm, .875rem);margin-top:var(--space-1, .25rem)}.ds-entity-picker__helper{color:var(--text-muted, #6b7280)}.ds-entity-picker__error{color:var(--error, #ef4444)}.ds-entity-picker--sm .ds-entity-picker__wrapper{min-height:var(--input-height-sm, 32px);padding:var(--space-1, .25rem) var(--space-1-5, .375rem)}.ds-entity-picker--sm .ds-entity-picker__input{font-size:var(--font-size-sm, .875rem)}.ds-entity-picker--sm .ds-entity-picker__option{padding:var(--space-1-5, .375rem) var(--space-2, .5rem)}.ds-entity-picker--sm .ds-entity-picker__option-label{font-size:var(--font-size-sm, .875rem)}.ds-entity-picker--sm .ds-entity-picker__option-description{font-size:var(--font-size-xs, .75rem)}.ds-entity-picker--lg .ds-entity-picker__wrapper{min-height:var(--input-height-lg, 48px);padding:var(--space-2, .5rem) var(--space-3, .75rem)}.ds-entity-picker--lg .ds-entity-picker__input{font-size:var(--font-size-lg, 1.125rem)}.ds-entity-picker--lg .ds-entity-picker__option{padding:var(--space-3, .75rem) var(--space-4, 1rem)}.ds-entity-picker--lg .ds-entity-picker__option-label{font-size:var(--font-size-lg, 1.125rem)}\n"] }]
16523
+ }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], maxSelections: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelections", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], helper: [{ type: i0.Input, args: [{ isSignal: true, alias: "helper", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], minChars: [{ type: i0.Input, args: [{ isSignal: true, alias: "minChars", required: false }] }], noResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsText", required: false }] }], createText: [{ type: i0.Input, args: [{ isSignal: true, alias: "createText", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], createRequested: [{ type: i0.Output, args: ["createRequested"] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], inputElement: [{
16524
+ type: ViewChild,
16525
+ args: ['inputElement']
16526
+ }], listbox: [{
16527
+ type: ViewChild,
16528
+ args: ['listbox']
16529
+ }], onKeyDown: [{
16530
+ type: HostListener,
16531
+ args: ['keydown', ['$event']]
16532
+ }], onDocumentClick: [{
16533
+ type: HostListener,
16534
+ args: ['document:click', ['$event']]
16535
+ }] } });
16536
+
15932
16537
  /*
15933
16538
  * Components barrel export
15934
16539
  */
@@ -16415,5 +17020,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
16415
17020
  * Generated bundle index. Do not edit.
16416
17021
  */
16417
17022
 
16418
- export { AUTOCOMPLETE_POSITIONS, DROPDOWN_POSITIONS, DROPDOWN_POSITIONS_RIGHT, DROPDOWN_POSITIONS_TOP, DsAccordion, DsAlert, DsAvatar, DsBadge, DsBreadcrumb, DsButton, DsCalendar, DsCard, DsCarousel, DsCheckbox, DsCheckboxList, DsChip, DsColorPicker, DsCombobox, DsContainer, DsDatePicker, DsDivider, DsDrawer, DsDropdown, DsEmpty, DsFileUpload, DsI18nService, DsInputField, DsInputNumber, DsInputTextarea, DsList, DsListGroup, DsListItem, DsMenu, DsModalComponent, DsNavList, DsNotificationContainerComponent, DsNotificationItemComponent, DsNotificationService, DsPagination, DsPasswordStrength, DsPopover, DsPopoverComponent, DsProgressBar, DsRadioGroup, DsRating, DsSearchInput, DsSegmentedControl, DsSelect, DsSidebar, DsSidebarFooterItemComponent, DsSidebarItemComponent, DsSkeleton, DsSlider, DsStepper, DsTable, DsTabs, DsTimePicker, DsTimeline, DsToastComponent, DsToastContainerComponent, DsToastService, DsToggle, DsTooltip, DsTooltipComponent, DsTransfer, DsTree, IconRegistryService, POPOVER_POSITIONS, PrimitiveBadge, PrimitiveButton, PrimitiveCheckbox, PrimitiveInput, PrimitiveRadio, PrimitiveTextarea, PrimitiveToggle, SIDEBAR_POPOVER_POSITIONS_LEFT, SIDEBAR_POPOVER_POSITIONS_RIGHT, TOOLTIP_POSITIONS, generateId, generateShortId };
17023
+ export { AUTOCOMPLETE_POSITIONS, DROPDOWN_POSITIONS, DROPDOWN_POSITIONS_RIGHT, DROPDOWN_POSITIONS_TOP, DsAccordion, DsAlert, DsAvatar, DsBadge, DsBreadcrumb, DsButton, DsCalendar, DsCard, DsCarousel, DsCheckbox, DsCheckboxList, DsChip, DsColorPicker, DsCombobox, DsContainer, DsDatePicker, DsDivider, DsDrawer, DsDropdown, DsEmpty, DsEntityChip, DsEntityPicker, DsFileUpload, DsI18nService, DsInputField, DsInputNumber, DsInputTextarea, DsList, DsListGroup, DsListItem, DsMenu, DsModalComponent, DsNavList, DsNotificationContainerComponent, DsNotificationItemComponent, DsNotificationService, DsPagination, DsPasswordStrength, DsPopover, DsPopoverComponent, DsProgressBar, DsRadioGroup, DsRating, DsSearchInput, DsSegmentedControl, DsSelect, DsSidebar, DsSidebarFooterItemComponent, DsSidebarItemComponent, DsSkeleton, DsSlider, DsStepper, DsTable, DsTabs, DsTimePicker, DsTimeline, DsToastComponent, DsToastContainerComponent, DsToastService, DsToggle, DsTooltip, DsTooltipComponent, DsTransfer, DsTree, IconRegistryService, POPOVER_POSITIONS, PrimitiveBadge, PrimitiveButton, PrimitiveCheckbox, PrimitiveInput, PrimitiveRadio, PrimitiveTextarea, PrimitiveToggle, SIDEBAR_POPOVER_POSITIONS_LEFT, SIDEBAR_POPOVER_POSITIONS_RIGHT, TOOLTIP_POSITIONS, generateId, generateShortId };
16419
17024
  //# sourceMappingURL=kksdev-ds-angular.mjs.map