@wizishop/angular-components 14.4.61 → 14.4.63
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.component.mjs +5 -3
- package/esm2020/lib/components/selects/option/select-option.directive.mjs +6 -1
- package/esm2020/lib/components/selects/option-call-to-action/option-call-to-action.component.mjs +1 -1
- package/esm2020/lib/components/selects/select/select.component.mjs +3 -3
- package/esm2020/lib/components/selects/select/select.directive.mjs +12 -2
- package/esm2020/lib/components/selects/select/value-change.service.mjs +52 -11
- package/esm2020/lib/services/history.service.mjs +1 -4
- package/esm2020/lib/utils/array.mjs +2 -0
- package/fesm2015/wizishop-angular-components.mjs +74 -18
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +73 -18
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/selects/option/option-selection-handler.interface.d.ts +1 -0
- package/lib/components/selects/option/option.component.d.ts +1 -0
- package/lib/components/selects/option/select-option.directive.d.ts +2 -0
- package/lib/components/selects/select/select.directive.d.ts +8 -5
- package/lib/components/selects/select/value-change.service.d.ts +15 -5
- package/lib/utils/array.d.ts +1 -0
- package/package.json +1 -1
- package/wizishop-angular-components-14.4.63.tgz +0 -0
- package/wizishop-angular-components-14.4.61.tgz +0 -0
|
@@ -356,6 +356,7 @@ class SelectOptionDirective {
|
|
|
356
356
|
this.selected = false;
|
|
357
357
|
this.onClickEventPreventDefault = true;
|
|
358
358
|
this.selectedChange = new EventEmitter();
|
|
359
|
+
this.multiple = false;
|
|
359
360
|
}
|
|
360
361
|
onClick(event) {
|
|
361
362
|
this.onSelectOption();
|
|
@@ -401,6 +402,10 @@ class SelectOptionDirective {
|
|
|
401
402
|
this.disabledByParent = isDisabled;
|
|
402
403
|
this.changeDetectorRef.markForCheck();
|
|
403
404
|
}
|
|
405
|
+
setMultiple(multiple) {
|
|
406
|
+
this.multiple = multiple;
|
|
407
|
+
this.changeDetectorRef.markForCheck();
|
|
408
|
+
}
|
|
404
409
|
}
|
|
405
410
|
SelectOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectOptionDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
406
411
|
SelectOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectOptionDirective, selector: "[wacOption]", inputs: { disabled: "disabled", value: "value", selected: "selected", onClickEventPreventDefault: "onClickEventPreventDefault" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.wac-option-selected": "this.isOptionSelected", "class.wac-option-disabled": "this.isOptionDisabled", "style.cursor": "this.cursor" } }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: SelectOptionDirective }], exportAs: ["wacOption"], ngImport: i0 });
|
|
@@ -435,11 +440,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
435
440
|
type: Output
|
|
436
441
|
}] } });
|
|
437
442
|
|
|
443
|
+
const compareArrays = (a, b) => a.length === b.length && a.every((element, index) => element === b[index]);
|
|
444
|
+
|
|
438
445
|
class ValueChangeService {
|
|
439
446
|
constructor(changeDetectorRef) {
|
|
440
447
|
this.changeDetectorRef = changeDetectorRef;
|
|
441
448
|
this.valueChange$ = new Subject();
|
|
442
|
-
this.
|
|
449
|
+
this.multiple = false;
|
|
450
|
+
this.indexSelectedOption = null; // todo update to array
|
|
443
451
|
this.resetListeners$ = new Subject();
|
|
444
452
|
this.indexOfMatchedOption = (option, index, letter) => {
|
|
445
453
|
const textOption = option.getContentRef().nativeElement.textContent.trim().toLowerCase();
|
|
@@ -471,6 +479,7 @@ class ValueChangeService {
|
|
|
471
479
|
this.optionChildren = optionChildren;
|
|
472
480
|
this._value = value;
|
|
473
481
|
this.indexSelectedOption = null;
|
|
482
|
+
this.handleMultipleSelection();
|
|
474
483
|
this.handleInitialSelectedOption();
|
|
475
484
|
this.handleSelectedOptionsEvent();
|
|
476
485
|
}
|
|
@@ -488,6 +497,7 @@ class ValueChangeService {
|
|
|
488
497
|
this.optionChildren?.forEach((option) => option.setDisabledState(isDisabled));
|
|
489
498
|
}
|
|
490
499
|
selectNextOption() {
|
|
500
|
+
// TODO : Handle multiple selection
|
|
491
501
|
if (this.indexSelectedOption + 1 >= this.optionChildren.length) {
|
|
492
502
|
return;
|
|
493
503
|
}
|
|
@@ -500,6 +510,7 @@ class ValueChangeService {
|
|
|
500
510
|
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
501
511
|
}
|
|
502
512
|
selectPreviousOption() {
|
|
513
|
+
// TODO : Handle multiple selection
|
|
503
514
|
if (!this.indexSelectedOption) {
|
|
504
515
|
this.indexSelectedOption = null;
|
|
505
516
|
this.assignValue(null);
|
|
@@ -509,6 +520,7 @@ class ValueChangeService {
|
|
|
509
520
|
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
510
521
|
}
|
|
511
522
|
searchOptionByFirstLetter(letter) {
|
|
523
|
+
// TODO : Handle multiple selectiong
|
|
512
524
|
const matchedOptionsIndex = this.optionChildren
|
|
513
525
|
.map((option, index) => this.indexOfMatchedOption(option, index, letter))
|
|
514
526
|
.filter(this.isNotNull);
|
|
@@ -522,11 +534,20 @@ class ValueChangeService {
|
|
|
522
534
|
this.indexSelectedOption = isNaN(validOptionIndex) ? matchedOptionsIndex[0] : validOptionIndex;
|
|
523
535
|
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
524
536
|
}
|
|
537
|
+
setMultiple(value) {
|
|
538
|
+
this.multiple = value;
|
|
539
|
+
}
|
|
540
|
+
handleMultipleSelection() {
|
|
541
|
+
if (this.multiple) {
|
|
542
|
+
setTimeout(() => {
|
|
543
|
+
this.optionChildren.forEach((option) => option.setMultiple(true));
|
|
544
|
+
}, 0);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
525
547
|
handleInitialSelectedOption() {
|
|
526
548
|
setTimeout(() => {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
this.value = selectedOption.value;
|
|
549
|
+
if (this.mustUpdateValueWithInitialSelectedOptionValues()) { // initial option value selected win against initial value or ngModel value
|
|
550
|
+
this.value = this.multiple ? this.getSelectedOptionsValues() : this.getSelectedOptionsValues()[0];
|
|
530
551
|
}
|
|
531
552
|
if (this.disabled) {
|
|
532
553
|
this.optionChildren.forEach((option) => option.setDisabledState(true));
|
|
@@ -534,9 +555,18 @@ class ValueChangeService {
|
|
|
534
555
|
this.handleValueChange();
|
|
535
556
|
}, 0);
|
|
536
557
|
}
|
|
558
|
+
mustUpdateValueWithInitialSelectedOptionValues() {
|
|
559
|
+
if (!this.getSelectedOptionComponents().length) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
if (this.multiple && Array.isArray(this.value)) {
|
|
563
|
+
return !compareArrays(this.value, this.getSelectedOptionsValues());
|
|
564
|
+
}
|
|
565
|
+
return this.value !== this.getSelectedOptionsValues()[0];
|
|
566
|
+
}
|
|
537
567
|
handleSelectedOptionsEvent() {
|
|
538
568
|
this.optionSelectedChangeListeners().subscribe((value) => {
|
|
539
|
-
this.value = value;
|
|
569
|
+
this.value = this.multiple ? this.getSelectedOptionsValues() : value;
|
|
540
570
|
});
|
|
541
571
|
}
|
|
542
572
|
updateSelectPlaceholder() {
|
|
@@ -544,11 +574,19 @@ class ValueChangeService {
|
|
|
544
574
|
this.selectedOptionContent = null;
|
|
545
575
|
return;
|
|
546
576
|
}
|
|
547
|
-
|
|
548
|
-
|
|
577
|
+
this.selectedOptionContent = this.getSelectedOptionsContent();
|
|
578
|
+
}
|
|
579
|
+
getSelectedOptionsContent() {
|
|
580
|
+
if (this.multiple) {
|
|
581
|
+
return this.getSelectedOptionComponents().reduce((acc, option) => (acc ? acc + ', ' : '') + option.getContentRef().nativeElement.textContent.trim(), ''); // todo improve for multiple
|
|
582
|
+
}
|
|
583
|
+
return this.getSelectedOptionComponents()[0]?.getContentRef().nativeElement.innerHTML;
|
|
549
584
|
}
|
|
550
|
-
|
|
551
|
-
return this.optionChildren.
|
|
585
|
+
getSelectedOptionComponents() {
|
|
586
|
+
return this.optionChildren.filter((option) => option.selected);
|
|
587
|
+
}
|
|
588
|
+
getSelectedOptionsValues() {
|
|
589
|
+
return this.getSelectedOptionComponents().map((option) => option.value);
|
|
552
590
|
}
|
|
553
591
|
optionSelectedChangeListeners() {
|
|
554
592
|
const selectedChange$ = this.optionChildren.map((option) => {
|
|
@@ -558,12 +596,21 @@ class ValueChangeService {
|
|
|
558
596
|
}
|
|
559
597
|
changeSelectedOption() {
|
|
560
598
|
this.optionChildren.forEach((optionComponent, index) => {
|
|
561
|
-
optionComponent.setSelected(optionComponent.value
|
|
599
|
+
optionComponent.setSelected(this.isSelectedValue(optionComponent.value));
|
|
562
600
|
if (optionComponent.selected) {
|
|
563
601
|
this.indexSelectedOption = index;
|
|
564
602
|
}
|
|
565
603
|
});
|
|
566
604
|
}
|
|
605
|
+
/**
|
|
606
|
+
* May not work with objects values
|
|
607
|
+
*/
|
|
608
|
+
isSelectedValue(value2) {
|
|
609
|
+
if (Array.isArray(this.value)) {
|
|
610
|
+
return this.value.includes(value2);
|
|
611
|
+
}
|
|
612
|
+
return this.value === value2;
|
|
613
|
+
}
|
|
567
614
|
ngOnDestroy() {
|
|
568
615
|
this.resetListeners$.next();
|
|
569
616
|
this.resetListeners$.complete();
|
|
@@ -579,6 +626,7 @@ class SelectDirective {
|
|
|
579
626
|
constructor(valueChangeService) {
|
|
580
627
|
this.valueChangeService = valueChangeService;
|
|
581
628
|
this.valueChange = new EventEmitter();
|
|
629
|
+
this._multiple = false;
|
|
582
630
|
this._disabled = false;
|
|
583
631
|
this.tabIndex = 0;
|
|
584
632
|
this.isDestroyed$ = new Subject();
|
|
@@ -612,6 +660,13 @@ class SelectDirective {
|
|
|
612
660
|
get value() {
|
|
613
661
|
return this._value;
|
|
614
662
|
}
|
|
663
|
+
get multiple() {
|
|
664
|
+
return this._multiple;
|
|
665
|
+
}
|
|
666
|
+
set multiple(value) {
|
|
667
|
+
this._multiple = value;
|
|
668
|
+
this.valueChangeService.setMultiple(value);
|
|
669
|
+
}
|
|
615
670
|
set disabled(disabled) {
|
|
616
671
|
this._disabled = disabled;
|
|
617
672
|
this.valueChangeService.setDisabledState(disabled);
|
|
@@ -685,7 +740,7 @@ class SelectDirective {
|
|
|
685
740
|
}
|
|
686
741
|
}
|
|
687
742
|
SelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectDirective, deps: [{ token: ValueChangeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
688
|
-
SelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectDirective, selector: "[wacSelect]", inputs: { value: "value", disabled: "disabled", tabIndex: "tabIndex" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "this.tabindex", "class.wac-select-disabled": "this.isSelectDisabled" } }, providers: [
|
|
743
|
+
SelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectDirective, selector: "[wacSelect]", inputs: { value: "value", multiple: "multiple", disabled: "disabled", tabIndex: "tabIndex" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "this.tabindex", "class.wac-select-disabled": "this.isSelectDisabled" } }, providers: [
|
|
689
744
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectDirective, multi: true },
|
|
690
745
|
ValueChangeService
|
|
691
746
|
], queries: [{ propertyName: "optionChildren", predicate: OPTION_SELECTION_HANDLER, descendants: true }], exportAs: ["wacSelect"], ngImport: i0 });
|
|
@@ -715,6 +770,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
715
770
|
type: Input
|
|
716
771
|
}], valueChange: [{
|
|
717
772
|
type: Output
|
|
773
|
+
}], multiple: [{
|
|
774
|
+
type: Input
|
|
718
775
|
}], disabled: [{
|
|
719
776
|
type: Input
|
|
720
777
|
}], tabIndex: [{
|
|
@@ -2579,16 +2636,13 @@ class HistoryService {
|
|
|
2579
2636
|
return;
|
|
2580
2637
|
}
|
|
2581
2638
|
this.history.push(event.url.split('?')[0]);
|
|
2582
|
-
console.log('history', this.history);
|
|
2583
2639
|
}
|
|
2584
2640
|
});
|
|
2585
2641
|
}
|
|
2586
2642
|
back(link) {
|
|
2587
|
-
console.log('back', this.history);
|
|
2588
2643
|
this.history.pop();
|
|
2589
2644
|
if (this.history.length > 0) {
|
|
2590
2645
|
const lastlink = this.history[this.history.length - 1];
|
|
2591
|
-
console.log('lastlink', lastlink);
|
|
2592
2646
|
this.router.navigate(lastlink.split('/'));
|
|
2593
2647
|
}
|
|
2594
2648
|
else {
|
|
@@ -4699,16 +4753,17 @@ class OptionComponent extends SelectOptionDirective {
|
|
|
4699
4753
|
super(contentRef, changeDetectorRef);
|
|
4700
4754
|
this.contentRef = contentRef;
|
|
4701
4755
|
this.changeDetectorRef = changeDetectorRef;
|
|
4756
|
+
this.checkBoxId = `wac-option-${crypto.randomUUID()}`;
|
|
4702
4757
|
}
|
|
4703
4758
|
getContentRef() {
|
|
4704
4759
|
return this.contentOption;
|
|
4705
4760
|
}
|
|
4706
4761
|
}
|
|
4707
4762
|
OptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4708
|
-
OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: OptionComponent, selector: "wac-option", providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], viewQueries: [{ propertyName: "contentOption", first: true, predicate: ["contentWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n
|
|
4763
|
+
OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: OptionComponent, selector: "wac-option", providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], viewQueries: [{ propertyName: "contentOption", first: true, predicate: ["contentWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n >\n <div [ngClass]=\"{ 'selected': !disabled && selected, 'disabled': disabled }\" #contentWrapper>\n <wac-checkbox *ngIf=\"multiple\" [id]=\"checkBoxId\" [value]=\"selected\"></wac-checkbox>\n <ng-content></ng-content>\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: "component", type: CheckboxComponent, selector: "wac-checkbox", inputs: ["label", "value", "type", "alone", "checked", "hasInput", "inputPlaceholder", "id", "name", "whiteSpace", "disabled"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4709
4764
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, decorators: [{
|
|
4710
4765
|
type: Component,
|
|
4711
|
-
args: [{ selector: 'wac-option', encapsulation: ViewEncapsulation.None, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n
|
|
4766
|
+
args: [{ selector: 'wac-option', encapsulation: ViewEncapsulation.None, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n >\n <div [ngClass]=\"{ 'selected': !disabled && selected, 'disabled': disabled }\" #contentWrapper>\n <wac-checkbox *ngIf=\"multiple\" [id]=\"checkBoxId\" [value]=\"selected\"></wac-checkbox>\n <ng-content></ng-content>\n </div>\n</div>" }]
|
|
4712
4767
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentOption: [{
|
|
4713
4768
|
type: ViewChild,
|
|
4714
4769
|
args: ['contentWrapper']
|
|
@@ -4898,13 +4953,13 @@ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
4898
4953
|
SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectComponent, selector: "wac-select", inputs: { required: "required", keepPanelOpen: "keepPanelOpen", openPanel: "openPanel", enableSearch: "enableSearch" }, outputs: { openPanelChange: "openPanelChange" }, host: { properties: { "attr.role": "this.role" } }, providers: [
|
|
4899
4954
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
4900
4955
|
ValueChangeService
|
|
4901
|
-
], queries: [{ propertyName: "customSearchTrigger", first: true, predicate: SelectSearchTriggerComponent, descendants: true }, { propertyName: "label", first: true, predicate: LabelComponent, descendants: true }], viewQueries: [{ propertyName: "selectHeader", first: true, predicate: ["selectHeader"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p *ngIf=\"!!label\" class=\"wac-select__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n
|
|
4956
|
+
], queries: [{ propertyName: "customSearchTrigger", first: true, predicate: SelectSearchTriggerComponent, descendants: true }, { propertyName: "label", first: true, predicate: LabelComponent, descendants: true }], viewQueries: [{ propertyName: "selectHeader", first: true, predicate: ["selectHeader"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p *ngIf=\"!!label\" class=\"wac-select__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n<div\n class=\"wac-select\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div #selectHeader class=\"wac-select__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__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__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select__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__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$2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
4902
4957
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4903
4958
|
type: Component,
|
|
4904
4959
|
args: [{ selector: 'wac-select', providers: [
|
|
4905
4960
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
4906
4961
|
ValueChangeService
|
|
4907
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.
|
|
4962
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: "<p *ngIf=\"!!label\" class=\"wac-select__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n<div\n class=\"wac-select\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div #selectHeader class=\"wac-select__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__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__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select__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__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>" }]
|
|
4908
4963
|
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { role: [{
|
|
4909
4964
|
type: HostBinding,
|
|
4910
4965
|
args: ['attr.role']
|