angular-matecu 2.0.7 → 2.0.12

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.
Files changed (40) hide show
  1. package/README.md +29 -0
  2. package/{esm2015/angular-matecu.js → esm2020/angular-matecu.mjs} +0 -0
  3. package/{esm2015/lib/modules/matecu-alert-box/components/matecu-alert-box/matecu-alert-box.component.js → esm2020/lib/modules/matecu-alert-box/components/matecu-alert-box/matecu-alert-box.component.mjs} +5 -9
  4. package/esm2020/lib/modules/matecu-alert-box/components/matecu-alert-dialog/matecu-alert-dialog.component.mjs +51 -0
  5. package/esm2020/lib/modules/matecu-alert-box/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.mjs +41 -0
  6. package/esm2020/lib/modules/matecu-alert-box/matecu-alert-box.module.mjs +24 -0
  7. package/esm2020/lib/modules/matecu-alert-box/services/matecu-snack-bar.service.mjs +66 -0
  8. package/{esm2015/lib/modules/matecu-alert-box/types/matecu-alert-dialog.js → esm2020/lib/modules/matecu-alert-box/types/matecu-alert-dialog.mjs} +0 -0
  9. package/esm2020/lib/modules/matecu-alert-box/types/matecu-alert-snackbar.mjs +2 -0
  10. package/{esm2015/lib/modules/matecu-alert-box/types/matecu-altert-box-type.js → esm2020/lib/modules/matecu-alert-box/types/matecu-altert-box-type.mjs} +0 -0
  11. package/esm2020/lib/modules/matecu-spinner/components/matecu-spinner/matecu-spinner.component.mjs +57 -0
  12. package/{esm2015/lib/modules/matecu-spinner/matecu-spinner.module.js → esm2020/lib/modules/matecu-spinner/matecu-spinner.module.mjs} +4 -4
  13. package/{esm2015/lib/modules/matecu-spinner/services/matecu-spinner.service.js → esm2020/lib/modules/matecu-spinner/services/matecu-spinner.service.mjs} +3 -3
  14. package/{esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-actions/matecu-topbar-actions.component.js → esm2020/lib/modules/matecu-topbar-layout/components/matecu-topbar-actions/matecu-topbar-actions.component.mjs} +5 -9
  15. package/{esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-body/matecu-topbar-body.component.js → esm2020/lib/modules/matecu-topbar-layout/components/matecu-topbar-body/matecu-topbar-body.component.mjs} +5 -9
  16. package/{esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-fab/matecu-topbar-fab.component.js → esm2020/lib/modules/matecu-topbar-layout/components/matecu-topbar-fab/matecu-topbar-fab.component.mjs} +5 -9
  17. package/esm2020/lib/modules/matecu-topbar-layout/components/matecu-topbar-layout/matecu-topbar-layout.component.mjs +99 -0
  18. package/esm2020/lib/modules/matecu-topbar-layout/components/matecu-topbar-search/matecu-topbar-search.component.mjs +81 -0
  19. package/{esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-title/matecu-topbar-title.component.js → esm2020/lib/modules/matecu-topbar-layout/components/matecu-topbar-title/matecu-topbar-title.component.mjs} +5 -9
  20. package/{esm2015/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.js → esm2020/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.mjs} +4 -4
  21. package/esm2020/public-api.mjs +30 -0
  22. package/fesm2015/angular-matecu.mjs +668 -0
  23. package/fesm2015/angular-matecu.mjs.map +1 -0
  24. package/{fesm2015/angular-matecu.js → fesm2020/angular-matecu.mjs} +154 -93
  25. package/fesm2020/angular-matecu.mjs.map +1 -0
  26. package/lib/modules/matecu-alert-box/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.d.ts +20 -0
  27. package/lib/modules/matecu-alert-box/matecu-alert-box.module.d.ts +7 -5
  28. package/lib/modules/matecu-alert-box/services/matecu-snack-bar.service.d.ts +17 -0
  29. package/lib/modules/matecu-alert-box/types/matecu-alert-snackbar.d.ts +7 -0
  30. package/package.json +23 -10
  31. package/public-api.d.ts +2 -0
  32. package/bundles/angular-matecu.umd.js +0 -681
  33. package/bundles/angular-matecu.umd.js.map +0 -1
  34. package/esm2015/lib/modules/matecu-alert-box/components/matecu-alert-dialog/matecu-alert-dialog.component.js +0 -55
  35. package/esm2015/lib/modules/matecu-alert-box/matecu-alert-box.module.js +0 -23
  36. package/esm2015/lib/modules/matecu-spinner/components/matecu-spinner/matecu-spinner.component.js +0 -61
  37. package/esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-layout/matecu-topbar-layout.component.js +0 -103
  38. package/esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-search/matecu-topbar-search.component.js +0 -85
  39. package/esm2015/public-api.js +0 -28
  40. package/fesm2015/angular-matecu.js.map +0 -1
