@spartan-ng/brain 0.0.1-alpha.400 → 0.0.1-alpha.402

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.
@@ -161,6 +161,15 @@ class BrnSelectService {
161
161
  selectedOptions: this.selectedOptions(),
162
162
  }));
163
163
  }
164
+ /**
165
+ * Sync the updated options with "possibleOptions" in the select service
166
+ */
167
+ updatePossibleOptions(options) {
168
+ this.state.update((state) => ({
169
+ ...state,
170
+ possibleOptions: options,
171
+ }));
172
+ }
164
173
  selectOptionByValue(value) {
165
174
  const options = this.possibleOptions();
166
175
  if (value === null || value === undefined) {
@@ -334,8 +343,8 @@ class BrnSelectContentComponent {
334
343
  canScrollDown = signal(false);
335
344
  initialSelectedOptions$ = toObservable(this._selectService.selectedOptions);
336
345
  viewport = viewChild.required('viewport');
337
- scrollUpBtn = contentChild.required(BrnSelectScrollUpDirective);
338
- scrollDownBtn = contentChild.required(BrnSelectScrollDownDirective);
346
+ scrollUpBtn = contentChild(BrnSelectScrollUpDirective);
347
+ scrollDownBtn = contentChild(BrnSelectScrollDownDirective);
339
348
  _options = contentChildren(BrnSelectOptionDirective, { descendants: true });
340
349
  constructor() {
341
350
  this._cdkListbox.valueChange
@@ -385,7 +394,7 @@ class BrnSelectContentComponent {
385
394
  moveFocusUp() {
386
395
  this.viewport().nativeElement.scrollBy({ top: -SCROLLBY_PIXELS, behavior: 'smooth' });
387
396
  if (this.viewport().nativeElement.scrollTop === 0) {
388
- this.scrollUpBtn().stopEmittingEvents();
397
+ this.scrollUpBtn()?.stopEmittingEvents();
389
398
  }
390
399
  }
391
400
  moveFocusDown() {
@@ -394,7 +403,7 @@ class BrnSelectContentComponent {
394
403
  const viewportScrollPosition = this.viewport().nativeElement.scrollTop;
395
404
  if (viewportSize + viewportScrollPosition + SCROLLBY_PIXELS >
396
405
  this.viewport().nativeElement.scrollHeight + SCROLLBY_PIXELS / 2) {
397
- this.scrollDownBtn().stopEmittingEvents();
406
+ this.scrollDownBtn()?.stopEmittingEvents();
398
407
  }
399
408
  }
400
409
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnSelectContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -752,7 +761,7 @@ class BrnSelectComponent {
752
761
  if (index > 0) {
753
762
  this.handleInvalidOptions(options);
754
763
  }
755
- this.updatePossibleOptions(options);
764
+ this._selectService.updatePossibleOptions(options);
756
765
  });
757
766
  }
758
767
  /**
@@ -763,41 +772,26 @@ class BrnSelectComponent {
763
772
  const availableOptionSet = new Set(options);
764
773
  if (this._selectService.multiple()) {
765
774
  const filteredOptions = selectedOptions.filter((o) => availableOptionSet.has(o));
766
- // only update if there was an actual change
767
775
  if (selectedOptions.length !== filteredOptions.length) {
768
- // update should result in a value change since we are deselecting a value
769
- this._shouldEmitValueChange.set(true);
770
776
  const value = filteredOptions.map((o) => o?.value ?? '');
771
777
  this._selectService.state.update((state) => ({
772
778
  ...state,
773
779
  selectedOptions: filteredOptions,
774
780
  value: value,
775
781
  }));
776
- this._onChange((value ?? null));
777
782
  }
778
783
  }
779
784
  else {
780
785
  const selectedOption = selectedOptions[0] ?? null;
781
786
  if (selectedOption !== null && !availableOptionSet.has(selectedOption)) {
782
- this._shouldEmitValueChange.set(true);
783
787
  this._selectService.state.update((state) => ({
784
788
  ...state,
785
789
  selectedOptions: [],
786
790
  value: '',
787
791
  }));
788
- this._onChange('');
789
792
  }
790
793
  }
791
794
  }
792
- /**
793
- * Sync the updated options with "possibleOptions" in the select service
794
- */
795
- updatePossibleOptions(options) {
796
- this._selectService.state.update((state) => ({
797
- ...state,
798
- possibleOptions: options,
799
- }));
800
- }
801
795
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
802
796
  /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.5", type: BrnSelectComponent, isStandalone: true, selector: "brn-select, hlm-select", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, providers: [
803
797
  BrnSelectService,
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-select.mjs","sources":["../../../../libs/brain/select/src/lib/brn-select.service.ts","../../../../libs/brain/select/src/lib/brn-select-option.directive.ts","../../../../libs/brain/select/src/lib/brn-select-content.component.ts","../../../../libs/brain/select/src/lib/brn-select-group.directive.ts","../../../../libs/brain/select/src/lib/brn-select-label.directive.ts","../../../../libs/brain/select/src/lib/brn-select-value.component.ts","../../../../libs/brain/select/src/lib/brn-select.component.ts","../../../../libs/brain/select/src/index.ts","../../../../libs/brain/select/src/spartan-ng-brain-select.ts"],"sourcesContent":["import type { CdkOption, ListboxValueChangeEvent } from '@angular/cdk/listbox';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterViewInit,\n\tDirective,\n\tElementRef,\n\tInjectable,\n\tOnDestroy,\n\tPLATFORM_ID,\n\tSignal,\n\tcomputed,\n\tinject,\n\tsignal,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { skip } from 'rxjs/operators';\n\n@Directive({\n\tselector: '[brnSelectTrigger]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'combobox',\n\t\t'[attr.id]': 'selectTriggerId()',\n\t\t'[disabled]': 'selectDisable()',\n\t\t'[attr.aria-expanded]': 'isExpanded()',\n\t\t'[attr.aria-controls]': \"selectContentId() + ''\",\n\t\t'[attr.aria-labelledBy]': 'selectTriggerLabelledBy()',\n\t\t'aria-autocomplete': 'none',\n\t\t'[attr.dir]': '_selectService.dir()',\n\t\t'[class.ng-invalid]': 'this._ngControl?.invalid || null',\n\t\t'[class.ng-dirty]': 'this._ngControl?.dirty || null',\n\t\t'[class.ng-valid]': 'this._ngControl?.valid || null',\n\t\t'[class.ng-touched]': 'this._ngControl?.touched || null',\n\t\t'[class.ng-untouched]': 'this._ngControl?.untouched || null',\n\t\t'[class.ng-pristine]': 'this._ngControl?.pristine || null',\n\t\ttype: 'button',\n\t},\n})\nexport class BrnSelectTriggerDirective implements AfterViewInit, OnDestroy {\n\tprivate readonly _el = inject(ElementRef);\n\tprotected readonly _selectService = inject(BrnSelectService);\n\tprotected readonly _ngControl = inject(NgControl, { optional: true });\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\tpublic readonly isExpanded = this._selectService.isExpanded;\n\tpublic readonly selectTriggerId = computed(() => `${this._selectService.id()}--trigger`);\n\tpublic readonly selectContentId = computed(() => `${this._selectService.id()}--content`);\n\tpublic readonly selectDisable = computed(() => this._selectService.disabled());\n\tpublic readonly selectTriggerLabelledBy = computed(() => {\n\t\tif (this._selectService.value() && this._selectService.value().length > 0) {\n\t\t\treturn `${this._selectService.labelId()} ${this._selectService.id()}--value`;\n\t\t}\n\t\treturn this._selectService.labelId();\n\t});\n\n\tprivate _resizeObserver?: ResizeObserver;\n\n\tconstructor() {\n\t\tif (!this._selectService) return;\n\t\tthis._selectService._setSelectTrigger(this);\n\t}\n\n\tngAfterViewInit() {\n\t\tthis._selectService.setTriggerWidth(this._el.nativeElement.offsetWidth);\n\n\t\t// if we are on the client, listen for element resize events\n\t\tif (isPlatformBrowser(this._platform)) {\n\t\t\tthis._resizeObserver = new ResizeObserver(() =>\n\t\t\t\tthis._selectService.setTriggerWidth(this._el.nativeElement.offsetWidth),\n\t\t\t);\n\n\t\t\tthis._resizeObserver.observe(this._el.nativeElement);\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._resizeObserver?.disconnect();\n\t}\n\n\tpublic focus() {\n\t\tthis._el.nativeElement.focus();\n\t}\n}\n\ntype BrnReadDirection = 'ltr' | 'rtl';\n\n@Injectable()\nexport class BrnSelectService {\n\tpublic readonly state = signal<{\n\t\tid: string;\n\t\tlabelId: string;\n\t\tpanelId: string;\n\t\tplaceholder: Signal<string>;\n\t\tisExpanded: boolean;\n\t\tmultiple: Signal<boolean>;\n\t\tdisabled: Signal<boolean>;\n\t\tdisabledBySetDisabled: Signal<boolean>;\n\t\tdir: Signal<BrnReadDirection>;\n\t\tselectedOptions: Array<CdkOption | null>;\n\t\tpossibleOptions: Array<CdkOption | null>;\n\t\tvalue: string | string[];\n\t\ttriggerWidth: number;\n\t}>({\n\t\tid: '',\n\t\tlabelId: '',\n\t\tpanelId: '',\n\t\tisExpanded: false,\n\t\tplaceholder: signal(''),\n\t\tmultiple: signal(false),\n\t\tdisabled: signal(false),\n\t\tdisabledBySetDisabled: signal(false),\n\t\tdir: signal('ltr' as BrnReadDirection),\n\t\tselectedOptions: [],\n\t\tpossibleOptions: [],\n\t\tvalue: '',\n\t\ttriggerWidth: 0,\n\t});\n\n\tpublic readonly id = computed(() => this.state().id);\n\tpublic readonly labelId = computed(() => this.state().labelId);\n\tpublic readonly panelId = computed(() => this.state().panelId);\n\tpublic readonly placeholder = computed(() => this.state().placeholder());\n\tpublic readonly disabled = computed(() => this.state().disabled() || this.state().disabledBySetDisabled());\n\tpublic readonly isExpanded = computed(() => this.state().isExpanded);\n\tpublic readonly multiple = computed(() => this.state().multiple());\n\tpublic readonly dir = computed(() => this.state().dir());\n\tpublic readonly selectedOptions = computed(() => this.state().selectedOptions);\n\tpublic readonly value = computed(() => this.state().value);\n\tpublic readonly triggerWidth = computed(() => this.state().triggerWidth);\n\tpublic readonly possibleOptions = computed(() => this.state().possibleOptions);\n\n\tprivate readonly _multiple$ = toObservable(this.multiple);\n\n\tpublic readonly listBoxValueChangeEvent$ = new Subject<ListboxValueChangeEvent<unknown>>();\n\n\tprivate _selectTrigger?: BrnSelectTriggerDirective;\n\tpublic get selectTrigger() {\n\t\treturn this._selectTrigger;\n\t}\n\n\tconstructor() {\n\t\tthis.listBoxValueChangeEvent$.pipe(takeUntilDestroyed()).subscribe((listBoxChange) => {\n\t\t\tconst updatedSelections = this.multiple() ? this.getUpdatedOptions(listBoxChange) : [listBoxChange.option];\n\t\t\tconst value = this.multiple() ? listBoxChange.value : listBoxChange.value[0];\n\t\t\tthis.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tselectedOptions: [...updatedSelections],\n\t\t\t\tvalue: value as string | string[],\n\t\t\t}));\n\t\t});\n\n\t\t// We need to skip the first value because we don't want to deselect all options when the component is initialized with a preselected value e.g. by the form control\n\t\tthis._multiple$.pipe(skip(1), takeUntilDestroyed()).subscribe((multiple) => {\n\t\t\tif (!multiple && this.value().length > 1) {\n\t\t\t\tthis.deselectAllOptions();\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic setTriggerWidth(triggerWidth: number) {\n\t\tthis.state.update((s) => ({ ...s, triggerWidth }));\n\t}\n\n\tpublic getUpdatedOptions(latestListboxChange: ListboxValueChangeEvent<unknown>): Array<CdkOption | null> {\n\t\tconst isNewSelection = latestListboxChange.value.findIndex((value) => value === latestListboxChange.option?.value);\n\t\tif (isNewSelection === -1) {\n\t\t\tconst removedOptionIndex = this.selectedOptions().findIndex((option) => latestListboxChange.option === option);\n\t\t\tconst options = this.selectedOptions();\n\t\t\toptions.splice(removedOptionIndex, 1);\n\t\t\treturn options;\n\t\t}\n\t\treturn [...this.selectedOptions(), latestListboxChange.option];\n\t}\n\n\tpublic deselectAllOptions() {\n\t\tthis.state.update((state) => ({\n\t\t\t...state,\n\t\t\tselectedOptions: [],\n\t\t\tvalue: [],\n\t\t}));\n\t}\n\n\t// Needed due to https://github.com/angular/angular/issues/20810\n\tpublic _setSelectTrigger(trigger: BrnSelectTriggerDirective) {\n\t\tthis._selectTrigger = trigger;\n\t}\n\n\tpublic setInitialSelectedOptions(value: unknown) {\n\t\tthis.selectOptionByValue(value);\n\t\tthis.state.update((state) => ({\n\t\t\t...state,\n\t\t\tvalue: value as string | string[],\n\t\t\tinitialSelectedOptions: this.selectedOptions(),\n\t\t\tselectedOptions: this.selectedOptions(),\n\t\t}));\n\t}\n\n\tprivate selectOptionByValue(value: unknown) {\n\t\tconst options = this.possibleOptions();\n\t\tif (value === null || value === undefined) {\n\t\t\tconst nullOrUndefinedOption = options.find((o) => o && o.value === value);\n\t\t\tif (!nullOrUndefinedOption) {\n\t\t\t\tthis.state.update((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tselectedOptions: [],\n\t\t\t\t\tvalue: this.multiple() ? [] : '',\n\t\t\t\t}));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (this.multiple()) {\n\t\t\tconst selectedOptions = options.filter((option) => {\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\treturn value.includes(option?.value as string);\n\t\t\t\t}\n\t\t\t\treturn value === option?.value;\n\t\t\t});\n\t\t\tthis.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tselectedOptions,\n\t\t\t\tvalue: value as string[],\n\t\t\t}));\n\t\t} else {\n\t\t\tconst selectedOption = options.find((option) => option?.value === value);\n\t\t\tif (!selectedOption) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tselectedOptions: [selectedOption as CdkOption | null],\n\t\t\t\tvalue: selectedOption.value as string,\n\t\t\t}));\n\t\t}\n\t}\n}\n","import type { FocusableOption } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { CdkOption } from '@angular/cdk/listbox';\nimport {\n\tAfterContentChecked,\n\tDirective,\n\tElementRef,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { BrnSelectService } from './brn-select.service';\n\n@Directive({\n\tselector: '[brnOption]',\n\tstandalone: true,\n\thostDirectives: [CdkOption],\n\thost: {\n\t\t'(mouseenter)': 'hover()',\n\t\t'(blur)': 'blur()',\n\t\t'[attr.dir]': '_selectService.dir()',\n\t\t'[attr.data-disabled]': \"disabledSignal() ? '' : undefined\",\n\t},\n})\nexport class BrnSelectOptionDirective implements FocusableOption, AfterContentChecked {\n\tprivate readonly _cdkSelectOption = inject(CdkOption, { host: true });\n\tprotected readonly _selectService = inject(BrnSelectService);\n\n\tprivate readonly _focused = signal<boolean>(false);\n\tpublic readonly elementRef = inject(ElementRef);\n\n\tpublic readonly selected = computed(() => {\n\t\tif (Array.isArray(this._selectService.value())) {\n\t\t\tconst itemFound = (this._selectService.value() as Array<unknown>).find(\n\t\t\t\t(val) => val === this._cdkSelectOption.value,\n\t\t\t);\n\t\t\treturn !!itemFound;\n\t\t}\n\t\treturn this._cdkSelectOption.value === this._selectService.value();\n\t});\n\tpublic readonly focused = computed(() => this._focused());\n\tpublic readonly checkedState = computed(() => (this.selected() ? 'checked' : 'unchecked'));\n\tpublic readonly dir = computed(() => this._selectService.dir());\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tthis._cdkSelectOption.value = this.value();\n\t\t});\n\t\teffect(() => {\n\t\t\tthis._cdkSelectOption.disabled = this.disabledSignal();\n\t\t});\n\t}\n\tngAfterContentChecked(): void {\n\t\tthis._cdkSelectOption.value = this.value();\n\t}\n\n\tpublic value = input<unknown | null>(null);\n\n\t// we use \"disabledSignal\" here because disabled is already defined in the FocusableOption interface\n\tpublic readonly disabledSignal = input<boolean, BooleanInput>(false, {\n\t\talias: 'disabled',\n\t\ttransform: booleanAttribute,\n\t});\n\n\tprotected hover(): void {\n\t\tthis.focus();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._cdkSelectOption.focus();\n\t\tthis._focused.set(true);\n\t}\n\n\tpublic blur(): void {\n\t\tthis._focused.set(false);\n\t}\n}\n","import { CdkListbox, type ListboxValueChangeEvent } from '@angular/cdk/listbox';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n\ttype AfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDestroyRef,\n\tElementRef,\n\tcontentChild,\n\tcontentChildren,\n\teffect,\n\tinject,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { BrnSelectOptionDirective } from './brn-select-option.directive';\nimport { BrnSelectService } from './brn-select.service';\n\nimport { Directive } from '@angular/core';\nimport { Subject, fromEvent, interval } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nconst SCROLLBY_PIXELS = 100;\n\n@Directive({\n\tselector: '[brnSelectScrollUp], brn-select-scroll-up, hlm-select-scroll-up:not(noHlm)',\n\tstandalone: true,\n\thost: {\n\t\t'aria-hidden': 'true',\n\t\t'(mouseenter)': 'startEmittingEvents()',\n\t},\n})\nexport class BrnSelectScrollUpDirective {\n\tprivate readonly _el = inject(ElementRef);\n\tprivate readonly _selectContent = inject(BrnSelectContentComponent);\n\n\tprivate readonly _endReached = new Subject<boolean>();\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\n\tpublic startEmittingEvents(): void {\n\t\tconst mouseLeave$ = fromEvent(this._el.nativeElement, 'mouseleave');\n\n\t\tinterval(100)\n\t\t\t.pipe(takeUntil(mouseLeave$), takeUntil(this._endReached), takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe(() => this._selectContent.moveFocusUp());\n\t}\n\n\tpublic stopEmittingEvents(): void {\n\t\tthis._endReached.next(true);\n\t}\n}\n\n@Directive({\n\tselector: '[brnSelectScrollDown], brn-select-scroll-down, hlm-select-scroll-down:not(noHlm)',\n\tstandalone: true,\n\thost: {\n\t\t'aria-hidden': 'true',\n\t\t'(mouseenter)': 'startEmittingEvents()',\n\t},\n})\nexport class BrnSelectScrollDownDirective {\n\tprivate readonly _el = inject(ElementRef);\n\tprivate readonly _selectContent = inject(BrnSelectContentComponent);\n\n\tprivate readonly _endReached = new Subject<boolean>();\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\n\tpublic startEmittingEvents(): void {\n\t\tconst mouseLeave$ = fromEvent(this._el.nativeElement, 'mouseleave');\n\n\t\tinterval(100)\n\t\t\t.pipe(takeUntil(mouseLeave$), takeUntil(this._endReached), takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe(() => this._selectContent.moveFocusDown());\n\t}\n\n\tpublic stopEmittingEvents(): void {\n\t\tthis._endReached.next(true);\n\t}\n}\n\n@Component({\n\tselector: 'brn-select-content, hlm-select-content:not(noHlm)',\n\tstandalone: true,\n\timports: [BrnSelectScrollUpDirective, BrnSelectScrollDownDirective, NgTemplateOutlet],\n\thostDirectives: [CdkListbox],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\t'[attr.aria-labelledBy]': 'labelledBy()',\n\t\t'[attr.aria-controlledBy]': \"id() +'--trigger'\",\n\t\t'[id]': \"id() + '--content'\",\n\t\t'[attr.dir]': '_selectService.dir()',\n\t},\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: flex;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tflex-direction: column;\n\t\t\t\toutline: none;\n\t\t\t\tpointer-events: auto;\n\t\t\t}\n\n\t\t\t[data-brn-select-viewport] {\n\t\t\t\tscrollbar-width: none;\n\t\t\t\t-ms-overflow-style: none;\n\t\t\t\t-webkit-overflow-scrolling: touch;\n\t\t\t}\n\n\t\t\t[data-brn-select-viewport]::-webkit-scrollbar {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t`,\n\t],\n\ttemplate: `\n\t\t<ng-template #scrollUp>\n\t\t\t<ng-content select=\"hlm-select-scroll-up\" />\n\t\t\t<ng-content select=\"brnSelectScrollUp\" />\n\t\t</ng-template>\n\t\t<ng-container *ngTemplateOutlet=\"canScrollUp() && scrollUpBtn() ? scrollUp : null\" />\n\t\t<div\n\t\t\tdata-brn-select-viewport\n\t\t\t#viewport\n\t\t\t(scroll)=\"handleScroll()\"\n\t\t\tstyle=\"flex: 1 1 0%;\n\t\t\tposition: relative;\n\t\t\twidth:100%;\n\t\t\toverflow:auto;\n\t\t\tmin-height: 36px;\n padding-bottom: 2px;\n margin-bottom: -2px;\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</div>\n\t\t<ng-template #scrollDown>\n\t\t\t<ng-content select=\"brnSelectScrollDown\" />\n\t\t\t<ng-content select=\"hlm-select-scroll-down\" />\n\t\t</ng-template>\n\t\t<ng-container *ngTemplateOutlet=\"canScrollDown() && scrollDownBtn() ? scrollDown : null\" />\n\t`,\n})\nexport class BrnSelectContentComponent implements AfterViewInit {\n\tprivate readonly _el: ElementRef<HTMLElement> = inject(ElementRef);\n\tprivate readonly _cdkListbox = inject(CdkListbox, { host: true });\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprotected readonly _selectService = inject(BrnSelectService);\n\n\tprotected readonly labelledBy = this._selectService.labelId;\n\tprotected readonly id = this._selectService.id;\n\tprotected readonly canScrollUp = signal(false);\n\tprotected readonly canScrollDown = signal(false);\n\n\tprotected initialSelectedOptions$ = toObservable(this._selectService.selectedOptions);\n\n\tprotected viewport = viewChild.required<ElementRef<HTMLElement>>('viewport');\n\n\tprotected scrollUpBtn = contentChild.required(BrnSelectScrollUpDirective);\n\n\tprotected scrollDownBtn = contentChild.required(BrnSelectScrollDownDirective);\n\n\tprotected _options = contentChildren(BrnSelectOptionDirective, { descendants: true });\n\n\tconstructor() {\n\t\tthis._cdkListbox.valueChange\n\t\t\t.asObservable()\n\t\t\t.pipe(takeUntilDestroyed())\n\t\t\t.subscribe((val: ListboxValueChangeEvent<unknown>) => this._selectService.listBoxValueChangeEvent$.next(val));\n\n\t\teffect(() => {\n\t\t\tthis._cdkListbox.multiple = this._selectService.multiple();\n\t\t\tthis._selectService.isExpanded() && setTimeout(() => this.updateArrowDisplay());\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\tthis.setInitiallySelectedOptions();\n\t}\n\n\tprivate setInitiallySelectedOptions() {\n\t\tthis.initialSelectedOptions$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((selectedOptions) => {\n\t\t\t// Reapplying cdkLibstbox multiple because seems this is running before effect that\n\t\t\t// updates cdklistbox, reapplying multiple true so we can set the multiple initial options\n\t\t\tif (this._selectService.multiple()) {\n\t\t\t\tthis._cdkListbox.multiple = true;\n\t\t\t}\n\n\t\t\tfor (const cdkOption of this._selectService.possibleOptions()) {\n\t\t\t\tif (selectedOptions.includes(cdkOption)) {\n\t\t\t\t\tcdkOption?.select();\n\t\t\t\t} else {\n\t\t\t\t\tcdkOption?.deselect();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const cdkOption of selectedOptions) {\n\t\t\t\tcdkOption?.select();\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic updateArrowDisplay(): void {\n\t\tconst { scrollTop, scrollHeight, clientHeight } = this.viewport().nativeElement;\n\t\tthis.canScrollUp.set(scrollTop > 0);\n\t\tconst maxScroll = scrollHeight - clientHeight;\n\t\tthis.canScrollDown.set(Math.ceil(scrollTop) < maxScroll);\n\t}\n\n\tpublic handleScroll() {\n\t\tthis.updateArrowDisplay();\n\t}\n\n\tpublic focusList(): void {\n\t\tthis._cdkListbox.focus();\n\t}\n\n\tpublic moveFocusUp() {\n\t\tthis.viewport().nativeElement.scrollBy({ top: -SCROLLBY_PIXELS, behavior: 'smooth' });\n\t\tif (this.viewport().nativeElement.scrollTop === 0) {\n\t\t\tthis.scrollUpBtn().stopEmittingEvents();\n\t\t}\n\t}\n\n\tpublic moveFocusDown() {\n\t\tthis.viewport().nativeElement.scrollBy({ top: SCROLLBY_PIXELS, behavior: 'smooth' });\n\t\tconst viewportSize = this._el.nativeElement.scrollHeight;\n\t\tconst viewportScrollPosition = this.viewport().nativeElement.scrollTop;\n\t\tif (\n\t\t\tviewportSize + viewportScrollPosition + SCROLLBY_PIXELS >\n\t\t\tthis.viewport().nativeElement.scrollHeight + SCROLLBY_PIXELS / 2\n\t\t) {\n\t\t\tthis.scrollDownBtn().stopEmittingEvents();\n\t\t}\n\t}\n}\n","import { Directive, signal } from '@angular/core';\n\n@Directive({\n\tselector: '[brnSelectGroup]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.aria-labelledby]': 'labelledBy()',\n\t},\n})\nexport class BrnSelectGroupDirective {\n\tpublic readonly labelledBy = signal('');\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnLabelDirective } from '@spartan-ng/brain/label';\nimport { BrnSelectGroupDirective } from './brn-select-group.directive';\n\n@Directive({\n\tselector: '[brnSelectLabel]',\n\thostDirectives: [BrnLabelDirective],\n\tstandalone: true,\n})\nexport class BrnSelectLabelDirective {\n\tprivate readonly _group = inject(BrnSelectGroupDirective, { optional: true });\n\tprivate readonly _label = inject(BrnLabelDirective, { host: true });\n\n\tconstructor() {\n\t\tthis._group?.labelledBy.set(this._label.id());\n\t}\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, inject, input } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { BrnSelectService } from './brn-select.service';\n\n@Component({\n\tselector: 'brn-select-value, hlm-select-value',\n\ttemplate: `\n\t\t{{ value || placeholder() }}\n\t`,\n\thost: {\n\t\t'[id]': 'id()',\n\t},\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: -webkit-box;\n\t\t\t\t-webkit-box-orient: vertical;\n\t\t\t\t-webkit-line-clamp: 1;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t`,\n\t],\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnSelectValueComponent {\n\tprivate readonly _selectService = inject(BrnSelectService);\n\n\tpublic readonly id = computed(() => `${this._selectService.id()}--value`);\n\tpublic readonly placeholder = computed(() => this._selectService.placeholder());\n\tpublic value: string | null = null;\n\n\tpublic readonly transformFn = input<(values: (string | undefined)[]) => any>((values) => (values ?? []).join(', '));\n\n\tconstructor() {\n\t\tconst cdr = inject(ChangeDetectorRef);\n\n\t\t// In certain cases (when using a computed signal for value) where the value of the select and the options are\n\t\t// changed dynamically, the template does not update until the next frame. To work around this we can use a simple\n\t\t// string variable in the template and manually trigger change detection when we update it.\n\t\ttoObservable(this._selectService.selectedOptions)\n\t\t\t.pipe(takeUntilDestroyed())\n\t\t\t.subscribe((value) => {\n\t\t\t\tif (value.length === 0) {\n\t\t\t\t\tthis.value = null;\n\t\t\t\t\tcdr.detectChanges();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst selectedLabels = value.map((selectedOption) => selectedOption?.getLabel());\n\n\t\t\t\tif (this._selectService.dir() === 'rtl') {\n\t\t\t\t\tselectedLabels.reverse();\n\t\t\t\t}\n\t\t\t\tconst result = this.transformFn()(selectedLabels);\n\t\t\t\tthis.value = result;\n\t\t\t\tcdr.detectChanges();\n\t\t\t});\n\t}\n}\n","import { CdkListbox, CdkListboxModule, CdkOption } from '@angular/cdk/listbox';\nimport {\n\tCdkConnectedOverlay,\n\ttype ConnectedOverlayPositionChange,\n\ttype ConnectedPosition,\n\tOverlayModule,\n} from '@angular/cdk/overlay';\nimport {\n\tAfterContentInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\ttype DoCheck,\n\ttype Signal,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport {\n\ttype ExposesSide,\n\ttype ExposesState,\n\tprovideExposedSideProviderExisting,\n\tprovideExposesStateProviderExisting,\n} from '@spartan-ng/brain/core';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ChangeFn, ErrorStateMatcher, ErrorStateTracker, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnLabelDirective } from '@spartan-ng/brain/label';\nimport { Subject, combineLatest, of } from 'rxjs';\nimport { delay, map, switchMap } from 'rxjs/operators';\nimport { BrnSelectContentComponent } from './brn-select-content.component';\nimport { BrnSelectService } from './brn-select.service';\n\nexport type BrnReadDirection = 'ltr' | 'rtl';\n\nlet nextId = 0;\n\n@Component({\n\tselector: 'brn-select, hlm-select',\n\tstandalone: true,\n\timports: [OverlayModule, CdkListboxModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\tBrnSelectService,\n\t\tCdkListbox,\n\t\tprovideExposedSideProviderExisting(() => BrnSelectComponent),\n\t\tprovideExposesStateProviderExisting(() => BrnSelectComponent),\n\t\t{\n\t\t\tprovide: BrnFormFieldControl,\n\t\t\tuseExisting: BrnSelectComponent,\n\t\t},\n\t],\n\ttemplate: `\n\t\t@if (!labelProvided() && placeholder()) {\n\t\t\t<label class=\"hidden\" [attr.id]=\"backupLabelId()\">{{ placeholder() }}</label>\n\t\t} @else {\n\t\t\t<ng-content select=\"label[hlmLabel],label[brnLabel]\" />\n\t\t}\n\n\t\t<div cdk-overlay-origin (click)=\"toggle()\" #trigger=\"cdkOverlayOrigin\">\n\t\t\t<ng-content select=\"hlm-select-trigger,[brnSelectTrigger]\" />\n\t\t</div>\n\t\t<ng-template\n\t\t\tcdk-connected-overlay\n\t\t\tcdkConnectedOverlayLockPosition\n\t\t\tcdkConnectedOverlayHasBackdrop\n\t\t\tcdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n\t\t\t[cdkConnectedOverlayOrigin]=\"trigger\"\n\t\t\t[cdkConnectedOverlayOpen]=\"_delayedExpanded()\"\n\t\t\t[cdkConnectedOverlayPositions]=\"_positions\"\n\t\t\t[cdkConnectedOverlayWidth]=\"triggerWidth() > 0 ? triggerWidth() : 'auto'\"\n\t\t\t(backdropClick)=\"close()\"\n\t\t\t(detach)=\"close()\"\n\t\t\t(positionChange)=\"_positionChanges$.next($event)\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</ng-template>\n\t`,\n})\nexport class BrnSelectComponent<T = unknown>\n\timplements ControlValueAccessor, AfterContentInit, DoCheck, ExposesSide, ExposesState, BrnFormFieldControl\n{\n\tprivate readonly _selectService = inject(BrnSelectService);\n\n\tpublic readonly triggerWidth = this._selectService.triggerWidth;\n\n\tpublic readonly multiple = input<boolean>(false);\n\tpublic readonly placeholder = input<string>('');\n\tpublic readonly disabled = input<boolean>(false);\n\tpublic readonly dir = input<BrnReadDirection>('ltr');\n\tprivate readonly _disabledFromSetDisabledState = signal(false);\n\n\tprotected selectLabel = contentChild(BrnLabelDirective, { descendants: false });\n\t/** Overlay pane containing the options. */\n\tprotected selectContent = contentChild.required(BrnSelectContentComponent);\n\n\tprotected options = contentChildren(CdkOption, { descendants: true });\n\tprotected options$ = toObservable(this.options);\n\tprotected optionsAndIndex$ = this.options$.pipe(map((options, index) => [options, index] as const));\n\n\t/** Overlay pane containing the options. */\n\tprotected _overlayDir = viewChild(CdkConnectedOverlay);\n\n\tpublic readonly openedChange = output<boolean>();\n\n\tpublic readonly closeDelay = input<number>(100);\n\tpublic readonly isExpanded = this._selectService.isExpanded;\n\tprotected readonly _delayedExpanded = toSignal(\n\t\ttoObservable(this.isExpanded).pipe(\n\t\t\tswitchMap((expanded) => (!expanded ? of(expanded).pipe(delay(this.closeDelay())) : of(expanded))),\n\t\t\ttakeUntilDestroyed(),\n\t\t),\n\t\t{ initialValue: false },\n\t);\n\tpublic readonly state = computed(() => (this.isExpanded() ? 'open' : 'closed'));\n\n\tprotected readonly _positionChanges$ = new Subject<ConnectedOverlayPositionChange>();\n\tpublic readonly side: Signal<'top' | 'bottom' | 'left' | 'right'> = toSignal(\n\t\tthis._positionChanges$.pipe(\n\t\t\tmap<ConnectedOverlayPositionChange, 'top' | 'bottom' | 'left' | 'right'>((change) =>\n\t\t\t\t// todo: better translation or adjusting hlm to take that into account\n\t\t\t\tchange.connectionPair.originY === 'center'\n\t\t\t\t\t? change.connectionPair.originX === 'start'\n\t\t\t\t\t\t? 'left'\n\t\t\t\t\t\t: 'right'\n\t\t\t\t\t: change.connectionPair.originY,\n\t\t\t),\n\t\t),\n\t\t{ initialValue: 'bottom' },\n\t);\n\n\tpublic readonly backupLabelId = computed(() => this._selectService.labelId());\n\tpublic readonly labelProvided = signal(false);\n\n\tpublic readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onChange: ChangeFn<T> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\tprivate readonly _shouldEmitValueChange = signal(false);\n\n\t/*\n\t * This position config ensures that the top \"start\" corner of the overlay\n\t * is aligned with with the top \"start\" of the origin by default (overlapping\n\t * the trigger completely). If the panel cannot fit below the trigger, it\n\t * will fall back to a position above the trigger.\n\t */\n\tprotected _positions: ConnectedPosition[] = [\n\t\t{\n\t\t\toriginX: 'start',\n\t\t\toriginY: 'bottom',\n\t\t\toverlayX: 'start',\n\t\t\toverlayY: 'top',\n\t\t},\n\t\t{\n\t\t\toriginX: 'end',\n\t\t\toriginY: 'bottom',\n\t\t\toverlayX: 'end',\n\t\t\toverlayY: 'top',\n\t\t},\n\t\t{\n\t\t\toriginX: 'start',\n\t\t\toriginY: 'top',\n\t\t\toverlayX: 'start',\n\t\t\toverlayY: 'bottom',\n\t\t},\n\t\t{\n\t\t\toriginX: 'end',\n\t\t\toriginY: 'top',\n\t\t\toverlayX: 'end',\n\t\t\toverlayY: 'bottom',\n\t\t},\n\t];\n\n\tpublic errorStateTracker: ErrorStateTracker;\n\n\tprivate readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n\tprivate readonly _parentForm = inject(NgForm, { optional: true });\n\tprivate readonly _parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n\tpublic errorState = computed(() => this.errorStateTracker.errorState());\n\n\tpublic writeValue$ = new Subject<T>();\n\n\tconstructor() {\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tmultiple: this.multiple,\n\t\t\tplaceholder: this.placeholder,\n\t\t\tdisabled: this.disabled,\n\t\t\tdisabledBySetDisabled: this._disabledFromSetDisabledState,\n\t\t\tdir: this.dir,\n\t\t}));\n\t\tthis.handleOptionChanges();\n\t\tthis.handleInitialOptionSelect();\n\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tid: `brn-select-${nextId++}`,\n\t\t}));\n\t\tif (this.ngControl !== null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\t// Watch for Listbox Selection Changes to trigger Collapse and Value Change\n\t\tthis._selectService.listBoxValueChangeEvent$.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\tif (!this.multiple()) {\n\t\t\t\tthis.close();\n\t\t\t}\n\n\t\t\t// we set shouldEmitValueChange to true because we want to propagate the value change\n\t\t\t// as a result of user interaction\n\t\t\tthis._shouldEmitValueChange.set(true);\n\t\t});\n\n\t\t/**\n\t\t * Listening to value changes in order to trigger forms api on change\n\t\t * ShouldEmitValueChange simply ensures we only propagate value change when a user makes a selection\n\t\t * we don't propagate changes made from outside the component (ex. patch value or initial value from form control)\n\t\t */\n\t\ttoObservable(this._selectService.value).subscribe((value) => {\n\t\t\tif (this._shouldEmitValueChange()) {\n\t\t\t\tthis._onChange((value ?? null) as T);\n\t\t\t}\n\t\t\tthis._shouldEmitValueChange.set(true);\n\t\t});\n\n\t\tthis.errorStateTracker = new ErrorStateTracker(\n\t\t\tthis._defaultErrorStateMatcher,\n\t\t\tthis.ngControl,\n\t\t\tthis._parentFormGroup,\n\t\t\tthis._parentForm,\n\t\t);\n\t}\n\n\tpublic ngAfterContentInit(): void {\n\t\t// Check if Label Directive Provided and pass to service\n\t\tconst label = this.selectLabel();\n\t\tif (label) {\n\t\t\tthis.labelProvided.set(true);\n\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tlabelId: label.id(),\n\t\t\t}));\n\t\t} else if (this.placeholder()) {\n\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tlabelId: `${state.id}--label`,\n\t\t\t}));\n\t\t}\n\t}\n\n\tngDoCheck() {\n\t\tthis.errorStateTracker.updateErrorState();\n\t}\n\n\tpublic toggle(): void {\n\t\tif (this.isExpanded()) {\n\t\t\tthis.close();\n\t\t} else {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tpublic open(): void {\n\t\tif (!this._canOpen()) return;\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tisExpanded: true,\n\t\t}));\n\t\tthis.openedChange.emit(true);\n\t\tthis._moveFocusToCDKList();\n\t}\n\n\tpublic close(): void {\n\t\tif (!this.isExpanded()) return;\n\n\t\tif (this._selectService.selectTrigger) {\n\t\t\tthis._selectService.selectTrigger.focus();\n\t\t}\n\n\t\tthis.openedChange.emit(false);\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tisExpanded: false,\n\t\t}));\n\t\tthis._onTouched();\n\t}\n\n\tprotected _canOpen(): boolean {\n\t\treturn !this.isExpanded() && !this.disabled() && this.options()?.length > 0;\n\t}\n\n\tprivate _moveFocusToCDKList(): void {\n\t\tsetTimeout(() => {\n\t\t\tthis.selectContent()?.focusList();\n\t\t});\n\t}\n\n\tpublic writeValue(value: T): void {\n\t\tthis.writeValue$.next(value);\n\t}\n\n\tpublic registerOnChange(fn: ChangeFn<T>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\tpublic registerOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\tpublic setDisabledState(isDisabled: boolean) {\n\t\tthis._disabledFromSetDisabledState.set(isDisabled);\n\t}\n\n\t/**\n\t * Once writeValue is called and options are available we can handle setting the initial options\n\t * @private\n\t */\n\tprivate handleInitialOptionSelect() {\n\t\t// Write value cannot be handled until options are available, so we wait until both are available with a combineLatest\n\t\tcombineLatest([this.writeValue$, this.options$])\n\t\t\t.pipe(\n\t\t\t\tmap((values, index) => [...values, index]),\n\t\t\t\ttakeUntilDestroyed(),\n\t\t\t)\n\t\t\t.subscribe(([value, _, index]) => {\n\t\t\t\tthis._shouldEmitValueChange.set(false);\n\t\t\t\tthis._selectService.setInitialSelectedOptions(value);\n\t\t\t\t// the first time this observable emits a value we are simply setting the initial state\n\t\t\t\t// this change should not count as changing the state of the select, so we need to mark as pristine\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tthis.ngControl?.control?.markAsPristine();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * When options change, our current selected options may become invalid\n\t * Here we will automatically update our current selected options so that they are always inline with the possibleOptions\n\t * @private\n\t */\n\tprivate handleOptionChanges() {\n\t\tthis.optionsAndIndex$.pipe(takeUntilDestroyed()).subscribe(([options, index]) => {\n\t\t\tif (index > 0) {\n\t\t\t\tthis.handleInvalidOptions(options);\n\t\t\t}\n\t\t\tthis.updatePossibleOptions(options);\n\t\t});\n\t}\n\n\t/**\n\t * Check that our \"selectedOptions\" are still valid when \"possibleOptions\" is about to be updated\n\t */\n\tprivate handleInvalidOptions(options: readonly CdkOption[]) {\n\t\tconst selectedOptions = this._selectService.selectedOptions();\n\t\tconst availableOptionSet = new Set<CdkOption | null>(options);\n\t\tif (this._selectService.multiple()) {\n\t\t\tconst filteredOptions = selectedOptions.filter((o) => availableOptionSet.has(o));\n\t\t\t// only update if there was an actual change\n\t\t\tif (selectedOptions.length !== filteredOptions.length) {\n\t\t\t\t// update should result in a value change since we are deselecting a value\n\t\t\t\tthis._shouldEmitValueChange.set(true);\n\t\t\t\tconst value = filteredOptions.map((o) => (o?.value as string) ?? '');\n\t\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tselectedOptions: filteredOptions,\n\t\t\t\t\tvalue: value,\n\t\t\t\t}));\n\t\t\t\tthis._onChange((value ?? null) as T);\n\t\t\t}\n\t\t} else {\n\t\t\tconst selectedOption = selectedOptions[0] ?? null;\n\t\t\tif (selectedOption !== null && !availableOptionSet.has(selectedOption)) {\n\t\t\t\tthis._shouldEmitValueChange.set(true);\n\t\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tselectedOptions: [],\n\t\t\t\t\tvalue: '',\n\t\t\t\t}));\n\t\t\t\tthis._onChange('' as T);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sync the updated options with \"possibleOptions\" in the select service\n\t */\n\tprivate updatePossibleOptions(options: readonly CdkOption[]) {\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tpossibleOptions: options as CdkOption[],\n\t\t}));\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport {\n\tBrnSelectContentComponent,\n\tBrnSelectScrollDownDirective,\n\tBrnSelectScrollUpDirective,\n} from './lib/brn-select-content.component';\nimport { BrnSelectGroupDirective } from './lib/brn-select-group.directive';\nimport { BrnSelectLabelDirective } from './lib/brn-select-label.directive';\nimport { BrnSelectOptionDirective } from './lib/brn-select-option.directive';\nimport { BrnSelectValueComponent } from './lib/brn-select-value.component';\nimport { BrnSelectComponent } from './lib/brn-select.component';\nimport { BrnSelectTriggerDirective } from './lib/brn-select.service';\nexport * from './lib/brn-select-content.component';\nexport * from './lib/brn-select-group.directive';\nexport * from './lib/brn-select-label.directive';\nexport * from './lib/brn-select-option.directive';\nexport * from './lib/brn-select-value.component';\nexport * from './lib/brn-select.component';\nexport * from './lib/brn-select.service';\n\nexport const BrnSelectImports = [\n\tBrnSelectComponent,\n\tBrnSelectContentComponent,\n\tBrnSelectTriggerDirective,\n\tBrnSelectOptionDirective,\n\tBrnSelectValueComponent,\n\tBrnSelectScrollDownDirective,\n\tBrnSelectScrollUpDirective,\n\tBrnSelectGroupDirective,\n\tBrnSelectLabelDirective,\n] as const;\n\n@NgModule({\n\timports: [...BrnSelectImports],\n\texports: [...BrnSelectImports],\n})\nexport class BrnSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;MAwCa,yBAAyB,CAAA;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AACtB,IAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACzC,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACpD,IAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,IAAA,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU;AAC3C,IAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAG,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,CAAA,SAAA,CAAW,CAAC;AACxE,IAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAG,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,CAAA,SAAA,CAAW,CAAC;AACxE,IAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;AAC9D,IAAA,uBAAuB,GAAG,QAAQ,CAAC,MAAK;AACvD,QAAA,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1E,YAAA,OAAO,CAAG,EAAA,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,SAAS;;AAE7E,QAAA,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;AACrC,KAAC,CAAC;A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AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-select.mjs","sources":["../../../../libs/brain/select/src/lib/brn-select.service.ts","../../../../libs/brain/select/src/lib/brn-select-option.directive.ts","../../../../libs/brain/select/src/lib/brn-select-content.component.ts","../../../../libs/brain/select/src/lib/brn-select-group.directive.ts","../../../../libs/brain/select/src/lib/brn-select-label.directive.ts","../../../../libs/brain/select/src/lib/brn-select-value.component.ts","../../../../libs/brain/select/src/lib/brn-select.component.ts","../../../../libs/brain/select/src/index.ts","../../../../libs/brain/select/src/spartan-ng-brain-select.ts"],"sourcesContent":["import type { CdkOption, ListboxValueChangeEvent } from '@angular/cdk/listbox';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterViewInit,\n\tDirective,\n\tElementRef,\n\tInjectable,\n\tOnDestroy,\n\tPLATFORM_ID,\n\tSignal,\n\tcomputed,\n\tinject,\n\tsignal,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { skip } from 'rxjs/operators';\n\n@Directive({\n\tselector: '[brnSelectTrigger]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'combobox',\n\t\t'[attr.id]': 'selectTriggerId()',\n\t\t'[disabled]': 'selectDisable()',\n\t\t'[attr.aria-expanded]': 'isExpanded()',\n\t\t'[attr.aria-controls]': \"selectContentId() + ''\",\n\t\t'[attr.aria-labelledBy]': 'selectTriggerLabelledBy()',\n\t\t'aria-autocomplete': 'none',\n\t\t'[attr.dir]': '_selectService.dir()',\n\t\t'[class.ng-invalid]': 'this._ngControl?.invalid || null',\n\t\t'[class.ng-dirty]': 'this._ngControl?.dirty || null',\n\t\t'[class.ng-valid]': 'this._ngControl?.valid || null',\n\t\t'[class.ng-touched]': 'this._ngControl?.touched || null',\n\t\t'[class.ng-untouched]': 'this._ngControl?.untouched || null',\n\t\t'[class.ng-pristine]': 'this._ngControl?.pristine || null',\n\t\ttype: 'button',\n\t},\n})\nexport class BrnSelectTriggerDirective implements AfterViewInit, OnDestroy {\n\tprivate readonly _el = inject(ElementRef);\n\tprotected readonly _selectService = inject(BrnSelectService);\n\tprotected readonly _ngControl = inject(NgControl, { optional: true });\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\tpublic readonly isExpanded = this._selectService.isExpanded;\n\tpublic readonly selectTriggerId = computed(() => `${this._selectService.id()}--trigger`);\n\tpublic readonly selectContentId = computed(() => `${this._selectService.id()}--content`);\n\tpublic readonly selectDisable = computed(() => this._selectService.disabled());\n\tpublic readonly selectTriggerLabelledBy = computed(() => {\n\t\tif (this._selectService.value() && this._selectService.value().length > 0) {\n\t\t\treturn `${this._selectService.labelId()} ${this._selectService.id()}--value`;\n\t\t}\n\t\treturn this._selectService.labelId();\n\t});\n\n\tprivate _resizeObserver?: ResizeObserver;\n\n\tconstructor() {\n\t\tif (!this._selectService) return;\n\t\tthis._selectService._setSelectTrigger(this);\n\t}\n\n\tngAfterViewInit() {\n\t\tthis._selectService.setTriggerWidth(this._el.nativeElement.offsetWidth);\n\n\t\t// if we are on the client, listen for element resize events\n\t\tif (isPlatformBrowser(this._platform)) {\n\t\t\tthis._resizeObserver = new ResizeObserver(() =>\n\t\t\t\tthis._selectService.setTriggerWidth(this._el.nativeElement.offsetWidth),\n\t\t\t);\n\n\t\t\tthis._resizeObserver.observe(this._el.nativeElement);\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._resizeObserver?.disconnect();\n\t}\n\n\tpublic focus() {\n\t\tthis._el.nativeElement.focus();\n\t}\n}\n\ntype BrnReadDirection = 'ltr' | 'rtl';\n\n@Injectable()\nexport class BrnSelectService {\n\tpublic readonly state = signal<{\n\t\tid: string;\n\t\tlabelId: string;\n\t\tpanelId: string;\n\t\tplaceholder: Signal<string>;\n\t\tisExpanded: boolean;\n\t\tmultiple: Signal<boolean>;\n\t\tdisabled: Signal<boolean>;\n\t\tdisabledBySetDisabled: Signal<boolean>;\n\t\tdir: Signal<BrnReadDirection>;\n\t\tselectedOptions: Array<CdkOption | null>;\n\t\tpossibleOptions: Array<CdkOption | null>;\n\t\tvalue: string | string[];\n\t\ttriggerWidth: number;\n\t}>({\n\t\tid: '',\n\t\tlabelId: '',\n\t\tpanelId: '',\n\t\tisExpanded: false,\n\t\tplaceholder: signal(''),\n\t\tmultiple: signal(false),\n\t\tdisabled: signal(false),\n\t\tdisabledBySetDisabled: signal(false),\n\t\tdir: signal('ltr' as BrnReadDirection),\n\t\tselectedOptions: [],\n\t\tpossibleOptions: [],\n\t\tvalue: '',\n\t\ttriggerWidth: 0,\n\t});\n\n\tpublic readonly id = computed(() => this.state().id);\n\tpublic readonly labelId = computed(() => this.state().labelId);\n\tpublic readonly panelId = computed(() => this.state().panelId);\n\tpublic readonly placeholder = computed(() => this.state().placeholder());\n\tpublic readonly disabled = computed(() => this.state().disabled() || this.state().disabledBySetDisabled());\n\tpublic readonly isExpanded = computed(() => this.state().isExpanded);\n\tpublic readonly multiple = computed(() => this.state().multiple());\n\tpublic readonly dir = computed(() => this.state().dir());\n\tpublic readonly selectedOptions = computed(() => this.state().selectedOptions);\n\tpublic readonly value = computed(() => this.state().value);\n\tpublic readonly triggerWidth = computed(() => this.state().triggerWidth);\n\tpublic readonly possibleOptions = computed(() => this.state().possibleOptions);\n\n\tprivate readonly _multiple$ = toObservable(this.multiple);\n\n\tpublic readonly listBoxValueChangeEvent$ = new Subject<ListboxValueChangeEvent<unknown>>();\n\n\tprivate _selectTrigger?: BrnSelectTriggerDirective;\n\tpublic get selectTrigger() {\n\t\treturn this._selectTrigger;\n\t}\n\n\tconstructor() {\n\t\tthis.listBoxValueChangeEvent$.pipe(takeUntilDestroyed()).subscribe((listBoxChange) => {\n\t\t\tconst updatedSelections = this.multiple() ? this.getUpdatedOptions(listBoxChange) : [listBoxChange.option];\n\t\t\tconst value = this.multiple() ? listBoxChange.value : listBoxChange.value[0];\n\t\t\tthis.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tselectedOptions: [...updatedSelections],\n\t\t\t\tvalue: value as string | string[],\n\t\t\t}));\n\t\t});\n\n\t\t// We need to skip the first value because we don't want to deselect all options when the component is initialized with a preselected value e.g. by the form control\n\t\tthis._multiple$.pipe(skip(1), takeUntilDestroyed()).subscribe((multiple) => {\n\t\t\tif (!multiple && this.value().length > 1) {\n\t\t\t\tthis.deselectAllOptions();\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic setTriggerWidth(triggerWidth: number) {\n\t\tthis.state.update((s) => ({ ...s, triggerWidth }));\n\t}\n\n\tpublic getUpdatedOptions(latestListboxChange: ListboxValueChangeEvent<unknown>): Array<CdkOption | null> {\n\t\tconst isNewSelection = latestListboxChange.value.findIndex((value) => value === latestListboxChange.option?.value);\n\t\tif (isNewSelection === -1) {\n\t\t\tconst removedOptionIndex = this.selectedOptions().findIndex((option) => latestListboxChange.option === option);\n\t\t\tconst options = this.selectedOptions();\n\t\t\toptions.splice(removedOptionIndex, 1);\n\t\t\treturn options;\n\t\t}\n\t\treturn [...this.selectedOptions(), latestListboxChange.option];\n\t}\n\n\tpublic deselectAllOptions() {\n\t\tthis.state.update((state) => ({\n\t\t\t...state,\n\t\t\tselectedOptions: [],\n\t\t\tvalue: [],\n\t\t}));\n\t}\n\n\t// Needed due to https://github.com/angular/angular/issues/20810\n\tpublic _setSelectTrigger(trigger: BrnSelectTriggerDirective) {\n\t\tthis._selectTrigger = trigger;\n\t}\n\n\tpublic setInitialSelectedOptions(value: unknown) {\n\t\tthis.selectOptionByValue(value);\n\t\tthis.state.update((state) => ({\n\t\t\t...state,\n\t\t\tvalue: value as string | string[],\n\t\t\tinitialSelectedOptions: this.selectedOptions(),\n\t\t\tselectedOptions: this.selectedOptions(),\n\t\t}));\n\t}\n\n\t/**\n\t * Sync the updated options with \"possibleOptions\" in the select service\n\t */\n\tpublic updatePossibleOptions(options: readonly CdkOption[]) {\n\t\tthis.state.update((state) => ({\n\t\t\t...state,\n\t\t\tpossibleOptions: options as CdkOption[],\n\t\t}));\n\t}\n\n\tprivate selectOptionByValue(value: unknown) {\n\t\tconst options = this.possibleOptions();\n\t\tif (value === null || value === undefined) {\n\t\t\tconst nullOrUndefinedOption = options.find((o) => o && o.value === value);\n\t\t\tif (!nullOrUndefinedOption) {\n\t\t\t\tthis.state.update((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tselectedOptions: [],\n\t\t\t\t\tvalue: this.multiple() ? [] : '',\n\t\t\t\t}));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (this.multiple()) {\n\t\t\tconst selectedOptions = options.filter((option) => {\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\treturn value.includes(option?.value as string);\n\t\t\t\t}\n\t\t\t\treturn value === option?.value;\n\t\t\t});\n\t\t\tthis.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tselectedOptions,\n\t\t\t\tvalue: value as string[],\n\t\t\t}));\n\t\t} else {\n\t\t\tconst selectedOption = options.find((option) => option?.value === value);\n\t\t\tif (!selectedOption) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tselectedOptions: [selectedOption as CdkOption | null],\n\t\t\t\tvalue: selectedOption.value as string,\n\t\t\t}));\n\t\t}\n\t}\n}\n","import type { FocusableOption } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { CdkOption } from '@angular/cdk/listbox';\nimport {\n\tAfterContentChecked,\n\tDirective,\n\tElementRef,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { BrnSelectService } from './brn-select.service';\n\n@Directive({\n\tselector: '[brnOption]',\n\tstandalone: true,\n\thostDirectives: [CdkOption],\n\thost: {\n\t\t'(mouseenter)': 'hover()',\n\t\t'(blur)': 'blur()',\n\t\t'[attr.dir]': '_selectService.dir()',\n\t\t'[attr.data-disabled]': \"disabledSignal() ? '' : undefined\",\n\t},\n})\nexport class BrnSelectOptionDirective implements FocusableOption, AfterContentChecked {\n\tprivate readonly _cdkSelectOption = inject(CdkOption, { host: true });\n\tprotected readonly _selectService = inject(BrnSelectService);\n\n\tprivate readonly _focused = signal<boolean>(false);\n\tpublic readonly elementRef = inject(ElementRef);\n\n\tpublic readonly selected = computed(() => {\n\t\tif (Array.isArray(this._selectService.value())) {\n\t\t\tconst itemFound = (this._selectService.value() as Array<unknown>).find(\n\t\t\t\t(val) => val === this._cdkSelectOption.value,\n\t\t\t);\n\t\t\treturn !!itemFound;\n\t\t}\n\t\treturn this._cdkSelectOption.value === this._selectService.value();\n\t});\n\tpublic readonly focused = computed(() => this._focused());\n\tpublic readonly checkedState = computed(() => (this.selected() ? 'checked' : 'unchecked'));\n\tpublic readonly dir = computed(() => this._selectService.dir());\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tthis._cdkSelectOption.value = this.value();\n\t\t});\n\t\teffect(() => {\n\t\t\tthis._cdkSelectOption.disabled = this.disabledSignal();\n\t\t});\n\t}\n\tngAfterContentChecked(): void {\n\t\tthis._cdkSelectOption.value = this.value();\n\t}\n\n\tpublic value = input<unknown | null>(null);\n\n\t// we use \"disabledSignal\" here because disabled is already defined in the FocusableOption interface\n\tpublic readonly disabledSignal = input<boolean, BooleanInput>(false, {\n\t\talias: 'disabled',\n\t\ttransform: booleanAttribute,\n\t});\n\n\tprotected hover(): void {\n\t\tthis.focus();\n\t}\n\n\tpublic focus(): void {\n\t\tthis._cdkSelectOption.focus();\n\t\tthis._focused.set(true);\n\t}\n\n\tpublic blur(): void {\n\t\tthis._focused.set(false);\n\t}\n}\n","import { CdkListbox, type ListboxValueChangeEvent } from '@angular/cdk/listbox';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n\ttype AfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDestroyRef,\n\tElementRef,\n\tcontentChild,\n\tcontentChildren,\n\teffect,\n\tinject,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { BrnSelectOptionDirective } from './brn-select-option.directive';\nimport { BrnSelectService } from './brn-select.service';\n\nimport { Directive } from '@angular/core';\nimport { Subject, fromEvent, interval } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nconst SCROLLBY_PIXELS = 100;\n\n@Directive({\n\tselector: '[brnSelectScrollUp], brn-select-scroll-up, hlm-select-scroll-up:not(noHlm)',\n\tstandalone: true,\n\thost: {\n\t\t'aria-hidden': 'true',\n\t\t'(mouseenter)': 'startEmittingEvents()',\n\t},\n})\nexport class BrnSelectScrollUpDirective {\n\tprivate readonly _el = inject(ElementRef);\n\tprivate readonly _selectContent = inject(BrnSelectContentComponent);\n\n\tprivate readonly _endReached = new Subject<boolean>();\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\n\tpublic startEmittingEvents(): void {\n\t\tconst mouseLeave$ = fromEvent(this._el.nativeElement, 'mouseleave');\n\n\t\tinterval(100)\n\t\t\t.pipe(takeUntil(mouseLeave$), takeUntil(this._endReached), takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe(() => this._selectContent.moveFocusUp());\n\t}\n\n\tpublic stopEmittingEvents(): void {\n\t\tthis._endReached.next(true);\n\t}\n}\n\n@Directive({\n\tselector: '[brnSelectScrollDown], brn-select-scroll-down, hlm-select-scroll-down:not(noHlm)',\n\tstandalone: true,\n\thost: {\n\t\t'aria-hidden': 'true',\n\t\t'(mouseenter)': 'startEmittingEvents()',\n\t},\n})\nexport class BrnSelectScrollDownDirective {\n\tprivate readonly _el = inject(ElementRef);\n\tprivate readonly _selectContent = inject(BrnSelectContentComponent);\n\n\tprivate readonly _endReached = new Subject<boolean>();\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\n\tpublic startEmittingEvents(): void {\n\t\tconst mouseLeave$ = fromEvent(this._el.nativeElement, 'mouseleave');\n\n\t\tinterval(100)\n\t\t\t.pipe(takeUntil(mouseLeave$), takeUntil(this._endReached), takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe(() => this._selectContent.moveFocusDown());\n\t}\n\n\tpublic stopEmittingEvents(): void {\n\t\tthis._endReached.next(true);\n\t}\n}\n\n@Component({\n\tselector: 'brn-select-content, hlm-select-content:not(noHlm)',\n\tstandalone: true,\n\timports: [BrnSelectScrollUpDirective, BrnSelectScrollDownDirective, NgTemplateOutlet],\n\thostDirectives: [CdkListbox],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\t'[attr.aria-labelledBy]': 'labelledBy()',\n\t\t'[attr.aria-controlledBy]': \"id() +'--trigger'\",\n\t\t'[id]': \"id() + '--content'\",\n\t\t'[attr.dir]': '_selectService.dir()',\n\t},\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: flex;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tflex-direction: column;\n\t\t\t\toutline: none;\n\t\t\t\tpointer-events: auto;\n\t\t\t}\n\n\t\t\t[data-brn-select-viewport] {\n\t\t\t\tscrollbar-width: none;\n\t\t\t\t-ms-overflow-style: none;\n\t\t\t\t-webkit-overflow-scrolling: touch;\n\t\t\t}\n\n\t\t\t[data-brn-select-viewport]::-webkit-scrollbar {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t`,\n\t],\n\ttemplate: `\n\t\t<ng-template #scrollUp>\n\t\t\t<ng-content select=\"hlm-select-scroll-up\" />\n\t\t\t<ng-content select=\"brnSelectScrollUp\" />\n\t\t</ng-template>\n\t\t<ng-container *ngTemplateOutlet=\"canScrollUp() && scrollUpBtn() ? scrollUp : null\" />\n\t\t<div\n\t\t\tdata-brn-select-viewport\n\t\t\t#viewport\n\t\t\t(scroll)=\"handleScroll()\"\n\t\t\tstyle=\"flex: 1 1 0%;\n\t\t\tposition: relative;\n\t\t\twidth:100%;\n\t\t\toverflow:auto;\n\t\t\tmin-height: 36px;\n padding-bottom: 2px;\n margin-bottom: -2px;\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</div>\n\t\t<ng-template #scrollDown>\n\t\t\t<ng-content select=\"brnSelectScrollDown\" />\n\t\t\t<ng-content select=\"hlm-select-scroll-down\" />\n\t\t</ng-template>\n\t\t<ng-container *ngTemplateOutlet=\"canScrollDown() && scrollDownBtn() ? scrollDown : null\" />\n\t`,\n})\nexport class BrnSelectContentComponent implements AfterViewInit {\n\tprivate readonly _el: ElementRef<HTMLElement> = inject(ElementRef);\n\tprivate readonly _cdkListbox = inject(CdkListbox, { host: true });\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprotected readonly _selectService = inject(BrnSelectService);\n\n\tprotected readonly labelledBy = this._selectService.labelId;\n\tprotected readonly id = this._selectService.id;\n\tprotected readonly canScrollUp = signal(false);\n\tprotected readonly canScrollDown = signal(false);\n\n\tprotected initialSelectedOptions$ = toObservable(this._selectService.selectedOptions);\n\n\tprotected viewport = viewChild.required<ElementRef<HTMLElement>>('viewport');\n\n\tprotected scrollUpBtn = contentChild(BrnSelectScrollUpDirective);\n\n\tprotected scrollDownBtn = contentChild(BrnSelectScrollDownDirective);\n\n\tprotected _options = contentChildren(BrnSelectOptionDirective, { descendants: true });\n\n\tconstructor() {\n\t\tthis._cdkListbox.valueChange\n\t\t\t.asObservable()\n\t\t\t.pipe(takeUntilDestroyed())\n\t\t\t.subscribe((val: ListboxValueChangeEvent<unknown>) => this._selectService.listBoxValueChangeEvent$.next(val));\n\n\t\teffect(() => {\n\t\t\tthis._cdkListbox.multiple = this._selectService.multiple();\n\t\t\tthis._selectService.isExpanded() && setTimeout(() => this.updateArrowDisplay());\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\tthis.setInitiallySelectedOptions();\n\t}\n\n\tprivate setInitiallySelectedOptions() {\n\t\tthis.initialSelectedOptions$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((selectedOptions) => {\n\t\t\t// Reapplying cdkLibstbox multiple because seems this is running before effect that\n\t\t\t// updates cdklistbox, reapplying multiple true so we can set the multiple initial options\n\t\t\tif (this._selectService.multiple()) {\n\t\t\t\tthis._cdkListbox.multiple = true;\n\t\t\t}\n\n\t\t\tfor (const cdkOption of this._selectService.possibleOptions()) {\n\t\t\t\tif (selectedOptions.includes(cdkOption)) {\n\t\t\t\t\tcdkOption?.select();\n\t\t\t\t} else {\n\t\t\t\t\tcdkOption?.deselect();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const cdkOption of selectedOptions) {\n\t\t\t\tcdkOption?.select();\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic updateArrowDisplay(): void {\n\t\tconst { scrollTop, scrollHeight, clientHeight } = this.viewport().nativeElement;\n\t\tthis.canScrollUp.set(scrollTop > 0);\n\t\tconst maxScroll = scrollHeight - clientHeight;\n\t\tthis.canScrollDown.set(Math.ceil(scrollTop) < maxScroll);\n\t}\n\n\tpublic handleScroll() {\n\t\tthis.updateArrowDisplay();\n\t}\n\n\tpublic focusList(): void {\n\t\tthis._cdkListbox.focus();\n\t}\n\n\tpublic moveFocusUp() {\n\t\tthis.viewport().nativeElement.scrollBy({ top: -SCROLLBY_PIXELS, behavior: 'smooth' });\n\t\tif (this.viewport().nativeElement.scrollTop === 0) {\n\t\t\tthis.scrollUpBtn()?.stopEmittingEvents();\n\t\t}\n\t}\n\n\tpublic moveFocusDown() {\n\t\tthis.viewport().nativeElement.scrollBy({ top: SCROLLBY_PIXELS, behavior: 'smooth' });\n\t\tconst viewportSize = this._el.nativeElement.scrollHeight;\n\t\tconst viewportScrollPosition = this.viewport().nativeElement.scrollTop;\n\t\tif (\n\t\t\tviewportSize + viewportScrollPosition + SCROLLBY_PIXELS >\n\t\t\tthis.viewport().nativeElement.scrollHeight + SCROLLBY_PIXELS / 2\n\t\t) {\n\t\t\tthis.scrollDownBtn()?.stopEmittingEvents();\n\t\t}\n\t}\n}\n","import { Directive, signal } from '@angular/core';\n\n@Directive({\n\tselector: '[brnSelectGroup]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.aria-labelledby]': 'labelledBy()',\n\t},\n})\nexport class BrnSelectGroupDirective {\n\tpublic readonly labelledBy = signal('');\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnLabelDirective } from '@spartan-ng/brain/label';\nimport { BrnSelectGroupDirective } from './brn-select-group.directive';\n\n@Directive({\n\tselector: '[brnSelectLabel]',\n\thostDirectives: [BrnLabelDirective],\n\tstandalone: true,\n})\nexport class BrnSelectLabelDirective {\n\tprivate readonly _group = inject(BrnSelectGroupDirective, { optional: true });\n\tprivate readonly _label = inject(BrnLabelDirective, { host: true });\n\n\tconstructor() {\n\t\tthis._group?.labelledBy.set(this._label.id());\n\t}\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, inject, input } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { BrnSelectService } from './brn-select.service';\n\n@Component({\n\tselector: 'brn-select-value, hlm-select-value',\n\ttemplate: `\n\t\t{{ value || placeholder() }}\n\t`,\n\thost: {\n\t\t'[id]': 'id()',\n\t},\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: -webkit-box;\n\t\t\t\t-webkit-box-orient: vertical;\n\t\t\t\t-webkit-line-clamp: 1;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t`,\n\t],\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnSelectValueComponent {\n\tprivate readonly _selectService = inject(BrnSelectService);\n\n\tpublic readonly id = computed(() => `${this._selectService.id()}--value`);\n\tpublic readonly placeholder = computed(() => this._selectService.placeholder());\n\tpublic value: string | null = null;\n\n\tpublic readonly transformFn = input<(values: (string | undefined)[]) => any>((values) => (values ?? []).join(', '));\n\n\tconstructor() {\n\t\tconst cdr = inject(ChangeDetectorRef);\n\n\t\t// In certain cases (when using a computed signal for value) where the value of the select and the options are\n\t\t// changed dynamically, the template does not update until the next frame. To work around this we can use a simple\n\t\t// string variable in the template and manually trigger change detection when we update it.\n\t\ttoObservable(this._selectService.selectedOptions)\n\t\t\t.pipe(takeUntilDestroyed())\n\t\t\t.subscribe((value) => {\n\t\t\t\tif (value.length === 0) {\n\t\t\t\t\tthis.value = null;\n\t\t\t\t\tcdr.detectChanges();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst selectedLabels = value.map((selectedOption) => selectedOption?.getLabel());\n\n\t\t\t\tif (this._selectService.dir() === 'rtl') {\n\t\t\t\t\tselectedLabels.reverse();\n\t\t\t\t}\n\t\t\t\tconst result = this.transformFn()(selectedLabels);\n\t\t\t\tthis.value = result;\n\t\t\t\tcdr.detectChanges();\n\t\t\t});\n\t}\n}\n","import { CdkListbox, CdkListboxModule, CdkOption } from '@angular/cdk/listbox';\nimport {\n\tCdkConnectedOverlay,\n\ttype ConnectedOverlayPositionChange,\n\ttype ConnectedPosition,\n\tOverlayModule,\n} from '@angular/cdk/overlay';\nimport {\n\tAfterContentInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\ttype DoCheck,\n\ttype Signal,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport {\n\ttype ExposesSide,\n\ttype ExposesState,\n\tprovideExposedSideProviderExisting,\n\tprovideExposesStateProviderExisting,\n} from '@spartan-ng/brain/core';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ChangeFn, ErrorStateMatcher, ErrorStateTracker, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnLabelDirective } from '@spartan-ng/brain/label';\nimport { Subject, combineLatest, of } from 'rxjs';\nimport { delay, map, switchMap } from 'rxjs/operators';\nimport { BrnSelectContentComponent } from './brn-select-content.component';\nimport { BrnSelectService } from './brn-select.service';\n\nexport type BrnReadDirection = 'ltr' | 'rtl';\n\nlet nextId = 0;\n\n@Component({\n\tselector: 'brn-select, hlm-select',\n\tstandalone: true,\n\timports: [OverlayModule, CdkListboxModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\tBrnSelectService,\n\t\tCdkListbox,\n\t\tprovideExposedSideProviderExisting(() => BrnSelectComponent),\n\t\tprovideExposesStateProviderExisting(() => BrnSelectComponent),\n\t\t{\n\t\t\tprovide: BrnFormFieldControl,\n\t\t\tuseExisting: BrnSelectComponent,\n\t\t},\n\t],\n\ttemplate: `\n\t\t@if (!labelProvided() && placeholder()) {\n\t\t\t<label class=\"hidden\" [attr.id]=\"backupLabelId()\">{{ placeholder() }}</label>\n\t\t} @else {\n\t\t\t<ng-content select=\"label[hlmLabel],label[brnLabel]\" />\n\t\t}\n\n\t\t<div cdk-overlay-origin (click)=\"toggle()\" #trigger=\"cdkOverlayOrigin\">\n\t\t\t<ng-content select=\"hlm-select-trigger,[brnSelectTrigger]\" />\n\t\t</div>\n\t\t<ng-template\n\t\t\tcdk-connected-overlay\n\t\t\tcdkConnectedOverlayLockPosition\n\t\t\tcdkConnectedOverlayHasBackdrop\n\t\t\tcdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n\t\t\t[cdkConnectedOverlayOrigin]=\"trigger\"\n\t\t\t[cdkConnectedOverlayOpen]=\"_delayedExpanded()\"\n\t\t\t[cdkConnectedOverlayPositions]=\"_positions\"\n\t\t\t[cdkConnectedOverlayWidth]=\"triggerWidth() > 0 ? triggerWidth() : 'auto'\"\n\t\t\t(backdropClick)=\"close()\"\n\t\t\t(detach)=\"close()\"\n\t\t\t(positionChange)=\"_positionChanges$.next($event)\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</ng-template>\n\t`,\n})\nexport class BrnSelectComponent<T = unknown>\n\timplements ControlValueAccessor, AfterContentInit, DoCheck, ExposesSide, ExposesState, BrnFormFieldControl\n{\n\tprivate readonly _selectService = inject(BrnSelectService);\n\n\tpublic readonly triggerWidth = this._selectService.triggerWidth;\n\n\tpublic readonly multiple = input<boolean>(false);\n\tpublic readonly placeholder = input<string>('');\n\tpublic readonly disabled = input<boolean>(false);\n\tpublic readonly dir = input<BrnReadDirection>('ltr');\n\tprivate readonly _disabledFromSetDisabledState = signal(false);\n\n\tprotected selectLabel = contentChild(BrnLabelDirective, { descendants: false });\n\t/** Overlay pane containing the options. */\n\tprotected selectContent = contentChild.required(BrnSelectContentComponent);\n\n\tprotected options = contentChildren(CdkOption, { descendants: true });\n\tprotected options$ = toObservable(this.options);\n\tprotected optionsAndIndex$ = this.options$.pipe(map((options, index) => [options, index] as const));\n\n\t/** Overlay pane containing the options. */\n\tprotected _overlayDir = viewChild(CdkConnectedOverlay);\n\n\tpublic readonly openedChange = output<boolean>();\n\n\tpublic readonly closeDelay = input<number>(100);\n\tpublic readonly isExpanded = this._selectService.isExpanded;\n\tprotected readonly _delayedExpanded = toSignal(\n\t\ttoObservable(this.isExpanded).pipe(\n\t\t\tswitchMap((expanded) => (!expanded ? of(expanded).pipe(delay(this.closeDelay())) : of(expanded))),\n\t\t\ttakeUntilDestroyed(),\n\t\t),\n\t\t{ initialValue: false },\n\t);\n\tpublic readonly state = computed(() => (this.isExpanded() ? 'open' : 'closed'));\n\n\tprotected readonly _positionChanges$ = new Subject<ConnectedOverlayPositionChange>();\n\tpublic readonly side: Signal<'top' | 'bottom' | 'left' | 'right'> = toSignal(\n\t\tthis._positionChanges$.pipe(\n\t\t\tmap<ConnectedOverlayPositionChange, 'top' | 'bottom' | 'left' | 'right'>((change) =>\n\t\t\t\t// todo: better translation or adjusting hlm to take that into account\n\t\t\t\tchange.connectionPair.originY === 'center'\n\t\t\t\t\t? change.connectionPair.originX === 'start'\n\t\t\t\t\t\t? 'left'\n\t\t\t\t\t\t: 'right'\n\t\t\t\t\t: change.connectionPair.originY,\n\t\t\t),\n\t\t),\n\t\t{ initialValue: 'bottom' },\n\t);\n\n\tpublic readonly backupLabelId = computed(() => this._selectService.labelId());\n\tpublic readonly labelProvided = signal(false);\n\n\tpublic readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onChange: ChangeFn<T> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\tprivate readonly _shouldEmitValueChange = signal(false);\n\n\t/*\n\t * This position config ensures that the top \"start\" corner of the overlay\n\t * is aligned with with the top \"start\" of the origin by default (overlapping\n\t * the trigger completely). If the panel cannot fit below the trigger, it\n\t * will fall back to a position above the trigger.\n\t */\n\tprotected _positions: ConnectedPosition[] = [\n\t\t{\n\t\t\toriginX: 'start',\n\t\t\toriginY: 'bottom',\n\t\t\toverlayX: 'start',\n\t\t\toverlayY: 'top',\n\t\t},\n\t\t{\n\t\t\toriginX: 'end',\n\t\t\toriginY: 'bottom',\n\t\t\toverlayX: 'end',\n\t\t\toverlayY: 'top',\n\t\t},\n\t\t{\n\t\t\toriginX: 'start',\n\t\t\toriginY: 'top',\n\t\t\toverlayX: 'start',\n\t\t\toverlayY: 'bottom',\n\t\t},\n\t\t{\n\t\t\toriginX: 'end',\n\t\t\toriginY: 'top',\n\t\t\toverlayX: 'end',\n\t\t\toverlayY: 'bottom',\n\t\t},\n\t];\n\n\tpublic errorStateTracker: ErrorStateTracker;\n\n\tprivate readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n\tprivate readonly _parentForm = inject(NgForm, { optional: true });\n\tprivate readonly _parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n\tpublic errorState = computed(() => this.errorStateTracker.errorState());\n\n\tpublic writeValue$ = new Subject<T>();\n\n\tconstructor() {\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tmultiple: this.multiple,\n\t\t\tplaceholder: this.placeholder,\n\t\t\tdisabled: this.disabled,\n\t\t\tdisabledBySetDisabled: this._disabledFromSetDisabledState,\n\t\t\tdir: this.dir,\n\t\t}));\n\t\tthis.handleOptionChanges();\n\t\tthis.handleInitialOptionSelect();\n\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tid: `brn-select-${nextId++}`,\n\t\t}));\n\t\tif (this.ngControl !== null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\t// Watch for Listbox Selection Changes to trigger Collapse and Value Change\n\t\tthis._selectService.listBoxValueChangeEvent$.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\tif (!this.multiple()) {\n\t\t\t\tthis.close();\n\t\t\t}\n\n\t\t\t// we set shouldEmitValueChange to true because we want to propagate the value change\n\t\t\t// as a result of user interaction\n\t\t\tthis._shouldEmitValueChange.set(true);\n\t\t});\n\n\t\t/**\n\t\t * Listening to value changes in order to trigger forms api on change\n\t\t * ShouldEmitValueChange simply ensures we only propagate value change when a user makes a selection\n\t\t * we don't propagate changes made from outside the component (ex. patch value or initial value from form control)\n\t\t */\n\t\ttoObservable(this._selectService.value).subscribe((value) => {\n\t\t\tif (this._shouldEmitValueChange()) {\n\t\t\t\tthis._onChange((value ?? null) as T);\n\t\t\t}\n\t\t\tthis._shouldEmitValueChange.set(true);\n\t\t});\n\n\t\tthis.errorStateTracker = new ErrorStateTracker(\n\t\t\tthis._defaultErrorStateMatcher,\n\t\t\tthis.ngControl,\n\t\t\tthis._parentFormGroup,\n\t\t\tthis._parentForm,\n\t\t);\n\t}\n\n\tpublic ngAfterContentInit(): void {\n\t\t// Check if Label Directive Provided and pass to service\n\t\tconst label = this.selectLabel();\n\t\tif (label) {\n\t\t\tthis.labelProvided.set(true);\n\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tlabelId: label.id(),\n\t\t\t}));\n\t\t} else if (this.placeholder()) {\n\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t...state,\n\t\t\t\tlabelId: `${state.id}--label`,\n\t\t\t}));\n\t\t}\n\t}\n\n\tngDoCheck() {\n\t\tthis.errorStateTracker.updateErrorState();\n\t}\n\n\tpublic toggle(): void {\n\t\tif (this.isExpanded()) {\n\t\t\tthis.close();\n\t\t} else {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tpublic open(): void {\n\t\tif (!this._canOpen()) return;\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tisExpanded: true,\n\t\t}));\n\t\tthis.openedChange.emit(true);\n\t\tthis._moveFocusToCDKList();\n\t}\n\n\tpublic close(): void {\n\t\tif (!this.isExpanded()) return;\n\n\t\tif (this._selectService.selectTrigger) {\n\t\t\tthis._selectService.selectTrigger.focus();\n\t\t}\n\n\t\tthis.openedChange.emit(false);\n\t\tthis._selectService.state.update((state) => ({\n\t\t\t...state,\n\t\t\tisExpanded: false,\n\t\t}));\n\t\tthis._onTouched();\n\t}\n\n\tprotected _canOpen(): boolean {\n\t\treturn !this.isExpanded() && !this.disabled() && this.options()?.length > 0;\n\t}\n\n\tprivate _moveFocusToCDKList(): void {\n\t\tsetTimeout(() => {\n\t\t\tthis.selectContent()?.focusList();\n\t\t});\n\t}\n\n\tpublic writeValue(value: T): void {\n\t\tthis.writeValue$.next(value);\n\t}\n\n\tpublic registerOnChange(fn: ChangeFn<T>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\tpublic registerOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\tpublic setDisabledState(isDisabled: boolean) {\n\t\tthis._disabledFromSetDisabledState.set(isDisabled);\n\t}\n\n\t/**\n\t * Once writeValue is called and options are available we can handle setting the initial options\n\t * @private\n\t */\n\tprivate handleInitialOptionSelect() {\n\t\t// Write value cannot be handled until options are available, so we wait until both are available with a combineLatest\n\t\tcombineLatest([this.writeValue$, this.options$])\n\t\t\t.pipe(\n\t\t\t\tmap((values, index) => [...values, index]),\n\t\t\t\ttakeUntilDestroyed(),\n\t\t\t)\n\t\t\t.subscribe(([value, _, index]) => {\n\t\t\t\tthis._shouldEmitValueChange.set(false);\n\t\t\t\tthis._selectService.setInitialSelectedOptions(value);\n\t\t\t\t// the first time this observable emits a value we are simply setting the initial state\n\t\t\t\t// this change should not count as changing the state of the select, so we need to mark as pristine\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tthis.ngControl?.control?.markAsPristine();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * When options change, our current selected options may become invalid\n\t * Here we will automatically update our current selected options so that they are always inline with the possibleOptions\n\t * @private\n\t */\n\tprivate handleOptionChanges() {\n\t\tthis.optionsAndIndex$.pipe(takeUntilDestroyed()).subscribe(([options, index]) => {\n\t\t\tif (index > 0) {\n\t\t\t\tthis.handleInvalidOptions(options);\n\t\t\t}\n\t\t\tthis._selectService.updatePossibleOptions(options);\n\t\t});\n\t}\n\n\t/**\n\t * Check that our \"selectedOptions\" are still valid when \"possibleOptions\" is about to be updated\n\t */\n\tprivate handleInvalidOptions(options: readonly CdkOption[]) {\n\t\tconst selectedOptions = this._selectService.selectedOptions();\n\t\tconst availableOptionSet = new Set<CdkOption | null>(options);\n\t\tif (this._selectService.multiple()) {\n\t\t\tconst filteredOptions = selectedOptions.filter((o) => availableOptionSet.has(o));\n\t\t\tif (selectedOptions.length !== filteredOptions.length) {\n\t\t\t\tconst value = filteredOptions.map((o) => (o?.value as string) ?? '');\n\t\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tselectedOptions: filteredOptions,\n\t\t\t\t\tvalue: value,\n\t\t\t\t}));\n\t\t\t}\n\t\t} else {\n\t\t\tconst selectedOption = selectedOptions[0] ?? null;\n\t\t\tif (selectedOption !== null && !availableOptionSet.has(selectedOption)) {\n\t\t\t\tthis._selectService.state.update((state) => ({\n\t\t\t\t\t...state,\n\t\t\t\t\tselectedOptions: [],\n\t\t\t\t\tvalue: '',\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport {\n\tBrnSelectContentComponent,\n\tBrnSelectScrollDownDirective,\n\tBrnSelectScrollUpDirective,\n} from './lib/brn-select-content.component';\nimport { BrnSelectGroupDirective } from './lib/brn-select-group.directive';\nimport { BrnSelectLabelDirective } from './lib/brn-select-label.directive';\nimport { BrnSelectOptionDirective } from './lib/brn-select-option.directive';\nimport { BrnSelectValueComponent } from './lib/brn-select-value.component';\nimport { BrnSelectComponent } from './lib/brn-select.component';\nimport { BrnSelectTriggerDirective } from './lib/brn-select.service';\nexport * from './lib/brn-select-content.component';\nexport * from './lib/brn-select-group.directive';\nexport * from './lib/brn-select-label.directive';\nexport * from './lib/brn-select-option.directive';\nexport * from './lib/brn-select-value.component';\nexport * from './lib/brn-select.component';\nexport * from './lib/brn-select.service';\n\nexport const BrnSelectImports = [\n\tBrnSelectComponent,\n\tBrnSelectContentComponent,\n\tBrnSelectTriggerDirective,\n\tBrnSelectOptionDirective,\n\tBrnSelectValueComponent,\n\tBrnSelectScrollDownDirective,\n\tBrnSelectScrollUpDirective,\n\tBrnSelectGroupDirective,\n\tBrnSelectLabelDirective,\n] as const;\n\n@NgModule({\n\timports: [...BrnSelectImports],\n\texports: [...BrnSelectImports],\n})\nexport class BrnSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;MAwCa,yBAAyB,CAAA;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AACtB,IAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACzC,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACpD,IAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,IAAA,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU;AAC3C,IAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAG,IAAI,CAAC,cAAc,CAAC,EAAE,E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AA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAf3B,kBAAkB,CAAA,EAAA,CAAA;;2FAeN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC9B,iBAAA;;;ACnCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/brain",
3
- "version": "0.0.1-alpha.400",
3
+ "version": "0.0.1-alpha.402",
4
4
  "sideEffects": false,
5
5
  "exports": {
6
6
  "./hlm-tailwind-preset": {
@@ -51,18 +51,18 @@
51
51
  "esm": "./esm2022/collapsible/spartan-ng-brain-collapsible.mjs",
52
52
  "default": "./fesm2022/spartan-ng-brain-collapsible.mjs"
53
53
  },
54
- "./command": {
55
- "types": "./command/index.d.ts",
56
- "esm2022": "./esm2022/command/spartan-ng-brain-command.mjs",
57
- "esm": "./esm2022/command/spartan-ng-brain-command.mjs",
58
- "default": "./fesm2022/spartan-ng-brain-command.mjs"
59
- },
60
54
  "./core": {
61
55
  "types": "./core/index.d.ts",
62
56
  "esm2022": "./esm2022/core/spartan-ng-brain-core.mjs",
63
57
  "esm": "./esm2022/core/spartan-ng-brain-core.mjs",
64
58
  "default": "./fesm2022/spartan-ng-brain-core.mjs"
65
59
  },
60
+ "./command": {
61
+ "types": "./command/index.d.ts",
62
+ "esm2022": "./esm2022/command/spartan-ng-brain-command.mjs",
63
+ "esm": "./esm2022/command/spartan-ng-brain-command.mjs",
64
+ "default": "./fesm2022/spartan-ng-brain-command.mjs"
65
+ },
66
66
  "./date-time": {
67
67
  "types": "./date-time/index.d.ts",
68
68
  "esm2022": "./esm2022/date-time/spartan-ng-brain-date-time.mjs",
@@ -27,7 +27,7 @@ export declare class BrnRadioComponent<T = unknown> implements OnDestroy {
27
27
  /**
28
28
  * The unique ID for the radio button input. If none is supplied, it will be auto-generated.
29
29
  */
30
- readonly id: import("@angular/core").InputSignal<string>;
30
+ readonly id: import("@angular/core").InputSignal<string | undefined>;
31
31
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
32
32
  readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
33
33
  readonly ariaDescribedby: import("@angular/core").InputSignal<string | undefined>;
@@ -43,6 +43,7 @@ export declare class BrnRadioComponent<T = unknown> implements OnDestroy {
43
43
  * Event emitted when the checked state of this radio button changes.
44
44
  */
45
45
  readonly change: import("@angular/core").OutputEmitterRef<BrnRadioChange<T>>;
46
+ protected readonly hostId: import("@angular/core").Signal<string | undefined>;
46
47
  protected readonly inputId: import("@angular/core").Signal<string>;
47
48
  protected readonly inputElement: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
48
49
  constructor();
@@ -34,8 +34,8 @@ export declare class BrnSelectContentComponent implements AfterViewInit {
34
34
  protected readonly canScrollDown: import("@angular/core").WritableSignal<boolean>;
35
35
  protected initialSelectedOptions$: import("rxjs").Observable<(import("@angular/cdk/listbox").CdkOption<unknown> | null)[]>;
36
36
  protected viewport: import("@angular/core").Signal<ElementRef<HTMLElement>>;
37
- protected scrollUpBtn: import("@angular/core").Signal<BrnSelectScrollUpDirective>;
38
- protected scrollDownBtn: import("@angular/core").Signal<BrnSelectScrollDownDirective>;
37
+ protected scrollUpBtn: import("@angular/core").Signal<BrnSelectScrollUpDirective | undefined>;
38
+ protected scrollDownBtn: import("@angular/core").Signal<BrnSelectScrollDownDirective | undefined>;
39
39
  protected _options: import("@angular/core").Signal<readonly BrnSelectOptionDirective[]>;
40
40
  constructor();
41
41
  ngAfterViewInit(): void;
@@ -73,10 +73,6 @@ export declare class BrnSelectComponent<T = unknown> implements ControlValueAcce
73
73
  * Check that our "selectedOptions" are still valid when "possibleOptions" is about to be updated
74
74
  */
75
75
  private handleInvalidOptions;
76
- /**
77
- * Sync the updated options with "possibleOptions" in the select service
78
- */
79
- private updatePossibleOptions;
80
76
  static ɵfac: i0.ɵɵFactoryDeclaration<BrnSelectComponent<any>, never>;
81
77
  static ɵcmp: i0.ɵɵComponentDeclaration<BrnSelectComponent<any>, "brn-select, hlm-select", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; }, { "openedChange": "openedChange"; }, ["selectLabel", "selectContent", "options"], ["label[hlmLabel],label[brnLabel]", "hlm-select-trigger,[brnSelectTrigger]", "*"], true, never>;
82
78
  }
@@ -60,6 +60,10 @@ export declare class BrnSelectService {
60
60
  deselectAllOptions(): void;
61
61
  _setSelectTrigger(trigger: BrnSelectTriggerDirective): void;
62
62
  setInitialSelectedOptions(value: unknown): void;
63
+ /**
64
+ * Sync the updated options with "possibleOptions" in the select service
65
+ */
66
+ updatePossibleOptions(options: readonly CdkOption[]): void;
63
67
  private selectOptionByValue;
64
68
  static ɵfac: i0.ɵɵFactoryDeclaration<BrnSelectService, never>;
65
69
  static ɵprov: i0.ɵɵInjectableDeclaration<BrnSelectService>;