@wizishop/angular-components 14.3.15 → 14.3.16
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/select-option.directive.mjs +14 -4
- package/esm2020/lib/components/selects/select-test/select.component.mjs +37 -8
- package/esm2020/lib/components/selects/select-test/select.directive.mjs +18 -6
- package/esm2020/lib/components/selects/select-test/value-change.service.mjs +4 -8
- package/fesm2015/wizishop-angular-components.mjs +66 -19
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +66 -19
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/selects/option/select-option.directive.d.ts +3 -1
- package/lib/components/selects/select-test/select.component.d.ts +4 -1
- package/lib/components/selects/select-test/select.directive.d.ts +3 -1
- package/package.json +1 -1
- package/wizishop-angular-components-14.3.16.tgz +0 -0
- package/wizishop-angular-components-14.3.15.tgz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
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, ContentChildren, NgModule, Inject, Pipe, Attribute, Optional, ViewChild, ChangeDetectionStrategy,
|
|
4
|
+
import { Component, ViewEncapsulation, Input, EventEmitter, Directive, Output, HostListener, Injectable, InjectionToken, HostBinding, ContentChildren, NgModule, Inject, Pipe, Attribute, Optional, ViewChild, ChangeDetectionStrategy, 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';
|
|
@@ -11,7 +11,7 @@ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
|
11
11
|
import { Subject, merge, takeUntil as takeUntil$1, startWith, fromEvent, ReplaySubject, interval, map as map$1 } from 'rxjs';
|
|
12
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
|
+
import { TAB, DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, A, Z, ZERO, NINE, ENTER, SPACE, hasModifierKey, ESCAPE } from '@angular/cdk/keycodes';
|
|
15
15
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
16
16
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
17
17
|
import { TagInputModule } from 'ngx-chips';
|
|
@@ -350,6 +350,7 @@ const OPTION_SELECTION_HANDLER = new InjectionToken('OPTION_SELECTION_HANDLER');
|
|
|
350
350
|
class SelectOptionDirective {
|
|
351
351
|
constructor(contentRef) {
|
|
352
352
|
this.contentRef = contentRef;
|
|
353
|
+
this.cursor = 'pointer';
|
|
353
354
|
this.disabled = false;
|
|
354
355
|
this.selected = false;
|
|
355
356
|
this.selectedChange = new EventEmitter();
|
|
@@ -357,6 +358,9 @@ class SelectOptionDirective {
|
|
|
357
358
|
onClick() {
|
|
358
359
|
this.onSelectOption();
|
|
359
360
|
}
|
|
361
|
+
get isOptionSelected() {
|
|
362
|
+
return this.selected;
|
|
363
|
+
}
|
|
360
364
|
onSelectOption() {
|
|
361
365
|
if (this.disabled) {
|
|
362
366
|
return;
|
|
@@ -382,16 +386,22 @@ class SelectOptionDirective {
|
|
|
382
386
|
}
|
|
383
387
|
}
|
|
384
388
|
SelectOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectOptionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
385
|
-
SelectOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectOptionDirective, selector: "[
|
|
389
|
+
SelectOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectOptionDirective, selector: "[wacOption]", inputs: { disabled: "disabled", value: "value", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick()" }, properties: { "class.wac-option-selected": "this.isOptionSelected", "style.cursor": "this.cursor" } }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: SelectOptionDirective }], ngImport: i0 });
|
|
386
390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectOptionDirective, decorators: [{
|
|
387
391
|
type: Directive,
|
|
388
392
|
args: [{
|
|
389
|
-
selector: '[
|
|
393
|
+
selector: '[wacOption]',
|
|
390
394
|
providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: SelectOptionDirective }]
|
|
391
395
|
}]
|
|
392
396
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onClick: [{
|
|
393
397
|
type: HostListener,
|
|
394
398
|
args: ['click']
|
|
399
|
+
}], isOptionSelected: [{
|
|
400
|
+
type: HostBinding,
|
|
401
|
+
args: ['class.wac-option-selected']
|
|
402
|
+
}], cursor: [{
|
|
403
|
+
type: HostBinding,
|
|
404
|
+
args: ['style.cursor']
|
|
395
405
|
}], disabled: [{
|
|
396
406
|
type: Input
|
|
397
407
|
}], value: [{
|
|
@@ -502,8 +512,8 @@ class ValueChangeService {
|
|
|
502
512
|
this.value = selectedOption.value;
|
|
503
513
|
}
|
|
504
514
|
handleSelectedOptionsEvent() {
|
|
505
|
-
this.optionSelectedChangeListeners().subscribe((
|
|
506
|
-
this.value =
|
|
515
|
+
this.optionSelectedChangeListeners().subscribe((value) => {
|
|
516
|
+
this.value = value;
|
|
507
517
|
});
|
|
508
518
|
}
|
|
509
519
|
updateSelectPlaceholder() {
|
|
@@ -519,11 +529,7 @@ class ValueChangeService {
|
|
|
519
529
|
}
|
|
520
530
|
optionSelectedChangeListeners() {
|
|
521
531
|
const selectedChange$ = this.optionChildren.map((option) => {
|
|
522
|
-
return option.selectedChange.pipe(map((
|
|
523
|
-
return {
|
|
524
|
-
value
|
|
525
|
-
};
|
|
526
|
-
}));
|
|
532
|
+
return option.selectedChange.pipe(map((selected) => option.getValue()));
|
|
527
533
|
});
|
|
528
534
|
return merge(...selectedChange$).pipe(takeUntil(this.resetListeners$));
|
|
529
535
|
}
|
|
@@ -551,13 +557,20 @@ class SelectDirective {
|
|
|
551
557
|
this.valueChangeService = valueChangeService;
|
|
552
558
|
this.valueChange = new EventEmitter();
|
|
553
559
|
this.disabled = false;
|
|
560
|
+
this.tabIndex = 0;
|
|
554
561
|
this.isDestroyed$ = new Subject();
|
|
555
562
|
// ControlValueAccessor methods
|
|
556
563
|
this.onChange = () => { };
|
|
557
564
|
this.onTouch = () => { };
|
|
558
565
|
}
|
|
566
|
+
get tabindex() {
|
|
567
|
+
return this.tabIndex;
|
|
568
|
+
}
|
|
559
569
|
/** Handles all keydown events on the select. */
|
|
560
570
|
onKeydown(event) {
|
|
571
|
+
if (event.keyCode === TAB) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
561
574
|
if (this.disabled) {
|
|
562
575
|
return;
|
|
563
576
|
}
|
|
@@ -600,8 +613,8 @@ class SelectDirective {
|
|
|
600
613
|
keyCode === LEFT_ARROW ||
|
|
601
614
|
keyCode === RIGHT_ARROW;
|
|
602
615
|
const isTyping = (keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE);
|
|
603
|
-
event.preventDefault(); // prevents the page from scrolling
|
|
604
616
|
if (isArrowKey) {
|
|
617
|
+
event.preventDefault(); // prevents the page from scrolling
|
|
605
618
|
// select the next option on arrow key down
|
|
606
619
|
if (keyCode === DOWN_ARROW || keyCode === RIGHT_ARROW) {
|
|
607
620
|
this.valueChangeService.selectNextOption();
|
|
@@ -633,7 +646,7 @@ class SelectDirective {
|
|
|
633
646
|
}
|
|
634
647
|
}
|
|
635
648
|
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: [
|
|
649
|
+
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" } }, providers: [
|
|
637
650
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectDirective, multi: true },
|
|
638
651
|
ValueChangeService
|
|
639
652
|
], queries: [{ propertyName: "optionChildren", predicate: OPTION_SELECTION_HANDLER, descendants: true }], ngImport: i0 });
|
|
@@ -646,7 +659,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
646
659
|
ValueChangeService
|
|
647
660
|
]
|
|
648
661
|
}]
|
|
649
|
-
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: {
|
|
662
|
+
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { tabindex: [{
|
|
663
|
+
type: HostBinding,
|
|
664
|
+
args: ['attr.tabindex']
|
|
665
|
+
}], onKeydown: [{
|
|
650
666
|
type: HostListener,
|
|
651
667
|
args: ['keydown', ['$event']]
|
|
652
668
|
}], optionChildren: [{
|
|
@@ -658,6 +674,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
658
674
|
type: Output
|
|
659
675
|
}], disabled: [{
|
|
660
676
|
type: Input
|
|
677
|
+
}], tabIndex: [{
|
|
678
|
+
type: Input
|
|
661
679
|
}] } });
|
|
662
680
|
|
|
663
681
|
const directives$2 = [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective, SelectOptionDirective, SelectDirective];
|
|
@@ -4566,6 +4584,7 @@ class SelectTestComponent extends SelectDirective {
|
|
|
4566
4584
|
this._openPanel = false;
|
|
4567
4585
|
this.openPanelChange = new EventEmitter();
|
|
4568
4586
|
this.enableSearch = false;
|
|
4587
|
+
this.tabIndex = -1;
|
|
4569
4588
|
this.isDestroyed$ = new Subject();
|
|
4570
4589
|
this.isKeyBoardAction = false;
|
|
4571
4590
|
this.skipIfTriggeredByKeyboardAction = () => {
|
|
@@ -4628,16 +4647,37 @@ class SelectTestComponent extends SelectDirective {
|
|
|
4628
4647
|
this.openPanelChange.emit(this.openPanel);
|
|
4629
4648
|
}
|
|
4630
4649
|
onKeydown(event) {
|
|
4650
|
+
const keyCode = event.keyCode;
|
|
4651
|
+
if (event.keyCode === TAB) {
|
|
4652
|
+
// go to the next element with tabindex
|
|
4653
|
+
if (this.openPanel) {
|
|
4654
|
+
this.openPanel = false;
|
|
4655
|
+
}
|
|
4656
|
+
return;
|
|
4657
|
+
}
|
|
4631
4658
|
if (this.disabled) {
|
|
4632
4659
|
return;
|
|
4633
4660
|
}
|
|
4634
|
-
event.preventDefault(); // prevents the page from scrolling
|
|
4635
4661
|
const actionTriggered = this.openPanel ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);
|
|
4636
4662
|
if (actionTriggered) {
|
|
4637
4663
|
return;
|
|
4638
4664
|
}
|
|
4639
4665
|
this.isKeyBoardAction = true;
|
|
4640
|
-
super.
|
|
4666
|
+
super.onKeydown(event);
|
|
4667
|
+
}
|
|
4668
|
+
handleKeyboardActionWithSearch(event) {
|
|
4669
|
+
const keyCode = event.keyCode;
|
|
4670
|
+
if (keyCode === DOWN_ARROW) {
|
|
4671
|
+
this.isKeyBoardAction = true;
|
|
4672
|
+
this.valueChangeService.selectNextOption();
|
|
4673
|
+
return true;
|
|
4674
|
+
}
|
|
4675
|
+
if (keyCode === UP_ARROW) {
|
|
4676
|
+
this.isKeyBoardAction = true;
|
|
4677
|
+
this.valueChangeService.selectPreviousOption();
|
|
4678
|
+
return true;
|
|
4679
|
+
}
|
|
4680
|
+
return false;
|
|
4641
4681
|
}
|
|
4642
4682
|
/** Handles keyboard events while the select is closed. */
|
|
4643
4683
|
_handleClosedKeydown(event) {
|
|
@@ -4662,10 +4702,14 @@ class SelectTestComponent extends SelectDirective {
|
|
|
4662
4702
|
keyCode === UP_ARROW ||
|
|
4663
4703
|
keyCode === LEFT_ARROW ||
|
|
4664
4704
|
keyCode === RIGHT_ARROW;
|
|
4665
|
-
const isEscapeKey = keyCode === ESCAPE || keyCode === ENTER || keyCode === SPACE;
|
|
4705
|
+
const isEscapeKey = keyCode === ESCAPE || keyCode === ENTER || keyCode === SPACE || keyCode === TAB;
|
|
4666
4706
|
if ((isArrowKey && event.altKey) || isEscapeKey) {
|
|
4667
4707
|
// Close the select on ALT + arrow key to match the native <select>
|
|
4668
4708
|
this.openPanel = false;
|
|
4709
|
+
if (this.customSearchTrigger && keyCode !== TAB) {
|
|
4710
|
+
// If a escape key is used with the search, the focus on the select is loosed. And we can not interact with the select anymore.
|
|
4711
|
+
this.selectHeader.nativeElement.focus();
|
|
4712
|
+
}
|
|
4669
4713
|
return true;
|
|
4670
4714
|
}
|
|
4671
4715
|
return false;
|
|
@@ -4682,13 +4726,13 @@ SelectTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
4682
4726
|
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: [
|
|
4683
4727
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectTestComponent, multi: true },
|
|
4684
4728
|
ValueChangeService
|
|
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 });
|
|
4729
|
+
], 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-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 #selectHeader 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 });
|
|
4686
4730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectTestComponent, decorators: [{
|
|
4687
4731
|
type: Component,
|
|
4688
4732
|
args: [{ selector: 'wac-select-test', providers: [
|
|
4689
4733
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectTestComponent, multi: true },
|
|
4690
4734
|
ValueChangeService
|
|
4691
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
4735
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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 #selectHeader 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>" }]
|
|
4692
4736
|
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { role: [{
|
|
4693
4737
|
type: HostBinding,
|
|
4694
4738
|
args: ['attr.role']
|
|
@@ -4698,6 +4742,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4698
4742
|
}], label: [{
|
|
4699
4743
|
type: ContentChild,
|
|
4700
4744
|
args: [LabelComponent]
|
|
4745
|
+
}], selectHeader: [{
|
|
4746
|
+
type: ViewChild,
|
|
4747
|
+
args: ['selectHeader']
|
|
4701
4748
|
}], required: [{
|
|
4702
4749
|
type: Input
|
|
4703
4750
|
}], keepPanelOpen: [{
|