@wizishop/angular-components 14.4.62 → 14.4.64
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 +6 -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/esm2020/lib/utils/uuid.mjs +8 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/wizishop-angular-components.mjs +83 -16
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +82 -16
- 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/lib/utils/uuid.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/wizishop-angular-components-14.4.64.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
|
}
|
|
@@ -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
|
-
this.selectedOptionContent = selectedOption?.getContentRef().nativeElement.innerHTML || undefined;
|
|
577
|
+
this.selectedOptionContent = this.getSelectedOptionsContent();
|
|
549
578
|
}
|
|
550
|
-
|
|
551
|
-
|
|
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;
|
|
584
|
+
}
|
|
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: [{
|
|
@@ -4691,21 +4748,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4691
4748
|
}]
|
|
4692
4749
|
}] });
|
|
4693
4750
|
|
|
4751
|
+
const uuid = () => {
|
|
4752
|
+
if (typeof window !== "undefined" && typeof window.crypto.randomUUID === "function") {
|
|
4753
|
+
return window.crypto.randomUUID();
|
|
4754
|
+
}
|
|
4755
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
|
|
4756
|
+
return window.crypto.getRandomValues(new Uint32Array(5)).join("-");
|
|
4757
|
+
};
|
|
4758
|
+
|
|
4694
4759
|
class OptionComponent extends SelectOptionDirective {
|
|
4695
4760
|
constructor(contentRef, changeDetectorRef) {
|
|
4696
4761
|
super(contentRef, changeDetectorRef);
|
|
4697
4762
|
this.contentRef = contentRef;
|
|
4698
4763
|
this.changeDetectorRef = changeDetectorRef;
|
|
4764
|
+
this.checkBoxId = `wac-option-${uuid()}`;
|
|
4699
4765
|
}
|
|
4700
4766
|
getContentRef() {
|
|
4701
4767
|
return this.contentOption;
|
|
4702
4768
|
}
|
|
4703
4769
|
}
|
|
4704
4770
|
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 });
|
|
4705
|
-
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
|
|
4771
|
+
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 });
|
|
4706
4772
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, decorators: [{
|
|
4707
4773
|
type: Component,
|
|
4708
|
-
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
|
|
4774
|
+
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>" }]
|
|
4709
4775
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentOption: [{
|
|
4710
4776
|
type: ViewChild,
|
|
4711
4777
|
args: ['contentWrapper']
|
|
@@ -4895,13 +4961,13 @@ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
4895
4961
|
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: [
|
|
4896
4962
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
4897
4963
|
ValueChangeService
|
|
4898
|
-
], 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
|
|
4964
|
+
], 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 });
|
|
4899
4965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4900
4966
|
type: Component,
|
|
4901
4967
|
args: [{ selector: 'wac-select', providers: [
|
|
4902
4968
|
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
4903
4969
|
ValueChangeService
|
|
4904
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.
|
|
4970
|
+
], 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>" }]
|
|
4905
4971
|
}], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { role: [{
|
|
4906
4972
|
type: HostBinding,
|
|
4907
4973
|
args: ['attr.role']
|
|
@@ -6294,5 +6360,5 @@ const switchInOut = trigger('switchInOut', [
|
|
|
6294
6360
|
* Generated bundle index. Do not edit.
|
|
6295
6361
|
*/
|
|
6296
6362
|
|
|
6297
|
-
export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CallComponentFunctionPipe, CardPriceComponent, ChargingBarComponent, CheckBoxRow, CheckboxComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpandedPanelComponent, ExpansionExport, ExpansionModule, ExpansionPanelBase, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FindOptionSelectedPipe, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, GooglePreviewComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HistoryService, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OnlyNumberDirective, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectDirective, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, TwoDigitDecimalNumberDirective, UploadComponent, ValueChangeService, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective, animateListFromBottom, animateListFromLeft, animateListFromRight, animateListFromTop, inOutX, inOutY, opacityAnimation, showFromBottom, showFromLeft, showFromRight, showFromTop, switchInOut };
|
|
6363
|
+
export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CallComponentFunctionPipe, CardPriceComponent, ChargingBarComponent, CheckBoxRow, CheckboxComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpandedPanelComponent, ExpansionExport, ExpansionModule, ExpansionPanelBase, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FindOptionSelectedPipe, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, GooglePreviewComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HistoryService, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OnlyNumberDirective, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectDirective, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, TwoDigitDecimalNumberDirective, UploadComponent, ValueChangeService, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective, animateListFromBottom, animateListFromLeft, animateListFromRight, animateListFromTop, inOutX, inOutY, opacityAnimation, showFromBottom, showFromLeft, showFromRight, showFromTop, switchInOut, uuid };
|
|
6298
6364
|
//# sourceMappingURL=wizishop-angular-components.mjs.map
|