@apexara/ng-components 1.0.5 → 1.0.6-test.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +298 -25
- package/fesm2022/apexara-ng-components-checkbox.mjs +53 -11
- package/fesm2022/apexara-ng-components-checkbox.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-chip.mjs +5 -2
- package/fesm2022/apexara-ng-components-chip.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-datepicker.mjs +65 -70
- package/fesm2022/apexara-ng-components-datepicker.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-dialog.mjs +2 -2
- package/fesm2022/apexara-ng-components-dialog.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-drawer.mjs +12 -22
- package/fesm2022/apexara-ng-components-drawer.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-expander.mjs +3 -15
- package/fesm2022/apexara-ng-components-expander.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-image.mjs +3 -5
- package/fesm2022/apexara-ng-components-image.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-input.mjs +19 -19
- package/fesm2022/apexara-ng-components-input.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-listbox.mjs +41 -33
- package/fesm2022/apexara-ng-components-listbox.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-more-options.mjs +132 -0
- package/fesm2022/apexara-ng-components-more-options.mjs.map +1 -0
- package/fesm2022/apexara-ng-components-radiobutton.mjs +2 -2
- package/fesm2022/apexara-ng-components-radiobutton.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-select.mjs +96 -79
- package/fesm2022/apexara-ng-components-select.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-snackbar.mjs +2 -44
- package/fesm2022/apexara-ng-components-snackbar.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-table.mjs +175 -102
- package/fesm2022/apexara-ng-components-table.mjs.map +1 -1
- package/fesm2022/apexara-ng-components-textarea.mjs +20 -17
- package/fesm2022/apexara-ng-components-textarea.mjs.map +1 -1
- package/package.json +5 -2
- package/types/apexara-ng-components-checkbox.d.ts +17 -8
- package/types/apexara-ng-components-chip.d.ts +7 -1
- package/types/apexara-ng-components-datepicker.d.ts +4 -6
- package/types/apexara-ng-components-drawer.d.ts +3 -4
- package/types/apexara-ng-components-image.d.ts +2 -3
- package/types/apexara-ng-components-input.d.ts +6 -8
- package/types/apexara-ng-components-listbox.d.ts +7 -8
- package/types/apexara-ng-components-more-options.d.ts +34 -0
- package/types/apexara-ng-components-select.d.ts +13 -10
- package/types/apexara-ng-components-snackbar.d.ts +0 -3
- package/types/apexara-ng-components-table.d.ts +46 -23
- package/types/apexara-ng-components-textarea.d.ts +6 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, inject, PLATFORM_ID, HostListener, Output, Input, ViewChild, Component } from '@angular/core';
|
|
2
|
+
import { EventEmitter, signal, inject, PLATFORM_ID, HostListener, Output, Input, ViewChild, Component } from '@angular/core';
|
|
3
3
|
import { isPlatformServer, NgClass } from '@angular/common';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { TouchedChangeEvent, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
6
|
import { RouterLink } from '@angular/router';
|
|
7
7
|
import * as i3 from '@angular/cdk/scrolling';
|
|
8
8
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
9
|
-
import { fromEvent, tap, debounceTime } from 'rxjs';
|
|
9
|
+
import { filter, fromEvent, tap, debounceTime } from 'rxjs';
|
|
10
10
|
import { ApexChipComponent } from '@apexara/ng-components/chip';
|
|
11
11
|
import { ApexImageComponent } from '@apexara/ng-components/image';
|
|
12
12
|
import { ApexCheckboxComponent } from '@apexara/ng-components/checkbox';
|
|
@@ -15,19 +15,18 @@ import { MobileOS } from '@apexara/ng-components/services';
|
|
|
15
15
|
import { TooltipPosition, ApexTooltipDirective } from '@apexara/ng-components/tooltip';
|
|
16
16
|
|
|
17
17
|
class ApexSelectComponent {
|
|
18
|
-
constructor(osService, elementRef, iterableDiffers
|
|
18
|
+
constructor(osService, elementRef, iterableDiffers) {
|
|
19
19
|
this.osService = osService;
|
|
20
20
|
this.elementRef = elementRef;
|
|
21
21
|
this.iterableDiffers = iterableDiffers;
|
|
22
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
23
22
|
this.input = null;
|
|
24
23
|
this.label = null;
|
|
25
24
|
this.dropdown = null;
|
|
26
25
|
this.inputWrapper = null;
|
|
27
26
|
this.selectChange = new EventEmitter();
|
|
28
27
|
this.helperTextChange = new EventEmitter();
|
|
29
|
-
this.firstDropdown = 0;
|
|
30
|
-
this.isDropdown = false;
|
|
28
|
+
this.firstDropdown = signal(0, ...(ngDevMode ? [{ debugName: "firstDropdown" }] : []));
|
|
29
|
+
this.isDropdown = signal(false, ...(ngDevMode ? [{ debugName: "isDropdown" }] : []));
|
|
31
30
|
this.tooltipPosition = TooltipPosition;
|
|
32
31
|
this.platformId = inject(PLATFORM_ID);
|
|
33
32
|
this.isDropdownReversed = false;
|
|
@@ -36,7 +35,7 @@ class ApexSelectComponent {
|
|
|
36
35
|
this.documentKeyupValueResetTime = 1000;
|
|
37
36
|
this.documentKeyUpSubscription = null;
|
|
38
37
|
this.controlSubscription = null;
|
|
39
|
-
this.filteredData = [];
|
|
38
|
+
this.filteredData = signal([], ...(ngDevMode ? [{ debugName: "filteredData" }] : []));
|
|
40
39
|
this.lastSearch = '';
|
|
41
40
|
this.keyListener = (event) => this.blockArrowScroll(event);
|
|
42
41
|
this.wheelListener = (event) => this.blockScroll(event);
|
|
@@ -44,14 +43,34 @@ class ApexSelectComponent {
|
|
|
44
43
|
// Virtual scroll config for options list
|
|
45
44
|
this.optionItemSizePx = 48; // must match .dropdown .option height in CSS
|
|
46
45
|
this.maxVisibleOptions = 8;
|
|
47
|
-
this.dropdownHeightPx = this.optionItemSizePx;
|
|
48
|
-
this.
|
|
46
|
+
this.dropdownHeightPx = signal(this.optionItemSizePx, ...(ngDevMode ? [{ debugName: "dropdownHeightPx" }] : []));
|
|
47
|
+
this.controlInvalid = signal(false, ...(ngDevMode ? [{ debugName: "controlInvalid" }] : []));
|
|
48
|
+
this.controlValue = signal(null, ...(ngDevMode ? [{ debugName: "controlValue" }] : []));
|
|
49
|
+
this.controlDisabled = signal(false, ...(ngDevMode ? [{ debugName: "controlDisabled" }] : []));
|
|
49
50
|
this.dataDiffer = this.iterableDiffers.find([]).create();
|
|
50
51
|
this.handleEvents();
|
|
51
52
|
}
|
|
52
53
|
ngOnInit() {
|
|
53
54
|
this.control = this.getControl();
|
|
54
|
-
this.
|
|
55
|
+
if (this.control) {
|
|
56
|
+
this.controlValue.set(this.control.value);
|
|
57
|
+
this.controlDisabled.set(this.control.disabled);
|
|
58
|
+
const touchedSub = this.control.events
|
|
59
|
+
.pipe(filter(event => event instanceof TouchedChangeEvent))
|
|
60
|
+
.subscribe(() => {
|
|
61
|
+
this.controlInvalid.set(this.control.touched && this.control.invalid);
|
|
62
|
+
});
|
|
63
|
+
const statusSub = this.control.statusChanges.subscribe(() => {
|
|
64
|
+
this.controlInvalid.set(this.control.touched && this.control.invalid);
|
|
65
|
+
this.controlDisabled.set(this.control.disabled);
|
|
66
|
+
});
|
|
67
|
+
const valueSub = this.control.valueChanges.subscribe((value) => {
|
|
68
|
+
this.controlValue.set(value);
|
|
69
|
+
});
|
|
70
|
+
this.controlSubscription = touchedSub;
|
|
71
|
+
this.controlSubscription.add(statusSub);
|
|
72
|
+
this.controlSubscription.add(valueSub);
|
|
73
|
+
}
|
|
55
74
|
if (isPlatformServer(this.platformId)) {
|
|
56
75
|
return;
|
|
57
76
|
}
|
|
@@ -65,32 +84,26 @@ class ApexSelectComponent {
|
|
|
65
84
|
if (!diff) {
|
|
66
85
|
return;
|
|
67
86
|
}
|
|
68
|
-
this.filteredData
|
|
69
|
-
this.changeDetectorRef.detectChanges();
|
|
87
|
+
this.filteredData.set([...data]);
|
|
70
88
|
}
|
|
71
89
|
ngAfterViewInit() {
|
|
72
|
-
this.filteredData
|
|
90
|
+
this.filteredData.set([...this.options.data]);
|
|
73
91
|
setTimeout(() => {
|
|
74
92
|
if (this.options.formGroup && this.options.formControlName) {
|
|
75
93
|
this.setVisibleValue(this.options.formGroup.controls[this.options.formControlName].value);
|
|
76
94
|
}
|
|
77
95
|
});
|
|
78
96
|
if (this.options.searchable) {
|
|
79
|
-
this.controlSubscription
|
|
97
|
+
this.controlSubscription.add(this.control.valueChanges.subscribe((value) => {
|
|
80
98
|
this.setVisibleValue(value);
|
|
81
|
-
|
|
82
|
-
this.changeDetectorRef.detectChanges();
|
|
83
|
-
});
|
|
84
|
-
});
|
|
99
|
+
}));
|
|
85
100
|
}
|
|
86
|
-
this.changeDetectorRef.detectChanges();
|
|
87
101
|
}
|
|
88
102
|
ngOnChanges(changes) {
|
|
89
103
|
if (!changes['options'] || changes['options'].firstChange) {
|
|
90
104
|
return;
|
|
91
105
|
}
|
|
92
106
|
this.updateDropdownHeight();
|
|
93
|
-
this.changeDetectorRef.detectChanges();
|
|
94
107
|
}
|
|
95
108
|
ngOnDestroy() {
|
|
96
109
|
if (isPlatformServer(this.platformId)) {
|
|
@@ -109,7 +122,6 @@ class ApexSelectComponent {
|
|
|
109
122
|
this.helperTextChange.emit();
|
|
110
123
|
}
|
|
111
124
|
setValue(value) {
|
|
112
|
-
this.changeDetectorRef.detectChanges();
|
|
113
125
|
if (!this.options.multiple) {
|
|
114
126
|
value = this.removeProperty(value, 'isHover');
|
|
115
127
|
}
|
|
@@ -148,7 +160,7 @@ class ApexSelectComponent {
|
|
|
148
160
|
}
|
|
149
161
|
this.lastSearch = '';
|
|
150
162
|
this.input.nativeElement.value = '';
|
|
151
|
-
this.filteredData
|
|
163
|
+
this.filteredData.set([...this.options.data]);
|
|
152
164
|
this.control.setValue(newValue);
|
|
153
165
|
this.selectChange.emit(newValue);
|
|
154
166
|
}
|
|
@@ -167,7 +179,7 @@ class ApexSelectComponent {
|
|
|
167
179
|
return;
|
|
168
180
|
}
|
|
169
181
|
let visibleValue = '';
|
|
170
|
-
for (let data of this.filteredData) {
|
|
182
|
+
for (let data of this.filteredData()) {
|
|
171
183
|
// when newValue is object and not array
|
|
172
184
|
if (data.value === newValue.value) {
|
|
173
185
|
visibleValue = data.label;
|
|
@@ -191,14 +203,13 @@ class ApexSelectComponent {
|
|
|
191
203
|
}
|
|
192
204
|
}
|
|
193
205
|
this.input.nativeElement.value = visibleValue;
|
|
194
|
-
this.changeDetectorRef.detectChanges();
|
|
195
206
|
}
|
|
196
207
|
updateDropdownHeight() {
|
|
197
|
-
if (!this.isDropdown) {
|
|
208
|
+
if (!this.isDropdown()) {
|
|
198
209
|
return;
|
|
199
210
|
}
|
|
200
211
|
setTimeout(() => {
|
|
201
|
-
const count = this.filteredData.length;
|
|
212
|
+
const count = this.filteredData().length;
|
|
202
213
|
const maxRows = this.maxVisibleOptions;
|
|
203
214
|
let next = this.optionItemSizePx;
|
|
204
215
|
if (count > 0 && count <= maxRows && this.dropdown) {
|
|
@@ -218,34 +229,39 @@ class ApexSelectComponent {
|
|
|
218
229
|
if (maxHeight) {
|
|
219
230
|
next = Math.min(next, Math.max(this.optionItemSizePx, maxHeight));
|
|
220
231
|
}
|
|
221
|
-
this.dropdownHeightPx
|
|
222
|
-
this.changeDetectorRef.detectChanges();
|
|
232
|
+
this.dropdownHeightPx.set(next);
|
|
223
233
|
setTimeout(() => {
|
|
224
234
|
this.dropdown?.checkViewportSize();
|
|
225
235
|
}, 100);
|
|
226
236
|
});
|
|
227
237
|
}
|
|
228
238
|
showMultipleCount() {
|
|
229
|
-
|
|
239
|
+
const value = this.controlValue();
|
|
240
|
+
if (!value || !value.length) {
|
|
230
241
|
return 0;
|
|
231
242
|
}
|
|
232
|
-
return
|
|
243
|
+
return value.length;
|
|
233
244
|
}
|
|
234
245
|
isValueSelected(value) {
|
|
235
|
-
|
|
246
|
+
const controlVal = this.controlValue();
|
|
247
|
+
if (value.value == null || controlVal == null) {
|
|
236
248
|
return false;
|
|
237
249
|
}
|
|
238
|
-
return value.value ===
|
|
250
|
+
return value.value === controlVal.value;
|
|
239
251
|
}
|
|
240
252
|
isMultipleSelected(value) {
|
|
241
|
-
|
|
242
|
-
|
|
253
|
+
const controlVal = this.controlValue();
|
|
254
|
+
if (!controlVal || !controlVal.length) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
for (let i = 0; i < controlVal.length; i++) {
|
|
258
|
+
if (value.value === controlVal[i]) {
|
|
243
259
|
return true;
|
|
244
260
|
}
|
|
245
|
-
if (
|
|
261
|
+
if (controlVal[i].value === value.value) {
|
|
246
262
|
return true;
|
|
247
263
|
}
|
|
248
|
-
if (JSON.stringify(
|
|
264
|
+
if (JSON.stringify(controlVal[i].value) === JSON.stringify(value.value)) {
|
|
249
265
|
return true;
|
|
250
266
|
}
|
|
251
267
|
}
|
|
@@ -255,13 +271,11 @@ class ApexSelectComponent {
|
|
|
255
271
|
if (this.checkIfControlDisabled()) {
|
|
256
272
|
return;
|
|
257
273
|
}
|
|
258
|
-
this.isDropdown
|
|
274
|
+
this.isDropdown.set(true);
|
|
259
275
|
this.input.nativeElement.focus();
|
|
260
|
-
if (this.firstDropdown === 0) {
|
|
261
|
-
this.firstDropdown
|
|
276
|
+
if (this.firstDropdown() === 0) {
|
|
277
|
+
this.firstDropdown.update(v => v + 1);
|
|
262
278
|
setTimeout(() => this.generateDropdownPosition(true));
|
|
263
|
-
// Reattaching is needed to properly update the hovered options by KeyboardEvents
|
|
264
|
-
this.changeDetectorRef.reattach();
|
|
265
279
|
}
|
|
266
280
|
this.attachGlobalScrollBlockers();
|
|
267
281
|
this.onSearch(this.lastSearch, false);
|
|
@@ -301,7 +315,7 @@ class ApexSelectComponent {
|
|
|
301
315
|
if (this.shouldPreventEvents) {
|
|
302
316
|
return;
|
|
303
317
|
}
|
|
304
|
-
if (this.isDropdown) {
|
|
318
|
+
if (this.isDropdown()) {
|
|
305
319
|
this.removeDropdown();
|
|
306
320
|
}
|
|
307
321
|
else {
|
|
@@ -337,16 +351,13 @@ class ApexSelectComponent {
|
|
|
337
351
|
setTimeout(() => {
|
|
338
352
|
this.updateDropdownHeight();
|
|
339
353
|
}, 100);
|
|
340
|
-
this.changeDetectorRef.detectChanges();
|
|
341
354
|
}
|
|
342
355
|
removeDropdown() {
|
|
343
|
-
this.isDropdown
|
|
356
|
+
this.isDropdown.set(false);
|
|
344
357
|
this.isDropdownReversed = false;
|
|
345
|
-
this.firstDropdown
|
|
346
|
-
this.changeDetectorRef.detectChanges();
|
|
358
|
+
this.firstDropdown.set(0);
|
|
347
359
|
this.input.nativeElement.blur();
|
|
348
360
|
this.detachGlobalScrollBlockers();
|
|
349
|
-
this.changeDetectorRef.detach();
|
|
350
361
|
}
|
|
351
362
|
handleKeydown(event) {
|
|
352
363
|
if (event.code === 'Backspace') {
|
|
@@ -363,24 +374,26 @@ class ApexSelectComponent {
|
|
|
363
374
|
this.lastSearch = value;
|
|
364
375
|
if (!value) {
|
|
365
376
|
// Reset to original data if input is empty
|
|
366
|
-
this.filteredData
|
|
377
|
+
this.filteredData.set([...this.options.data]);
|
|
367
378
|
this.updateDropdownHeight();
|
|
368
379
|
return;
|
|
369
380
|
}
|
|
370
381
|
const searchTerm = value.toLowerCase();
|
|
371
|
-
|
|
372
|
-
if (
|
|
373
|
-
for (let i = 0; i <
|
|
374
|
-
|
|
382
|
+
const filtered = this.options.data.filter(item => item.label.toLowerCase().includes(searchTerm));
|
|
383
|
+
if (filtered.length && shouldResetHover) {
|
|
384
|
+
for (let i = 0; i < filtered.length; i++) {
|
|
385
|
+
filtered[i].isHover = false;
|
|
375
386
|
}
|
|
376
|
-
|
|
387
|
+
filtered[0].isHover = true;
|
|
377
388
|
}
|
|
389
|
+
this.filteredData.set(filtered);
|
|
378
390
|
this.updateDropdownHeight();
|
|
379
391
|
}
|
|
380
392
|
getPlaceholder() {
|
|
381
393
|
const options = this.options;
|
|
382
394
|
const formGroup = options.formGroup;
|
|
383
395
|
const formControlName = options.formControlName;
|
|
396
|
+
const controlVal = this.controlValue();
|
|
384
397
|
let placeholder = '';
|
|
385
398
|
if (options.placeholder) {
|
|
386
399
|
placeholder = options.placeholder;
|
|
@@ -392,16 +405,16 @@ class ApexSelectComponent {
|
|
|
392
405
|
}
|
|
393
406
|
}
|
|
394
407
|
}
|
|
395
|
-
if ((
|
|
408
|
+
if ((controlVal instanceof Array && controlVal.length) || (controlVal && !(controlVal instanceof Array))) {
|
|
396
409
|
return '';
|
|
397
410
|
}
|
|
398
411
|
return placeholder;
|
|
399
412
|
}
|
|
400
413
|
checkIfControlInvalid() {
|
|
401
|
-
return this.
|
|
414
|
+
return this.controlInvalid();
|
|
402
415
|
}
|
|
403
416
|
checkIfControlDisabled() {
|
|
404
|
-
return this.
|
|
417
|
+
return this.controlDisabled();
|
|
405
418
|
}
|
|
406
419
|
getControl() {
|
|
407
420
|
if (this.options && this.options.formGroup && this.options.formControlName) {
|
|
@@ -459,67 +472,71 @@ class ApexSelectComponent {
|
|
|
459
472
|
}
|
|
460
473
|
}
|
|
461
474
|
documentEnterKeyup(event) {
|
|
462
|
-
|
|
463
|
-
|
|
475
|
+
const data = this.filteredData();
|
|
476
|
+
for (let i = 0; i < data.length; i++) {
|
|
477
|
+
if (data[i].isHover) {
|
|
464
478
|
switch (this.options.multiple) {
|
|
465
479
|
case true:
|
|
466
|
-
this.setMultipleValue(
|
|
480
|
+
this.setMultipleValue(data[i], event);
|
|
467
481
|
this.updateDropdownHeight();
|
|
468
|
-
this.changeDetectorRef.detectChanges();
|
|
469
482
|
return;
|
|
470
483
|
default:
|
|
471
|
-
this.setValue(
|
|
484
|
+
this.setValue(data[i]);
|
|
472
485
|
this.removeDropdown();
|
|
473
486
|
}
|
|
474
487
|
}
|
|
475
488
|
}
|
|
476
489
|
}
|
|
477
490
|
documentArrowsKeyup(isDownArrow) {
|
|
478
|
-
if (!this.dropdown || !this.filteredData.length) {
|
|
491
|
+
if (!this.dropdown || !this.filteredData().length) {
|
|
479
492
|
return;
|
|
480
493
|
}
|
|
481
|
-
const
|
|
494
|
+
const data = this.filteredData();
|
|
495
|
+
const dataLength = data.length;
|
|
482
496
|
const controlValue = this.control.getRawValue();
|
|
483
497
|
const isControlValue = controlValue && controlValue !== '';
|
|
484
498
|
let hoverIndex = null;
|
|
485
499
|
let valueIndex = null;
|
|
486
500
|
for (let i = 0; i < dataLength; i++) {
|
|
487
|
-
if (
|
|
501
|
+
if (data[i].isHover) {
|
|
488
502
|
hoverIndex = i;
|
|
489
503
|
}
|
|
490
|
-
if (isControlValue &&
|
|
504
|
+
if (isControlValue && data[i].value === controlValue) {
|
|
491
505
|
valueIndex = i;
|
|
492
506
|
}
|
|
493
|
-
|
|
507
|
+
data[i].isHover = false;
|
|
494
508
|
}
|
|
495
509
|
const currentIndex = hoverIndex ? hoverIndex : valueIndex ? valueIndex : 0;
|
|
496
510
|
let newIndex = isDownArrow ? currentIndex + 1 : currentIndex - 1;
|
|
497
511
|
newIndex = newIndex < 0 ? 0 : newIndex;
|
|
498
512
|
newIndex = newIndex >= dataLength ? dataLength - 1 : newIndex;
|
|
499
|
-
|
|
513
|
+
data[newIndex].isHover = true;
|
|
514
|
+
this.filteredData.set([...data]);
|
|
500
515
|
this.dropdown?.scrollToIndex(newIndex, 'auto');
|
|
501
516
|
}
|
|
502
517
|
documentKeyup(event) {
|
|
503
|
-
if (!this.isDropdown || this.options.searchable) {
|
|
518
|
+
if (!this.isDropdown() || this.options.searchable) {
|
|
504
519
|
return;
|
|
505
520
|
}
|
|
506
|
-
|
|
507
|
-
|
|
521
|
+
const data = this.filteredData();
|
|
522
|
+
for (let i = 0; i < data.length; i++) {
|
|
523
|
+
data[i].isHover = false;
|
|
508
524
|
}
|
|
509
525
|
this.documentKeyupValue = this.documentKeyupValue + event.key.toLowerCase();
|
|
510
526
|
let newIndex = null;
|
|
511
|
-
for (let i = 0; i <
|
|
512
|
-
const subLabel =
|
|
527
|
+
for (let i = 0; i < data.length; i++) {
|
|
528
|
+
const subLabel = data[i].label.substring(0, this.documentKeyupValue.length).toLowerCase();
|
|
513
529
|
if (subLabel === this.documentKeyupValue) {
|
|
514
530
|
newIndex = i;
|
|
515
531
|
break;
|
|
516
532
|
}
|
|
517
|
-
|
|
533
|
+
data[i].isHover = false;
|
|
518
534
|
}
|
|
519
535
|
if (newIndex !== null) {
|
|
520
|
-
|
|
536
|
+
data[newIndex].isHover = true;
|
|
521
537
|
this.dropdown?.scrollToIndex(newIndex, 'auto');
|
|
522
538
|
}
|
|
539
|
+
this.filteredData.set([...data]);
|
|
523
540
|
}
|
|
524
541
|
removeProperty(obj, propertyName) {
|
|
525
542
|
let { [propertyName]: removedProperty, ...data } = obj;
|
|
@@ -573,8 +590,8 @@ class ApexSelectComponent {
|
|
|
573
590
|
window.removeEventListener('touchmove', this.wheelListener);
|
|
574
591
|
this.scrollBlockersAttached = false;
|
|
575
592
|
}
|
|
576
|
-
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 }
|
|
577
|
-
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\" 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 <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 {{ 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}.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"], 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"] }] }); }
|
|
593
|
+
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 }); }
|
|
594
|
+
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"] }] }); }
|
|
578
595
|
}
|
|
579
596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ApexSelectComponent, decorators: [{
|
|
580
597
|
type: Component,
|
|
@@ -588,8 +605,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
588
605
|
ApexTooltipDirective,
|
|
589
606
|
ReactiveFormsModule,
|
|
590
607
|
ApexCheckboxComponent,
|
|
591
|
-
], 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\" 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 <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 {{ 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}.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"] }]
|
|
592
|
-
}], ctorParameters: () => [{ type: i1.OSService }, { type: i0.ElementRef }, { type: i0.IterableDiffers }
|
|
608
|
+
], 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"] }]
|
|
609
|
+
}], ctorParameters: () => [{ type: i1.OSService }, { type: i0.ElementRef }, { type: i0.IterableDiffers }], propDecorators: { input: [{
|
|
593
610
|
type: ViewChild,
|
|
594
611
|
args: ['input']
|
|
595
612
|
}], label: [{
|