@wlcm/angular 17.5.34 → 17.7.0
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/core/esm2022/index.mjs +3 -1
- package/core/esm2022/lib/services/scroll-detection.api.mjs +27 -0
- package/core/fesm2022/wlcm-angular-core.mjs +27 -3
- package/core/fesm2022/wlcm-angular-core.mjs.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/lib/services/scroll-detection.api.d.ts +7 -0
- package/forms/esm2022/lib/forms/components/checkbox/checkbox.component.mjs +14 -5
- package/forms/esm2022/lib/forms/components/checkbox-group/checkbox-group.component.mjs +87 -0
- package/forms/esm2022/lib/forms/components/index.mjs +2 -1
- package/forms/esm2022/lib/forms/components/select/select.component.mjs +70 -32
- package/forms/esm2022/lib/forms/forms.module.mjs +5 -2
- package/forms/fesm2022/wlcm-angular-forms.mjs +158 -30
- package/forms/fesm2022/wlcm-angular-forms.mjs.map +1 -1
- package/forms/lib/forms/components/checkbox/checkbox.component.d.ts +6 -3
- package/forms/lib/forms/components/checkbox-group/checkbox-group.component.d.ts +25 -0
- package/forms/lib/forms/components/index.d.ts +1 -0
- package/forms/lib/forms/components/select/select.component.d.ts +18 -7
- package/forms/lib/forms/forms.module.d.ts +11 -10
- package/package.json +1 -1
- package/phone-input/esm2022/lib/components/country-code-select/country-code-select.component.mjs +2 -2
- package/phone-input/fesm2022/wlcm-angular-phone-input.mjs +1 -1
- package/phone-input/fesm2022/wlcm-angular-phone-input.mjs.map +1 -1
- package/styles/components/forms/_checkbox-group.scss +13 -0
- package/styles/components/forms/index.scss +2 -0
- package/table/esm2022/lib/components/table-head-actions/table-head-actions.component.mjs +2 -2
- package/table/esm2022/lib/components/table-row-actions/table-row-actions.component.mjs +2 -2
- package/table/fesm2022/wlcm-angular-table.mjs +2 -2
- package/table/fesm2022/wlcm-angular-table.mjs.map +1 -1
@@ -1,14 +1,15 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, ChangeDetectionStrategy, Injectable, InjectionToken, inject, Directive, Pipe, Inject, HostListener, forwardRef, ChangeDetectorRef, Optional, Input, ContentChild, ViewChild, HostBinding, EventEmitter, NgZone, Host, Output, input, output, ElementRef,
|
2
|
+
import { Component, ChangeDetectionStrategy, Injectable, InjectionToken, inject, Directive, Pipe, Inject, HostListener, forwardRef, ChangeDetectorRef, Optional, Input, ContentChild, ViewChild, HostBinding, EventEmitter, NgZone, Host, Output, input, output, ElementRef, contentChildren, computed, signal, effect, viewChildren, NgModule } from '@angular/core';
|
3
3
|
import { __decorate, __metadata } from 'tslib';
|
4
4
|
import * as i4 from '@angular/forms';
|
5
5
|
import { Validators, NgControl, ControlContainer, FormControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule } from '@angular/forms';
|
6
6
|
import * as i1 from '@angular/common';
|
7
7
|
import { CommonModule } from '@angular/common';
|
8
8
|
import { Subject, Observable, takeUntil, merge, fromEvent, observeOn, asyncScheduler, BehaviorSubject, EMPTY, switchMap, take, tap, concatMap, filter, timer, map, first } from 'rxjs';
|
9
|
-
import
|
9
|
+
import * as i1$3 from '@wlcm/angular/core';
|
10
|
+
import { WlcmAutocompleteOption, DEFAULT_QUERY_PARAMS, WlcmIconName, WlcmIconDirective, WlcmLoaderComponent, ScrollDetectionApi } from '@wlcm/angular/core';
|
10
11
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
11
|
-
import * as
|
12
|
+
import * as i4$1 from '@angular/material/select';
|
12
13
|
import { MatOption, MAT_SELECT_CONFIG, MatSelect, MatSelectModule } from '@angular/material/select';
|
13
14
|
import * as i1$1 from '@angular/material/autocomplete';
|
14
15
|
import { MatAutocomplete, MatAutocompleteOrigin, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
|
@@ -667,7 +668,8 @@ let WlcmCheckboxComponent = class WlcmCheckboxComponent {
|
|
667
668
|
constructor(changeDetectorRef, parentFormMember) {
|
668
669
|
this.changeDetectorRef = changeDetectorRef;
|
669
670
|
this.parentFormMember = parentFormMember;
|
670
|
-
this.
|
671
|
+
this.value = input();
|
672
|
+
this.changed = new EventEmitter();
|
671
673
|
this.control = new FormControl(false);
|
672
674
|
this.validate = () => null;
|
673
675
|
if (this.parentFormMember) {
|
@@ -697,6 +699,12 @@ let WlcmCheckboxComponent = class WlcmCheckboxComponent {
|
|
697
699
|
}
|
698
700
|
this.control.enable();
|
699
701
|
}
|
702
|
+
get checked() {
|
703
|
+
return this.control.value;
|
704
|
+
}
|
705
|
+
set checked(value) {
|
706
|
+
this.control.setValue(value);
|
707
|
+
}
|
700
708
|
handleStateChange() {
|
701
709
|
this.parentFormMember.stateChanges$.pipe(untilDestroyed(this)).subscribe(() => {
|
702
710
|
this._validatorChanged?.();
|
@@ -704,7 +712,7 @@ let WlcmCheckboxComponent = class WlcmCheckboxComponent {
|
|
704
712
|
});
|
705
713
|
}
|
706
714
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: WLCM_FORM_CONTROL, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
707
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
715
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.5", type: WlcmCheckboxComponent, isStandalone: true, selector: "wlcm-checkbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { classAttribute: "wlcm-checkbox" }, providers: [
|
708
716
|
WLCM_FORM_CONTROL_PROVIDER,
|
709
717
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmCheckboxComponent), multi: true },
|
710
718
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmCheckboxComponent), multi: true },
|
@@ -726,7 +734,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
726
734
|
}, {
|
727
735
|
type: Inject,
|
728
736
|
args: [WLCM_FORM_CONTROL]
|
729
|
-
}] }]
|
737
|
+
}] }], propDecorators: { changed: [{
|
738
|
+
type: Output
|
739
|
+
}] } });
|
740
|
+
|
741
|
+
let WlcmCheckboxGroupComponent = class WlcmCheckboxGroupComponent {
|
742
|
+
constructor() {
|
743
|
+
this.checkboxes = contentChildren(WlcmCheckboxComponent);
|
744
|
+
this.checkboxesMap = computed(() => {
|
745
|
+
return new Map(this.checkboxes().map((checkbox) => [checkbox.value(), checkbox]));
|
746
|
+
});
|
747
|
+
this.values = signal(new Set());
|
748
|
+
this.checkboxesListUpdated = new Subject();
|
749
|
+
this.validate = () => null;
|
750
|
+
effect(() => this.handleCheckboxesToggle(this.checkboxes()));
|
751
|
+
}
|
752
|
+
ngAfterContentInit() {
|
753
|
+
this.updateCheckboxes(this.values());
|
754
|
+
}
|
755
|
+
writeValue(value) {
|
756
|
+
this.values.set(new Set(value));
|
757
|
+
if (this.checkboxes())
|
758
|
+
this.updateCheckboxes(this.values());
|
759
|
+
}
|
760
|
+
registerOnChange(callback) {
|
761
|
+
this._changed = callback;
|
762
|
+
}
|
763
|
+
registerOnTouched(callback) {
|
764
|
+
this._touched = callback;
|
765
|
+
}
|
766
|
+
registerOnValidatorChange(callback) {
|
767
|
+
this._validatorChanged = callback;
|
768
|
+
}
|
769
|
+
updateControl(values) {
|
770
|
+
this._changed?.(Array.from(values.values()));
|
771
|
+
this._touched?.();
|
772
|
+
}
|
773
|
+
updateCheckboxes(values) {
|
774
|
+
const checkboxesMap = this.checkboxesMap();
|
775
|
+
for (const checkbox of checkboxesMap.values()) {
|
776
|
+
checkbox.checked = values.has(checkbox.value());
|
777
|
+
}
|
778
|
+
}
|
779
|
+
handleCheckboxesToggle(checkboxes) {
|
780
|
+
this.checkboxesListUpdated.next();
|
781
|
+
const handleCheck = (checkbox) => {
|
782
|
+
this.values.update((values) => {
|
783
|
+
if (checkbox.checked) {
|
784
|
+
values.add(checkbox.value());
|
785
|
+
}
|
786
|
+
else {
|
787
|
+
values.delete(checkbox.value());
|
788
|
+
}
|
789
|
+
this.updateControl(values);
|
790
|
+
return values;
|
791
|
+
});
|
792
|
+
};
|
793
|
+
const changeHandlers = Array.from(checkboxes.values()).map((checkbox) => {
|
794
|
+
return checkbox.changed.asObservable().pipe(tap(() => handleCheck(checkbox)));
|
795
|
+
});
|
796
|
+
merge(...changeHandlers)
|
797
|
+
.pipe(untilDestroyed(this))
|
798
|
+
.pipe(takeUntil(this.checkboxesListUpdated))
|
799
|
+
.subscribe();
|
800
|
+
}
|
801
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmCheckboxGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
802
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.5", type: WlcmCheckboxGroupComponent, isStandalone: true, selector: "wlcm-checkbox-group", host: { classAttribute: "wlcm-checkbox-group" }, providers: [
|
803
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmCheckboxGroupComponent), multi: true },
|
804
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmCheckboxGroupComponent), multi: true },
|
805
|
+
], queries: [{ propertyName: "checkboxes", predicate: WlcmCheckboxComponent, isSignal: true }], ngImport: i0, template: "<ng-content select=\"wlcm-checkbox\"></ng-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
806
|
+
};
|
807
|
+
WlcmCheckboxGroupComponent = __decorate([
|
808
|
+
UntilDestroy(),
|
809
|
+
__metadata("design:paramtypes", [])
|
810
|
+
], WlcmCheckboxGroupComponent);
|
811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmCheckboxGroupComponent, decorators: [{
|
812
|
+
type: Component,
|
813
|
+
args: [{ selector: 'wlcm-checkbox-group', host: { class: 'wlcm-checkbox-group' }, standalone: true, imports: [CommonModule], providers: [
|
814
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmCheckboxGroupComponent), multi: true },
|
815
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmCheckboxGroupComponent), multi: true },
|
816
|
+
], template: "<ng-content select=\"wlcm-checkbox\"></ng-content>\n" }]
|
817
|
+
}], ctorParameters: () => [] });
|
730
818
|
|
731
819
|
class WlcmAutocompleteSuffixComponent {
|
732
820
|
constructor() {
|
@@ -783,22 +871,31 @@ let WlcmSelectComponent = class WlcmSelectComponent {
|
|
783
871
|
openPanel() {
|
784
872
|
this.matSelect.open();
|
785
873
|
}
|
786
|
-
constructor(changeDetectorRef, formField, parentFormMember) {
|
874
|
+
constructor(zone, changeDetectorRef, scrollDetectionApi, formField, parentFormMember) {
|
875
|
+
this.zone = zone;
|
787
876
|
this.changeDetectorRef = changeDetectorRef;
|
877
|
+
this.scrollDetectionApi = scrollDetectionApi;
|
788
878
|
this.formField = formField;
|
789
879
|
this.parentFormMember = parentFormMember;
|
790
880
|
this.multiple = false;
|
791
881
|
this.placeholder = 'Not selected';
|
882
|
+
this.queryParams = DEFAULT_QUERY_PARAMS;
|
883
|
+
this.paginated = input(false);
|
792
884
|
this.options = input.required();
|
885
|
+
this.paginatedOptions = signal([]);
|
793
886
|
this.selectOptionFormat = input('ValueOnly');
|
794
887
|
this.optionTemplate = input(null);
|
795
|
-
this.triggerTemplate = input(
|
888
|
+
this.triggerTemplate = input();
|
796
889
|
this.isOptionDisabled = input(() => false);
|
797
890
|
this.selectionChange = output();
|
798
891
|
this.opened = output();
|
799
892
|
this.closed = output();
|
800
893
|
this.control = new FormControl();
|
801
894
|
this.WlcmIconName = WlcmIconName;
|
895
|
+
this._paginatedData = null;
|
896
|
+
this.computedOptions = computed(() => {
|
897
|
+
return this.paginated() ? this.paginatedOptions() : this.options();
|
898
|
+
});
|
802
899
|
this.matOptions = viewChildren(MatOption);
|
803
900
|
this._focusStream$ = new BehaviorSubject(EMPTY);
|
804
901
|
this._blurStream$ = new BehaviorSubject(EMPTY);
|
@@ -810,7 +907,11 @@ let WlcmSelectComponent = class WlcmSelectComponent {
|
|
810
907
|
this.handleStateChange();
|
811
908
|
}
|
812
909
|
effect(() => {
|
813
|
-
if (this.
|
910
|
+
if (this.paginated())
|
911
|
+
this.loadPaginatedOptions();
|
912
|
+
}, { allowSignalWrites: true });
|
913
|
+
effect(() => {
|
914
|
+
if (this.isOptionDisabled() && this.computedOptions().length > 0) {
|
814
915
|
this.updateOptionsStatus();
|
815
916
|
}
|
816
917
|
});
|
@@ -830,7 +931,11 @@ let WlcmSelectComponent = class WlcmSelectComponent {
|
|
830
931
|
}
|
831
932
|
panelOpened() {
|
832
933
|
this.opened.emit();
|
833
|
-
this.
|
934
|
+
this.handleScrollDown();
|
935
|
+
}
|
936
|
+
panelClosed() {
|
937
|
+
this.closed.emit();
|
938
|
+
this._touched?.();
|
834
939
|
}
|
835
940
|
updateOptionsStatus() {
|
836
941
|
this.matOptions().forEach((matOption) => {
|
@@ -863,27 +968,41 @@ let WlcmSelectComponent = class WlcmSelectComponent {
|
|
863
968
|
get isOpen() {
|
864
969
|
return this.matSelect?.panelOpen ?? false;
|
865
970
|
}
|
971
|
+
loadPaginatedOptions() {
|
972
|
+
this.fetchPaginatedOptions({ ...this.queryParams, page: 1 })
|
973
|
+
.pipe(untilDestroyed(this), first())
|
974
|
+
.subscribe((paginatedData) => {
|
975
|
+
this._paginatedData = paginatedData;
|
976
|
+
this.paginatedOptions.set(paginatedData.data);
|
977
|
+
});
|
978
|
+
}
|
979
|
+
loadMorePaginatedOptions() {
|
980
|
+
if (!this._paginatedData || this._paginatedData.currPage + 1 > this._paginatedData.totalPages)
|
981
|
+
return;
|
982
|
+
this.queryParams.page++;
|
983
|
+
this.fetchPaginatedOptions({ ...this.queryParams })
|
984
|
+
.pipe(untilDestroyed(this), first())
|
985
|
+
.subscribe((paginatedData) => {
|
986
|
+
this._paginatedData = paginatedData;
|
987
|
+
this.paginatedOptions.update((options) => [...options, ...paginatedData.data]);
|
988
|
+
});
|
989
|
+
}
|
990
|
+
handleScrollDown() {
|
991
|
+
const element = document.querySelector('.mat-mdc-select-panel');
|
992
|
+
this.zone.runOutsideAngular(() => {
|
993
|
+
this.scrollDetectionApi.onScrolledDown(element).subscribe(() => {
|
994
|
+
this.zone.run(() => this.loadMorePaginatedOptions());
|
995
|
+
});
|
996
|
+
});
|
997
|
+
}
|
866
998
|
handleStateChange() {
|
867
999
|
this.parentFormMember.stateChanges$.pipe(untilDestroyed(this)).subscribe(() => {
|
868
1000
|
this._validatorChanged?.();
|
869
1001
|
this.changeDetectorRef.markForCheck();
|
870
1002
|
});
|
871
1003
|
}
|
872
|
-
|
873
|
-
|
874
|
-
const backdrop = overlayContainer?.querySelector(`.cdk-overlay-backdrop`);
|
875
|
-
if (backdrop instanceof HTMLElement) {
|
876
|
-
fromEvent(backdrop, 'click')
|
877
|
-
.pipe(first())
|
878
|
-
.subscribe(() => {
|
879
|
-
this._touched?.();
|
880
|
-
this._validatorChanged?.();
|
881
|
-
this.changeDetectorRef.markForCheck();
|
882
|
-
});
|
883
|
-
}
|
884
|
-
}
|
885
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: WLCM_FORM_FIELD }, { token: WLCM_FORM_CONTROL, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
886
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: WlcmSelectComponent, isStandalone: true, selector: "wlcm-select", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, selectOptionFormat: { classPropertyName: "selectOptionFormat", publicName: "selectOptionFormat", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, triggerTemplate: { classPropertyName: "triggerTemplate", publicName: "triggerTemplate", isSignal: true, isRequired: false, transformFunction: null }, isOptionDisabled: { classPropertyName: "isOptionDisabled", publicName: "isOptionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", opened: "opened", closed: "closed" }, host: { listeners: { "click": "openPanel()" } }, providers: [
|
1004
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSelectComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1$3.ScrollDetectionApi }, { token: WLCM_FORM_FIELD }, { token: WLCM_FORM_CONTROL, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
1005
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: WlcmSelectComponent, isStandalone: true, selector: "wlcm-select", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, fetchPaginatedOptions: { classPropertyName: "fetchPaginatedOptions", publicName: "fetchPaginatedOptions", isSignal: false, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: false, isRequired: false, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, selectOptionFormat: { classPropertyName: "selectOptionFormat", publicName: "selectOptionFormat", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, triggerTemplate: { classPropertyName: "triggerTemplate", publicName: "triggerTemplate", isSignal: true, isRequired: false, transformFunction: null }, isOptionDisabled: { classPropertyName: "isOptionDisabled", publicName: "isOptionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", opened: "opened", closed: "closed" }, host: { listeners: { "click": "openPanel()" } }, providers: [
|
887
1006
|
WLCM_FORM_CONTROL_PROVIDER,
|
888
1007
|
{
|
889
1008
|
provide: MAT_SELECT_CONFIG,
|
@@ -894,11 +1013,13 @@ let WlcmSelectComponent = class WlcmSelectComponent {
|
|
894
1013
|
},
|
895
1014
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmSelectComponent), multi: true },
|
896
1015
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmSelectComponent), multi: true },
|
897
|
-
], viewQueries: [{ propertyName: "matOptions", predicate: MatOption, descendants: true, isSignal: true }, { propertyName: "matSelect", first: true, predicate: MatSelect, descendants: true }], hostDirectives: [{ directive: WlcmSelectInputBinderDirective }], ngImport: i0, template: "<mat-select\n #selectComponent\n [multiple]=\"multiple\"\n [disableRipple]=\"true\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [hideSingleSelectionIndicator]=\"true\"\n [ngClass]=\"{ focused: selectComponent.focused }\"\n (selectionChange)=\"select($event)\"\n (opened)=\"panelOpened()\"\n (closed)=\"
|
1016
|
+
], viewQueries: [{ propertyName: "matOptions", predicate: MatOption, descendants: true, isSignal: true }, { propertyName: "matSelect", first: true, predicate: MatSelect, descendants: true }], hostDirectives: [{ directive: WlcmSelectInputBinderDirective }], ngImport: i0, template: "<mat-select\n #selectComponent\n [multiple]=\"multiple\"\n [disableRipple]=\"true\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [hideSingleSelectionIndicator]=\"true\"\n [ngClass]=\"{ focused: selectComponent.focused }\"\n (selectionChange)=\"select($event)\"\n (opened)=\"panelOpened()\"\n (closed)=\"panelClosed()\"\n>\n @if (triggerTemplate()) {\n <mat-select-trigger>\n <ng-container\n *ngTemplateOutlet=\"\n triggerTemplate()!;\n context: $any({ $implicit: selectComponent.selected })\n \"\n ></ng-container>\n </mat-select-trigger>\n }\n\n <mat-option\n *ngFor=\"let option of computedOptions()\"\n [value]=\"selectOptionFormat() === 'CompleteOption' ? option : option.value\"\n >\n @if (optionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n optionTemplate();\n context: $any({ $implicit: option })\n \"\n ></ng-container>\n } @else {\n {{ option.viewValue }}\n }\n </mat-option>\n</mat-select>\n\n<div class=\"wlcm-select-arrow\">\n <ng-container\n [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"\n [wlcmIconStopPropagation]=\"false\"\n ></ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: WlcmIconDirective, selector: "[wlcmIcon]", inputs: ["wlcmIcon", "wlcmIconStopPropagation"], outputs: ["wlcmIconClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
898
1017
|
};
|
899
1018
|
WlcmSelectComponent = __decorate([
|
900
1019
|
UntilDestroy(),
|
901
|
-
__metadata("design:paramtypes", [
|
1020
|
+
__metadata("design:paramtypes", [NgZone,
|
1021
|
+
ChangeDetectorRef,
|
1022
|
+
ScrollDetectionApi, Object, Object])
|
902
1023
|
], WlcmSelectComponent);
|
903
1024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSelectComponent, decorators: [{
|
904
1025
|
type: Component,
|
@@ -913,8 +1034,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
913
1034
|
},
|
914
1035
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmSelectComponent), multi: true },
|
915
1036
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmSelectComponent), multi: true },
|
916
|
-
], template: "<mat-select\n #selectComponent\n [multiple]=\"multiple\"\n [disableRipple]=\"true\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [hideSingleSelectionIndicator]=\"true\"\n [ngClass]=\"{ focused: selectComponent.focused }\"\n (selectionChange)=\"select($event)\"\n (opened)=\"panelOpened()\"\n (closed)=\"
|
917
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
1037
|
+
], template: "<mat-select\n #selectComponent\n [multiple]=\"multiple\"\n [disableRipple]=\"true\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [hideSingleSelectionIndicator]=\"true\"\n [ngClass]=\"{ focused: selectComponent.focused }\"\n (selectionChange)=\"select($event)\"\n (opened)=\"panelOpened()\"\n (closed)=\"panelClosed()\"\n>\n @if (triggerTemplate()) {\n <mat-select-trigger>\n <ng-container\n *ngTemplateOutlet=\"\n triggerTemplate()!;\n context: $any({ $implicit: selectComponent.selected })\n \"\n ></ng-container>\n </mat-select-trigger>\n }\n\n <mat-option\n *ngFor=\"let option of computedOptions()\"\n [value]=\"selectOptionFormat() === 'CompleteOption' ? option : option.value\"\n >\n @if (optionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n optionTemplate();\n context: $any({ $implicit: option })\n \"\n ></ng-container>\n } @else {\n {{ option.viewValue }}\n }\n </mat-option>\n</mat-select>\n\n<div class=\"wlcm-select-arrow\">\n <ng-container\n [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"\n [wlcmIconStopPropagation]=\"false\"\n ></ng-container>\n</div>\n" }]
|
1038
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1$3.ScrollDetectionApi }, { type: undefined, decorators: [{
|
918
1039
|
type: Inject,
|
919
1040
|
args: [WLCM_FORM_FIELD]
|
920
1041
|
}] }, { type: undefined, decorators: [{
|
@@ -926,6 +1047,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
926
1047
|
type: Input
|
927
1048
|
}], placeholder: [{
|
928
1049
|
type: Input
|
1050
|
+
}], fetchPaginatedOptions: [{
|
1051
|
+
type: Input
|
1052
|
+
}], queryParams: [{
|
1053
|
+
type: Input
|
929
1054
|
}], matSelect: [{
|
930
1055
|
type: ViewChild,
|
931
1056
|
args: [MatSelect]
|
@@ -958,6 +1083,7 @@ const components = [
|
|
958
1083
|
WlcmFormFieldComponent,
|
959
1084
|
WlcmAutocompleteComponent,
|
960
1085
|
WlcmAutocompleteSuffixComponent,
|
1086
|
+
WlcmCheckboxGroupComponent,
|
961
1087
|
WlcmCheckboxComponent,
|
962
1088
|
WlcmSelectComponent,
|
963
1089
|
WlcmLabelComponent,
|
@@ -967,6 +1093,7 @@ class WlcmFormsModule {
|
|
967
1093
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.5", ngImport: i0, type: WlcmFormsModule, imports: [WlcmFormFieldComponent,
|
968
1094
|
WlcmAutocompleteComponent,
|
969
1095
|
WlcmAutocompleteSuffixComponent,
|
1096
|
+
WlcmCheckboxGroupComponent,
|
970
1097
|
WlcmCheckboxComponent,
|
971
1098
|
WlcmSelectComponent,
|
972
1099
|
WlcmLabelComponent, WlcmInputDirective,
|
@@ -976,6 +1103,7 @@ class WlcmFormsModule {
|
|
976
1103
|
WlcmFormFieldHintDirective, MatRadioModule], exports: [WlcmFormFieldComponent,
|
977
1104
|
WlcmAutocompleteComponent,
|
978
1105
|
WlcmAutocompleteSuffixComponent,
|
1106
|
+
WlcmCheckboxGroupComponent,
|
979
1107
|
WlcmCheckboxComponent,
|
980
1108
|
WlcmSelectComponent,
|
981
1109
|
WlcmLabelComponent, WlcmInputDirective,
|
@@ -998,5 +1126,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
998
1126
|
* Generated bundle index. Do not edit.
|
999
1127
|
*/
|
1000
1128
|
|
1001
|
-
export { WLCM_ERRORS, WLCM_FORM, WLCM_FORM_CONTROL, WLCM_FORM_CONTROL_PROVIDER, WLCM_FORM_FIELD, WLCM_FORM_FIELD_INPUT_CLASS, WLCM_FORM_PROVIDER, WLCM_INPUT, WLCM_INPUT_BINDER, WLCM_MAPS_API_ERROR, WLCM_PRIORITY_ERRORS, WLCM_SELECT_CONFIG, WlcmAutocomplete, WlcmAutocompleteComponent, WlcmAutocompleteSuffixComponent, WlcmCheckboxComponent, WlcmErrorComponent, WlcmFormFieldComponent, WlcmFormFieldCustomContainerDirective, WlcmFormFieldHintDirective, WlcmFormFieldPrefixDirective, WlcmFormFieldSuffixDirective, WlcmFormsModule, WlcmInputDirective, WlcmLabelComponent, WlcmPlacesApi, WlcmSelectComponent, WlcmSelectInputBinderDirective };
|
1129
|
+
export { WLCM_ERRORS, WLCM_FORM, WLCM_FORM_CONTROL, WLCM_FORM_CONTROL_PROVIDER, WLCM_FORM_FIELD, WLCM_FORM_FIELD_INPUT_CLASS, WLCM_FORM_PROVIDER, WLCM_INPUT, WLCM_INPUT_BINDER, WLCM_MAPS_API_ERROR, WLCM_PRIORITY_ERRORS, WLCM_SELECT_CONFIG, WlcmAutocomplete, WlcmAutocompleteComponent, WlcmAutocompleteSuffixComponent, WlcmCheckboxComponent, WlcmCheckboxGroupComponent, WlcmErrorComponent, WlcmFormFieldComponent, WlcmFormFieldCustomContainerDirective, WlcmFormFieldHintDirective, WlcmFormFieldPrefixDirective, WlcmFormFieldSuffixDirective, WlcmFormsModule, WlcmInputDirective, WlcmLabelComponent, WlcmPlacesApi, WlcmSelectComponent, WlcmSelectInputBinderDirective };
|
1002
1130
|
//# sourceMappingURL=wlcm-angular-forms.mjs.map
|