@@ -0,0 +1,668 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, HostBinding, Input, NgModule, EventEmitter, Output, Inject } from '@angular/core';
3
+ import * as i2 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 i4 from '@angular/forms';
8
+ import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i1 from '@angular/material/toolbar';
10
+ import { MatToolbarModule } from '@angular/material/toolbar';
11
+ import * as i1$1 from '@angular/material/button';
12
+ import { MatButtonModule } from '@angular/material/button';
13
+ import * as i3 from '@angular/material/icon';
14
+ import { MatIconModule } from '@angular/material/icon';
15
+ import * as i1$2 from '@angular/material/dialog';
16
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
17
+ import * as i1$3 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: "13.3.8", ngImport: i0, type: MatecuSpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
53
+ MatecuSpinnerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSpinnerService, providedIn: 'root' });
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", 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: "13.3.8", ngImport: i0, type: MatecuSpinnerComponent, deps: [{ token: MatecuSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
95
+ MatecuSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuSpinnerComponent, 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"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSpinnerComponent, decorators: [{
97
+ type: Component,
98
+ args: [{ selector: 'matecu-spinner', 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
+ class MatecuSpinnerModule {
113
+ }
114
+ MatecuSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
115
+ MatecuSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSpinnerModule, declarations: [MatecuSpinnerComponent], imports: [CommonModule], exports: [MatecuSpinnerComponent] });
116
+ MatecuSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSpinnerModule, imports: [[
117
+ CommonModule
118
+ ]] });
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSpinnerModule, decorators: [{
120
+ type: NgModule,
121
+ args: [{
122
+ declarations: [MatecuSpinnerComponent],
123
+ imports: [
124
+ CommonModule
125
+ ],
126
+ exports: [
127
+ MatecuSpinnerComponent
128
+ ]
129
+ }]
130
+ }] });
131
+
132
+ class MatecuTopbarLayoutComponent {
133
+ constructor() {
134
+ this.className = 'matecu-topbar-layout';
135
+ this.showSearchInput = false;
136
+ this.search = false;
137
+ this.searchInput = new FormControl();
138
+ this.isProminent = false;
139
+ this.scrollingClass = 'matecu-topbar-layout--scrolling';
140
+ this.prominentClass = 'matecu-topbar-layout--prominent';
141
+ this.color = 'primary';
142
+ this.navMenu = true;
143
+ this.actionMenu = false;
144
+ this.clickNavMenu = new EventEmitter();
145
+ this.clickActionMenu = new EventEmitter();
146
+ }
147
+ set prominent(value) {
148
+ this.isProminent = value;
149
+ if (value) {
150
+ this.className += ' ' + this.prominentClass;
151
+ }
152
+ else {
153
+ const regex = new RegExp(this.prominentClass, 'ig');
154
+ this.className = this.className.replace(regex, '').trim();
155
+ }
156
+ }
157
+ ngAfterViewInit() {
158
+ this.spyScroll().subscribe();
159
+ }
160
+ toogleSearch() {
161
+ this.showSearchInput = !this.showSearchInput;
162
+ }
163
+ closeSearch() {
164
+ this.showSearchInput = false;
165
+ this.searchInput.reset();
166
+ }
167
+ onMenuClick() { }
168
+ onClickNavMenu() {
169
+ this.clickNavMenu.emit();
170
+ }
171
+ onClickActionMenu() {
172
+ this.clickActionMenu.emit();
173
+ }
174
+ spyScroll() {
175
+ const scrollabe = document.querySelector('.matecu-topbar-body');
176
+ if (!scrollabe) {
177
+ return of(null);
178
+ }
179
+ return fromEvent(scrollabe, 'scroll').pipe(tap(() => this.applyScrollStyles(scrollabe)), map(() => scrollabe));
180
+ }
181
+ applyScrollStyles(scrollabe) {
182
+ if (!scrollabe) {
183
+ return;
184
+ }
185
+ const maxScrollHeight = scrollabe.scrollHeight;
186
+ const screenHeight = screen.availHeight;
187
+ if (screenHeight > maxScrollHeight) {
188
+ return;
189
+ }
190
+ const scrollPosition = scrollabe.scrollTop;
191
+ if (scrollPosition > 20) {
192
+ this.className += ' ' + this.scrollingClass;
193
+ }
194
+ if (scrollPosition < 10) {
195
+ const regexp = new RegExp(this.scrollingClass, 'ig');
196
+ this.className = this.className.replace(regexp, '').trim();
197
+ }
198
+ }
199
+ }
200
+ MatecuTopbarLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
201
+ MatecuTopbarLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuTopbarLayoutComponent, selector: "matecu-topbar-layout", inputs: { color: "color", navMenu: "navMenu", actionMenu: "actionMenu", prominent: "prominent" }, outputs: { clickNavMenu: "clickNavMenu", clickActionMenu: "clickActionMenu" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: " <mat-toolbar [color]=\"color\">\n <ng-container *ngIf=\"navMenu\">\n <div class=\"matecu-topbar-layout__menu-btn\">\n <button mat-icon-button type=\"button\" (click)=\"onClickNavMenu()\">\n <mat-icon>menu</mat-icon>\n </button>\n </div>\n </ng-container>\n <ng-content select=\"matecu-topbar-fab\"></ng-content>\n <ng-content select=\"matecu-topbar-title\"></ng-content>\n <ng-content select=\"matecu-topbar-search\"></ng-content>\n <ng-content select=\"matecu-topbar-actions\"></ng-content>\n <ng-container *ngIf=\"actionMenu\">\n <div class=\"matecu-topbar-layout__more-actions-btn\">\n <button type=\"button\" (click)=\"onClickActionMenu()\" mat-icon-button>\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </ng-container>\n\n\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;overflow:hidden;grid-template-rows:auto 1fr;position:relative}:host,:host *,.matecu-topbar-layout,.matecu-topbar-layout *{box-sizing:border-box}:host mat-toolbar,.matecu-topbar-layout mat-toolbar{position:relative;height:64px;max-height:64px;transition:all .3s;align-items:flex-start}:host__menu-btn,:host__more-actions-btn,.matecu-topbar-layout__menu-btn,.matecu-topbar-layout__more-actions-btn{min-height:64px;display:flex;align-items:center}@media screen and (max-width: 425px){:host__menu-btn,.matecu-topbar-layout__menu-btn{margin-right:auto}}:host.matecu-topbar-layout--prominent .mat-toolbar{height:128px;max-height:128px}:host.matecu-topbar-layout--scrolling .mat-toolbar{height:64px;max-height:64px;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}\n"], components: [{ type: i1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i1$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarLayoutComponent, decorators: [{
203
+ type: Component,
204
+ args: [{ selector: 'matecu-topbar-layout', template: " <mat-toolbar [color]=\"color\">\n <ng-container *ngIf=\"navMenu\">\n <div class=\"matecu-topbar-layout__menu-btn\">\n <button mat-icon-button type=\"button\" (click)=\"onClickNavMenu()\">\n <mat-icon>menu</mat-icon>\n </button>\n </div>\n </ng-container>\n <ng-content select=\"matecu-topbar-fab\"></ng-content>\n <ng-content select=\"matecu-topbar-title\"></ng-content>\n <ng-content select=\"matecu-topbar-search\"></ng-content>\n <ng-content select=\"matecu-topbar-actions\"></ng-content>\n <ng-container *ngIf=\"actionMenu\">\n <div class=\"matecu-topbar-layout__more-actions-btn\">\n <button type=\"button\" (click)=\"onClickActionMenu()\" mat-icon-button>\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </ng-container>\n\n\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;overflow:hidden;grid-template-rows:auto 1fr;position:relative}:host,:host *,.matecu-topbar-layout,.matecu-topbar-layout *{box-sizing:border-box}:host mat-toolbar,.matecu-topbar-layout mat-toolbar{position:relative;height:64px;max-height:64px;transition:all .3s;align-items:flex-start}:host__menu-btn,:host__more-actions-btn,.matecu-topbar-layout__menu-btn,.matecu-topbar-layout__more-actions-btn{min-height:64px;display:flex;align-items:center}@media screen and (max-width: 425px){:host__menu-btn,.matecu-topbar-layout__menu-btn{margin-right:auto}}:host.matecu-topbar-layout--prominent .mat-toolbar{height:128px;max-height:128px}:host.matecu-topbar-layout--scrolling .mat-toolbar{height:64px;max-height:64px;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}\n"] }]
205
+ }], ctorParameters: function () { return []; }, propDecorators: { className: [{
206
+ type: HostBinding,
207
+ args: ['class']
208
+ }], color: [{
209
+ type: Input
210
+ }], navMenu: [{
211
+ type: Input
212
+ }], actionMenu: [{
213
+ type: Input
214
+ }], clickNavMenu: [{
215
+ type: Output
216
+ }], clickActionMenu: [{
217
+ type: Output
218
+ }], prominent: [{
219
+ type: Input
220
+ }] } });
221
+
222
+ class MatecuTopbarTitleComponent {
223
+ constructor() {
224
+ this.className = 'title';
225
+ }
226
+ ngOnInit() {
227
+ }
228
+ }
229
+ MatecuTopbarTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
230
+ MatecuTopbarTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuTopbarTitleComponent, selector: "matecu-topbar-title", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{display:flex;align-items:center;margin-right:auto;padding:7px 1rem;min-height:64px;box-sizing:border-box;align-self:center}@media screen and (max-width: 425px){:host{display:none}}\n"] });
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarTitleComponent, decorators: [{
232
+ type: Component,
233
+ args: [{ selector: 'matecu-topbar-title', template: "<ng-content></ng-content>", styles: [":host{display:flex;align-items:center;margin-right:auto;padding:7px 1rem;min-height:64px;box-sizing:border-box;align-self:center}@media screen and (max-width: 425px){:host{display:none}}\n"] }]
234
+ }], ctorParameters: function () { return []; }, propDecorators: { className: [{
235
+ type: HostBinding,
236
+ args: ['class']
237
+ }] } });
238
+
239
+ class MatecuTopbarBodyComponent {
240
+ constructor(elementRef) {
241
+ this.elementRef = elementRef;
242
+ this.className = 'matecu-topbar-body';
243
+ }
244
+ ngOnInit() { }
245
+ scrollTop() {
246
+ const element = this.elementRef.nativeElement;
247
+ if (!!element) {
248
+ element.scroll({
249
+ top: 0,
250
+ behavior: 'smooth',
251
+ });
252
+ }
253
+ }
254
+ }
255
+ MatecuTopbarBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarBodyComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
256
+ MatecuTopbarBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuTopbarBodyComponent, 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"] });
257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarBodyComponent, decorators: [{
258
+ type: Component,
259
+ args: [{ selector: 'matecu-topbar-body', 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"] }]
260
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { className: [{
261
+ type: HostBinding,
262
+ args: ['class']
263
+ }] } });
264
+
265
+ class MatecuTopbarFabComponent {
266
+ constructor() {
267
+ this.color = 'accent';
268
+ this.extended = false;
269
+ this.clickAction = new EventEmitter();
270
+ this.className = 'matecu-topbar-fab';
271
+ }
272
+ ngOnInit() { }
273
+ onClickAction() {
274
+ this.clickAction.emit();
275
+ }
276
+ }
277
+ MatecuTopbarFabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarFabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
278
+ MatecuTopbarFabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuTopbarFabComponent, 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"], components: [{ type: i1$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarFabComponent, decorators: [{
280
+ type: Component,
281
+ args: [{ selector: 'matecu-topbar-fab', 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"] }]
282
+ }], ctorParameters: function () { return []; }, propDecorators: { color: [{
283
+ type: Input
284
+ }], extended: [{
285
+ type: Input
286
+ }], clickAction: [{
287
+ type: Output
288
+ }], className: [{
289
+ type: HostBinding,
290
+ args: ['class']
291
+ }] } });
292
+
293
+ class MatecuTopbarSearchComponent {
294
+ constructor() {
295
+ this.showMobileInput = false;
296
+ this.searchInput = new FormControl();
297
+ this.showDescktopCleanBtn = false;
298
+ this.destroy = new Subject();
299
+ this.searchPlaceholder = 'Buscar';
300
+ this.debounceTime = 500;
301
+ this.inputType = 'text';
302
+ this.cleanWhenClose = true;
303
+ this.valueChange = new EventEmitter();
304
+ this.whenSearchChanges = new EventEmitter();
305
+ this.className = 'matecu-topbar-search';
306
+ }
307
+ set value(val) {
308
+ if (typeof val === 'string') {
309
+ this.searchInput.setValue(val);
310
+ }
311
+ else {
312
+ this.searchInput.reset();
313
+ }
314
+ }
315
+ ngOnInit() {
316
+ this.watchSearch();
317
+ }
318
+ toogleSearch() {
319
+ this.showMobileInput = !this.showMobileInput;
320
+ }
321
+ closeMobile() {
322
+ if (this.cleanWhenClose) {
323
+ this.searchInput.reset();
324
+ }
325
+ this.showMobileInput = false;
326
+ }
327
+ watchSearch() {
328
+ this.searchInput.valueChanges
329
+ .pipe(tap((value) => this.setShowDescktopCleanBtn(value)), debounceTime(this.debounceTime), distinctUntilChanged(), tap((value) => this.searchChanges(value)), takeUntil(this.destroy))
330
+ .subscribe();
331
+ }
332
+ searchChanges(searchVal) {
333
+ const value = typeof searchVal === 'string' && searchVal.length > 0 ? searchVal : '';
334
+ this.whenSearchChanges.emit(value);
335
+ this.valueChange.emit(value);
336
+ }
337
+ setShowDescktopCleanBtn(value) {
338
+ this.showDescktopCleanBtn = typeof value === 'string' && value.length > 0;
339
+ }
340
+ }
341
+ MatecuTopbarSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
342
+ MatecuTopbarSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuTopbarSearchComponent, 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{display:flex;align-items:center;position:relative;padding:7px;min-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:0px;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"], components: [{ type: i1$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarSearchComponent, decorators: [{
344
+ type: Component,
345
+ args: [{ selector: 'matecu-topbar-search', 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{display:flex;align-items:center;position:relative;padding:7px;min-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:0px;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"] }]
346
+ }], ctorParameters: function () { return []; }, propDecorators: { searchPlaceholder: [{
347
+ type: Input
348
+ }], debounceTime: [{
349
+ type: Input
350
+ }], inputType: [{
351
+ type: Input
352
+ }], cleanWhenClose: [{
353
+ type: Input
354
+ }], value: [{
355
+ type: Input
356
+ }], valueChange: [{
357
+ type: Output
358
+ }], whenSearchChanges: [{
359
+ type: Output
360
+ }], className: [{
361
+ type: HostBinding,
362
+ args: ['class']
363
+ }] } });
364
+
365
+ class MatecuTopbarActionsComponent {
366
+ constructor() { }
367
+ ngOnInit() { }
368
+ }
369
+ MatecuTopbarActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
370
+ MatecuTopbarActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuTopbarActionsComponent, selector: "matecu-topbar-actions", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center;padding:7px;min-height:64px;box-sizing:border-box}\n"] });
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarActionsComponent, decorators: [{
372
+ type: Component,
373
+ args: [{ selector: 'matecu-topbar-actions', template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center;padding:7px;min-height:64px;box-sizing:border-box}\n"] }]
374
+ }], ctorParameters: function () { return []; } });
375
+
376
+ class MatecuTopbarLayoutModule {
377
+ }
378
+ MatecuTopbarLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
379
+ MatecuTopbarLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarLayoutModule, declarations: [MatecuTopbarLayoutComponent,
380
+ MatecuTopbarTitleComponent,
381
+ MatecuTopbarBodyComponent,
382
+ MatecuTopbarFabComponent,
383
+ MatecuTopbarSearchComponent,
384
+ MatecuTopbarActionsComponent], imports: [CommonModule,
385
+ MatToolbarModule,
386
+ MatIconModule,
387
+ FormsModule,
388
+ ReactiveFormsModule,
389
+ MatButtonModule], exports: [MatecuTopbarLayoutComponent,
390
+ MatecuTopbarTitleComponent,
391
+ MatecuTopbarBodyComponent,
392
+ MatecuTopbarFabComponent,
393
+ MatecuTopbarSearchComponent,
394
+ MatecuTopbarActionsComponent] });
395
+ MatecuTopbarLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarLayoutModule, imports: [[
396
+ CommonModule,
397
+ MatToolbarModule,
398
+ MatIconModule,
399
+ FormsModule,
400
+ ReactiveFormsModule,
401
+ MatButtonModule,
402
+ ]] });
403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuTopbarLayoutModule, decorators: [{
404
+ type: NgModule,
405
+ args: [{
406
+ declarations: [
407
+ MatecuTopbarLayoutComponent,
408
+ MatecuTopbarTitleComponent,
409
+ MatecuTopbarBodyComponent,
410
+ MatecuTopbarFabComponent,
411
+ MatecuTopbarSearchComponent,
412
+ MatecuTopbarActionsComponent,
413
+ ],
414
+ imports: [
415
+ CommonModule,
416
+ MatToolbarModule,
417
+ MatIconModule,
418
+ FormsModule,
419
+ ReactiveFormsModule,
420
+ MatButtonModule,
421
+ ],
422
+ exports: [
423
+ MatecuTopbarLayoutComponent,
424
+ MatecuTopbarTitleComponent,
425
+ MatecuTopbarBodyComponent,
426
+ MatecuTopbarFabComponent,
427
+ MatecuTopbarSearchComponent,
428
+ MatecuTopbarActionsComponent,
429
+ ],
430
+ }]
431
+ }] });
432
+
433
+ var MatecuAlertBoxType;
434
+ (function (MatecuAlertBoxType) {
435
+ MatecuAlertBoxType["warning"] = "warning";
436
+ MatecuAlertBoxType["success"] = "success";
437
+ MatecuAlertBoxType["danger"] = "danger";
438
+ MatecuAlertBoxType["info"] = "info";
439
+ })(MatecuAlertBoxType || (MatecuAlertBoxType = {}));
440
+
441
+ class MatecuAlertBoxComponent {
442
+ constructor() {
443
+ this.classNameBase = 'matecu-alert-box';
444
+ this.alertIcon = false;
445
+ this.className = this.classNameBase;
446
+ }
447
+ get color() {
448
+ return this.alertColor;
449
+ }
450
+ set color(value) {
451
+ this.alertColor = value;
452
+ if (!!value) {
453
+ this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
454
+ }
455
+ else {
456
+ this.className = this.classNameBase;
457
+ }
458
+ this.updateIcon();
459
+ }
460
+ get icon() {
461
+ return this.alertIcon;
462
+ }
463
+ set icon(value) {
464
+ this.alertIcon = value;
465
+ }
466
+ ngOnInit() { }
467
+ updateIcon() {
468
+ switch (this.color) {
469
+ case MatecuAlertBoxType.danger:
470
+ this.iconValue = 'dangerous';
471
+ break;
472
+ case MatecuAlertBoxType.warning:
473
+ this.iconValue = 'warning';
474
+ break;
475
+ case MatecuAlertBoxType.success:
476
+ this.iconValue = 'check_circle';
477
+ break;
478
+ case MatecuAlertBoxType.info:
479
+ this.iconValue = 'info';
480
+ break;
481
+ default:
482
+ this.iconValue = null;
483
+ break;
484
+ }
485
+ }
486
+ }
487
+ MatecuAlertBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
488
+ MatecuAlertBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuAlertBoxComponent, 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 #e0e0e0;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"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertBoxComponent, decorators: [{
490
+ type: Component,
491
+ args: [{ selector: 'matecu-alert-box', 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 #e0e0e0;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"] }]
492
+ }], ctorParameters: function () { return []; }, propDecorators: { color: [{
493
+ type: Input
494
+ }], icon: [{
495
+ type: Input
496
+ }], className: [{
497
+ type: HostBinding,
498
+ args: ['class']
499
+ }] } });
500
+
501
+ class MatecuAlertDialogComponent {
502
+ constructor(dialogData, dialogRef) {
503
+ this.dialogData = dialogData;
504
+ this.dialogRef = dialogRef;
505
+ this.hasTitle = false;
506
+ this.hasDismissBtn = false;
507
+ this.hasActionBtn = false;
508
+ this.showActions = false;
509
+ this.setHasTitle();
510
+ this.setHasDismissBtn();
511
+ this.setHasActionBtn();
512
+ this.setShowActions();
513
+ }
514
+ ngOnInit() { }
515
+ activateAction() {
516
+ this.dialogRef.close(true);
517
+ }
518
+ setHasTitle() {
519
+ this.hasTitle = this.isValidString(this.dialogData.title);
520
+ }
521
+ setHasDismissBtn() {
522
+ this.hasDismissBtn = this.isValidString(this.dialogData.dismissText);
523
+ }
524
+ setHasActionBtn() {
525
+ this.hasActionBtn = this.isValidString(this.dialogData.action);
526
+ }
527
+ setShowActions() {
528
+ this.showActions = this.hasActionBtn || this.hasDismissBtn;
529
+ }
530
+ isValidString(str) {
531
+ const isValid = typeof str === 'string' && str.trim().length > 0;
532
+ return isValid;
533
+ }
534
+ }
535
+ MatecuAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
536
+ MatecuAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuAlertDialogComponent, 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"], components: [{ type: MatecuAlertBoxComponent, selector: "matecu-alert-box", inputs: ["color", "icon"] }, { type: i1$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertDialogComponent, decorators: [{
538
+ type: Component,
539
+ args: [{ selector: 'matecu-alert-dialog', 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"] }]
540
+ }], ctorParameters: function () {
541
+ return [{ type: undefined, decorators: [{
542
+ type: Inject,
543
+ args: [MAT_DIALOG_DATA]
544
+ }] }, { type: i1$2.MatDialogRef }];
545
+ } });
546
+
547
+ class MatecuAlertSnackBarComponent {
548
+ constructor(data, snackBarRef) {
549
+ this.data = data;
550
+ this.snackBarRef = snackBarRef;
551
+ this.classNameBase = 'matecu-alert-snackbar';
552
+ this.className = this.classNameBase;
553
+ this.title = data.title;
554
+ this.message = data.message;
555
+ this.action = data.action;
556
+ this.color = data.type;
557
+ }
558
+ get color() {
559
+ return this.alertColor;
560
+ }
561
+ set color(value) {
562
+ this.alertColor = value;
563
+ this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
564
+ }
565
+ dismiss() {
566
+ this.snackBarRef.dismissWithAction();
567
+ }
568
+ }
569
+ MatecuAlertSnackBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertSnackBarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$3.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
570
+ MatecuAlertSnackBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MatecuAlertSnackBarComponent, selector: "matecu-alert-snack-bar", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<div>\n <strong>{{title}}</strong> &nbsp;\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"], components: [{ type: i1$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertSnackBarComponent, decorators: [{
572
+ type: Component,
573
+ args: [{ selector: 'matecu-alert-snack-bar', template: "<div>\n <strong>{{title}}</strong> &nbsp;\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"] }]
574
+ }], ctorParameters: function () {
575
+ return [{ type: undefined, decorators: [{
576
+ type: Inject,
577
+ args: [MAT_SNACK_BAR_DATA]
578
+ }] }, { type: i1$3.MatSnackBarRef }];
579
+ }, propDecorators: { className: [{
580
+ type: HostBinding,
581
+ args: ['class']
582
+ }] } });
583
+
584
+ class MatecuAlertBoxModule {
585
+ }
586
+ MatecuAlertBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
587
+ MatecuAlertBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertBoxModule, declarations: [MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent], imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule], exports: [MatecuAlertBoxComponent] });
588
+ MatecuAlertBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertBoxModule, imports: [[CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule]] });
589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuAlertBoxModule, decorators: [{
590
+ type: NgModule,
591
+ args: [{
592
+ declarations: [MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent],
593
+ imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule],
594
+ exports: [MatecuAlertBoxComponent]
595
+ }]
596
+ }] });
597
+
598
+ class MatecuSnackBarService {
599
+ constructor(snackBar) {
600
+ this.snackBar = snackBar;
601
+ }
602
+ openError(error, title, action, config) {
603
+ const message = this.getErrorMessage(error);
604
+ const titleStr = title || 'ERROR';
605
+ const type = MatecuAlertBoxType.danger;
606
+ return this.openAlert(message, titleStr, type, action, config);
607
+ }
608
+ openSuccess(message, title, action, config) {
609
+ const titleStr = title || 'OK';
610
+ const type = MatecuAlertBoxType.success;
611
+ return this.openAlert(message, titleStr, type, action, config);
612
+ }
613
+ openWarning(message, title, action, config) {
614
+ const titleStr = title || 'WARNING';
615
+ const type = MatecuAlertBoxType.warning;
616
+ return this.openAlert(message, titleStr, type, action, config);
617
+ }
618
+ openInfo(message, title, action, config) {
619
+ const titleStr = title || 'INFO';
620
+ const type = MatecuAlertBoxType.info;
621
+ return this.openAlert(message, titleStr, type, action, config);
622
+ }
623
+ open(message, action, config) {
624
+ return this.snackBar.open(message, action, config);
625
+ }
626
+ dismiss() {
627
+ this.snackBar.dismiss();
628
+ }
629
+ openAlert(message, title, type, action, config) {
630
+ const data = {
631
+ message,
632
+ title,
633
+ action,
634
+ type
635
+ };
636
+ const dialogConfig = Object.assign(Object.assign({}, config), { data });
637
+ return this.snackBar.openFromComponent(MatecuAlertSnackBarComponent, dialogConfig);
638
+ }
639
+ getErrorMessage(err) {
640
+ const error = new Error();
641
+ if (typeof err === 'string') {
642
+ return err;
643
+ }
644
+ if (err instanceof Error) {
645
+ return err.message;
646
+ }
647
+ return '';
648
+ }
649
+ }
650
+ MatecuSnackBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSnackBarService, deps: [{ token: i1$3.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
651
+ MatecuSnackBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSnackBarService, providedIn: 'root' });
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MatecuSnackBarService, decorators: [{
653
+ type: Injectable,
654
+ args: [{
655
+ providedIn: 'root'
656
+ }]
657
+ }], ctorParameters: function () { return [{ type: i1$3.MatSnackBar }]; } });
658
+
659
+ /*
660
+ * Public API Surface of angular-matecu
661
+ */
662
+
663
+ /**
664
+ * Generated bundle index. Do not edit.
665
+ */
666
+
667
+ export { MatecuAlertBoxComponent, MatecuAlertBoxModule, MatecuAlertBoxType, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent, MatecuSnackBarService, MatecuSpinnerComponent, MatecuSpinnerModule, MatecuSpinnerService, MatecuTopbarActionsComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent, MatecuTopbarLayoutComponent, MatecuTopbarLayoutModule, MatecuTopbarSearchComponent, MatecuTopbarTitleComponent };
668
+ //# sourceMappingURL=angular-matecu.mjs.map