brainloper-ui 1.0.3 → 1.0.4
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/public_api.mjs +2 -2
- package/esm2020/src/app/modules/brainloper-ui/brainloper-ui.module.mjs +2 -2
- package/esm2020/src/app/modules/brainloper-ui/components/combos/combos.component.mjs +151 -0
- package/fesm2015/brainloper-ui.mjs +10 -3
- package/fesm2015/brainloper-ui.mjs.map +1 -1
- package/fesm2020/brainloper-ui.mjs +10 -3
- package/fesm2020/brainloper-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
- package/src/app/modules/brainloper-ui/brainloper-ui.module.d.ts +1 -1
- package/src/app/modules/brainloper-ui/components/{buttons/combos → combos}/combos.component.d.ts +4 -2
- package/esm2020/src/app/modules/brainloper-ui/components/buttons/combos/combos.component.mjs +0 -144
|
@@ -535,6 +535,7 @@ class CombosComponent {
|
|
|
535
535
|
this.tooltipDescription = null;
|
|
536
536
|
this.tooltipActive = false;
|
|
537
537
|
this.changeOption = new EventEmitter();
|
|
538
|
+
this.changeOptionDataComplete = new EventEmitter();
|
|
538
539
|
this.returnDataCombo = new EventEmitter();
|
|
539
540
|
this.selected = new FormControl;
|
|
540
541
|
}
|
|
@@ -592,8 +593,13 @@ class CombosComponent {
|
|
|
592
593
|
});
|
|
593
594
|
}
|
|
594
595
|
selectedData($event) {
|
|
596
|
+
this.findData($event);
|
|
597
|
+
this.changeOption.emit($event.value);
|
|
598
|
+
}
|
|
599
|
+
findData($event) {
|
|
600
|
+
let d = this.dataCombos.find(x => x[this.configuration.selectionField] == $event.value);
|
|
601
|
+
this.changeOptionDataComplete.emit(d);
|
|
595
602
|
if (this.configuration.fileTooltip) {
|
|
596
|
-
let d = this.filteredList.find(x => x[this.configuration.selectionField] == $event.value);
|
|
597
603
|
if (d) {
|
|
598
604
|
this.tooltipDescription = d[this.configuration.fileTooltip];
|
|
599
605
|
this.tooltipActive = true;
|
|
@@ -609,7 +615,6 @@ class CombosComponent {
|
|
|
609
615
|
}
|
|
610
616
|
else
|
|
611
617
|
this.tooltipDescription = null;
|
|
612
|
-
this.changeOption.emit($event.value);
|
|
613
618
|
}
|
|
614
619
|
toggleTooltip() {
|
|
615
620
|
this.tooltipActive = !this.tooltipActive;
|
|
@@ -622,7 +627,7 @@ class CombosComponent {
|
|
|
622
627
|
}
|
|
623
628
|
}
|
|
624
629
|
CombosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CombosComponent, deps: [{ token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
625
|
-
CombosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: CombosComponent, selector: "combos", inputs: { dataCombos: "dataCombos", additionalData: "additionalData", configuration: "configuration", filter: "filter", checkbox: "checkbox", required: "required", disabled: "disabled", addFinal: "addFinal", appearance: "appearance", reloadCombo: "reloadCombo" }, outputs: { changeOption: "changeOption", returnDataCombo: "returnDataCombo" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div style=\"display: flex; flex-direction: row; justify-content: space-between\">\r\n <div class=\"combo-container\">\r\n\r\n <mat-icon\r\n class=\"m-1 icon-information\"\r\n *ngIf=\"tooltipDescription\"\r\n matTooltip=\"{{tooltipDescription}}\"\r\n matTooltipPosition=\"above\"\r\n #tooltip=\"matTooltip\"\r\n (click)=\"toggleTooltip()\"\r\n matTooltipClass=\"custom-tooltip\"\r\n >info</mat-icon>\r\n\r\n <mat-form-field style=\"width: 100%\" [appearance]=\"appearance\">\r\n <mat-label style=\"text-transform: capitalize\">{{\r\n configuration.label\r\n }}</mat-label>\r\n <mat-select [multiple]=\"checkbox\" (selectionChange)=\"selectedData(selected)\" [required]=\"required\"\r\n [formControl]=\"selected\" [disabled]=\"disabled\">\r\n <mat-select-filter *ngIf=\"filter\" [placeholder]=\"'Filter'\" [displayMember]=\"configuration.visibleField\"\r\n [array]=\"dataCombos\" (filteredReturn)=\"filteredList = $event\">\r\n </mat-select-filter>\r\n <mat-option [value]=\"data[configuration.selectionField]\" *ngFor=\"let data of filteredList\">\r\n {{ data[configuration.visibleField] }}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error *ngIf=\"required\">Campo requerido</mat-error>\r\n </mat-form-field>\r\n </div>\r\n</div>\r\n\r\n", styles: [".mat-form-field{width:100%}.combo-container{width:100%;display:flex;align-items:center}.icon-information{cursor:pointer;color:gray}.mat-icon{font-size:1.1rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatSelectFilterComponent, selector: "mat-select-filter", inputs: ["showSpinner", "noResultsMessage", "placeholder", "array", "color", "displayMember", "hasGroup", "groupArrayName"], outputs: ["filteredReturn"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i10.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }] });
|
|
630
|
+
CombosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: CombosComponent, selector: "combos", inputs: { dataCombos: "dataCombos", additionalData: "additionalData", configuration: "configuration", filter: "filter", checkbox: "checkbox", required: "required", disabled: "disabled", addFinal: "addFinal", appearance: "appearance", reloadCombo: "reloadCombo" }, outputs: { changeOption: "changeOption", changeOptionDataComplete: "changeOptionDataComplete", returnDataCombo: "returnDataCombo" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div style=\"display: flex; flex-direction: row; justify-content: space-between\">\r\n <div class=\"combo-container\">\r\n\r\n <mat-icon\r\n class=\"m-1 icon-information\"\r\n *ngIf=\"tooltipDescription\"\r\n matTooltip=\"{{tooltipDescription}}\"\r\n matTooltipPosition=\"above\"\r\n #tooltip=\"matTooltip\"\r\n (click)=\"toggleTooltip()\"\r\n matTooltipClass=\"custom-tooltip\"\r\n >info</mat-icon>\r\n\r\n <mat-form-field style=\"width: 100%\" [appearance]=\"appearance\">\r\n <mat-label style=\"text-transform: capitalize\">{{\r\n configuration.label\r\n }}</mat-label>\r\n <mat-select [multiple]=\"checkbox\" (selectionChange)=\"selectedData(selected)\" [required]=\"required\"\r\n [formControl]=\"selected\" [disabled]=\"disabled\">\r\n <mat-select-filter *ngIf=\"filter\" [placeholder]=\"'Filter'\" [displayMember]=\"configuration.visibleField\"\r\n [array]=\"dataCombos\" (filteredReturn)=\"filteredList = $event\">\r\n </mat-select-filter>\r\n <mat-option [value]=\"data[configuration.selectionField]\" *ngFor=\"let data of filteredList\">\r\n {{ data[configuration.visibleField] }}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error *ngIf=\"required\">Campo requerido</mat-error>\r\n </mat-form-field>\r\n </div>\r\n</div>\r\n\r\n", styles: [".mat-form-field{width:100%}.combo-container{width:100%;display:flex;align-items:center}.icon-information{cursor:pointer;color:gray}.mat-icon{font-size:1.1rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatSelectFilterComponent, selector: "mat-select-filter", inputs: ["showSpinner", "noResultsMessage", "placeholder", "array", "color", "displayMember", "hasGroup", "groupArrayName"], outputs: ["filteredReturn"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i10.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }] });
|
|
626
631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CombosComponent, decorators: [{
|
|
627
632
|
type: Component,
|
|
628
633
|
args: [{ selector: 'combos', template: "<div style=\"display: flex; flex-direction: row; justify-content: space-between\">\r\n <div class=\"combo-container\">\r\n\r\n <mat-icon\r\n class=\"m-1 icon-information\"\r\n *ngIf=\"tooltipDescription\"\r\n matTooltip=\"{{tooltipDescription}}\"\r\n matTooltipPosition=\"above\"\r\n #tooltip=\"matTooltip\"\r\n (click)=\"toggleTooltip()\"\r\n matTooltipClass=\"custom-tooltip\"\r\n >info</mat-icon>\r\n\r\n <mat-form-field style=\"width: 100%\" [appearance]=\"appearance\">\r\n <mat-label style=\"text-transform: capitalize\">{{\r\n configuration.label\r\n }}</mat-label>\r\n <mat-select [multiple]=\"checkbox\" (selectionChange)=\"selectedData(selected)\" [required]=\"required\"\r\n [formControl]=\"selected\" [disabled]=\"disabled\">\r\n <mat-select-filter *ngIf=\"filter\" [placeholder]=\"'Filter'\" [displayMember]=\"configuration.visibleField\"\r\n [array]=\"dataCombos\" (filteredReturn)=\"filteredList = $event\">\r\n </mat-select-filter>\r\n <mat-option [value]=\"data[configuration.selectionField]\" *ngFor=\"let data of filteredList\">\r\n {{ data[configuration.visibleField] }}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error *ngIf=\"required\">Campo requerido</mat-error>\r\n </mat-form-field>\r\n </div>\r\n</div>\r\n\r\n", styles: [".mat-form-field{width:100%}.combo-container{width:100%;display:flex;align-items:center}.icon-information{cursor:pointer;color:gray}.mat-icon{font-size:1.1rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}\n"] }]
|
|
@@ -651,6 +656,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
651
656
|
args: ['tooltip']
|
|
652
657
|
}], changeOption: [{
|
|
653
658
|
type: Output
|
|
659
|
+
}], changeOptionDataComplete: [{
|
|
660
|
+
type: Output
|
|
654
661
|
}], returnDataCombo: [{
|
|
655
662
|
type: Output
|
|
656
663
|
}] } });
|