brainloper-ui 14.1.4 → 14.1.5
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 +56 -56
- package/esm2020/src/app/modules/brainloper-ui/brainloper-ui.module.mjs +310 -310
- package/esm2020/src/app/modules/brainloper-ui/components/bread-crumb/bread-crumb.component.mjs +29 -29
- package/esm2020/src/app/modules/brainloper-ui/components/buttons/button-icon/button-icon.component.mjs +23 -23
- package/esm2020/src/app/modules/brainloper-ui/components/buttons/button-label/button-label.component.mjs +83 -83
- package/esm2020/src/app/modules/brainloper-ui/components/carousel/carousel.component.mjs +40 -40
- package/esm2020/src/app/modules/brainloper-ui/components/combos/combos.component.mjs +176 -176
- package/esm2020/src/app/modules/brainloper-ui/components/data-table/data-table.component.mjs +728 -728
- package/esm2020/src/app/modules/brainloper-ui/components/data-table/table-modal/table-modal.component.mjs +118 -118
- package/esm2020/src/app/modules/brainloper-ui/components/file-input/file-input.component.mjs +186 -186
- 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 +222 -222
- package/esm2020/src/app/modules/brainloper-ui/components/report/generate-pdf/generate-pdf.component.mjs +81 -80
- package/esm2020/src/app/modules/brainloper-ui/components/report/template-fuel/template-fuel.component.mjs +82 -81
- package/esm2020/src/app/modules/brainloper-ui/components/select-filter/select-filter.component.mjs +108 -108
- package/esm2020/src/app/modules/directives/carousel-item.directive.mjs +18 -18
- package/esm2020/src/app/modules/interfaces/buttons/button-icon.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/buttons/button-lavel-edit.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/combos/combos-configuration.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/data-table/params.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/data-table/rules.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/data-table/table-columns.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/data-table/table-configuration.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/enum/enumActions.mjs +8 -8
- package/esm2020/src/app/modules/interfaces/enum/enumRules.mjs +8 -8
- package/esm2020/src/app/modules/interfaces/file-forms-service/file-forms-params.mjs +2 -2
- 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 +2 -2
- package/esm2020/src/app/modules/interfaces/menu-break-crumb/menu-break-crumb.mjs +8 -8
- package/esm2020/src/app/modules/interfaces/report/template-pdf-base.mjs +2 -0
- package/esm2020/src/app/modules/interfaces/report/template-pdf-ot.mjs +2 -2
- package/esm2020/src/app/modules/interfaces/report/template-pfd-fo.mjs +2 -2
- package/esm2020/src/app/modules/services/crypto.service.mjs +37 -37
- package/esm2020/src/app/modules/services/export-data.service.mjs +166 -166
- package/esm2020/src/app/modules/services/file-forms.service.mjs +24 -24
- package/esm2020/src/app/modules/services/functions.service.mjs +54 -54
- package/esm2020/src/app/modules/services/generate-pdf.service.mjs +58 -58
- package/esm2020/src/app/modules/services/http.service.mjs +97 -97
- package/esm2020/src/app/modules/services/loading/loading.component.mjs +28 -28
- package/esm2020/src/app/modules/services/local-storage.service.mjs +115 -115
- package/esm2020/src/app/modules/services/message.service.mjs +200 -200
- package/esm2020/src/app/modules/services/screen-size-util.mjs +6 -6
- package/esm2020/src/app/modules/services/session.service.mjs +42 -42
- package/fesm2015/brainloper-ui.mjs +2814 -2812
- package/fesm2015/brainloper-ui.mjs.map +1 -1
- package/fesm2020/brainloper-ui.mjs +2774 -2772
- 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 +62 -62
- 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 +16 -16
- 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 +36 -35
- package/src/app/modules/brainloper-ui/components/report/template-fuel/template-fuel.component.d.ts +37 -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-base.d.ts +17 -0
- package/src/app/modules/interfaces/report/template-pdf-ot.d.ts +6 -19
- package/src/app/modules/interfaces/report/template-pfd-fo.d.ts +7 -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
|
-
}] } });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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\">\r\n <ol class=\"breadcrumb\">\r\n <li *ngFor=\"let m of menu\" [class]=\"m.current?'active':''\" class=\"breadcrumb-item\" (click)=\"handlerRouter(m)\">{{m.name}}</li>\r\n </ol>\r\n</div>\r\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\">\r\n <ol class=\"breadcrumb\">\r\n <li *ngFor=\"let m of menu\" [class]=\"m.current?'active':''\" class=\"breadcrumb-item\" (click)=\"handlerRouter(m)\">{{m.name}}</li>\r\n </ol>\r\n</div>\r\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
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWQtY3J1bWIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL2JyYWlubG9wZXItdWkvY29tcG9uZW50cy9icmVhZC1jcnVtYi9icmVhZC1jcnVtYi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvYnJhaW5sb3Blci11aS9jb21wb25lbnRzL2JyZWFkLWNydW1iL2JyZWFkLWNydW1iLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7QUFRL0UsTUFBTSxPQUFPLG1CQUFtQjtJQUk5QixZQUNTLE1BQWU7UUFBZixXQUFNLEdBQU4sTUFBTSxDQUFTO1FBSmYsU0FBSSxHQUFjLEVBQUUsQ0FBQTtRQUNuQixpQkFBWSxHQUFHLElBQUksWUFBWSxFQUFPLENBQUM7SUFJN0MsQ0FBQztJQUVMLFFBQVE7SUFDUixDQUFDO0lBRU0sYUFBYSxDQUFDLElBQVE7UUFDM0IsSUFBRyxJ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SW5pdCgpOiB2b2lkIHtcclxuICB9XHJcblxyXG4gIHB1YmxpYyBoYW5kbGVyUm91dGVyKG1lbnU6YW55KXtcclxuICAgIGlmKG1lbnUucm91dGVyICE9IG51bGwpIHRoaXMucm91dGVyLm5hdmlnYXRlKFttZW51LnJvdXRlcl0pXHJcbiAgICB0aGlzLnNlbGVjdFJvdXRlci5lbWl0KG1lbnUpXHJcbiAgfVxyXG5cclxufVxyXG5cclxuXHJcblxyXG4iLCI8ZGl2IGFyaWEtbGFiZWw9XCJicmVhZGNydW1iXCI+XHJcbiAgPG9sIGNsYXNzPVwiYnJlYWRjcnVtYlwiPlxyXG4gICAgICA8bGkgKm5nRm9yPVwibGV0IG0gb2YgbWVudVwiIFtjbGFzc109XCJtLmN1cnJlbnQ/J2FjdGl2ZSc6JydcIiBjbGFzcz1cImJyZWFkY3J1bWItaXRlbVwiIChjbGljayk9XCJoYW5kbGVyUm91dGVyKG0pXCI+e3ttLm5hbWV9fTwvbGk+XHJcbiAgPC9vbD5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -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
|
-
}] } });
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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\">\r\n <div *ngFor=\"let item of items\" [class]=\"items.length > 6 ? 'col-3' : 'col-4'\">\r\n <div *ngIf=\"item.active\" class=\"icon-menu\" matTooltip=\"{{ item.description }}\" matTooltipPosition=\"above\" matTooltipClass=\"custom-tooltip\">\r\n <button style=\"border: none; background: transparent\">\r\n <div [class]=\"'icon mat-elevation-z6'\" [style.background]=\"item.color\" matRipple (click)=\"clickButton.emit(item)\">\r\n <i [class]=\"'fa iconFa fa-' + item.icon\" [style.color]=\"item.iconColor ?? 'white'\"></i>\r\n </div>\r\n </button>\r\n <div>\r\n <h3 style=\"text-align: center; line-height: 20px\">{{ item.name }}</h3>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\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\">\r\n <div *ngFor=\"let item of items\" [class]=\"items.length > 6 ? 'col-3' : 'col-4'\">\r\n <div *ngIf=\"item.active\" class=\"icon-menu\" matTooltip=\"{{ item.description }}\" matTooltipPosition=\"above\" matTooltipClass=\"custom-tooltip\">\r\n <button style=\"border: none; background: transparent\">\r\n <div [class]=\"'icon mat-elevation-z6'\" [style.background]=\"item.color\" matRipple (click)=\"clickButton.emit(item)\">\r\n <i [class]=\"'fa iconFa fa-' + item.icon\" [style.color]=\"item.iconColor ?? 'white'\"></i>\r\n </div>\r\n </button>\r\n <div>\r\n <h3 style=\"text-align: center; line-height: 20px\">{{ item.name }}</h3>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\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
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWljb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL2JyYWlubG9wZXItdWkvY29tcG9uZW50cy9idXR0b25zL2J1dHRvbi1pY29uL2J1dHRvbi1pY29uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9icmFpbmxvcGVyLXVpL2NvbXBvbmVudHMvYnV0dG9ucy9idXR0b24taWNvbi9idXR0b24taWNvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7OztBQU8vRSxNQUFNLE9BQU8sbUJBQW1CO0lBSzlCO1FBSFUsZ0JBQVcsR0FBRyxJQUFJLFlBQVksRUFBTyxDQUFBO0lBRy9CLENBQUM7SUFFakIsUUFBUT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xyXG4gICAgPGRpdiAqbmdJZj1cIml0ZW0uYWN0aXZlXCIgY2xhc3M9XCJpY29uLW1lbnVcIiBtYXRUb29sdGlwPVwie3sgaXRlbS5kZXNjcmlwdGlvbiB9fVwiIG1hdFRvb2x0aXBQb3NpdGlvbj1cImFib3ZlXCIgbWF0VG9vbHRpcENsYXNzPVwiY3VzdG9tLXRvb2x0aXBcIj5cclxuICAgICAgPGJ1dHRvbiBzdHlsZT1cImJvcmRlcjogbm9uZTsgYmFja2dyb3VuZDogdHJhbnNwYXJlbnRcIj5cclxuICAgICAgICA8ZGl2IFtjbGFzc109XCInaWNvbiBtYXQtZWxldmF0aW9uLXo2J1wiIFtzdHlsZS5iYWNrZ3JvdW5kXT1cIml0ZW0uY29sb3JcIiBtYXRSaXBwbGUgKGNsaWNrKT1cImNsaWNrQnV0dG9uLmVtaXQoaXRlbSlcIj5cclxuICAgICAgICAgIDxpIFtjbGFzc109XCInZmEgaWNvbkZhIGZhLScgKyBpdGVtLmljb25cIiBbc3R5bGUuY29sb3JdPVwiaXRlbS5pY29uQ29sb3IgPz8gJ3doaXRlJ1wiPjwvaT5cclxuICAgICAgICA8L2Rpdj5cclxuICAgICAgPC9idXR0b24+XHJcbiAgICAgIDxkaXY+XHJcbiAgICAgICAgPGgzIHN0eWxlPVwidGV4dC1hbGlnbjogY2VudGVyOyBsaW5lLWhlaWdodDogMjBweFwiPnt7IGl0ZW0ubmFtZSB9fTwvaDM+XHJcbiAgICAgIDwvZGl2PlxyXG4gICAgPC9kaXY+XHJcbiAgPC9kaXY+XHJcbjwvZGl2PlxyXG5cclxuXHJcblxyXG4iXX0=
|
|
@@ -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
|
-
}] } });
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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\">\r\n <div *ngFor=\"let item of labels;\">\r\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\">\r\n {{item}}\r\n </h4>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"labelsEdit\" class=\"d-flex justify-content-center my-3 flex-wrap\">\r\n <div *ngFor=\"let item of labelsEdit; let i = index\">\r\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\">\r\n <h6 *ngIf=\"item.label\" class=\"mr-1 font-weight-bold m-0\">{{item.label}} </h6>\r\n <div *ngIf=\"!modeEdit[i]\">{{item.value}}</div>\r\n <div class=\"cursor-pointer\" (click)='editLabel(i)' *ngIf=\"!modeEdit[i] && item.edit\" matTooltip=\"Editar\" matTooltipPosition=\"above\">\r\n <mat-icon class=\"ml-1 pencil-edit cursor-pointer\" matTooltip=\"Editar\" matTooltipPosition=\"above\" [style.color]=\"iconColor\">edit</mat-icon>\r\n </div>\r\n\r\n <input *ngIf=\"modeEdit[i] && item.edit\" type=\"text\" [(ngModel)]='currentValueToEdit' matInput placeholder=\"Filtrar\">\r\n\r\n <div class=\"cursor-pointer\" (click)='finishEditLabel(i)' *ngIf=\"modeEdit[i] && item.edit\" matTooltip=\"Aceptar\" matTooltipPosition=\"above\">\r\n <i class=\"fa fa-check btn-accion\" style=\"margin-left: 15px;\"></i>\r\n </div>\r\n\r\n </h4>\r\n </div>\r\n</div>\r\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\">\r\n <div *ngFor=\"let item of labels;\">\r\n <h4 *ngIf=\"item && item != ''\" class=\"mat-elevation-z2 label-text d-flex d-flex-row\" [style.background]=\"color?color:'#343a401a'\">\r\n {{item}}\r\n </h4>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"labelsEdit\" class=\"d-flex justify-content-center my-3 flex-wrap\">\r\n <div *ngFor=\"let item of labelsEdit; let i = index\">\r\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\">\r\n <h6 *ngIf=\"item.label\" class=\"mr-1 font-weight-bold m-0\">{{item.label}} </h6>\r\n <div *ngIf=\"!modeEdit[i]\">{{item.value}}</div>\r\n <div class=\"cursor-pointer\" (click)='editLabel(i)' *ngIf=\"!modeEdit[i] && item.edit\" matTooltip=\"Editar\" matTooltipPosition=\"above\">\r\n <mat-icon class=\"ml-1 pencil-edit cursor-pointer\" matTooltip=\"Editar\" matTooltipPosition=\"above\" [style.color]=\"iconColor\">edit</mat-icon>\r\n </div>\r\n\r\n <input *ngIf=\"modeEdit[i] && item.edit\" type=\"text\" [(ngModel)]='currentValueToEdit' matInput placeholder=\"Filtrar\">\r\n\r\n <div class=\"cursor-pointer\" (click)='finishEditLabel(i)' *ngIf=\"modeEdit[i] && item.edit\" matTooltip=\"Aceptar\" matTooltipPosition=\"above\">\r\n <i class=\"fa fa-check btn-accion\" style=\"margin-left: 15px;\"></i>\r\n </div>\r\n\r\n </h4>\r\n </div>\r\n</div>\r\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
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWxhYmVsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIi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