@wizishop/angular-components 14.3.14 → 14.3.15
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/esm2020/lib/components/selects/option/option-selection-handler.interface.mjs +1 -1
- package/esm2020/lib/components/selects/option/option-selection-handler.token.mjs +1 -1
- package/esm2020/lib/components/selects/option/option.component.mjs +3 -3
- package/esm2020/lib/components/selects/option/select-option.directive.mjs +3 -3
- package/esm2020/lib/components/selects/select-test/select.component.mjs +36 -92
- package/esm2020/lib/components/selects/select-test/select.directive.mjs +122 -0
- package/esm2020/lib/components/selects/select-test/value-change.service.mjs +5 -5
- package/esm2020/lib/directives/shared-directives.module.mjs +4 -3
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/wizishop-angular-components.mjs +301 -243
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +301 -243
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/selects/option/option-selection-handler.interface.d.ts +3 -3
- package/lib/components/selects/option/option-selection-handler.token.d.ts +1 -1
- package/lib/components/selects/option/option.component.d.ts +7 -7
- package/lib/components/selects/option/select-option.directive.d.ts +7 -7
- package/lib/components/selects/select-test/select.component.d.ts +12 -23
- package/lib/components/selects/select-test/select.directive.d.ts +33 -0
- package/lib/components/selects/select-test/value-change.service.d.ts +8 -8
- package/lib/directives/shared-directives.module.d.ts +4 -3
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/wizishop-angular-components-14.3.15.tgz +0 -0
- package/wizishop-angular-components-14.3.14.tgz +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as i1$2 from '@wizishop/ng-wizi-bulma';
|
|
2
2
|
import { NwbAllModule, NwbFilterGroup } from '@wizishop/ng-wizi-bulma';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ViewEncapsulation, Input, EventEmitter, Directive, Output, HostListener, Injectable, InjectionToken, NgModule, Inject, Pipe,
|
|
4
|
+
import { Component, ViewEncapsulation, Input, EventEmitter, Directive, Output, HostListener, Injectable, InjectionToken, ContentChildren, NgModule, Inject, Pipe, Attribute, Optional, ViewChild, ChangeDetectionStrategy, HostBinding, ContentChild } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, FormsModule, FormGroupDirective, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i4$1 from 'ngx-perfect-scrollbar';
|
|
10
10
|
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
11
|
-
import { Subject, merge,
|
|
12
|
-
import { takeUntil, debounceTime, distinctUntilChanged, tap, map, takeWhile,
|
|
11
|
+
import { Subject, merge, takeUntil as takeUntil$1, startWith, fromEvent, ReplaySubject, interval, map as map$1 } from 'rxjs';
|
|
12
|
+
import { takeUntil, debounceTime, distinctUntilChanged, tap, map, takeWhile, filter } from 'rxjs/operators';
|
|
13
13
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
14
|
+
import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, A, Z, ZERO, NINE, ENTER, SPACE, hasModifierKey, ESCAPE } from '@angular/cdk/keycodes';
|
|
14
15
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
15
16
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
16
17
|
import { TagInputModule } from 'ngx-chips';
|
|
@@ -20,7 +21,6 @@ import * as i4 from 'ngx-autosize';
|
|
|
20
21
|
import { AutosizeModule } from 'ngx-autosize';
|
|
21
22
|
import * as i2$1 from '@angular/router';
|
|
22
23
|
import { RouterModule } from '@angular/router';
|
|
23
|
-
import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, ESCAPE, A, Z, ZERO, NINE } from '@angular/cdk/keycodes';
|
|
24
24
|
import * as i2$2 from 'ngx-scrollbar';
|
|
25
25
|
import { NgScrollbarModule } from 'ngx-scrollbar';
|
|
26
26
|
import * as i3 from 'ngx-scrollbar/reached-event';
|
|
@@ -362,7 +362,7 @@ class SelectOptionDirective {
|
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
364
|
this.selected = !this.selected;
|
|
365
|
-
this.selectedChange.emit(this.
|
|
365
|
+
this.selectedChange.emit(this.selected);
|
|
366
366
|
}
|
|
367
367
|
getValue() {
|
|
368
368
|
return this.value;
|
|
@@ -375,7 +375,7 @@ class SelectOptionDirective {
|
|
|
375
375
|
}
|
|
376
376
|
setSelected(selected) {
|
|
377
377
|
this.selected = selected;
|
|
378
|
-
this.selectedChange.emit(this.
|
|
378
|
+
this.selectedChange.emit(this.selected);
|
|
379
379
|
}
|
|
380
380
|
getContentRef() {
|
|
381
381
|
return this.contentRef;
|
|
@@ -402,11 +402,269 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
402
402
|
type: Output
|
|
403
403
|
}] } });
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
class ValueChangeService {
|
|
406
|
+
constructor(changeDetectorRef) {
|
|
407
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
408
|
+
this.valueChange$ = new Subject();
|
|
409
|
+
this.indexSelectedOption = null;
|
|
410
|
+
this.resetListeners$ = new Subject();
|
|
411
|
+
this.indexOfMatchedOption = (option, index, letter) => {
|
|
412
|
+
const textOption = option.getContentRef().nativeElement.textContent.trim().toLowerCase();
|
|
413
|
+
return textOption.startsWith(letter) ? index : null;
|
|
414
|
+
};
|
|
415
|
+
this.isNotNull = (index) => {
|
|
416
|
+
return index !== null;
|
|
417
|
+
};
|
|
418
|
+
this.highestAndClosestIndex = (index) => {
|
|
419
|
+
if (isNaN(this.indexSelectedOption)) {
|
|
420
|
+
return true;
|
|
421
|
+
}
|
|
422
|
+
if (index > this.indexSelectedOption) {
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
return false;
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
set value(value) {
|
|
429
|
+
this._value = value;
|
|
430
|
+
this.handleValueChange();
|
|
431
|
+
this.valueChange$.next(value);
|
|
432
|
+
}
|
|
433
|
+
get value() {
|
|
434
|
+
return this._value;
|
|
435
|
+
}
|
|
436
|
+
handleSelectOptionsChange(optionChildren, value) {
|
|
437
|
+
this.resetListeners$.next();
|
|
438
|
+
this.optionChildren = optionChildren;
|
|
439
|
+
this._value = value;
|
|
440
|
+
this.indexSelectedOption = null;
|
|
441
|
+
this.handleInitialSelectedOption();
|
|
442
|
+
this.handleSelectedOptionsEvent();
|
|
443
|
+
}
|
|
444
|
+
assignValue(value) {
|
|
445
|
+
this._value = value;
|
|
446
|
+
this.handleValueChange();
|
|
447
|
+
}
|
|
448
|
+
handleValueChange() {
|
|
449
|
+
this.changeSelectedOption();
|
|
450
|
+
this.updateSelectPlaceholder();
|
|
451
|
+
this.changeDetectorRef.markForCheck();
|
|
452
|
+
}
|
|
453
|
+
selectNextOption() {
|
|
454
|
+
if (this.indexSelectedOption + 1 >= this.optionChildren.length) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
if (this.indexSelectedOption === null) {
|
|
458
|
+
this.indexSelectedOption = 0;
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
this.indexSelectedOption = this.indexSelectedOption + 1;
|
|
462
|
+
}
|
|
463
|
+
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
464
|
+
}
|
|
465
|
+
selectPreviousOption() {
|
|
466
|
+
if (!this.indexSelectedOption) {
|
|
467
|
+
this.indexSelectedOption = null;
|
|
468
|
+
this.assignValue(null);
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
this.indexSelectedOption = this.indexSelectedOption - 1;
|
|
472
|
+
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
473
|
+
}
|
|
474
|
+
searchOptionByFirstLetter(letter) {
|
|
475
|
+
const matchedOptionsIndex = this.optionChildren
|
|
476
|
+
.map((option, index) => this.indexOfMatchedOption(option, index, letter))
|
|
477
|
+
.filter(this.isNotNull);
|
|
478
|
+
if (!matchedOptionsIndex.length) { // reset the selection
|
|
479
|
+
this.indexSelectedOption = null;
|
|
480
|
+
this.value = null;
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
// find the next option after the current selected option, or the first option
|
|
484
|
+
const validOptionIndex = matchedOptionsIndex.find(this.highestAndClosestIndex);
|
|
485
|
+
this.indexSelectedOption = isNaN(validOptionIndex) ? matchedOptionsIndex[0] : validOptionIndex;
|
|
486
|
+
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
487
|
+
}
|
|
488
|
+
handleInitialSelectedOption() {
|
|
489
|
+
setTimeout(() => {
|
|
490
|
+
if (!this.value) {
|
|
491
|
+
this.findInitialSelectedOption();
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
this.handleValueChange();
|
|
495
|
+
}, 0);
|
|
496
|
+
}
|
|
497
|
+
findInitialSelectedOption() {
|
|
498
|
+
const selectedOption = this.getSelectedOptionComponent();
|
|
499
|
+
if (!selectedOption) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
this.value = selectedOption.value;
|
|
503
|
+
}
|
|
504
|
+
handleSelectedOptionsEvent() {
|
|
505
|
+
this.optionSelectedChangeListeners().subscribe((selectEvent) => {
|
|
506
|
+
this.value = selectEvent.value;
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
updateSelectPlaceholder() {
|
|
510
|
+
if (!this.value) {
|
|
511
|
+
this.selectedOptionContent = null;
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
const selectedOption = this.getSelectedOptionComponent();
|
|
515
|
+
this.selectedOptionContent = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.getContentRef().nativeElement.innerHTML) || undefined;
|
|
516
|
+
}
|
|
517
|
+
getSelectedOptionComponent() {
|
|
518
|
+
return this.optionChildren.find((option) => option.selected);
|
|
519
|
+
}
|
|
520
|
+
optionSelectedChangeListeners() {
|
|
521
|
+
const selectedChange$ = this.optionChildren.map((option) => {
|
|
522
|
+
return option.selectedChange.pipe(map((value) => {
|
|
523
|
+
return {
|
|
524
|
+
value
|
|
525
|
+
};
|
|
526
|
+
}));
|
|
527
|
+
});
|
|
528
|
+
return merge(...selectedChange$).pipe(takeUntil(this.resetListeners$));
|
|
529
|
+
}
|
|
530
|
+
changeSelectedOption() {
|
|
531
|
+
this.optionChildren.forEach((optionComponent, index) => {
|
|
532
|
+
optionComponent.selected = this.value == undefined ? false : optionComponent.value === this.value;
|
|
533
|
+
if (optionComponent.selected) {
|
|
534
|
+
this.indexSelectedOption = index;
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
ngOnDestroy() {
|
|
539
|
+
this.resetListeners$.next();
|
|
540
|
+
this.resetListeners$.complete();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
ValueChangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
544
|
+
ValueChangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService });
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, decorators: [{
|
|
546
|
+
type: Injectable
|
|
547
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
548
|
+
|
|
549
|
+
class SelectDirective {
|
|
550
|
+
constructor(valueChangeService) {
|
|
551
|
+
this.valueChangeService = valueChangeService;
|
|
552
|
+
this.valueChange = new EventEmitter();
|
|
553
|
+
this.disabled = false;
|
|
554
|
+
this.isDestroyed$ = new Subject();
|
|
555
|
+
// ControlValueAccessor methods
|
|
556
|
+
this.onChange = () => { };
|
|
557
|
+
this.onTouch = () => { };
|
|
558
|
+
}
|
|
559
|
+
/** Handles all keydown events on the select. */
|
|
560
|
+
onKeydown(event) {
|
|
561
|
+
if (this.disabled) {
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
this.handleKeyboardAction(event);
|
|
565
|
+
}
|
|
566
|
+
set value(value) {
|
|
567
|
+
this._value = value;
|
|
568
|
+
if (!this.optionChildren) {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
this.valueChangeService.assignValue(value);
|
|
572
|
+
}
|
|
573
|
+
get value() {
|
|
574
|
+
return this._value;
|
|
575
|
+
}
|
|
576
|
+
ngOnInit() {
|
|
577
|
+
this.handleValueChange();
|
|
578
|
+
}
|
|
579
|
+
ngAfterViewInit() {
|
|
580
|
+
this.handleOptionChildren();
|
|
581
|
+
}
|
|
582
|
+
handleValueChange() {
|
|
583
|
+
this.valueChangeService.valueChange$.pipe(takeUntil$1(this.isDestroyed$)).subscribe(value => {
|
|
584
|
+
this._value = value;
|
|
585
|
+
this.valueChange.emit(this.value);
|
|
586
|
+
this.onChange(this.value);
|
|
587
|
+
this.onTouch(this.value);
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
handleOptionChildren() {
|
|
591
|
+
this.optionChildren.changes.pipe(takeUntil$1(this.isDestroyed$), startWith(this.optionChildren)).subscribe(optionChildren => {
|
|
592
|
+
this.valueChangeService.handleSelectOptionsChange(optionChildren, this.value);
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
/** Handles keyboard events when the selected is open. */
|
|
596
|
+
handleKeyboardAction(event) {
|
|
597
|
+
const keyCode = event.keyCode;
|
|
598
|
+
const isArrowKey = keyCode === DOWN_ARROW ||
|
|
599
|
+
keyCode === UP_ARROW ||
|
|
600
|
+
keyCode === LEFT_ARROW ||
|
|
601
|
+
keyCode === RIGHT_ARROW;
|
|
602
|
+
const isTyping = (keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE);
|
|
603
|
+
event.preventDefault(); // prevents the page from scrolling
|
|
604
|
+
if (isArrowKey) {
|
|
605
|
+
// select the next option on arrow key down
|
|
606
|
+
if (keyCode === DOWN_ARROW || keyCode === RIGHT_ARROW) {
|
|
607
|
+
this.valueChangeService.selectNextOption();
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
this.valueChangeService.selectPreviousOption();
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (isTyping) {
|
|
614
|
+
this.valueChangeService.searchOptionByFirstLetter(event.key);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
writeValue(value) {
|
|
619
|
+
if (typeof value === 'undefined') {
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
this.value = value;
|
|
623
|
+
}
|
|
624
|
+
registerOnChange(fn) {
|
|
625
|
+
this.onChange = fn;
|
|
626
|
+
}
|
|
627
|
+
registerOnTouched(fn) {
|
|
628
|
+
this.onTouch = fn;
|
|
629
|
+
}
|
|
630
|
+
ngOnDestroy() {
|
|
631
|
+
this.isDestroyed$.next();
|
|
632
|
+
this.isDestroyed$.complete();
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
SelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectDirective, deps: [{ token: ValueChangeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
636
|
+
SelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectDirective, selector: "[wacSelect]", inputs: { value: "value", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown": "onKeydown($event)" } }, providers: [
|
|
637
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectDirective, multi: true },
|
|
638
|
+
ValueChangeService
|
|
639
|
+
], queries: [{ propertyName: "optionChildren", predicate: OPTION_SELECTION_HANDLER, descendants: true }], ngImport: i0 });
|
|
640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectDirective, decorators: [{
|
|
641
|
+
type: Directive,
|
|
642
|
+
args: [{
|
|
643
|
+
selector: '[wacSelect]',
|
|
644
|
+
providers: [
|
|
645
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectDirective, multi: true },
|
|
646
|
+
ValueChangeService
|
|
647
|
+
]
|
|
648
|
+
}]
|
|
649
|
+
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { onKeydown: [{
|
|
650
|
+
type: HostListener,
|
|
651
|
+
args: ['keydown', ['$event']]
|
|
652
|
+
}], optionChildren: [{
|
|
653
|
+
type: ContentChildren,
|
|
654
|
+
args: [OPTION_SELECTION_HANDLER, { descendants: true }]
|
|
655
|
+
}], value: [{
|
|
656
|
+
type: Input
|
|
657
|
+
}], valueChange: [{
|
|
658
|
+
type: Output
|
|
659
|
+
}], disabled: [{
|
|
660
|
+
type: Input
|
|
661
|
+
}] } });
|
|
662
|
+
|
|
663
|
+
const directives$2 = [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective, SelectOptionDirective, SelectDirective];
|
|
406
664
|
class SharedDirectives {
|
|
407
665
|
}
|
|
408
666
|
SharedDirectives.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
409
|
-
SharedDirectives.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, declarations: [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective, SelectOptionDirective], imports: [CommonModule, FormsModule], exports: [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective, SelectOptionDirective] });
|
|
667
|
+
SharedDirectives.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, declarations: [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective, SelectOptionDirective, SelectDirective], imports: [CommonModule, FormsModule], exports: [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective, SelectOptionDirective, SelectDirective] });
|
|
410
668
|
SharedDirectives.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, imports: [CommonModule, FormsModule] });
|
|
411
669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SharedDirectives, decorators: [{
|
|
412
670
|
type: NgModule,
|
|
@@ -4250,150 +4508,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4250
4508
|
type: Input
|
|
4251
4509
|
}] } });
|
|
4252
4510
|
|
|
4253
|
-
class ValueChangeService {
|
|
4254
|
-
constructor(changeDetectorRef) {
|
|
4255
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
4256
|
-
this.valueChange$ = new Subject();
|
|
4257
|
-
this.indexSelectedOption = null;
|
|
4258
|
-
this.resetListeners$ = new Subject();
|
|
4259
|
-
this.indexOfMatchedOption = (option, index, letter) => {
|
|
4260
|
-
const textOption = option.getContentRef().nativeElement.textContent.trim().toLowerCase();
|
|
4261
|
-
return textOption.startsWith(letter) ? index : null;
|
|
4262
|
-
};
|
|
4263
|
-
this.isNotNull = (index) => {
|
|
4264
|
-
return index !== null;
|
|
4265
|
-
};
|
|
4266
|
-
this.highestAndClosestIndex = (index) => {
|
|
4267
|
-
if (isNaN(this.indexSelectedOption)) {
|
|
4268
|
-
return true;
|
|
4269
|
-
}
|
|
4270
|
-
if (index > this.indexSelectedOption) {
|
|
4271
|
-
return true;
|
|
4272
|
-
}
|
|
4273
|
-
return false;
|
|
4274
|
-
};
|
|
4275
|
-
}
|
|
4276
|
-
set value(value) {
|
|
4277
|
-
this._value = value;
|
|
4278
|
-
this.handleValueChange();
|
|
4279
|
-
this.valueChange$.next(value);
|
|
4280
|
-
}
|
|
4281
|
-
get value() {
|
|
4282
|
-
return this._value;
|
|
4283
|
-
}
|
|
4284
|
-
handleSelectOptionsChange(optionChildren, value) {
|
|
4285
|
-
this.resetListeners$.next();
|
|
4286
|
-
this.optionChildren = optionChildren;
|
|
4287
|
-
this._value = value;
|
|
4288
|
-
this.indexSelectedOption = null;
|
|
4289
|
-
this.handleInitialSelectedOption();
|
|
4290
|
-
this.handleSelectedOptionsEvent();
|
|
4291
|
-
}
|
|
4292
|
-
assignValue(value) {
|
|
4293
|
-
this._value = value;
|
|
4294
|
-
this.handleValueChange();
|
|
4295
|
-
}
|
|
4296
|
-
handleValueChange() {
|
|
4297
|
-
this.changeSelectedOption();
|
|
4298
|
-
this.updateSelectPlaceholder();
|
|
4299
|
-
this.changeDetectorRef.markForCheck();
|
|
4300
|
-
}
|
|
4301
|
-
selectNextOption() {
|
|
4302
|
-
if (this.indexSelectedOption + 1 >= this.optionChildren.length) {
|
|
4303
|
-
return;
|
|
4304
|
-
}
|
|
4305
|
-
if (this.indexSelectedOption === null) {
|
|
4306
|
-
this.indexSelectedOption = 0;
|
|
4307
|
-
}
|
|
4308
|
-
else {
|
|
4309
|
-
this.indexSelectedOption = this.indexSelectedOption + 1;
|
|
4310
|
-
}
|
|
4311
|
-
this.assignValue(this.optionChildren.get(this.indexSelectedOption).value);
|
|
4312
|
-
}
|
|
4313
|
-
selectPreviousOption() {
|
|
4314
|
-
if (!this.indexSelectedOption) {
|
|
4315
|
-
this.indexSelectedOption = null;
|
|
4316
|
-
this.assignValue(null);
|
|
4317
|
-
return;
|
|
4318
|
-
}
|
|
4319
|
-
this.indexSelectedOption = this.indexSelectedOption - 1;
|
|
4320
|
-
this.assignValue(this.optionChildren.get(this.indexSelectedOption).value);
|
|
4321
|
-
}
|
|
4322
|
-
searchOptionByFirstLetter(letter) {
|
|
4323
|
-
const matchedOptionsIndex = this.optionChildren
|
|
4324
|
-
.map((option, index) => this.indexOfMatchedOption(option, index, letter))
|
|
4325
|
-
.filter(this.isNotNull);
|
|
4326
|
-
if (!matchedOptionsIndex.length) { // reset the selection
|
|
4327
|
-
this.indexSelectedOption = null;
|
|
4328
|
-
this.assignValue(null);
|
|
4329
|
-
return;
|
|
4330
|
-
}
|
|
4331
|
-
// find the next option after the current selected option, or the first option
|
|
4332
|
-
const validOptionIndex = matchedOptionsIndex.find(this.highestAndClosestIndex);
|
|
4333
|
-
this.indexSelectedOption = isNaN(validOptionIndex) ? matchedOptionsIndex[0] : validOptionIndex;
|
|
4334
|
-
this.assignValue(this.optionChildren.get(this.indexSelectedOption).value);
|
|
4335
|
-
}
|
|
4336
|
-
handleInitialSelectedOption() {
|
|
4337
|
-
setTimeout(() => {
|
|
4338
|
-
if (!this.value) {
|
|
4339
|
-
this.findInitialSelectedOption();
|
|
4340
|
-
return;
|
|
4341
|
-
}
|
|
4342
|
-
this.handleValueChange();
|
|
4343
|
-
}, 0);
|
|
4344
|
-
}
|
|
4345
|
-
findInitialSelectedOption() {
|
|
4346
|
-
const selectedOption = this.getSelectedOptionComponent();
|
|
4347
|
-
if (!selectedOption) {
|
|
4348
|
-
return;
|
|
4349
|
-
}
|
|
4350
|
-
this.value = selectedOption.value;
|
|
4351
|
-
}
|
|
4352
|
-
handleSelectedOptionsEvent() {
|
|
4353
|
-
this.optionSelectedChangeListeners().subscribe((selectEvent) => {
|
|
4354
|
-
this.value = selectEvent.value;
|
|
4355
|
-
});
|
|
4356
|
-
}
|
|
4357
|
-
updateSelectPlaceholder() {
|
|
4358
|
-
if (!this.value) {
|
|
4359
|
-
this.selectedOptionContent = null;
|
|
4360
|
-
return;
|
|
4361
|
-
}
|
|
4362
|
-
const selectedOption = this.getSelectedOptionComponent();
|
|
4363
|
-
this.selectedOptionContent = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.getContentRef().nativeElement.innerHTML) || undefined;
|
|
4364
|
-
}
|
|
4365
|
-
getSelectedOptionComponent() {
|
|
4366
|
-
return this.optionChildren.find((option) => option.selected);
|
|
4367
|
-
}
|
|
4368
|
-
optionSelectedChangeListeners() {
|
|
4369
|
-
const selectedChange$ = this.optionChildren.map((option) => {
|
|
4370
|
-
return option.selectedChange.pipe(map((value) => {
|
|
4371
|
-
return {
|
|
4372
|
-
value
|
|
4373
|
-
};
|
|
4374
|
-
}));
|
|
4375
|
-
});
|
|
4376
|
-
return merge(...selectedChange$).pipe(takeUntil(this.resetListeners$));
|
|
4377
|
-
}
|
|
4378
|
-
changeSelectedOption() {
|
|
4379
|
-
this.optionChildren.forEach((optionComponent, index) => {
|
|
4380
|
-
optionComponent.selected = this.value == undefined ? false : optionComponent.value === this.value;
|
|
4381
|
-
if (optionComponent.selected) {
|
|
4382
|
-
this.indexSelectedOption = index;
|
|
4383
|
-
}
|
|
4384
|
-
});
|
|
4385
|
-
}
|
|
4386
|
-
ngOnDestroy() {
|
|
4387
|
-
this.resetListeners$.next();
|
|
4388
|
-
this.resetListeners$.complete();
|
|
4389
|
-
}
|
|
4390
|
-
}
|
|
4391
|
-
ValueChangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4392
|
-
ValueChangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService });
|
|
4393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, decorators: [{
|
|
4394
|
-
type: Injectable
|
|
4395
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
4396
|
-
|
|
4397
4511
|
class SelectSearchTriggerComponent {
|
|
4398
4512
|
constructor() {
|
|
4399
4513
|
this.searchValue = '';
|
|
@@ -4442,31 +4556,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4442
4556
|
}, template: "<ng-content></ng-content>" }]
|
|
4443
4557
|
}], ctorParameters: function () { return []; } });
|
|
4444
4558
|
|
|
4445
|
-
class SelectTestComponent {
|
|
4559
|
+
class SelectTestComponent extends SelectDirective {
|
|
4446
4560
|
constructor(valueChangeService) {
|
|
4561
|
+
super(valueChangeService);
|
|
4447
4562
|
this.valueChangeService = valueChangeService;
|
|
4448
4563
|
//! Refacto improve sroll on mobile, see with Pauline
|
|
4449
4564
|
// angular material select https://github.com/angular/components/blob/main/src/material/select/select.ts
|
|
4450
4565
|
this.role = 'combobox';
|
|
4451
|
-
this.valueChange = new EventEmitter();
|
|
4452
|
-
this.disabled = false;
|
|
4453
4566
|
this._openPanel = false;
|
|
4454
4567
|
this.openPanelChange = new EventEmitter();
|
|
4455
4568
|
this.enableSearch = false;
|
|
4456
4569
|
this.isDestroyed$ = new Subject();
|
|
4457
|
-
|
|
4458
|
-
this.
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
}
|
|
4466
|
-
this.valueChangeService.assignValue(value);
|
|
4467
|
-
}
|
|
4468
|
-
get value() {
|
|
4469
|
-
return this._value;
|
|
4570
|
+
this.isKeyBoardAction = false;
|
|
4571
|
+
this.skipIfTriggeredByKeyboardAction = () => {
|
|
4572
|
+
if (!this.isKeyBoardAction) {
|
|
4573
|
+
return true;
|
|
4574
|
+
}
|
|
4575
|
+
this.isKeyBoardAction = false;
|
|
4576
|
+
return false;
|
|
4577
|
+
};
|
|
4578
|
+
this.onSelectTouch = () => { };
|
|
4470
4579
|
}
|
|
4471
4580
|
/** Whether the component is required. */
|
|
4472
4581
|
get required() {
|
|
@@ -4495,31 +4604,21 @@ class SelectTestComponent {
|
|
|
4495
4604
|
(_a = this.customSearchTrigger) === null || _a === void 0 ? void 0 : _a.setFocus();
|
|
4496
4605
|
}
|
|
4497
4606
|
if (wasOpen) {
|
|
4498
|
-
this.
|
|
4607
|
+
this.onSelectTouch(this.value);
|
|
4499
4608
|
}
|
|
4500
4609
|
}
|
|
4501
4610
|
get openPanel() {
|
|
4502
4611
|
return this._openPanel;
|
|
4503
4612
|
}
|
|
4504
4613
|
ngOnInit() {
|
|
4505
|
-
|
|
4614
|
+
super.ngOnInit();
|
|
4615
|
+
this.closeTabOnValueChange();
|
|
4506
4616
|
}
|
|
4507
|
-
|
|
4508
|
-
this.
|
|
4509
|
-
}
|
|
4510
|
-
handleValueChange() {
|
|
4511
|
-
this.valueChangeService.valueChange$.pipe(takeUntil(this.isDestroyed$)).subscribe(value => {
|
|
4512
|
-
this._value = value;
|
|
4513
|
-
this.valueChange.emit(this.value);
|
|
4514
|
-
this.onChange(this.value);
|
|
4617
|
+
closeTabOnValueChange() {
|
|
4618
|
+
this.valueChangeService.valueChange$.pipe(takeUntil(this.isDestroyed$), filter(this.skipIfTriggeredByKeyboardAction)).subscribe(() => {
|
|
4515
4619
|
this.onClosePanel();
|
|
4516
4620
|
});
|
|
4517
4621
|
}
|
|
4518
|
-
handleOptionChildren() {
|
|
4519
|
-
this.optionChildren.changes.pipe(takeUntil(this.isDestroyed$), startWith(this.optionChildren)).subscribe(optionChildren => {
|
|
4520
|
-
this.valueChangeService.handleSelectOptionsChange(optionChildren, this.value);
|
|
4521
|
-
});
|
|
4522
|
-
}
|
|
4523
4622
|
onTogglePanel() {
|
|
4524
4623
|
this.openPanel = !this.openPanel;
|
|
4525
4624
|
this.openPanelChange.emit(this.openPanel);
|
|
@@ -4528,12 +4627,17 @@ class SelectTestComponent {
|
|
|
4528
4627
|
this.openPanel = false;
|
|
4529
4628
|
this.openPanelChange.emit(this.openPanel);
|
|
4530
4629
|
}
|
|
4531
|
-
|
|
4532
|
-
_handleKeydown(event) {
|
|
4630
|
+
onKeydown(event) {
|
|
4533
4631
|
if (this.disabled) {
|
|
4534
4632
|
return;
|
|
4535
4633
|
}
|
|
4536
|
-
|
|
4634
|
+
event.preventDefault(); // prevents the page from scrolling
|
|
4635
|
+
const actionTriggered = this.openPanel ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);
|
|
4636
|
+
if (actionTriggered) {
|
|
4637
|
+
return;
|
|
4638
|
+
}
|
|
4639
|
+
this.isKeyBoardAction = true;
|
|
4640
|
+
super.handleKeyboardAction(event);
|
|
4537
4641
|
}
|
|
4538
4642
|
/** Handles keyboard events while the select is closed. */
|
|
4539
4643
|
_handleClosedKeydown(event) {
|
|
@@ -4546,20 +4650,10 @@ class SelectTestComponent {
|
|
|
4546
4650
|
// Open the select on ALT + arrow key to match the native <select>
|
|
4547
4651
|
if ((isOpenKey && !hasModifierKey(event)) ||
|
|
4548
4652
|
(event.altKey && isArrowKey)) {
|
|
4549
|
-
event.preventDefault(); // prevents the page from scrolling down when pressing space
|
|
4550
4653
|
this.openPanel = true;
|
|
4551
|
-
return;
|
|
4552
|
-
}
|
|
4553
|
-
if (!isArrowKey) {
|
|
4554
|
-
return;
|
|
4555
|
-
}
|
|
4556
|
-
event.preventDefault(); // prevents the page from scrolling
|
|
4557
|
-
// select the next option on arrow key down
|
|
4558
|
-
if (keyCode === DOWN_ARROW || keyCode === RIGHT_ARROW) {
|
|
4559
|
-
this.valueChangeService.selectNextOption();
|
|
4560
|
-
return;
|
|
4654
|
+
return true;
|
|
4561
4655
|
}
|
|
4562
|
-
|
|
4656
|
+
return false;
|
|
4563
4657
|
}
|
|
4564
4658
|
/** Handles keyboard events when the selected is open. */
|
|
4565
4659
|
_handleOpenKeydown(event) {
|
|
@@ -4569,39 +4663,15 @@ class SelectTestComponent {
|
|
|
4569
4663
|
keyCode === LEFT_ARROW ||
|
|
4570
4664
|
keyCode === RIGHT_ARROW;
|
|
4571
4665
|
const isEscapeKey = keyCode === ESCAPE || keyCode === ENTER || keyCode === SPACE;
|
|
4572
|
-
const isTyping = (keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE);
|
|
4573
4666
|
if ((isArrowKey && event.altKey) || isEscapeKey) {
|
|
4574
4667
|
// Close the select on ALT + arrow key to match the native <select>
|
|
4575
|
-
event.preventDefault();
|
|
4576
4668
|
this.openPanel = false;
|
|
4577
|
-
return;
|
|
4578
|
-
}
|
|
4579
|
-
else if (isArrowKey) {
|
|
4580
|
-
event.preventDefault(); // prevents the page from scrolling
|
|
4581
|
-
// select the next option on arrow key down
|
|
4582
|
-
if (keyCode === DOWN_ARROW || keyCode === RIGHT_ARROW) {
|
|
4583
|
-
this.valueChangeService.selectNextOption();
|
|
4584
|
-
return;
|
|
4585
|
-
}
|
|
4586
|
-
this.valueChangeService.selectPreviousOption();
|
|
4587
|
-
return;
|
|
4588
|
-
}
|
|
4589
|
-
if (isTyping && !this.customSearchTrigger) {
|
|
4590
|
-
this.valueChangeService.searchOptionByFirstLetter(event.key);
|
|
4591
|
-
return;
|
|
4669
|
+
return true;
|
|
4592
4670
|
}
|
|
4593
|
-
|
|
4594
|
-
writeValue(value) {
|
|
4595
|
-
if (typeof value === 'undefined') {
|
|
4596
|
-
return;
|
|
4597
|
-
}
|
|
4598
|
-
this.value = value;
|
|
4599
|
-
}
|
|
4600
|
-
registerOnChange(fn) {
|
|
4601
|
-
this.onChange = fn;
|
|
4671
|
+
return false;
|
|
4602
4672
|
}
|
|
4603
4673
|
registerOnTouched(fn) {
|
|
4604
|
-
this.
|
|
4674
|
+
this.onSelectTouch = fn;
|
|
4605
4675
|
}
|
|
4606
4676
|
ngOnDestroy() {
|
|
4607
4677
|
this.isDestroyed$.next();
|
|
@@ -4609,10 +4679,10 @@ class SelectTestComponent {
|
|
|
4609
4679
|
}
|
|
4610
4680
|
}
|
|
4611
4681
|
SelectTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectTestComponent, deps: [{ token: ValueChangeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4612
|
-
SelectTestComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectTestComponent, selector: "wac-select-test", inputs: {
|
|
4682
|
+
SelectTestComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectTestComponent, selector: "wac-select-test", inputs: { required: "required", keepPanelOpen: "keepPanelOpen", openPanel: "openPanel", enableSearch: "enableSearch" }, outputs: { openPanelChange: "openPanelChange" }, host: { properties: { "attr.role": "this.role" } }, providers: [
|
|
4613
4683
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectTestComponent, multi: true },
|
|
4614
4684
|
ValueChangeService
|
|
4615
|
-
], queries: [{ propertyName: "customSearchTrigger", first: true, predicate: SelectSearchTriggerComponent, descendants: true }, { propertyName: "label", first: true, predicate: LabelComponent, descendants: true },
|
|
4685
|
+
], queries: [{ propertyName: "customSearchTrigger", first: true, predicate: SelectSearchTriggerComponent, descendants: true }, { propertyName: "label", first: true, predicate: LabelComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n\n<div\n class=\"wac-select-test\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select-test__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div class=\"wac-select-test__header\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && onTogglePanel()\" tabindex=\"0\">\n\n <ng-container [ngTemplateOutlet]=\"openPanel ? openPanelTrigger : closePanelTrigger\" >\n\n <ng-template #closePanelTrigger>\n <ng-container [ngTemplateOutlet]=\"defaultTrigger\"></ng-container>\n </ng-template>\n\n <ng-template #openPanelTrigger>\n <ng-content *ngIf=\"!!customSearchTrigger; else defaultTrigger\" select=\"wac-select-search-trigger\" ></ng-content>\n </ng-template>\n\n <ng-template #defaultTrigger>\n <ng-content *ngIf=\"!selectedOptionContent\" select=\"wac-placeholder,[role=placeholder]\"></ng-content>\n <div\n class=\"wac-select-test__header__selection wac-option__placeholder\"\n *ngIf=\"!!selectedOptionContent\"\n [innerHtml]=\"selectedOptionContent\">\n </div>\n </ng-template>\n\n </ng-container>\n\n <span class=\"wac-select-test__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select-test__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openPanel, open: openPanel }\">\n\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content\n select=\"wac-option-call-to-action, wac-option, option, .option, [selectOption]\">\n </ng-content>\n </perfect-scrollbar>\n\n <div *ngIf=\"!optionChildren?.length\" class=\"wac-select-test__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "component", type: i4$1.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4616
4686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectTestComponent, decorators: [{
|
|
4617
4687
|
type: Component,
|
|
4618
4688
|
args: [{ selector: 'wac-select-test', providers: [
|
|
@@ -4622,23 +4692,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4622
4692
|
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { role: [{
|
|
4623
4693
|
type: HostBinding,
|
|
4624
4694
|
args: ['attr.role']
|
|
4625
|
-
}], optionChildren: [{
|
|
4626
|
-
type: ContentChildren,
|
|
4627
|
-
args: [OPTION_SELECTION_HANDLER, { descendants: true }]
|
|
4628
4695
|
}], customSearchTrigger: [{
|
|
4629
4696
|
type: ContentChild,
|
|
4630
4697
|
args: [SelectSearchTriggerComponent]
|
|
4631
4698
|
}], label: [{
|
|
4632
4699
|
type: ContentChild,
|
|
4633
4700
|
args: [LabelComponent]
|
|
4634
|
-
}], value: [{
|
|
4635
|
-
type: Input
|
|
4636
|
-
}], valueChange: [{
|
|
4637
|
-
type: Output
|
|
4638
4701
|
}], required: [{
|
|
4639
4702
|
type: Input
|
|
4640
|
-
}], disabled: [{
|
|
4641
|
-
type: Input
|
|
4642
4703
|
}], keepPanelOpen: [{
|
|
4643
4704
|
type: Input
|
|
4644
4705
|
}], openPanel: [{
|
|
@@ -4647,9 +4708,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4647
4708
|
type: Output
|
|
4648
4709
|
}], enableSearch: [{
|
|
4649
4710
|
type: Input
|
|
4650
|
-
}], _handleKeydown: [{
|
|
4651
|
-
type: HostListener,
|
|
4652
|
-
args: ['keydown', ['$event']]
|
|
4653
4711
|
}] } });
|
|
4654
4712
|
|
|
4655
4713
|
class OptionComponent {
|
|
@@ -4673,7 +4731,7 @@ class OptionComponent {
|
|
|
4673
4731
|
return;
|
|
4674
4732
|
}
|
|
4675
4733
|
this.selected = !this.selected;
|
|
4676
|
-
this.selectedChange.emit(this.
|
|
4734
|
+
this.selectedChange.emit(this.selected);
|
|
4677
4735
|
this.changeDetectorRef.markForCheck();
|
|
4678
4736
|
}
|
|
4679
4737
|
getValue() {
|
|
@@ -4688,7 +4746,7 @@ class OptionComponent {
|
|
|
4688
4746
|
}
|
|
4689
4747
|
setSelected(selected) {
|
|
4690
4748
|
this.selected = selected;
|
|
4691
|
-
this.selectedChange.emit(this.
|
|
4749
|
+
this.selectedChange.emit(this.selected);
|
|
4692
4750
|
}
|
|
4693
4751
|
getContentRef() {
|
|
4694
4752
|
return this.contentRef;
|
|
@@ -5196,7 +5254,7 @@ class AccordionComponent {
|
|
|
5196
5254
|
}
|
|
5197
5255
|
ngAfterViewInit() {
|
|
5198
5256
|
this.expansionItems.changes
|
|
5199
|
-
.pipe(takeUntil$1(this.isDestroyed$), startWith
|
|
5257
|
+
.pipe(takeUntil$1(this.isDestroyed$), startWith(this.expansionItems))
|
|
5200
5258
|
.subscribe(() => {
|
|
5201
5259
|
this.resetListeners$.next();
|
|
5202
5260
|
this.panelExpansionChanges().subscribe(expandedItem => {
|
|
@@ -5909,5 +5967,5 @@ class TableFiltersGroup extends NwbFilterGroup {
|
|
|
5909
5967
|
* Generated bundle index. Do not edit.
|
|
5910
5968
|
*/
|
|
5911
5969
|
|
|
5912
|
-
export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CardPriceComponent, CheckBoxRow, CheckboxComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpansionExport, ExpansionModule, ExpansionPanelBase, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, GooglePreviewComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectTestComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, UploadComponent, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective };
|
|
5970
|
+
export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CardPriceComponent, CheckBoxRow, CheckboxComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpansionExport, ExpansionModule, ExpansionPanelBase, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, GooglePreviewComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectDirective, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectTestComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, UploadComponent, ValueChangeService, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective };
|
|
5913
5971
|
//# sourceMappingURL=wizishop-angular-components.mjs.map
|