angular-matecu 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -2
- package/README.md +146 -87
- package/angular-matecu-4.0.0.tgz +0 -0
- package/esm2022/lib/components/matecu-alert-box/matecu-alert-box.component.mjs +67 -0
- package/{esm2020 → esm2022}/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.mjs +4 -4
- package/esm2022/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.mjs +43 -0
- package/esm2022/lib/components/matecu-spinner/matecu-spinner.component.mjs +58 -0
- package/esm2022/lib/components/matecu-topbar-action/matecu-topbar-action.component.mjs +18 -0
- package/esm2022/lib/components/matecu-topbar-body/matecu-topbar-body.component.mjs +17 -0
- package/esm2022/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.mjs +43 -0
- package/esm2022/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.mjs +12 -0
- package/esm2022/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.mjs +29 -0
- package/esm2022/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.mjs +112 -0
- package/esm2022/lib/components/matecu-topbar-search/matecu-topbar-search.component.mjs +93 -0
- package/esm2022/lib/components/matecu-topbar-title/matecu-topbar-title.component.mjs +18 -0
- package/esm2022/lib/modules/matecu-alert-box/matecu-alert-box.module.mjs +24 -0
- package/esm2022/lib/modules/matecu-spinner/matecu-spinner.module.mjs +22 -0
- package/esm2022/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.mjs +83 -0
- package/{esm2020 → esm2022}/lib/services/matecu-snack-bar.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/services/matecu-spinner.service.mjs +4 -4
- package/esm2022/public-api.mjs +32 -0
- package/fesm2022/angular-matecu.mjs +735 -0
- package/fesm2022/angular-matecu.mjs.map +1 -0
- package/lib/components/matecu-alert-box/matecu-alert-box.component.d.ts +1 -1
- package/lib/components/matecu-spinner/matecu-spinner.component.d.ts +1 -1
- package/lib/components/matecu-topbar-action/matecu-topbar-action.component.d.ts +1 -0
- package/lib/components/matecu-topbar-body/matecu-topbar-body.component.d.ts +1 -6
- package/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.d.ts +8 -9
- package/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.d.ts +5 -0
- package/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.d.ts +4 -1
- package/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.d.ts +20 -22
- package/lib/components/matecu-topbar-search/matecu-topbar-search.component.d.ts +19 -18
- package/lib/modules/matecu-alert-box/matecu-alert-box.module.d.ts +0 -3
- package/lib/modules/matecu-spinner/matecu-spinner.module.d.ts +0 -3
- package/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.d.ts +2 -4
- package/package.json +8 -14
- package/public-api.d.ts +1 -0
- package/esm2020/lib/components/matecu-alert-box/matecu-alert-box.component.mjs +0 -67
- package/esm2020/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.mjs +0 -43
- package/esm2020/lib/components/matecu-spinner/matecu-spinner.component.mjs +0 -58
- package/esm2020/lib/components/matecu-topbar-action/matecu-topbar-action.component.mjs +0 -13
- package/esm2020/lib/components/matecu-topbar-body/matecu-topbar-body.component.mjs +0 -28
- package/esm2020/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.mjs +0 -34
- package/esm2020/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.mjs +0 -13
- package/esm2020/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.mjs +0 -101
- package/esm2020/lib/components/matecu-topbar-search/matecu-topbar-search.component.mjs +0 -84
- package/esm2020/lib/components/matecu-topbar-title/matecu-topbar-title.component.mjs +0 -19
- package/esm2020/lib/modules/matecu-alert-box/matecu-alert-box.module.mjs +0 -27
- package/esm2020/lib/modules/matecu-spinner/matecu-spinner.module.mjs +0 -25
- package/esm2020/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.mjs +0 -83
- package/esm2020/public-api.mjs +0 -31
- package/fesm2015/angular-matecu.mjs +0 -693
- package/fesm2015/angular-matecu.mjs.map +0 -1
- package/fesm2020/angular-matecu.mjs +0 -689
- package/fesm2020/angular-matecu.mjs.map +0 -1
- /package/{esm2020 → esm2022}/angular-matecu.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/types/matecu-alert-dialog.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/types/matecu-alert-snackbar.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/types/matecu-altert-box-type.mjs +0 -0
|
@@ -1,693 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, HostBinding, Input, NgModule, EventEmitter, Output, Inject } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { BehaviorSubject, Subject, of, fromEvent } from 'rxjs';
|
|
6
|
-
import { tap, takeUntil, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
7
|
-
import * as i2$1 from '@angular/forms';
|
|
8
|
-
import { UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import * as i3 from '@angular/material/button';
|
|
10
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import * as i3$1 from '@angular/material/icon';
|
|
12
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import * as i2 from '@angular/material/toolbar';
|
|
14
|
-
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
15
|
-
import * as i1$1 from '@angular/material/dialog';
|
|
16
|
-
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
17
|
-
import * as i1$2 from '@angular/material/snack-bar';
|
|
18
|
-
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
19
|
-
|
|
20
|
-
class MatecuSpinnerService {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.active$ = new BehaviorSubject(false);
|
|
23
|
-
this.requestsKeys = [];
|
|
24
|
-
}
|
|
25
|
-
watch() {
|
|
26
|
-
return this.active$.pipe();
|
|
27
|
-
}
|
|
28
|
-
add(customKey) {
|
|
29
|
-
const key = (typeof (customKey) === 'string' && customKey.length > 0) ? customKey : this.createKey();
|
|
30
|
-
this.requestsKeys.push(key);
|
|
31
|
-
this.updateStatus();
|
|
32
|
-
return key;
|
|
33
|
-
}
|
|
34
|
-
remove(key) {
|
|
35
|
-
this.requestsKeys = this.requestsKeys.filter((requestKey) => requestKey !== key);
|
|
36
|
-
this.updateStatus();
|
|
37
|
-
}
|
|
38
|
-
clear() {
|
|
39
|
-
this.requestsKeys = [];
|
|
40
|
-
this.updateStatus();
|
|
41
|
-
}
|
|
42
|
-
updateStatus() {
|
|
43
|
-
const active = this.requestsKeys.length > 0;
|
|
44
|
-
this.active$.next(active);
|
|
45
|
-
}
|
|
46
|
-
createKey() {
|
|
47
|
-
const time = new Date().getTime();
|
|
48
|
-
const complement = Math.random();
|
|
49
|
-
return `${time}__${complement}`;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
MatecuSpinnerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
-
MatecuSpinnerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerService, providedIn: 'root' });
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerService, decorators: [{
|
|
55
|
-
type: Injectable,
|
|
56
|
-
args: [{
|
|
57
|
-
providedIn: 'root',
|
|
58
|
-
}]
|
|
59
|
-
}], ctorParameters: function () { return []; } });
|
|
60
|
-
|
|
61
|
-
class MatecuSpinnerComponent {
|
|
62
|
-
constructor(spinnerService) {
|
|
63
|
-
this.spinnerService = spinnerService;
|
|
64
|
-
this.destroy$ = new Subject();
|
|
65
|
-
this.hiddenClass = 'matecu-spinner--hidden';
|
|
66
|
-
this.activeCache = false;
|
|
67
|
-
this.className = 'matecu-spinner';
|
|
68
|
-
this.color = '#2196F3';
|
|
69
|
-
this.global = false;
|
|
70
|
-
this.size = '70px';
|
|
71
|
-
}
|
|
72
|
-
get active() {
|
|
73
|
-
return this.activeCache;
|
|
74
|
-
}
|
|
75
|
-
set active(value) {
|
|
76
|
-
if (this.global) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
this.activeCache = value;
|
|
80
|
-
this.className = value
|
|
81
|
-
? this.className.replace(` ${this.hiddenClass}`, '')
|
|
82
|
-
: (this.className += ` ${this.hiddenClass}`);
|
|
83
|
-
}
|
|
84
|
-
ngOnDestroy() {
|
|
85
|
-
this.destroy$.next();
|
|
86
|
-
this.destroy$.complete();
|
|
87
|
-
}
|
|
88
|
-
ngOnInit() {
|
|
89
|
-
if (this.global) {
|
|
90
|
-
this.spinnerService.watch().pipe(tap(value => this.activeCache = value), takeUntil(this.destroy$)).subscribe();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
MatecuSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerComponent, deps: [{ token: MatecuSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
-
MatecuSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuSpinnerComponent, isStandalone: true, selector: "matecu-spinner", inputs: { color: "color", global: "global", active: "active", size: "size" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-container *ngIf=\"active\">\n <svg xmlns:svg=\"http://www.w3.org/2000/svg\" [attr.width]=\"size\" [attr.height]=\"size\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\" viewBox=\"0 0 128 128\" xml:space=\"preserve\">\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"transparent\" />\n <g>\n <path class=\"matecu-spinner__100\" d=\"M122.5 69.25H96.47a33.1 33.1 0 0 0 0-10.5h26.05a5.25 5.25 0 0 1 0 10.5z\" [attr.fill]=\"color\"\n fill-opacity=\"1\" />\n <path class=\"matecu-spinner__30\" d=\"M112.04 97.83L89.47 84.8a33.1 33.1 0 0 0 5.25-9.1l22.57 13.03a5.25 5.25 0 0 1-5.28 9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M88.68 117.35L75.65 94.78a33.1 33.1 0 0 0 9.1-5.25l13.02 22.57a5.25 5.25 0 1 1-9.1 5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M58.7 122.57V96.5a33.1 33.1 0 0 0 10.5 0v26.07a5.25 5.25 0 0 1-10.5 0z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M30.1 112.1l13.04-22.57a33.1 33.1 0 0 0 9.1 5.25L39.2 117.35a5.25 5.25 0 1 1-9.1-5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M10.6 88.74L33.16 75.7a33.1 33.1 0 0 0 5.25 9.1L15.88 97.83a5.25 5.25 0 1 1-5.25-9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__40\" d=\"M5.37 58.75h26.06a33.1 33.1 0 0 0 0 10.5H5.37a5.25 5.25 0 0 1 0-10.5z\" [attr.fill]=\"color\"\n fill-opacity=\"0.4\" />\n <path class=\"matecu-spinner__50\" d=\"M15.85 30.17L38.4 43.2a33.1 33.1 0 0 0-5.24 9.1L10.6 39.25a5.25 5.25 0 1 1 5.25-9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.5\" />\n <path class=\"matecu-spinner__60\" d=\"M39.2 10.65l13.03 22.57a33.1 33.1 0 0 0-9.1 5.25l-13-22.57a5.25 5.25 0 1 1 9.1-5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.6\" />\n <path class=\"matecu-spinner__70\" d=\"M69.2 5.43V31.5a33.1 33.1 0 0 0-10.5 0V5.42a5.25 5.25 0 1 1 10.5 0z\" [attr.fill]=\"color\"\n fill-opacity=\"0.7\" />\n <path class=\"matecu-spinner__80\" d=\"M97.77 15.9L84.75 38.47a33.1 33.1 0 0 0-9.1-5.25l13.03-22.57a5.25 5.25 0 1 1 9.1 5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.8\" />\n <path class=\"matecu-spinner__90\" d=\"M117.3 39.26L94.7 52.3a33.1 33.1 0 0 0-5.25-9.1l22.57-13.03a5.25 5.25 0 0 1 5.25 9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.9\" />\n <animateTransform attributeName=\"transform\" type=\"rotate\"\n values=\"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64\"\n calcMode=\"discrete\" dur=\"600ms\" repeatCount=\"indefinite\"></animateTransform>\n </g>\n</svg>\n</ng-container>", styles: [".matecu-spinner{display:flex;align-items:center;justify-content:center}.matecu-spinner>svg{width:80px;height:80px}.matecu-spinner__hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerComponent, decorators: [{
|
|
97
|
-
type: Component,
|
|
98
|
-
args: [{ selector: 'matecu-spinner', standalone: true, imports: [CommonModule], template: "<ng-container *ngIf=\"active\">\n <svg xmlns:svg=\"http://www.w3.org/2000/svg\" [attr.width]=\"size\" [attr.height]=\"size\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\" viewBox=\"0 0 128 128\" xml:space=\"preserve\">\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"transparent\" />\n <g>\n <path class=\"matecu-spinner__100\" d=\"M122.5 69.25H96.47a33.1 33.1 0 0 0 0-10.5h26.05a5.25 5.25 0 0 1 0 10.5z\" [attr.fill]=\"color\"\n fill-opacity=\"1\" />\n <path class=\"matecu-spinner__30\" d=\"M112.04 97.83L89.47 84.8a33.1 33.1 0 0 0 5.25-9.1l22.57 13.03a5.25 5.25 0 0 1-5.28 9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M88.68 117.35L75.65 94.78a33.1 33.1 0 0 0 9.1-5.25l13.02 22.57a5.25 5.25 0 1 1-9.1 5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M58.7 122.57V96.5a33.1 33.1 0 0 0 10.5 0v26.07a5.25 5.25 0 0 1-10.5 0z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M30.1 112.1l13.04-22.57a33.1 33.1 0 0 0 9.1 5.25L39.2 117.35a5.25 5.25 0 1 1-9.1-5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M10.6 88.74L33.16 75.7a33.1 33.1 0 0 0 5.25 9.1L15.88 97.83a5.25 5.25 0 1 1-5.25-9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__40\" d=\"M5.37 58.75h26.06a33.1 33.1 0 0 0 0 10.5H5.37a5.25 5.25 0 0 1 0-10.5z\" [attr.fill]=\"color\"\n fill-opacity=\"0.4\" />\n <path class=\"matecu-spinner__50\" d=\"M15.85 30.17L38.4 43.2a33.1 33.1 0 0 0-5.24 9.1L10.6 39.25a5.25 5.25 0 1 1 5.25-9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.5\" />\n <path class=\"matecu-spinner__60\" d=\"M39.2 10.65l13.03 22.57a33.1 33.1 0 0 0-9.1 5.25l-13-22.57a5.25 5.25 0 1 1 9.1-5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.6\" />\n <path class=\"matecu-spinner__70\" d=\"M69.2 5.43V31.5a33.1 33.1 0 0 0-10.5 0V5.42a5.25 5.25 0 1 1 10.5 0z\" [attr.fill]=\"color\"\n fill-opacity=\"0.7\" />\n <path class=\"matecu-spinner__80\" d=\"M97.77 15.9L84.75 38.47a33.1 33.1 0 0 0-9.1-5.25l13.03-22.57a5.25 5.25 0 1 1 9.1 5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.8\" />\n <path class=\"matecu-spinner__90\" d=\"M117.3 39.26L94.7 52.3a33.1 33.1 0 0 0-5.25-9.1l22.57-13.03a5.25 5.25 0 0 1 5.25 9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.9\" />\n <animateTransform attributeName=\"transform\" type=\"rotate\"\n values=\"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64\"\n calcMode=\"discrete\" dur=\"600ms\" repeatCount=\"indefinite\"></animateTransform>\n </g>\n</svg>\n</ng-container>", styles: [".matecu-spinner{display:flex;align-items:center;justify-content:center}.matecu-spinner>svg{width:80px;height:80px}.matecu-spinner__hidden{display:none}\n"] }]
|
|
99
|
-
}], ctorParameters: function () { return [{ type: MatecuSpinnerService }]; }, propDecorators: { className: [{
|
|
100
|
-
type: HostBinding,
|
|
101
|
-
args: ['class']
|
|
102
|
-
}], color: [{
|
|
103
|
-
type: Input
|
|
104
|
-
}], global: [{
|
|
105
|
-
type: Input
|
|
106
|
-
}], active: [{
|
|
107
|
-
type: Input
|
|
108
|
-
}], size: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}] } });
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @deprecated Usar stanalone components
|
|
114
|
-
*/
|
|
115
|
-
class MatecuSpinnerModule {
|
|
116
|
-
}
|
|
117
|
-
MatecuSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
118
|
-
MatecuSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerModule, imports: [CommonModule, MatecuSpinnerComponent], exports: [MatecuSpinnerComponent] });
|
|
119
|
-
MatecuSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerModule, imports: [CommonModule, MatecuSpinnerComponent] });
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSpinnerModule, decorators: [{
|
|
121
|
-
type: NgModule,
|
|
122
|
-
args: [{
|
|
123
|
-
declarations: [],
|
|
124
|
-
imports: [
|
|
125
|
-
CommonModule, MatecuSpinnerComponent
|
|
126
|
-
],
|
|
127
|
-
exports: [
|
|
128
|
-
MatecuSpinnerComponent
|
|
129
|
-
]
|
|
130
|
-
}]
|
|
131
|
-
}] });
|
|
132
|
-
|
|
133
|
-
class MatecuTopbarLayoutComponent {
|
|
134
|
-
constructor() {
|
|
135
|
-
this.className = 'matecu-topbar-layout';
|
|
136
|
-
this.showSearchInput = false;
|
|
137
|
-
this.search = false;
|
|
138
|
-
this.searchInput = new UntypedFormControl();
|
|
139
|
-
this.isProminent = false;
|
|
140
|
-
this.hasTwoRows = false;
|
|
141
|
-
this.destroySpyScroll$ = new Subject();
|
|
142
|
-
this.scrollingClass = 'matecu-topbar-layout--scrolling';
|
|
143
|
-
this.prominentClass = 'matecu-topbar-layout--prominent';
|
|
144
|
-
this.color = 'primary';
|
|
145
|
-
}
|
|
146
|
-
set twoRows(value) {
|
|
147
|
-
this.hasTwoRows = value;
|
|
148
|
-
this.setProminentClassValue();
|
|
149
|
-
}
|
|
150
|
-
set prominent(value) {
|
|
151
|
-
this.isProminent = value;
|
|
152
|
-
this.setProminentClassValue();
|
|
153
|
-
}
|
|
154
|
-
ngOnDestroy() {
|
|
155
|
-
this.destroySpyScroll$.next();
|
|
156
|
-
this.destroySpyScroll$.complete();
|
|
157
|
-
}
|
|
158
|
-
ngAfterViewInit() {
|
|
159
|
-
this.destroySpyScroll$.next();
|
|
160
|
-
this.spyScroll().pipe(takeUntil(this.destroySpyScroll$)).subscribe();
|
|
161
|
-
}
|
|
162
|
-
toogleSearch() {
|
|
163
|
-
this.showSearchInput = !this.showSearchInput;
|
|
164
|
-
}
|
|
165
|
-
closeSearch() {
|
|
166
|
-
this.showSearchInput = false;
|
|
167
|
-
this.searchInput.reset();
|
|
168
|
-
}
|
|
169
|
-
onMenuClick() { }
|
|
170
|
-
spyScroll() {
|
|
171
|
-
const scrollabes = document.querySelectorAll('.matecu-topbar-body');
|
|
172
|
-
if (!scrollabes || scrollabes.length === 0) {
|
|
173
|
-
return of(null);
|
|
174
|
-
}
|
|
175
|
-
const lastindex = scrollabes.length - 1;
|
|
176
|
-
const scrollabe = scrollabes[lastindex];
|
|
177
|
-
return fromEvent(scrollabe, 'scroll').pipe(tap(() => this.applyScrollStyles(scrollabe)), map(() => scrollabe));
|
|
178
|
-
}
|
|
179
|
-
applyScrollStyles(scrollabe) {
|
|
180
|
-
if (!scrollabe) {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
const maxScrollHeight = scrollabe.scrollHeight;
|
|
184
|
-
const screenHeight = screen.availHeight;
|
|
185
|
-
if (screenHeight > maxScrollHeight) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
const scrollPosition = scrollabe.scrollTop;
|
|
189
|
-
if (scrollPosition > 20) {
|
|
190
|
-
this.className += ' ' + this.scrollingClass;
|
|
191
|
-
}
|
|
192
|
-
if (scrollPosition < 10) {
|
|
193
|
-
const regexp = new RegExp(this.scrollingClass, 'ig');
|
|
194
|
-
this.className = this.className.replace(regexp, '').trim();
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
setProminentClassValue() {
|
|
198
|
-
if (this.isProminent && !this.hasTwoRows) {
|
|
199
|
-
this.className += ' ' + this.prominentClass;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
const regex = new RegExp(this.prominentClass, 'ig');
|
|
203
|
-
this.className = this.className.replace(regex, '').trim();
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
MatecuTopbarLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
208
|
-
MatecuTopbarLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarLayoutComponent, isStandalone: true, selector: "matecu-topbar-layout", inputs: { color: "color", twoRows: "twoRows", prominent: "prominent" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: " <mat-toolbar [color]=\"color\">\n \n <mat-toolbar-row>\n <ng-content select=\"matecu-topbar-header-row:not([position])\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[position='first']\"></ng-content>\n </mat-toolbar-row>\n <mat-toolbar-row *ngIf=\"hasTwoRows\">\n <ng-content select=\"matecu-topbar-header-row[position='second']\"></ng-content>\n </mat-toolbar-row>\n </mat-toolbar>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n", styles: [":host,.matecu-topbar-layout{display:grid;height:100vh;max-width:100vw;grid-template-rows:auto 1fr;position:relative;overflow:hidden}:host,:host *,.matecu-topbar-layout,.matecu-topbar-layout *{box-sizing:border-box}:host mat-toolbar,.matecu-topbar-layout mat-toolbar{display:block;position:relative;transition:all .3s;min-height:auto!important}:host matecu-topbar-row,.matecu-topbar-layout matecu-topbar-row{white-space:normal;justify-content:space-between;column-gap:1px}:host matecu-topbar-row:first-of-type,.matecu-topbar-layout matecu-topbar-row:first-of-type{min-height:100%}:host.matecu-topbar-layout--prominent .mat-toolbar{height:128px;max-height:128px}:host.matecu-topbar-layout--prominent mat-toolbar-row{align-items:flex-start;min-height:100%}:host.matecu-topbar-layout--scrolling .mat-toolbar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}:host.matecu-topbar-layout--scrolling.matecu-topbar-layout--prominent .mat-toolbar{height:64px;max-height:64px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i2.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }] });
|
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarLayoutComponent, decorators: [{
|
|
210
|
-
type: Component,
|
|
211
|
-
args: [{ selector: 'matecu-topbar-layout', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatToolbarModule], template: " <mat-toolbar [color]=\"color\">\n \n <mat-toolbar-row>\n <ng-content select=\"matecu-topbar-header-row:not([position])\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[position='first']\"></ng-content>\n </mat-toolbar-row>\n <mat-toolbar-row *ngIf=\"hasTwoRows\">\n <ng-content select=\"matecu-topbar-header-row[position='second']\"></ng-content>\n </mat-toolbar-row>\n </mat-toolbar>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n", styles: [":host,.matecu-topbar-layout{display:grid;height:100vh;max-width:100vw;grid-template-rows:auto 1fr;position:relative;overflow:hidden}:host,:host *,.matecu-topbar-layout,.matecu-topbar-layout *{box-sizing:border-box}:host mat-toolbar,.matecu-topbar-layout mat-toolbar{display:block;position:relative;transition:all .3s;min-height:auto!important}:host matecu-topbar-row,.matecu-topbar-layout matecu-topbar-row{white-space:normal;justify-content:space-between;column-gap:1px}:host matecu-topbar-row:first-of-type,.matecu-topbar-layout matecu-topbar-row:first-of-type{min-height:100%}:host.matecu-topbar-layout--prominent .mat-toolbar{height:128px;max-height:128px}:host.matecu-topbar-layout--prominent mat-toolbar-row{align-items:flex-start;min-height:100%}:host.matecu-topbar-layout--scrolling .mat-toolbar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}:host.matecu-topbar-layout--scrolling.matecu-topbar-layout--prominent .mat-toolbar{height:64px;max-height:64px}\n"] }]
|
|
212
|
-
}], ctorParameters: function () { return []; }, propDecorators: { className: [{
|
|
213
|
-
type: HostBinding,
|
|
214
|
-
args: ['class']
|
|
215
|
-
}], color: [{
|
|
216
|
-
type: Input
|
|
217
|
-
}], twoRows: [{
|
|
218
|
-
type: Input
|
|
219
|
-
}], prominent: [{
|
|
220
|
-
type: Input
|
|
221
|
-
}] } });
|
|
222
|
-
|
|
223
|
-
class MatecuTopbarTitleComponent {
|
|
224
|
-
constructor() {
|
|
225
|
-
this.className = 'title';
|
|
226
|
-
}
|
|
227
|
-
ngOnInit() {
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
MatecuTopbarTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
-
MatecuTopbarTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarTitleComponent, isStandalone: true, selector: "matecu-topbar-title", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{flex-grow:5;display:flex;align-items:center;margin-right:auto;padding:7px 1rem;max-height:100%;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;align-self:center}\n"] });
|
|
232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarTitleComponent, decorators: [{
|
|
233
|
-
type: Component,
|
|
234
|
-
args: [{ selector: 'matecu-topbar-title', standalone: true, template: "<ng-content></ng-content>", styles: [":host{flex-grow:5;display:flex;align-items:center;margin-right:auto;padding:7px 1rem;max-height:100%;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;align-self:center}\n"] }]
|
|
235
|
-
}], ctorParameters: function () { return []; }, propDecorators: { className: [{
|
|
236
|
-
type: HostBinding,
|
|
237
|
-
args: ['class']
|
|
238
|
-
}] } });
|
|
239
|
-
|
|
240
|
-
class MatecuTopbarBodyComponent {
|
|
241
|
-
constructor(elementRef) {
|
|
242
|
-
this.elementRef = elementRef;
|
|
243
|
-
this.className = 'matecu-topbar-body';
|
|
244
|
-
}
|
|
245
|
-
ngOnInit() { }
|
|
246
|
-
scrollTop() {
|
|
247
|
-
const element = this.elementRef.nativeElement;
|
|
248
|
-
if (!!element) {
|
|
249
|
-
element.scroll({
|
|
250
|
-
top: 0,
|
|
251
|
-
behavior: 'smooth',
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
MatecuTopbarBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarBodyComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
257
|
-
MatecuTopbarBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarBodyComponent, isStandalone: true, selector: "matecu-topbar-body", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{display:block;padding:0;padding-top:2rem;overflow-y:auto}@media screen and (max-width: 770px){:host{padding-bottom:80px}}\n"] });
|
|
258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarBodyComponent, decorators: [{
|
|
259
|
-
type: Component,
|
|
260
|
-
args: [{ selector: 'matecu-topbar-body', standalone: true, template: "<ng-content></ng-content>", styles: [":host{display:block;padding:0;padding-top:2rem;overflow-y:auto}@media screen and (max-width: 770px){:host{padding-bottom:80px}}\n"] }]
|
|
261
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { className: [{
|
|
262
|
-
type: HostBinding,
|
|
263
|
-
args: ['class']
|
|
264
|
-
}] } });
|
|
265
|
-
|
|
266
|
-
class MatecuTopbarFabComponent {
|
|
267
|
-
constructor() {
|
|
268
|
-
this.color = 'accent';
|
|
269
|
-
this.extended = false;
|
|
270
|
-
this.clickAction = new EventEmitter();
|
|
271
|
-
this.className = 'matecu-topbar-fab';
|
|
272
|
-
}
|
|
273
|
-
ngOnInit() { }
|
|
274
|
-
onClickAction() {
|
|
275
|
-
this.clickAction.emit();
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
MatecuTopbarFabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarFabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
279
|
-
MatecuTopbarFabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarFabComponent, isStandalone: true, selector: "matecu-topbar-fab", inputs: { color: "color", extended: "extended" }, outputs: { clickAction: "clickAction" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: " <button type=\"button\" mat-fab [ngClass]=\"{'extended': extended}\" [color]=\"color\" (click)=\"onClickAction()\">\n <ng-content></ng-content>\n </button>\n", styles: [":host{display:flex;align-items:flex-end;height:100%;position:relative;z-index:2}:host button{transform:translateY(50%)}:host button.extended{border-radius:27px;height:55px;width:auto;padding:0 1rem!important}@media screen and (max-width: 768px){:host{height:auto;position:fixed;bottom:1rem;right:1rem;transform:initial}:host button{transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatFabButton, selector: "button[mat-fab]", inputs: ["disabled", "disableRipple", "color", "tabIndex", "extended"], exportAs: ["matButton"] }] });
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarFabComponent, decorators: [{
|
|
281
|
-
type: Component,
|
|
282
|
-
args: [{ selector: 'matecu-topbar-fab', standalone: true, imports: [CommonModule, MatButtonModule], template: " <button type=\"button\" mat-fab [ngClass]=\"{'extended': extended}\" [color]=\"color\" (click)=\"onClickAction()\">\n <ng-content></ng-content>\n </button>\n", styles: [":host{display:flex;align-items:flex-end;height:100%;position:relative;z-index:2}:host button{transform:translateY(50%)}:host button.extended{border-radius:27px;height:55px;width:auto;padding:0 1rem!important}@media screen and (max-width: 768px){:host{height:auto;position:fixed;bottom:1rem;right:1rem;transform:initial}:host button{transform:translateY(0)}}\n"] }]
|
|
283
|
-
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
|
|
284
|
-
type: Input
|
|
285
|
-
}], extended: [{
|
|
286
|
-
type: Input
|
|
287
|
-
}], clickAction: [{
|
|
288
|
-
type: Output
|
|
289
|
-
}], className: [{
|
|
290
|
-
type: HostBinding,
|
|
291
|
-
args: ['class']
|
|
292
|
-
}] } });
|
|
293
|
-
|
|
294
|
-
class MatecuTopbarSearchComponent {
|
|
295
|
-
constructor() {
|
|
296
|
-
this.showMobileInput = false;
|
|
297
|
-
this.searchInput = new UntypedFormControl();
|
|
298
|
-
this.showDescktopCleanBtn = false;
|
|
299
|
-
this.destroy = new Subject();
|
|
300
|
-
this.searchPlaceholder = 'Buscar';
|
|
301
|
-
this.debounceTime = 500;
|
|
302
|
-
this.inputType = 'text';
|
|
303
|
-
this.cleanWhenClose = true;
|
|
304
|
-
this.valueChange = new EventEmitter();
|
|
305
|
-
this.whenSearchChanges = new EventEmitter();
|
|
306
|
-
this.className = 'matecu-topbar-search';
|
|
307
|
-
}
|
|
308
|
-
set value(val) {
|
|
309
|
-
if (typeof val === 'string') {
|
|
310
|
-
this.searchInput.setValue(val);
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
this.searchInput.reset();
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
ngOnInit() {
|
|
317
|
-
this.watchSearch();
|
|
318
|
-
}
|
|
319
|
-
toogleSearch() {
|
|
320
|
-
this.showMobileInput = !this.showMobileInput;
|
|
321
|
-
}
|
|
322
|
-
closeMobile() {
|
|
323
|
-
if (this.cleanWhenClose) {
|
|
324
|
-
this.searchInput.reset();
|
|
325
|
-
}
|
|
326
|
-
this.showMobileInput = false;
|
|
327
|
-
}
|
|
328
|
-
watchSearch() {
|
|
329
|
-
this.searchInput.valueChanges
|
|
330
|
-
.pipe(tap((value) => this.setShowDescktopCleanBtn(value)), debounceTime(this.debounceTime), distinctUntilChanged(), tap((value) => this.searchChanges(value)), takeUntil(this.destroy))
|
|
331
|
-
.subscribe();
|
|
332
|
-
}
|
|
333
|
-
searchChanges(searchVal) {
|
|
334
|
-
const value = typeof searchVal === 'string' && searchVal.length > 0 ? searchVal : '';
|
|
335
|
-
this.whenSearchChanges.emit(value);
|
|
336
|
-
this.valueChange.emit(value);
|
|
337
|
-
}
|
|
338
|
-
setShowDescktopCleanBtn(value) {
|
|
339
|
-
this.showDescktopCleanBtn = typeof value === 'string' && value.length > 0;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
MatecuTopbarSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
343
|
-
MatecuTopbarSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarSearchComponent, isStandalone: true, selector: "matecu-topbar-search", inputs: { searchPlaceholder: "searchPlaceholder", debounceTime: "debounceTime", inputType: "inputType", cleanWhenClose: "cleanWhenClose", value: "value" }, outputs: { valueChange: "valueChange", whenSearchChanges: "whenSearchChanges" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<button mat-icon-button class=\"only-mobile\" (click)=\"toogleSearch()\">\n <mat-icon>search</mat-icon>\n</button>\n\n<div class=\"matecu-topbar-search__input\" [ngClass]=\"{'mobile-input-active': showMobileInput}\">\n <mat-icon>search</mat-icon>\n <input [type]=\"inputType\" [formControl]=\"searchInput\" [placeholder]=\"searchPlaceholder\" />\n <button mat-icon-button (click)=\"closeMobile()\" [ngClass]=\"{'show-btn': showDescktopCleanBtn}\">\n <mat-icon>close</mat-icon>\n </button>\n\n</div>\n", styles: [":host{flex-grow:1;display:flex;justify-content:flex-end;align-items:center;position:relative;padding:7px;min-height:64px;max-height:64px;box-sizing:border-box}:host .matecu-topbar-search__input{display:block;position:relative;z-index:2}:host .matecu-topbar-search__input input{border:transparent;border-radius:4px;padding:5px 35px 5px 40px;background-color:#ffffff4d;min-width:200px;width:200px;transition:all .3s ease-in-out;height:39px;color:currentColor}:host .matecu-topbar-search__input input:focus{min-width:290px}:host .matecu-topbar-search__input input::placeholder{color:currentColor}:host .matecu-topbar-search__input input[type=search]::-webkit-search-decoration,:host .matecu-topbar-search__input input[type=search]::-webkit-search-cancel-button,:host .matecu-topbar-search__input input[type=search]::-webkit-search-results-button,:host .matecu-topbar-search__input input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}:host .matecu-topbar-search__input>mat-icon{position:absolute;left:12px;top:10px}:host .matecu-topbar-search__input button{position:absolute;right:0;top:0;transform:scale(0);transition:transform .3s ease-in-out}:host .matecu-topbar-search__input button mat-icon{font-size:20px}:host .matecu-topbar-search__input button.show-btn{transform:scale(1)}@media screen and (max-width: 768px){:host .matecu-topbar-search__input{position:fixed;top:0;left:0;right:0;height:64px;color:#333;transform:translateY(-110%);transition:all .3s ease-in-out}:host .matecu-topbar-search__input input{width:100%;height:100%;background-color:#fff;border-radius:0;padding-right:30px}:host .matecu-topbar-search__input input:focus{min-width:100%}:host .matecu-topbar-search__input>mat-icon{top:20px}:host .matecu-topbar-search__input button{position:absolute;right:5px;top:10px;transform:scale(1)}}:host .matecu-topbar-search__input.mobile-input-active{transform:translateY(0)}@media screen and (max-width: 768px){:host .matecu-topbar-search__input.mobile-input-active{display:block}}:host .only-mobile{display:none}@media screen and (max-width: 768px){:host .only-mobile{display:block}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
|
|
344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarSearchComponent, decorators: [{
|
|
345
|
-
type: Component,
|
|
346
|
-
args: [{ selector: 'matecu-topbar-search', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule], template: "<button mat-icon-button class=\"only-mobile\" (click)=\"toogleSearch()\">\n <mat-icon>search</mat-icon>\n</button>\n\n<div class=\"matecu-topbar-search__input\" [ngClass]=\"{'mobile-input-active': showMobileInput}\">\n <mat-icon>search</mat-icon>\n <input [type]=\"inputType\" [formControl]=\"searchInput\" [placeholder]=\"searchPlaceholder\" />\n <button mat-icon-button (click)=\"closeMobile()\" [ngClass]=\"{'show-btn': showDescktopCleanBtn}\">\n <mat-icon>close</mat-icon>\n </button>\n\n</div>\n", styles: [":host{flex-grow:1;display:flex;justify-content:flex-end;align-items:center;position:relative;padding:7px;min-height:64px;max-height:64px;box-sizing:border-box}:host .matecu-topbar-search__input{display:block;position:relative;z-index:2}:host .matecu-topbar-search__input input{border:transparent;border-radius:4px;padding:5px 35px 5px 40px;background-color:#ffffff4d;min-width:200px;width:200px;transition:all .3s ease-in-out;height:39px;color:currentColor}:host .matecu-topbar-search__input input:focus{min-width:290px}:host .matecu-topbar-search__input input::placeholder{color:currentColor}:host .matecu-topbar-search__input input[type=search]::-webkit-search-decoration,:host .matecu-topbar-search__input input[type=search]::-webkit-search-cancel-button,:host .matecu-topbar-search__input input[type=search]::-webkit-search-results-button,:host .matecu-topbar-search__input input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}:host .matecu-topbar-search__input>mat-icon{position:absolute;left:12px;top:10px}:host .matecu-topbar-search__input button{position:absolute;right:0;top:0;transform:scale(0);transition:transform .3s ease-in-out}:host .matecu-topbar-search__input button mat-icon{font-size:20px}:host .matecu-topbar-search__input button.show-btn{transform:scale(1)}@media screen and (max-width: 768px){:host .matecu-topbar-search__input{position:fixed;top:0;left:0;right:0;height:64px;color:#333;transform:translateY(-110%);transition:all .3s ease-in-out}:host .matecu-topbar-search__input input{width:100%;height:100%;background-color:#fff;border-radius:0;padding-right:30px}:host .matecu-topbar-search__input input:focus{min-width:100%}:host .matecu-topbar-search__input>mat-icon{top:20px}:host .matecu-topbar-search__input button{position:absolute;right:5px;top:10px;transform:scale(1)}}:host .matecu-topbar-search__input.mobile-input-active{transform:translateY(0)}@media screen and (max-width: 768px){:host .matecu-topbar-search__input.mobile-input-active{display:block}}:host .only-mobile{display:none}@media screen and (max-width: 768px){:host .only-mobile{display:block}}\n"] }]
|
|
347
|
-
}], ctorParameters: function () { return []; }, propDecorators: { searchPlaceholder: [{
|
|
348
|
-
type: Input
|
|
349
|
-
}], debounceTime: [{
|
|
350
|
-
type: Input
|
|
351
|
-
}], inputType: [{
|
|
352
|
-
type: Input
|
|
353
|
-
}], cleanWhenClose: [{
|
|
354
|
-
type: Input
|
|
355
|
-
}], value: [{
|
|
356
|
-
type: Input
|
|
357
|
-
}], valueChange: [{
|
|
358
|
-
type: Output
|
|
359
|
-
}], whenSearchChanges: [{
|
|
360
|
-
type: Output
|
|
361
|
-
}], className: [{
|
|
362
|
-
type: HostBinding,
|
|
363
|
-
args: ['class']
|
|
364
|
-
}] } });
|
|
365
|
-
|
|
366
|
-
class MatecuTopbarActionComponent {
|
|
367
|
-
constructor() { }
|
|
368
|
-
ngOnInit() { }
|
|
369
|
-
}
|
|
370
|
-
MatecuTopbarActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
371
|
-
MatecuTopbarActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarActionComponent, isStandalone: true, selector: "matecu-topbar-action", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center;min-height:64px;max-height:64px}\n"] });
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarActionComponent, decorators: [{
|
|
373
|
-
type: Component,
|
|
374
|
-
args: [{ selector: 'matecu-topbar-action', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center;min-height:64px;max-height:64px}\n"] }]
|
|
375
|
-
}], ctorParameters: function () { return []; } });
|
|
376
|
-
|
|
377
|
-
class MatecuTopbarHeaderRowComponent {
|
|
378
|
-
}
|
|
379
|
-
MatecuTopbarHeaderRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarHeaderRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
380
|
-
MatecuTopbarHeaderRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuTopbarHeaderRowComponent, isStandalone: true, selector: "matecu-topbar-header-row", ngImport: i0, template: " <ng-content select=\"matecu-topbar-action[position='left']\"></ng-content>\n <ng-content select=\"matecu-topbar-fab\"></ng-content>\n <ng-content select=\"matecu-topbar-action[position='after-fab']\"></ng-content>\n <ng-content select=\"matecu-topbar-title\"></ng-content>\n <ng-content select=\"matecu-topbar-action[position='before-search']\"></ng-content>\n <ng-content select=\"matecu-topbar-search\"></ng-content>\n <ng-content select=\"matecu-topbar-action:not([position])\"></ng-content>\n <ng-content select=\"matecu-topbar-action[position='right']\"></ng-content>", styles: [":host{display:flex;white-space:normal;justify-content:space-between;column-gap:1px;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }] });
|
|
381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarHeaderRowComponent, decorators: [{
|
|
382
|
-
type: Component,
|
|
383
|
-
args: [{ selector: 'matecu-topbar-header-row', standalone: true, imports: [CommonModule, MatToolbarModule], template: " <ng-content select=\"matecu-topbar-action[position='left']\"></ng-content>\n <ng-content select=\"matecu-topbar-fab\"></ng-content>\n <ng-content select=\"matecu-topbar-action[position='after-fab']\"></ng-content>\n <ng-content select=\"matecu-topbar-title\"></ng-content>\n <ng-content select=\"matecu-topbar-action[position='before-search']\"></ng-content>\n <ng-content select=\"matecu-topbar-search\"></ng-content>\n <ng-content select=\"matecu-topbar-action:not([position])\"></ng-content>\n <ng-content select=\"matecu-topbar-action[position='right']\"></ng-content>", styles: [":host{display:flex;white-space:normal;justify-content:space-between;column-gap:1px;width:100%;height:100%}\n"] }]
|
|
384
|
-
}] });
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* @deprecated Usar stanalone components
|
|
388
|
-
*/
|
|
389
|
-
class MatecuTopbarLayoutModule {
|
|
390
|
-
}
|
|
391
|
-
MatecuTopbarLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
392
|
-
MatecuTopbarLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarLayoutModule, imports: [CommonModule,
|
|
393
|
-
MatToolbarModule,
|
|
394
|
-
MatIconModule,
|
|
395
|
-
FormsModule,
|
|
396
|
-
ReactiveFormsModule,
|
|
397
|
-
MatButtonModule,
|
|
398
|
-
MatecuTopbarLayoutComponent,
|
|
399
|
-
MatecuTopbarTitleComponent,
|
|
400
|
-
MatecuTopbarBodyComponent,
|
|
401
|
-
MatecuTopbarFabComponent,
|
|
402
|
-
MatecuTopbarSearchComponent,
|
|
403
|
-
MatecuTopbarActionComponent,
|
|
404
|
-
MatecuTopbarHeaderRowComponent], exports: [MatecuTopbarLayoutComponent,
|
|
405
|
-
MatecuTopbarTitleComponent,
|
|
406
|
-
MatecuTopbarBodyComponent,
|
|
407
|
-
MatecuTopbarFabComponent,
|
|
408
|
-
MatecuTopbarSearchComponent,
|
|
409
|
-
MatecuTopbarActionComponent,
|
|
410
|
-
MatecuTopbarHeaderRowComponent] });
|
|
411
|
-
MatecuTopbarLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarLayoutModule, imports: [CommonModule,
|
|
412
|
-
MatToolbarModule,
|
|
413
|
-
MatIconModule,
|
|
414
|
-
FormsModule,
|
|
415
|
-
ReactiveFormsModule,
|
|
416
|
-
MatButtonModule,
|
|
417
|
-
MatecuTopbarLayoutComponent,
|
|
418
|
-
MatecuTopbarTitleComponent,
|
|
419
|
-
MatecuTopbarBodyComponent,
|
|
420
|
-
MatecuTopbarFabComponent,
|
|
421
|
-
MatecuTopbarSearchComponent,
|
|
422
|
-
MatecuTopbarActionComponent,
|
|
423
|
-
MatecuTopbarHeaderRowComponent] });
|
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuTopbarLayoutModule, decorators: [{
|
|
425
|
-
type: NgModule,
|
|
426
|
-
args: [{
|
|
427
|
-
declarations: [],
|
|
428
|
-
imports: [
|
|
429
|
-
CommonModule,
|
|
430
|
-
MatToolbarModule,
|
|
431
|
-
MatIconModule,
|
|
432
|
-
FormsModule,
|
|
433
|
-
ReactiveFormsModule,
|
|
434
|
-
MatButtonModule,
|
|
435
|
-
MatecuTopbarLayoutComponent,
|
|
436
|
-
MatecuTopbarTitleComponent,
|
|
437
|
-
MatecuTopbarBodyComponent,
|
|
438
|
-
MatecuTopbarFabComponent,
|
|
439
|
-
MatecuTopbarSearchComponent,
|
|
440
|
-
MatecuTopbarActionComponent,
|
|
441
|
-
MatecuTopbarHeaderRowComponent
|
|
442
|
-
],
|
|
443
|
-
exports: [
|
|
444
|
-
MatecuTopbarLayoutComponent,
|
|
445
|
-
MatecuTopbarTitleComponent,
|
|
446
|
-
MatecuTopbarBodyComponent,
|
|
447
|
-
MatecuTopbarFabComponent,
|
|
448
|
-
MatecuTopbarSearchComponent,
|
|
449
|
-
MatecuTopbarActionComponent,
|
|
450
|
-
MatecuTopbarHeaderRowComponent
|
|
451
|
-
],
|
|
452
|
-
}]
|
|
453
|
-
}] });
|
|
454
|
-
|
|
455
|
-
var MatecuAlertBoxType;
|
|
456
|
-
(function (MatecuAlertBoxType) {
|
|
457
|
-
MatecuAlertBoxType["warning"] = "warning";
|
|
458
|
-
MatecuAlertBoxType["success"] = "success";
|
|
459
|
-
MatecuAlertBoxType["danger"] = "danger";
|
|
460
|
-
MatecuAlertBoxType["info"] = "info";
|
|
461
|
-
})(MatecuAlertBoxType || (MatecuAlertBoxType = {}));
|
|
462
|
-
|
|
463
|
-
class MatecuAlertBoxComponent {
|
|
464
|
-
constructor() {
|
|
465
|
-
this.classNameBase = 'matecu-alert-box';
|
|
466
|
-
this.alertIcon = false;
|
|
467
|
-
this.className = this.classNameBase;
|
|
468
|
-
}
|
|
469
|
-
get color() {
|
|
470
|
-
return this.alertColor;
|
|
471
|
-
}
|
|
472
|
-
set color(value) {
|
|
473
|
-
this.alertColor = value;
|
|
474
|
-
if (!!value) {
|
|
475
|
-
this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
this.className = this.classNameBase;
|
|
479
|
-
}
|
|
480
|
-
this.updateIcon();
|
|
481
|
-
}
|
|
482
|
-
get icon() {
|
|
483
|
-
return this.alertIcon;
|
|
484
|
-
}
|
|
485
|
-
set icon(value) {
|
|
486
|
-
this.alertIcon = value;
|
|
487
|
-
}
|
|
488
|
-
ngOnInit() { }
|
|
489
|
-
updateIcon() {
|
|
490
|
-
switch (this.color) {
|
|
491
|
-
case MatecuAlertBoxType.danger:
|
|
492
|
-
this.iconValue = 'dangerous';
|
|
493
|
-
break;
|
|
494
|
-
case MatecuAlertBoxType.warning:
|
|
495
|
-
this.iconValue = 'warning';
|
|
496
|
-
break;
|
|
497
|
-
case MatecuAlertBoxType.success:
|
|
498
|
-
this.iconValue = 'check_circle';
|
|
499
|
-
break;
|
|
500
|
-
case MatecuAlertBoxType.info:
|
|
501
|
-
this.iconValue = 'info';
|
|
502
|
-
break;
|
|
503
|
-
default:
|
|
504
|
-
this.iconValue = null;
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
MatecuAlertBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
510
|
-
MatecuAlertBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuAlertBoxComponent, isStandalone: true, selector: "matecu-alert-box", inputs: { color: "color", icon: "icon" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-container *ngIf=\"icon && iconValue\">\n <div class=\"matecu-alert-box__icon\">\n <mat-icon>{{iconValue}}</mat-icon>\n </div>\n</ng-container>\n<div class=\"matecu-alert-box__content\">\n <ng-content>\n\n\n </ng-content>\n</div>\n", styles: [":host.matecu-alert-box{display:flex;padding:1rem;border-radius:.25rem;position:relative;border:1px solid rgb(224,224,224);box-sizing:border-box;margin:1rem 0}:host.matecu-alert-box--success{color:#0f5032;background-color:#d2e6dc;border-color:#badccd}:host.matecu-alert-box--danger{color:#821e28;background-color:#f8d7da;border-color:#f5c2c7}:host.matecu-alert-box--warning{color:#644d03;background-color:#fff3cd;border-color:#ffecb4}:host.matecu-alert-box--info{color:#055160;background-color:#cff4fc;border-color:#b6effb}:host.matecu-alert-box .matecu-alert-box__icon{display:flex;margin-right:1rem}:host.matecu-alert-box .matecu-alert-box__content{align-self:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertBoxComponent, decorators: [{
|
|
512
|
-
type: Component,
|
|
513
|
-
args: [{ selector: 'matecu-alert-box', standalone: true, imports: [CommonModule, MatIconModule], template: "<ng-container *ngIf=\"icon && iconValue\">\n <div class=\"matecu-alert-box__icon\">\n <mat-icon>{{iconValue}}</mat-icon>\n </div>\n</ng-container>\n<div class=\"matecu-alert-box__content\">\n <ng-content>\n\n\n </ng-content>\n</div>\n", styles: [":host.matecu-alert-box{display:flex;padding:1rem;border-radius:.25rem;position:relative;border:1px solid rgb(224,224,224);box-sizing:border-box;margin:1rem 0}:host.matecu-alert-box--success{color:#0f5032;background-color:#d2e6dc;border-color:#badccd}:host.matecu-alert-box--danger{color:#821e28;background-color:#f8d7da;border-color:#f5c2c7}:host.matecu-alert-box--warning{color:#644d03;background-color:#fff3cd;border-color:#ffecb4}:host.matecu-alert-box--info{color:#055160;background-color:#cff4fc;border-color:#b6effb}:host.matecu-alert-box .matecu-alert-box__icon{display:flex;margin-right:1rem}:host.matecu-alert-box .matecu-alert-box__content{align-self:center}\n"] }]
|
|
514
|
-
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
|
|
515
|
-
type: Input
|
|
516
|
-
}], icon: [{
|
|
517
|
-
type: Input
|
|
518
|
-
}], className: [{
|
|
519
|
-
type: HostBinding,
|
|
520
|
-
args: ['class']
|
|
521
|
-
}] } });
|
|
522
|
-
|
|
523
|
-
class MatecuAlertDialogComponent {
|
|
524
|
-
constructor(dialogData, dialogRef) {
|
|
525
|
-
this.dialogData = dialogData;
|
|
526
|
-
this.dialogRef = dialogRef;
|
|
527
|
-
this.hasTitle = false;
|
|
528
|
-
this.hasDismissBtn = false;
|
|
529
|
-
this.hasActionBtn = false;
|
|
530
|
-
this.showActions = false;
|
|
531
|
-
this.setHasTitle();
|
|
532
|
-
this.setHasDismissBtn();
|
|
533
|
-
this.setHasActionBtn();
|
|
534
|
-
this.setShowActions();
|
|
535
|
-
}
|
|
536
|
-
ngOnInit() { }
|
|
537
|
-
activateAction() {
|
|
538
|
-
this.dialogRef.close(true);
|
|
539
|
-
}
|
|
540
|
-
setHasTitle() {
|
|
541
|
-
this.hasTitle = this.isValidString(this.dialogData.title);
|
|
542
|
-
}
|
|
543
|
-
setHasDismissBtn() {
|
|
544
|
-
this.hasDismissBtn = this.isValidString(this.dialogData.dismissText);
|
|
545
|
-
}
|
|
546
|
-
setHasActionBtn() {
|
|
547
|
-
this.hasActionBtn = this.isValidString(this.dialogData.action);
|
|
548
|
-
}
|
|
549
|
-
setShowActions() {
|
|
550
|
-
this.showActions = this.hasActionBtn || this.hasDismissBtn;
|
|
551
|
-
}
|
|
552
|
-
isValidString(str) {
|
|
553
|
-
const isValid = typeof str === 'string' && str.trim().length > 0;
|
|
554
|
-
return isValid;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
MatecuAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
558
|
-
MatecuAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuAlertDialogComponent, isStandalone: true, selector: "matecu-alert-dialog", ngImport: i0, template: "<h2 mat-dialog-title *ngIf=\"hasTitle\">{{dialogData.title}}</h2>\n<mat-dialog-content>\n\n <matecu-alert-box [color]=\"dialogData.type\" [icon]=\"!!dialogData.icon\">\n {{dialogData.message}}\n </matecu-alert-box>\n\n</mat-dialog-content>\n<mat-dialog-actions *ngIf=\"showActions\" align=\"end\">\n <button mat-button color=\"primary\" tabindex=\"-1\" mat-dialog-close\n *ngIf=\"hasDismissBtn\">{{dialogData.dismissText}}</button>\n <button mat-button color=\"primary\" tabindex=\"-2\" (click)=\"activateAction()\"\n *ngIf=\"hasActionBtn\">{{dialogData.action}}</button>\n</mat-dialog-actions>\n", styles: [":host matecu-alert-box{max-width:900px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: MatecuAlertBoxComponent, selector: "matecu-alert-box", inputs: ["color", "icon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertDialogComponent, decorators: [{
|
|
560
|
-
type: Component,
|
|
561
|
-
args: [{ selector: 'matecu-alert-dialog', standalone: true, imports: [CommonModule, MatDialogModule, MatIconModule, MatecuAlertBoxComponent, MatButtonModule], template: "<h2 mat-dialog-title *ngIf=\"hasTitle\">{{dialogData.title}}</h2>\n<mat-dialog-content>\n\n <matecu-alert-box [color]=\"dialogData.type\" [icon]=\"!!dialogData.icon\">\n {{dialogData.message}}\n </matecu-alert-box>\n\n</mat-dialog-content>\n<mat-dialog-actions *ngIf=\"showActions\" align=\"end\">\n <button mat-button color=\"primary\" tabindex=\"-1\" mat-dialog-close\n *ngIf=\"hasDismissBtn\">{{dialogData.dismissText}}</button>\n <button mat-button color=\"primary\" tabindex=\"-2\" (click)=\"activateAction()\"\n *ngIf=\"hasActionBtn\">{{dialogData.action}}</button>\n</mat-dialog-actions>\n", styles: [":host matecu-alert-box{max-width:900px}\n"] }]
|
|
562
|
-
}], ctorParameters: function () {
|
|
563
|
-
return [{ type: undefined, decorators: [{
|
|
564
|
-
type: Inject,
|
|
565
|
-
args: [MAT_DIALOG_DATA]
|
|
566
|
-
}] }, { type: i1$1.MatDialogRef }];
|
|
567
|
-
} });
|
|
568
|
-
|
|
569
|
-
class MatecuAlertSnackBarComponent {
|
|
570
|
-
constructor(data, snackBarRef) {
|
|
571
|
-
this.data = data;
|
|
572
|
-
this.snackBarRef = snackBarRef;
|
|
573
|
-
this.classNameBase = 'matecu-alert-snackbar';
|
|
574
|
-
this.className = this.classNameBase;
|
|
575
|
-
this.title = data.title;
|
|
576
|
-
this.message = data.message;
|
|
577
|
-
this.action = data.action;
|
|
578
|
-
this.color = data.type;
|
|
579
|
-
}
|
|
580
|
-
get color() {
|
|
581
|
-
return this.alertColor;
|
|
582
|
-
}
|
|
583
|
-
set color(value) {
|
|
584
|
-
this.alertColor = value;
|
|
585
|
-
this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
|
|
586
|
-
}
|
|
587
|
-
dismiss() {
|
|
588
|
-
this.snackBarRef.dismissWithAction();
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
MatecuAlertSnackBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertSnackBarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$2.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
592
|
-
MatecuAlertSnackBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: MatecuAlertSnackBarComponent, isStandalone: true, selector: "matecu-alert-snack-bar", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<div>\n <strong>{{title}}</strong> \n <span>{{message}}</span>\n</div>\n<div *ngIf=\"!!action?.length\">\n\n <button mat-button color=\"accent\" (click)=\"dismiss()\">{{action}}</button>\n</div>", styles: [":host.matecu-alert-snackbar{display:flex;align-items:center}:host.matecu-alert-snackbar>*:not(:first-child){margin-left:10px}:host.matecu-alert-snackbar--success strong{color:#20db20}:host.matecu-alert-snackbar--danger strong{color:red}:host.matecu-alert-snackbar--warning strong{color:orange}:host.matecu-alert-snackbar--info strong{color:#07a0ed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatSnackBarModule }] });
|
|
593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertSnackBarComponent, decorators: [{
|
|
594
|
-
type: Component,
|
|
595
|
-
args: [{ selector: 'matecu-alert-snack-bar', standalone: true, imports: [CommonModule, MatButtonModule, MatSnackBarModule], template: "<div>\n <strong>{{title}}</strong> \n <span>{{message}}</span>\n</div>\n<div *ngIf=\"!!action?.length\">\n\n <button mat-button color=\"accent\" (click)=\"dismiss()\">{{action}}</button>\n</div>", styles: [":host.matecu-alert-snackbar{display:flex;align-items:center}:host.matecu-alert-snackbar>*:not(:first-child){margin-left:10px}:host.matecu-alert-snackbar--success strong{color:#20db20}:host.matecu-alert-snackbar--danger strong{color:red}:host.matecu-alert-snackbar--warning strong{color:orange}:host.matecu-alert-snackbar--info strong{color:#07a0ed}\n"] }]
|
|
596
|
-
}], ctorParameters: function () {
|
|
597
|
-
return [{ type: undefined, decorators: [{
|
|
598
|
-
type: Inject,
|
|
599
|
-
args: [MAT_SNACK_BAR_DATA]
|
|
600
|
-
}] }, { type: i1$2.MatSnackBarRef }];
|
|
601
|
-
}, propDecorators: { className: [{
|
|
602
|
-
type: HostBinding,
|
|
603
|
-
args: ['class']
|
|
604
|
-
}] } });
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* @deprecated Usar stanalone components
|
|
608
|
-
*/
|
|
609
|
-
class MatecuAlertBoxModule {
|
|
610
|
-
}
|
|
611
|
-
MatecuAlertBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
612
|
-
MatecuAlertBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertBoxModule, imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule, MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent], exports: [MatecuAlertBoxComponent] });
|
|
613
|
-
MatecuAlertBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertBoxModule, imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule, MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent] });
|
|
614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuAlertBoxModule, decorators: [{
|
|
615
|
-
type: NgModule,
|
|
616
|
-
args: [{
|
|
617
|
-
declarations: [],
|
|
618
|
-
imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule, MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent],
|
|
619
|
-
exports: [MatecuAlertBoxComponent]
|
|
620
|
-
}]
|
|
621
|
-
}] });
|
|
622
|
-
|
|
623
|
-
class MatecuSnackBarService {
|
|
624
|
-
constructor(snackBar) {
|
|
625
|
-
this.snackBar = snackBar;
|
|
626
|
-
}
|
|
627
|
-
openError(error, title, action, config) {
|
|
628
|
-
const message = this.getErrorMessage(error);
|
|
629
|
-
const titleStr = title || 'ERROR';
|
|
630
|
-
const type = MatecuAlertBoxType.danger;
|
|
631
|
-
return this.openAlert(message, titleStr, type, action, config);
|
|
632
|
-
}
|
|
633
|
-
openSuccess(message, title, action, config) {
|
|
634
|
-
const titleStr = title || 'OK';
|
|
635
|
-
const type = MatecuAlertBoxType.success;
|
|
636
|
-
return this.openAlert(message, titleStr, type, action, config);
|
|
637
|
-
}
|
|
638
|
-
openWarning(message, title, action, config) {
|
|
639
|
-
const titleStr = title || 'WARNING';
|
|
640
|
-
const type = MatecuAlertBoxType.warning;
|
|
641
|
-
return this.openAlert(message, titleStr, type, action, config);
|
|
642
|
-
}
|
|
643
|
-
openInfo(message, title, action, config) {
|
|
644
|
-
const titleStr = title || 'INFO';
|
|
645
|
-
const type = MatecuAlertBoxType.info;
|
|
646
|
-
return this.openAlert(message, titleStr, type, action, config);
|
|
647
|
-
}
|
|
648
|
-
open(message, action, config) {
|
|
649
|
-
return this.snackBar.open(message, action, config);
|
|
650
|
-
}
|
|
651
|
-
dismiss() {
|
|
652
|
-
this.snackBar.dismiss();
|
|
653
|
-
}
|
|
654
|
-
openAlert(message, title, type, action, config) {
|
|
655
|
-
const data = {
|
|
656
|
-
message,
|
|
657
|
-
title,
|
|
658
|
-
action,
|
|
659
|
-
type
|
|
660
|
-
};
|
|
661
|
-
const dialogConfig = Object.assign(Object.assign({}, config), { data });
|
|
662
|
-
return this.snackBar.openFromComponent(MatecuAlertSnackBarComponent, dialogConfig);
|
|
663
|
-
}
|
|
664
|
-
getErrorMessage(err) {
|
|
665
|
-
const error = new Error();
|
|
666
|
-
if (typeof err === 'string') {
|
|
667
|
-
return err;
|
|
668
|
-
}
|
|
669
|
-
if (err instanceof Error) {
|
|
670
|
-
return err.message;
|
|
671
|
-
}
|
|
672
|
-
return '';
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
MatecuSnackBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSnackBarService, deps: [{ token: i1$2.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
676
|
-
MatecuSnackBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSnackBarService, providedIn: 'root' });
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: MatecuSnackBarService, decorators: [{
|
|
678
|
-
type: Injectable,
|
|
679
|
-
args: [{
|
|
680
|
-
providedIn: 'root'
|
|
681
|
-
}]
|
|
682
|
-
}], ctorParameters: function () { return [{ type: i1$2.MatSnackBar }]; } });
|
|
683
|
-
|
|
684
|
-
/*
|
|
685
|
-
* Public API Surface of angular-matecu
|
|
686
|
-
*/
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* Generated bundle index. Do not edit.
|
|
690
|
-
*/
|
|
691
|
-
|
|
692
|
-
export { MatecuAlertBoxComponent, MatecuAlertBoxModule, MatecuAlertBoxType, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent, MatecuSnackBarService, MatecuSpinnerComponent, MatecuSpinnerModule, MatecuSpinnerService, MatecuTopbarActionComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent, MatecuTopbarHeaderRowComponent, MatecuTopbarLayoutComponent, MatecuTopbarLayoutModule, MatecuTopbarSearchComponent, MatecuTopbarTitleComponent };
|
|
693
|
-
//# sourceMappingURL=angular-matecu.mjs.map
|