@apexara/ng-components 1.0.6-test.5 → 1.0.6-test.7

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.
@@ -23,6 +23,8 @@ class ApexSelectComponent {
23
23
  this.label = null;
24
24
  this.dropdown = null;
25
25
  this.inputWrapper = null;
26
+ this.dropdownSearch = null;
27
+ this.dropdownContainer = null;
26
28
  this.selectChange = new EventEmitter();
27
29
  this.helperTextChange = new EventEmitter();
28
30
  this.firstDropdown = signal(0, ...(ngDevMode ? [{ debugName: "firstDropdown" }] : []));
@@ -36,6 +38,7 @@ class ApexSelectComponent {
36
38
  this.documentKeyUpSubscription = null;
37
39
  this.controlSubscription = null;
38
40
  this.filteredData = signal([], ...(ngDevMode ? [{ debugName: "filteredData" }] : []));
41
+ this.filteredGroups = signal([], ...(ngDevMode ? [{ debugName: "filteredGroups" }] : []));
39
42
  this.lastSearch = '';
40
43
  this.keyListener = (event) => this.blockArrowScroll(event);
41
44
  this.wheelListener = (event) => this.blockScroll(event);
@@ -48,6 +51,7 @@ class ApexSelectComponent {
48
51
  this.controlValue = signal(null, ...(ngDevMode ? [{ debugName: "controlValue" }] : []));
49
52
  this.controlDisabled = signal(false, ...(ngDevMode ? [{ debugName: "controlDisabled" }] : []));
50
53
  this.dataDiffer = this.iterableDiffers.find([]).create();
54
+ this.groupsDiffer = this.iterableDiffers.find([]).create();
51
55
  this.handleEvents();
52
56
  }
53
57
  ngOnInit() {
@@ -80,11 +84,14 @@ class ApexSelectComponent {
80
84
  }
81
85
  ngDoCheck() {
82
86
  const data = this.options?.data || [];
83
- const diff = this.dataDiffer.diff(data);
84
- if (!diff) {
87
+ const groups = this.options?.groups || [];
88
+ const dataDiff = this.dataDiffer.diff(data);
89
+ const groupsDiff = this.groupsDiffer.diff(groups);
90
+ if (!dataDiff && !groupsDiff) {
85
91
  return;
86
92
  }
87
93
  this.filteredData.set([...data]);
94
+ this.filteredGroups.set(this.cloneGroups(groups));
88
95
  // Sync controlValue signal and visible input when data changes.
89
96
  // The parent may have reset the control with { emitEvent: false },
90
97
  // which bypasses valueChanges — the only thing that updates controlValue.
@@ -98,7 +105,8 @@ class ApexSelectComponent {
98
105
  }
99
106
  }
100
107
  ngAfterViewInit() {
101
- this.filteredData.set([...this.options.data]);
108
+ this.filteredData.set([...(this.options.data || [])]);
109
+ this.filteredGroups.set(this.cloneGroups(this.options.groups || []));
102
110
  setTimeout(() => {
103
111
  if (this.options.formGroup && this.options.formControlName) {
104
112
  this.setVisibleValue(this.options.formGroup.controls[this.options.formControlName].value);
@@ -110,6 +118,30 @@ class ApexSelectComponent {
110
118
  }));
111
119
  }
112
120
  }
121
+ cloneGroups(groups) {
122
+ return groups.map(group => ({
123
+ label: group.label,
124
+ data: [...group.data],
125
+ }));
126
+ }
127
+ hasGroups() {
128
+ return !!this.options?.groups && this.options.groups.length > 0;
129
+ }
130
+ isSearchInDropdown() {
131
+ return !!this.options?.searchInDropdown;
132
+ }
133
+ getAllOptions() {
134
+ if (this.hasGroups()) {
135
+ return (this.options.groups || []).flatMap(group => group.data);
136
+ }
137
+ return this.options.data || [];
138
+ }
139
+ getDropdownEl() {
140
+ if (this.dropdownContainer) {
141
+ return this.dropdownContainer.nativeElement;
142
+ }
143
+ return this.dropdown?.elementRef.nativeElement ?? null;
144
+ }
113
145
  ngOnChanges(changes) {
114
146
  if (!changes['options'] || changes['options'].firstChange) {
115
147
  return;
@@ -171,15 +203,30 @@ class ApexSelectComponent {
171
203
  }
172
204
  this.lastSearch = '';
173
205
  this.input.nativeElement.value = '';
174
- this.filteredData.set([...this.options.data]);
206
+ this.filteredData.set([...(this.options.data || [])]);
207
+ if (this.hasGroups()) {
208
+ this.filteredGroups.set(this.cloneGroups(this.options.groups || []));
209
+ }
210
+ if (this.dropdownSearch) {
211
+ this.dropdownSearch.nativeElement.value = '';
212
+ }
175
213
  this.control.setValue(newValue);
176
214
  this.selectChange.emit(newValue);
215
+ if (this.isSearchInDropdown() && this.dropdownSearch) {
216
+ setTimeout(() => this.dropdownSearch?.nativeElement.focus());
217
+ }
177
218
  }
178
219
  setVisibleValue(newValue) {
179
220
  if (newValue === null) {
180
221
  this.input.nativeElement.value = '';
181
222
  return;
182
223
  }
224
+ if (this.isSearchInDropdown()) {
225
+ // Chips / counter span next to the input own the selection display.
226
+ // Keep the input empty so the placeholder can show when nothing is selected.
227
+ this.input.nativeElement.value = '';
228
+ return;
229
+ }
183
230
  if (this.options.counterAsValue) {
184
231
  if (this.options.searchable) {
185
232
  return;
@@ -189,7 +236,10 @@ class ApexSelectComponent {
189
236
  return;
190
237
  }
191
238
  let visibleValue = '';
192
- for (let data of this.filteredData()) {
239
+ const sourceList = this.hasGroups()
240
+ ? this.filteredGroups().flatMap(group => group.data)
241
+ : this.filteredData();
242
+ for (let data of sourceList) {
193
243
  // when newValue is object and not array
194
244
  if (data.value === newValue.value) {
195
245
  visibleValue = data.label;
@@ -215,7 +265,7 @@ class ApexSelectComponent {
215
265
  this.input.nativeElement.value = visibleValue;
216
266
  }
217
267
  updateDropdownHeight() {
218
- if (!this.isDropdown()) {
268
+ if (!this.isDropdown() || this.hasGroups()) {
219
269
  return;
220
270
  }
221
271
  setTimeout(() => {
@@ -282,23 +332,29 @@ class ApexSelectComponent {
282
332
  return;
283
333
  }
284
334
  this.isDropdown.set(true);
285
- this.input.nativeElement.focus();
335
+ if (!this.isSearchInDropdown()) {
336
+ this.input.nativeElement.focus();
337
+ }
286
338
  if (this.firstDropdown() === 0) {
287
339
  this.firstDropdown.update(v => v + 1);
288
340
  setTimeout(() => this.generateDropdownPosition(true));
289
341
  }
290
342
  this.attachGlobalScrollBlockers();
291
343
  this.onSearch(this.lastSearch, false);
344
+ if (this.isSearchInDropdown()) {
345
+ setTimeout(() => this.dropdownSearch?.nativeElement.focus());
346
+ }
292
347
  }
293
348
  deactivateControl(event) {
294
349
  if (event instanceof KeyboardEvent) {
295
350
  this.removeDropdown();
296
351
  return;
297
352
  }
298
- if (!this.dropdown || !this.inputWrapper) {
353
+ const dropdownEl = this.getDropdownEl();
354
+ if (!dropdownEl || !this.inputWrapper) {
299
355
  return;
300
356
  }
301
- const dropdownRect = this.dropdown.elementRef.nativeElement.getBoundingClientRect();
357
+ const dropdownRect = dropdownEl.getBoundingClientRect();
302
358
  const inputWrapperRect = this.inputWrapper.nativeElement.getBoundingClientRect();
303
359
  const isClickInsideDropdown = this.isWithinBounds(event, dropdownRect);
304
360
  const isClickInsideInputWrapper = this.isWithinBounds(event, inputWrapperRect);
@@ -333,12 +389,12 @@ class ApexSelectComponent {
333
389
  }
334
390
  }
335
391
  generateDropdownPosition(checkRevserse = false) {
336
- if (!this.dropdown) {
392
+ const dropdownEl = this.getDropdownEl();
393
+ if (!dropdownEl) {
337
394
  // method will keep executing until dropdown is rendered
338
395
  setTimeout(() => this.generateDropdownPosition(true));
339
396
  return;
340
397
  }
341
- const dropdownEl = this.dropdown.elementRef.nativeElement;
342
398
  const elementRefRect = this.elementRef.nativeElement.getBoundingClientRect();
343
399
  if (this.osService.mobileOS === MobileOS.iOS) {
344
400
  elementRefRect.y += window.visualViewport.offsetTop;
@@ -382,6 +438,11 @@ class ApexSelectComponent {
382
438
  }
383
439
  onSearch(value, shouldResetHover) {
384
440
  this.lastSearch = value;
441
+ if (this.hasGroups()) {
442
+ this.filterGroups(value, shouldResetHover);
443
+ this.updateDropdownHeight();
444
+ return;
445
+ }
385
446
  if (!value) {
386
447
  // Reset to original data if input is empty
387
448
  this.filteredData.set([...this.options.data]);
@@ -399,6 +460,36 @@ class ApexSelectComponent {
399
460
  this.filteredData.set(filtered);
400
461
  this.updateDropdownHeight();
401
462
  }
463
+ filterGroups(value, shouldResetHover) {
464
+ const sourceGroups = this.options.groups || [];
465
+ if (!value) {
466
+ this.filteredGroups.set(this.cloneGroups(sourceGroups));
467
+ return;
468
+ }
469
+ const searchTerm = value.toLowerCase();
470
+ const result = [];
471
+ for (const group of sourceGroups) {
472
+ const matches = group.data.filter(item => item.label.toLowerCase().includes(searchTerm));
473
+ if (matches.length) {
474
+ result.push({ label: group.label, data: matches });
475
+ }
476
+ }
477
+ if (shouldResetHover) {
478
+ let firstHoverSet = false;
479
+ for (const group of result) {
480
+ for (const item of group.data) {
481
+ if (!firstHoverSet) {
482
+ item.isHover = true;
483
+ firstHoverSet = true;
484
+ }
485
+ else {
486
+ item.isHover = false;
487
+ }
488
+ }
489
+ }
490
+ }
491
+ this.filteredGroups.set(result);
492
+ }
402
493
  getPlaceholder() {
403
494
  const options = this.options;
404
495
  const formGroup = options.formGroup;
@@ -445,29 +536,20 @@ class ApexSelectComponent {
445
536
  window.addEventListener('keydown', this.keyListener);
446
537
  }
447
538
  keyup(event) {
448
- if (document.activeElement !== this.input?.nativeElement) {
539
+ const activeEl = document.activeElement;
540
+ const triggerInputEl = this.input?.nativeElement ?? null;
541
+ const searchInputEl = this.dropdownSearch?.nativeElement ?? null;
542
+ const isTriggerFocused = activeEl === triggerInputEl;
543
+ const isDropdownSearchFocused = this.isSearchInDropdown() && activeEl === searchInputEl;
544
+ if (!isTriggerFocused && !isDropdownSearchFocused) {
449
545
  this.deactivateControl(event);
450
546
  return;
451
547
  }
452
- if (document.activeElement === this.input?.nativeElement) {
453
- if (document.activeElement !== this.input?.nativeElement) {
454
- return;
455
- }
548
+ if (isDropdownSearchFocused) {
456
549
  switch (event.code) {
457
550
  case 'Enter':
458
551
  this.documentEnterKeyup(event);
459
552
  return;
460
- case 'Space':
461
- if (!this.options.searchable) {
462
- this.documentEnterKeyup(event);
463
- }
464
- return;
465
- case 'Backspace':
466
- if (!this.options.multiple && this.options.searchable && this.control.value.value != null) {
467
- this.onSearch('', false);
468
- this.setValue('');
469
- }
470
- return;
471
553
  case 'Escape':
472
554
  this.deactivateControl(event);
473
555
  return;
@@ -478,11 +560,38 @@ class ApexSelectComponent {
478
560
  this.documentArrowsKeyup(false);
479
561
  return;
480
562
  }
481
- this.documentKeyup(event);
563
+ // Typing is handled by the input's (input) event, not here.
564
+ return;
482
565
  }
566
+ switch (event.code) {
567
+ case 'Enter':
568
+ this.documentEnterKeyup(event);
569
+ return;
570
+ case 'Space':
571
+ if (!this.options.searchable) {
572
+ this.documentEnterKeyup(event);
573
+ }
574
+ return;
575
+ case 'Backspace':
576
+ if (!this.options.multiple && this.options.searchable && this.control.value.value != null) {
577
+ this.onSearch('', false);
578
+ this.setValue('');
579
+ }
580
+ return;
581
+ case 'Escape':
582
+ this.deactivateControl(event);
583
+ return;
584
+ case 'ArrowDown':
585
+ this.documentArrowsKeyup(true);
586
+ return;
587
+ case 'ArrowUp':
588
+ this.documentArrowsKeyup(false);
589
+ return;
590
+ }
591
+ this.documentKeyup(event);
483
592
  }
484
593
  documentEnterKeyup(event) {
485
- const data = this.filteredData();
594
+ const data = this.getNavigableOptions();
486
595
  for (let i = 0; i < data.length; i++) {
487
596
  if (data[i].isHover) {
488
597
  switch (this.options.multiple) {
@@ -498,11 +607,11 @@ class ApexSelectComponent {
498
607
  }
499
608
  }
500
609
  documentArrowsKeyup(isDownArrow) {
501
- if (!this.dropdown || !this.filteredData().length) {
610
+ const data = this.getNavigableOptions();
611
+ const dataLength = data.length;
612
+ if (!dataLength) {
502
613
  return;
503
614
  }
504
- const data = this.filteredData();
505
- const dataLength = data.length;
506
615
  const controlValue = this.control.getRawValue();
507
616
  const isControlValue = controlValue && controlValue !== '';
508
617
  let hoverIndex = null;
@@ -521,14 +630,34 @@ class ApexSelectComponent {
521
630
  newIndex = newIndex < 0 ? 0 : newIndex;
522
631
  newIndex = newIndex >= dataLength ? dataLength - 1 : newIndex;
523
632
  data[newIndex].isHover = true;
524
- this.filteredData.set([...data]);
525
- this.dropdown?.scrollToIndex(newIndex, 'auto');
633
+ if (this.hasGroups()) {
634
+ this.filteredGroups.set([...this.filteredGroups()]);
635
+ this.scrollGroupedOptionIntoView(newIndex);
636
+ }
637
+ else {
638
+ this.filteredData.set([...this.filteredData()]);
639
+ this.dropdown?.scrollToIndex(newIndex, 'auto');
640
+ }
641
+ }
642
+ getNavigableOptions() {
643
+ if (this.hasGroups()) {
644
+ return this.filteredGroups().flatMap(group => group.data);
645
+ }
646
+ return this.filteredData();
647
+ }
648
+ scrollGroupedOptionIntoView(index) {
649
+ if (!this.dropdownContainer) {
650
+ return;
651
+ }
652
+ const optionEls = this.dropdownContainer.nativeElement.querySelectorAll('.option');
653
+ const target = optionEls[index];
654
+ target?.scrollIntoView({ block: 'nearest' });
526
655
  }
527
656
  documentKeyup(event) {
528
657
  if (!this.isDropdown() || this.options.searchable) {
529
658
  return;
530
659
  }
531
- const data = this.filteredData();
660
+ const data = this.getNavigableOptions();
532
661
  for (let i = 0; i < data.length; i++) {
533
662
  data[i].isHover = false;
534
663
  }
@@ -544,9 +673,17 @@ class ApexSelectComponent {
544
673
  }
545
674
  if (newIndex !== null) {
546
675
  data[newIndex].isHover = true;
547
- this.dropdown?.scrollToIndex(newIndex, 'auto');
676
+ if (this.hasGroups()) {
677
+ this.filteredGroups.set([...this.filteredGroups()]);
678
+ this.scrollGroupedOptionIntoView(newIndex);
679
+ }
680
+ else {
681
+ this.dropdown?.scrollToIndex(newIndex, 'auto');
682
+ }
683
+ }
684
+ if (!this.hasGroups()) {
685
+ this.filteredData.set([...this.filteredData()]);
548
686
  }
549
- this.filteredData.set([...data]);
550
687
  }
551
688
  removeProperty(obj, propertyName) {
552
689
  let { [propertyName]: removedProperty, ...data } = obj;
@@ -561,10 +698,10 @@ class ApexSelectComponent {
561
698
  }
562
699
  }
563
700
  blockScroll(event) {
564
- if (!this.dropdown) {
701
+ const dropdownEl = this.getDropdownEl();
702
+ if (!dropdownEl) {
565
703
  return;
566
704
  }
567
- const dropdownEl = this.dropdown.elementRef.nativeElement;
568
705
  const isInsideDropdown = this.isDescendant(dropdownEl, event.target);
569
706
  if (isInsideDropdown) {
570
707
  const canScroll = dropdownEl.scrollHeight > dropdownEl.clientHeight;
@@ -601,7 +738,7 @@ class ApexSelectComponent {
601
738
  this.scrollBlockersAttached = false;
602
739
  }
603
740
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ApexSelectComponent, deps: [{ token: i1.OSService }, { token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component }); }
604
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: ApexSelectComponent, isStandalone: true, selector: "apex-select", inputs: { options: "options" }, outputs: { selectChange: "selectChange", helperTextChange: "helperTextChange" }, host: { listeners: { "document:click": "deactivateControl($event)" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "label", first: true, predicate: ["label"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "inputWrapper", first: true, predicate: ["inputWrapper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (options) {\n @if (options.formGroup && options.formControlName) {\n <div class=\"container\" (mousedown)=\"preventFocusChange($event)\">\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n \n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [apexTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n \n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n <div #inputWrapper class=\"input-field-wrapper\" (click)=\"toggleDropdown()\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'invalid': checkIfControlInvalid(), 'disabled': checkIfControlDisabled() }\">\n @if (options.prefixImg) {\n <apex-img class=\"prefix\" [src]=\"'assets/img/' + this.options.prefixImg\" [alt]=\"'Select prefix icon'\"></apex-img>\n }\n\n @if (options.searchable && options.multiple && this.showMultipleCount() > 0) {\n @if (options.counterAsValue) {\n <span class=\"multiple-count\">\n {{ this.showMultipleCount() }} selected\n </span>\n } @else {\n <div class=\"chips\">\n @for (data of options.data; track $index) {\n @if (isMultipleSelected(data)) {\n <apex-chip [closeIcon]=\"true\" (closeChange)=\"setMultipleValue(data)\">{{ data.label }}</apex-chip>\n }\n }\n </div>\n }\n }\n\n @if (options.searchable) {\n <!-- used for formControl data binding and reactivness -->\n <input #hiddenInput\n class=\"hidden\"\n [formControlName]=\"options.formControlName\">\n\n <!-- used for searching and data displaying -->\n <input #input\n [placeholder]=\"getPlaceholder()\"\n [readOnly]=\"!options.searchable\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n [disabled]=\"checkIfControlDisabled()\"\n (keydown)=\"handleKeydown($event)\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onSearch(input.value, true)\"\n autocorrect=\"off\"\n spellcheck=\"false\">\n } @else {\n <input #input\n readonly\n [disabled]=\"checkIfControlDisabled()\"\n [placeholder]=\"getPlaceholder()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n [formControlName]=\"options.formControlName\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n (ngModelChange)=\"setVisibleValue($event)\"/>\n }\n \n <div class=\"arrow-wrapper\">\n <div class=\"arrow\" [class]=\"{ checked: this.isDropdown() }\"></div>\n </div>\n </div>\n\n @if (isDropdown()) {\n <cdk-virtual-scroll-viewport [itemSize]=\"optionItemSizePx\" [style.height.px]=\"dropdownHeightPx()\" class=\"dropdown\" #dropdown>\n <div class=\"option\"\n *cdkVirtualFor=\"let data of filteredData();\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n @if (filteredData().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </cdk-virtual-scroll-viewport>\n }\n </div>\n }\n}\n", styles: [":host{display:block;touch-action:manipulation}:host-context(.table) .input-field-wrapper{width:80px;justify-content:center}:host-context(.table) .input-field-wrapper input{width:40px;color:var(--apex-select-input-table-color, #5D6068);font-weight:600;margin:0}.header{display:flex;align-items:center;justify-content:space-between;column-gap:4px;color:var(--apex-select-header-color, #0B1222);text-wrap:nowrap;margin-bottom:2px}.header label{font-size:14px;font-weight:600}.header-helper{font-size:12px;text-align:right;color:var(--apex-select-helper-text-color, #5D6068);cursor:pointer}.header-helper:after{width:0;height:1px;display:block;content:\"\";background:var(--apex-select-helper-text-color, #5D6068);transition:width .3s}.header-helper:hover:after{width:100%}.header .label-wrapper{display:flex;justify-content:center;align-items:center;text-wrap:wrap}.tooltip-icon{overflow:visible}.tooltip-icon path{fill:var(--apex-select-tooltip-icon-fill, transparent);stroke:var(--apex-input-tooltip-icon-stroke, #C6C6C6)}.input-field-wrapper{width:100%;height:44px;display:flex;justify-content:space-around;align-items:center;cursor:pointer;box-sizing:border-box;overflow:scroll;background-color:var(--apex-select-input-background-color, #ffffff00);border:solid var(--apex-select-input-border-color, #E9E9E9);border-width:var(--apex-select-input-border-width, 1px);transition:border 1s;border-radius:4px;padding:0 16px}.input-field-wrapper .multiple-count{font-size:14px;padding:0 8px;font-weight:600}.input-field-wrapper::-webkit-scrollbar{display:none}.input-field-wrapper:not(.input-field-wrapper.disabled):hover{border-color:var(--apex-select-input-border-hover-color, #4B5368)}.input-field-wrapper.disabled{opacity:.8;cursor:not-allowed;border:1px dashed var(--apex-select-input-border-disabled-color, #F2F2F2)}.input-field-wrapper .input-field{height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}apex-img{width:16px;height:16px}apex-img.prefix path{fill:var(--apex-select-icon-prefix-fill, #C6C6C6);stroke:var(--apex-select-icon-prefix-stroke, transparent)}.input-field-wrapper.disabled label{cursor:not-allowed}.chips{--apex-chip-font-size: var(--apex-select-chip-font-size, 10px);--apex-chip-color: var(--apex-select-chip-color, #FFFFFF);--apex-chip-background-color: var(--apex-select-chip-background-color, #0B1222);--apex-chip-icon-color: var(--apex-select-chip-icon-color, #FFFFFF);display:flex;padding-left:8px}.input-field-wrapper input{width:inherit;flex:1;text-overflow:ellipsis;border:none;outline:none;cursor:pointer;background:transparent;color:var(--apex-select-input-text-color, #0B1222);font-size:16px;transform:scale(.875);transform-origin:left center;padding:0;margin:0 12px}.input-field-wrapper input.hidden{display:none}input::placeholder{color:var(--apex-select-input-placeholder-color, #0B1222)}.input-field-wrapper input.no-icon{left:0}.input-field-wrapper.disabled input{cursor:not-allowed}.arrow-wrapper{width:8px;height:8px}.arrow{width:8px;height:8px;position:relative;bottom:3px;border-top:2px solid var(--apex-select-arrow-color, #5D6068);border-left:2px solid var(--apex-select-arrow-color, #5D6068);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px;transition:all .25s ease-in-out;transform-origin:center;transform:rotate(-135deg)}.arrow.checked{bottom:-2px;transform:rotate(45deg);border-top:2px solid var(--apex-select-arrow-checked-color, #F96138);border-left:2px solid var(--apex-select-arrow-checked-color, #F96138)}.arrow svg{width:16px;height:16px;transform:rotate(0);transition:transform .25s ease-in-out}.arrow.checked svg{transform:rotate(180deg)}.input-field-wrapper.invalid{border:solid var(--apex-select-invalid-color, #F96138);border-width:var(--apex-select-invalid-border-width, 1px)}.input-field-wrapper.invalid label{color:var(--apex-select-invalid-color, #F96138)}.input-field-wrapper apex-chip{margin-right:4px}.dropdown{width:264px;position:fixed;overscroll-behavior:contain;border-radius:8px;border:1px solid var(--apex-select-dropdown-border-color, #E9E9E9);background-color:var(--apex-select-dropdown-background-color, #FFFFFF);box-shadow:var(--apex-select-dropdown-box-shadow);z-index:900;margin-top:15px;opacity:0;animation:fadeIn .3s forwards}.dropdown:focus{outline:none}.dropdown::-webkit-scrollbar{width:16px;padding:8px}.dropdown::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.dropdown::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.dropdown::-webkit-scrollbar-button{display:none}.dropdown.no-scroll{overflow:hidden}.values::-webkit-scrollbar{width:8px;padding:4px}.values::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.values::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.values::-webkit-scrollbar-button{display:none}.dropdown .option{min-height:48px;display:flex;align-items:center;cursor:pointer;font-weight:600;color:#0009;padding:0 16px}.dropdown .option.disabled{pointer-events:none}.dropdown .option:hover,.dropdown .option.preselected{background:#00000005}.dropdown .option.checkbox.selected{--apex-checkbox-text-color: var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.dropdown .option.selected{color:var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.option-icon{width:var(--apex-select-option-icon-size, 16px);height:var(--apex-select-option-icon-size, 16px);min-width:var(--apex-select-option-icon-size, 16px);display:flex;justify-content:center;align-items:center;margin-right:var(--apex-select-option-icon-spacing, 10px)}.option-icon apex-img{max-width:var(--apex-select-option-icon-size, 20px);max-height:var(--apex-select-option-icon-size, 20px);display:flex;justify-content:center;align-items:center}.option-icon apex-img path{fill:var(--apex-select-option-icon-fill, #5D6068);stroke:var(--apex-select-option-icon-stroke, #ffffff00)}.dropdown .option.selected .option-icon apex-img path{fill:var(--apex-select-option-icon-selected-fill, #F96138);stroke:var(--apex-select-option-icon-selected-stroke, #ffffff00)}.values{width:fit-content;display:flex;flex-wrap:wrap;align-items:center;padding:6px;overflow-x:auto}.values apex-chip{margin:6px 0 0}.single-value{padding:6px}.options-divider{width:calc(100% - 36px);height:var(--apex-select-options-divider-height, 1px);background-color:var(--apex-select-options-divider-color, #E9E9E9);margin:0 auto}.multiple-checkbox-container{display:flex;flex-direction:column;row-gap:3px;padding:12px 0 12px 6px}.multiple-checkbox-container span{word-break:normal;overflow-wrap:break-word;white-space:normal}.multiple-checkbox-container span:nth-of-type(2){font-size:13px;font-weight:500;line-height:1.3;color:#5d6068}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: ApexChipComponent, selector: "apex-chip", inputs: ["closeIcon", "options"], outputs: ["closeChange"] }, { kind: "component", type: ApexImageComponent, selector: "apex-img", inputs: ["src", "alt"] }, { kind: "directive", type: ApexTooltipDirective, selector: "[apexTooltip]", inputs: ["apexTooltip", "tooltipPosition"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ApexCheckboxComponent, selector: "apex-checkbox", inputs: ["checked", "disabled", "tooltip", "options"], outputs: ["clickChange"] }] }); }
741
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: ApexSelectComponent, isStandalone: true, selector: "apex-select", inputs: { options: "options" }, outputs: { selectChange: "selectChange", helperTextChange: "helperTextChange" }, host: { listeners: { "document:click": "deactivateControl($event)" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "label", first: true, predicate: ["label"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "inputWrapper", first: true, predicate: ["inputWrapper"], descendants: true }, { propertyName: "dropdownSearch", first: true, predicate: ["dropdownSearch"], descendants: true }, { propertyName: "dropdownContainer", first: true, predicate: ["dropdownContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (options) {\n @if (options.formGroup && options.formControlName) {\n <div class=\"container\" (mousedown)=\"preventFocusChange($event)\">\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n\n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [apexTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n\n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n <div #inputWrapper class=\"input-field-wrapper\" (click)=\"toggleDropdown()\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'invalid': checkIfControlInvalid(), 'disabled': checkIfControlDisabled() }\">\n @if (options.prefixImg) {\n <apex-img class=\"prefix\" [src]=\"'assets/img/' + this.options.prefixImg\" [alt]=\"'Select prefix icon'\"></apex-img>\n }\n\n @if (isSearchInDropdown() && options.multiple && this.showMultipleCount() > 0) {\n @if (options.counterAsValue) {\n <span class=\"multiple-count\">\n {{ this.showMultipleCount() }} selected\n </span>\n } @else {\n <div class=\"chips\">\n @for (data of getAllOptions(); track $index) {\n @if (isMultipleSelected(data)) {\n <apex-chip [closeIcon]=\"true\" (closeChange)=\"setMultipleValue(data)\">{{ data.label }}</apex-chip>\n }\n }\n </div>\n }\n }\n\n @if (!isSearchInDropdown() && options.searchable && options.multiple && this.showMultipleCount() > 0) {\n @if (options.counterAsValue) {\n <span class=\"multiple-count\">\n {{ this.showMultipleCount() }} selected\n </span>\n } @else {\n <div class=\"chips\">\n @for (data of getAllOptions(); track $index) {\n @if (isMultipleSelected(data)) {\n <apex-chip [closeIcon]=\"true\" (closeChange)=\"setMultipleValue(data)\">{{ data.label }}</apex-chip>\n }\n }\n </div>\n }\n }\n\n @if (isSearchInDropdown()) {\n <!-- Hidden input owns the form binding; the visible one is a placeholder slot. -->\n <input #hiddenInput\n class=\"hidden\"\n [formControlName]=\"options.formControlName\">\n\n <input #input\n readonly\n [disabled]=\"checkIfControlDisabled()\"\n [placeholder]=\"getPlaceholder()\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"/>\n } @else if (options.searchable) {\n <!-- used for formControl data binding and reactivness -->\n <input #hiddenInput\n class=\"hidden\"\n [formControlName]=\"options.formControlName\">\n\n <!-- used for searching and data displaying -->\n <input #input\n [placeholder]=\"getPlaceholder()\"\n [readOnly]=\"!options.searchable\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n [disabled]=\"checkIfControlDisabled()\"\n (keydown)=\"handleKeydown($event)\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onSearch(input.value, true)\"\n autocorrect=\"off\"\n spellcheck=\"false\">\n } @else {\n <input #input\n readonly\n [disabled]=\"checkIfControlDisabled()\"\n [placeholder]=\"getPlaceholder()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n [formControlName]=\"options.formControlName\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n (ngModelChange)=\"setVisibleValue($event)\"/>\n }\n\n <div class=\"arrow-wrapper\">\n <div class=\"arrow\" [class]=\"{ checked: this.isDropdown() }\"></div>\n </div>\n </div>\n\n @if (isDropdown()) {\n @if (isSearchInDropdown()) {\n <div #dropdownContainer class=\"dropdown dropdown-wrapper\">\n <div class=\"dropdown-search\">\n <svg class=\"dropdown-search-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" stroke=\"currentColor\" stroke-width=\"1.5\"/>\n <path d=\"M11 11L14 14\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n </svg>\n <input #dropdownSearch\n type=\"text\"\n placeholder=\"Search\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n (input)=\"onSearch(dropdownSearch.value, true)\"\n (keydown)=\"handleKeydown($event)\"/>\n </div>\n\n @if (options.groups && options.groups.length > 0) {\n <div class=\"dropdown-body\">\n @for (group of filteredGroups(); track group.label) {\n <div class=\"group-header\">{{ group.label }}</div>\n @for (data of group.data; track data.value) {\n <div class=\"option\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n }\n }\n\n @if (filteredGroups().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </div>\n } @else {\n <cdk-virtual-scroll-viewport [itemSize]=\"optionItemSizePx\" [style.height.px]=\"dropdownHeightPx()\" class=\"dropdown-body dropdown-body-virtual\" #dropdown>\n <div class=\"option\"\n *cdkVirtualFor=\"let data of filteredData();\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n @if (filteredData().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </cdk-virtual-scroll-viewport>\n }\n </div>\n } @else {\n <cdk-virtual-scroll-viewport [itemSize]=\"optionItemSizePx\" [style.height.px]=\"dropdownHeightPx()\" class=\"dropdown\" #dropdown>\n <div class=\"option\"\n *cdkVirtualFor=\"let data of filteredData();\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n @if (filteredData().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </cdk-virtual-scroll-viewport>\n }\n }\n </div>\n }\n}\n", styles: [":host{display:block;touch-action:manipulation}:host-context(.table) .input-field-wrapper{width:80px;justify-content:center}:host-context(.table) .input-field-wrapper input{width:40px;color:var(--apex-select-input-table-color, #5D6068);font-weight:600;margin:0}.header{display:flex;align-items:center;justify-content:space-between;column-gap:4px;color:var(--apex-select-header-color, #0B1222);text-wrap:nowrap;margin-bottom:2px}.header label{font-size:14px;font-weight:600}.header-helper{font-size:12px;text-align:right;color:var(--apex-select-helper-text-color, #5D6068);cursor:pointer}.header-helper:after{width:0;height:1px;display:block;content:\"\";background:var(--apex-select-helper-text-color, #5D6068);transition:width .3s}.header-helper:hover:after{width:100%}.header .label-wrapper{display:flex;justify-content:center;align-items:center;text-wrap:wrap}.tooltip-icon{overflow:visible}.tooltip-icon path{fill:var(--apex-select-tooltip-icon-fill, transparent);stroke:var(--apex-input-tooltip-icon-stroke, #C6C6C6)}.input-field-wrapper{width:100%;height:44px;display:flex;justify-content:space-around;align-items:center;cursor:pointer;box-sizing:border-box;overflow:scroll;background-color:var(--apex-select-input-background-color, #ffffff00);border:solid var(--apex-select-input-border-color, #E9E9E9);border-width:var(--apex-select-input-border-width, 1px);transition:border 1s;border-radius:4px;padding:0 16px}.input-field-wrapper .multiple-count{font-size:14px;padding:0 8px;font-weight:600}.input-field-wrapper::-webkit-scrollbar{display:none}.input-field-wrapper:not(.input-field-wrapper.disabled):hover{border-color:var(--apex-select-input-border-hover-color, #4B5368)}.input-field-wrapper.disabled{opacity:.8;cursor:not-allowed;border:1px dashed var(--apex-select-input-border-disabled-color, #F2F2F2)}.input-field-wrapper .input-field{height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}apex-img{width:16px;height:16px}apex-img.prefix path{fill:var(--apex-select-icon-prefix-fill, #C6C6C6);stroke:var(--apex-select-icon-prefix-stroke, transparent)}.input-field-wrapper.disabled label{cursor:not-allowed}.chips{--apex-chip-font-size: var(--apex-select-chip-font-size, 10px);--apex-chip-color: var(--apex-select-chip-color, #FFFFFF);--apex-chip-background-color: var(--apex-select-chip-background-color, #0B1222);--apex-chip-icon-color: var(--apex-select-chip-icon-color, #FFFFFF);display:flex;padding-left:8px}.input-field-wrapper input{width:inherit;flex:1;text-overflow:ellipsis;border:none;outline:none;cursor:pointer;background:transparent;color:var(--apex-select-input-text-color, #0B1222);font-size:16px;transform:scale(.875);transform-origin:left center;padding:0;margin:0 12px}.input-field-wrapper input.hidden{display:none}input::placeholder{color:var(--apex-select-input-placeholder-color, #0B1222)}.input-field-wrapper input.no-icon{left:0}.input-field-wrapper.disabled input{cursor:not-allowed}.arrow-wrapper{width:8px;height:8px}.arrow{width:8px;height:8px;position:relative;bottom:3px;border-top:2px solid var(--apex-select-arrow-color, #5D6068);border-left:2px solid var(--apex-select-arrow-color, #5D6068);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px;transition:all .25s ease-in-out;transform-origin:center;transform:rotate(-135deg)}.arrow.checked{bottom:-2px;transform:rotate(45deg);border-top:2px solid var(--apex-select-arrow-checked-color, #F96138);border-left:2px solid var(--apex-select-arrow-checked-color, #F96138)}.arrow svg{width:16px;height:16px;transform:rotate(0);transition:transform .25s ease-in-out}.arrow.checked svg{transform:rotate(180deg)}.input-field-wrapper.invalid{border:solid var(--apex-select-invalid-color, #F96138);border-width:var(--apex-select-invalid-border-width, 1px)}.input-field-wrapper.invalid label{color:var(--apex-select-invalid-color, #F96138)}.input-field-wrapper apex-chip{margin-right:4px}.dropdown{width:264px;position:fixed;z-index:900;overscroll-behavior:contain;border-radius:8px;border:1px solid var(--apex-select-dropdown-border-color, #E9E9E9);background-color:var(--apex-select-dropdown-background-color, #FFFFFF);box-shadow:var(--apex-select-dropdown-box-shadow);animation:fadeIn .3s forwards;opacity:0;margin-top:15px}.dropdown:focus{outline:none}.dropdown::-webkit-scrollbar{width:16px;padding:8px}.dropdown::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.dropdown::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.dropdown::-webkit-scrollbar-button{display:none}.dropdown.no-scroll{overflow:hidden}.values::-webkit-scrollbar{width:8px;padding:4px}.values::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.values::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.values::-webkit-scrollbar-button{display:none}.dropdown .option{min-height:48px;display:flex;align-items:center;cursor:pointer;font-weight:600;color:#0009;padding:0 16px}.dropdown .option.disabled{pointer-events:none}.dropdown .option:hover,.dropdown .option.preselected{background:#00000005}.dropdown .option.checkbox.selected{--apex-checkbox-text-color: var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.dropdown .option.selected{color:var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.option-icon{width:var(--apex-select-option-icon-size, 16px);height:var(--apex-select-option-icon-size, 16px);min-width:var(--apex-select-option-icon-size, 16px);display:flex;justify-content:center;align-items:center;margin-right:var(--apex-select-option-icon-spacing, 10px)}.option-icon apex-img{max-width:var(--apex-select-option-icon-size, 20px);max-height:var(--apex-select-option-icon-size, 20px);display:flex;justify-content:center;align-items:center}.option-icon apex-img path{fill:var(--apex-select-option-icon-fill, #5D6068);stroke:var(--apex-select-option-icon-stroke, #ffffff00)}.dropdown .option.selected .option-icon apex-img path{fill:var(--apex-select-option-icon-selected-fill, #F96138);stroke:var(--apex-select-option-icon-selected-stroke, #ffffff00)}.values{width:fit-content;display:flex;flex-wrap:wrap;align-items:center;padding:6px;overflow-x:auto}.values apex-chip{margin:6px 0 0}.single-value{padding:6px}.options-divider{width:calc(100% - 36px);height:var(--apex-select-options-divider-height, 1px);background-color:var(--apex-select-options-divider-color, #E9E9E9);margin:0 auto}.multiple-checkbox-container{display:flex;flex-direction:column;row-gap:3px;padding:12px 0 12px 6px}.multiple-checkbox-container span{word-break:normal;overflow-wrap:break-word;white-space:normal}.multiple-checkbox-container span:nth-of-type(2){font-size:13px;font-weight:500;line-height:1.3;color:#5d6068}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dropdown.dropdown-wrapper{display:flex;flex-direction:column;overflow:hidden;padding:0}.dropdown-search{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--apex-select-dropdown-search-border-color, #E9E9E9);color:var(--apex-select-dropdown-search-icon-color, #5D6068);padding:10px 16px}.dropdown-search-icon{flex:0 0 auto}.dropdown-search input{flex:1;border:none;outline:none;background:transparent;font-size:14px;color:var(--apex-select-input-text-color, #0B1222);padding:0}.dropdown-search input::placeholder{color:var(--apex-select-input-placeholder-color, #9A9A9A)}.dropdown-body{flex:1 1 auto;min-height:0;overflow-y:auto;max-height:var(--apex-select-dropdown-body-max-height, 320px)}.dropdown-body.dropdown-body-virtual{overflow:hidden;max-height:none}.dropdown-body::-webkit-scrollbar{width:8px}.dropdown-body::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.dropdown-body::-webkit-scrollbar-track{background-color:#f8f8f8}.group-header{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:none;color:var(--apex-select-group-header-color, #9A9A9A);pointer-events:none;-webkit-user-select:none;user-select:none;padding:10px 16px 4px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: ApexChipComponent, selector: "apex-chip", inputs: ["closeIcon", "options"], outputs: ["closeChange"] }, { kind: "component", type: ApexImageComponent, selector: "apex-img", inputs: ["src", "alt"] }, { kind: "directive", type: ApexTooltipDirective, selector: "[apexTooltip]", inputs: ["apexTooltip", "tooltipPosition"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ApexCheckboxComponent, selector: "apex-checkbox", inputs: ["checked", "disabled", "tooltip", "options"], outputs: ["clickChange"] }] }); }
605
742
  }
606
743
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ApexSelectComponent, decorators: [{
607
744
  type: Component,
@@ -615,7 +752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
615
752
  ApexTooltipDirective,
616
753
  ReactiveFormsModule,
617
754
  ApexCheckboxComponent,
618
- ], template: "@if (options) {\n @if (options.formGroup && options.formControlName) {\n <div class=\"container\" (mousedown)=\"preventFocusChange($event)\">\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n \n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [apexTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n \n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n <div #inputWrapper class=\"input-field-wrapper\" (click)=\"toggleDropdown()\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'invalid': checkIfControlInvalid(), 'disabled': checkIfControlDisabled() }\">\n @if (options.prefixImg) {\n <apex-img class=\"prefix\" [src]=\"'assets/img/' + this.options.prefixImg\" [alt]=\"'Select prefix icon'\"></apex-img>\n }\n\n @if (options.searchable && options.multiple && this.showMultipleCount() > 0) {\n @if (options.counterAsValue) {\n <span class=\"multiple-count\">\n {{ this.showMultipleCount() }} selected\n </span>\n } @else {\n <div class=\"chips\">\n @for (data of options.data; track $index) {\n @if (isMultipleSelected(data)) {\n <apex-chip [closeIcon]=\"true\" (closeChange)=\"setMultipleValue(data)\">{{ data.label }}</apex-chip>\n }\n }\n </div>\n }\n }\n\n @if (options.searchable) {\n <!-- used for formControl data binding and reactivness -->\n <input #hiddenInput\n class=\"hidden\"\n [formControlName]=\"options.formControlName\">\n\n <!-- used for searching and data displaying -->\n <input #input\n [placeholder]=\"getPlaceholder()\"\n [readOnly]=\"!options.searchable\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n [disabled]=\"checkIfControlDisabled()\"\n (keydown)=\"handleKeydown($event)\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onSearch(input.value, true)\"\n autocorrect=\"off\"\n spellcheck=\"false\">\n } @else {\n <input #input\n readonly\n [disabled]=\"checkIfControlDisabled()\"\n [placeholder]=\"getPlaceholder()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n [formControlName]=\"options.formControlName\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n (ngModelChange)=\"setVisibleValue($event)\"/>\n }\n \n <div class=\"arrow-wrapper\">\n <div class=\"arrow\" [class]=\"{ checked: this.isDropdown() }\"></div>\n </div>\n </div>\n\n @if (isDropdown()) {\n <cdk-virtual-scroll-viewport [itemSize]=\"optionItemSizePx\" [style.height.px]=\"dropdownHeightPx()\" class=\"dropdown\" #dropdown>\n <div class=\"option\"\n *cdkVirtualFor=\"let data of filteredData();\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n @if (filteredData().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </cdk-virtual-scroll-viewport>\n }\n </div>\n }\n}\n", styles: [":host{display:block;touch-action:manipulation}:host-context(.table) .input-field-wrapper{width:80px;justify-content:center}:host-context(.table) .input-field-wrapper input{width:40px;color:var(--apex-select-input-table-color, #5D6068);font-weight:600;margin:0}.header{display:flex;align-items:center;justify-content:space-between;column-gap:4px;color:var(--apex-select-header-color, #0B1222);text-wrap:nowrap;margin-bottom:2px}.header label{font-size:14px;font-weight:600}.header-helper{font-size:12px;text-align:right;color:var(--apex-select-helper-text-color, #5D6068);cursor:pointer}.header-helper:after{width:0;height:1px;display:block;content:\"\";background:var(--apex-select-helper-text-color, #5D6068);transition:width .3s}.header-helper:hover:after{width:100%}.header .label-wrapper{display:flex;justify-content:center;align-items:center;text-wrap:wrap}.tooltip-icon{overflow:visible}.tooltip-icon path{fill:var(--apex-select-tooltip-icon-fill, transparent);stroke:var(--apex-input-tooltip-icon-stroke, #C6C6C6)}.input-field-wrapper{width:100%;height:44px;display:flex;justify-content:space-around;align-items:center;cursor:pointer;box-sizing:border-box;overflow:scroll;background-color:var(--apex-select-input-background-color, #ffffff00);border:solid var(--apex-select-input-border-color, #E9E9E9);border-width:var(--apex-select-input-border-width, 1px);transition:border 1s;border-radius:4px;padding:0 16px}.input-field-wrapper .multiple-count{font-size:14px;padding:0 8px;font-weight:600}.input-field-wrapper::-webkit-scrollbar{display:none}.input-field-wrapper:not(.input-field-wrapper.disabled):hover{border-color:var(--apex-select-input-border-hover-color, #4B5368)}.input-field-wrapper.disabled{opacity:.8;cursor:not-allowed;border:1px dashed var(--apex-select-input-border-disabled-color, #F2F2F2)}.input-field-wrapper .input-field{height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}apex-img{width:16px;height:16px}apex-img.prefix path{fill:var(--apex-select-icon-prefix-fill, #C6C6C6);stroke:var(--apex-select-icon-prefix-stroke, transparent)}.input-field-wrapper.disabled label{cursor:not-allowed}.chips{--apex-chip-font-size: var(--apex-select-chip-font-size, 10px);--apex-chip-color: var(--apex-select-chip-color, #FFFFFF);--apex-chip-background-color: var(--apex-select-chip-background-color, #0B1222);--apex-chip-icon-color: var(--apex-select-chip-icon-color, #FFFFFF);display:flex;padding-left:8px}.input-field-wrapper input{width:inherit;flex:1;text-overflow:ellipsis;border:none;outline:none;cursor:pointer;background:transparent;color:var(--apex-select-input-text-color, #0B1222);font-size:16px;transform:scale(.875);transform-origin:left center;padding:0;margin:0 12px}.input-field-wrapper input.hidden{display:none}input::placeholder{color:var(--apex-select-input-placeholder-color, #0B1222)}.input-field-wrapper input.no-icon{left:0}.input-field-wrapper.disabled input{cursor:not-allowed}.arrow-wrapper{width:8px;height:8px}.arrow{width:8px;height:8px;position:relative;bottom:3px;border-top:2px solid var(--apex-select-arrow-color, #5D6068);border-left:2px solid var(--apex-select-arrow-color, #5D6068);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px;transition:all .25s ease-in-out;transform-origin:center;transform:rotate(-135deg)}.arrow.checked{bottom:-2px;transform:rotate(45deg);border-top:2px solid var(--apex-select-arrow-checked-color, #F96138);border-left:2px solid var(--apex-select-arrow-checked-color, #F96138)}.arrow svg{width:16px;height:16px;transform:rotate(0);transition:transform .25s ease-in-out}.arrow.checked svg{transform:rotate(180deg)}.input-field-wrapper.invalid{border:solid var(--apex-select-invalid-color, #F96138);border-width:var(--apex-select-invalid-border-width, 1px)}.input-field-wrapper.invalid label{color:var(--apex-select-invalid-color, #F96138)}.input-field-wrapper apex-chip{margin-right:4px}.dropdown{width:264px;position:fixed;overscroll-behavior:contain;border-radius:8px;border:1px solid var(--apex-select-dropdown-border-color, #E9E9E9);background-color:var(--apex-select-dropdown-background-color, #FFFFFF);box-shadow:var(--apex-select-dropdown-box-shadow);z-index:900;margin-top:15px;opacity:0;animation:fadeIn .3s forwards}.dropdown:focus{outline:none}.dropdown::-webkit-scrollbar{width:16px;padding:8px}.dropdown::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.dropdown::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.dropdown::-webkit-scrollbar-button{display:none}.dropdown.no-scroll{overflow:hidden}.values::-webkit-scrollbar{width:8px;padding:4px}.values::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.values::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.values::-webkit-scrollbar-button{display:none}.dropdown .option{min-height:48px;display:flex;align-items:center;cursor:pointer;font-weight:600;color:#0009;padding:0 16px}.dropdown .option.disabled{pointer-events:none}.dropdown .option:hover,.dropdown .option.preselected{background:#00000005}.dropdown .option.checkbox.selected{--apex-checkbox-text-color: var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.dropdown .option.selected{color:var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.option-icon{width:var(--apex-select-option-icon-size, 16px);height:var(--apex-select-option-icon-size, 16px);min-width:var(--apex-select-option-icon-size, 16px);display:flex;justify-content:center;align-items:center;margin-right:var(--apex-select-option-icon-spacing, 10px)}.option-icon apex-img{max-width:var(--apex-select-option-icon-size, 20px);max-height:var(--apex-select-option-icon-size, 20px);display:flex;justify-content:center;align-items:center}.option-icon apex-img path{fill:var(--apex-select-option-icon-fill, #5D6068);stroke:var(--apex-select-option-icon-stroke, #ffffff00)}.dropdown .option.selected .option-icon apex-img path{fill:var(--apex-select-option-icon-selected-fill, #F96138);stroke:var(--apex-select-option-icon-selected-stroke, #ffffff00)}.values{width:fit-content;display:flex;flex-wrap:wrap;align-items:center;padding:6px;overflow-x:auto}.values apex-chip{margin:6px 0 0}.single-value{padding:6px}.options-divider{width:calc(100% - 36px);height:var(--apex-select-options-divider-height, 1px);background-color:var(--apex-select-options-divider-color, #E9E9E9);margin:0 auto}.multiple-checkbox-container{display:flex;flex-direction:column;row-gap:3px;padding:12px 0 12px 6px}.multiple-checkbox-container span{word-break:normal;overflow-wrap:break-word;white-space:normal}.multiple-checkbox-container span:nth-of-type(2){font-size:13px;font-weight:500;line-height:1.3;color:#5d6068}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"] }]
755
+ ], template: "@if (options) {\n @if (options.formGroup && options.formControlName) {\n <div class=\"container\" (mousedown)=\"preventFocusChange($event)\">\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n\n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [apexTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n\n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n <div #inputWrapper class=\"input-field-wrapper\" (click)=\"toggleDropdown()\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'invalid': checkIfControlInvalid(), 'disabled': checkIfControlDisabled() }\">\n @if (options.prefixImg) {\n <apex-img class=\"prefix\" [src]=\"'assets/img/' + this.options.prefixImg\" [alt]=\"'Select prefix icon'\"></apex-img>\n }\n\n @if (isSearchInDropdown() && options.multiple && this.showMultipleCount() > 0) {\n @if (options.counterAsValue) {\n <span class=\"multiple-count\">\n {{ this.showMultipleCount() }} selected\n </span>\n } @else {\n <div class=\"chips\">\n @for (data of getAllOptions(); track $index) {\n @if (isMultipleSelected(data)) {\n <apex-chip [closeIcon]=\"true\" (closeChange)=\"setMultipleValue(data)\">{{ data.label }}</apex-chip>\n }\n }\n </div>\n }\n }\n\n @if (!isSearchInDropdown() && options.searchable && options.multiple && this.showMultipleCount() > 0) {\n @if (options.counterAsValue) {\n <span class=\"multiple-count\">\n {{ this.showMultipleCount() }} selected\n </span>\n } @else {\n <div class=\"chips\">\n @for (data of getAllOptions(); track $index) {\n @if (isMultipleSelected(data)) {\n <apex-chip [closeIcon]=\"true\" (closeChange)=\"setMultipleValue(data)\">{{ data.label }}</apex-chip>\n }\n }\n </div>\n }\n }\n\n @if (isSearchInDropdown()) {\n <!-- Hidden input owns the form binding; the visible one is a placeholder slot. -->\n <input #hiddenInput\n class=\"hidden\"\n [formControlName]=\"options.formControlName\">\n\n <input #input\n readonly\n [disabled]=\"checkIfControlDisabled()\"\n [placeholder]=\"getPlaceholder()\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"/>\n } @else if (options.searchable) {\n <!-- used for formControl data binding and reactivness -->\n <input #hiddenInput\n class=\"hidden\"\n [formControlName]=\"options.formControlName\">\n\n <!-- used for searching and data displaying -->\n <input #input\n [placeholder]=\"getPlaceholder()\"\n [readOnly]=\"!options.searchable\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n [disabled]=\"checkIfControlDisabled()\"\n (keydown)=\"handleKeydown($event)\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onSearch(input.value, true)\"\n autocorrect=\"off\"\n spellcheck=\"false\">\n } @else {\n <input #input\n readonly\n [disabled]=\"checkIfControlDisabled()\"\n [placeholder]=\"getPlaceholder()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n [formControlName]=\"options.formControlName\"\n [ngClass]=\"{ 'no-icon': !options.prefixImg }\"\n (ngModelChange)=\"setVisibleValue($event)\"/>\n }\n\n <div class=\"arrow-wrapper\">\n <div class=\"arrow\" [class]=\"{ checked: this.isDropdown() }\"></div>\n </div>\n </div>\n\n @if (isDropdown()) {\n @if (isSearchInDropdown()) {\n <div #dropdownContainer class=\"dropdown dropdown-wrapper\">\n <div class=\"dropdown-search\">\n <svg class=\"dropdown-search-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" stroke=\"currentColor\" stroke-width=\"1.5\"/>\n <path d=\"M11 11L14 14\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n </svg>\n <input #dropdownSearch\n type=\"text\"\n placeholder=\"Search\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n (input)=\"onSearch(dropdownSearch.value, true)\"\n (keydown)=\"handleKeydown($event)\"/>\n </div>\n\n @if (options.groups && options.groups.length > 0) {\n <div class=\"dropdown-body\">\n @for (group of filteredGroups(); track group.label) {\n <div class=\"group-header\">{{ group.label }}</div>\n @for (data of group.data; track data.value) {\n <div class=\"option\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n }\n }\n\n @if (filteredGroups().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </div>\n } @else {\n <cdk-virtual-scroll-viewport [itemSize]=\"optionItemSizePx\" [style.height.px]=\"dropdownHeightPx()\" class=\"dropdown-body dropdown-body-virtual\" #dropdown>\n <div class=\"option\"\n *cdkVirtualFor=\"let data of filteredData();\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n @if (filteredData().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </cdk-virtual-scroll-viewport>\n }\n </div>\n } @else {\n <cdk-virtual-scroll-viewport [itemSize]=\"optionItemSizePx\" [style.height.px]=\"dropdownHeightPx()\" class=\"dropdown\" #dropdown>\n <div class=\"option\"\n *cdkVirtualFor=\"let data of filteredData();\"\n [ngClass]=\"{ selected: !options.multiple ? isValueSelected(data) : false, preselected: data.isHover, checkbox: options.multiple }\"\n (click)=\"options.multiple ? setMultipleValue(data, $event) : setValue(data)\">\n @if (options.multiple) {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n <apex-checkbox [checked]=\"isMultipleSelected(data)\">\n <div class=\"multiple-checkbox-container\">\n <span>{{ data.label }}</span>\n @if (data.description) { <span>{{ data.description }}</span> }\n </div>\n </apex-checkbox>\n } @else {\n @if (data.icon) {\n <div class=\"option-icon\">\n <apex-img [src]=\"'assets/img/' + data.icon\" [alt]=\"'Option icon.'\"></apex-img>\n </div>\n }\n {{ data.label }}\n }\n </div>\n @if (filteredData().length === 0) {\n <div class=\"option disabled\">No options to select from.</div>\n }\n </cdk-virtual-scroll-viewport>\n }\n }\n </div>\n }\n}\n", styles: [":host{display:block;touch-action:manipulation}:host-context(.table) .input-field-wrapper{width:80px;justify-content:center}:host-context(.table) .input-field-wrapper input{width:40px;color:var(--apex-select-input-table-color, #5D6068);font-weight:600;margin:0}.header{display:flex;align-items:center;justify-content:space-between;column-gap:4px;color:var(--apex-select-header-color, #0B1222);text-wrap:nowrap;margin-bottom:2px}.header label{font-size:14px;font-weight:600}.header-helper{font-size:12px;text-align:right;color:var(--apex-select-helper-text-color, #5D6068);cursor:pointer}.header-helper:after{width:0;height:1px;display:block;content:\"\";background:var(--apex-select-helper-text-color, #5D6068);transition:width .3s}.header-helper:hover:after{width:100%}.header .label-wrapper{display:flex;justify-content:center;align-items:center;text-wrap:wrap}.tooltip-icon{overflow:visible}.tooltip-icon path{fill:var(--apex-select-tooltip-icon-fill, transparent);stroke:var(--apex-input-tooltip-icon-stroke, #C6C6C6)}.input-field-wrapper{width:100%;height:44px;display:flex;justify-content:space-around;align-items:center;cursor:pointer;box-sizing:border-box;overflow:scroll;background-color:var(--apex-select-input-background-color, #ffffff00);border:solid var(--apex-select-input-border-color, #E9E9E9);border-width:var(--apex-select-input-border-width, 1px);transition:border 1s;border-radius:4px;padding:0 16px}.input-field-wrapper .multiple-count{font-size:14px;padding:0 8px;font-weight:600}.input-field-wrapper::-webkit-scrollbar{display:none}.input-field-wrapper:not(.input-field-wrapper.disabled):hover{border-color:var(--apex-select-input-border-hover-color, #4B5368)}.input-field-wrapper.disabled{opacity:.8;cursor:not-allowed;border:1px dashed var(--apex-select-input-border-disabled-color, #F2F2F2)}.input-field-wrapper .input-field{height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}apex-img{width:16px;height:16px}apex-img.prefix path{fill:var(--apex-select-icon-prefix-fill, #C6C6C6);stroke:var(--apex-select-icon-prefix-stroke, transparent)}.input-field-wrapper.disabled label{cursor:not-allowed}.chips{--apex-chip-font-size: var(--apex-select-chip-font-size, 10px);--apex-chip-color: var(--apex-select-chip-color, #FFFFFF);--apex-chip-background-color: var(--apex-select-chip-background-color, #0B1222);--apex-chip-icon-color: var(--apex-select-chip-icon-color, #FFFFFF);display:flex;padding-left:8px}.input-field-wrapper input{width:inherit;flex:1;text-overflow:ellipsis;border:none;outline:none;cursor:pointer;background:transparent;color:var(--apex-select-input-text-color, #0B1222);font-size:16px;transform:scale(.875);transform-origin:left center;padding:0;margin:0 12px}.input-field-wrapper input.hidden{display:none}input::placeholder{color:var(--apex-select-input-placeholder-color, #0B1222)}.input-field-wrapper input.no-icon{left:0}.input-field-wrapper.disabled input{cursor:not-allowed}.arrow-wrapper{width:8px;height:8px}.arrow{width:8px;height:8px;position:relative;bottom:3px;border-top:2px solid var(--apex-select-arrow-color, #5D6068);border-left:2px solid var(--apex-select-arrow-color, #5D6068);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px;transition:all .25s ease-in-out;transform-origin:center;transform:rotate(-135deg)}.arrow.checked{bottom:-2px;transform:rotate(45deg);border-top:2px solid var(--apex-select-arrow-checked-color, #F96138);border-left:2px solid var(--apex-select-arrow-checked-color, #F96138)}.arrow svg{width:16px;height:16px;transform:rotate(0);transition:transform .25s ease-in-out}.arrow.checked svg{transform:rotate(180deg)}.input-field-wrapper.invalid{border:solid var(--apex-select-invalid-color, #F96138);border-width:var(--apex-select-invalid-border-width, 1px)}.input-field-wrapper.invalid label{color:var(--apex-select-invalid-color, #F96138)}.input-field-wrapper apex-chip{margin-right:4px}.dropdown{width:264px;position:fixed;z-index:900;overscroll-behavior:contain;border-radius:8px;border:1px solid var(--apex-select-dropdown-border-color, #E9E9E9);background-color:var(--apex-select-dropdown-background-color, #FFFFFF);box-shadow:var(--apex-select-dropdown-box-shadow);animation:fadeIn .3s forwards;opacity:0;margin-top:15px}.dropdown:focus{outline:none}.dropdown::-webkit-scrollbar{width:16px;padding:8px}.dropdown::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.dropdown::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.dropdown::-webkit-scrollbar-button{display:none}.dropdown.no-scroll{overflow:hidden}.values::-webkit-scrollbar{width:8px;padding:4px}.values::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.values::-webkit-scrollbar-track{background-color:#f8f8f8;border-top-right-radius:8px;border-bottom-right-radius:8px}.values::-webkit-scrollbar-button{display:none}.dropdown .option{min-height:48px;display:flex;align-items:center;cursor:pointer;font-weight:600;color:#0009;padding:0 16px}.dropdown .option.disabled{pointer-events:none}.dropdown .option:hover,.dropdown .option.preselected{background:#00000005}.dropdown .option.checkbox.selected{--apex-checkbox-text-color: var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.dropdown .option.selected{color:var(--apex-select-input-text-selected-color, #F96138);background:#0000000a}.option-icon{width:var(--apex-select-option-icon-size, 16px);height:var(--apex-select-option-icon-size, 16px);min-width:var(--apex-select-option-icon-size, 16px);display:flex;justify-content:center;align-items:center;margin-right:var(--apex-select-option-icon-spacing, 10px)}.option-icon apex-img{max-width:var(--apex-select-option-icon-size, 20px);max-height:var(--apex-select-option-icon-size, 20px);display:flex;justify-content:center;align-items:center}.option-icon apex-img path{fill:var(--apex-select-option-icon-fill, #5D6068);stroke:var(--apex-select-option-icon-stroke, #ffffff00)}.dropdown .option.selected .option-icon apex-img path{fill:var(--apex-select-option-icon-selected-fill, #F96138);stroke:var(--apex-select-option-icon-selected-stroke, #ffffff00)}.values{width:fit-content;display:flex;flex-wrap:wrap;align-items:center;padding:6px;overflow-x:auto}.values apex-chip{margin:6px 0 0}.single-value{padding:6px}.options-divider{width:calc(100% - 36px);height:var(--apex-select-options-divider-height, 1px);background-color:var(--apex-select-options-divider-color, #E9E9E9);margin:0 auto}.multiple-checkbox-container{display:flex;flex-direction:column;row-gap:3px;padding:12px 0 12px 6px}.multiple-checkbox-container span{word-break:normal;overflow-wrap:break-word;white-space:normal}.multiple-checkbox-container span:nth-of-type(2){font-size:13px;font-weight:500;line-height:1.3;color:#5d6068}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.dropdown.dropdown-wrapper{display:flex;flex-direction:column;overflow:hidden;padding:0}.dropdown-search{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--apex-select-dropdown-search-border-color, #E9E9E9);color:var(--apex-select-dropdown-search-icon-color, #5D6068);padding:10px 16px}.dropdown-search-icon{flex:0 0 auto}.dropdown-search input{flex:1;border:none;outline:none;background:transparent;font-size:14px;color:var(--apex-select-input-text-color, #0B1222);padding:0}.dropdown-search input::placeholder{color:var(--apex-select-input-placeholder-color, #9A9A9A)}.dropdown-body{flex:1 1 auto;min-height:0;overflow-y:auto;max-height:var(--apex-select-dropdown-body-max-height, 320px)}.dropdown-body.dropdown-body-virtual{overflow:hidden;max-height:none}.dropdown-body::-webkit-scrollbar{width:8px}.dropdown-body::-webkit-scrollbar-thumb{background-color:#e0dfde;border-radius:25px}.dropdown-body::-webkit-scrollbar-track{background-color:#f8f8f8}.group-header{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:none;color:var(--apex-select-group-header-color, #9A9A9A);pointer-events:none;-webkit-user-select:none;user-select:none;padding:10px 16px 4px}\n"] }]
619
756
  }], ctorParameters: () => [{ type: i1.OSService }, { type: i0.ElementRef }, { type: i0.IterableDiffers }], propDecorators: { input: [{
620
757
  type: ViewChild,
621
758
  args: ['input']
@@ -628,6 +765,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
628
765
  }], inputWrapper: [{
629
766
  type: ViewChild,
630
767
  args: ['inputWrapper']
768
+ }], dropdownSearch: [{
769
+ type: ViewChild,
770
+ args: ['dropdownSearch']
771
+ }], dropdownContainer: [{
772
+ type: ViewChild,
773
+ args: ['dropdownContainer']
631
774
  }], options: [{
632
775
  type: Input
633
776
  }], selectChange: [{