@cute-widgets/base 20.0.1 → 20.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,58 +1,21 @@
1
1
  import { LiveAnnouncer, removeAriaReferencedId, addAriaReferencedId, ActiveDescendantKeyManager } from '@angular/cdk/a11y';
2
2
  import { Directionality } from '@angular/cdk/bidi';
3
3
  import { SelectionModel } from '@angular/cdk/collections';
4
- import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, A } from '@angular/cdk/keycodes';
5
- import { Overlay, CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
4
+ import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, A, ESCAPE } from '@angular/cdk/keycodes';
5
+ import { createRepositionScrollStrategy, CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
6
6
  import { ViewportRuler } from '@angular/cdk/scrolling';
7
7
  import * as i0 from '@angular/core';
8
- import { InjectionToken, inject, isDevMode, NgZone, EventEmitter, HostAttributeToken, booleanAttribute, numberAttribute, Output, Input, ViewChild, ContentChild, ContentChildren, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
8
+ import { InjectionToken, inject, Injector, isDevMode, NgZone, EventEmitter, HostAttributeToken, booleanAttribute, numberAttribute, Output, Input, ViewChild, ContentChild, ContentChildren, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
9
9
  import { Validators, NgControl, NgForm, FormGroupDirective } from '@angular/forms';
10
10
  import { NgClass, CommonModule } from '@angular/common';
11
11
  import { Subject, defer, merge } from 'rxjs';
12
- import { startWith, switchMap, take, filter, map, distinctUntilChanged, takeUntil } from 'rxjs/operators';
13
- import { trigger, state, transition, style, animate, query, animateChild } from '@angular/animations';
12
+ import { startWith, switchMap, take, filter, map, takeUntil } from 'rxjs/operators';
14
13
  import { _countGroupLabelsBeforeOption, _getOptionScrollPosition, CuteOption, CUTE_OPTGROUP, CUTE_OPTION_PARENT_COMPONENT, CuteOptgroup } from '@cute-widgets/base/core/option';
15
14
  import { CUTE_FORM_FIELD, CuteFormFieldControl } from '@cute-widgets/base/form-field';
16
15
  import { ErrorStateMatcher, _ErrorStateTracker } from '@cute-widgets/base/core/error';
17
16
  import { CuteInputDropdownControl } from '@cute-widgets/base/abstract';
18
-
19
- /**
20
- * @license Apache-2.0
21
- *
22
- * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
23
- *
24
- * You may not use this file except in compliance with the License
25
- * that can be found at http://www.apache.org/licenses/LICENSE-2.0
26
- */
27
- /**
28
- * The following are all the animations for the mat-select component, with each
29
- * const containing the metadata for one animation.
30
- *
31
- * The values below match the implementation of the AngularJS Material mat-select animation.
32
- * @docs-private
33
- */
34
- const cuteSelectAnimations = {
35
- /**
36
- * This animation ensures the select's overlay panel animation (transformPanel) is called when
37
- * closing the select.
38
- * This is needed due to https://github.com/angular/angular/issues/23302
39
- */
40
- transformPanelWrap: trigger('transformPanelWrap', [
41
- transition('* => void', query('@transformPanel', [animateChild()], { optional: true })),
42
- ]),
43
- /** This animation transforms the select's overlay panel on and off the page. */
44
- transformPanel: trigger('transformPanel', [
45
- state('void', style({
46
- opacity: 0,
47
- transform: 'scale(1, 0.8)',
48
- })),
49
- transition('void => showing', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({
50
- opacity: 1,
51
- transform: 'scale(1, 1)',
52
- }))),
53
- transition('* => void', animate('100ms linear', style({ opacity: 0 }))),
54
- ]),
55
- };
17
+ import { _animationsDisabled } from '@cute-widgets/base/core';
18
+ import { _getEventTarget } from '@angular/cdk/platform';
56
19
 
57
20
  /**
58
21
  * @license Apache-2.0
@@ -105,22 +68,12 @@ let nextUniqueId = 0;
105
68
  const CUTE_SELECT_SCROLL_STRATEGY = new InjectionToken('cute-select-scroll-strategy', {
106
69
  providedIn: 'root',
107
70
  factory: () => {
108
- const overlay = inject(Overlay);
109
- return () => overlay.scrollStrategies.reposition();
71
+ const injector = inject(Injector);
72
+ return () => createRepositionScrollStrategy(injector);
110
73
  },
111
74
  });
112
- /** @docs-private */
113
- function CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
114
- return () => overlay.scrollStrategies.reposition();
115
- }
116
75
  /** Injection token that can be used to provide the default options the select module. */
117
76
  const CUTE_SELECT_CONFIG = new InjectionToken('CUTE_SELECT_CONFIG');
118
- /** @docs-private */
119
- const CUTE_SELECT_SCROLL_STRATEGY_PROVIDER = {
120
- provide: CUTE_SELECT_SCROLL_STRATEGY,
121
- deps: [Overlay],
122
- useFactory: CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,
123
- };
124
77
  /**
125
78
  * Injection token that can be used to reference instances of `CuteSelectTrigger`. It serves as
126
79
  * an alternative token to the actual `CuteSelectTrigger` class which could cause unnecessary
@@ -139,6 +92,15 @@ class CuteSelectChange {
139
92
  }
140
93
  }
141
94
  class CuteSelect extends CuteInputDropdownControl {
95
+ get bsColorVarName() {
96
+ if (this.color) {
97
+ if (this.color == "link") {
98
+ return `--bs-${this.color}-color-rgb`;
99
+ }
100
+ return `--bs-${this.color}-rgb`;
101
+ }
102
+ return "";
103
+ }
142
104
  /** Scrolls a particular option into the view. */
143
105
  _scrollOptionIntoView(index) {
144
106
  const option = this.options?.toArray()[index];
@@ -259,6 +221,8 @@ class CuteSelect extends CuteInputDropdownControl {
259
221
  this.ngControl = inject(NgControl, { self: true, optional: true });
260
222
  this._liveAnnouncer = inject(LiveAnnouncer);
261
223
  this._defaultOptions = inject(CUTE_SELECT_CONFIG, { optional: true });
224
+ this._animationsDisabled = _animationsDisabled();
225
+ this._initialized = new Subject();
262
226
  /**
263
227
  * This position config ensures that the top "start" corner of the overlay
264
228
  * is aligned with the top "start" of the origin by default (overlapping
@@ -344,7 +308,7 @@ class CuteSelect extends CuteInputDropdownControl {
344
308
  * By default, selecting an option with a `null` or `undefined` value will reset the select's
345
309
  * value. Enable this option if the reset behavior doesn't match your requirements and instead,
346
310
  * the nullable options should become selected. The value of this input can be controlled app-wide
347
- * using the `MAT_SELECT_CONFIG` injection token.
311
+ * using the `CUTE_SELECT_CONFIG` injection token.
348
312
  */
349
313
  this.canSelectNullableOptions = this._defaultOptions?.canSelectNullableOptions ?? false;
350
314
  /** Combined stream of all of the child options' change events. */
@@ -422,12 +386,6 @@ class CuteSelect extends CuteInputDropdownControl {
422
386
  super.ngOnInit();
423
387
  this._selectionModel = new SelectionModel(this.multiple);
424
388
  this.stateChanges.next();
425
- // We need `distinctUntilChanged` here, because some browsers will
426
- // fire the animation end event twice for the same animation. See:
427
- // https://github.com/angular/angular/issues/24084
428
- this._panelDoneAnimatingStream
429
- .pipe(distinctUntilChanged(), takeUntil(this._destroy))
430
- .subscribe(() => this._panelDoneAnimating(this.panelOpen));
431
389
  this._viewportRuler
432
390
  .change()
433
391
  .pipe(takeUntil(this._destroy))
@@ -440,6 +398,8 @@ class CuteSelect extends CuteInputDropdownControl {
440
398
  }
441
399
  ngAfterContentInit() {
442
400
  super.ngAfterContentInit();
401
+ this._initialized.next();
402
+ this._initialized.complete();
443
403
  this._initKeyManager();
444
404
  this._selectionModel?.changed.pipe(takeUntil(this._destroy)).subscribe(event => {
445
405
  event.added.forEach(option => option.select());
@@ -492,6 +452,7 @@ class CuteSelect extends CuteInputDropdownControl {
492
452
  }
493
453
  ngOnDestroy() {
494
454
  super.ngOnDestroy();
455
+ this._cleanupDetach?.();
495
456
  this._keyManager?.destroy();
496
457
  this._destroy.next();
497
458
  this._destroy.complete();
@@ -504,22 +465,31 @@ class CuteSelect extends CuteInputDropdownControl {
504
465
  }
505
466
  /** Opens the overlay panel. */
506
467
  open() {
468
+ if (!this._canOpen()) {
469
+ return;
470
+ }
507
471
  // It's important that we read this as late as possible, because doing so earlier will
508
472
  // return a different element since it's based on queries in the form field which may
509
473
  // not have run yet. Also, this needs to be assigned before we measure the overlay width.
510
474
  if (this._parentFormField) {
511
475
  this._preferredOverlayOrigin = this._parentFormField.getConnectedOverlayOrigin();
512
476
  }
477
+ this._cleanupDetach?.();
513
478
  this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);
514
- if (this._canOpen()) {
515
- this._applyModalPanelOwnership();
516
- this._panelOpen = true;
517
- this._keyManager?.withHorizontalOrientation(null);
518
- this._highlightCorrectOption();
519
- this.markForCheck();
520
- }
479
+ this._applyModalPanelOwnership();
480
+ this._panelOpen = true;
481
+ this._overlayDir?.positionChange.pipe(take(1)).subscribe(() => {
482
+ this._changeDetectorRef.detectChanges();
483
+ this._positioningSettled();
484
+ });
485
+ this._overlayDir?.attachOverlay();
486
+ this._keyManager?.withHorizontalOrientation(null);
487
+ this._highlightCorrectOption();
488
+ this.markForCheck();
521
489
  // Required for the MDC form field to pick up when the overlay has been opened.
522
490
  this.stateChanges.next();
491
+ // Simulate the animation event before we moved away from `@angular/animations`.
492
+ Promise.resolve().then(() => this.openedChange.emit(true));
523
493
  }
524
494
  /**
525
495
  * If the autocomplete trigger is inside of an `aria-modal` element, connect
@@ -573,14 +543,53 @@ class CuteSelect extends CuteInputDropdownControl {
573
543
  close() {
574
544
  if (this._panelOpen) {
575
545
  this._panelOpen = false;
546
+ this._exitAndDetach();
576
547
  this._keyManager?.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');
577
548
  this.markForCheck();
578
549
  this._onTouched();
550
+ // Required for the MDC form field to pick up when the overlay has been closed.
551
+ this.stateChanges.next();
552
+ // Simulate the animation event before we moved away from `@angular/animations`.
553
+ Promise.resolve().then(() => this.openedChange.emit(false));
579
554
  }
580
555
  this.focus();
581
556
  // Required for the MDC form field to pick up when the overlay has been closed.
582
557
  this.stateChanges.next();
583
558
  }
559
+ /** Triggers the exit animation and detaches the overlay at the end. */
560
+ _exitAndDetach() {
561
+ if (this._animationsDisabled || !this.panel) {
562
+ this._detachOverlay();
563
+ return;
564
+ }
565
+ this._cleanupDetach?.();
566
+ this._cleanupDetach = () => {
567
+ cleanupEvent();
568
+ clearTimeout(exitFallbackTimer);
569
+ this._cleanupDetach = undefined;
570
+ };
571
+ const panel = this.panel.nativeElement;
572
+ const cleanupEvent = this._renderer.listen(panel, 'animationend', (event) => {
573
+ if (event.animationName === '_cute-select-exit') {
574
+ this._cleanupDetach?.();
575
+ this._detachOverlay();
576
+ }
577
+ });
578
+ // Since closing the overlay depends on the animation, we have a fallback in case the panel
579
+ // doesn't animate. This can happen in some internal tests that do `* {animation: none}`.
580
+ const exitFallbackTimer = setTimeout(() => {
581
+ this._cleanupDetach?.();
582
+ this._detachOverlay();
583
+ }, 200);
584
+ panel.classList.add('cute-select-panel-exit');
585
+ }
586
+ /** Detaches the current overlay directive. */
587
+ _detachOverlay() {
588
+ this._overlayDir?.detachOverlay();
589
+ // Some of the overlay detachment logic depends on change detection.
590
+ // Mark for check to ensure that things get picked up in a timely manner.
591
+ this.markForCheck();
592
+ }
584
593
  /**
585
594
  * Sets the select' value. Part of the ControlValueAccessor interface
586
595
  * required to integrate with Angular core forms API.
@@ -695,6 +704,17 @@ class CuteSelect extends CuteInputDropdownControl {
695
704
  }
696
705
  }
697
706
  }
707
+ /** Handles keyboard events coming from the overlay. */
708
+ _handleOverlayKeydown(event) {
709
+ // TODO(crisbeto): prior to #30363 this was being handled inside the overlay directive, but we
710
+ // need control over the animation timing so we do it manually. We should remove the `keydown`
711
+ // listener from `.cute-select-panel` and handle all the events here. That may cause
712
+ // further test breakages so it's left for a follow-up.
713
+ if (event.keyCode === ESCAPE && !hasModifierKey(event)) {
714
+ event.preventDefault();
715
+ this.close();
716
+ }
717
+ }
698
718
  _onFocus() {
699
719
  if (!this.disabled) {
700
720
  this._focused = true;
@@ -714,15 +734,6 @@ class CuteSelect extends CuteInputDropdownControl {
714
734
  this.stateChanges.next();
715
735
  }
716
736
  }
717
- /**
718
- * Callback that is invoked when the overlay panel has been attached.
719
- */
720
- _onAttached() {
721
- this._overlayDir?.positionChange.pipe(take(1)).subscribe(() => {
722
- this._changeDetectorRef.detectChanges();
723
- this._positioningSettled();
724
- });
725
- }
726
737
  /** Returns the theme to be used on the panel. */
727
738
  _getPanelTheme() {
728
739
  return this._parentFormField ? `cute-${this._parentFormField.color}` : '';
@@ -1006,11 +1017,26 @@ class CuteSelect extends CuteInputDropdownControl {
1006
1017
  if (this.ariaLabelledby) {
1007
1018
  value += ' ' + this.ariaLabelledby;
1008
1019
  }
1020
+ // The value should not be used for the trigger's aria-labelledby,
1021
+ // but this currently "breaks" accessibility tests since they complain
1022
+ // there is no aria-labelledby. This is because they are not setting an
1023
+ // appropriate label on the form field or select.
1024
+ // TODO: remove this conditional after fixing clients by ensuring their
1025
+ // selects have a label applied.
1026
+ if (!value) {
1027
+ //value = this._valueId;
1028
+ value = this.inputId;
1029
+ }
1009
1030
  return value;
1010
1031
  }
1011
- /** Called when the overlay panel is done animating. */
1012
- _panelDoneAnimating(isOpen) {
1013
- this.openedChange.emit(isOpen);
1032
+ /**
1033
+ * Implemented as part of CuteFormFieldControl.
1034
+ * @docs-private
1035
+ */
1036
+ get describedByIds() {
1037
+ const element = this._elementRef.nativeElement;
1038
+ const existingDescribedBy = element.getAttribute('aria-describedby');
1039
+ return existingDescribedBy?.split(' ') || [];
1014
1040
  }
1015
1041
  /**
1016
1042
  * Implemented as part of CuteFormFieldControl.
@@ -1026,7 +1052,18 @@ class CuteSelect extends CuteInputDropdownControl {
1026
1052
  /**
1027
1053
  * Implemented as part of CuteFormFieldControl.
1028
1054
  */
1029
- onContainerClick() {
1055
+ onContainerClick(event) {
1056
+ const target = _getEventTarget(event);
1057
+ // Since the overlay is inside the form field, this handler can fire for interactions
1058
+ // with the container. Note that while it's redundant to select both for the popover
1059
+ // and select panel, we need to do it because it tests the clicks can occur after
1060
+ // the panel was detached from the popover.
1061
+ if (target &&
1062
+ (target.tagName === 'CUTE-OPTION' ||
1063
+ target.classList.contains('cdk-overlay-backdrop') ||
1064
+ target.closest('.cute-select-panel'))) {
1065
+ return;
1066
+ }
1030
1067
  this.focus();
1031
1068
  this.open();
1032
1069
  }
@@ -1038,11 +1075,17 @@ class CuteSelect extends CuteInputDropdownControl {
1038
1075
  // want the label to only float when there's a value.
1039
1076
  return this.panelOpen || !this.empty || (this.focused && !!this.placeholder);
1040
1077
  }
1078
+ /** `input` element gets focus. */
1079
+ onInputFocus(event) {
1080
+ const elem = event.target;
1081
+ // CWT: disable auto select input text
1082
+ elem.selectionStart = elem.selectionEnd;
1083
+ }
1041
1084
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1042
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CuteSelect, isStandalone: true, selector: "cute-select", inputs: { userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], panelClass: "panelClass", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute], placeholder: "placeholder", multiple: ["multiple", "multiple", booleanAttribute], disableOptionCentering: ["disableOptionCentering", "disableOptionCentering", booleanAttribute], compareWith: "compareWith", value: "value", errorStateMatcher: "errorStateMatcher", magnitude: "magnitude", typeaheadDebounceInterval: ["typeaheadDebounceInterval", "typeaheadDebounceInterval", numberAttribute], sortComparator: "sortComparator", panelWidth: "panelWidth", panelHeight: "panelHeight", canSelectNullableOptions: ["canSelectNullableOptions", "canSelectNullableOptions", booleanAttribute] }, outputs: { openedChange: "openedChange", _openedStream: "opened", _closedStream: "closed", selectionChange: "selectionChange", valueChange: "valueChange" }, host: { attributes: { "role": "combobox", "aria-autocomplete": "none", "aria-haspopup": "listbox", "ngSkipHydration": "" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.active": "focused", "class.cute-select-disabled": "disabled", "class.cute-select-invalid": "errorState", "class.cute-select-required": "required", "class.cute-select-empty": "empty", "class.cute-select-multiple": "multiple", "attr.id": "id", "attr.tabindex": "-1", "attr.aria-controls": "panelOpen ? id + \"-panel\" : null", "attr.aria-expanded": "panelOpen", "attr.aria-label": "ariaLabel || null", "attr.aria-required": "required", "attr.aria-disabled": "disabled", "attr.aria-invalid": "errorState", "attr.aria-activedescendant": "_getAriaActiveDescendant()" }, classAttribute: "cute-select" }, providers: [
1085
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CuteSelect, isStandalone: true, selector: "cute-select", inputs: { userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], panelClass: "panelClass", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute], placeholder: "placeholder", multiple: ["multiple", "multiple", booleanAttribute], disableOptionCentering: ["disableOptionCentering", "disableOptionCentering", booleanAttribute], compareWith: "compareWith", value: "value", errorStateMatcher: "errorStateMatcher", magnitude: "magnitude", typeaheadDebounceInterval: ["typeaheadDebounceInterval", "typeaheadDebounceInterval", numberAttribute], sortComparator: "sortComparator", panelWidth: "panelWidth", panelHeight: "panelHeight", canSelectNullableOptions: ["canSelectNullableOptions", "canSelectNullableOptions", booleanAttribute] }, outputs: { openedChange: "openedChange", _openedStream: "opened", _closedStream: "closed", selectionChange: "selectionChange", valueChange: "valueChange" }, host: { attributes: { "role": "combobox", "aria-autocomplete": "none", "aria-haspopup": "listbox" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.active": "focused", "class.cute-select-disabled": "disabled", "class.cute-select-invalid": "errorState", "class.cute-select-required": "required", "class.cute-select-empty": "empty", "class.cute-select-multiple": "multiple", "attr.id": "id", "attr.tabindex": "-1", "attr.aria-controls": "panelOpen ? id + \"-panel\" : null", "attr.aria-expanded": "panelOpen", "attr.aria-label": "ariaLabel || null", "attr.aria-required": "required", "attr.aria-disabled": "disabled", "attr.aria-invalid": "errorState", "attr.aria-activedescendant": "_getAriaActiveDescendant()" }, classAttribute: "cute-select" }, providers: [
1043
1086
  { provide: CuteFormFieldControl, useExisting: CuteSelect },
1044
1087
  { provide: CUTE_OPTION_PARENT_COMPONENT, useExisting: CuteSelect },
1045
- ], queries: [{ propertyName: "customTrigger", first: true, predicate: CUTE_SELECT_TRIGGER, descendants: true }, { propertyName: "options", predicate: CuteOption, descendants: true }, { propertyName: "optionGroups", predicate: CUTE_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "_overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true }], exportAs: ["cuteSelect"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div cdk-overlay-origin\r\n class=\"cute-select-trigger-wrapper\"\r\n [class.required]=\"required\"\r\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\r\n>\r\n\r\n @if (!customTrigger) {\r\n <input #trigger\r\n class=\"form-select cute-select-trigger__input\"\r\n [class.form-select-sm]=\"magnitude=='small'\"\r\n [class.form-select-lg]=\"magnitude=='large'\"\r\n [attr.id]=\"inputId\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n readonly\r\n [value]=\"triggerValue\"\r\n (click)=\"toggle()\"\r\n autocomplete=\"off\">\r\n } @else {\r\n <div #trigger\r\n class=\"form-select cute-select-trigger__custom\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [attr.id]=\"inputId\">\r\n <ng-content select=\"cute-select-trigger\"></ng-content>\r\n </div>\r\n }\r\n\r\n</div>\r\n\r\n<ng-template cdk-connected-overlay\r\n cdkConnectedOverlayHasBackdrop\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n [cdkConnectedOverlayPanelClass]=\"_overlayPanelClass\"\r\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\r\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"panelOpen\"\r\n [cdkConnectedOverlayPositions]=\"_positions\"\r\n [cdkConnectedOverlayWidth]=\"_overlayWidth!\"\r\n (backdropClick)=\"close()\"\r\n (attach)=\"_onAttached()\"\r\n (detach)=\"close()\"> <!-- cdkConnectedOverlayLockPosition -->\r\n <div #panel\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"cute-dropdown-overlay-content bg-body-tertiary shadow\"\r\n [style.max-height]=\"panelHeight || null\"\r\n [attr.id]=\"id + '-panel'\"\r\n [attr.aria-multiselectable]=\"multiple\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\r\n [ngClass]=\"panelClass\"\r\n [@transformPanel]=\"'showing'\"\r\n (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\"\r\n (keydown)=\"_handleKeydown($event)\">\r\n <div class=\"cute-dropdown-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!--<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>-->\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".cute-select{display:inline-block;width:100%}.cute-dropdown-overlay-content{display:block;width:100%;max-height:272px;overflow-y:auto;padding:var(--cute-select-padding-y, .5rem) 0;font-size:var(--bs-body-font-size);color:var(--bs-body-color);text-align:start;list-style:none;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color-translucent);border-radius:var(--bs-border-radius)}.cute-dropdown-overlay-content .cute-dropdown-content{overflow:auto;height:100%}.cute-dropdown-overlay-content .cute-dropdown-content .cute-option:hover:not(.disabled){background-color:var(--bs-secondary-bg)}.cute-select-trigger__input,.cute-select-trigger__custom{position:relative;cursor:pointer;-webkit-user-select:none;user-select:none}.cute-select-trigger__input:disabled,.cute-select-trigger__custom:disabled{cursor:auto;opacity:.65}cute-select-trigger{display:inline-block;-webkit-user-select:none;user-select:none}[dir=rtl] .form-select{padding:.375rem .75rem .375rem 2.25rem;background-position:left .75rem center}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { 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: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [cuteSelectAnimations.transformPanel], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1088
+ ], queries: [{ propertyName: "customTrigger", first: true, predicate: CUTE_SELECT_TRIGGER, descendants: true }, { propertyName: "options", predicate: CuteOption, descendants: true }, { propertyName: "optionGroups", predicate: CUTE_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "_overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true }], exportAs: ["cuteSelect"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div cdk-overlay-origin\r\n class=\"cute-select-trigger-wrapper\"\r\n [class.required]=\"required\"\r\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\r\n>\r\n\r\n @if (!customTrigger) {\r\n <input #trigger\r\n class=\"form-select cute-select-trigger__input\"\r\n [class.form-select-sm]=\"magnitude=='small'\"\r\n [class.form-select-lg]=\"magnitude=='large'\"\r\n [style.--bs-focus-ring-color]='color? \"rgba(var(\"+bsColorVarName+\"), var(--bs-focus-ring-opacity))\" : null'\r\n [attr.id]=\"inputId\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n readonly\r\n [value]=\"triggerValue\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onInputFocus($event)\"\r\n autocomplete=\"off\"\r\n >\r\n <!-- Prevents selection -->\r\n <!-- (mousedown)=\"$event.preventDefault()\"-->\r\n } @else {\r\n <div #trigger\r\n class=\"form-select cute-select-trigger__custom\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [attr.id]=\"inputId\">\r\n <ng-content select=\"cute-select-trigger\"></ng-content>\r\n </div>\r\n }\r\n\r\n</div>\r\n\r\n<ng-template cdk-connected-overlay\r\n cdkConnectedOverlayHasBackdrop\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n [cdkConnectedOverlayDisableClose]=\"true\"\r\n [cdkConnectedOverlayPanelClass]=\"_overlayPanelClass\"\r\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\r\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"panelOpen\"\r\n [cdkConnectedOverlayPositions]=\"_positions\"\r\n [cdkConnectedOverlayWidth]=\"_overlayWidth!\"\r\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\r\n (backdropClick)=\"close()\"\r\n (overlayKeydown)=\"_handleOverlayKeydown($event)\"\r\n (detach)=\"close()\"> <!-- cdkConnectedOverlayLockPosition -->\r\n <div #panel\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"cute-dropdown-overlay-content bg-body-tertiary shadow\"\r\n [class.cute-select-panel-animations-enabled]=\"!_animationsDisabled\"\r\n [style.max-height]=\"panelHeight || null\"\r\n [attr.id]=\"id + '-panel'\"\r\n [attr.aria-multiselectable]=\"multiple\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\r\n [ngClass]=\"panelClass\"\r\n (keydown)=\"_handleKeydown($event)\">\r\n <div class=\"cute-dropdown-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!--<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>-->\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".cute-select{display:inline-block;width:100%;outline:none}.cute-dropdown-overlay-content{display:block;width:100%;max-height:272px;overflow-y:auto;padding:var(--cute-select-padding-y, .5rem) 0;font-size:var(--bs-body-font-size);color:var(--bs-body-color);text-align:start;list-style:none;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color-translucent);border-radius:var(--bs-border-radius)}.cute-dropdown-overlay-content .cute-dropdown-content{overflow:auto;height:100%}.cute-dropdown-overlay-content .cute-dropdown-content .cute-option:hover:not(.disabled){background-color:var(--bs-secondary-bg)}.cute-select-trigger__input,.cute-select-trigger__custom{position:relative;cursor:pointer;user-select:none;-webkit-user-select:none}.cute-select-trigger__input:disabled,.cute-select-trigger__custom:disabled{cursor:auto;opacity:.65}[dir=rtl] .cute-select-trigger__input.form-select,[dir=rtl] .cute-select-trigger__custom.form-select{padding:.375rem .75rem .375rem 2.25rem;background-position:left .75rem center}cute-select-trigger{display:inline-block;-webkit-user-select:none;user-select:none}.cute-select-panel-animations-enabled{animation:_cute-select-enter .12s cubic-bezier(0,0,.2,1)}.cute-select-panel-animations-enabled.cute-select-panel-exit{animation:_cute-select-exit .1s linear}@keyframes _cute-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _cute-select-exit{0%{opacity:1}to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { 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: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1046
1089
  }
1047
1090
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteSelect, decorators: [{
1048
1091
  type: Component,
@@ -1066,14 +1109,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1066
1109
  '[attr.aria-disabled]': 'disabled',
1067
1110
  '[attr.aria-invalid]': 'errorState',
1068
1111
  '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',
1069
- 'ngSkipHydration': '',
1070
1112
  '(keydown)': '_handleKeydown($event)',
1071
1113
  '(focus)': '_onFocus()',
1072
1114
  '(blur)': '_onBlur()',
1073
- }, animations: [cuteSelectAnimations.transformPanel], providers: [
1115
+ //'ngSkipHydration': '',
1116
+ }, providers: [
1074
1117
  { provide: CuteFormFieldControl, useExisting: CuteSelect },
1075
1118
  { provide: CUTE_OPTION_PARENT_COMPONENT, useExisting: CuteSelect },
1076
- ], imports: [CdkOverlayOrigin, CdkConnectedOverlay, NgClass], template: "<div cdk-overlay-origin\r\n class=\"cute-select-trigger-wrapper\"\r\n [class.required]=\"required\"\r\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\r\n>\r\n\r\n @if (!customTrigger) {\r\n <input #trigger\r\n class=\"form-select cute-select-trigger__input\"\r\n [class.form-select-sm]=\"magnitude=='small'\"\r\n [class.form-select-lg]=\"magnitude=='large'\"\r\n [attr.id]=\"inputId\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n readonly\r\n [value]=\"triggerValue\"\r\n (click)=\"toggle()\"\r\n autocomplete=\"off\">\r\n } @else {\r\n <div #trigger\r\n class=\"form-select cute-select-trigger__custom\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [attr.id]=\"inputId\">\r\n <ng-content select=\"cute-select-trigger\"></ng-content>\r\n </div>\r\n }\r\n\r\n</div>\r\n\r\n<ng-template cdk-connected-overlay\r\n cdkConnectedOverlayHasBackdrop\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n [cdkConnectedOverlayPanelClass]=\"_overlayPanelClass\"\r\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\r\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"panelOpen\"\r\n [cdkConnectedOverlayPositions]=\"_positions\"\r\n [cdkConnectedOverlayWidth]=\"_overlayWidth!\"\r\n (backdropClick)=\"close()\"\r\n (attach)=\"_onAttached()\"\r\n (detach)=\"close()\"> <!-- cdkConnectedOverlayLockPosition -->\r\n <div #panel\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"cute-dropdown-overlay-content bg-body-tertiary shadow\"\r\n [style.max-height]=\"panelHeight || null\"\r\n [attr.id]=\"id + '-panel'\"\r\n [attr.aria-multiselectable]=\"multiple\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\r\n [ngClass]=\"panelClass\"\r\n [@transformPanel]=\"'showing'\"\r\n (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\"\r\n (keydown)=\"_handleKeydown($event)\">\r\n <div class=\"cute-dropdown-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!--<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>-->\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".cute-select{display:inline-block;width:100%}.cute-dropdown-overlay-content{display:block;width:100%;max-height:272px;overflow-y:auto;padding:var(--cute-select-padding-y, .5rem) 0;font-size:var(--bs-body-font-size);color:var(--bs-body-color);text-align:start;list-style:none;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color-translucent);border-radius:var(--bs-border-radius)}.cute-dropdown-overlay-content .cute-dropdown-content{overflow:auto;height:100%}.cute-dropdown-overlay-content .cute-dropdown-content .cute-option:hover:not(.disabled){background-color:var(--bs-secondary-bg)}.cute-select-trigger__input,.cute-select-trigger__custom{position:relative;cursor:pointer;-webkit-user-select:none;user-select:none}.cute-select-trigger__input:disabled,.cute-select-trigger__custom:disabled{cursor:auto;opacity:.65}cute-select-trigger{display:inline-block;-webkit-user-select:none;user-select:none}[dir=rtl] .form-select{padding:.375rem .75rem .375rem 2.25rem;background-position:left .75rem center}\n"] }]
1119
+ ], imports: [CdkOverlayOrigin, CdkConnectedOverlay, NgClass], template: "<div cdk-overlay-origin\r\n class=\"cute-select-trigger-wrapper\"\r\n [class.required]=\"required\"\r\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\r\n>\r\n\r\n @if (!customTrigger) {\r\n <input #trigger\r\n class=\"form-select cute-select-trigger__input\"\r\n [class.form-select-sm]=\"magnitude=='small'\"\r\n [class.form-select-lg]=\"magnitude=='large'\"\r\n [style.--bs-focus-ring-color]='color? \"rgba(var(\"+bsColorVarName+\"), var(--bs-focus-ring-opacity))\" : null'\r\n [attr.id]=\"inputId\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n readonly\r\n [value]=\"triggerValue\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onInputFocus($event)\"\r\n autocomplete=\"off\"\r\n >\r\n <!-- Prevents selection -->\r\n <!-- (mousedown)=\"$event.preventDefault()\"-->\r\n } @else {\r\n <div #trigger\r\n class=\"form-select cute-select-trigger__custom\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [attr.id]=\"inputId\">\r\n <ng-content select=\"cute-select-trigger\"></ng-content>\r\n </div>\r\n }\r\n\r\n</div>\r\n\r\n<ng-template cdk-connected-overlay\r\n cdkConnectedOverlayHasBackdrop\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n [cdkConnectedOverlayDisableClose]=\"true\"\r\n [cdkConnectedOverlayPanelClass]=\"_overlayPanelClass\"\r\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\r\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"panelOpen\"\r\n [cdkConnectedOverlayPositions]=\"_positions\"\r\n [cdkConnectedOverlayWidth]=\"_overlayWidth!\"\r\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\r\n (backdropClick)=\"close()\"\r\n (overlayKeydown)=\"_handleOverlayKeydown($event)\"\r\n (detach)=\"close()\"> <!-- cdkConnectedOverlayLockPosition -->\r\n <div #panel\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"cute-dropdown-overlay-content bg-body-tertiary shadow\"\r\n [class.cute-select-panel-animations-enabled]=\"!_animationsDisabled\"\r\n [style.max-height]=\"panelHeight || null\"\r\n [attr.id]=\"id + '-panel'\"\r\n [attr.aria-multiselectable]=\"multiple\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\r\n [ngClass]=\"panelClass\"\r\n (keydown)=\"_handleKeydown($event)\">\r\n <div class=\"cute-dropdown-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!--<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>-->\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".cute-select{display:inline-block;width:100%;outline:none}.cute-dropdown-overlay-content{display:block;width:100%;max-height:272px;overflow-y:auto;padding:var(--cute-select-padding-y, .5rem) 0;font-size:var(--bs-body-font-size);color:var(--bs-body-color);text-align:start;list-style:none;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color-translucent);border-radius:var(--bs-border-radius)}.cute-dropdown-overlay-content .cute-dropdown-content{overflow:auto;height:100%}.cute-dropdown-overlay-content .cute-dropdown-content .cute-option:hover:not(.disabled){background-color:var(--bs-secondary-bg)}.cute-select-trigger__input,.cute-select-trigger__custom{position:relative;cursor:pointer;user-select:none;-webkit-user-select:none}.cute-select-trigger__input:disabled,.cute-select-trigger__custom:disabled{cursor:auto;opacity:.65}[dir=rtl] .cute-select-trigger__input.form-select,[dir=rtl] .cute-select-trigger__custom.form-select{padding:.375rem .75rem .375rem 2.25rem;background-position:left .75rem center}cute-select-trigger{display:inline-block;-webkit-user-select:none;user-select:none}.cute-select-panel-animations-enabled{animation:_cute-select-enter .12s cubic-bezier(0,0,.2,1)}.cute-select-panel-animations-enabled.cute-select-panel-exit{animation:_cute-select-exit .1s linear}@keyframes _cute-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _cute-select-exit{0%{opacity:1}to{opacity:0}}\n"] }]
1077
1120
  }], ctorParameters: () => [], propDecorators: { options: [{
1078
1121
  type: ContentChildren,
1079
1122
  args: [CuteOption, { descendants: true }]
@@ -1183,9 +1226,7 @@ class CuteSelectModule {
1183
1226
  CuteSelectTrigger,
1184
1227
  CuteOptgroup,
1185
1228
  CuteOption] }); }
1186
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteSelectModule, providers: [
1187
- CUTE_SELECT_SCROLL_STRATEGY_PROVIDER
1188
- ], imports: [CommonModule, CuteOptgroup,
1229
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteSelectModule, imports: [CommonModule, CuteOptgroup,
1189
1230
  CuteOption] }); }
1190
1231
  }
1191
1232
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CuteSelectModule, decorators: [{
@@ -1193,9 +1234,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1193
1234
  args: [{
1194
1235
  imports: [CommonModule, ...TYPES],
1195
1236
  exports: TYPES,
1196
- providers: [
1197
- CUTE_SELECT_SCROLL_STRATEGY_PROVIDER
1198
- ],
1199
1237
  declarations: [],
1200
1238
  }]
1201
1239
  }] });
@@ -1204,5 +1242,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1204
1242
  * Generated bundle index. Do not edit.
1205
1243
  */
1206
1244
 
1207
- export { CUTE_SELECT_CONFIG, CUTE_SELECT_SCROLL_STRATEGY, CUTE_SELECT_SCROLL_STRATEGY_PROVIDER, CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, CUTE_SELECT_TRIGGER, CuteSelect, CuteSelectChange, CuteSelectModule, CuteSelectTrigger, cuteSelectAnimations };
1245
+ export { CUTE_SELECT_CONFIG, CUTE_SELECT_SCROLL_STRATEGY, CUTE_SELECT_TRIGGER, CuteSelect, CuteSelectChange, CuteSelectModule, CuteSelectTrigger };
1208
1246
  //# sourceMappingURL=cute-widgets-base-select.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cute-widgets-base-select.mjs","sources":["../../../../projects/cute-widgets/base/select/src/select-animations.ts","../../../../projects/cute-widgets/base/select/src/select-errors.ts","../../../../projects/cute-widgets/base/select/src/select.component.ts","../../../../projects/cute-widgets/base/select/src/select.component.html","../../../../projects/cute-widgets/base/select/src/select.module.ts","../../../../projects/cute-widgets/base/select/cute-widgets-base-select.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n animate,\r\n animateChild,\r\n AnimationTriggerMetadata,\r\n query,\r\n state,\r\n style,\r\n transition,\r\n trigger,\r\n} from '@angular/animations';\r\n\r\n/**\r\n * The following are all the animations for the mat-select component, with each\r\n * const containing the metadata for one animation.\r\n *\r\n * The values below match the implementation of the AngularJS Material mat-select animation.\r\n * @docs-private\r\n */\r\nexport const cuteSelectAnimations: {\r\n /**\r\n * @deprecated No longer being used. To be removed.\r\n * @breaking-change 12.0.0\r\n */\r\n readonly transformPanelWrap: AnimationTriggerMetadata;\r\n readonly transformPanel: AnimationTriggerMetadata;\r\n} = {\r\n /**\r\n * This animation ensures the select's overlay panel animation (transformPanel) is called when\r\n * closing the select.\r\n * This is needed due to https://github.com/angular/angular/issues/23302\r\n */\r\n transformPanelWrap: trigger('transformPanelWrap', [\r\n transition('* => void', query('@transformPanel', [animateChild()], {optional: true})),\r\n ]),\r\n\r\n /** This animation transforms the select's overlay panel on and off the page. */\r\n transformPanel: trigger('transformPanel', [\r\n state(\r\n 'void',\r\n style({\r\n opacity: 0,\r\n transform: 'scale(1, 0.8)',\r\n }),\r\n ),\r\n transition(\r\n 'void => showing',\r\n animate(\r\n '120ms cubic-bezier(0, 0, 0.2, 1)',\r\n style({\r\n opacity: 1,\r\n transform: 'scale(1, 1)',\r\n }),\r\n ),\r\n ),\r\n transition('* => void', animate('100ms linear', style({opacity: 0}))),\r\n ]),\r\n};\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\n\r\n/**\r\n * Returns an exception to be thrown when attempting to change a select's `multiple` option\r\n * after initialization.\r\n */\r\nexport function getCuteSelectDynamicMultipleError(): Error {\r\n return Error('Cannot change `multiple` mode of select after initialization.');\r\n}\r\n\r\n/**\r\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\r\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\r\n * resetting the value.\r\n */\r\nexport function getCuteSelectNonArrayValueError(): Error {\r\n return Error('Value must be an array in multiple-selection mode.');\r\n}\r\n\r\n/**\r\n * Returns an exception to be thrown when assigning a non-function value to the comparator\r\n * used to determine if a value corresponds to an option. Note that whether the function\r\n * actually takes two values and returns a boolean is not checked.\r\n */\r\nexport function getCuteSelectNonFunctionValueError(): Error {\r\n return Error('`compareWith` must be a function.');\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {\r\n ActiveDescendantKeyManager,\r\n LiveAnnouncer,\r\n addAriaReferencedId,\r\n removeAriaReferencedId, FocusOrigin,\r\n} from '@angular/cdk/a11y';\r\nimport {Directionality} from '@angular/cdk/bidi';\r\nimport {SelectionModel} from '@angular/cdk/collections';\r\nimport {\r\n A,\r\n DOWN_ARROW,\r\n ENTER,\r\n hasModifierKey,\r\n LEFT_ARROW,\r\n RIGHT_ARROW,\r\n SPACE,\r\n UP_ARROW,\r\n} from '@angular/cdk/keycodes';\r\nimport {\r\n CdkConnectedOverlay,\r\n CdkOverlayOrigin,\r\n ConnectedPosition,\r\n Overlay,\r\n ScrollStrategy,\r\n} from '@angular/cdk/overlay';\r\nimport {ViewportRuler} from '@angular/cdk/scrolling';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ContentChildren,\r\n Directive,\r\n DoCheck,\r\n ElementRef,\r\n EventEmitter,\r\n InjectionToken,\r\n Input,\r\n NgZone,\r\n Output,\r\n QueryList,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n inject,\r\n numberAttribute, isDevMode, HostAttributeToken,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n FormGroupDirective,\r\n NgControl,\r\n NgForm,\r\n Validators,\r\n} from '@angular/forms';\r\nimport {NgClass} from '@angular/common';\r\nimport {defer, merge, Observable, Subject} from 'rxjs';\r\nimport {\r\n distinctUntilChanged,\r\n filter,\r\n map,\r\n startWith,\r\n switchMap,\r\n take,\r\n takeUntil,\r\n} from 'rxjs/operators';\r\nimport {cuteSelectAnimations} from './select-animations';\r\nimport {\r\n getCuteSelectDynamicMultipleError,\r\n getCuteSelectNonArrayValueError,\r\n getCuteSelectNonFunctionValueError,\r\n} from './select-errors';\r\nimport {\r\n CUTE_OPTION_PARENT_COMPONENT,\r\n _countGroupLabelsBeforeOption,\r\n _getOptionScrollPosition,\r\n CuteOption,\r\n CuteOptionSelectionChange,\r\n CUTE_OPTGROUP, CuteOptgroup,\r\n} from \"@cute-widgets/base/core/option\";\r\nimport {RelativeSize} from \"@cute-widgets/base/core/types\";\r\nimport {CuteFormField, CuteFormFieldControl, CUTE_FORM_FIELD} from '@cute-widgets/base/form-field';\r\nimport {_ErrorStateTracker, ErrorStateMatcher} from \"@cute-widgets/base/core/error\";\r\nimport {CuteInputDropdownControl} from \"@cute-widgets/base/abstract\";\r\n\r\nlet nextUniqueId = 0;\r\n\r\n/** Injection token that determines the scroll handling while a select is open. */\r\nexport const CUTE_SELECT_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\r\n 'cute-select-scroll-strategy',\r\n {\r\n providedIn: 'root',\r\n factory: () => {\r\n const overlay = inject(Overlay);\r\n return () => overlay.scrollStrategies.reposition();\r\n },\r\n },\r\n);\r\n\r\n/** @docs-private */\r\nexport function CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(\r\n overlay: Overlay,\r\n): () => ScrollStrategy {\r\n return () => overlay.scrollStrategies.reposition();\r\n}\r\n\r\n/** Object that can be used to configure the default options for the select module. */\r\nexport interface CuteSelectConfig {\r\n /** Whether option centering should be disabled. */\r\n disableOptionCentering?: boolean;\r\n\r\n /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */\r\n typeaheadDebounceInterval?: number;\r\n\r\n /** Class or list of classes to be applied to the menu's overlay panel. */\r\n overlayPanelClass?: string | string[];\r\n\r\n /** Whether icon indicators should be hidden for single-selection. */\r\n hideSingleSelectionIndicator?: boolean;\r\n\r\n /**\r\n * Width of the panel. If set to `auto`, the panel will match the trigger width.\r\n * If set to _null_ or an empty string, the panel will grow to match the longest option's text.\r\n */\r\n panelWidth?: string | number | null;\r\n\r\n /**\r\n * Height of the panel. If set to `auto`, _null_ or an empty string, the panel will display all options.\r\n * If height is not empty, its value is set as a maximum height of the panel with vertical scrolling set to `auto`.\r\n */\r\n panelHeight?: string | number | null;\r\n\r\n /**\r\n * Whether nullable options can be selected by default.\r\n * See `CuteSelect.canSelectNullableOptions` for more information.\r\n */\r\n canSelectNullableOptions?: boolean;\r\n}\r\n\r\n/** Injection token that can be used to provide the default options the select module. */\r\nexport const CUTE_SELECT_CONFIG = new InjectionToken<CuteSelectConfig>('CUTE_SELECT_CONFIG');\r\n\r\n/** @docs-private */\r\nexport const CUTE_SELECT_SCROLL_STRATEGY_PROVIDER = {\r\n provide: CUTE_SELECT_SCROLL_STRATEGY,\r\n deps: [Overlay],\r\n useFactory: CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,\r\n};\r\n\r\n/**\r\n * Injection token that can be used to reference instances of `CuteSelectTrigger`. It serves as\r\n * an alternative token to the actual `CuteSelectTrigger` class which could cause unnecessary\r\n * retention of the class and its directive metadata.\r\n */\r\nexport const CUTE_SELECT_TRIGGER = new InjectionToken<CuteSelectTrigger>('CuteSelectTrigger');\r\n\r\n/** Change event object that is emitted when the select value has changed. */\r\nexport class CuteSelectChange {\r\n constructor(\r\n /** Reference to the select that emitted the change event. */\r\n public source: CuteSelect,\r\n /** Current value of the select that emitted the event. */\r\n public value: any,\r\n ) {}\r\n}\r\n\r\n@Component({\r\n selector: 'cute-select',\r\n exportAs: 'cuteSelect',\r\n templateUrl: './select.component.html',\r\n styleUrls: ['./select.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n 'class': 'cute-select',\r\n '[class.active]': 'focused',\r\n '[class.cute-select-disabled]': 'disabled',\r\n '[class.cute-select-invalid]': 'errorState',\r\n '[class.cute-select-required]': 'required',\r\n '[class.cute-select-empty]': 'empty',\r\n '[class.cute-select-multiple]': 'multiple',\r\n 'role': 'combobox',\r\n 'aria-autocomplete': 'none',\r\n 'aria-haspopup': 'listbox',\r\n '[attr.id]': 'id',\r\n '[attr.tabindex]': '-1', //'disabled ? -1 : tabIndex',\r\n '[attr.aria-controls]': 'panelOpen ? id + \"-panel\" : null',\r\n '[attr.aria-expanded]': 'panelOpen',\r\n '[attr.aria-label]': 'ariaLabel || null',\r\n '[attr.aria-required]': 'required',\r\n '[attr.aria-disabled]': 'disabled',\r\n '[attr.aria-invalid]': 'errorState',\r\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\r\n 'ngSkipHydration': '',\r\n '(keydown)': '_handleKeydown($event)',\r\n '(focus)': '_onFocus()',\r\n '(blur)': '_onBlur()',\r\n },\r\n animations: [cuteSelectAnimations.transformPanel],\r\n providers: [\r\n { provide: CuteFormFieldControl, useExisting: CuteSelect },\r\n { provide: CUTE_OPTION_PARENT_COMPONENT, useExisting: CuteSelect },\r\n ],\r\n imports: [CdkOverlayOrigin, CdkConnectedOverlay, NgClass]\r\n})\r\nexport class CuteSelect extends CuteInputDropdownControl\r\n implements DoCheck, CuteFormFieldControl<any>\r\n{\r\n protected _viewportRuler = inject(ViewportRuler);\r\n protected _ngZone = inject(NgZone);\r\n private _dir = inject(Directionality, {optional: true});\r\n protected _parentFormField = inject<CuteFormField>(CUTE_FORM_FIELD, {optional: true});\r\n public ngControl = inject(NgControl, {self: true, optional: true})!;\r\n private _liveAnnouncer = inject(LiveAnnouncer);\r\n protected _defaultOptions = inject(CUTE_SELECT_CONFIG, {optional: true});\r\n\r\n /** All the defined select options. */\r\n @ContentChildren(CuteOption, {descendants: true}) options: QueryList<CuteOption> | undefined;\r\n\r\n // TODO(crisbeto): this is only necessary for the non-MDC select, but it's technically a\r\n // public API so we have to keep it. It should be deprecated and removed eventually.\r\n /** All of the defined groups of options. */\r\n @ContentChildren(CUTE_OPTGROUP, {descendants: true}) optionGroups: QueryList<CuteOptgroup> | undefined;\r\n\r\n /** User-supplied override of the trigger element. */\r\n @ContentChild(CUTE_SELECT_TRIGGER) customTrigger: CuteSelectTrigger | undefined;\r\n\r\n /**\r\n * This position config ensures that the top \"start\" corner of the overlay\r\n * is aligned with the top \"start\" of the origin by default (overlapping\r\n * the trigger completely). If the panel cannot fit below the trigger, it\r\n * will fall back to a position above the trigger.\r\n */\r\n _positions: ConnectedPosition[] = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetY: 4,\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'bottom',\r\n overlayX: 'end',\r\n overlayY: 'top',\r\n offsetY: 4,\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetY: -4,\r\n //panelClass: 'cute-select-panel-above',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'end',\r\n overlayY: 'bottom',\r\n offsetY: -4,\r\n //panelClass: 'cute-select-panel-above',\r\n },\r\n ];\r\n\r\n /** Scrolls a particular option into the view. */\r\n _scrollOptionIntoView(index: number): void {\r\n const option = this.options?.toArray()[index];\r\n\r\n if (option && this.panel) {\r\n const panel: HTMLElement = this.panel.nativeElement;\r\n const content: HTMLElement = panel.children[0] as HTMLElement; // we place options on one level down in the DOM\r\n const labelCount = _countGroupLabelsBeforeOption(index, this.options!, this.optionGroups!);\r\n const element = option._getHostElement();\r\n\r\n if (index === 0 && labelCount === 1) {\r\n // If we've got one group label before the option, and we're at the top option,\r\n // scroll the list to the top. This is better UX than scrolling the list to the\r\n // top of the option, because it allows the user to read the top group's label.\r\n //panel.scrollTop = 0;\r\n content.scrollTop = 0;\r\n } else {\r\n /*\r\n panel.scrollTop = _getOptionScrollPosition(\r\n element.offsetTop,\r\n element.offsetHeight,\r\n panel.scrollTop,\r\n panel.offsetHeight,\r\n );\r\n */\r\n content.scrollTop = _getOptionScrollPosition(\r\n element.offsetTop,\r\n element.offsetHeight,\r\n content.scrollTop,\r\n content.offsetHeight,\r\n );\r\n }\r\n }\r\n }\r\n\r\n /** Generates unique identifier */\r\n protected override generateId(): string {\r\n return `cute-select-${nextUniqueId++}`;\r\n }\r\n\r\n /** Called when the panel has been opened and the overlay has settled on its final position. */\r\n private _positioningSettled() {\r\n this._scrollOptionIntoView(this._keyManager?.activeItemIndex || 0);\r\n }\r\n\r\n /** Creates a change event object that should be emitted by the select. */\r\n private _getChangeEvent(value: any) {\r\n return new CuteSelectChange(this, value);\r\n }\r\n\r\n /** Factory function used to create a scroll strategy for this select. */\r\n private _scrollStrategyFactory = inject(CUTE_SELECT_SCROLL_STRATEGY);\r\n\r\n /** Whether the overlay panel is open. */\r\n private _panelOpen = false;\r\n\r\n /** Comparison function to specify which option is displayed. Defaults to object equality. */\r\n private _compareWith = (o1: any, o2: any) => o1 === o2;\r\n\r\n /** Current `aria-labelledby` value for the select trigger. */\r\n private _triggerAriaLabelledBy: string | null = null;\r\n\r\n /**\r\n * Keeps track of the previous form control assigned to the select.\r\n * Used to detect if it has changed.\r\n */\r\n private _previousControl: AbstractControl | null | undefined;\r\n\r\n /** Emits whenever the component is destroyed. */\r\n protected readonly _destroy = new Subject<void>();\r\n\r\n /** Emits when the panel element is finished transforming in. */\r\n protected readonly _panelDoneAnimatingStream = new Subject<string>();\r\n\r\n /** Tracks the error state of the select. */\r\n private _errorStateTracker: _ErrorStateTracker;\r\n\r\n /** Disable the automatic labeling to avoid issues like #27241. */\r\n readonly disableAutomaticLabeling = true;\r\n\r\n /** Deals with the selection logic. */\r\n private _selectionModel: SelectionModel<CuteOption> | undefined;\r\n\r\n /** Manages keyboard events for options in the panel. */\r\n private _keyManager: ActiveDescendantKeyManager<CuteOption> | undefined;\r\n\r\n /** Ideal origin for the overlay panel. */\r\n protected _preferredOverlayOrigin: CdkOverlayOrigin | ElementRef | undefined;\r\n\r\n /** Width of the overlay panel. */\r\n protected _overlayWidth: string | number | undefined;\r\n\r\n /** Strategy that will be used to handle scrolling while the select panel is open. */\r\n protected _scrollStrategy: ScrollStrategy;\r\n\r\n protected _overlayPanelClass: string | string[] = this._defaultOptions?.overlayPanelClass || '';\r\n\r\n get expanded(): boolean { return this.panelOpen; }\r\n\r\n /** Whether the select is focused. */\r\n get focused(): boolean {\r\n return this._focused || this._panelOpen;\r\n }\r\n private _focused = false;\r\n\r\n /** A name for this control that can be used by `cute-form-field`. */\r\n controlType = 'cute-select';\r\n\r\n /** Implemented as part of CuteFormFieldControl. */\r\n get controlElementRef(): ElementRef { return this._elementRef; }\r\n\r\n /** Trigger that opens the select. */\r\n @ViewChild('trigger') trigger: ElementRef | undefined;\r\n\r\n /** Panel containing the select options. */\r\n @ViewChild('panel') panel: ElementRef | undefined;\r\n\r\n /** Overlay pane containing the options. */\r\n @ViewChild(CdkConnectedOverlay)\r\n protected _overlayDir: CdkConnectedOverlay | undefined;\r\n\r\n /** Implemented as part of CuteFormFieldControl. */\r\n @Input('aria-describedby') userAriaDescribedBy: string | undefined;\r\n\r\n /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */\r\n @Input() panelClass: string | string[] | Set<string> | {[key: string]: any} = \"\";\r\n\r\n /** Whether ripples in the select are disabled. */\r\n @Input({transform: booleanAttribute})\r\n disableRipple: boolean = false;\r\n\r\n /** Whether the checkmark indicator for single-selection options is hidden. */\r\n @Input({transform: booleanAttribute})\r\n get hideSingleSelectionIndicator(): boolean {\r\n return this._hideSingleSelectionIndicator;\r\n }\r\n set hideSingleSelectionIndicator(value: boolean) {\r\n this._hideSingleSelectionIndicator = value;\r\n this._syncParentProperties();\r\n }\r\n private _hideSingleSelectionIndicator: boolean =\r\n this._defaultOptions?.hideSingleSelectionIndicator ?? false;\r\n\r\n /** Placeholder to be shown if no value has been selected. */\r\n @Input()\r\n get placeholder(): string { return this._placeholder; }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = \"\";\r\n\r\n /** Whether the component is required. */\r\n override get required(): boolean {\r\n return super.required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\r\n }\r\n override set required(value: boolean) {\r\n super.required = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n /** Whether the user should be allowed to select multiple options. */\r\n @Input({transform: booleanAttribute})\r\n get multiple(): boolean { return this._multiple; }\r\n set multiple(value: boolean) {\r\n if (this._selectionModel && isDevMode()) {\r\n throw getCuteSelectDynamicMultipleError();\r\n }\r\n this._multiple = value;\r\n }\r\n private _multiple: boolean = false;\r\n\r\n /** Whether to center the active option over the trigger. */\r\n @Input({transform: booleanAttribute})\r\n disableOptionCentering = this._defaultOptions?.disableOptionCentering ?? false;\r\n\r\n /**\r\n * Function to compare the option values with the selected values. The first argument\r\n * is a value from an option. The second is a value from the selection. A boolean\r\n * should be returned.\r\n */\r\n @Input()\r\n get compareWith() { return this._compareWith; }\r\n set compareWith(fn: (o1: any, o2: any) => boolean) {\r\n if (typeof fn !== 'function' && isDevMode()) {\r\n throw getCuteSelectNonFunctionValueError();\r\n }\r\n this._compareWith = fn;\r\n if (this._selectionModel) {\r\n // A different comparator means the selection could change.\r\n this._initializeSelection();\r\n }\r\n }\r\n\r\n /** Value of the select control. */\r\n @Input()\r\n get value(): any { return this._value; }\r\n set value(newValue: any) {\r\n const hasAssigned = this._assignValue(newValue);\r\n\r\n if (hasAssigned) {\r\n this._onChange(newValue);\r\n }\r\n }\r\n private _value: any;\r\n\r\n /** Object used to control when error messages are shown. */\r\n @Input()\r\n get errorStateMatcher() { return this._errorStateTracker.matcher; }\r\n set errorStateMatcher(value: ErrorStateMatcher) {\r\n this._errorStateTracker.matcher = value;\r\n }\r\n\r\n /** Relative size of the select control */\r\n @Input()\r\n magnitude: RelativeSize | undefined;\r\n\r\n /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */\r\n @Input({transform: numberAttribute})\r\n typeaheadDebounceInterval: number = 0;\r\n\r\n /**\r\n * Function used to sort the values in a select in multiple mode.\r\n * Follows the same logic as `Array.prototype.sort`.\r\n */\r\n @Input() sortComparator: ((a: CuteOption, b: CuteOption, options: CuteOption[]) => number) | undefined;\r\n\r\n /** Whether the select is in an error state. */\r\n get errorState() { return this._errorStateTracker.errorState; }\r\n set errorState(value: boolean) {\r\n this._errorStateTracker.errorState = value;\r\n }\r\n\r\n /**\r\n * Width of the panel. If set to `auto`, the panel will match the trigger width.\r\n * If set to null or an empty string, the panel will grow to match the longest option's text.\r\n */\r\n @Input() panelWidth: string | number | null =\r\n this._defaultOptions && typeof this._defaultOptions.panelWidth !== 'undefined'\r\n ? this._defaultOptions.panelWidth\r\n : 'auto';\r\n\r\n /**\r\n * Height of the panel. If set to `auto`, _null_ or an empty string, the panel will display all options.\r\n * If height is not empty, its value is set as a maximum height of the panel with vertical scrolling set to `auto`.\r\n */\r\n @Input() panelHeight: string | number | null =\r\n this._defaultOptions && typeof this._defaultOptions.panelHeight !== 'undefined'\r\n ? this._defaultOptions.panelHeight\r\n : null;\r\n\r\n /**\r\n * By default, selecting an option with a `null` or `undefined` value will reset the select's\r\n * value. Enable this option if the reset behavior doesn't match your requirements and instead,\r\n * the nullable options should become selected. The value of this input can be controlled app-wide\r\n * using the `MAT_SELECT_CONFIG` injection token.\r\n */\r\n @Input({transform: booleanAttribute})\r\n canSelectNullableOptions: boolean = this._defaultOptions?.canSelectNullableOptions ?? false;\r\n\r\n /** Combined stream of all of the child options' change events. */\r\n readonly optionSelectionChanges: Observable<CuteOptionSelectionChange> = defer(() => {\r\n const options = this.options;\r\n\r\n if (options) {\r\n return options.changes.pipe(\r\n startWith(options),\r\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\r\n );\r\n }\r\n\r\n return this._ngZone.onStable.pipe(\r\n take(1),\r\n switchMap(() => this.optionSelectionChanges),\r\n );\r\n }) as Observable<CuteOptionSelectionChange>;\r\n\r\n /** Event emitted when the select panel has been toggled. */\r\n @Output() readonly openedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n /** Event emitted when the select has been opened. */\r\n @Output('opened') readonly _openedStream: Observable<void> = this.openedChange.pipe(\r\n filter(o => o),\r\n map(() => {}),\r\n );\r\n\r\n /** Event emitted when the select has been closed. */\r\n @Output('closed') readonly _closedStream: Observable<void> = this.openedChange.pipe(\r\n filter(o => !o),\r\n map(() => {}),\r\n );\r\n\r\n /** Event emitted when the selected value has been changed by the user. */\r\n @Output() readonly selectionChange = new EventEmitter<CuteSelectChange>();\r\n\r\n /**\r\n * Event that emits whenever the raw value of the select changes. This is here primarily\r\n * to facilitate the two-way binding for the `value` input.\r\n */\r\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const defaultErrorStateMatcher = inject(ErrorStateMatcher);\r\n const parentForm = inject(NgForm, {optional: true});\r\n const parentFormGroup = inject(FormGroupDirective, {optional: true});\r\n const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});\r\n\r\n if (this.ngControl) {\r\n // Note: we provide the value accessor through here, instead of\r\n // the `providers` to avoid running into a circular import.\r\n this.ngControl.valueAccessor = this;\r\n }\r\n\r\n // Note that we only want to set this when the defaults pass it in; otherwise it should\r\n // stay as `undefined` so that it falls back to the default in the key manager.\r\n if (this._defaultOptions?.typeaheadDebounceInterval != null) {\r\n this.typeaheadDebounceInterval = this._defaultOptions.typeaheadDebounceInterval;\r\n }\r\n\r\n this._errorStateTracker = new _ErrorStateTracker(\r\n defaultErrorStateMatcher,\r\n this.ngControl,\r\n parentFormGroup,\r\n parentForm,\r\n this.stateChanges,\r\n );\r\n this._scrollStrategy = this._scrollStrategyFactory();\r\n this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;\r\n\r\n // Force setter to be called in case id was not specified.\r\n this.id = this.id;\r\n }\r\n\r\n override ngOnInit() {\r\n super.ngOnInit();\r\n\r\n this._selectionModel = new SelectionModel<CuteOption>(this.multiple);\r\n this.stateChanges.next();\r\n\r\n // We need `distinctUntilChanged` here, because some browsers will\r\n // fire the animation end event twice for the same animation. See:\r\n // https://github.com/angular/angular/issues/24084\r\n this._panelDoneAnimatingStream\r\n .pipe(distinctUntilChanged(), takeUntil(this._destroy))\r\n .subscribe(() => this._panelDoneAnimating(this.panelOpen));\r\n\r\n this._viewportRuler\r\n .change()\r\n .pipe(takeUntil(this._destroy))\r\n .subscribe(() => {\r\n if (this.panelOpen) {\r\n this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n override ngAfterContentInit() {\r\n super.ngAfterContentInit();\r\n\r\n this._initKeyManager();\r\n\r\n this._selectionModel?.changed.pipe(takeUntil(this._destroy)).subscribe(event => {\r\n event.added.forEach(option => option.select());\r\n event.removed.forEach(option => option.deselect());\r\n });\r\n\r\n this.options?.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\r\n this._resetOptions();\r\n this._initializeSelection();\r\n });\r\n }\r\n\r\n ngDoCheck() {\r\n const newAriaLabelledby = this._getTriggerAriaLabelledby();\r\n const ngControl = this.ngControl;\r\n\r\n // We have to manage setting the `aria-labelledby` ourselves, because part of its value\r\n // is computed as a result of a content query which can cause this binding to trigger a\r\n // \"changed after checked\" error.\r\n if (newAriaLabelledby !== this._triggerAriaLabelledBy) {\r\n const element: HTMLElement = this._elementRef.nativeElement;\r\n this._triggerAriaLabelledBy = newAriaLabelledby;\r\n if (newAriaLabelledby) {\r\n element.setAttribute('aria-labelledby', newAriaLabelledby);\r\n } else {\r\n element.removeAttribute('aria-labelledby');\r\n }\r\n }\r\n\r\n if (ngControl) {\r\n // The disabled state might go out of sync if the form group is swapped out. See #17860.\r\n if (this._previousControl !== ngControl.control) {\r\n if (\r\n this._previousControl !== undefined &&\r\n ngControl.disabled !== null &&\r\n ngControl.disabled !== this.disabled\r\n ) {\r\n this.disabled = ngControl.disabled;\r\n }\r\n\r\n this._previousControl = ngControl.control;\r\n }\r\n\r\n this.updateErrorState();\r\n }\r\n }\r\n\r\n override ngOnChanges(changes: SimpleChanges) {\r\n super.ngOnChanges(changes);\r\n\r\n // Updating the disabled state is handled by the input, but we need to additionally let\r\n // the parent form field know to run change detection when the disabled state changes.\r\n if (changes['disabled'] || changes['userAriaDescribedBy']) {\r\n this.stateChanges.next();\r\n }\r\n\r\n if (changes['typeaheadDebounceInterval'] && this._keyManager) {\r\n this._keyManager.withTypeAhead(this.typeaheadDebounceInterval);\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n\r\n this._keyManager?.destroy();\r\n this._destroy.next();\r\n this._destroy.complete();\r\n this.stateChanges.complete();\r\n this._clearFromModal();\r\n }\r\n\r\n /** Toggles the overlay panel open or closed. */\r\n toggle(): void {\r\n this.panelOpen ? this.close() : this.open();\r\n }\r\n\r\n /** Opens the overlay panel. */\r\n open(): void {\r\n // It's important that we read this as late as possible, because doing so earlier will\r\n // return a different element since it's based on queries in the form field which may\r\n // not have run yet. Also, this needs to be assigned before we measure the overlay width.\r\n if (this._parentFormField) {\r\n this._preferredOverlayOrigin = this._parentFormField.getConnectedOverlayOrigin();\r\n }\r\n\r\n this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\r\n\r\n if (this._canOpen()) {\r\n this._applyModalPanelOwnership();\r\n\r\n this._panelOpen = true;\r\n this._keyManager?.withHorizontalOrientation(null);\r\n this._highlightCorrectOption();\r\n this.markForCheck();\r\n }\r\n // Required for the MDC form field to pick up when the overlay has been opened.\r\n this.stateChanges.next();\r\n }\r\n\r\n /**\r\n * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is\r\n * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options\r\n * panel. Track the modal we have changed so we can undo the changes on destroy.\r\n */\r\n private _trackedModal: Element | null = null;\r\n\r\n /**\r\n * If the autocomplete trigger is inside of an `aria-modal` element, connect\r\n * that modal to the options panel with `aria-owns`.\r\n *\r\n * For some browser + screen reader combinations, when navigation is inside\r\n * of an `aria-modal` element, the screen reader treats everything outside\r\n * of that modal as hidden or invisible.\r\n *\r\n * This causes a problem when the combobox trigger is _inside_ of a modal, because the\r\n * options panel is rendered _outside_ of that modal, preventing screen reader navigation\r\n * from reaching the panel.\r\n *\r\n * We can work around this issue by applying `aria-owns` to the modal with the `id` of\r\n * the options panel. This effectively communicates to assistive technology that the\r\n * options panel is part of the same interaction as the modal.\r\n *\r\n * At the time of this writing, this issue is present in VoiceOver.\r\n * See https://github.com/angular/components/issues/20694\r\n */\r\n private _applyModalPanelOwnership() {\r\n // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\r\n // the `LiveAnnouncer` and any other usages.\r\n //\r\n // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\r\n // section of the DOM we need to look through. This should cover all the cases we support, but\r\n // the selector can be expanded if it turns out to be too narrow.\r\n const modal = this._elementRef.nativeElement.closest(\r\n 'body > .cdk-overlay-container [aria-modal=\"true\"]',\r\n );\r\n\r\n if (!modal) {\r\n // Most commonly, the autocomplete trigger is not inside a modal.\r\n return;\r\n }\r\n\r\n const panelId = `${this.id}-panel`;\r\n\r\n if (this._trackedModal) {\r\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\r\n }\r\n\r\n addAriaReferencedId(modal, 'aria-owns', panelId);\r\n this._trackedModal = modal;\r\n }\r\n\r\n /** Clears the reference to the listbox overlay element from the modal it was added to. */\r\n private _clearFromModal() {\r\n if (!this._trackedModal) {\r\n // Most commonly, the autocomplete trigger is not used inside a modal.\r\n return;\r\n }\r\n\r\n const panelId = `${this.id}-panel`;\r\n\r\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\r\n this._trackedModal = null;\r\n }\r\n\r\n /** Closes the overlay panel and focuses the host element. */\r\n close(): void {\r\n if (this._panelOpen) {\r\n this._panelOpen = false;\r\n this._keyManager?.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\r\n this.markForCheck();\r\n this._onTouched();\r\n }\r\n\r\n this.focus();\r\n\r\n // Required for the MDC form field to pick up when the overlay has been closed.\r\n this.stateChanges.next();\r\n }\r\n\r\n /**\r\n * Sets the select' value. Part of the ControlValueAccessor interface\r\n * required to integrate with Angular core forms API.\r\n *\r\n * @param value New value to be written to the model.\r\n */\r\n writeValue(value: any): void {\r\n this._assignValue(value);\r\n }\r\n\r\n /** Whether the overlay panel is open. */\r\n get panelOpen(): boolean {\r\n return this._panelOpen;\r\n }\r\n\r\n /** The currently selected option. */\r\n get selected(): CuteOption | CuteOption[] {\r\n return this.multiple ? this._selectionModel?.selected || [] : this._selectionModel?.selected[0] !;\r\n }\r\n\r\n /** The value displayed in the trigger. */\r\n get triggerValue(): string {\r\n if (this.empty) {\r\n return '';\r\n }\r\n\r\n if (this._multiple) {\r\n const selectedOptions = this._selectionModel!.selected.map(option => option.viewValue);\r\n\r\n if (this._isRtl()) {\r\n selectedOptions.reverse();\r\n }\r\n\r\n // TODO(crisbeto): delimiter should be configurable for proper localization.\r\n return selectedOptions.join(', ');\r\n }\r\n\r\n return this._selectionModel!.selected[0].viewValue;\r\n }\r\n\r\n /** Refreshes the error state of the select. */\r\n updateErrorState() {\r\n this._errorStateTracker.updateErrorState();\r\n }\r\n\r\n /** Whether the element is in RTL mode. */\r\n _isRtl(): boolean {\r\n return this._dir ? this._dir.value === 'rtl' : false;\r\n }\r\n\r\n /** Handles all keydown events on the select. */\r\n _handleKeydown(event: KeyboardEvent): void {\r\n if (!this.disabled) {\r\n this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\r\n }\r\n }\r\n\r\n /** Handles keyboard events while the select is closed. */\r\n private _handleClosedKeydown(event: KeyboardEvent): void {\r\n const keyCode = event.keyCode;\r\n const isArrowKey =\r\n keyCode === DOWN_ARROW ||\r\n keyCode === UP_ARROW ||\r\n keyCode === LEFT_ARROW ||\r\n keyCode === RIGHT_ARROW;\r\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\r\n const manager = this._keyManager;\r\n\r\n // Open the select on ALT + arrow key to match the native <select>\r\n if (\r\n (manager && !manager.isTyping() && isOpenKey && !hasModifierKey(event)) ||\r\n ((this.multiple || event.altKey) && isArrowKey)\r\n ) {\r\n event.preventDefault(); // prevents the page from scrolling down when pressing space\r\n this.open();\r\n } else if (!this.multiple) {\r\n const previouslySelectedOption = this.selected;\r\n manager!.onKeydown(event);\r\n const selectedOption = this.selected;\r\n\r\n // Since the value has changed, we need to announce it ourselves.\r\n if (selectedOption && previouslySelectedOption !== selectedOption) {\r\n // We set a duration on the live announcement, because we want the live element to be\r\n // cleared after a while so that users can't navigate to it using the arrow keys.\r\n this._liveAnnouncer.announce((selectedOption as CuteOption).viewValue, 10000);\r\n }\r\n }\r\n }\r\n\r\n /** Handles keyboard events when the selected is open. */\r\n private _handleOpenKeydown(event: KeyboardEvent): void {\r\n const manager = this._keyManager;\r\n const keyCode = event.keyCode;\r\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\r\n const isTyping = manager!.isTyping();\r\n\r\n if (isArrowKey && event.altKey) {\r\n // Close the select on ALT + arrow key to match the native <select>\r\n event.preventDefault();\r\n this.close();\r\n // Don't do anything in this case if the user is typing,\r\n // because the typing sequence can include the space key.\r\n } else if (\r\n !isTyping &&\r\n (keyCode === ENTER || keyCode === SPACE) &&\r\n manager!.activeItem &&\r\n !hasModifierKey(event)\r\n ) {\r\n event.preventDefault();\r\n manager!.activeItem._selectViaInteraction();\r\n } else if (!isTyping && this._multiple && keyCode === A && event.ctrlKey) {\r\n event.preventDefault();\r\n const hasDeselectedOptions = this.options?.some(opt => !opt.disabled && !opt.selected);\r\n\r\n this.options?.forEach(option => {\r\n if (!option.disabled) {\r\n hasDeselectedOptions ? option.select() : option.deselect();\r\n }\r\n });\r\n } else {\r\n const previouslyFocusedIndex = manager!.activeItemIndex;\r\n\r\n manager!.onKeydown(event);\r\n\r\n if (\r\n this._multiple &&\r\n isArrowKey &&\r\n event.shiftKey &&\r\n manager!.activeItem &&\r\n manager!.activeItemIndex !== previouslyFocusedIndex\r\n ) {\r\n manager!.activeItem._selectViaInteraction();\r\n }\r\n }\r\n }\r\n\r\n _onFocus() {\r\n if (!this.disabled) {\r\n this._focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n /**\r\n * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\r\n * \"blur\" to the panel when it opens, causing a false positive.\r\n */\r\n _onBlur() {\r\n this._focused = false;\r\n this._keyManager?.cancelTypeahead();\r\n\r\n if (!this.disabled && !this.panelOpen) {\r\n this._onTouched();\r\n this.markForCheck();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n /**\r\n * Callback that is invoked when the overlay panel has been attached.\r\n */\r\n _onAttached(): void {\r\n this._overlayDir?.positionChange.pipe(take(1)).subscribe(() => {\r\n this._changeDetectorRef.detectChanges();\r\n this._positioningSettled();\r\n });\r\n }\r\n\r\n /** Returns the theme to be used on the panel. */\r\n _getPanelTheme(): string {\r\n return this._parentFormField ? `cute-${this._parentFormField.color}` : '';\r\n }\r\n\r\n /** Whether the select has a value. */\r\n get empty(): boolean {\r\n return !this._selectionModel || this._selectionModel.isEmpty();\r\n }\r\n\r\n private _initializeSelection(): void {\r\n // Defers setting the value to avoid the \"Expression\r\n // has changed after it was checked\" errors from Angular.\r\n Promise.resolve().then(() => {\r\n if (this.ngControl) {\r\n this._value = this.ngControl.value;\r\n }\r\n\r\n this._setSelectionByValue(this._value);\r\n this.stateChanges.next();\r\n });\r\n }\r\n\r\n /**\r\n * Sets the selected option based on a value. If no option can be\r\n * found with the designated value, the select trigger is cleared.\r\n */\r\n private _setSelectionByValue(value: any | any[]): void {\r\n this.options?.forEach(option => option.setInactiveStyles());\r\n this._selectionModel?.clear();\r\n\r\n if (this.multiple && value) {\r\n if (!Array.isArray(value) && isDevMode()) {\r\n throw getCuteSelectNonArrayValueError();\r\n }\r\n\r\n value.forEach((currentValue: any) => this._selectOptionByValue(currentValue));\r\n this._sortValues();\r\n } else {\r\n const correspondingOption = this._selectOptionByValue(value);\r\n\r\n // Shift focus to the active item. Note that we shouldn't do this in multiple\r\n // mode, because we don't know what option the user interacted with last.\r\n if (correspondingOption) {\r\n this._keyManager?.updateActiveItem(correspondingOption);\r\n } else if (!this.panelOpen) {\r\n // Otherwise, reset the highlighted option. Note that we only want to do this while\r\n // closed, because doing it while open can shift the user's focus unnecessarily.\r\n this._keyManager?.updateActiveItem(-1);\r\n }\r\n }\r\n\r\n this.markForCheck();\r\n }\r\n\r\n /**\r\n * Finds and selects and option based on its value.\r\n * @returns Option that has the corresponding value.\r\n */\r\n private _selectOptionByValue(value: any): CuteOption | undefined {\r\n const correspondingOption = this.options?.find((option: CuteOption) => {\r\n // Skip options that are already in the model. This allows us to handle cases\r\n // where the same primitive value is selected multiple times.\r\n if (this._selectionModel?.isSelected(option)) {\r\n return false;\r\n }\r\n\r\n try {\r\n // Treat null as a special reset value.\r\n return (option.value != null || this.canSelectNullableOptions) &&\r\n this._compareWith(option.value, value);\r\n } catch (error) {\r\n if (isDevMode()) {\r\n // Notify developers of errors in their comparator.\r\n console.warn(error);\r\n }\r\n return false;\r\n }\r\n });\r\n\r\n if (correspondingOption) {\r\n this._selectionModel?.select(correspondingOption);\r\n }\r\n\r\n return correspondingOption;\r\n }\r\n\r\n /** Assigns a specific value to the select. Returns whether the value has changed. */\r\n private _assignValue(newValue: any | any[]): boolean {\r\n // Always re-assign an array, because it might have been mutated.\r\n if (newValue !== this._value || (this._multiple && Array.isArray(newValue))) {\r\n if (this.options) {\r\n this._setSelectionByValue(newValue);\r\n }\r\n\r\n this._value = newValue;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n // `skipPredicate` determines if key manager should avoid putting a given option in the tab\r\n // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA\r\n // recommendation.\r\n //\r\n // Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\r\n // makes a few exceptions for compound widgets.\r\n //\r\n // From [Developing a Keyboard Interface](\r\n // https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\r\n // \"For the following composite widget elements, keep them focusable when disabled: Options in a\r\n // Listbox...\"\r\n //\r\n // The user can focus on disabled options using the keyboard, but the user cannot click disabled\r\n // options.\r\n private _skipPredicate = (option: CuteOption) => {\r\n if (this.panelOpen) {\r\n // Support keyboard focusing disabled options in an ARIA listbox.\r\n return false;\r\n }\r\n\r\n // When the panel is closed, skip over disabled options. Support options via the UP/DOWN arrow\r\n // keys on closed select. ARIA listbox interaction pattern is less relevant when the panel is\r\n // closed.\r\n return option.disabled;\r\n };\r\n\r\n /** Gets how wide the overlay panel should be. */\r\n private _getOverlayWidth(\r\n preferredOrigin: ElementRef<ElementRef> | CdkOverlayOrigin | undefined,\r\n ): string | number {\r\n if (this.panelWidth === 'auto') {\r\n const refToMeasure =\r\n preferredOrigin instanceof CdkOverlayOrigin\r\n ? preferredOrigin.elementRef\r\n : preferredOrigin || this._elementRef;\r\n return refToMeasure.nativeElement.getBoundingClientRect().width;\r\n }\r\n\r\n return this.panelWidth === null ? '' : this.panelWidth;\r\n }\r\n /** Syncs the parent state with the individual options. */\r\n _syncParentProperties(): void {\r\n if (this.options) {\r\n for (const option of this.options) {\r\n option.markForCheck();\r\n }\r\n }\r\n }\r\n\r\n /** Sets up a key manager to listen to keyboard events on the overlay panel. */\r\n private _initKeyManager() {\r\n this._keyManager = new ActiveDescendantKeyManager<CuteOption>(this.options!)\r\n .withTypeAhead(this.typeaheadDebounceInterval)\r\n .withVerticalOrientation()\r\n .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')\r\n .withHomeAndEnd()\r\n .withPageUpDown()\r\n .withAllowedModifierKeys(['shiftKey'])\r\n .skipPredicate(this._skipPredicate);\r\n\r\n this._keyManager.tabOut.subscribe(() => {\r\n if (this.panelOpen) {\r\n // Select the active item when tabbing away. This is consistent with how the native\r\n // select behaves. Note that we only want to do this in single selection mode.\r\n if (!this.multiple && this._keyManager?.activeItem) {\r\n this._keyManager.activeItem._selectViaInteraction();\r\n }\r\n\r\n // Restore focus to the trigger before closing. Ensures that the focus\r\n // position won't be lost if the user got focus into the overlay.\r\n this.focus();\r\n this.close();\r\n }\r\n });\r\n\r\n this._keyManager.change.subscribe(() => {\r\n if (this._panelOpen && this.panel) {\r\n this._scrollOptionIntoView(this._keyManager?.activeItemIndex || 0);\r\n } else if (!this._panelOpen && !this.multiple && this._keyManager?.activeItem) {\r\n this._keyManager.activeItem._selectViaInteraction();\r\n }\r\n });\r\n }\r\n\r\n /** Drops current option subscriptions and IDs and resets from scratch. */\r\n private _resetOptions(): void {\r\n const changedOrDestroyed = merge(this.options!.changes, this._destroy);\r\n\r\n this.optionSelectionChanges.pipe(takeUntil(changedOrDestroyed)).subscribe(event => {\r\n this._onSelect(event.source, event.isUserInput);\r\n\r\n if (event.isUserInput && !this.multiple && this._panelOpen) {\r\n this.close();\r\n this.focus();\r\n }\r\n });\r\n\r\n // Listen to changes in the internal state of the options and react accordingly.\r\n // Handles cases like the labels of the selected options changing.\r\n merge(...this.options!.map(option => option._stateChanges))\r\n .pipe(takeUntil(changedOrDestroyed))\r\n .subscribe(() => {\r\n // `_stateChanges` can fire as a result of a change in the label's DOM value which may\r\n // be the result of an expression changing. We have to use `detectChanges` in order\r\n // to avoid \"changed after checked\" errors (see #14793).\r\n this._changeDetectorRef.detectChanges();\r\n this.stateChanges.next();\r\n });\r\n }\r\n\r\n /** Invoked when an option is clicked. */\r\n private _onSelect(option: CuteOption, isUserInput: boolean): void {\r\n const wasSelected = this._selectionModel?.isSelected(option);\r\n\r\n if (!this.canSelectNullableOptions && option.value == null && !this._multiple) {\r\n option.deselect();\r\n this._selectionModel?.clear();\r\n\r\n if (this.value != null) {\r\n this._propagateChanges(option.value);\r\n }\r\n } else {\r\n if (wasSelected !== option.selected) {\r\n option.selected\r\n ? this._selectionModel?.select(option)\r\n : this._selectionModel?.deselect(option);\r\n }\r\n\r\n if (isUserInput) {\r\n this._keyManager?.setActiveItem(option);\r\n }\r\n\r\n if (this.multiple) {\r\n this._sortValues();\r\n\r\n if (isUserInput) {\r\n // In case the user selected the option with their mouse, we\r\n // want to restore focus back to the trigger, in order to\r\n // prevent the select keyboard controls from clashing with\r\n // the ones from `cute-option`.\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n if (wasSelected !== this._selectionModel?.isSelected(option)) {\r\n this._propagateChanges();\r\n }\r\n\r\n this.stateChanges.next();\r\n }\r\n\r\n /** Sorts the selected values in the selected based on their order in the panel. */\r\n private _sortValues() {\r\n if (this.multiple) {\r\n const options = this.options!.toArray();\r\n\r\n this._selectionModel?.sort((a, b) => {\r\n return this.sortComparator\r\n ? this.sortComparator(a, b, options)\r\n : options.indexOf(a) - options.indexOf(b);\r\n });\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n /** Emits change event to set the model value. */\r\n private _propagateChanges(fallbackValue?: any): void {\r\n let valueToEmit: any;\r\n\r\n if (this.multiple) {\r\n valueToEmit = (this.selected as CuteOption[]).map(option => option.value);\r\n } else {\r\n valueToEmit = this.selected ? (this.selected as CuteOption).value : fallbackValue;\r\n }\r\n\r\n this._value = valueToEmit;\r\n this.valueChange.emit(valueToEmit);\r\n this._onChange(valueToEmit);\r\n this.selectionChange.emit(this._getChangeEvent(valueToEmit));\r\n this.markForCheck();\r\n }\r\n\r\n /**\r\n * Highlights the selected item. If no option is selected, it will highlight\r\n * the first *enabled* option.\r\n */\r\n private _highlightCorrectOption(): void {\r\n if (this._keyManager) {\r\n if (this.empty) {\r\n // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\r\n // because it activates the first option that passes the skip predicate, rather than the\r\n // first *enabled* option.\r\n let firstEnabledOptionIndex = -1;\r\n for (let index = 0; index < this.options!.length; index++) {\r\n const option = this.options!.get(index)!;\r\n if (!option.disabled) {\r\n firstEnabledOptionIndex = index;\r\n break;\r\n }\r\n }\r\n\r\n this._keyManager.setActiveItem(firstEnabledOptionIndex);\r\n } else {\r\n this._keyManager.setActiveItem(this._selectionModel!.selected[0]);\r\n }\r\n }\r\n }\r\n\r\n /** Whether the panel is allowed to open. */\r\n protected _canOpen(): boolean {\r\n return !this._panelOpen && !this.disabled && this.options!.length > 0;\r\n }\r\n\r\n /** Focuses the select element. */\r\n override focus(origin?: FocusOrigin, options?: FocusOptions): void {\r\n //this._elementRef.nativeElement.focus(options);\r\n this.trigger?.nativeElement.focus(options);\r\n }\r\n\r\n /** Gets the aria-labelledby for the select panel. */\r\n _getPanelAriaLabelledby(): string | null {\r\n if (this.ariaLabel) {\r\n return null;\r\n }\r\n\r\n const labelId = this._parentFormField?.getLabelId() || null;\r\n const labelExpression = labelId ? labelId + ' ' : '';\r\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\r\n }\r\n\r\n /** Determines the `aria-activedescendant` to be set on the host. */\r\n protected _getAriaActiveDescendant(): string | null {\r\n if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\r\n return this._keyManager.activeItem.id || null;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /** Gets the aria-labelledby of the select component trigger. */\r\n private _getTriggerAriaLabelledby(): string | null {\r\n if (this.ariaLabel) {\r\n return null;\r\n }\r\n\r\n const labelId = this._parentFormField?.getLabelId();\r\n let value = (labelId ? labelId + ' ' : '') + this.inputId;\r\n\r\n if (this.ariaLabelledby) {\r\n value += ' ' + this.ariaLabelledby;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /** Called when the overlay panel is done animating. */\r\n protected _panelDoneAnimating(isOpen: boolean) {\r\n this.openedChange.emit(isOpen);\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n */\r\n setDescribedByIds(ids: string[]) {\r\n if (ids.length) {\r\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\r\n }\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n */\r\n onContainerClick() {\r\n this.focus();\r\n this.open();\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n */\r\n get shouldLabelFloat(): boolean {\r\n // Since the panel doesn't overlap the trigger, we\r\n // want the label to only float when there's a value.\r\n return this.panelOpen || !this.empty || (this.focused && !!this.placeholder);\r\n }\r\n}\r\n\r\n/**\r\n * Allows the user to customize the trigger that is displayed when the select has a value.\r\n */\r\n@Directive({\r\n selector: 'cute-select-trigger',\r\n providers: [{provide: CUTE_SELECT_TRIGGER, useExisting: CuteSelectTrigger}],\r\n standalone: true,\r\n})\r\nexport class CuteSelectTrigger {}\r\n","<div cdk-overlay-origin\r\n class=\"cute-select-trigger-wrapper\"\r\n [class.required]=\"required\"\r\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\r\n>\r\n\r\n @if (!customTrigger) {\r\n <input #trigger\r\n class=\"form-select cute-select-trigger__input\"\r\n [class.form-select-sm]=\"magnitude=='small'\"\r\n [class.form-select-lg]=\"magnitude=='large'\"\r\n [attr.id]=\"inputId\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n readonly\r\n [value]=\"triggerValue\"\r\n (click)=\"toggle()\"\r\n autocomplete=\"off\">\r\n } @else {\r\n <div #trigger\r\n class=\"form-select cute-select-trigger__custom\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [attr.id]=\"inputId\">\r\n <ng-content select=\"cute-select-trigger\"></ng-content>\r\n </div>\r\n }\r\n\r\n</div>\r\n\r\n<ng-template cdk-connected-overlay\r\n cdkConnectedOverlayHasBackdrop\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n [cdkConnectedOverlayPanelClass]=\"_overlayPanelClass\"\r\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\r\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"panelOpen\"\r\n [cdkConnectedOverlayPositions]=\"_positions\"\r\n [cdkConnectedOverlayWidth]=\"_overlayWidth!\"\r\n (backdropClick)=\"close()\"\r\n (attach)=\"_onAttached()\"\r\n (detach)=\"close()\"> <!-- cdkConnectedOverlayLockPosition -->\r\n <div #panel\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"cute-dropdown-overlay-content bg-body-tertiary shadow\"\r\n [style.max-height]=\"panelHeight || null\"\r\n [attr.id]=\"id + '-panel'\"\r\n [attr.aria-multiselectable]=\"multiple\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\r\n [ngClass]=\"panelClass\"\r\n [@transformPanel]=\"'showing'\"\r\n (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\"\r\n (keydown)=\"_handleKeydown($event)\">\r\n <div class=\"cute-dropdown-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!--<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>-->\r\n </div>\r\n</ng-template>\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {\r\n CUTE_SELECT_SCROLL_STRATEGY_PROVIDER,\r\n CuteSelect, CuteSelectTrigger\r\n} from \"./select.component\";\r\nimport {CuteOptgroup, CuteOption} from \"@cute-widgets/base/core/option\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteSelect,\r\n CuteSelectTrigger,\r\n CuteOptgroup,\r\n CuteOption,\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n providers: [\r\n CUTE_SELECT_SCROLL_STRATEGY_PROVIDER\r\n ],\r\n declarations: [],\r\n})\r\nexport class CuteSelectModule { }\r\n","/**\n * Generated b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1
+ {"version":3,"file":"cute-widgets-base-select.mjs","sources":["../../../../projects/cute-widgets/base/select/src/select-errors.ts","../../../../projects/cute-widgets/base/select/src/select.component.ts","../../../../projects/cute-widgets/base/select/src/select.component.html","../../../../projects/cute-widgets/base/select/src/select.module.ts","../../../../projects/cute-widgets/base/select/cute-widgets-base-select.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\n\r\n/**\r\n * Returns an exception to be thrown when attempting to change a select's `multiple` option\r\n * after initialization.\r\n */\r\nexport function getCuteSelectDynamicMultipleError(): Error {\r\n return Error('Cannot change `multiple` mode of select after initialization.');\r\n}\r\n\r\n/**\r\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\r\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\r\n * resetting the value.\r\n */\r\nexport function getCuteSelectNonArrayValueError(): Error {\r\n return Error('Value must be an array in multiple-selection mode.');\r\n}\r\n\r\n/**\r\n * Returns an exception to be thrown when assigning a non-function value to the comparator\r\n * used to determine if a value corresponds to an option. Note that whether the function\r\n * actually takes two values and returns a boolean is not checked.\r\n */\r\nexport function getCuteSelectNonFunctionValueError(): Error {\r\n return Error('`compareWith` must be a function.');\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {\r\n ActiveDescendantKeyManager,\r\n LiveAnnouncer,\r\n addAriaReferencedId,\r\n removeAriaReferencedId, FocusOrigin,\r\n} from '@angular/cdk/a11y';\r\nimport {Directionality} from '@angular/cdk/bidi';\r\nimport {SelectionModel} from '@angular/cdk/collections';\r\nimport {\r\n A,\r\n DOWN_ARROW,\r\n ENTER, ESCAPE,\r\n hasModifierKey,\r\n LEFT_ARROW,\r\n RIGHT_ARROW,\r\n SPACE,\r\n UP_ARROW,\r\n} from '@angular/cdk/keycodes';\r\nimport {\r\n CdkConnectedOverlay,\r\n CdkOverlayOrigin,\r\n ConnectedPosition, createRepositionScrollStrategy,\r\n ScrollStrategy,\r\n} from '@angular/cdk/overlay';\r\nimport {ViewportRuler} from '@angular/cdk/scrolling';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ContentChildren,\r\n Directive,\r\n DoCheck,\r\n ElementRef,\r\n EventEmitter,\r\n InjectionToken,\r\n Input,\r\n NgZone,\r\n Output,\r\n QueryList,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n inject,\r\n numberAttribute, isDevMode, HostAttributeToken, Injector,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n FormGroupDirective,\r\n NgControl,\r\n NgForm,\r\n Validators,\r\n} from '@angular/forms';\r\nimport {NgClass} from '@angular/common';\r\nimport {defer, merge, Observable, Subject} from 'rxjs';\r\nimport {\r\n filter,\r\n map,\r\n startWith,\r\n switchMap,\r\n take,\r\n takeUntil,\r\n} from 'rxjs/operators';\r\nimport {\r\n getCuteSelectDynamicMultipleError,\r\n getCuteSelectNonArrayValueError,\r\n getCuteSelectNonFunctionValueError,\r\n} from './select-errors';\r\nimport {\r\n CUTE_OPTION_PARENT_COMPONENT,\r\n _countGroupLabelsBeforeOption,\r\n _getOptionScrollPosition,\r\n CuteOption,\r\n CuteOptionSelectionChange,\r\n CUTE_OPTGROUP, CuteOptgroup,\r\n} from \"@cute-widgets/base/core/option\";\r\nimport {RelativeSize} from \"@cute-widgets/base/core/types\";\r\nimport {CuteFormField, CuteFormFieldControl, CUTE_FORM_FIELD} from '@cute-widgets/base/form-field';\r\nimport {_ErrorStateTracker, ErrorStateMatcher} from \"@cute-widgets/base/core/error\";\r\nimport {CuteInputDropdownControl} from \"@cute-widgets/base/abstract\";\r\nimport {_animationsDisabled} from '@cute-widgets/base/core';\r\nimport {_getEventTarget} from '@angular/cdk/platform';\r\n\r\nlet nextUniqueId = 0;\r\n\r\n/** Injection token that determines the scroll handling while a select is open. */\r\nexport const CUTE_SELECT_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\r\n 'cute-select-scroll-strategy',\r\n {\r\n providedIn: 'root',\r\n factory: () => {\r\n const injector = inject(Injector);\r\n return () => createRepositionScrollStrategy(injector);\r\n },\r\n },\r\n);\r\n\r\n/** Object that can be used to configure the default options for the select module. */\r\nexport interface CuteSelectConfig {\r\n /** Whether option centering should be disabled. */\r\n disableOptionCentering?: boolean;\r\n\r\n /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */\r\n typeaheadDebounceInterval?: number;\r\n\r\n /** Class or list of classes to be applied to the menu's overlay panel. */\r\n overlayPanelClass?: string | string[];\r\n\r\n /** Whether icon indicators should be hidden for single-selection. */\r\n hideSingleSelectionIndicator?: boolean;\r\n\r\n /**\r\n * Width of the panel. If set to `auto`, the panel will match the trigger width.\r\n * If set to _null_ or an empty string, the panel will grow to match the longest option's text.\r\n */\r\n panelWidth?: string | number | null;\r\n\r\n /**\r\n * Height of the panel. If set to `auto`, _null_ or an empty string, the panel will display all options.\r\n * If height is not empty, its value is set as a maximum height of the panel with vertical scrolling set to `auto`.\r\n */\r\n panelHeight?: string | number | null;\r\n\r\n /**\r\n * Whether nullable options can be selected by default.\r\n * See `CuteSelect.canSelectNullableOptions` for more information.\r\n */\r\n canSelectNullableOptions?: boolean;\r\n}\r\n\r\n/** Injection token that can be used to provide the default options the select module. */\r\nexport const CUTE_SELECT_CONFIG = new InjectionToken<CuteSelectConfig>('CUTE_SELECT_CONFIG');\r\n\r\n/**\r\n * Injection token that can be used to reference instances of `CuteSelectTrigger`. It serves as\r\n * an alternative token to the actual `CuteSelectTrigger` class which could cause unnecessary\r\n * retention of the class and its directive metadata.\r\n */\r\nexport const CUTE_SELECT_TRIGGER = new InjectionToken<CuteSelectTrigger>('CuteSelectTrigger');\r\n\r\n/** Change event object that is emitted when the select value has changed. */\r\nexport class CuteSelectChange {\r\n constructor(\r\n /** Reference to the select that emitted the change event. */\r\n public source: CuteSelect,\r\n /** Current value of the select that emitted the event. */\r\n public value: any,\r\n ) {}\r\n}\r\n\r\n@Component({\r\n selector: 'cute-select',\r\n exportAs: 'cuteSelect',\r\n templateUrl: './select.component.html',\r\n styleUrls: ['./select.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n 'class': 'cute-select',\r\n '[class.active]': 'focused',\r\n '[class.cute-select-disabled]': 'disabled',\r\n '[class.cute-select-invalid]': 'errorState',\r\n '[class.cute-select-required]': 'required',\r\n '[class.cute-select-empty]': 'empty',\r\n '[class.cute-select-multiple]': 'multiple',\r\n 'role': 'combobox',\r\n 'aria-autocomplete': 'none',\r\n 'aria-haspopup': 'listbox',\r\n '[attr.id]': 'id',\r\n '[attr.tabindex]': '-1', //'disabled ? -1 : tabIndex',\r\n '[attr.aria-controls]': 'panelOpen ? id + \"-panel\" : null',\r\n '[attr.aria-expanded]': 'panelOpen',\r\n '[attr.aria-label]': 'ariaLabel || null',\r\n '[attr.aria-required]': 'required',\r\n '[attr.aria-disabled]': 'disabled',\r\n '[attr.aria-invalid]': 'errorState',\r\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\r\n '(keydown)': '_handleKeydown($event)',\r\n '(focus)': '_onFocus()',\r\n '(blur)': '_onBlur()',\r\n //'ngSkipHydration': '',\r\n },\r\n providers: [\r\n { provide: CuteFormFieldControl, useExisting: CuteSelect },\r\n { provide: CUTE_OPTION_PARENT_COMPONENT, useExisting: CuteSelect },\r\n ],\r\n imports: [CdkOverlayOrigin, CdkConnectedOverlay, NgClass]\r\n})\r\nexport class CuteSelect extends CuteInputDropdownControl\r\n implements DoCheck, CuteFormFieldControl<any>\r\n{\r\n protected _viewportRuler = inject(ViewportRuler);\r\n protected _ngZone = inject(NgZone);\r\n private _dir = inject(Directionality, {optional: true});\r\n protected _parentFormField = inject<CuteFormField>(CUTE_FORM_FIELD, {optional: true});\r\n public ngControl = inject(NgControl, {self: true, optional: true})!;\r\n private _liveAnnouncer = inject(LiveAnnouncer);\r\n protected _defaultOptions = inject(CUTE_SELECT_CONFIG, {optional: true});\r\n protected _animationsDisabled = _animationsDisabled();\r\n private _initialized = new Subject<void>();\r\n private _cleanupDetach: (() => void) | undefined;\r\n\r\n /** All the defined select options. */\r\n @ContentChildren(CuteOption, {descendants: true}) options: QueryList<CuteOption> | undefined;\r\n\r\n // TODO(crisbeto): this is only necessary for the non-MDC select, but it's technically a\r\n // public API so we have to keep it. It should be deprecated and removed eventually.\r\n /** All of the defined groups of options. */\r\n @ContentChildren(CUTE_OPTGROUP, {descendants: true}) optionGroups: QueryList<CuteOptgroup> | undefined;\r\n\r\n /** User-supplied override of the trigger element. */\r\n @ContentChild(CUTE_SELECT_TRIGGER) customTrigger: CuteSelectTrigger | undefined;\r\n\r\n protected get bsColorVarName(): string {\r\n if (this.color) {\r\n if (this.color==\"link\") {\r\n return `--bs-${this.color}-color-rgb`;\r\n }\r\n return `--bs-${this.color}-rgb`;\r\n }\r\n return \"\";\r\n }\r\n\r\n /**\r\n * This position config ensures that the top \"start\" corner of the overlay\r\n * is aligned with the top \"start\" of the origin by default (overlapping\r\n * the trigger completely). If the panel cannot fit below the trigger, it\r\n * will fall back to a position above the trigger.\r\n */\r\n _positions: ConnectedPosition[] = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetY: 4,\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'bottom',\r\n overlayX: 'end',\r\n overlayY: 'top',\r\n offsetY: 4,\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetY: -4,\r\n //panelClass: 'cute-select-panel-above',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'end',\r\n overlayY: 'bottom',\r\n offsetY: -4,\r\n //panelClass: 'cute-select-panel-above',\r\n },\r\n ];\r\n\r\n /** Scrolls a particular option into the view. */\r\n _scrollOptionIntoView(index: number): void {\r\n const option = this.options?.toArray()[index];\r\n\r\n if (option && this.panel) {\r\n const panel: HTMLElement = this.panel.nativeElement;\r\n const content: HTMLElement = panel.children[0] as HTMLElement; // we place options on one level down in the DOM\r\n const labelCount = _countGroupLabelsBeforeOption(index, this.options!, this.optionGroups!);\r\n const element = option._getHostElement();\r\n\r\n if (index === 0 && labelCount === 1) {\r\n // If we've got one group label before the option, and we're at the top option,\r\n // scroll the list to the top. This is better UX than scrolling the list to the\r\n // top of the option, because it allows the user to read the top group's label.\r\n //panel.scrollTop = 0;\r\n content.scrollTop = 0;\r\n } else {\r\n /*\r\n panel.scrollTop = _getOptionScrollPosition(\r\n element.offsetTop,\r\n element.offsetHeight,\r\n panel.scrollTop,\r\n panel.offsetHeight,\r\n );\r\n */\r\n content.scrollTop = _getOptionScrollPosition(\r\n element.offsetTop,\r\n element.offsetHeight,\r\n content.scrollTop,\r\n content.offsetHeight,\r\n );\r\n }\r\n }\r\n }\r\n\r\n /** Generates unique identifier */\r\n protected override generateId(): string {\r\n return `cute-select-${nextUniqueId++}`;\r\n }\r\n\r\n /** Called when the panel has been opened and the overlay has settled on its final position. */\r\n private _positioningSettled() {\r\n this._scrollOptionIntoView(this._keyManager?.activeItemIndex || 0);\r\n }\r\n\r\n /** Creates a change event object that should be emitted by the select. */\r\n private _getChangeEvent(value: any) {\r\n return new CuteSelectChange(this, value);\r\n }\r\n\r\n /** Factory function used to create a scroll strategy for this select. */\r\n private _scrollStrategyFactory = inject(CUTE_SELECT_SCROLL_STRATEGY);\r\n\r\n /** Whether the overlay panel is open. */\r\n private _panelOpen = false;\r\n\r\n /** Comparison function to specify which option is displayed. Defaults to object equality. */\r\n private _compareWith = (o1: any, o2: any) => o1 === o2;\r\n\r\n /** Current `aria-labelledby` value for the select trigger. */\r\n private _triggerAriaLabelledBy: string | null = null;\r\n\r\n /**\r\n * Keeps track of the previous form control assigned to the select.\r\n * Used to detect if it has changed.\r\n */\r\n private _previousControl: AbstractControl | null | undefined;\r\n\r\n /** Emits whenever the component is destroyed. */\r\n protected readonly _destroy = new Subject<void>();\r\n\r\n /** Emits when the panel element is finished transforming in. */\r\n protected readonly _panelDoneAnimatingStream = new Subject<string>();\r\n\r\n /** Tracks the error state of the select. */\r\n private _errorStateTracker: _ErrorStateTracker;\r\n\r\n /** Disable the automatic labeling to avoid issues like #27241. */\r\n readonly disableAutomaticLabeling = true;\r\n\r\n /** Deals with the selection logic. */\r\n private _selectionModel: SelectionModel<CuteOption> | undefined;\r\n\r\n /** Manages keyboard events for options in the panel. */\r\n private _keyManager: ActiveDescendantKeyManager<CuteOption> | undefined;\r\n\r\n /** Ideal origin for the overlay panel. */\r\n protected _preferredOverlayOrigin: CdkOverlayOrigin | ElementRef | undefined;\r\n\r\n /** Width of the overlay panel. */\r\n protected _overlayWidth: string | number | undefined;\r\n\r\n /** Strategy that will be used to handle scrolling while the select panel is open. */\r\n protected _scrollStrategy: ScrollStrategy;\r\n\r\n protected _overlayPanelClass: string | string[] = this._defaultOptions?.overlayPanelClass || '';\r\n\r\n get expanded(): boolean { return this.panelOpen; }\r\n\r\n /** Whether the select is focused. */\r\n get focused(): boolean {\r\n return this._focused || this._panelOpen;\r\n }\r\n private _focused = false;\r\n\r\n /** A name for this control that can be used by `cute-form-field`. */\r\n controlType = 'cute-select';\r\n\r\n /** Implemented as part of CuteFormFieldControl. */\r\n get controlElementRef(): ElementRef { return this._elementRef; }\r\n\r\n /** Trigger that opens the select. */\r\n @ViewChild('trigger') trigger: ElementRef | undefined;\r\n\r\n /** Panel containing the select options. */\r\n @ViewChild('panel') panel: ElementRef | undefined;\r\n\r\n /** Overlay pane containing the options. */\r\n @ViewChild(CdkConnectedOverlay)\r\n protected _overlayDir: CdkConnectedOverlay | undefined;\r\n\r\n /** Implemented as part of CuteFormFieldControl. */\r\n @Input('aria-describedby') userAriaDescribedBy: string | undefined;\r\n\r\n /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */\r\n @Input() panelClass: string | string[] | Set<string> | {[key: string]: any} = \"\";\r\n\r\n /** Whether ripples in the select are disabled. */\r\n @Input({transform: booleanAttribute})\r\n disableRipple: boolean = false;\r\n\r\n /** Whether the checkmark indicator for single-selection options is hidden. */\r\n @Input({transform: booleanAttribute})\r\n get hideSingleSelectionIndicator(): boolean {\r\n return this._hideSingleSelectionIndicator;\r\n }\r\n set hideSingleSelectionIndicator(value: boolean) {\r\n this._hideSingleSelectionIndicator = value;\r\n this._syncParentProperties();\r\n }\r\n private _hideSingleSelectionIndicator: boolean =\r\n this._defaultOptions?.hideSingleSelectionIndicator ?? false;\r\n\r\n /** Placeholder to be shown if no value has been selected. */\r\n @Input()\r\n get placeholder(): string { return this._placeholder; }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = \"\";\r\n\r\n /** Whether the component is required. */\r\n override get required(): boolean {\r\n return super.required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\r\n }\r\n override set required(value: boolean) {\r\n super.required = value;\r\n this.stateChanges.next();\r\n }\r\n\r\n /** Whether the user should be allowed to select multiple options. */\r\n @Input({transform: booleanAttribute})\r\n get multiple(): boolean { return this._multiple; }\r\n set multiple(value: boolean) {\r\n if (this._selectionModel && isDevMode()) {\r\n throw getCuteSelectDynamicMultipleError();\r\n }\r\n this._multiple = value;\r\n }\r\n private _multiple: boolean = false;\r\n\r\n /** Whether to center the active option over the trigger. */\r\n @Input({transform: booleanAttribute})\r\n disableOptionCentering = this._defaultOptions?.disableOptionCentering ?? false;\r\n\r\n /**\r\n * Function to compare the option values with the selected values. The first argument\r\n * is a value from an option. The second is a value from the selection. A boolean\r\n * should be returned.\r\n */\r\n @Input()\r\n get compareWith() { return this._compareWith; }\r\n set compareWith(fn: (o1: any, o2: any) => boolean) {\r\n if (typeof fn !== 'function' && isDevMode()) {\r\n throw getCuteSelectNonFunctionValueError();\r\n }\r\n this._compareWith = fn;\r\n if (this._selectionModel) {\r\n // A different comparator means the selection could change.\r\n this._initializeSelection();\r\n }\r\n }\r\n\r\n /** Value of the select control. */\r\n @Input()\r\n get value(): any { return this._value; }\r\n set value(newValue: any) {\r\n const hasAssigned = this._assignValue(newValue);\r\n\r\n if (hasAssigned) {\r\n this._onChange(newValue);\r\n }\r\n }\r\n private _value: any;\r\n\r\n /** Object used to control when error messages are shown. */\r\n @Input()\r\n get errorStateMatcher() { return this._errorStateTracker.matcher; }\r\n set errorStateMatcher(value: ErrorStateMatcher) {\r\n this._errorStateTracker.matcher = value;\r\n }\r\n\r\n /** Relative size of the select control */\r\n @Input()\r\n magnitude: RelativeSize | undefined;\r\n\r\n /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */\r\n @Input({transform: numberAttribute})\r\n typeaheadDebounceInterval: number = 0;\r\n\r\n /**\r\n * Function used to sort the values in a select in multiple mode.\r\n * Follows the same logic as `Array.prototype.sort`.\r\n */\r\n @Input() sortComparator: ((a: CuteOption, b: CuteOption, options: CuteOption[]) => number) | undefined;\r\n\r\n /** Whether the select is in an error state. */\r\n get errorState() { return this._errorStateTracker.errorState; }\r\n set errorState(value: boolean) {\r\n this._errorStateTracker.errorState = value;\r\n }\r\n\r\n /**\r\n * Width of the panel. If set to `auto`, the panel will match the trigger width.\r\n * If set to null or an empty string, the panel will grow to match the longest option's text.\r\n */\r\n @Input() panelWidth: string | number | null =\r\n this._defaultOptions && typeof this._defaultOptions.panelWidth !== 'undefined'\r\n ? this._defaultOptions.panelWidth\r\n : 'auto';\r\n\r\n /**\r\n * Height of the panel. If set to `auto`, _null_ or an empty string, the panel will display all options.\r\n * If height is not empty, its value is set as a maximum height of the panel with vertical scrolling set to `auto`.\r\n */\r\n @Input() panelHeight: string | number | null =\r\n this._defaultOptions && typeof this._defaultOptions.panelHeight !== 'undefined'\r\n ? this._defaultOptions.panelHeight\r\n : null;\r\n\r\n /**\r\n * By default, selecting an option with a `null` or `undefined` value will reset the select's\r\n * value. Enable this option if the reset behavior doesn't match your requirements and instead,\r\n * the nullable options should become selected. The value of this input can be controlled app-wide\r\n * using the `CUTE_SELECT_CONFIG` injection token.\r\n */\r\n @Input({transform: booleanAttribute})\r\n canSelectNullableOptions: boolean = this._defaultOptions?.canSelectNullableOptions ?? false;\r\n\r\n /** Combined stream of all of the child options' change events. */\r\n readonly optionSelectionChanges: Observable<CuteOptionSelectionChange> = defer(() => {\r\n const options = this.options;\r\n\r\n if (options) {\r\n return options.changes.pipe(\r\n startWith(options),\r\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\r\n );\r\n }\r\n\r\n return this._ngZone.onStable.pipe(\r\n take(1),\r\n switchMap(() => this.optionSelectionChanges),\r\n );\r\n }) as Observable<CuteOptionSelectionChange>;\r\n\r\n /** Event emitted when the select panel has been toggled. */\r\n @Output() readonly openedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n /** Event emitted when the select has been opened. */\r\n @Output('opened') readonly _openedStream: Observable<void> = this.openedChange.pipe(\r\n filter(o => o),\r\n map(() => {}),\r\n );\r\n\r\n /** Event emitted when the select has been closed. */\r\n @Output('closed') readonly _closedStream: Observable<void> = this.openedChange.pipe(\r\n filter(o => !o),\r\n map(() => {}),\r\n );\r\n\r\n /** Event emitted when the selected value has been changed by the user. */\r\n @Output() readonly selectionChange = new EventEmitter<CuteSelectChange>();\r\n\r\n /**\r\n * Event that emits whenever the raw value of the select changes. This is here primarily\r\n * to facilitate the two-way binding for the `value` input.\r\n */\r\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const defaultErrorStateMatcher = inject(ErrorStateMatcher);\r\n const parentForm = inject(NgForm, {optional: true});\r\n const parentFormGroup = inject(FormGroupDirective, {optional: true});\r\n const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});\r\n\r\n if (this.ngControl) {\r\n // Note: we provide the value accessor through here, instead of\r\n // the `providers` to avoid running into a circular import.\r\n this.ngControl.valueAccessor = this;\r\n }\r\n\r\n // Note that we only want to set this when the defaults pass it in; otherwise it should\r\n // stay as `undefined` so that it falls back to the default in the key manager.\r\n if (this._defaultOptions?.typeaheadDebounceInterval != null) {\r\n this.typeaheadDebounceInterval = this._defaultOptions.typeaheadDebounceInterval;\r\n }\r\n\r\n this._errorStateTracker = new _ErrorStateTracker(\r\n defaultErrorStateMatcher,\r\n this.ngControl,\r\n parentFormGroup,\r\n parentForm,\r\n this.stateChanges,\r\n );\r\n this._scrollStrategy = this._scrollStrategyFactory();\r\n this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;\r\n\r\n // Force setter to be called in case id was not specified.\r\n this.id = this.id;\r\n }\r\n\r\n override ngOnInit() {\r\n super.ngOnInit();\r\n\r\n this._selectionModel = new SelectionModel<CuteOption>(this.multiple);\r\n this.stateChanges.next();\r\n this._viewportRuler\r\n .change()\r\n .pipe(takeUntil(this._destroy))\r\n .subscribe(() => {\r\n if (this.panelOpen) {\r\n this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n override ngAfterContentInit() {\r\n super.ngAfterContentInit();\r\n\r\n this._initialized.next();\r\n this._initialized.complete();\r\n\r\n this._initKeyManager();\r\n\r\n this._selectionModel?.changed.pipe(takeUntil(this._destroy)).subscribe(event => {\r\n event.added.forEach(option => option.select());\r\n event.removed.forEach(option => option.deselect());\r\n });\r\n\r\n this.options?.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\r\n this._resetOptions();\r\n this._initializeSelection();\r\n });\r\n }\r\n\r\n ngDoCheck() {\r\n const newAriaLabelledby = this._getTriggerAriaLabelledby();\r\n const ngControl = this.ngControl;\r\n\r\n // We have to manage setting the `aria-labelledby` ourselves, because part of its value\r\n // is computed as a result of a content query which can cause this binding to trigger a\r\n // \"changed after checked\" error.\r\n if (newAriaLabelledby !== this._triggerAriaLabelledBy) {\r\n const element: HTMLElement = this._elementRef.nativeElement;\r\n this._triggerAriaLabelledBy = newAriaLabelledby;\r\n if (newAriaLabelledby) {\r\n element.setAttribute('aria-labelledby', newAriaLabelledby);\r\n } else {\r\n element.removeAttribute('aria-labelledby');\r\n }\r\n }\r\n\r\n if (ngControl) {\r\n // The disabled state might go out of sync if the form group is swapped out. See #17860.\r\n if (this._previousControl !== ngControl.control) {\r\n if (\r\n this._previousControl !== undefined &&\r\n ngControl.disabled !== null &&\r\n ngControl.disabled !== this.disabled\r\n ) {\r\n this.disabled = ngControl.disabled;\r\n }\r\n\r\n this._previousControl = ngControl.control;\r\n }\r\n\r\n this.updateErrorState();\r\n }\r\n }\r\n\r\n override ngOnChanges(changes: SimpleChanges) {\r\n super.ngOnChanges(changes);\r\n\r\n // Updating the disabled state is handled by the input, but we need to additionally let\r\n // the parent form field know to run change detection when the disabled state changes.\r\n if (changes['disabled'] || changes['userAriaDescribedBy']) {\r\n this.stateChanges.next();\r\n }\r\n\r\n if (changes['typeaheadDebounceInterval'] && this._keyManager) {\r\n this._keyManager.withTypeAhead(this.typeaheadDebounceInterval);\r\n }\r\n }\r\n\r\n override ngOnDestroy() {\r\n super.ngOnDestroy();\r\n\r\n this._cleanupDetach?.();\r\n this._keyManager?.destroy();\r\n this._destroy.next();\r\n this._destroy.complete();\r\n this.stateChanges.complete();\r\n this._clearFromModal();\r\n }\r\n\r\n /** Toggles the overlay panel open or closed. */\r\n toggle(): void {\r\n this.panelOpen ? this.close() : this.open();\r\n }\r\n\r\n /** Opens the overlay panel. */\r\n open(): void {\r\n if (!this._canOpen()) {\r\n return;\r\n }\r\n\r\n // It's important that we read this as late as possible, because doing so earlier will\r\n // return a different element since it's based on queries in the form field which may\r\n // not have run yet. Also, this needs to be assigned before we measure the overlay width.\r\n if (this._parentFormField) {\r\n this._preferredOverlayOrigin = this._parentFormField.getConnectedOverlayOrigin();\r\n }\r\n\r\n this._cleanupDetach?.();\r\n this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\r\n this._applyModalPanelOwnership();\r\n this._panelOpen = true;\r\n this._overlayDir?.positionChange.pipe(take(1)).subscribe(() => {\r\n this._changeDetectorRef.detectChanges();\r\n this._positioningSettled();\r\n });\r\n this._overlayDir?.attachOverlay();\r\n this._keyManager?.withHorizontalOrientation(null);\r\n this._highlightCorrectOption();\r\n this.markForCheck();\r\n // Required for the MDC form field to pick up when the overlay has been opened.\r\n this.stateChanges.next();\r\n\r\n // Simulate the animation event before we moved away from `@angular/animations`.\r\n Promise.resolve().then(() => this.openedChange.emit(true));\r\n }\r\n\r\n /**\r\n * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is\r\n * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options\r\n * panel. Track the modal we have changed so we can undo the changes on destroy.\r\n */\r\n private _trackedModal: Element | null = null;\r\n\r\n /**\r\n * If the autocomplete trigger is inside of an `aria-modal` element, connect\r\n * that modal to the options panel with `aria-owns`.\r\n *\r\n * For some browser + screen reader combinations, when navigation is inside\r\n * of an `aria-modal` element, the screen reader treats everything outside\r\n * of that modal as hidden or invisible.\r\n *\r\n * This causes a problem when the combobox trigger is _inside_ of a modal, because the\r\n * options panel is rendered _outside_ of that modal, preventing screen reader navigation\r\n * from reaching the panel.\r\n *\r\n * We can work around this issue by applying `aria-owns` to the modal with the `id` of\r\n * the options panel. This effectively communicates to assistive technology that the\r\n * options panel is part of the same interaction as the modal.\r\n *\r\n * At the time of this writing, this issue is present in VoiceOver.\r\n * See https://github.com/angular/components/issues/20694\r\n */\r\n private _applyModalPanelOwnership() {\r\n // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\r\n // the `LiveAnnouncer` and any other usages.\r\n //\r\n // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\r\n // section of the DOM we need to look through. This should cover all the cases we support, but\r\n // the selector can be expanded if it turns out to be too narrow.\r\n const modal = this._elementRef.nativeElement.closest(\r\n 'body > .cdk-overlay-container [aria-modal=\"true\"]',\r\n );\r\n\r\n if (!modal) {\r\n // Most commonly, the autocomplete trigger is not inside a modal.\r\n return;\r\n }\r\n\r\n const panelId = `${this.id}-panel`;\r\n\r\n if (this._trackedModal) {\r\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\r\n }\r\n\r\n addAriaReferencedId(modal, 'aria-owns', panelId);\r\n this._trackedModal = modal;\r\n }\r\n\r\n /** Clears the reference to the listbox overlay element from the modal it was added to. */\r\n private _clearFromModal() {\r\n if (!this._trackedModal) {\r\n // Most commonly, the autocomplete trigger is not used inside a modal.\r\n return;\r\n }\r\n\r\n const panelId = `${this.id}-panel`;\r\n\r\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\r\n this._trackedModal = null;\r\n }\r\n\r\n /** Closes the overlay panel and focuses the host element. */\r\n close(): void {\r\n if (this._panelOpen) {\r\n this._panelOpen = false;\r\n this._exitAndDetach();\r\n this._keyManager?.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\r\n this.markForCheck();\r\n this._onTouched();\r\n // Required for the MDC form field to pick up when the overlay has been closed.\r\n this.stateChanges.next();\r\n\r\n // Simulate the animation event before we moved away from `@angular/animations`.\r\n Promise.resolve().then(() => this.openedChange.emit(false));\r\n }\r\n\r\n this.focus();\r\n\r\n // Required for the MDC form field to pick up when the overlay has been closed.\r\n this.stateChanges.next();\r\n }\r\n\r\n /** Triggers the exit animation and detaches the overlay at the end. */\r\n private _exitAndDetach() {\r\n if (this._animationsDisabled || !this.panel) {\r\n this._detachOverlay();\r\n return;\r\n }\r\n\r\n this._cleanupDetach?.();\r\n this._cleanupDetach = () => {\r\n cleanupEvent();\r\n clearTimeout(exitFallbackTimer);\r\n this._cleanupDetach = undefined;\r\n };\r\n\r\n const panel: HTMLElement = this.panel.nativeElement;\r\n const cleanupEvent = this._renderer.listen(panel, 'animationend', (event: AnimationEvent) => {\r\n if (event.animationName === '_cute-select-exit') {\r\n this._cleanupDetach?.();\r\n this._detachOverlay();\r\n }\r\n });\r\n\r\n // Since closing the overlay depends on the animation, we have a fallback in case the panel\r\n // doesn't animate. This can happen in some internal tests that do `* {animation: none}`.\r\n const exitFallbackTimer = setTimeout(() => {\r\n this._cleanupDetach?.();\r\n this._detachOverlay();\r\n }, 200);\r\n\r\n panel.classList.add('cute-select-panel-exit');\r\n }\r\n\r\n /** Detaches the current overlay directive. */\r\n private _detachOverlay() {\r\n this._overlayDir?.detachOverlay();\r\n // Some of the overlay detachment logic depends on change detection.\r\n // Mark for check to ensure that things get picked up in a timely manner.\r\n this.markForCheck();\r\n }\r\n\r\n /**\r\n * Sets the select' value. Part of the ControlValueAccessor interface\r\n * required to integrate with Angular core forms API.\r\n *\r\n * @param value New value to be written to the model.\r\n */\r\n writeValue(value: any): void {\r\n this._assignValue(value);\r\n }\r\n\r\n /** Whether the overlay panel is open. */\r\n get panelOpen(): boolean {\r\n return this._panelOpen;\r\n }\r\n\r\n /** The currently selected option. */\r\n get selected(): CuteOption | CuteOption[] {\r\n return this.multiple ? this._selectionModel?.selected || [] : this._selectionModel?.selected[0] !;\r\n }\r\n\r\n /** The value displayed in the trigger. */\r\n get triggerValue(): string {\r\n if (this.empty) {\r\n return '';\r\n }\r\n\r\n if (this._multiple) {\r\n const selectedOptions = this._selectionModel!.selected.map(option => option.viewValue);\r\n\r\n if (this._isRtl()) {\r\n selectedOptions.reverse();\r\n }\r\n\r\n // TODO(crisbeto): delimiter should be configurable for proper localization.\r\n return selectedOptions.join(', ');\r\n }\r\n\r\n return this._selectionModel!.selected[0].viewValue;\r\n }\r\n\r\n /** Refreshes the error state of the select. */\r\n updateErrorState() {\r\n this._errorStateTracker.updateErrorState();\r\n }\r\n\r\n /** Whether the element is in RTL mode. */\r\n _isRtl(): boolean {\r\n return this._dir ? this._dir.value === 'rtl' : false;\r\n }\r\n\r\n /** Handles all keydown events on the select. */\r\n _handleKeydown(event: KeyboardEvent): void {\r\n if (!this.disabled) {\r\n this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\r\n }\r\n }\r\n\r\n /** Handles keyboard events while the select is closed. */\r\n private _handleClosedKeydown(event: KeyboardEvent): void {\r\n const keyCode = event.keyCode;\r\n const isArrowKey =\r\n keyCode === DOWN_ARROW ||\r\n keyCode === UP_ARROW ||\r\n keyCode === LEFT_ARROW ||\r\n keyCode === RIGHT_ARROW;\r\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\r\n const manager = this._keyManager;\r\n\r\n // Open the select on ALT + arrow key to match the native <select>\r\n if (\r\n (manager && !manager.isTyping() && isOpenKey && !hasModifierKey(event)) ||\r\n ((this.multiple || event.altKey) && isArrowKey)\r\n ) {\r\n event.preventDefault(); // prevents the page from scrolling down when pressing space\r\n this.open();\r\n } else if (!this.multiple) {\r\n const previouslySelectedOption = this.selected;\r\n manager!.onKeydown(event);\r\n const selectedOption = this.selected;\r\n\r\n // Since the value has changed, we need to announce it ourselves.\r\n if (selectedOption && previouslySelectedOption !== selectedOption) {\r\n // We set a duration on the live announcement, because we want the live element to be\r\n // cleared after a while so that users can't navigate to it using the arrow keys.\r\n this._liveAnnouncer.announce((selectedOption as CuteOption).viewValue, 10000);\r\n }\r\n }\r\n }\r\n\r\n /** Handles keyboard events when the selected is open. */\r\n private _handleOpenKeydown(event: KeyboardEvent): void {\r\n const manager = this._keyManager;\r\n const keyCode = event.keyCode;\r\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\r\n const isTyping = manager!.isTyping();\r\n\r\n if (isArrowKey && event.altKey) {\r\n // Close the select on ALT + arrow key to match the native <select>\r\n event.preventDefault();\r\n this.close();\r\n // Don't do anything in this case if the user is typing,\r\n // because the typing sequence can include the space key.\r\n } else if (\r\n !isTyping &&\r\n (keyCode === ENTER || keyCode === SPACE) &&\r\n manager!.activeItem &&\r\n !hasModifierKey(event)\r\n ) {\r\n event.preventDefault();\r\n manager!.activeItem._selectViaInteraction();\r\n } else if (!isTyping && this._multiple && keyCode === A && event.ctrlKey) {\r\n event.preventDefault();\r\n const hasDeselectedOptions = this.options?.some(opt => !opt.disabled && !opt.selected);\r\n\r\n this.options?.forEach(option => {\r\n if (!option.disabled) {\r\n hasDeselectedOptions ? option.select() : option.deselect();\r\n }\r\n });\r\n } else {\r\n const previouslyFocusedIndex = manager!.activeItemIndex;\r\n\r\n manager!.onKeydown(event);\r\n\r\n if (\r\n this._multiple &&\r\n isArrowKey &&\r\n event.shiftKey &&\r\n manager!.activeItem &&\r\n manager!.activeItemIndex !== previouslyFocusedIndex\r\n ) {\r\n manager!.activeItem._selectViaInteraction();\r\n }\r\n }\r\n }\r\n\r\n /** Handles keyboard events coming from the overlay. */\r\n protected _handleOverlayKeydown(event: KeyboardEvent): void {\r\n // TODO(crisbeto): prior to #30363 this was being handled inside the overlay directive, but we\r\n // need control over the animation timing so we do it manually. We should remove the `keydown`\r\n // listener from `.cute-select-panel` and handle all the events here. That may cause\r\n // further test breakages so it's left for a follow-up.\r\n if (event.keyCode === ESCAPE && !hasModifierKey(event)) {\r\n event.preventDefault();\r\n this.close();\r\n }\r\n }\r\n\r\n _onFocus() {\r\n if (!this.disabled) {\r\n this._focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n /**\r\n * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\r\n * \"blur\" to the panel when it opens, causing a false positive.\r\n */\r\n _onBlur() {\r\n this._focused = false;\r\n this._keyManager?.cancelTypeahead();\r\n\r\n if (!this.disabled && !this.panelOpen) {\r\n this._onTouched();\r\n this.markForCheck();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n /** Returns the theme to be used on the panel. */\r\n _getPanelTheme(): string {\r\n return this._parentFormField ? `cute-${this._parentFormField.color}` : '';\r\n }\r\n\r\n /** Whether the select has a value. */\r\n get empty(): boolean {\r\n return !this._selectionModel || this._selectionModel.isEmpty();\r\n }\r\n\r\n private _initializeSelection(): void {\r\n // Defers setting the value to avoid the \"Expression\r\n // has changed after it was checked\" errors from Angular.\r\n Promise.resolve().then(() => {\r\n if (this.ngControl) {\r\n this._value = this.ngControl.value;\r\n }\r\n\r\n this._setSelectionByValue(this._value);\r\n this.stateChanges.next();\r\n });\r\n }\r\n\r\n /**\r\n * Sets the selected option based on a value. If no option can be\r\n * found with the designated value, the select trigger is cleared.\r\n */\r\n private _setSelectionByValue(value: any | any[]): void {\r\n this.options?.forEach(option => option.setInactiveStyles());\r\n this._selectionModel?.clear();\r\n\r\n if (this.multiple && value) {\r\n if (!Array.isArray(value) && isDevMode()) {\r\n throw getCuteSelectNonArrayValueError();\r\n }\r\n\r\n value.forEach((currentValue: any) => this._selectOptionByValue(currentValue));\r\n this._sortValues();\r\n } else {\r\n const correspondingOption = this._selectOptionByValue(value);\r\n\r\n // Shift focus to the active item. Note that we shouldn't do this in multiple\r\n // mode, because we don't know what option the user interacted with last.\r\n if (correspondingOption) {\r\n this._keyManager?.updateActiveItem(correspondingOption);\r\n } else if (!this.panelOpen) {\r\n // Otherwise, reset the highlighted option. Note that we only want to do this while\r\n // closed, because doing it while open can shift the user's focus unnecessarily.\r\n this._keyManager?.updateActiveItem(-1);\r\n }\r\n }\r\n\r\n this.markForCheck();\r\n }\r\n\r\n /**\r\n * Finds and selects and option based on its value.\r\n * @returns Option that has the corresponding value.\r\n */\r\n private _selectOptionByValue(value: any): CuteOption | undefined {\r\n const correspondingOption = this.options?.find((option: CuteOption) => {\r\n // Skip options that are already in the model. This allows us to handle cases\r\n // where the same primitive value is selected multiple times.\r\n if (this._selectionModel?.isSelected(option)) {\r\n return false;\r\n }\r\n\r\n try {\r\n // Treat null as a special reset value.\r\n return (option.value != null || this.canSelectNullableOptions) &&\r\n this._compareWith(option.value, value);\r\n } catch (error) {\r\n if (isDevMode()) {\r\n // Notify developers of errors in their comparator.\r\n console.warn(error);\r\n }\r\n return false;\r\n }\r\n });\r\n\r\n if (correspondingOption) {\r\n this._selectionModel?.select(correspondingOption);\r\n }\r\n\r\n return correspondingOption;\r\n }\r\n\r\n /** Assigns a specific value to the select. Returns whether the value has changed. */\r\n private _assignValue(newValue: any | any[]): boolean {\r\n // Always re-assign an array, because it might have been mutated.\r\n if (newValue !== this._value || (this._multiple && Array.isArray(newValue))) {\r\n if (this.options) {\r\n this._setSelectionByValue(newValue);\r\n }\r\n\r\n this._value = newValue;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n // `skipPredicate` determines if key manager should avoid putting a given option in the tab\r\n // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA\r\n // recommendation.\r\n //\r\n // Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\r\n // makes a few exceptions for compound widgets.\r\n //\r\n // From [Developing a Keyboard Interface](\r\n // https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\r\n // \"For the following composite widget elements, keep them focusable when disabled: Options in a\r\n // Listbox...\"\r\n //\r\n // The user can focus on disabled options using the keyboard, but the user cannot click disabled\r\n // options.\r\n private _skipPredicate = (option: CuteOption) => {\r\n if (this.panelOpen) {\r\n // Support keyboard focusing disabled options in an ARIA listbox.\r\n return false;\r\n }\r\n\r\n // When the panel is closed, skip over disabled options. Support options via the UP/DOWN arrow\r\n // keys on closed select. ARIA listbox interaction pattern is less relevant when the panel is\r\n // closed.\r\n return option.disabled;\r\n };\r\n\r\n /** Gets how wide the overlay panel should be. */\r\n private _getOverlayWidth(\r\n preferredOrigin: ElementRef<ElementRef> | CdkOverlayOrigin | undefined,\r\n ): string | number {\r\n if (this.panelWidth === 'auto') {\r\n const refToMeasure =\r\n preferredOrigin instanceof CdkOverlayOrigin\r\n ? preferredOrigin.elementRef\r\n : preferredOrigin || this._elementRef;\r\n return refToMeasure.nativeElement.getBoundingClientRect().width;\r\n }\r\n\r\n return this.panelWidth === null ? '' : this.panelWidth;\r\n }\r\n /** Syncs the parent state with the individual options. */\r\n _syncParentProperties(): void {\r\n if (this.options) {\r\n for (const option of this.options) {\r\n option.markForCheck();\r\n }\r\n }\r\n }\r\n\r\n /** Sets up a key manager to listen to keyboard events on the overlay panel. */\r\n private _initKeyManager() {\r\n this._keyManager = new ActiveDescendantKeyManager<CuteOption>(this.options!)\r\n .withTypeAhead(this.typeaheadDebounceInterval)\r\n .withVerticalOrientation()\r\n .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')\r\n .withHomeAndEnd()\r\n .withPageUpDown()\r\n .withAllowedModifierKeys(['shiftKey'])\r\n .skipPredicate(this._skipPredicate);\r\n\r\n this._keyManager.tabOut.subscribe(() => {\r\n if (this.panelOpen) {\r\n // Select the active item when tabbing away. This is consistent with how the native\r\n // select behaves. Note that we only want to do this in single selection mode.\r\n if (!this.multiple && this._keyManager?.activeItem) {\r\n this._keyManager.activeItem._selectViaInteraction();\r\n }\r\n\r\n // Restore focus to the trigger before closing. Ensures that the focus\r\n // position won't be lost if the user got focus into the overlay.\r\n this.focus();\r\n this.close();\r\n }\r\n });\r\n\r\n this._keyManager.change.subscribe(() => {\r\n if (this._panelOpen && this.panel) {\r\n this._scrollOptionIntoView(this._keyManager?.activeItemIndex || 0);\r\n } else if (!this._panelOpen && !this.multiple && this._keyManager?.activeItem) {\r\n this._keyManager.activeItem._selectViaInteraction();\r\n }\r\n });\r\n }\r\n\r\n /** Drops current option subscriptions and IDs and resets from scratch. */\r\n private _resetOptions(): void {\r\n const changedOrDestroyed = merge(this.options!.changes, this._destroy);\r\n\r\n this.optionSelectionChanges.pipe(takeUntil(changedOrDestroyed)).subscribe(event => {\r\n this._onSelect(event.source, event.isUserInput);\r\n\r\n if (event.isUserInput && !this.multiple && this._panelOpen) {\r\n this.close();\r\n this.focus();\r\n }\r\n });\r\n\r\n // Listen to changes in the internal state of the options and react accordingly.\r\n // Handles cases like the labels of the selected options changing.\r\n merge(...this.options!.map(option => option._stateChanges))\r\n .pipe(takeUntil(changedOrDestroyed))\r\n .subscribe(() => {\r\n // `_stateChanges` can fire as a result of a change in the label's DOM value which may\r\n // be the result of an expression changing. We have to use `detectChanges` in order\r\n // to avoid \"changed after checked\" errors (see #14793).\r\n this._changeDetectorRef.detectChanges();\r\n this.stateChanges.next();\r\n });\r\n }\r\n\r\n /** Invoked when an option is clicked. */\r\n private _onSelect(option: CuteOption, isUserInput: boolean): void {\r\n const wasSelected = this._selectionModel?.isSelected(option);\r\n\r\n if (!this.canSelectNullableOptions && option.value == null && !this._multiple) {\r\n option.deselect();\r\n this._selectionModel?.clear();\r\n\r\n if (this.value != null) {\r\n this._propagateChanges(option.value);\r\n }\r\n } else {\r\n if (wasSelected !== option.selected) {\r\n option.selected\r\n ? this._selectionModel?.select(option)\r\n : this._selectionModel?.deselect(option);\r\n }\r\n\r\n if (isUserInput) {\r\n this._keyManager?.setActiveItem(option);\r\n }\r\n\r\n if (this.multiple) {\r\n this._sortValues();\r\n\r\n if (isUserInput) {\r\n // In case the user selected the option with their mouse, we\r\n // want to restore focus back to the trigger, in order to\r\n // prevent the select keyboard controls from clashing with\r\n // the ones from `cute-option`.\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n if (wasSelected !== this._selectionModel?.isSelected(option)) {\r\n this._propagateChanges();\r\n }\r\n\r\n this.stateChanges.next();\r\n }\r\n\r\n /** Sorts the selected values in the selected based on their order in the panel. */\r\n private _sortValues() {\r\n if (this.multiple) {\r\n const options = this.options!.toArray();\r\n\r\n this._selectionModel?.sort((a, b) => {\r\n return this.sortComparator\r\n ? this.sortComparator(a, b, options)\r\n : options.indexOf(a) - options.indexOf(b);\r\n });\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n /** Emits change event to set the model value. */\r\n private _propagateChanges(fallbackValue?: any): void {\r\n let valueToEmit: any;\r\n\r\n if (this.multiple) {\r\n valueToEmit = (this.selected as CuteOption[]).map(option => option.value);\r\n } else {\r\n valueToEmit = this.selected ? (this.selected as CuteOption).value : fallbackValue;\r\n }\r\n\r\n this._value = valueToEmit;\r\n this.valueChange.emit(valueToEmit);\r\n this._onChange(valueToEmit);\r\n this.selectionChange.emit(this._getChangeEvent(valueToEmit));\r\n this.markForCheck();\r\n }\r\n\r\n /**\r\n * Highlights the selected item. If no option is selected, it will highlight\r\n * the first *enabled* option.\r\n */\r\n private _highlightCorrectOption(): void {\r\n if (this._keyManager) {\r\n if (this.empty) {\r\n // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\r\n // because it activates the first option that passes the skip predicate, rather than the\r\n // first *enabled* option.\r\n let firstEnabledOptionIndex = -1;\r\n for (let index = 0; index < this.options!.length; index++) {\r\n const option = this.options!.get(index)!;\r\n if (!option.disabled) {\r\n firstEnabledOptionIndex = index;\r\n break;\r\n }\r\n }\r\n\r\n this._keyManager.setActiveItem(firstEnabledOptionIndex);\r\n } else {\r\n this._keyManager.setActiveItem(this._selectionModel!.selected[0]);\r\n }\r\n }\r\n }\r\n\r\n /** Whether the panel is allowed to open. */\r\n protected _canOpen(): boolean {\r\n return !this._panelOpen && !this.disabled && this.options!.length > 0;\r\n }\r\n\r\n /** Focuses the select element. */\r\n override focus(origin?: FocusOrigin, options?: FocusOptions): void {\r\n //this._elementRef.nativeElement.focus(options);\r\n this.trigger?.nativeElement.focus(options);\r\n }\r\n\r\n /** Gets the aria-labelledby for the select panel. */\r\n _getPanelAriaLabelledby(): string | null {\r\n if (this.ariaLabel) {\r\n return null;\r\n }\r\n\r\n const labelId = this._parentFormField?.getLabelId() || null;\r\n const labelExpression = labelId ? labelId + ' ' : '';\r\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\r\n }\r\n\r\n /** Determines the `aria-activedescendant` to be set on the host. */\r\n protected _getAriaActiveDescendant(): string | null {\r\n if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\r\n return this._keyManager.activeItem.id || null;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /** Gets the aria-labelledby of the select component trigger. */\r\n private _getTriggerAriaLabelledby(): string | null {\r\n if (this.ariaLabel) {\r\n return null;\r\n }\r\n\r\n const labelId = this._parentFormField?.getLabelId();\r\n let value = (labelId ? labelId + ' ' : '') + this.inputId;\r\n\r\n if (this.ariaLabelledby) {\r\n value += ' ' + this.ariaLabelledby;\r\n }\r\n\r\n // The value should not be used for the trigger's aria-labelledby,\r\n // but this currently \"breaks\" accessibility tests since they complain\r\n // there is no aria-labelledby. This is because they are not setting an\r\n // appropriate label on the form field or select.\r\n // TODO: remove this conditional after fixing clients by ensuring their\r\n // selects have a label applied.\r\n if (!value) {\r\n //value = this._valueId;\r\n value = this.inputId;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n * @docs-private\r\n */\r\n get describedByIds(): string[] {\r\n const element = this._elementRef.nativeElement;\r\n const existingDescribedBy = element.getAttribute('aria-describedby');\r\n\r\n return existingDescribedBy?.split(' ') || [];\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n */\r\n setDescribedByIds(ids: string[]) {\r\n if (ids.length) {\r\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\r\n }\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n */\r\n onContainerClick(event: MouseEvent) {\r\n const target = _getEventTarget(event) as HTMLElement | null;\r\n\r\n // Since the overlay is inside the form field, this handler can fire for interactions\r\n // with the container. Note that while it's redundant to select both for the popover\r\n // and select panel, we need to do it because it tests the clicks can occur after\r\n // the panel was detached from the popover.\r\n if (\r\n target &&\r\n (target.tagName === 'CUTE-OPTION' ||\r\n target.classList.contains('cdk-overlay-backdrop') ||\r\n target.closest('.cute-select-panel'))\r\n ) {\r\n return;\r\n }\r\n\r\n this.focus();\r\n this.open();\r\n }\r\n\r\n /**\r\n * Implemented as part of CuteFormFieldControl.\r\n */\r\n get shouldLabelFloat(): boolean {\r\n // Since the panel doesn't overlap the trigger, we\r\n // want the label to only float when there's a value.\r\n return this.panelOpen || !this.empty || (this.focused && !!this.placeholder);\r\n }\r\n\r\n /** `input` element gets focus. */\r\n protected onInputFocus(event: FocusEvent) {\r\n const elem = event.target as HTMLInputElement;\r\n // CWT: disable auto select input text\r\n elem.selectionStart = elem.selectionEnd;\r\n }\r\n}\r\n\r\n/**\r\n * Allows the user to customize the trigger that is displayed when the select has a value.\r\n */\r\n@Directive({\r\n selector: 'cute-select-trigger',\r\n providers: [{provide: CUTE_SELECT_TRIGGER, useExisting: CuteSelectTrigger}],\r\n standalone: true,\r\n})\r\nexport class CuteSelectTrigger {}\r\n","<div cdk-overlay-origin\r\n class=\"cute-select-trigger-wrapper\"\r\n [class.required]=\"required\"\r\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\r\n>\r\n\r\n @if (!customTrigger) {\r\n <input #trigger\r\n class=\"form-select cute-select-trigger__input\"\r\n [class.form-select-sm]=\"magnitude=='small'\"\r\n [class.form-select-lg]=\"magnitude=='large'\"\r\n [style.--bs-focus-ring-color]='color? \"rgba(var(\"+bsColorVarName+\"), var(--bs-focus-ring-opacity))\" : null'\r\n [attr.id]=\"inputId\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n readonly\r\n [value]=\"triggerValue\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onInputFocus($event)\"\r\n autocomplete=\"off\"\r\n >\r\n <!-- Prevents selection -->\r\n <!-- (mousedown)=\"$event.preventDefault()\"-->\r\n } @else {\r\n <div #trigger\r\n class=\"form-select cute-select-trigger__custom\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\r\n [attr.id]=\"inputId\">\r\n <ng-content select=\"cute-select-trigger\"></ng-content>\r\n </div>\r\n }\r\n\r\n</div>\r\n\r\n<ng-template cdk-connected-overlay\r\n cdkConnectedOverlayHasBackdrop\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n [cdkConnectedOverlayDisableClose]=\"true\"\r\n [cdkConnectedOverlayPanelClass]=\"_overlayPanelClass\"\r\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\r\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"panelOpen\"\r\n [cdkConnectedOverlayPositions]=\"_positions\"\r\n [cdkConnectedOverlayWidth]=\"_overlayWidth!\"\r\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\r\n (backdropClick)=\"close()\"\r\n (overlayKeydown)=\"_handleOverlayKeydown($event)\"\r\n (detach)=\"close()\"> <!-- cdkConnectedOverlayLockPosition -->\r\n <div #panel\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"cute-dropdown-overlay-content bg-body-tertiary shadow\"\r\n [class.cute-select-panel-animations-enabled]=\"!_animationsDisabled\"\r\n [style.max-height]=\"panelHeight || null\"\r\n [attr.id]=\"id + '-panel'\"\r\n [attr.aria-multiselectable]=\"multiple\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby()\"\r\n [ngClass]=\"panelClass\"\r\n (keydown)=\"_handleKeydown($event)\">\r\n <div class=\"cute-dropdown-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!--<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>-->\r\n </div>\r\n</ng-template>\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {CuteSelect, CuteSelectTrigger} from \"./select.component\";\r\nimport {CuteOptgroup, CuteOption} from \"@cute-widgets/base/core/option\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteSelect,\r\n CuteSelectTrigger,\r\n CuteOptgroup,\r\n CuteOption,\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteSelectModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;AAUG;AAEH;;;AAGG;SACa,iCAAiC,GAAA;AAC/C,IAAA,OAAO,KAAK,CAAC,+DAA+D,CAAC;AAC/E;AAEA;;;;AAIG;SACa,+BAA+B,GAAA;AAC7C,IAAA,OAAO,KAAK,CAAC,oDAAoD,CAAC;AACpE;AAEA;;;;AAIG;SACa,kCAAkC,GAAA;AAChD,IAAA,OAAO,KAAK,CAAC,mCAAmC,CAAC;AACnD;;ACpCA;;;;;;;;;;AAUG;AAoFH,IAAI,YAAY,GAAG,CAAC;AAEpB;MACa,2BAA2B,GAAG,IAAI,cAAc,CAC3D,6BAA6B,EAC7B;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACjC,QAAA,OAAO,MAAM,8BAA8B,CAAC,QAAQ,CAAC;IACvD,CAAC;AACF,CAAA;AAoCH;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAmB,oBAAoB;AAE3F;;;;AAIG;MACU,mBAAmB,GAAG,IAAI,cAAc,CAAoB,mBAAmB;AAE5F;MACa,gBAAgB,CAAA;AAC3B,IAAA,WAAA;;IAES,MAAkB;;IAElB,KAAU,EAAA;QAFV,IAAA,CAAA,MAAM,GAAN,MAAM;QAEN,IAAA,CAAA,KAAK,GAAL,KAAK;IACX;AACJ;AAwCK,MAAO,UAAW,SAAQ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UAAU;YACV,iBAAiB;YACjB,YAAY;AACZ,YAAA,UAAU,aAHV,UAAU;YACV,iBAAiB;YACjB,YAAY;YACZ,UAAU,CAAA,EAAA,CAAA,CAAA;gHAQC,gBAAgB,EAAA,OAAA,EAAA,CAJjB,YAAY,EALtB,YAAY;YACZ,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAQC,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,CAAC;AACjC,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACxBD;;AAEG;;;;"}
@@ -1,7 +1,6 @@
1
1
  var name = "@cute-widgets/base";
2
- var version = "20.0.1";
2
+ var version = "20.0.2";
3
3
  var license = "Apache-2.0";
4
- var homepage = "https://github.com/cute-widgets/base#README.md";
5
4
  var repository = {
6
5
  type: "git",
7
6
  url: "git+https://github.com/cute-widgets/base.git"
@@ -36,7 +35,6 @@ var _package = {
36
35
  name: name,
37
36
  version: version,
38
37
  license: license,
39
- homepage: homepage,
40
38
  repository: repository,
41
39
  bugs: bugs,
42
40
  description: description,
@@ -1 +1 @@
1
- {"version":3,"file":"cute-widgets-base.mjs","sources":["../../../../projects/cute-widgets/base/index.ts","../../../../projects/cute-widgets/base/cute-widgets-base.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * @description\r\n * Public API Surface of the base `CuteWidgets`.\r\n */\r\nimport {version} from \"./package.json\";\r\n\r\nexport const CUTE_WIDGETS_VERSION = String(version);\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;AAUG;MAGU,oBAAoB,GAAG,MAAM,CAAC,OAAO;;ACblD;;AAEG;;;;"}
1
+ {"version":3,"file":"cute-widgets-base.mjs","sources":["../../../../projects/cute-widgets/base/index.ts","../../../../projects/cute-widgets/base/cute-widgets-base.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * @description\r\n * Public API Surface of the base `CuteWidgets`.\r\n */\r\nimport {version} from \"./package.json\";\r\n\r\nexport const CUTE_WIDGETS_VERSION = String(version);\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;AAUG;MAGU,oBAAoB,GAAG,MAAM,CAAC,OAAO;;ACblD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@cute-widgets/base",
3
- "version": "20.0.1",
3
+ "version": "20.0.2",
4
4
  "license": "Apache-2.0",
5
- "homepage": "https://github.com/cute-widgets/base#README.md",
6
5
  "repository": {
7
6
  "type": "git",
8
7
  "url": "git+https://github.com/cute-widgets/base.git"
@@ -63,14 +62,14 @@
63
62
  "types": "./bottom-sheet/index.d.ts",
64
63
  "default": "./fesm2022/cute-widgets-base-bottom-sheet.mjs"
65
64
  },
66
- "./button": {
67
- "types": "./button/index.d.ts",
68
- "default": "./fesm2022/cute-widgets-base-button.mjs"
69
- },
70
65
  "./button-toggle": {
71
66
  "types": "./button-toggle/index.d.ts",
72
67
  "default": "./fesm2022/cute-widgets-base-button-toggle.mjs"
73
68
  },
69
+ "./button": {
70
+ "types": "./button/index.d.ts",
71
+ "default": "./fesm2022/cute-widgets-base-button.mjs"
72
+ },
74
73
  "./card": {
75
74
  "types": "./card/index.d.ts",
76
75
  "default": "./fesm2022/cute-widgets-base-card.mjs"
@@ -91,6 +90,10 @@
91
90
  "types": "./core/index.d.ts",
92
91
  "default": "./fesm2022/cute-widgets-base-core.mjs"
93
92
  },
93
+ "./datepicker": {
94
+ "types": "./datepicker/index.d.ts",
95
+ "default": "./fesm2022/cute-widgets-base-datepicker.mjs"
96
+ },
94
97
  "./dialog": {
95
98
  "types": "./dialog/index.d.ts",
96
99
  "default": "./fesm2022/cute-widgets-base-dialog.mjs"
@@ -175,9 +178,9 @@
175
178
  "types": "./stepper/index.d.ts",
176
179
  "default": "./fesm2022/cute-widgets-base-stepper.mjs"
177
180
  },
178
- "./datepicker": {
179
- "types": "./datepicker/index.d.ts",
180
- "default": "./fesm2022/cute-widgets-base-datepicker.mjs"
181
+ "./table": {
182
+ "types": "./table/index.d.ts",
183
+ "default": "./fesm2022/cute-widgets-base-table.mjs"
181
184
  },
182
185
  "./tabs": {
183
186
  "types": "./tabs/index.d.ts",
@@ -199,10 +202,6 @@
199
202
  "types": "./tree/index.d.ts",
200
203
  "default": "./fesm2022/cute-widgets-base-tree.mjs"
201
204
  },
202
- "./table": {
203
- "types": "./table/index.d.ts",
204
- "default": "./fesm2022/cute-widgets-base-table.mjs"
205
- },
206
205
  "./core/animation": {
207
206
  "types": "./core/animation/index.d.ts",
208
207
  "default": "./fesm2022/cute-widgets-base-core-animation.mjs"
@@ -239,14 +238,14 @@
239
238
  "types": "./core/observers/index.d.ts",
240
239
  "default": "./fesm2022/cute-widgets-base-core-observers.mjs"
241
240
  },
242
- "./core/pipes": {
243
- "types": "./core/pipes/index.d.ts",
244
- "default": "./fesm2022/cute-widgets-base-core-pipes.mjs"
245
- },
246
241
  "./core/option": {
247
242
  "types": "./core/option/index.d.ts",
248
243
  "default": "./fesm2022/cute-widgets-base-core-option.mjs"
249
244
  },
245
+ "./core/pipes": {
246
+ "types": "./core/pipes/index.d.ts",
247
+ "default": "./fesm2022/cute-widgets-base-core-pipes.mjs"
248
+ },
250
249
  "./core/ripple": {
251
250
  "types": "./core/ripple/index.d.ts",
252
251
  "default": "./fesm2022/cute-widgets-base-core-ripple.mjs"
package/select/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { FocusOrigin } from '@angular/cdk/a11y';
2
- import { ScrollStrategy, Overlay, ConnectedPosition, CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
2
+ import { ScrollStrategy, ConnectedPosition, CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
3
3
  import { ViewportRuler } from '@angular/cdk/scrolling';
4
4
  import * as i0 from '@angular/core';
5
5
  import { InjectionToken, DoCheck, NgZone, QueryList, ElementRef, EventEmitter, SimpleChanges } from '@angular/core';
@@ -11,7 +11,6 @@ import { RelativeSize } from '@cute-widgets/base/core/types';
11
11
  import { CuteFormFieldControl, CuteFormField } from '@cute-widgets/base/form-field';
12
12
  import { ErrorStateMatcher } from '@cute-widgets/base/core/error';
13
13
  import { CuteInputDropdownControl } from '@cute-widgets/base/abstract';
14
- import { AnimationTriggerMetadata } from '@angular/animations';
15
14
  import * as i1 from '@angular/common';
16
15
 
17
16
  /**
@@ -28,8 +27,6 @@ import * as i1 from '@angular/common';
28
27
 
29
28
  /** Injection token that determines the scroll handling while a select is open. */
30
29
  declare const CUTE_SELECT_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
31
- /** @docs-private */
32
- declare function CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
33
30
  /** Object that can be used to configure the default options for the select module. */
34
31
  interface CuteSelectConfig {
35
32
  /** Whether option centering should be disabled. */
@@ -58,12 +55,6 @@ interface CuteSelectConfig {
58
55
  }
59
56
  /** Injection token that can be used to provide the default options the select module. */
60
57
  declare const CUTE_SELECT_CONFIG: InjectionToken<CuteSelectConfig>;
61
- /** @docs-private */
62
- declare const CUTE_SELECT_SCROLL_STRATEGY_PROVIDER: {
63
- provide: InjectionToken<() => ScrollStrategy>;
64
- deps: (typeof Overlay)[];
65
- useFactory: typeof CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY;
66
- };
67
58
  /**
68
59
  * Injection token that can be used to reference instances of `CuteSelectTrigger`. It serves as
69
60
  * an alternative token to the actual `CuteSelectTrigger` class which could cause unnecessary
@@ -90,12 +81,16 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
90
81
  ngControl: NgControl;
91
82
  private _liveAnnouncer;
92
83
  protected _defaultOptions: CuteSelectConfig | null;
84
+ protected _animationsDisabled: boolean;
85
+ private _initialized;
86
+ private _cleanupDetach;
93
87
  /** All the defined select options. */
94
88
  options: QueryList<CuteOption> | undefined;
95
89
  /** All of the defined groups of options. */
96
90
  optionGroups: QueryList<CuteOptgroup> | undefined;
97
91
  /** User-supplied override of the trigger element. */
98
92
  customTrigger: CuteSelectTrigger | undefined;
93
+ protected get bsColorVarName(): string;
99
94
  /**
100
95
  * This position config ensures that the top "start" corner of the overlay
101
96
  * is aligned with the top "start" of the origin by default (overlapping
@@ -222,7 +217,7 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
222
217
  * By default, selecting an option with a `null` or `undefined` value will reset the select's
223
218
  * value. Enable this option if the reset behavior doesn't match your requirements and instead,
224
219
  * the nullable options should become selected. The value of this input can be controlled app-wide
225
- * using the `MAT_SELECT_CONFIG` injection token.
220
+ * using the `CUTE_SELECT_CONFIG` injection token.
226
221
  */
227
222
  canSelectNullableOptions: boolean;
228
223
  /** Combined stream of all of the child options' change events. */
@@ -280,6 +275,10 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
280
275
  private _clearFromModal;
281
276
  /** Closes the overlay panel and focuses the host element. */
282
277
  close(): void;
278
+ /** Triggers the exit animation and detaches the overlay at the end. */
279
+ private _exitAndDetach;
280
+ /** Detaches the current overlay directive. */
281
+ private _detachOverlay;
283
282
  /**
284
283
  * Sets the select' value. Part of the ControlValueAccessor interface
285
284
  * required to integrate with Angular core forms API.
@@ -303,16 +302,14 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
303
302
  private _handleClosedKeydown;
304
303
  /** Handles keyboard events when the selected is open. */
305
304
  private _handleOpenKeydown;
305
+ /** Handles keyboard events coming from the overlay. */
306
+ protected _handleOverlayKeydown(event: KeyboardEvent): void;
306
307
  _onFocus(): void;
307
308
  /**
308
309
  * Calls the touched callback only if the panel is closed. Otherwise, the trigger will
309
310
  * "blur" to the panel when it opens, causing a false positive.
310
311
  */
311
312
  _onBlur(): void;
312
- /**
313
- * Callback that is invoked when the overlay panel has been attached.
314
- */
315
- _onAttached(): void;
316
313
  /** Returns the theme to be used on the panel. */
317
314
  _getPanelTheme(): string;
318
315
  /** Whether the select has a value. */
@@ -360,8 +357,11 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
360
357
  protected _getAriaActiveDescendant(): string | null;
361
358
  /** Gets the aria-labelledby of the select component trigger. */
362
359
  private _getTriggerAriaLabelledby;
363
- /** Called when the overlay panel is done animating. */
364
- protected _panelDoneAnimating(isOpen: boolean): void;
360
+ /**
361
+ * Implemented as part of CuteFormFieldControl.
362
+ * @docs-private
363
+ */
364
+ get describedByIds(): string[];
365
365
  /**
366
366
  * Implemented as part of CuteFormFieldControl.
367
367
  */
@@ -369,11 +369,13 @@ declare class CuteSelect extends CuteInputDropdownControl implements DoCheck, Cu
369
369
  /**
370
370
  * Implemented as part of CuteFormFieldControl.
371
371
  */
372
- onContainerClick(): void;
372
+ onContainerClick(event: MouseEvent): void;
373
373
  /**
374
374
  * Implemented as part of CuteFormFieldControl.
375
375
  */
376
376
  get shouldLabelFloat(): boolean;
377
+ /** `input` element gets focus. */
378
+ protected onInputFocus(event: FocusEvent): void;
377
379
  static ɵfac: i0.ɵɵFactoryDeclaration<CuteSelect, never>;
378
380
  static ɵcmp: i0.ɵɵComponentDeclaration<CuteSelect, "cute-select", ["cuteSelect"], { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disableOptionCentering": { "alias": "disableOptionCentering"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "value": { "alias": "value"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "magnitude": { "alias": "magnitude"; "required": false; }; "typeaheadDebounceInterval": { "alias": "typeaheadDebounceInterval"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "panelHeight": { "alias": "panelHeight"; "required": false; }; "canSelectNullableOptions": { "alias": "canSelectNullableOptions"; "required": false; }; }, { "openedChange": "openedChange"; "_openedStream": "opened"; "_closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["customTrigger", "options", "optionGroups"], ["cute-select-trigger", "*"], true, never>;
379
381
  static ngAcceptInputType_disableRipple: unknown;
@@ -391,36 +393,11 @@ declare class CuteSelectTrigger {
391
393
  static ɵdir: i0.ɵɵDirectiveDeclaration<CuteSelectTrigger, "cute-select-trigger", never, {}, {}, never, never, true, never>;
392
394
  }
393
395
 
394
- /**
395
- * @license Apache-2.0
396
- *
397
- * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
398
- *
399
- * You may not use this file except in compliance with the License
400
- * that can be found at http://www.apache.org/licenses/LICENSE-2.0
401
- */
402
-
403
- /**
404
- * The following are all the animations for the mat-select component, with each
405
- * const containing the metadata for one animation.
406
- *
407
- * The values below match the implementation of the AngularJS Material mat-select animation.
408
- * @docs-private
409
- */
410
- declare const cuteSelectAnimations: {
411
- /**
412
- * @deprecated No longer being used. To be removed.
413
- * @breaking-change 12.0.0
414
- */
415
- readonly transformPanelWrap: AnimationTriggerMetadata;
416
- readonly transformPanel: AnimationTriggerMetadata;
417
- };
418
-
419
396
  declare class CuteSelectModule {
420
397
  static ɵfac: i0.ɵɵFactoryDeclaration<CuteSelectModule, never>;
421
398
  static ɵmod: i0.ɵɵNgModuleDeclaration<CuteSelectModule, never, [typeof i1.CommonModule, typeof CuteSelect, typeof CuteSelectTrigger, typeof i3.CuteOptgroup, typeof i3.CuteOption], [typeof CuteSelect, typeof CuteSelectTrigger, typeof i3.CuteOptgroup, typeof i3.CuteOption]>;
422
399
  static ɵinj: i0.ɵɵInjectorDeclaration<CuteSelectModule>;
423
400
  }
424
401
 
425
- export { CUTE_SELECT_CONFIG, CUTE_SELECT_SCROLL_STRATEGY, CUTE_SELECT_SCROLL_STRATEGY_PROVIDER, CUTE_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, CUTE_SELECT_TRIGGER, CuteSelect, CuteSelectChange, CuteSelectModule, CuteSelectTrigger, cuteSelectAnimations };
402
+ export { CUTE_SELECT_CONFIG, CUTE_SELECT_SCROLL_STRATEGY, CUTE_SELECT_TRIGGER, CuteSelect, CuteSelectChange, CuteSelectModule, CuteSelectTrigger };
426
403
  export type { CuteSelectConfig };
Binary file