@wizishop/angular-components 14.4.62 → 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/utils/array.mjs +2 -0
- package/fesm2015/wizishop-angular-components.mjs +74 -15
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +73 -15
- 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.62.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
|
}
|
|
@@ -489,6 +498,7 @@ class ValueChangeService {
|
|
|
489
498
|
(_a = this.optionChildren) === null || _a === void 0 ? void 0 : _a.forEach((option) => option.setDisabledState(isDisabled));
|
|
490
499
|
}
|
|
491
500
|
selectNextOption() {
|
|
501
|
+
// TODO : Handle multiple selection
|
|
492
502
|
if (this.indexSelectedOption + 1 >= this.optionChildren.length) {
|
|
493
503
|
return;
|
|
494
504
|
}
|
|
@@ -501,6 +511,7 @@ class ValueChangeService {
|
|
|
501
511
|
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
502
512
|
}
|
|
503
513
|
selectPreviousOption() {
|
|
514
|
+
// TODO : Handle multiple selection
|
|
504
515
|
if (!this.indexSelectedOption) {
|
|
505
516
|
this.indexSelectedOption = null;
|
|
506
517
|
this.assignValue(null);
|
|
@@ -510,6 +521,7 @@ class ValueChangeService {
|
|
|
510
521
|
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
511
522
|
}
|
|
512
523
|
searchOptionByFirstLetter(letter) {
|
|
524
|
+
// TODO : Handle multiple selectiong
|
|
513
525
|
const matchedOptionsIndex = this.optionChildren
|
|
514
526
|
.map((option, index) => this.indexOfMatchedOption(option, index, letter))
|
|
515
527
|
.filter(this.isNotNull);
|
|
@@ -523,11 +535,20 @@ class ValueChangeService {
|
|
|
523
535
|
this.indexSelectedOption = isNaN(validOptionIndex) ? matchedOptionsIndex[0] : validOptionIndex;
|
|
524
536
|
this.value = this.optionChildren.get(this.indexSelectedOption).value;
|
|
525
537
|
}
|
|
538
|
+
setMultiple(value) {
|
|
539
|
+
this.multiple = value;
|
|
540
|
+
}
|
|
541
|
+
handleMultipleSelection() {
|
|
542
|
+
if (this.multiple) {
|
|
543
|
+
setTimeout(() => {
|
|
544
|
+
this.optionChildren.forEach((option) => option.setMultiple(true));
|
|
545
|
+
}, 0);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
526
548
|
handleInitialSelectedOption() {
|
|
527
549
|
setTimeout(() => {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
this.value = selectedOption.value;
|
|
550
|
+
if (this.mustUpdateValueWithInitialSelectedOptionValues()) { // initial option value selected win against initial value or ngModel value
|
|
551
|
+
this.value = this.multiple ? this.getSelectedOptionsValues() : this.getSelectedOptionsValues()[0];
|
|
531
552
|
}
|
|
532
553
|
if (this.disabled) {
|
|
533
554
|
this.optionChildren.forEach((option) => option.setDisabledState(true));
|
|
@@ -535,9 +556,18 @@ class ValueChangeService {
|
|
|
535
556
|
this.handleValueChange();
|
|
536
557
|
}, 0);
|
|
537
558
|
}
|
|
559
|
+
mustUpdateValueWithInitialSelectedOptionValues() {
|
|
560
|
+
if (!this.getSelectedOptionComponents().length) {
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
if (this.multiple && Array.isArray(this.value)) {
|
|
564
|
+
return !compareArrays(this.value, this.getSelectedOptionsValues());
|
|
565
|
+
}
|
|
566
|
+
return this.value !== this.getSelectedOptionsValues()[0];
|
|
567
|
+
}
|
|
538
568
|
handleSelectedOptionsEvent() {
|
|
539
569
|
this.optionSelectedChangeListeners().subscribe((value) => {
|
|
540
|
-
this.value = value;
|
|
570
|
+
this.value = this.multiple ? this.getSelectedOptionsValues() : value;
|
|
541
571
|
});
|
|
542
572
|
}
|
|
543
573
|
updateSelectPlaceholder() {
|
|
@@ -545,11 +575,20 @@ class ValueChangeService {
|
|
|
545
575
|
this.selectedOptionContent = null;
|
|
546
576
|
return;
|
|
547
577
|
}
|
|
548
|
-
|
|
549
|
-
|
|
578
|
+
this.selectedOptionContent = this.getSelectedOptionsContent();
|
|
579
|
+
}
|
|
580
|
+
getSelectedOptionsContent() {
|
|
581
|
+
var _a;
|
|
582
|
+
if (this.multiple) {
|
|
583
|
+
return this.getSelectedOptionComponents().reduce((acc, option) => (acc ? acc + ', ' : '') + option.getContentRef().nativeElement.textContent.trim(), ''); // todo improve for multiple
|
|
584
|
+
}
|
|
585
|
+
return (_a = this.getSelectedOptionComponents()[0]) === null || _a === void 0 ? void 0 : _a.getContentRef().nativeElement.innerHTML;
|
|
586
|
+
}
|
|
587
|
+
getSelectedOptionComponents() {
|
|
588
|
+
return this.optionChildren.filter((option) => option.selected);
|
|
550
589
|
}
|
|
551
|
-
|
|
552
|
-
return this.
|
|
590
|
+
getSelectedOptionsValues() {
|
|
591
|
+
return this.getSelectedOptionComponents().map((option) => option.value);
|
|
553
592
|
}
|
|
554
593
|
optionSelectedChangeListeners() {
|
|
555
594
|
const selectedChange$ = this.optionChildren.map((option) => {
|
|
@@ -559,12 +598,21 @@ class ValueChangeService {
|
|
|
559
598
|
}
|
|
560
599
|
changeSelectedOption() {
|
|
561
600
|
this.optionChildren.forEach((optionComponent, index) => {
|
|
562
|
-
optionComponent.setSelected(optionComponent.value
|
|
601
|
+
optionComponent.setSelected(this.isSelectedValue(optionComponent.value));
|
|
563
602
|
if (optionComponent.selected) {
|
|
564
603
|
this.indexSelectedOption = index;
|
|
565
604
|
}
|
|
566
605
|
});
|
|
567
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* May not work with objects values
|
|
609
|
+
*/
|
|
610
|
+
isSelectedValue(value2) {
|
|
611
|
+
if (Array.isArray(this.value)) {
|
|
612
|
+
return this.value.includes(value2);
|
|
613
|
+
}
|
|
614
|
+
return this.value === value2;
|
|
615
|
+
}
|
|
568
616
|
ngOnDestroy() {
|
|
569
617
|
this.resetListeners$.next();
|
|
570
618
|
this.resetListeners$.complete();
|
|
@@ -580,6 +628,7 @@ class SelectDirective {
|
|
|
580
628
|
constructor(valueChangeService) {
|
|
581
629
|
this.valueChangeService = valueChangeService;
|
|
582
630
|
this.valueChange = new EventEmitter();
|
|
631
|
+
this._multiple = false;
|
|
583
632
|
this._disabled = false;
|
|
584
633
|
this.tabIndex = 0;
|
|
585
634
|
this.isDestroyed$ = new Subject();
|
|
@@ -613,6 +662,13 @@ class SelectDirective {
|
|
|
613
662
|
get value() {
|
|
614
663
|
return this._value;
|
|
615
664
|
}
|
|
665
|
+
get multiple() {
|
|
666
|
+
return this._multiple;
|
|
667
|
+
}
|
|
668
|
+
set multiple(value) {
|
|
669
|
+
this._multiple = value;
|
|
670
|
+
this.valueChangeService.setMultiple(value);
|
|
671
|
+
}
|
|
616
672
|
set disabled(disabled) {
|
|
617
673
|
this._disabled = disabled;
|
|
618
674
|
this.valueChangeService.setDisabledState(disabled);
|
|
@@ -686,7 +742,7 @@ class SelectDirective {
|
|
|
686
742
|
}
|
|
687
743
|
}
|
|
688
744
|
SelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectDirective, deps: [{ token: ValueChangeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
689
|
-
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: [
|
|
745
|
+
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: [
|
|
690
746
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectDirective, multi: true },
|
|
691
747
|
ValueChangeService
|
|
692
748
|
], queries: [{ propertyName: "optionChildren", predicate: OPTION_SELECTION_HANDLER, descendants: true }], exportAs: ["wacSelect"], ngImport: i0 });
|
|
@@ -716,6 +772,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
716
772
|
type: Input
|
|
717
773
|
}], valueChange: [{
|
|
718
774
|
type: Output
|
|
775
|
+
}], multiple: [{
|
|
776
|
+
type: Input
|
|
719
777
|
}], disabled: [{
|
|
720
778
|
type: Input
|
|
721
779
|
}], tabIndex: [{
|
|
@@ -4711,16 +4769,17 @@ class OptionComponent extends SelectOptionDirective {
|
|
|
4711
4769
|
super(contentRef, changeDetectorRef);
|
|
4712
4770
|
this.contentRef = contentRef;
|
|
4713
4771
|
this.changeDetectorRef = changeDetectorRef;
|
|
4772
|
+
this.checkBoxId = `wac-option-${crypto.randomUUID()}`;
|
|
4714
4773
|
}
|
|
4715
4774
|
getContentRef() {
|
|
4716
4775
|
return this.contentOption;
|
|
4717
4776
|
}
|
|
4718
4777
|
}
|
|
4719
4778
|
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 });
|
|
4720
|
-
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
|
|
4779
|
+
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 });
|
|
4721
4780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, decorators: [{
|
|
4722
4781
|
type: Component,
|
|
4723
|
-
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
|
|
4782
|
+
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>" }]
|
|
4724
4783
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentOption: [{
|
|
4725
4784
|
type: ViewChild,
|
|
4726
4785
|
args: ['contentWrapper']
|
|
@@ -4912,13 +4971,13 @@ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
4912
4971
|
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: [
|
|
4913
4972
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
4914
4973
|
ValueChangeService
|
|
4915
|
-
], 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
|
|
4974
|
+
], 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 });
|
|
4916
4975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4917
4976
|
type: Component,
|
|
4918
4977
|
args: [{ selector: 'wac-select', providers: [
|
|
4919
4978
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
4920
4979
|
ValueChangeService
|
|
4921
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.
|
|
4980
|
+
], 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>" }]
|
|
4922
4981
|
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { role: [{
|
|
4923
4982
|
type: HostBinding,
|
|
4924
4983
|
args: ['attr.role']
|