@colijnit/corecomponents_v12 12.0.103 → 12.0.105
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/bundles/colijnit-corecomponents_v12.umd.js +606 -238
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +11 -10
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +12 -11
- package/esm2015/lib/components/list-of-values/list-of-values-popup.component.js +79 -0
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +174 -0
- package/esm2015/lib/components/list-of-values/list-of-values.module.js +33 -0
- package/esm2015/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.component.js +101 -0
- package/esm2015/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.module.js +25 -0
- package/esm2015/lib/directives/overlay/overlay.directive.js +7 -2
- package/esm2015/lib/service/overlay.service.js +9 -2
- package/esm2015/public-api.js +5 -1
- package/fesm2015/colijnit-corecomponents_v12.js +659 -263
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base-input-date-picker/style/_layout.scss +91 -0
- package/lib/components/base-input-date-picker/style/_material-definition.scss +0 -0
- package/lib/components/base-input-date-picker/style/_theme.scss +4 -0
- package/lib/components/base-input-date-picker/style/material.scss +4 -0
- package/lib/components/co-input-date-picker/style/_layout.scss +5 -0
- package/lib/components/co-input-date-picker/style/_material-definition.scss +0 -0
- package/lib/components/co-input-date-picker/style/_theme.scss +0 -0
- package/lib/components/co-input-date-picker/style/material.scss +4 -0
- package/lib/components/co-input-date-range-picker/style/_layout.scss +18 -0
- package/lib/components/co-input-date-range-picker/style/_material-definition.scss +0 -0
- package/lib/components/co-input-date-range-picker/style/_theme.scss +0 -0
- package/lib/components/co-input-date-range-picker/style/material.scss +4 -0
- package/lib/components/filter-item/style/_material-definition.scss +1 -1
- package/lib/components/filter-item/style/_theme.scss +4 -1
- package/lib/components/input-checkbox/style/_layout.scss +1 -4
- package/lib/components/input-checkbox/style/_theme.scss +2 -1
- package/lib/components/input-text/style/_layout.scss +2 -1
- package/lib/components/list-of-values/list-of-values-popup.component.d.ts +22 -0
- package/lib/components/list-of-values/list-of-values.component.d.ts +35 -0
- package/lib/components/list-of-values/list-of-values.module.d.ts +2 -0
- package/lib/components/list-of-values/style/_layout.scss +101 -13
- package/lib/components/list-of-values/style/_material-definition.scss +15 -0
- package/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.component.d.ts +21 -0
- package/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.module.d.ts +2 -0
- package/lib/components/list-of-values-multiselect-search/style/_layout.scss +69 -0
- package/lib/components/list-of-values-multiselect-search/style/_material-definition.scss +8 -0
- package/lib/components/list-of-values-multiselect-search/style/_theme.scss +0 -0
- package/lib/components/list-of-values-multiselect-search/style/material.scss +4 -0
- package/lib/components/simple-grid/style/_layout.scss +4 -3
- package/lib/components/simple-grid/style/_material-definition.scss +3 -2
- package/lib/directives/overlay/overlay.directive.d.ts +1 -0
- package/lib/service/overlay.service.d.ts +1 -1
- package/lib/style/_variables.scss +9 -7
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -4008,7 +4008,7 @@ class OverlayService {
|
|
|
4008
4008
|
this._appRef = _appRef;
|
|
4009
4009
|
this._injector = _injector;
|
|
4010
4010
|
}
|
|
4011
|
-
createComponent(compClass, inputs) {
|
|
4011
|
+
createComponent(compClass, inputs, events) {
|
|
4012
4012
|
if (this._componentRef) {
|
|
4013
4013
|
this.removeComponent();
|
|
4014
4014
|
}
|
|
@@ -4022,6 +4022,13 @@ class OverlayService {
|
|
|
4022
4022
|
}
|
|
4023
4023
|
}
|
|
4024
4024
|
}
|
|
4025
|
+
if (events) {
|
|
4026
|
+
for (let event in events) {
|
|
4027
|
+
if (events.hasOwnProperty(event)) {
|
|
4028
|
+
this._componentRef.instance[event].subscribe((value) => events[event](value));
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
4031
|
+
}
|
|
4025
4032
|
this._appRef.attachView(this._componentRef.hostView);
|
|
4026
4033
|
const domElem = this._componentRef.hostView
|
|
4027
4034
|
.rootNodes[0];
|
|
@@ -6387,6 +6394,7 @@ CommitButtonsModule.decorators = [
|
|
|
6387
6394
|
class OverlayDirective {
|
|
6388
6395
|
constructor(elementRef) {
|
|
6389
6396
|
this.keepInView = false;
|
|
6397
|
+
this.inheritWidth = false;
|
|
6390
6398
|
this.handleScroll = (event) => {
|
|
6391
6399
|
this._checkAndPlaceElement();
|
|
6392
6400
|
};
|
|
@@ -6449,6 +6457,9 @@ class OverlayDirective {
|
|
|
6449
6457
|
this._elementRef.nativeElement.classList.remove('top');
|
|
6450
6458
|
this._elementRef.nativeElement.style.top = parentRect.bottom + "px";
|
|
6451
6459
|
}
|
|
6460
|
+
if (this.inheritWidth) {
|
|
6461
|
+
this._elementRef.nativeElement.style.width = parentRect.width + "px";
|
|
6462
|
+
}
|
|
6452
6463
|
this._elementRef.nativeElement.style.left = parentRect.left + "px";
|
|
6453
6464
|
if (this.keepInView) {
|
|
6454
6465
|
if (elementRect.right > window.innerWidth) {
|
|
@@ -6474,7 +6485,8 @@ OverlayDirective.ctorParameters = () => [
|
|
|
6474
6485
|
];
|
|
6475
6486
|
OverlayDirective.propDecorators = {
|
|
6476
6487
|
parent: [{ type: Input, args: ["overlay",] }],
|
|
6477
|
-
keepInView: [{ type: Input }]
|
|
6488
|
+
keepInView: [{ type: Input }],
|
|
6489
|
+
inheritWidth: [{ type: Input }]
|
|
6478
6490
|
};
|
|
6479
6491
|
|
|
6480
6492
|
class OverlayParentDirective {
|
|
@@ -10697,306 +10709,250 @@ ViewModeButtonsModule.decorators = [
|
|
|
10697
10709
|
},] }
|
|
10698
10710
|
];
|
|
10699
10711
|
|
|
10700
|
-
class
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10712
|
+
class ListOfValuesPopupComponent extends BaseInputComponent {
|
|
10713
|
+
constructor() {
|
|
10714
|
+
super(...arguments);
|
|
10715
|
+
this.chosenOption = new EventEmitter();
|
|
10716
|
+
this.closePopup = new EventEmitter();
|
|
10717
|
+
this.displayField = 'description';
|
|
10718
|
+
this.searchDisabled = false;
|
|
10719
|
+
this.filteredOptions = this.collection;
|
|
10720
|
+
this.searchTerm = '';
|
|
10721
|
+
this._collection = [];
|
|
10722
|
+
}
|
|
10723
|
+
showClass() {
|
|
10724
|
+
return true;
|
|
10725
|
+
}
|
|
10726
|
+
set collection(value) {
|
|
10727
|
+
this._collection = value || [];
|
|
10728
|
+
this.filterOptions();
|
|
10729
|
+
}
|
|
10730
|
+
get collection() {
|
|
10731
|
+
return this._collection;
|
|
10732
|
+
}
|
|
10733
|
+
ngOnInit() {
|
|
10734
|
+
super.ngOnInit();
|
|
10735
|
+
if (this.model) {
|
|
10736
|
+
this.selectedModel = this.model[this.displayField];
|
|
10704
10737
|
}
|
|
10705
|
-
|
|
10738
|
+
}
|
|
10739
|
+
filterOptions() {
|
|
10740
|
+
this.filteredOptions = this.collection.filter(option => option[this.displayField].toLowerCase().includes(this.searchTerm.toLowerCase()));
|
|
10741
|
+
}
|
|
10742
|
+
onOptionClick(option) {
|
|
10743
|
+
this.model = option;
|
|
10744
|
+
this.selectedModel = this.model[this.displayField];
|
|
10745
|
+
this.modelChange.emit(this.model);
|
|
10746
|
+
this.searchTerm = option.label;
|
|
10747
|
+
this.searchTerm = "";
|
|
10748
|
+
this.filterOptions();
|
|
10749
|
+
this.chosenOption.emit(option);
|
|
10750
|
+
}
|
|
10751
|
+
optionClicked() {
|
|
10752
|
+
this.overlayService.removeComponent();
|
|
10753
|
+
this.closePopup.emit();
|
|
10706
10754
|
}
|
|
10707
10755
|
}
|
|
10708
|
-
|
|
10709
|
-
{ type:
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
]
|
|
10714
|
-
|
|
10715
|
-
class
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10756
|
+
ListOfValuesPopupComponent.decorators = [
|
|
10757
|
+
{ type: Component, args: [{
|
|
10758
|
+
selector: "co-list-of-values-popup",
|
|
10759
|
+
template: `
|
|
10760
|
+
<div class="lov-options" [overlay]="parentForOverlay" [inheritWidth]="true" [ngClass]="customCssClass" (clickOutside)="optionClicked()">
|
|
10761
|
+
<co-input-text *ngIf="!searchDisabled" [(model)]="searchTerm" [placeholder]="searchPlaceholder" (modelChange)="filterOptions()"></co-input-text>
|
|
10762
|
+
<ul>
|
|
10763
|
+
<li *ngFor="let option of filteredOptions" [class.selected]="option === model" (click)="onOptionClick(option)">
|
|
10764
|
+
<span [textContent]="option[displayField]"></span>
|
|
10765
|
+
</li>
|
|
10766
|
+
</ul>
|
|
10767
|
+
</div>
|
|
10768
|
+
|
|
10769
|
+
`,
|
|
10770
|
+
providers: [
|
|
10771
|
+
OverlayService
|
|
10721
10772
|
],
|
|
10722
|
-
|
|
10723
|
-
FilterPipe
|
|
10724
|
-
]
|
|
10773
|
+
encapsulation: ViewEncapsulation.None
|
|
10725
10774
|
},] }
|
|
10726
|
-
];
|
|
10775
|
+
];
|
|
10776
|
+
ListOfValuesPopupComponent.propDecorators = {
|
|
10777
|
+
showClass: [{ type: HostBinding, args: ["class.co-list-of-values-popup",] }],
|
|
10778
|
+
chosenOption: [{ type: Output }],
|
|
10779
|
+
closePopup: [{ type: Output }],
|
|
10780
|
+
displayField: [{ type: Input }],
|
|
10781
|
+
searchPlaceholder: [{ type: Input }],
|
|
10782
|
+
customCssClass: [{ type: Input }],
|
|
10783
|
+
searchDisabled: [{ type: Input }],
|
|
10784
|
+
parentForOverlay: [{ type: Input }],
|
|
10785
|
+
collection: [{ type: Input }]
|
|
10786
|
+
};
|
|
10727
10787
|
|
|
10728
|
-
class
|
|
10729
|
-
constructor(
|
|
10730
|
-
|
|
10788
|
+
class ListOfValuesComponent extends BaseInputComponent {
|
|
10789
|
+
constructor() {
|
|
10790
|
+
super(...arguments);
|
|
10731
10791
|
this.icons = CoreComponentsIcon;
|
|
10732
|
-
this.
|
|
10733
|
-
this.
|
|
10734
|
-
|
|
10735
|
-
this.
|
|
10736
|
-
|
|
10737
|
-
this.
|
|
10738
|
-
this.
|
|
10739
|
-
this.
|
|
10740
|
-
this.
|
|
10741
|
-
this.
|
|
10742
|
-
this.showLessLabel = 'Show less';
|
|
10743
|
-
this.noResultsLabel = "No results";
|
|
10744
|
-
this.collectionChange = new EventEmitter();
|
|
10745
|
-
this.filterButtonClicked = new EventEmitter();
|
|
10746
|
-
this.filteredCollection = [];
|
|
10747
|
-
this.limitTo = 10;
|
|
10748
|
-
this.filterText = "";
|
|
10749
|
-
this.showButton = false;
|
|
10792
|
+
this.multiselect = false;
|
|
10793
|
+
this.displayField = 'description';
|
|
10794
|
+
this.searchDisabled = false;
|
|
10795
|
+
this.selectedOptions = [];
|
|
10796
|
+
this.filteredOptions = this.collection;
|
|
10797
|
+
this.searchTerm = '';
|
|
10798
|
+
this.isSelectOpen = false;
|
|
10799
|
+
this.state = 'default';
|
|
10800
|
+
this.searchClicked = false;
|
|
10801
|
+
this.multiselectTags = [];
|
|
10750
10802
|
this._collection = [];
|
|
10751
10803
|
}
|
|
10804
|
+
showClass() {
|
|
10805
|
+
return true;
|
|
10806
|
+
}
|
|
10752
10807
|
set collection(value) {
|
|
10753
|
-
|
|
10754
|
-
this.
|
|
10755
|
-
this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
|
|
10808
|
+
this._collection = value || [];
|
|
10809
|
+
this.filterOptions();
|
|
10756
10810
|
}
|
|
10757
10811
|
get collection() {
|
|
10758
10812
|
return this._collection;
|
|
10759
10813
|
}
|
|
10760
|
-
showClass() {
|
|
10761
|
-
return true;
|
|
10762
|
-
}
|
|
10763
10814
|
ngOnInit() {
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
setToInitialLimit() {
|
|
10768
|
-
this.limitTo = this.initialLimit;
|
|
10769
|
-
}
|
|
10770
|
-
increaseLimit() {
|
|
10771
|
-
this.limitTo += 10;
|
|
10772
|
-
}
|
|
10773
|
-
moreToShow() {
|
|
10774
|
-
var _a;
|
|
10775
|
-
if (this.showAllResults) {
|
|
10776
|
-
return false;
|
|
10815
|
+
super.ngOnInit();
|
|
10816
|
+
if (this.model) {
|
|
10817
|
+
this.selectedModel = this.model[this.displayField];
|
|
10777
10818
|
}
|
|
10778
|
-
return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
|
|
10779
10819
|
}
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
return false;
|
|
10820
|
+
filterOptions() {
|
|
10821
|
+
if (!this.multiselect) {
|
|
10822
|
+
this.filteredOptions = this.collection.filter(option => option[this.displayField].toLowerCase().includes(this.searchTerm.toLowerCase()));
|
|
10784
10823
|
}
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
m.checked = false;
|
|
10824
|
+
else {
|
|
10825
|
+
this.selectedOptions = this.selectedOptions.filter((option) => {
|
|
10826
|
+
if (this.collection) {
|
|
10827
|
+
return this.searchTerm.includes(option.label);
|
|
10828
|
+
}
|
|
10829
|
+
else {
|
|
10830
|
+
return this.searchTerm.includes(option.value);
|
|
10793
10831
|
}
|
|
10794
10832
|
});
|
|
10795
10833
|
}
|
|
10796
|
-
model.checked = !model.checked;
|
|
10797
|
-
this.collectionChange.emit(this.collection);
|
|
10798
10834
|
}
|
|
10799
|
-
|
|
10800
|
-
if (this.
|
|
10801
|
-
|
|
10835
|
+
onOptionClick(option) {
|
|
10836
|
+
if (!this.multiselect) {
|
|
10837
|
+
this.model = option;
|
|
10838
|
+
this.selectedModel = this.model[this.displayField];
|
|
10839
|
+
this.modelChange.emit(this.model);
|
|
10840
|
+
this.searchTerm = option.label;
|
|
10841
|
+
this.isSelectOpen = false;
|
|
10842
|
+
this.searchTerm = "";
|
|
10843
|
+
this.filterOptions();
|
|
10802
10844
|
}
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
applyFilter(text) {
|
|
10807
|
-
var _a, _b;
|
|
10808
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10809
|
-
if (!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn) {
|
|
10810
|
-
if (text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length) {
|
|
10811
|
-
this.collection = yield this.collectionLoadFn(text);
|
|
10812
|
-
}
|
|
10813
|
-
else if (text.length < this.minSearchCharsToLoadCollection) {
|
|
10814
|
-
this.collection = undefined;
|
|
10815
|
-
}
|
|
10816
|
-
}
|
|
10817
|
-
this.filterText = text;
|
|
10818
|
-
if (!this.collection) {
|
|
10819
|
-
return [];
|
|
10845
|
+
if (this.multiselect) {
|
|
10846
|
+
if (this.selectedOptions.includes(option)) {
|
|
10847
|
+
this.selectedOptions.splice(this.selectedOptions.indexOf(option), 1);
|
|
10820
10848
|
}
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10849
|
+
else {
|
|
10850
|
+
this.selectedOptions.push(option);
|
|
10851
|
+
}
|
|
10852
|
+
this.modelChange.emit(this.selectedOptions);
|
|
10853
|
+
}
|
|
10854
|
+
}
|
|
10855
|
+
toggleSelect() {
|
|
10856
|
+
this.isSelectOpen = !this.isSelectOpen;
|
|
10857
|
+
if (this.isSelectOpen) {
|
|
10858
|
+
this.overlayService.createComponent(ListOfValuesPopupComponent, {
|
|
10859
|
+
parentForOverlay: this.parentForOverlay,
|
|
10860
|
+
customCssClass: this.customCssClass,
|
|
10861
|
+
searchDisabled: this.searchDisabled,
|
|
10862
|
+
searchPlaceholder: this.searchPlaceholder,
|
|
10863
|
+
displayField: this.displayField,
|
|
10864
|
+
collection: this.collection
|
|
10865
|
+
}, {
|
|
10866
|
+
chosenOption: (value) => this.optionChosen(value),
|
|
10867
|
+
closePopup: () => this.closePopup()
|
|
10834
10868
|
});
|
|
10835
|
-
}
|
|
10869
|
+
}
|
|
10870
|
+
else {
|
|
10871
|
+
this.overlayService.removeComponent();
|
|
10872
|
+
}
|
|
10873
|
+
this.state = (this.state === 'default' ? 'rotated' : 'default');
|
|
10836
10874
|
}
|
|
10837
|
-
|
|
10838
|
-
this.
|
|
10875
|
+
multiselectOkClick() {
|
|
10876
|
+
this.searchClicked = false;
|
|
10877
|
+
}
|
|
10878
|
+
createMultiSelectTags(tags) {
|
|
10879
|
+
this.multiselectTags = tags;
|
|
10880
|
+
}
|
|
10881
|
+
openMultiselectSearch() {
|
|
10882
|
+
this.searchClicked = true;
|
|
10883
|
+
}
|
|
10884
|
+
optionChosen(option) {
|
|
10885
|
+
this.selectedModel = option[this.displayField];
|
|
10886
|
+
}
|
|
10887
|
+
closePopup() {
|
|
10888
|
+
this.overlayService.removeComponent();
|
|
10839
10889
|
}
|
|
10840
10890
|
}
|
|
10841
|
-
|
|
10891
|
+
ListOfValuesComponent.decorators = [
|
|
10842
10892
|
{ type: Component, args: [{
|
|
10843
|
-
selector: "co-
|
|
10893
|
+
selector: "co-list-of-values",
|
|
10844
10894
|
template: `
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10895
|
+
<div class="lov-container">
|
|
10896
|
+
<div class="lov-container-child" *ngIf="!multiselect">
|
|
10897
|
+
<div class="search-wrapper" overlayParent #parentForOverlay="overlayParent">
|
|
10898
|
+
<co-input-text class="lov-search no-focus-line"
|
|
10899
|
+
type="text"
|
|
10900
|
+
[model]="selectedModel"
|
|
10901
|
+
[placeholder]="label"
|
|
10902
|
+
[readonly]="readonly"
|
|
10903
|
+
[disabled]="disabled"
|
|
10904
|
+
[required]="required"
|
|
10905
|
+
[rightIcon]="icons.ArrowPointDown"
|
|
10906
|
+
(click)="toggleSelect()"
|
|
10907
|
+
(rightIconClick)="toggleSelect()"
|
|
10908
|
+
></co-input-text>
|
|
10859
10909
|
</div>
|
|
10860
|
-
<ng-template #collectionContent>
|
|
10861
|
-
<div class="co-filter-item-collection-content">
|
|
10862
|
-
<co-input-text
|
|
10863
|
-
*ngIf="collection?.length > 10 || minSearchCharsToLoadCollection"
|
|
10864
|
-
[placeholder]="searchPlaceholder"
|
|
10865
|
-
[model]="filterText"
|
|
10866
|
-
(modelChange)="applyFilter($event)"
|
|
10867
|
-
>
|
|
10868
|
-
</co-input-text>
|
|
10869
|
-
<div class="no-results" *ngIf="filteredCollection?.length === 0">
|
|
10870
|
-
<span [textContent]="noResultsLabel"></span>
|
|
10871
|
-
</div>
|
|
10872
|
-
<div class="co-filter-item-collection-results">
|
|
10873
|
-
<ng-container
|
|
10874
|
-
*ngFor="let option of filteredCollection; let index = index">
|
|
10875
|
-
<div class="co-filter-item-collection-result-item" *ngIf="index < limitTo || showAllResults">
|
|
10876
|
-
<co-input-checkbox *ngIf="!singleSelect"
|
|
10877
|
-
[label]="option.description"
|
|
10878
|
-
[model]="option.checked"
|
|
10879
|
-
[clickableLabel]="false"
|
|
10880
|
-
(modelChange)="handleModelChange(option)"
|
|
10881
|
-
></co-input-checkbox>
|
|
10882
|
-
<co-input-radio-button *ngIf="singleSelect"
|
|
10883
|
-
[label]="option.description"
|
|
10884
|
-
[model]="option.checked"
|
|
10885
|
-
(modelChange)="handleModelChange(option)"
|
|
10886
|
-
></co-input-radio-button>
|
|
10887
|
-
<div class="co-filter-item-amount" *ngIf="option.count"
|
|
10888
|
-
[textContent]="option.count.toString() | append: ')' | prepend: ' ('"
|
|
10889
|
-
></div>
|
|
10890
|
-
</div>
|
|
10891
10910
|
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
</
|
|
10902
|
-
|
|
10903
|
-
*ngIf="lessToShow()">
|
|
10904
|
-
<a (click)="setToInitialLimit()">
|
|
10905
|
-
<co-icon [iconData]="iconService.getIcon(icons.ArrowPointUp)"></co-icon>
|
|
10906
|
-
<span [textContent]="showLessLabel"></span>
|
|
10907
|
-
</a>
|
|
10908
|
-
</div>
|
|
10909
|
-
</div>
|
|
10911
|
+
|
|
10912
|
+
|
|
10913
|
+
</div>
|
|
10914
|
+
<div *ngIf="multiselect">
|
|
10915
|
+
<div class="search-wrapper-multiselect" (click)="openMultiselectSearch()" *ngIf="!searchClicked">
|
|
10916
|
+
<div class="tag-wrapper">
|
|
10917
|
+
<ul class="tag-ul-wrapper">
|
|
10918
|
+
<li class="tag" *ngFor="let tags of multiselectTags">
|
|
10919
|
+
<span [textContent]="tags.label"></span>
|
|
10920
|
+
</li>
|
|
10921
|
+
</ul>
|
|
10910
10922
|
</div>
|
|
10911
|
-
</
|
|
10923
|
+
</div>
|
|
10924
|
+
<div *ngIf="searchClicked">
|
|
10925
|
+
<co-list-of-values-multiselect-search [collection]="filteredOptions" [returnChosenCollection]="multiselectTags" (okButtonClicked)="multiselectOkClick()" (chosenCollection)="createMultiSelectTags($event)"></co-list-of-values-multiselect-search>
|
|
10926
|
+
</div>
|
|
10912
10927
|
</div>
|
|
10913
|
-
</
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10928
|
+
</div>
|
|
10929
|
+
`,
|
|
10930
|
+
providers: [
|
|
10931
|
+
OverlayService
|
|
10932
|
+
],
|
|
10933
|
+
animations: [
|
|
10934
|
+
trigger('rotatedState', [
|
|
10935
|
+
state('default', style({ transform: 'rotate(0)' })),
|
|
10936
|
+
state('rotated', style({ transform: 'rotate(-180deg)' })),
|
|
10937
|
+
transition('rotated => default', animate('300ms ease-out')),
|
|
10938
|
+
transition('default => rotated', animate('300ms ease-out'))
|
|
10939
|
+
])
|
|
10940
|
+
],
|
|
10941
|
+
encapsulation: ViewEncapsulation.None
|
|
10919
10942
|
},] }
|
|
10920
10943
|
];
|
|
10921
|
-
|
|
10922
|
-
{ type:
|
|
10923
|
-
]
|
|
10924
|
-
|
|
10944
|
+
ListOfValuesComponent.propDecorators = {
|
|
10945
|
+
parentForOverlay: [{ type: ViewChild, args: ["parentForOverlay", { read: ElementRef },] }],
|
|
10946
|
+
multiselect: [{ type: Input }],
|
|
10947
|
+
showClass: [{ type: HostBinding, args: ["class.co-list-of-values",] }],
|
|
10948
|
+
displayField: [{ type: Input }],
|
|
10925
10949
|
collection: [{ type: Input }],
|
|
10926
|
-
placeholder: [{ type: Input }],
|
|
10927
|
-
initialLimit: [{ type: Input }],
|
|
10928
|
-
expanded: [{ type: Input }],
|
|
10929
|
-
minSearchCharsToLoadCollection: [{ type: Input }],
|
|
10930
|
-
collectionLoadFn: [{ type: Input }],
|
|
10931
|
-
customContent: [{ type: Input }],
|
|
10932
|
-
showAllResults: [{ type: Input }],
|
|
10933
|
-
singleSelect: [{ type: Input }],
|
|
10934
|
-
filterButtonLabel: [{ type: Input }],
|
|
10935
10950
|
searchPlaceholder: [{ type: Input }],
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
collectionChange: [{ type: Output }],
|
|
10940
|
-
filterButtonClicked: [{ type: Output }],
|
|
10941
|
-
showClass: [{ type: HostBinding, args: ["class.co-filter-item",] }]
|
|
10951
|
+
label: [{ type: Input }],
|
|
10952
|
+
customCssClass: [{ type: Input }],
|
|
10953
|
+
searchDisabled: [{ type: Input }]
|
|
10942
10954
|
};
|
|
10943
10955
|
|
|
10944
|
-
// A pipe for prepending strings to other strings in view templates.
|
|
10945
|
-
class PrependPipe {
|
|
10946
|
-
transform(value, prepend) {
|
|
10947
|
-
if (!value) {
|
|
10948
|
-
return "";
|
|
10949
|
-
}
|
|
10950
|
-
if (!prepend) {
|
|
10951
|
-
return value;
|
|
10952
|
-
}
|
|
10953
|
-
return prepend + value;
|
|
10954
|
-
}
|
|
10955
|
-
}
|
|
10956
|
-
PrependPipe.decorators = [
|
|
10957
|
-
{ type: Pipe, args: [{ name: "prepend" },] }
|
|
10958
|
-
];
|
|
10959
|
-
|
|
10960
|
-
class PrependPipeModule {
|
|
10961
|
-
}
|
|
10962
|
-
PrependPipeModule.decorators = [
|
|
10963
|
-
{ type: NgModule, args: [{
|
|
10964
|
-
declarations: [
|
|
10965
|
-
PrependPipe
|
|
10966
|
-
],
|
|
10967
|
-
exports: [
|
|
10968
|
-
PrependPipe
|
|
10969
|
-
]
|
|
10970
|
-
},] }
|
|
10971
|
-
];
|
|
10972
|
-
|
|
10973
|
-
class FilterItemModule {
|
|
10974
|
-
}
|
|
10975
|
-
FilterItemModule.decorators = [
|
|
10976
|
-
{ type: NgModule, args: [{
|
|
10977
|
-
imports: [
|
|
10978
|
-
CommonModule,
|
|
10979
|
-
CollapsibleModule,
|
|
10980
|
-
InputTextModule,
|
|
10981
|
-
InputCheckboxMultiSelectModule,
|
|
10982
|
-
InputCheckboxModule,
|
|
10983
|
-
IconModule,
|
|
10984
|
-
ScrollingModule,
|
|
10985
|
-
AppendPipeModule,
|
|
10986
|
-
PrependPipeModule,
|
|
10987
|
-
InputTextModule,
|
|
10988
|
-
InputRadioButtonModule,
|
|
10989
|
-
InputTextModule
|
|
10990
|
-
],
|
|
10991
|
-
declarations: [
|
|
10992
|
-
FilterItemComponent
|
|
10993
|
-
],
|
|
10994
|
-
exports: [
|
|
10995
|
-
FilterItemComponent
|
|
10996
|
-
]
|
|
10997
|
-
},] }
|
|
10998
|
-
];
|
|
10999
|
-
|
|
11000
10956
|
// Human-readable JS keyboard codes, as in KeyboardEvent.key string values.
|
|
11001
10957
|
var KeyboardKey;
|
|
11002
10958
|
(function (KeyboardKey) {
|
|
@@ -11207,6 +11163,446 @@ ClickoutsideModule.decorators = [
|
|
|
11207
11163
|
},] }
|
|
11208
11164
|
];
|
|
11209
11165
|
|
|
11166
|
+
class ListOfValuesMultiselectSearch extends BaseInputComponent {
|
|
11167
|
+
constructor() {
|
|
11168
|
+
super(...arguments);
|
|
11169
|
+
this.icons = CoreComponentsIcon;
|
|
11170
|
+
this.chosenCollection = new EventEmitter();
|
|
11171
|
+
this.okButtonClicked = new EventEmitter();
|
|
11172
|
+
this.selectedCollection = [];
|
|
11173
|
+
this.selectedOptions = [];
|
|
11174
|
+
this.allOptionsSelected = false;
|
|
11175
|
+
this.searchTerm = '';
|
|
11176
|
+
}
|
|
11177
|
+
showClass() {
|
|
11178
|
+
return true;
|
|
11179
|
+
}
|
|
11180
|
+
get filteredCollection() {
|
|
11181
|
+
if (this.searchTerm.trim() === '') {
|
|
11182
|
+
return this.collection;
|
|
11183
|
+
}
|
|
11184
|
+
return this.collection.filter((option) => option.label.toLowerCase().includes(this.searchTerm.toLowerCase()));
|
|
11185
|
+
}
|
|
11186
|
+
ngOnInit() {
|
|
11187
|
+
if (this.returnChosenCollection) {
|
|
11188
|
+
this.selectedCollection = this.returnChosenCollection;
|
|
11189
|
+
}
|
|
11190
|
+
}
|
|
11191
|
+
onOptionClick(option) {
|
|
11192
|
+
const index = this.selectedCollection.findIndex((selectedOption) => selectedOption.value === option.value);
|
|
11193
|
+
if (index !== -1) {
|
|
11194
|
+
this.selectedCollection.splice(index, 1);
|
|
11195
|
+
}
|
|
11196
|
+
else {
|
|
11197
|
+
this.selectedCollection.push(option);
|
|
11198
|
+
}
|
|
11199
|
+
}
|
|
11200
|
+
okClicked() {
|
|
11201
|
+
this.chosenCollection.emit(this.selectedCollection);
|
|
11202
|
+
this.okButtonClicked.emit();
|
|
11203
|
+
}
|
|
11204
|
+
onToggleSelectAll() {
|
|
11205
|
+
if (this.allOptionsSelected) {
|
|
11206
|
+
this.selectedCollection = [];
|
|
11207
|
+
this.allOptionsSelected = false;
|
|
11208
|
+
}
|
|
11209
|
+
else {
|
|
11210
|
+
this.selectedCollection = [...this.collection];
|
|
11211
|
+
this.allOptionsSelected = true;
|
|
11212
|
+
}
|
|
11213
|
+
}
|
|
11214
|
+
searchCollection() {
|
|
11215
|
+
this.selectedOptions = this.selectedOptions.filter((option) => {
|
|
11216
|
+
if (this.collection) {
|
|
11217
|
+
return this.searchTerm.includes(option.label);
|
|
11218
|
+
}
|
|
11219
|
+
else {
|
|
11220
|
+
return this.searchTerm.includes(option.value);
|
|
11221
|
+
}
|
|
11222
|
+
});
|
|
11223
|
+
}
|
|
11224
|
+
}
|
|
11225
|
+
ListOfValuesMultiselectSearch.decorators = [
|
|
11226
|
+
{ type: Component, args: [{
|
|
11227
|
+
selector: "co-list-of-values-multiselect-search",
|
|
11228
|
+
template: `
|
|
11229
|
+
<div class="co-list-of-values-multiselect-search">
|
|
11230
|
+
<div class="list-of-values-multiselect-search-input-text">
|
|
11231
|
+
<co-input-text [placeholder]="'Zoeken...'" [(model)]="searchTerm" (input)="searchCollection()"></co-input-text>
|
|
11232
|
+
</div>
|
|
11233
|
+
<div class="list-of-values-multiselect-options">
|
|
11234
|
+
<div class="list-of-values-multiselect-search-deselect" (click)="onToggleSelectAll()">
|
|
11235
|
+
<span [textContent]="'(De)selecteer alles'"></span>
|
|
11236
|
+
<co-icon [icon]="icons.CheckRound"></co-icon>
|
|
11237
|
+
</div>
|
|
11238
|
+
<div class="list-of-values-multiselect-list">
|
|
11239
|
+
<ul>
|
|
11240
|
+
<li *ngFor="let option of filteredCollection" (click)="onOptionClick(option)">
|
|
11241
|
+
<co-input-checkbox class="lov-options-checkbox" (modelChange)="onOptionClick(option)" [model]="selectedCollection.includes(option)"></co-input-checkbox>
|
|
11242
|
+
<span>{{ option.label }}</span>
|
|
11243
|
+
</li>
|
|
11244
|
+
</ul>
|
|
11245
|
+
</div>
|
|
11246
|
+
<div class="list-of-values-multiselect-ok-button" (click)="okClicked()">
|
|
11247
|
+
<span [textContent]="'Ok'"></span>
|
|
11248
|
+
<co-icon [icon]="icons.Check"></co-icon>
|
|
11249
|
+
</div>
|
|
11250
|
+
</div>
|
|
11251
|
+
</div>
|
|
11252
|
+
`,
|
|
11253
|
+
encapsulation: ViewEncapsulation.None
|
|
11254
|
+
},] }
|
|
11255
|
+
];
|
|
11256
|
+
ListOfValuesMultiselectSearch.propDecorators = {
|
|
11257
|
+
showClass: [{ type: HostBinding, args: ["class.co-list-of-values-multiselect-search",] }],
|
|
11258
|
+
collection: [{ type: Input }],
|
|
11259
|
+
returnChosenCollection: [{ type: Input }],
|
|
11260
|
+
chosenCollection: [{ type: Output }],
|
|
11261
|
+
okButtonClicked: [{ type: Output }]
|
|
11262
|
+
};
|
|
11263
|
+
|
|
11264
|
+
class ListOfValuesMultiselectSearchModule {
|
|
11265
|
+
}
|
|
11266
|
+
ListOfValuesMultiselectSearchModule.decorators = [
|
|
11267
|
+
{ type: NgModule, args: [{
|
|
11268
|
+
imports: [
|
|
11269
|
+
CommonModule,
|
|
11270
|
+
InputTextModule,
|
|
11271
|
+
IconModule,
|
|
11272
|
+
InputCheckboxModule,
|
|
11273
|
+
],
|
|
11274
|
+
declarations: [
|
|
11275
|
+
ListOfValuesMultiselectSearch
|
|
11276
|
+
],
|
|
11277
|
+
exports: [
|
|
11278
|
+
ListOfValuesMultiselectSearch
|
|
11279
|
+
]
|
|
11280
|
+
},] }
|
|
11281
|
+
];
|
|
11282
|
+
|
|
11283
|
+
class ListOfValuesModule {
|
|
11284
|
+
}
|
|
11285
|
+
ListOfValuesModule.decorators = [
|
|
11286
|
+
{ type: NgModule, args: [{
|
|
11287
|
+
imports: [
|
|
11288
|
+
CommonModule,
|
|
11289
|
+
FormsModule,
|
|
11290
|
+
InputTextModule,
|
|
11291
|
+
InputCheckboxModule,
|
|
11292
|
+
OverlayModule,
|
|
11293
|
+
ClickoutsideModule,
|
|
11294
|
+
ListOfValuesMultiselectSearchModule
|
|
11295
|
+
],
|
|
11296
|
+
declarations: [
|
|
11297
|
+
ListOfValuesComponent,
|
|
11298
|
+
ListOfValuesPopupComponent
|
|
11299
|
+
],
|
|
11300
|
+
exports: [
|
|
11301
|
+
ListOfValuesComponent
|
|
11302
|
+
]
|
|
11303
|
+
},] }
|
|
11304
|
+
];
|
|
11305
|
+
|
|
11306
|
+
class FilterPipe {
|
|
11307
|
+
transform(items, field, value) {
|
|
11308
|
+
if (!items || !field) {
|
|
11309
|
+
return items;
|
|
11310
|
+
}
|
|
11311
|
+
return items.filter(item => item[field] === value);
|
|
11312
|
+
}
|
|
11313
|
+
}
|
|
11314
|
+
FilterPipe.decorators = [
|
|
11315
|
+
{ type: Pipe, args: [{
|
|
11316
|
+
name: "filter",
|
|
11317
|
+
pure: false
|
|
11318
|
+
},] }
|
|
11319
|
+
];
|
|
11320
|
+
|
|
11321
|
+
class FilterPipeModule {
|
|
11322
|
+
}
|
|
11323
|
+
FilterPipeModule.decorators = [
|
|
11324
|
+
{ type: NgModule, args: [{
|
|
11325
|
+
declarations: [
|
|
11326
|
+
FilterPipe
|
|
11327
|
+
],
|
|
11328
|
+
exports: [
|
|
11329
|
+
FilterPipe
|
|
11330
|
+
]
|
|
11331
|
+
},] }
|
|
11332
|
+
];
|
|
11333
|
+
|
|
11334
|
+
class FilterItemComponent {
|
|
11335
|
+
constructor(iconService) {
|
|
11336
|
+
this.iconService = iconService;
|
|
11337
|
+
this.icons = CoreComponentsIcon;
|
|
11338
|
+
this.initialLimit = 10;
|
|
11339
|
+
this.expanded = false;
|
|
11340
|
+
// Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
|
|
11341
|
+
this.customContent = false;
|
|
11342
|
+
// Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
|
|
11343
|
+
this.showAllResults = false;
|
|
11344
|
+
this.singleSelect = false;
|
|
11345
|
+
this.filterButtonLabel = "Search";
|
|
11346
|
+
this.searchPlaceholder = 'Search...';
|
|
11347
|
+
this.showMoreLabel = 'Show more';
|
|
11348
|
+
this.showLessLabel = 'Show less';
|
|
11349
|
+
this.noResultsLabel = "No results";
|
|
11350
|
+
this.collectionChange = new EventEmitter();
|
|
11351
|
+
this.filterButtonClicked = new EventEmitter();
|
|
11352
|
+
this.filteredCollection = [];
|
|
11353
|
+
this.limitTo = 10;
|
|
11354
|
+
this.filterText = "";
|
|
11355
|
+
this.showButton = false;
|
|
11356
|
+
this._collection = [];
|
|
11357
|
+
}
|
|
11358
|
+
set collection(value) {
|
|
11359
|
+
var _a;
|
|
11360
|
+
this._collection = value;
|
|
11361
|
+
this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
|
|
11362
|
+
}
|
|
11363
|
+
get collection() {
|
|
11364
|
+
return this._collection;
|
|
11365
|
+
}
|
|
11366
|
+
showClass() {
|
|
11367
|
+
return true;
|
|
11368
|
+
}
|
|
11369
|
+
ngOnInit() {
|
|
11370
|
+
this.setToInitialLimit();
|
|
11371
|
+
this.showButton = this.valueSelected();
|
|
11372
|
+
}
|
|
11373
|
+
setToInitialLimit() {
|
|
11374
|
+
this.limitTo = this.initialLimit;
|
|
11375
|
+
}
|
|
11376
|
+
increaseLimit() {
|
|
11377
|
+
this.limitTo += 10;
|
|
11378
|
+
}
|
|
11379
|
+
moreToShow() {
|
|
11380
|
+
var _a;
|
|
11381
|
+
if (this.showAllResults) {
|
|
11382
|
+
return false;
|
|
11383
|
+
}
|
|
11384
|
+
return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
|
|
11385
|
+
}
|
|
11386
|
+
lessToShow() {
|
|
11387
|
+
var _a, _b;
|
|
11388
|
+
if (this.showAllResults) {
|
|
11389
|
+
return false;
|
|
11390
|
+
}
|
|
11391
|
+
return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
|
|
11392
|
+
}
|
|
11393
|
+
handleModelChange(model) {
|
|
11394
|
+
this.showButton = true;
|
|
11395
|
+
if (this.singleSelect) {
|
|
11396
|
+
this.collection.forEach(m => {
|
|
11397
|
+
if (m.code !== model.code && m.description !== model.description) {
|
|
11398
|
+
m.checked = false;
|
|
11399
|
+
}
|
|
11400
|
+
});
|
|
11401
|
+
}
|
|
11402
|
+
model.checked = !model.checked;
|
|
11403
|
+
this.collectionChange.emit(this.collection);
|
|
11404
|
+
}
|
|
11405
|
+
valueSelected() {
|
|
11406
|
+
if (this.collection) {
|
|
11407
|
+
return !!this.collection.find(c => c.checked);
|
|
11408
|
+
}
|
|
11409
|
+
return false;
|
|
11410
|
+
}
|
|
11411
|
+
// Applies filter to the collection.
|
|
11412
|
+
applyFilter(text) {
|
|
11413
|
+
var _a, _b;
|
|
11414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11415
|
+
if (!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn) {
|
|
11416
|
+
if (text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length) {
|
|
11417
|
+
this.collection = yield this.collectionLoadFn(text);
|
|
11418
|
+
}
|
|
11419
|
+
else if (text.length < this.minSearchCharsToLoadCollection) {
|
|
11420
|
+
this.collection = undefined;
|
|
11421
|
+
}
|
|
11422
|
+
}
|
|
11423
|
+
this.filterText = text;
|
|
11424
|
+
if (!this.collection) {
|
|
11425
|
+
return [];
|
|
11426
|
+
}
|
|
11427
|
+
const filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
|
|
11428
|
+
let filteredItemCount = 0;
|
|
11429
|
+
this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter((item) => {
|
|
11430
|
+
var _a;
|
|
11431
|
+
const labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
|
|
11432
|
+
const isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
|
|
11433
|
+
if (isHiddenByFilter) {
|
|
11434
|
+
return false;
|
|
11435
|
+
}
|
|
11436
|
+
else {
|
|
11437
|
+
filteredItemCount++;
|
|
11438
|
+
return true;
|
|
11439
|
+
}
|
|
11440
|
+
});
|
|
11441
|
+
});
|
|
11442
|
+
}
|
|
11443
|
+
onButtonClicked() {
|
|
11444
|
+
this.filterButtonClicked.emit();
|
|
11445
|
+
}
|
|
11446
|
+
}
|
|
11447
|
+
FilterItemComponent.decorators = [
|
|
11448
|
+
{ type: Component, args: [{
|
|
11449
|
+
selector: "co-filter-item",
|
|
11450
|
+
template: `
|
|
11451
|
+
<div class="co-filter-item-header">
|
|
11452
|
+
<co-collapsible
|
|
11453
|
+
[headerTitle]="placeholder"
|
|
11454
|
+
[expandButtonLast]="true"
|
|
11455
|
+
[iconData]="iconService.getIcon(icons.ArrowPointDown)"
|
|
11456
|
+
[expanded]="expanded"
|
|
11457
|
+
[showButton]="showButton"
|
|
11458
|
+
[buttonText]="filterButtonLabel"
|
|
11459
|
+
(buttonClicked)="onButtonClicked()"
|
|
11460
|
+
>
|
|
11461
|
+
<div class="co-filter-item-collapsable-content">
|
|
11462
|
+
<div class="co-filter-item-custom-content" *ngIf="customContent; else collectionContent"
|
|
11463
|
+
(keydown)="showButton=true" (mousedown)="showButton=true">
|
|
11464
|
+
<ng-content></ng-content>
|
|
11465
|
+
</div>
|
|
11466
|
+
<ng-template #collectionContent>
|
|
11467
|
+
<div class="co-filter-item-collection-content">
|
|
11468
|
+
<co-input-text
|
|
11469
|
+
*ngIf="collection?.length > 10 || minSearchCharsToLoadCollection"
|
|
11470
|
+
[placeholder]="searchPlaceholder"
|
|
11471
|
+
[model]="filterText"
|
|
11472
|
+
(modelChange)="applyFilter($event)"
|
|
11473
|
+
>
|
|
11474
|
+
</co-input-text>
|
|
11475
|
+
<div class="no-results" *ngIf="filteredCollection?.length === 0">
|
|
11476
|
+
<span [textContent]="noResultsLabel"></span>
|
|
11477
|
+
</div>
|
|
11478
|
+
<div class="co-filter-item-collection-results">
|
|
11479
|
+
<ng-container
|
|
11480
|
+
*ngFor="let option of filteredCollection; let index = index">
|
|
11481
|
+
<div class="co-filter-item-collection-result-item" *ngIf="index < limitTo || showAllResults">
|
|
11482
|
+
<co-input-checkbox *ngIf="!singleSelect"
|
|
11483
|
+
[label]="option.description"
|
|
11484
|
+
[model]="option.checked"
|
|
11485
|
+
[clickableLabel]="false"
|
|
11486
|
+
(modelChange)="handleModelChange(option)"
|
|
11487
|
+
></co-input-checkbox>
|
|
11488
|
+
<co-input-radio-button *ngIf="singleSelect"
|
|
11489
|
+
[label]="option.description"
|
|
11490
|
+
[model]="option.checked"
|
|
11491
|
+
(modelChange)="handleModelChange(option)"
|
|
11492
|
+
></co-input-radio-button>
|
|
11493
|
+
<div class="co-filter-item-amount" *ngIf="option.count"
|
|
11494
|
+
[textContent]="option.count.toString() | append: ')' | prepend: ' ('"
|
|
11495
|
+
></div>
|
|
11496
|
+
</div>
|
|
11497
|
+
|
|
11498
|
+
</ng-container>
|
|
11499
|
+
</div>
|
|
11500
|
+
<div class="co-filter-show-more-or-less" *ngIf="!showAllResults">
|
|
11501
|
+
<div class="co-filter-show-more clickable"
|
|
11502
|
+
*ngIf="moreToShow()">
|
|
11503
|
+
<a (click)="increaseLimit()">
|
|
11504
|
+
<co-icon [iconData]="iconService.getIcon(icons.ArrowPointDown)"></co-icon>
|
|
11505
|
+
<span [textContent]="showMoreLabel"></span>
|
|
11506
|
+
</a>
|
|
11507
|
+
</div>
|
|
11508
|
+
<div class="co-filter-show-less clickable"
|
|
11509
|
+
*ngIf="lessToShow()">
|
|
11510
|
+
<a (click)="setToInitialLimit()">
|
|
11511
|
+
<co-icon [iconData]="iconService.getIcon(icons.ArrowPointUp)"></co-icon>
|
|
11512
|
+
<span [textContent]="showLessLabel"></span>
|
|
11513
|
+
</a>
|
|
11514
|
+
</div>
|
|
11515
|
+
</div>
|
|
11516
|
+
</div>
|
|
11517
|
+
</ng-template>
|
|
11518
|
+
</div>
|
|
11519
|
+
</co-collapsible>
|
|
11520
|
+
</div>
|
|
11521
|
+
|
|
11522
|
+
`,
|
|
11523
|
+
encapsulation: ViewEncapsulation.None,
|
|
11524
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
11525
|
+
},] }
|
|
11526
|
+
];
|
|
11527
|
+
FilterItemComponent.ctorParameters = () => [
|
|
11528
|
+
{ type: IconCacheService }
|
|
11529
|
+
];
|
|
11530
|
+
FilterItemComponent.propDecorators = {
|
|
11531
|
+
collection: [{ type: Input }],
|
|
11532
|
+
placeholder: [{ type: Input }],
|
|
11533
|
+
initialLimit: [{ type: Input }],
|
|
11534
|
+
expanded: [{ type: Input }],
|
|
11535
|
+
minSearchCharsToLoadCollection: [{ type: Input }],
|
|
11536
|
+
collectionLoadFn: [{ type: Input }],
|
|
11537
|
+
customContent: [{ type: Input }],
|
|
11538
|
+
showAllResults: [{ type: Input }],
|
|
11539
|
+
singleSelect: [{ type: Input }],
|
|
11540
|
+
filterButtonLabel: [{ type: Input }],
|
|
11541
|
+
searchPlaceholder: [{ type: Input }],
|
|
11542
|
+
showMoreLabel: [{ type: Input }],
|
|
11543
|
+
showLessLabel: [{ type: Input }],
|
|
11544
|
+
noResultsLabel: [{ type: Input }],
|
|
11545
|
+
collectionChange: [{ type: Output }],
|
|
11546
|
+
filterButtonClicked: [{ type: Output }],
|
|
11547
|
+
showClass: [{ type: HostBinding, args: ["class.co-filter-item",] }]
|
|
11548
|
+
};
|
|
11549
|
+
|
|
11550
|
+
// A pipe for prepending strings to other strings in view templates.
|
|
11551
|
+
class PrependPipe {
|
|
11552
|
+
transform(value, prepend) {
|
|
11553
|
+
if (!value) {
|
|
11554
|
+
return "";
|
|
11555
|
+
}
|
|
11556
|
+
if (!prepend) {
|
|
11557
|
+
return value;
|
|
11558
|
+
}
|
|
11559
|
+
return prepend + value;
|
|
11560
|
+
}
|
|
11561
|
+
}
|
|
11562
|
+
PrependPipe.decorators = [
|
|
11563
|
+
{ type: Pipe, args: [{ name: "prepend" },] }
|
|
11564
|
+
];
|
|
11565
|
+
|
|
11566
|
+
class PrependPipeModule {
|
|
11567
|
+
}
|
|
11568
|
+
PrependPipeModule.decorators = [
|
|
11569
|
+
{ type: NgModule, args: [{
|
|
11570
|
+
declarations: [
|
|
11571
|
+
PrependPipe
|
|
11572
|
+
],
|
|
11573
|
+
exports: [
|
|
11574
|
+
PrependPipe
|
|
11575
|
+
]
|
|
11576
|
+
},] }
|
|
11577
|
+
];
|
|
11578
|
+
|
|
11579
|
+
class FilterItemModule {
|
|
11580
|
+
}
|
|
11581
|
+
FilterItemModule.decorators = [
|
|
11582
|
+
{ type: NgModule, args: [{
|
|
11583
|
+
imports: [
|
|
11584
|
+
CommonModule,
|
|
11585
|
+
CollapsibleModule,
|
|
11586
|
+
InputTextModule,
|
|
11587
|
+
InputCheckboxMultiSelectModule,
|
|
11588
|
+
InputCheckboxModule,
|
|
11589
|
+
IconModule,
|
|
11590
|
+
ScrollingModule,
|
|
11591
|
+
AppendPipeModule,
|
|
11592
|
+
PrependPipeModule,
|
|
11593
|
+
InputTextModule,
|
|
11594
|
+
InputRadioButtonModule,
|
|
11595
|
+
InputTextModule
|
|
11596
|
+
],
|
|
11597
|
+
declarations: [
|
|
11598
|
+
FilterItemComponent
|
|
11599
|
+
],
|
|
11600
|
+
exports: [
|
|
11601
|
+
FilterItemComponent
|
|
11602
|
+
]
|
|
11603
|
+
},] }
|
|
11604
|
+
];
|
|
11605
|
+
|
|
11210
11606
|
class TooltipComponent {
|
|
11211
11607
|
constructor(_elementRef, _changeDetector) {
|
|
11212
11608
|
this._elementRef = _elementRef;
|
|
@@ -11644,5 +12040,5 @@ ColorSequenceService.decorators = [
|
|
|
11644
12040
|
* Generated bundle index. Do not edit.
|
|
11645
12041
|
*/
|
|
11646
12042
|
|
|
11647
|
-
export { ArticleTileComponent, ArticleTileModule, ButtonComponent, ButtonDropDownComponent, ButtonDropDownModule, ButtonModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoGridComponent, CoGridModule, CoKanbanComponent, CoKanbanModule, CoOrientation, CoPivotComponent, CoPivotModule, CoScheduleComponent, CoScheduleModule, CoSidebarComponent, CoSidebarModule, CoToggleComponent, CoToggleModule, CollapsibleComponent, CollapsibleModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, DropDownListComponent, DropDownModule, FilterItemComponent, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputCheckboxMultiSelectComponent, InputCheckboxMultiSelectModule, InputComboBoxComponent, InputComboBoxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputListboxComponent, InputListboxModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, MultiSelectListComponent, MultiSelectListModule, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, showHideDialogAnimation, RippleModule as ɵa, MD_RIPPLE_GLOBAL_OPTIONS as ɵb, BaseSimpleGridComponent as ɵba, ObserveVisibilityDirective as ɵbb, PaginationService as ɵbc, PaginatePipe as ɵbd, SimpleGridCellComponent as ɵbe,
|
|
12043
|
+
export { ArticleTileComponent, ArticleTileModule, ButtonComponent, ButtonDropDownComponent, ButtonDropDownModule, ButtonModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoGridComponent, CoGridModule, CoKanbanComponent, CoKanbanModule, CoOrientation, CoPivotComponent, CoPivotModule, CoScheduleComponent, CoScheduleModule, CoSidebarComponent, CoSidebarModule, CoToggleComponent, CoToggleModule, CollapsibleComponent, CollapsibleModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, DropDownListComponent, DropDownModule, FilterItemComponent, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputCheckboxMultiSelectComponent, InputCheckboxMultiSelectModule, InputComboBoxComponent, InputComboBoxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputListboxComponent, InputListboxModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesMultiselectSearch, ListOfValuesMultiselectSearchModule, MultiSelectListComponent, MultiSelectListModule, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, showHideDialogAnimation, RippleModule as ɵa, MD_RIPPLE_GLOBAL_OPTIONS as ɵb, BaseSimpleGridComponent as ɵba, ObserveVisibilityDirective as ɵbb, PaginationService as ɵbc, PaginatePipe as ɵbd, SimpleGridCellComponent as ɵbe, ClickOutsideDirective as ɵbf, ClickOutsideMasterService as ɵbg, ListOfValuesPopupComponent as ɵbh, PrependPipeModule as ɵbi, PrependPipe as ɵbj, TooltipModule as ɵbk, TooltipComponent as ɵbl, TooltipDirective as ɵbm, CheckmarkOverlayComponent as ɵbn, ScreenConfigurationDirective as ɵbo, ScreenConfigComponentWrapper as ɵbp, CoRippleDirective as ɵc, CoViewportRulerService as ɵd, CoScrollDispatcherService as ɵe, CoScrollableDirective as ɵf, StopClickModule as ɵg, StopClickDirective as ɵh, InputBoolean as ɵi, BaseModule as ɵj, FormInputUserModelChangeListenerService as ɵk, NgZoneWrapperService as ɵl, BaseInputComponent as ɵm, BaseSelectionGridComponent as ɵn, BaseInlineEditGridComponent as ɵo, BaseToolbarGridComponent as ɵp, BaseGridComponent as ɵq, AppendPipeModule as ɵr, AppendPipe as ɵs, CommitButtonsModule as ɵt, CommitButtonsComponent as ɵu, ValidationErrorModule as ɵv, OverlayDirective as ɵw, OverlayParentDirective as ɵx, ValidationErrorComponent as ɵy, PopupShowerService as ɵz };
|
|
11648
12044
|
//# sourceMappingURL=colijnit-corecomponents_v12.js.map
|