brainloper-ui 14.0.30 → 14.0.32
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/brainloper-ui.mjs +4 -4
- package/esm2020/public_api.mjs +55 -55
- package/esm2020/src/app/modules/brainloper-ui/brainloper-ui.module.mjs +309 -309
- package/esm2020/src/app/modules/brainloper-ui/components/bread-crumb/bread-crumb.component.mjs +28 -28
- package/esm2020/src/app/modules/brainloper-ui/components/buttons/button-icon/button-icon.component.mjs +22 -22
- package/esm2020/src/app/modules/brainloper-ui/components/buttons/button-label/button-label.component.mjs +82 -82
- package/esm2020/src/app/modules/brainloper-ui/components/carousel/carousel.component.mjs +36 -36
- package/esm2020/src/app/modules/brainloper-ui/components/combos/combos.component.mjs +175 -175
- package/esm2020/src/app/modules/brainloper-ui/components/data-table/data-table.component.mjs +728 -719
- package/esm2020/src/app/modules/brainloper-ui/components/data-table/table-modal/table-modal.component.mjs +117 -117
- package/esm2020/src/app/modules/brainloper-ui/components/file-input/file-input.component.mjs +186 -185
- package/esm2020/src/app/modules/brainloper-ui/components/file-input/imagenes/doc.mjs +1 -1
- package/esm2020/src/app/modules/brainloper-ui/components/file-input/imagenes/fondoTransparente.mjs +1 -1
- package/esm2020/src/app/modules/brainloper-ui/components/file-input/imagenes/pdf.mjs +1 -1
- package/esm2020/src/app/modules/brainloper-ui/components/filters/filters.component.mjs +221 -221
- package/esm2020/src/app/modules/brainloper-ui/components/report/generate-pdf/generate-pdf.component.mjs +79 -79
- package/esm2020/src/app/modules/brainloper-ui/components/report/template-fuel/template-fuel.component.mjs +80 -80
- package/esm2020/src/app/modules/brainloper-ui/components/select-filter/select-filter.component.mjs +107 -107
- package/esm2020/src/app/modules/directives/carousel-item.directive.mjs +17 -17
- package/esm2020/src/app/modules/interfaces/buttons/button-icon.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/buttons/button-lavel-edit.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/combos/combos-configuration.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/data-table/params.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/data-table/rules.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/data-table/table-columns.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/data-table/table-configuration.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/enum/enumActions.mjs +7 -7
- package/esm2020/src/app/modules/interfaces/enum/enumRules.mjs +7 -7
- package/esm2020/src/app/modules/interfaces/file-forms-service/file-forms-params.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/file-forms-service/file-input-params.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/filters/header-filters.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/menu-break-crumb/menu-break-crumb.mjs +7 -7
- package/esm2020/src/app/modules/interfaces/report/template-pdf-ot.mjs +1 -1
- package/esm2020/src/app/modules/interfaces/report/template-pfd-fo.mjs +1 -1
- package/esm2020/src/app/modules/services/crypto.service.mjs +36 -36
- package/esm2020/src/app/modules/services/export-data.service.mjs +166 -166
- package/esm2020/src/app/modules/services/file-forms.service.mjs +23 -23
- package/esm2020/src/app/modules/services/functions.service.mjs +53 -53
- package/esm2020/src/app/modules/services/generate-pdf.service.mjs +57 -57
- package/esm2020/src/app/modules/services/http.service.mjs +96 -96
- package/esm2020/src/app/modules/services/loading/loading.component.mjs +27 -27
- package/esm2020/src/app/modules/services/local-storage.service.mjs +114 -114
- package/esm2020/src/app/modules/services/message.service.mjs +199 -199
- package/esm2020/src/app/modules/services/screen-size-util.mjs +5 -5
- package/esm2020/src/app/modules/services/session.service.mjs +41 -41
- package/fesm2015/brainloper-ui.mjs +2809 -2799
- package/fesm2015/brainloper-ui.mjs.map +1 -1
- package/fesm2020/brainloper-ui.mjs +2769 -2759
- package/fesm2020/brainloper-ui.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +55 -55
- package/src/app/modules/brainloper-ui/brainloper-ui.module.d.ts +74 -74
- package/src/app/modules/brainloper-ui/components/bread-crumb/bread-crumb.component.d.ts +13 -13
- package/src/app/modules/brainloper-ui/components/buttons/button-icon/button-icon.component.d.ts +10 -10
- package/src/app/modules/brainloper-ui/components/buttons/button-label/button-label.component.d.ts +24 -24
- package/src/app/modules/brainloper-ui/components/carousel/carousel.component.d.ts +15 -15
- package/src/app/modules/brainloper-ui/components/combos/combos.component.d.ts +46 -46
- package/src/app/modules/brainloper-ui/components/data-table/data-table.component.d.ts +125 -125
- package/src/app/modules/brainloper-ui/components/data-table/table-modal/table-modal.component.d.ts +21 -21
- package/src/app/modules/brainloper-ui/components/file-input/file-input.component.d.ts +42 -42
- package/src/app/modules/brainloper-ui/components/file-input/imagenes/doc.d.ts +2 -2
- package/src/app/modules/brainloper-ui/components/file-input/imagenes/fondoTransparente.d.ts +2 -2
- package/src/app/modules/brainloper-ui/components/file-input/imagenes/pdf.d.ts +2 -2
- package/src/app/modules/brainloper-ui/components/filters/filters.component.d.ts +30 -30
- package/src/app/modules/brainloper-ui/components/report/generate-pdf/generate-pdf.component.d.ts +35 -35
- package/src/app/modules/brainloper-ui/components/report/template-fuel/template-fuel.component.d.ts +36 -36
- package/src/app/modules/brainloper-ui/components/select-filter/select-filter.component.d.ts +26 -26
- package/src/app/modules/directives/carousel-item.directive.d.ts +9 -9
- package/src/app/modules/interfaces/buttons/button-icon.d.ts +9 -9
- package/src/app/modules/interfaces/buttons/button-lavel-edit.d.ts +6 -6
- package/src/app/modules/interfaces/combos/combos-configuration.d.ts +13 -13
- package/src/app/modules/interfaces/data-table/params.d.ts +7 -7
- package/src/app/modules/interfaces/data-table/rules.d.ts +8 -8
- package/src/app/modules/interfaces/data-table/table-columns.d.ts +25 -25
- package/src/app/modules/interfaces/data-table/table-configuration.d.ts +26 -26
- package/src/app/modules/interfaces/enum/enumActions.d.ts +6 -6
- package/src/app/modules/interfaces/enum/enumRules.d.ts +6 -6
- package/src/app/modules/interfaces/file-forms-service/file-forms-params.d.ts +4 -4
- package/src/app/modules/interfaces/file-forms-service/file-input-params.d.ts +13 -13
- package/src/app/modules/interfaces/filters/header-filters.d.ts +13 -13
- package/src/app/modules/interfaces/menu-break-crumb/menu-break-crumb.d.ts +10 -10
- package/src/app/modules/interfaces/report/template-pdf-ot.d.ts +19 -19
- package/src/app/modules/interfaces/report/template-pfd-fo.d.ts +20 -20
- package/src/app/modules/services/crypto.service.d.ts +10 -10
- package/src/app/modules/services/export-data.service.d.ts +18 -18
- package/src/app/modules/services/file-forms.service.d.ts +7 -7
- package/src/app/modules/services/functions.service.d.ts +13 -13
- package/src/app/modules/services/generate-pdf.service.d.ts +12 -12
- package/src/app/modules/services/http.service.d.ts +22 -22
- package/src/app/modules/services/loading/loading.component.d.ts +15 -15
- package/src/app/modules/services/local-storage.service.d.ts +49 -49
- package/src/app/modules/services/message.service.d.ts +23 -23
- package/src/app/modules/services/screen-size-util.d.ts +3 -3
- package/src/app/modules/services/session.service.d.ts +14 -14
package/esm2020/src/app/modules/brainloper-ui/components/bread-crumb/bread-crumb.component.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/router";
|
|
4
|
-
import * as i2 from "@angular/common";
|
|
5
|
-
export class BreadCrumbComponent {
|
|
6
|
-
constructor(router) {
|
|
7
|
-
this.router = router;
|
|
8
|
-
this.menu = [];
|
|
9
|
-
this.selectRouter = new EventEmitter();
|
|
10
|
-
}
|
|
11
|
-
ngOnInit() {
|
|
12
|
-
}
|
|
13
|
-
handlerRouter(menu) {
|
|
14
|
-
if (menu.router != null)
|
|
15
|
-
this.router.navigate([menu.router]);
|
|
16
|
-
this.selectRouter.emit(menu);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
BreadCrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BreadCrumbComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
BreadCrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BreadCrumbComponent, selector: "app-bread-crumb", inputs: { menu: "menu" }, outputs: { selectRouter: "selectRouter" }, ngImport: i0, template: "<div aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb\">\n <li *ngFor=\"let m of menu\" [class]=\"m.current?'active':''\" class=\"breadcrumb-item\" (click)=\"handlerRouter(m)\">{{m.name}}</li>\n </ol>\n</div>\n", styles: [".breadcrumb-item{cursor:pointer}.breadcrumb{background-color:#b7b9bb!important;padding:10px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BreadCrumbComponent, decorators: [{
|
|
22
|
-
type: Component,
|
|
23
|
-
args: [{ selector: 'app-bread-crumb', template: "<div aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb\">\n <li *ngFor=\"let m of menu\" [class]=\"m.current?'active':''\" class=\"breadcrumb-item\" (click)=\"handlerRouter(m)\">{{m.name}}</li>\n </ol>\n</div>\n", styles: [".breadcrumb-item{cursor:pointer}.breadcrumb{background-color:#b7b9bb!important;padding:10px}\n"] }]
|
|
24
|
-
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { menu: [{
|
|
25
|
-
type: Input
|
|
26
|
-
}], selectRouter: [{
|
|
27
|
-
type: Output
|
|
28
|
-
}] } });
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/router";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
export class BreadCrumbComponent {
|
|
6
|
+
constructor(router) {
|
|
7
|
+
this.router = router;
|
|
8
|
+
this.menu = [];
|
|
9
|
+
this.selectRouter = new EventEmitter();
|
|
10
|
+
}
|
|
11
|
+
ngOnInit() {
|
|
12
|
+
}
|
|
13
|
+
handlerRouter(menu) {
|
|
14
|
+
if (menu.router != null)
|
|
15
|
+
this.router.navigate([menu.router]);
|
|
16
|
+
this.selectRouter.emit(menu);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
BreadCrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BreadCrumbComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
BreadCrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BreadCrumbComponent, selector: "app-bread-crumb", inputs: { menu: "menu" }, outputs: { selectRouter: "selectRouter" }, ngImport: i0, template: "<div aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb\">\n <li *ngFor=\"let m of menu\" [class]=\"m.current?'active':''\" class=\"breadcrumb-item\" (click)=\"handlerRouter(m)\">{{m.name}}</li>\n </ol>\n</div>\n", styles: [".breadcrumb-item{cursor:pointer}.breadcrumb{background-color:#b7b9bb!important;padding:10px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BreadCrumbComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ selector: 'app-bread-crumb', template: "<div aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb\">\n <li *ngFor=\"let m of menu\" [class]=\"m.current?'active':''\" class=\"breadcrumb-item\" (click)=\"handlerRouter(m)\">{{m.name}}</li>\n </ol>\n</div>\n", styles: [".breadcrumb-item{cursor:pointer}.breadcrumb{background-color:#b7b9bb!important;padding:10px}\n"] }]
|
|
24
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { menu: [{
|
|
25
|
+
type: Input
|
|
26
|
+
}], selectRouter: [{
|
|
27
|
+
type: Output
|
|
28
|
+
}] } });
|
|
29
29
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWQtY3J1bWIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL2JyYWlubG9wZXItdWkvY29tcG9uZW50cy9icmVhZC1jcnVtYi9icmVhZC1jcnVtYi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvYnJhaW5sb3Blci11aS9jb21wb25lbnRzL2JyZWFkLWNydW1iL2JyZWFkLWNydW1iLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7QUFRL0UsTUFBTSxPQUFPLG1CQUFtQjtJQUk5QixZQUNTLE1BQWU7UUFBZixXQUFNLEdBQU4sTUFBTSxDQUFTO1FBSmYsU0FBSSxHQUFjLEVBQUUsQ0FBQTtRQUNuQixpQkFBWSxHQUFHLElBQUksWUFBWSxFQUFPLENBQUM7SUFJN0MsQ0FBQztJQUVMLFFBQVE7SUFDUixDQUFDO0lBRU0sYUFBYSxDQUFDLElBQVE7UUFDM0IsSUFBRyxJQUFJLENBQUMsTUFBTSxJQUFJLElBQUk7WUFBRSxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFBO1FB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GlzLnNlbGVjdFJvdXRlci5lbWl0KG1lbnUpXG4gIH1cblxufVxuXG5cblxuIiwiPGRpdiBhcmlhLWxhYmVsPVwiYnJlYWRjcnVtYlwiPlxuICA8b2wgY2xhc3M9XCJicmVhZGNydW1iXCI+XG4gICAgICA8bGkgKm5nRm9yPVwibGV0IG0gb2YgbWVudVwiIFtjbGFzc109XCJtLmN1cnJlbnQ/J2FjdGl2ZSc6JydcIiBjbGFzcz1cImJyZWFkY3J1bWItaXRlbVwiIChjbGljayk9XCJoYW5kbGVyUm91dGVyKG0pXCI+e3ttLm5hbWV9fTwvbGk+XG4gIDwvb2w+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
import * as i2 from "@angular/material/core";
|
|
5
|
-
import * as i3 from "@angular/material/tooltip";
|
|
6
|
-
export class ButtonIconComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.clickButton = new EventEmitter();
|
|
9
|
-
}
|
|
10
|
-
ngOnInit() {
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
ButtonIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
-
ButtonIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonIconComponent, selector: "app-button-icon", inputs: { items: "items" }, outputs: { clickButton: "clickButton" }, ngImport: i0, template: "<div style=\"height: 100%\" class=\"d-flex flex-wrap justify-content-around align-items-center\">\n <div *ngFor=\"let item of items\" [class]=\"items.length > 6 ? 'col-3' : 'col-4'\">\n <div *ngIf=\"item.active\" class=\"icon-menu\" matTooltip=\"{{ item.description }}\" matTooltipPosition=\"above\" matTooltipClass=\"custom-tooltip\">\n <button style=\"border: none; background: transparent\">\n <div [class]=\"'icon mat-elevation-z6'\" [style.background]=\"item.color\" matRipple (click)=\"clickButton.emit(item)\">\n <i [class]=\"'fa iconFa fa-' + item.icon\" [style.color]=\"item.iconColor ?? 'white'\"></i>\n </div>\n </button>\n <div>\n <h3 style=\"text-align: center; line-height: 20px\">{{ item.name }}</h3>\n </div>\n </div>\n </div>\n</div>\n\n\n\n", styles: ["div.icon-menu{display:flex;align-items:center;flex-direction:column}div.icon{width:120px;background-color:#fff;height:120px;border-radius:22px;cursor:pointer;display:flex;justify-content:center;align-items:center}.iconFa{width:70px;height:70px}font{font-size:.6rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}@media screen and (max-height: 360px){div.icon{width:90px;height:90px;border-radius:18px}.iconFa{width:50px;height:50px}h3{font-size:70%}}@media screen and (max-width: 360px){div.icon{width:80px;height:80px;border-radius:20px}.iconFa{width:50px;height:50px}h3{font-size:70%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonIconComponent, decorators: [{
|
|
16
|
-
type: Component,
|
|
17
|
-
args: [{ selector: 'app-button-icon', template: "<div style=\"height: 100%\" class=\"d-flex flex-wrap justify-content-around align-items-center\">\n <div *ngFor=\"let item of items\" [class]=\"items.length > 6 ? 'col-3' : 'col-4'\">\n <div *ngIf=\"item.active\" class=\"icon-menu\" matTooltip=\"{{ item.description }}\" matTooltipPosition=\"above\" matTooltipClass=\"custom-tooltip\">\n <button style=\"border: none; background: transparent\">\n <div [class]=\"'icon mat-elevation-z6'\" [style.background]=\"item.color\" matRipple (click)=\"clickButton.emit(item)\">\n <i [class]=\"'fa iconFa fa-' + item.icon\" [style.color]=\"item.iconColor ?? 'white'\"></i>\n </div>\n </button>\n <div>\n <h3 style=\"text-align: center; line-height: 20px\">{{ item.name }}</h3>\n </div>\n </div>\n </div>\n</div>\n\n\n\n", styles: ["div.icon-menu{display:flex;align-items:center;flex-direction:column}div.icon{width:120px;background-color:#fff;height:120px;border-radius:22px;cursor:pointer;display:flex;justify-content:center;align-items:center}.iconFa{width:70px;height:70px}font{font-size:.6rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}@media screen and (max-height: 360px){div.icon{width:90px;height:90px;border-radius:18px}.iconFa{width:50px;height:50px}h3{font-size:70%}}@media screen and (max-width: 360px){div.icon{width:80px;height:80px;border-radius:20px}.iconFa{width:50px;height:50px}h3{font-size:70%}}\n"] }]
|
|
18
|
-
}], ctorParameters: function () { return []; }, propDecorators: { clickButton: [{
|
|
19
|
-
type: Output
|
|
20
|
-
}], items: [{
|
|
21
|
-
type: Input
|
|
22
|
-
}] } });
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "@angular/material/core";
|
|
5
|
+
import * as i3 from "@angular/material/tooltip";
|
|
6
|
+
export class ButtonIconComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.clickButton = new EventEmitter();
|
|
9
|
+
}
|
|
10
|
+
ngOnInit() {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
ButtonIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
ButtonIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonIconComponent, selector: "app-button-icon", inputs: { items: "items" }, outputs: { clickButton: "clickButton" }, ngImport: i0, template: "<div style=\"height: 100%\" class=\"d-flex flex-wrap justify-content-around align-items-center\">\n <div *ngFor=\"let item of items\" [class]=\"items.length > 6 ? 'col-3' : 'col-4'\">\n <div *ngIf=\"item.active\" class=\"icon-menu\" matTooltip=\"{{ item.description }}\" matTooltipPosition=\"above\" matTooltipClass=\"custom-tooltip\">\n <button style=\"border: none; background: transparent\">\n <div [class]=\"'icon mat-elevation-z6'\" [style.background]=\"item.color\" matRipple (click)=\"clickButton.emit(item)\">\n <i [class]=\"'fa iconFa fa-' + item.icon\" [style.color]=\"item.iconColor ?? 'white'\"></i>\n </div>\n </button>\n <div>\n <h3 style=\"text-align: center; line-height: 20px\">{{ item.name }}</h3>\n </div>\n </div>\n </div>\n</div>\n\n\n\n", styles: ["div.icon-menu{display:flex;align-items:center;flex-direction:column}div.icon{width:120px;background-color:#fff;height:120px;border-radius:22px;cursor:pointer;display:flex;justify-content:center;align-items:center}.iconFa{width:70px;height:70px}font{font-size:.6rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}@media screen and (max-height: 360px){div.icon{width:90px;height:90px;border-radius:18px}.iconFa{width:50px;height:50px}h3{font-size:70%}}@media screen and (max-width: 360px){div.icon{width:80px;height:80px;border-radius:20px}.iconFa{width:50px;height:50px}h3{font-size:70%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonIconComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'app-button-icon', template: "<div style=\"height: 100%\" class=\"d-flex flex-wrap justify-content-around align-items-center\">\n <div *ngFor=\"let item of items\" [class]=\"items.length > 6 ? 'col-3' : 'col-4'\">\n <div *ngIf=\"item.active\" class=\"icon-menu\" matTooltip=\"{{ item.description }}\" matTooltipPosition=\"above\" matTooltipClass=\"custom-tooltip\">\n <button style=\"border: none; background: transparent\">\n <div [class]=\"'icon mat-elevation-z6'\" [style.background]=\"item.color\" matRipple (click)=\"clickButton.emit(item)\">\n <i [class]=\"'fa iconFa fa-' + item.icon\" [style.color]=\"item.iconColor ?? 'white'\"></i>\n </div>\n </button>\n <div>\n <h3 style=\"text-align: center; line-height: 20px\">{{ item.name }}</h3>\n </div>\n </div>\n </div>\n</div>\n\n\n\n", styles: ["div.icon-menu{display:flex;align-items:center;flex-direction:column}div.icon{width:120px;background-color:#fff;height:120px;border-radius:22px;cursor:pointer;display:flex;justify-content:center;align-items:center}.iconFa{width:70px;height:70px}font{font-size:.6rem}::ng-deep .custom-tooltip{background-color:#fbe870!important;color:#000!important;line-height:17px!important;font-size:.8rem}@media screen and (max-height: 360px){div.icon{width:90px;height:90px;border-radius:18px}.iconFa{width:50px;height:50px}h3{font-size:70%}}@media screen and (max-width: 360px){div.icon{width:80px;height:80px;border-radius:20px}.iconFa{width:50px;height:50px}h3{font-size:70%}}\n"] }]
|
|
18
|
+
}], ctorParameters: function () { return []; }, propDecorators: { clickButton: [{
|
|
19
|
+
type: Output
|
|
20
|
+
}], items: [{
|
|
21
|
+
type: Input
|
|
22
|
+
}] } });
|
|
23
23
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWljb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL2JyYWlubG9wZXItdWkvY29tcG9uZW50cy9idXR0b25zL2J1dHRvbi1pY29uL2J1dHRvbi1pY29uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9icmFpbmxvcGVyLXVpL2NvbXBvbmVudHMvYnV0dG9ucy9idXR0b24taWNvbi9idXR0b24taWNvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7OztBQU8vRSxNQUFNLE9BQU8sbUJBQW1CO0lBSzlCO1FBSFUsZ0JBQVcsR0FBRyxJQUFJLFlBQVksRUFBTyxDQUFBO0lBRy9CLENBQUM7SUFFakIsUUFBUTtJQUNSLENBQUM7O2dIQVJVLG1CQUFtQjtvR0FBbkIsbUJBQW1CLDRIQ1BoQyxrekJBaUJBOzJGRFZhLG1CQUFtQjtrQkFML0IsU0FBUzsrQkFDRSxpQkFBaUI7MEVBTWpCLFdBQVc7c0JBQXBCLE1BQU07Z0JBQ0UsS0FBSztzQkFBYixLQUFLIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBFdmVudEVtaXR0ZXIsIElucHV0LCBPbkluaXQsIE91dHB1dCB9IGZyb20gJ0Bhbmd1bGFyL2Nv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5bGUuYmFja2dyb3VuZF09XCJpdGVtLmNvbG9yXCIgbWF0UmlwcGxlIChjbGljayk9XCJjbGlja0J1dHRvbi5lbWl0KGl0ZW0pXCI+XG4gICAgICAgICAgPGkgW2NsYXNzXT1cIidmYSBpY29uRmEgZmEtJyArIGl0ZW0uaWNvblwiIFtzdHlsZS5jb2xvcl09XCJpdGVtLmljb25Db2xvciA/PyAnd2hpdGUnXCI+PC9pPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvYnV0dG9uPlxuICAgICAgPGRpdj5cbiAgICAgICAgPGgzIHN0eWxlPVwidGV4dC1hbGlnbjogY2VudGVyOyBsaW5lLWhlaWdodDogMjBweFwiPnt7IGl0ZW0ubmFtZSB9fTwvaDM+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L2Rpdj5cblxuXG5cbiJdfQ==
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
import * as i2 from "@angular/material/icon";
|
|
5
|
-
import * as i3 from "@angular/material/input";
|
|
6
|
-
import * as i4 from "@angular/material/tooltip";
|
|
7
|
-
import * as i5 from "@angular/forms";
|
|
8
|
-
export class ButtonLabelComponent {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.updateLabel = new EventEmitter();
|
|
11
|
-
this.labels = [];
|
|
12
|
-
this.labelsEdit = [];
|
|
13
|
-
this.color = null;
|
|
14
|
-
this.iconColor = null;
|
|
15
|
-
this.modeEdit = [];
|
|
16
|
-
this.currentValueToEdit = "";
|
|
17
|
-
this.indexToedit = -1;
|
|
18
|
-
this.initEventClink = false;
|
|
19
|
-
}
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
}
|
|
22
|
-
ngOnChanges(changes) {
|
|
23
|
-
if (changes) {
|
|
24
|
-
if (changes.labelsEdit && !this.initEventClink && this.labelsEdit.length > 0 && this.labelsEdit.find(x => x.edit == true)) {
|
|
25
|
-
document.addEventListener('click', ($event) => this.onPageClick($event));
|
|
26
|
-
this.initEventClink = true;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
finishEditLabel(index) {
|
|
31
|
-
this.labelsEdit[index].value = this.currentValueToEdit;
|
|
32
|
-
this.modeEdit[index] = false;
|
|
33
|
-
this.updateLabel.emit({
|
|
34
|
-
value: this.labelsEdit[index].value,
|
|
35
|
-
labels: this.labelsEdit[index].label,
|
|
36
|
-
position: index
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
editLabel(index) {
|
|
40
|
-
this.spanElement = document.getElementById('button-edit-' + index);
|
|
41
|
-
this.currentValueToEdit = this.labelsEdit[index].value;
|
|
42
|
-
this.modeEdit[index] = true;
|
|
43
|
-
this.indexToedit = index;
|
|
44
|
-
}
|
|
45
|
-
onPageClick($event) {
|
|
46
|
-
if (!ButtonLabelComponent.isDescendant($event.target, this.spanElement) && this.modeEdit) {
|
|
47
|
-
for (let [index, value] of this.modeEdit.entries()) {
|
|
48
|
-
this.modeEdit[index] = this.indexToedit == index ? true : false;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
this.indexToedit = -1;
|
|
52
|
-
}
|
|
53
|
-
static isDescendant(child, parent) {
|
|
54
|
-
let node = child.parentNode;
|
|
55
|
-
while (node != null) {
|
|
56
|
-
if (node === parent) {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
node = node.parentNode;
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
ngOnDestroy() {
|
|
64
|
-
document.removeEventListener('click', ($event) => this.onPageClick($event));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
ButtonLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
-
ButtonLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonLabelComponent, selector: "app-button-label", inputs: { labels: "labels", labelsEdit: "labelsEdit", color: "color", iconColor: "iconColor" }, outputs: { updateLabel: "updateLabel" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"labels\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labels;\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\">\n {{item}}\n </h4>\n </div>\n</div>\n\n<div *ngIf=\"labelsEdit\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labelsEdit; let i = index\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\" [id]=\"'button-edit-' + i\">\n <h6 *ngIf=\"item.label\" class=\"mr-1 font-weight-bold m-0\">{{item.label}} </h6>\n <div *ngIf=\"!modeEdit[i]\">{{item.value}}</div>\n <div class=\"cursor-pointer\" (click)='editLabel(i)' *ngIf=\"!modeEdit[i] && item.edit\" matTooltip=\"Editar\" matTooltipPosition=\"above\">\n <mat-icon class=\"ml-1 pencil-edit cursor-pointer\" matTooltip=\"Editar\" matTooltipPosition=\"above\" [style.color]=\"iconColor\">edit</mat-icon>\n </div>\n\n <input *ngIf=\"modeEdit[i] && item.edit\" type=\"text\" [(ngModel)]='currentValueToEdit' matInput placeholder=\"Filtrar\">\n\n <div class=\"cursor-pointer\" (click)='finishEditLabel(i)' *ngIf=\"modeEdit[i] && item.edit\" matTooltip=\"Aceptar\" matTooltipPosition=\"above\">\n <i class=\"fa fa-check btn-accion\" style=\"margin-left: 15px;\"></i>\n </div>\n\n </h4>\n </div>\n</div>\n", styles: [".label-text{padding:5px;margin:5px 10px;border-radius:10px;-webkit-text-decoration:center;text-decoration:center;font-weight:500}.pencil-edit{font-size:16px;display:flex;align-items:center;justify-content:center}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonLabelComponent, decorators: [{
|
|
70
|
-
type: Component,
|
|
71
|
-
args: [{ selector: 'app-button-label', template: "<div *ngIf=\"labels\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labels;\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\">\n {{item}}\n </h4>\n </div>\n</div>\n\n<div *ngIf=\"labelsEdit\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labelsEdit; let i = index\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\" [id]=\"'button-edit-' + i\">\n <h6 *ngIf=\"item.label\" class=\"mr-1 font-weight-bold m-0\">{{item.label}} </h6>\n <div *ngIf=\"!modeEdit[i]\">{{item.value}}</div>\n <div class=\"cursor-pointer\" (click)='editLabel(i)' *ngIf=\"!modeEdit[i] && item.edit\" matTooltip=\"Editar\" matTooltipPosition=\"above\">\n <mat-icon class=\"ml-1 pencil-edit cursor-pointer\" matTooltip=\"Editar\" matTooltipPosition=\"above\" [style.color]=\"iconColor\">edit</mat-icon>\n </div>\n\n <input *ngIf=\"modeEdit[i] && item.edit\" type=\"text\" [(ngModel)]='currentValueToEdit' matInput placeholder=\"Filtrar\">\n\n <div class=\"cursor-pointer\" (click)='finishEditLabel(i)' *ngIf=\"modeEdit[i] && item.edit\" matTooltip=\"Aceptar\" matTooltipPosition=\"above\">\n <i class=\"fa fa-check btn-accion\" style=\"margin-left: 15px;\"></i>\n </div>\n\n </h4>\n </div>\n</div>\n", styles: [".label-text{padding:5px;margin:5px 10px;border-radius:10px;-webkit-text-decoration:center;text-decoration:center;font-weight:500}.pencil-edit{font-size:16px;display:flex;align-items:center;justify-content:center}.cursor-pointer{cursor:pointer}\n"] }]
|
|
72
|
-
}], ctorParameters: function () { return []; }, propDecorators: { updateLabel: [{
|
|
73
|
-
type: Output
|
|
74
|
-
}], labels: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], labelsEdit: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], color: [{
|
|
79
|
-
type: Input
|
|
80
|
-
}], iconColor: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}] } });
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "@angular/material/icon";
|
|
5
|
+
import * as i3 from "@angular/material/input";
|
|
6
|
+
import * as i4 from "@angular/material/tooltip";
|
|
7
|
+
import * as i5 from "@angular/forms";
|
|
8
|
+
export class ButtonLabelComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.updateLabel = new EventEmitter();
|
|
11
|
+
this.labels = [];
|
|
12
|
+
this.labelsEdit = [];
|
|
13
|
+
this.color = null;
|
|
14
|
+
this.iconColor = null;
|
|
15
|
+
this.modeEdit = [];
|
|
16
|
+
this.currentValueToEdit = "";
|
|
17
|
+
this.indexToedit = -1;
|
|
18
|
+
this.initEventClink = false;
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
}
|
|
22
|
+
ngOnChanges(changes) {
|
|
23
|
+
if (changes) {
|
|
24
|
+
if (changes.labelsEdit && !this.initEventClink && this.labelsEdit.length > 0 && this.labelsEdit.find(x => x.edit == true)) {
|
|
25
|
+
document.addEventListener('click', ($event) => this.onPageClick($event));
|
|
26
|
+
this.initEventClink = true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
finishEditLabel(index) {
|
|
31
|
+
this.labelsEdit[index].value = this.currentValueToEdit;
|
|
32
|
+
this.modeEdit[index] = false;
|
|
33
|
+
this.updateLabel.emit({
|
|
34
|
+
value: this.labelsEdit[index].value,
|
|
35
|
+
labels: this.labelsEdit[index].label,
|
|
36
|
+
position: index
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
editLabel(index) {
|
|
40
|
+
this.spanElement = document.getElementById('button-edit-' + index);
|
|
41
|
+
this.currentValueToEdit = this.labelsEdit[index].value;
|
|
42
|
+
this.modeEdit[index] = true;
|
|
43
|
+
this.indexToedit = index;
|
|
44
|
+
}
|
|
45
|
+
onPageClick($event) {
|
|
46
|
+
if (!ButtonLabelComponent.isDescendant($event.target, this.spanElement) && this.modeEdit) {
|
|
47
|
+
for (let [index, value] of this.modeEdit.entries()) {
|
|
48
|
+
this.modeEdit[index] = this.indexToedit == index ? true : false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
this.indexToedit = -1;
|
|
52
|
+
}
|
|
53
|
+
static isDescendant(child, parent) {
|
|
54
|
+
let node = child.parentNode;
|
|
55
|
+
while (node != null) {
|
|
56
|
+
if (node === parent) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
node = node.parentNode;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
ngOnDestroy() {
|
|
64
|
+
document.removeEventListener('click', ($event) => this.onPageClick($event));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
ButtonLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
ButtonLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonLabelComponent, selector: "app-button-label", inputs: { labels: "labels", labelsEdit: "labelsEdit", color: "color", iconColor: "iconColor" }, outputs: { updateLabel: "updateLabel" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"labels\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labels;\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\">\n {{item}}\n </h4>\n </div>\n</div>\n\n<div *ngIf=\"labelsEdit\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labelsEdit; let i = index\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\" [id]=\"'button-edit-' + i\">\n <h6 *ngIf=\"item.label\" class=\"mr-1 font-weight-bold m-0\">{{item.label}} </h6>\n <div *ngIf=\"!modeEdit[i]\">{{item.value}}</div>\n <div class=\"cursor-pointer\" (click)='editLabel(i)' *ngIf=\"!modeEdit[i] && item.edit\" matTooltip=\"Editar\" matTooltipPosition=\"above\">\n <mat-icon class=\"ml-1 pencil-edit cursor-pointer\" matTooltip=\"Editar\" matTooltipPosition=\"above\" [style.color]=\"iconColor\">edit</mat-icon>\n </div>\n\n <input *ngIf=\"modeEdit[i] && item.edit\" type=\"text\" [(ngModel)]='currentValueToEdit' matInput placeholder=\"Filtrar\">\n\n <div class=\"cursor-pointer\" (click)='finishEditLabel(i)' *ngIf=\"modeEdit[i] && item.edit\" matTooltip=\"Aceptar\" matTooltipPosition=\"above\">\n <i class=\"fa fa-check btn-accion\" style=\"margin-left: 15px;\"></i>\n </div>\n\n </h4>\n </div>\n</div>\n", styles: [".label-text{padding:5px;margin:5px 10px;border-radius:10px;-webkit-text-decoration:center;text-decoration:center;font-weight:500}.pencil-edit{font-size:16px;display:flex;align-items:center;justify-content:center}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonLabelComponent, decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{ selector: 'app-button-label', template: "<div *ngIf=\"labels\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labels;\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\">\n {{item}}\n </h4>\n </div>\n</div>\n\n<div *ngIf=\"labelsEdit\" class=\"d-flex justify-content-center my-3 flex-wrap\">\n <div *ngFor=\"let item of labelsEdit; let i = index\">\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\" [id]=\"'button-edit-' + i\">\n <h6 *ngIf=\"item.label\" class=\"mr-1 font-weight-bold m-0\">{{item.label}} </h6>\n <div *ngIf=\"!modeEdit[i]\">{{item.value}}</div>\n <div class=\"cursor-pointer\" (click)='editLabel(i)' *ngIf=\"!modeEdit[i] && item.edit\" matTooltip=\"Editar\" matTooltipPosition=\"above\">\n <mat-icon class=\"ml-1 pencil-edit cursor-pointer\" matTooltip=\"Editar\" matTooltipPosition=\"above\" [style.color]=\"iconColor\">edit</mat-icon>\n </div>\n\n <input *ngIf=\"modeEdit[i] && item.edit\" type=\"text\" [(ngModel)]='currentValueToEdit' matInput placeholder=\"Filtrar\">\n\n <div class=\"cursor-pointer\" (click)='finishEditLabel(i)' *ngIf=\"modeEdit[i] && item.edit\" matTooltip=\"Aceptar\" matTooltipPosition=\"above\">\n <i class=\"fa fa-check btn-accion\" style=\"margin-left: 15px;\"></i>\n </div>\n\n </h4>\n </div>\n</div>\n", styles: [".label-text{padding:5px;margin:5px 10px;border-radius:10px;-webkit-text-decoration:center;text-decoration:center;font-weight:500}.pencil-edit{font-size:16px;display:flex;align-items:center;justify-content:center}.cursor-pointer{cursor:pointer}\n"] }]
|
|
72
|
+
}], ctorParameters: function () { return []; }, propDecorators: { updateLabel: [{
|
|
73
|
+
type: Output
|
|
74
|
+
}], labels: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], labelsEdit: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], color: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], iconColor: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}] } });
|
|
83
83
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWxhYmVsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9icmFpbmxvcGVyLXVpL2NvbXBvbmVudHMvYnV0dG9ucy9idXR0b24tbGFiZWwvYnV0dG9uLWxhYmVsLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9icmFpbmxvcGVyLXVpL2NvbXBvbmVudHMvYnV0dG9ucy9idXR0b24tbGFiZWwvYnV0dG9uLWxhYmVsLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxZQUFZLEVBQTRCLE1BQU0sZUFBZSxDQUFDOzs7Ozs7O0FBT3pHLE1BQU0sT0FBTyxvQkFBb0I7SUFFL0I7UUFFVSxnQkFBVyxHQUFHLElBQUks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