angular-matecu 4.0.2 → 4.0.3

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 (112) hide show
  1. package/esm2022/angular-matecu.mjs +5 -0
  2. package/esm2022/lib/components/matecu-alert-box/matecu-alert-box.component.mjs +67 -0
  3. package/esm2022/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.mjs +54 -0
  4. package/esm2022/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.mjs +43 -0
  5. package/esm2022/lib/components/matecu-spinner/matecu-spinner.component.mjs +58 -0
  6. package/esm2022/lib/components/matecu-topbar-action/matecu-topbar-action.component.mjs +18 -0
  7. package/esm2022/lib/components/matecu-topbar-body/matecu-topbar-body.component.mjs +17 -0
  8. package/esm2022/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.mjs +43 -0
  9. package/esm2022/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.mjs +12 -0
  10. package/esm2022/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.mjs +29 -0
  11. package/esm2022/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.mjs +112 -0
  12. package/esm2022/lib/components/matecu-topbar-search/matecu-topbar-search.component.mjs +93 -0
  13. package/esm2022/lib/components/matecu-topbar-title/matecu-topbar-title.component.mjs +18 -0
  14. package/esm2022/lib/modules/matecu-alert-box/matecu-alert-box.module.mjs +24 -0
  15. package/esm2022/lib/modules/matecu-spinner/matecu-spinner.module.mjs +22 -0
  16. package/esm2022/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.mjs +83 -0
  17. package/esm2022/lib/services/matecu-snack-bar.service.mjs +66 -0
  18. package/esm2022/lib/services/matecu-spinner.service.mjs +44 -0
  19. package/esm2022/lib/types/matecu-alert-dialog.mjs +2 -0
  20. package/esm2022/lib/types/matecu-alert-snackbar.mjs +2 -0
  21. package/esm2022/lib/types/matecu-altert-box-type.mjs +8 -0
  22. package/esm2022/public-api.mjs +32 -0
  23. package/fesm2022/angular-matecu.mjs +735 -0
  24. package/fesm2022/angular-matecu.mjs.map +1 -0
  25. package/index.d.ts +5 -0
  26. package/lib/components/matecu-alert-box/matecu-alert-box.component.d.ts +19 -0
  27. package/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.d.ts +22 -0
  28. package/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.d.ts +20 -0
  29. package/lib/components/matecu-spinner/matecu-spinner.component.d.ts +20 -0
  30. package/lib/components/matecu-topbar-action/matecu-topbar-action.component.d.ts +9 -0
  31. package/lib/components/matecu-topbar-body/matecu-topbar-body.component.d.ts +6 -0
  32. package/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.d.ts +12 -0
  33. package/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.d.ts +5 -0
  34. package/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.d.ts +8 -0
  35. package/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.d.ts +27 -0
  36. package/lib/components/matecu-topbar-search/matecu-topbar-search.component.d.ts +27 -0
  37. package/lib/components/matecu-topbar-title/matecu-topbar-title.component.d.ts +9 -0
  38. package/lib/modules/matecu-alert-box/matecu-alert-box.module.d.ts +14 -0
  39. package/lib/modules/matecu-spinner/matecu-spinner.module.d.ts +8 -0
  40. package/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.d.ts +19 -0
  41. package/lib/services/matecu-snack-bar.service.d.ts +17 -0
  42. package/lib/services/matecu-spinner.service.d.ts +15 -0
  43. package/lib/types/matecu-alert-dialog.d.ts +9 -0
  44. package/{src/lib/types/matecu-alert-snackbar.ts → lib/types/matecu-alert-snackbar.d.ts} +4 -5
  45. package/lib/types/matecu-altert-box-type.d.ts +6 -0
  46. package/package.json +19 -4
  47. package/{src/public-api.ts → public-api.d.ts} +0 -7
  48. package/karma.conf.js +0 -44
  49. package/ng-package.json +0 -13
  50. package/src/lib/components/matecu-alert-box/matecu-alert-box.component.html +0 -11
  51. package/src/lib/components/matecu-alert-box/matecu-alert-box.component.scss +0 -39
  52. package/src/lib/components/matecu-alert-box/matecu-alert-box.component.spec.ts +0 -25
  53. package/src/lib/components/matecu-alert-box/matecu-alert-box.component.ts +0 -60
  54. package/src/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.html +0 -14
  55. package/src/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.scss +0 -5
  56. package/src/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.spec.ts +0 -25
  57. package/src/lib/components/matecu-alert-dialog/matecu-alert-dialog.component.ts +0 -53
  58. package/src/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.html +0 -8
  59. package/src/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.scss +0 -34
  60. package/src/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.spec.ts +0 -25
  61. package/src/lib/components/matecu-alert-snack-bar/matecu-alert-snack-bar.component.ts +0 -45
  62. package/src/lib/components/matecu-spinner/matecu-spinner.component.css +0 -15
  63. package/src/lib/components/matecu-spinner/matecu-spinner.component.html +0 -35
  64. package/src/lib/components/matecu-spinner/matecu-spinner.component.spec.ts +0 -25
  65. package/src/lib/components/matecu-spinner/matecu-spinner.component.ts +0 -50
  66. package/src/lib/components/matecu-spinner/spinner-loader.component.scss +0 -13
  67. package/src/lib/components/matecu-topbar-action/matecu-topbar-action.component.html +0 -1
  68. package/src/lib/components/matecu-topbar-action/matecu-topbar-action.component.scss +0 -19
  69. package/src/lib/components/matecu-topbar-action/matecu-topbar-action.component.spec.ts +0 -25
  70. package/src/lib/components/matecu-topbar-action/matecu-topbar-action.component.ts +0 -14
  71. package/src/lib/components/matecu-topbar-body/matecu-topbar-body.component.html +0 -1
  72. package/src/lib/components/matecu-topbar-body/matecu-topbar-body.component.scss +0 -14
  73. package/src/lib/components/matecu-topbar-body/matecu-topbar-body.component.spec.ts +0 -25
  74. package/src/lib/components/matecu-topbar-body/matecu-topbar-body.component.ts +0 -11
  75. package/src/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.html +0 -3
  76. package/src/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.scss +0 -19
  77. package/src/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.spec.ts +0 -25
  78. package/src/lib/components/matecu-topbar-fab/matecu-topbar-fab.component.ts +0 -31
  79. package/src/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.html +0 -1
  80. package/src/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.scss +0 -8
  81. package/src/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.spec.ts +0 -23
  82. package/src/lib/components/matecu-topbar-header-column/matecu-topbar-header-column.component.ts +0 -11
  83. package/src/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.html +0 -13
  84. package/src/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.scss +0 -34
  85. package/src/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.spec.ts +0 -23
  86. package/src/lib/components/matecu-topbar-header-row/matecu-topbar-header-row.component.ts +0 -18
  87. package/src/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.html +0 -7
  88. package/src/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.scss +0 -49
  89. package/src/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.spec.ts +0 -25
  90. package/src/lib/components/matecu-topbar-layout/matecu-topbar-layout.component.ts +0 -112
  91. package/src/lib/components/matecu-topbar-search/matecu-topbar-search.component.html +0 -29
  92. package/src/lib/components/matecu-topbar-search/matecu-topbar-search.component.scss +0 -90
  93. package/src/lib/components/matecu-topbar-search/matecu-topbar-search.component.spec.ts +0 -25
  94. package/src/lib/components/matecu-topbar-search/matecu-topbar-search.component.ts +0 -92
  95. package/src/lib/components/matecu-topbar-title/matecu-topbar-title.component.html +0 -1
  96. package/src/lib/components/matecu-topbar-title/matecu-topbar-title.component.scss +0 -91
  97. package/src/lib/components/matecu-topbar-title/matecu-topbar-title.component.spec.ts +0 -25
  98. package/src/lib/components/matecu-topbar-title/matecu-topbar-title.component.ts +0 -14
  99. package/src/lib/modules/matecu-alert-box/matecu-alert-box.module.ts +0 -16
  100. package/src/lib/modules/matecu-spinner/matecu-spinner.module.ts +0 -14
  101. package/src/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.ts +0 -45
  102. package/src/lib/services/matecu-snack-bar.service.spec.ts +0 -16
  103. package/src/lib/services/matecu-snack-bar.service.ts +0 -66
  104. package/src/lib/services/matecu-spinner.service.spec.ts +0 -16
  105. package/src/lib/services/matecu-spinner.service.ts +0 -40
  106. package/src/lib/types/matecu-alert-dialog.ts +0 -10
  107. package/src/lib/types/matecu-altert-box-type.ts +0 -6
  108. package/src/test.ts +0 -17
  109. package/tsconfig.lib.json +0 -24
  110. package/tsconfig.lib.prod.json +0 -10
  111. package/tsconfig.spec.json +0 -17
  112. package/tslint.json +0 -17
@@ -0,0 +1,735 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, HostBinding, Input, NgModule, EventEmitter, Output, ViewChild, Inject } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { BehaviorSubject, Subject, fromEvent } from 'rxjs';
6
+ import { tap, takeUntil, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
7
+ import * as i3$1 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import * as i3 from '@angular/material/icon';
10
+ import { MatIconModule } from '@angular/material/icon';
11
+ import { MatToolbarModule } from '@angular/material/toolbar';
12
+ import * as i2 from '@angular/forms';
13
+ import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
14
+ import * as i1$1 from '@angular/material/dialog';
15
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
16
+ import * as i1$2 from '@angular/material/snack-bar';
17
+ import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
18
+
19
+ class MatecuSpinnerService {
20
+ constructor() {
21
+ this.active$ = new BehaviorSubject(false);
22
+ this.requestsKeys = [];
23
+ }
24
+ watch() {
25
+ return this.active$.pipe();
26
+ }
27
+ add(customKey) {
28
+ const key = (typeof (customKey) === 'string' && customKey.length > 0) ? customKey : this.createKey();
29
+ this.requestsKeys.push(key);
30
+ this.updateStatus();
31
+ return key;
32
+ }
33
+ remove(key) {
34
+ this.requestsKeys = this.requestsKeys.filter((requestKey) => requestKey !== key);
35
+ this.updateStatus();
36
+ }
37
+ clear() {
38
+ this.requestsKeys = [];
39
+ this.updateStatus();
40
+ }
41
+ updateStatus() {
42
+ const active = this.requestsKeys.length > 0;
43
+ this.active$.next(active);
44
+ }
45
+ createKey() {
46
+ const time = new Date().getTime();
47
+ const complement = Math.random();
48
+ return `${time}__${complement}`;
49
+ }
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerService, providedIn: 'root' }); }
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerService, decorators: [{
54
+ type: Injectable,
55
+ args: [{
56
+ providedIn: 'root',
57
+ }]
58
+ }], ctorParameters: () => [] });
59
+
60
+ class MatecuSpinnerComponent {
61
+ get active() {
62
+ return this.activeCache;
63
+ }
64
+ set active(value) {
65
+ if (this.global) {
66
+ return;
67
+ }
68
+ this.activeCache = value;
69
+ this.className = value
70
+ ? this.className.replace(` ${this.hiddenClass}`, '')
71
+ : (this.className += ` ${this.hiddenClass}`);
72
+ }
73
+ constructor(spinnerService) {
74
+ this.spinnerService = spinnerService;
75
+ this.destroy$ = new Subject();
76
+ this.hiddenClass = 'matecu-spinner--hidden';
77
+ this.activeCache = false;
78
+ this.className = 'matecu-spinner';
79
+ this.color = '#2196F3';
80
+ this.global = false;
81
+ this.size = '70px';
82
+ }
83
+ ngOnDestroy() {
84
+ this.destroy$.next();
85
+ this.destroy$.complete();
86
+ }
87
+ ngOnInit() {
88
+ if (this.global) {
89
+ this.spinnerService.watch().pipe(tap(value => this.activeCache = value), takeUntil(this.destroy$)).subscribe();
90
+ }
91
+ }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerComponent, deps: [{ token: MatecuSpinnerService }], target: i0.ɵɵFactoryTarget.Component }); }
93
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", 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"] }] }); }
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerComponent, decorators: [{
96
+ type: Component,
97
+ 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"] }]
98
+ }], ctorParameters: () => [{ type: MatecuSpinnerService }], propDecorators: { className: [{
99
+ type: HostBinding,
100
+ args: ['class']
101
+ }], color: [{
102
+ type: Input
103
+ }], global: [{
104
+ type: Input
105
+ }], active: [{
106
+ type: Input
107
+ }], size: [{
108
+ type: Input
109
+ }] } });
110
+
111
+ class MatecuSpinnerModule {
112
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
113
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerModule, imports: [CommonModule, MatecuSpinnerComponent], exports: [MatecuSpinnerComponent] }); }
114
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerModule, imports: [CommonModule, MatecuSpinnerComponent] }); }
115
+ }
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSpinnerModule, decorators: [{
117
+ type: NgModule,
118
+ args: [{
119
+ declarations: [],
120
+ imports: [
121
+ CommonModule, MatecuSpinnerComponent
122
+ ],
123
+ exports: [
124
+ MatecuSpinnerComponent
125
+ ]
126
+ }]
127
+ }] });
128
+
129
+ class MatecuTopbarLayoutComponent {
130
+ get scrolled() {
131
+ return this._scrolled;
132
+ }
133
+ set scrolled(value) {
134
+ this._scrolled = value;
135
+ this.className = this.className.replace(/scrolled/g, '').trim();
136
+ if (this.scrolled) {
137
+ this.className = `${this.className} scrolled`;
138
+ }
139
+ }
140
+ get prominent() {
141
+ return this._prominent;
142
+ }
143
+ set prominent(value) {
144
+ this._prominent = value;
145
+ this.className = this.className.replace(/prominent/g, '').trim();
146
+ if (this.prominent) {
147
+ this.className = `${this.className} prominent`;
148
+ }
149
+ }
150
+ constructor(elementRef, changeDetector, zone) {
151
+ this.elementRef = elementRef;
152
+ this.changeDetector = changeDetector;
153
+ this.zone = zone;
154
+ this._scrolled = false;
155
+ this._prominent = false;
156
+ this.destroy$ = new Subject();
157
+ this.mobileStyle = false;
158
+ this.mobileStyleChange = new EventEmitter();
159
+ this.mobileWidth = 768;
160
+ this.whenResize = new EventEmitter();
161
+ this.className = 'matecu-topbar-layout';
162
+ }
163
+ ngOnDestroy() {
164
+ this.destroy$.next();
165
+ this.destroy$.complete();
166
+ }
167
+ spyScroll(scrollabe) {
168
+ if (!scrollabe) {
169
+ return;
170
+ }
171
+ const maxScrollHeight = scrollabe.scrollHeight;
172
+ const scrollableHeight = scrollabe.clientHeight;
173
+ if (scrollableHeight > maxScrollHeight) {
174
+ return;
175
+ }
176
+ const scrollPosition = scrollabe.scrollTop;
177
+ this.scrolled = scrollPosition > 20;
178
+ }
179
+ ngAfterViewInit() {
180
+ const layoutElement = this.elementRef.nativeElement;
181
+ const resizeObserver = new ResizeObserver(() => {
182
+ const width = layoutElement?.clientWidth;
183
+ if (!width) {
184
+ return;
185
+ }
186
+ this.mobileStyle = width <= this.mobileWidth;
187
+ this.zone.run(() => {
188
+ this.mobileStyleChange.emit(this.mobileStyle);
189
+ this.whenResize.emit(width);
190
+ });
191
+ });
192
+ resizeObserver.observe(layoutElement);
193
+ this.destroy$.pipe(tap(() => resizeObserver.disconnect())).subscribe();
194
+ if (this.bodyElement) {
195
+ fromEvent(this.bodyElement.nativeElement, 'scroll')
196
+ .pipe(tap(() => this.spyScroll(this.bodyElement?.nativeElement)), takeUntil(this.destroy$))
197
+ .subscribe();
198
+ }
199
+ }
200
+ scrollTop() {
201
+ if (!this.bodyElement) {
202
+ return;
203
+ }
204
+ this.bodyElement.nativeElement.scroll({
205
+ top: 0,
206
+ behavior: 'smooth',
207
+ });
208
+ }
209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarLayoutComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
210
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarLayoutComponent, isStandalone: true, selector: "matecu-topbar-layout", inputs: { mobileStyle: "mobileStyle", mobileWidth: "mobileWidth", prominent: "prominent" }, outputs: { mobileStyleChange: "mobileStyleChange", whenResize: "whenResize" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["mtbBody"], descendants: true }], ngImport: i0, template: "<div class=\"matecu-topbar-layout__bar\">\n <ng-content select=\"matecu-topbar-header-row[first-row]\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[second-row]\"></ng-content>\n</div>\n<div class=\"matecu-topbar-layout__body\" #mtbBody>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n</div>\n", styles: [":host,.matecu-topbar-layout{position:relative;display:grid;grid-template-rows:auto 1fr;box-sizing:border-box;border:var(--mtb-border, none);margin:var(--mtb-margin, 0px);padding:0;width:var(--mtb-width, 100%);height:var(--mtb-height, 100vh);overflow:hidden}:host *,.matecu-topbar-layout *{box-sizing:border-box}:host__bar,.matecu-topbar-layout__bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;background-color:var(--mtb-primary-color, #3f51b5);color:var(--mtb-bar-color, #fff);width:100%;padding:0;margin:0;min-height:var(--mtb-bar-height, 64px);transition:all .3s}:host__body,.matecu-topbar-layout__body{padding:0;margin:0;overflow-y:auto}:host.prominent .matecu-topbar-layout__bar,.matecu-topbar-layout.prominent .matecu-topbar-layout__bar{min-height:var(--mtb-bar-prominent-height, 128px)}:host.scrolled .matecu-topbar-layout__bar,.matecu-topbar-layout.scrolled .matecu-topbar-layout__bar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;min-height:var(--mtb-bar-height, 64px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatToolbarModule }] }); }
211
+ }
212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarLayoutComponent, decorators: [{
213
+ type: Component,
214
+ args: [{ selector: 'matecu-topbar-layout', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatToolbarModule], template: "<div class=\"matecu-topbar-layout__bar\">\n <ng-content select=\"matecu-topbar-header-row[first-row]\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[second-row]\"></ng-content>\n</div>\n<div class=\"matecu-topbar-layout__body\" #mtbBody>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n</div>\n", styles: [":host,.matecu-topbar-layout{position:relative;display:grid;grid-template-rows:auto 1fr;box-sizing:border-box;border:var(--mtb-border, none);margin:var(--mtb-margin, 0px);padding:0;width:var(--mtb-width, 100%);height:var(--mtb-height, 100vh);overflow:hidden}:host *,.matecu-topbar-layout *{box-sizing:border-box}:host__bar,.matecu-topbar-layout__bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;background-color:var(--mtb-primary-color, #3f51b5);color:var(--mtb-bar-color, #fff);width:100%;padding:0;margin:0;min-height:var(--mtb-bar-height, 64px);transition:all .3s}:host__body,.matecu-topbar-layout__body{padding:0;margin:0;overflow-y:auto}:host.prominent .matecu-topbar-layout__bar,.matecu-topbar-layout.prominent .matecu-topbar-layout__bar{min-height:var(--mtb-bar-prominent-height, 128px)}:host.scrolled .matecu-topbar-layout__bar,.matecu-topbar-layout.scrolled .matecu-topbar-layout__bar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;min-height:var(--mtb-bar-height, 64px)}\n"] }]
215
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { mobileStyle: [{
216
+ type: Input
217
+ }], mobileStyleChange: [{
218
+ type: Output
219
+ }], mobileWidth: [{
220
+ type: Input
221
+ }], whenResize: [{
222
+ type: Output
223
+ }], prominent: [{
224
+ type: Input
225
+ }], className: [{
226
+ type: HostBinding,
227
+ args: ['class']
228
+ }], bodyElement: [{
229
+ type: ViewChild,
230
+ args: ['mtbBody']
231
+ }] } });
232
+
233
+ class MatecuTopbarTitleComponent {
234
+ constructor() {
235
+ this.className = 'matecu-topbar-title';
236
+ }
237
+ ngOnInit() { }
238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarTitleComponent, isStandalone: true, selector: "matecu-topbar-title", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}:host,.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}:host,:host *,.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}:host input,.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}:host input::placeholder,.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}:host input:focus,.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}:host__icon,.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}:host__icon--search,.matecu-topbar-search__icon--search{left:6px}:host__icon--clear,.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"] }); }
240
+ }
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarTitleComponent, decorators: [{
242
+ type: Component,
243
+ args: [{ selector: 'matecu-topbar-title', standalone: true, template: "<ng-content></ng-content>", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}:host,.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}:host,:host *,.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}:host input,.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}:host input::placeholder,.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}:host input:focus,.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}:host__icon,.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}:host__icon--search,.matecu-topbar-search__icon--search{left:6px}:host__icon--clear,.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"] }]
244
+ }], ctorParameters: () => [], propDecorators: { className: [{
245
+ type: HostBinding,
246
+ args: ['class']
247
+ }] } });
248
+
249
+ class MatecuTopbarBodyComponent {
250
+ constructor() {
251
+ this.className = 'matecu-topbar-body';
252
+ }
253
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
254
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarBodyComponent, isStandalone: true, selector: "matecu-topbar-body", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host,.matecu-topbar-body{display:block;padding:var(--mtb-body-padding, 30px);background-color:var(--mtb-body-background, auto);overflow-y:auto;padding-bottom:var(--mtb-body-padding-button, 60px)}:host,:host *,.matecu-topbar-body,.matecu-topbar-body *{box-sizing:border-box;outline:none}\n"] }); }
255
+ }
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarBodyComponent, decorators: [{
257
+ type: Component,
258
+ args: [{ selector: 'matecu-topbar-body', standalone: true, template: "<ng-content></ng-content>", styles: [":host,.matecu-topbar-body{display:block;padding:var(--mtb-body-padding, 30px);background-color:var(--mtb-body-background, auto);overflow-y:auto;padding-bottom:var(--mtb-body-padding-button, 60px)}:host,:host *,.matecu-topbar-body,.matecu-topbar-body *{box-sizing:border-box;outline:none}\n"] }]
259
+ }], propDecorators: { className: [{
260
+ type: HostBinding,
261
+ args: ['class']
262
+ }] } });
263
+
264
+ class MatecuTopbarFabComponent {
265
+ constructor() {
266
+ this._mobileStyle = false;
267
+ this.mainClassName = 'matecu-topbar-fab';
268
+ this.display = true;
269
+ this.className = this.mainClassName;
270
+ }
271
+ get mobileStyle() {
272
+ return this._mobileStyle;
273
+ }
274
+ set mobileStyle(value) {
275
+ this._mobileStyle = value;
276
+ this.className = this.className.replace(/mobile-style/g, '').trim();
277
+ if (this._mobileStyle) {
278
+ this.className = `${this.className} mobile-style`;
279
+ }
280
+ }
281
+ get color() {
282
+ return this.display ? 'flex' : 'none';
283
+ }
284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarFabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
285
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarFabComponent, isStandalone: true, selector: "matecu-topbar-fab", inputs: { display: "display", mobileStyle: "mobileStyle" }, host: { properties: { "class": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "<ng-container *ngIf=\"display\">\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host,.matecu-topbar-fab{display:flex;align-self:flex-end;align-items:flex-start;transform:translateY(50%);transition:all .3s ease-in-out}:host,:host *,.matecu-topbar-fab,.matecu-topbar-fab *{box-sizing:border-box;outline:none}:host.mobile-style,.matecu-topbar-fab.mobile-style{position:absolute;transform:translate(0);bottom:var(--mtb-fab-mobile-bottom-position, 20px);right:var(--mtb-fab-mobile-right-position, 20px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }] }); }
286
+ }
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarFabComponent, decorators: [{
288
+ type: Component,
289
+ args: [{ selector: 'matecu-topbar-fab', standalone: true, imports: [CommonModule, MatButtonModule], template: "<ng-container *ngIf=\"display\">\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host,.matecu-topbar-fab{display:flex;align-self:flex-end;align-items:flex-start;transform:translateY(50%);transition:all .3s ease-in-out}:host,:host *,.matecu-topbar-fab,.matecu-topbar-fab *{box-sizing:border-box;outline:none}:host.mobile-style,.matecu-topbar-fab.mobile-style{position:absolute;transform:translate(0);bottom:var(--mtb-fab-mobile-bottom-position, 20px);right:var(--mtb-fab-mobile-right-position, 20px)}\n"] }]
290
+ }], propDecorators: { display: [{
291
+ type: Input
292
+ }], mobileStyle: [{
293
+ type: Input
294
+ }], className: [{
295
+ type: HostBinding,
296
+ args: ['class']
297
+ }], color: [{
298
+ type: HostBinding,
299
+ args: ['style.display']
300
+ }] } });
301
+
302
+ class MatecuTopbarSearchComponent {
303
+ constructor() {
304
+ this.hasValue = false;
305
+ this.activeMobileSearch = false;
306
+ this.inputCtrl = new FormControl('');
307
+ this._value = '';
308
+ this._mobileStyle = false;
309
+ this.destroy$ = new Subject();
310
+ this.display = true;
311
+ this.placeholder = '';
312
+ this.delyValueChanges = 300; // valor en milisegundos
313
+ this.valueChange = new EventEmitter();
314
+ this.className = 'matecu-topbar-search';
315
+ }
316
+ get value() {
317
+ return this._value;
318
+ }
319
+ set value(v) {
320
+ this._value = v;
321
+ this.inputCtrl.setValue(v);
322
+ }
323
+ get mobileStyle() {
324
+ return this._mobileStyle;
325
+ }
326
+ set mobileStyle(value) {
327
+ this._mobileStyle = value;
328
+ this.className = this.className.replace(/mobile-style/g, '').trim();
329
+ if (this._mobileStyle) {
330
+ this.className = `${this.className} mobile-style`;
331
+ }
332
+ }
333
+ get color() {
334
+ return this.display ? 'flex' : 'none';
335
+ }
336
+ ngOnInit() {
337
+ this.inputCtrl.valueChanges
338
+ .pipe(map((value) => value ?? ''), tap(this.updateHasValueFn()), debounceTime(this.delyValueChanges), distinctUntilChanged(), tap((value) => this.valueChange.emit(value)), takeUntil(this.destroy$))
339
+ .subscribe();
340
+ }
341
+ toggleActiveMobildeSearch() {
342
+ this.activeMobileSearch = !this.activeMobileSearch;
343
+ }
344
+ clearSearch() {
345
+ this.inputCtrl.setValue('');
346
+ this.activeMobileSearch = false;
347
+ }
348
+ updateHasValueFn() {
349
+ return (value) => {
350
+ this.hasValue = value.length > 0;
351
+ };
352
+ }
353
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
354
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarSearchComponent, isStandalone: true, selector: "matecu-topbar-search", inputs: { display: "display", placeholder: "placeholder", delyValueChanges: "delyValueChanges", value: "value", mobileStyle: "mobileStyle" }, outputs: { valueChange: "valueChange" }, host: { properties: { "className": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "<ng-container *ngIf=\"display\">\n <button\n class=\"matecu-topbar-search-mobile-only\"\n [ngClass]=\"{ 'mobile-style': mobileStyle }\"\n (click)=\"toggleActiveMobildeSearch()\"\n >\n <mat-icon>search</mat-icon>\n </button>\n <div\n class=\"matecu-topbar-search\"\n [ngClass]=\"{\n 'mobile-style': mobileStyle,\n 'active-mobile': activeMobileSearch\n }\"\n >\n <span class=\"matecu-topbar-search__icon matecu-topbar-search__icon--search\">\n <mat-icon>search</mat-icon>\n </span>\n <ng-container *ngIf=\"hasValue || mobileStyle\">\n <button\n class=\"matecu-topbar-search__icon matecu-topbar-search__icon--clear\"\n (click)=\"clearSearch()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n <input type=\"text\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n </div>\n</ng-container>\n", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}.matecu-topbar-search__icon--search{left:6px}.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }] }); }
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarSearchComponent, decorators: [{
357
+ type: Component,
358
+ args: [{ selector: 'matecu-topbar-search', standalone: true, imports: [
359
+ CommonModule,
360
+ FormsModule,
361
+ ReactiveFormsModule,
362
+ MatIconModule,
363
+ MatButtonModule,
364
+ ], template: "<ng-container *ngIf=\"display\">\n <button\n class=\"matecu-topbar-search-mobile-only\"\n [ngClass]=\"{ 'mobile-style': mobileStyle }\"\n (click)=\"toggleActiveMobildeSearch()\"\n >\n <mat-icon>search</mat-icon>\n </button>\n <div\n class=\"matecu-topbar-search\"\n [ngClass]=\"{\n 'mobile-style': mobileStyle,\n 'active-mobile': activeMobileSearch\n }\"\n >\n <span class=\"matecu-topbar-search__icon matecu-topbar-search__icon--search\">\n <mat-icon>search</mat-icon>\n </span>\n <ng-container *ngIf=\"hasValue || mobileStyle\">\n <button\n class=\"matecu-topbar-search__icon matecu-topbar-search__icon--clear\"\n (click)=\"clearSearch()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n <input type=\"text\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n </div>\n</ng-container>\n", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}.matecu-topbar-search__icon--search{left:6px}.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"] }]
365
+ }], propDecorators: { display: [{
366
+ type: Input
367
+ }], placeholder: [{
368
+ type: Input
369
+ }], delyValueChanges: [{
370
+ type: Input
371
+ }], value: [{
372
+ type: Input
373
+ }], mobileStyle: [{
374
+ type: Input
375
+ }], valueChange: [{
376
+ type: Output
377
+ }], className: [{
378
+ type: HostBinding
379
+ }], color: [{
380
+ type: HostBinding,
381
+ args: ['style.display']
382
+ }] } });
383
+
384
+ class MatecuTopbarActionComponent {
385
+ constructor() {
386
+ this.className = 'matecu-topbar-action';
387
+ }
388
+ ngOnInit() { }
389
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
390
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarActionComponent, isStandalone: true, selector: "matecu-topbar-action", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{--mtb-bar-height: 64px;--mtb-action-padding: 10px;--mtb-action-margin: 0px}:host,.matecu-topbar-action{height:100%;display:flex;align-items:flex-start;max-height:var(--mtb-bar-height);padding:var(--mtb-action-padding);margin:var(--mtb-action-margin)}:host,:host *,.matecu-topbar-action,.matecu-topbar-action *{box-sizing:border-box;outline:none}\n"] }); }
391
+ }
392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarActionComponent, decorators: [{
393
+ type: Component,
394
+ args: [{ selector: 'matecu-topbar-action', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{--mtb-bar-height: 64px;--mtb-action-padding: 10px;--mtb-action-margin: 0px}:host,.matecu-topbar-action{height:100%;display:flex;align-items:flex-start;max-height:var(--mtb-bar-height);padding:var(--mtb-action-padding);margin:var(--mtb-action-margin)}:host,:host *,.matecu-topbar-action,.matecu-topbar-action *{box-sizing:border-box;outline:none}\n"] }]
395
+ }], ctorParameters: () => [], propDecorators: { className: [{
396
+ type: HostBinding,
397
+ args: ['class']
398
+ }] } });
399
+
400
+ class MatecuTopbarHeaderRowComponent {
401
+ constructor() {
402
+ this.display = true;
403
+ this.className = 'matecu-topbar-header-row';
404
+ }
405
+ get color() {
406
+ return this.display ? 'flex' : 'none';
407
+ }
408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarHeaderRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
409
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarHeaderRowComponent, isStandalone: true, selector: "matecu-topbar-header-row", inputs: { display: "display" }, host: { properties: { "class": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "<ng-container *ngIf=\"display\">\n <div\n class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--left\"\n >\n <ng-content select=\"matecu-topbar-header-column[left-column]\"></ng-content>\n </div>\n\n <div\n class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--right\"\n >\n <ng-content select=\"matecu-topbar-header-column[right-column]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{--mtb-row-padding: 0px;--mtb-row-margin: 0;--mtb-row-max-width: 100%;--mtb-row-min-width: 320px}:host,.matecu-topbar-header-row{padding:var(--mtb-row-padding);margin:var(--mtb-row-margin);display:flex;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;width:100%;height:100%;max-width:var(--mtb-row-max-width);min-width:var(--mtb-row-min-width)}:host,:host *,.matecu-topbar-header-row,.matecu-topbar-header-row *{box-sizing:border-box;outline:none}:host__column,.matecu-topbar-header-row__column{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px);align-items:flex-start}:host__column--right,.matecu-topbar-header-row__column--right{margin-left:auto;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatToolbarModule }] }); }
410
+ }
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarHeaderRowComponent, decorators: [{
412
+ type: Component,
413
+ args: [{ selector: 'matecu-topbar-header-row', standalone: true, imports: [CommonModule, MatToolbarModule], template: "<ng-container *ngIf=\"display\">\n <div\n class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--left\"\n >\n <ng-content select=\"matecu-topbar-header-column[left-column]\"></ng-content>\n </div>\n\n <div\n class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--right\"\n >\n <ng-content select=\"matecu-topbar-header-column[right-column]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{--mtb-row-padding: 0px;--mtb-row-margin: 0;--mtb-row-max-width: 100%;--mtb-row-min-width: 320px}:host,.matecu-topbar-header-row{padding:var(--mtb-row-padding);margin:var(--mtb-row-margin);display:flex;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;width:100%;height:100%;max-width:var(--mtb-row-max-width);min-width:var(--mtb-row-min-width)}:host,:host *,.matecu-topbar-header-row,.matecu-topbar-header-row *{box-sizing:border-box;outline:none}:host__column,.matecu-topbar-header-row__column{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px);align-items:flex-start}:host__column--right,.matecu-topbar-header-row__column--right{margin-left:auto;justify-content:flex-end}\n"] }]
414
+ }], propDecorators: { display: [{
415
+ type: Input
416
+ }], className: [{
417
+ type: HostBinding,
418
+ args: ['class']
419
+ }], color: [{
420
+ type: HostBinding,
421
+ args: ['style.display']
422
+ }] } });
423
+
424
+ class MatecuTopbarHeaderColumnComponent {
425
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarHeaderColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
426
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuTopbarHeaderColumnComponent, isStandalone: true, selector: "matecu-topbar-header-column", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px)}:host[right-row]{justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
427
+ }
428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarHeaderColumnComponent, decorators: [{
429
+ type: Component,
430
+ args: [{ selector: 'matecu-topbar-header-column', standalone: true, imports: [CommonModule], template: "<ng-content></ng-content>\n", styles: [":host{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px)}:host[right-row]{justify-content:flex-end}\n"] }]
431
+ }] });
432
+
433
+ class MatecuTopbarLayoutModule {
434
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
435
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarLayoutModule, imports: [CommonModule,
436
+ MatToolbarModule,
437
+ MatIconModule,
438
+ FormsModule,
439
+ ReactiveFormsModule,
440
+ MatButtonModule,
441
+ MatecuTopbarLayoutComponent,
442
+ MatecuTopbarTitleComponent,
443
+ MatecuTopbarBodyComponent,
444
+ MatecuTopbarFabComponent,
445
+ MatecuTopbarSearchComponent,
446
+ MatecuTopbarActionComponent,
447
+ MatecuTopbarHeaderRowComponent,
448
+ MatecuTopbarHeaderColumnComponent], exports: [MatecuTopbarLayoutComponent,
449
+ MatecuTopbarTitleComponent,
450
+ MatecuTopbarBodyComponent,
451
+ MatecuTopbarFabComponent,
452
+ MatecuTopbarSearchComponent,
453
+ MatecuTopbarActionComponent,
454
+ MatecuTopbarHeaderRowComponent,
455
+ MatecuTopbarHeaderColumnComponent] }); }
456
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarLayoutModule, imports: [CommonModule,
457
+ MatToolbarModule,
458
+ MatIconModule,
459
+ FormsModule,
460
+ ReactiveFormsModule,
461
+ MatButtonModule,
462
+ MatecuTopbarLayoutComponent,
463
+ MatecuTopbarFabComponent,
464
+ MatecuTopbarSearchComponent,
465
+ MatecuTopbarHeaderRowComponent,
466
+ MatecuTopbarHeaderColumnComponent] }); }
467
+ }
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuTopbarLayoutModule, decorators: [{
469
+ type: NgModule,
470
+ args: [{
471
+ declarations: [],
472
+ imports: [
473
+ CommonModule,
474
+ MatToolbarModule,
475
+ MatIconModule,
476
+ FormsModule,
477
+ ReactiveFormsModule,
478
+ MatButtonModule,
479
+ MatecuTopbarLayoutComponent,
480
+ MatecuTopbarTitleComponent,
481
+ MatecuTopbarBodyComponent,
482
+ MatecuTopbarFabComponent,
483
+ MatecuTopbarSearchComponent,
484
+ MatecuTopbarActionComponent,
485
+ MatecuTopbarHeaderRowComponent,
486
+ MatecuTopbarHeaderColumnComponent,
487
+ ],
488
+ exports: [
489
+ MatecuTopbarLayoutComponent,
490
+ MatecuTopbarTitleComponent,
491
+ MatecuTopbarBodyComponent,
492
+ MatecuTopbarFabComponent,
493
+ MatecuTopbarSearchComponent,
494
+ MatecuTopbarActionComponent,
495
+ MatecuTopbarHeaderRowComponent,
496
+ MatecuTopbarHeaderColumnComponent,
497
+ ],
498
+ }]
499
+ }] });
500
+
501
+ var MatecuAlertBoxType;
502
+ (function (MatecuAlertBoxType) {
503
+ MatecuAlertBoxType["warning"] = "warning";
504
+ MatecuAlertBoxType["success"] = "success";
505
+ MatecuAlertBoxType["danger"] = "danger";
506
+ MatecuAlertBoxType["info"] = "info";
507
+ })(MatecuAlertBoxType || (MatecuAlertBoxType = {}));
508
+
509
+ class MatecuAlertBoxComponent {
510
+ get color() {
511
+ return this.alertColor;
512
+ }
513
+ set color(value) {
514
+ this.alertColor = value;
515
+ if (!!value) {
516
+ this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
517
+ }
518
+ else {
519
+ this.className = this.classNameBase;
520
+ }
521
+ this.updateIcon();
522
+ }
523
+ get icon() {
524
+ return this.alertIcon;
525
+ }
526
+ set icon(value) {
527
+ this.alertIcon = value;
528
+ }
529
+ constructor() {
530
+ this.classNameBase = 'matecu-alert-box';
531
+ this.alertIcon = false;
532
+ this.className = this.classNameBase;
533
+ }
534
+ ngOnInit() { }
535
+ updateIcon() {
536
+ switch (this.color) {
537
+ case MatecuAlertBoxType.danger:
538
+ this.iconValue = 'dangerous';
539
+ break;
540
+ case MatecuAlertBoxType.warning:
541
+ this.iconValue = 'warning';
542
+ break;
543
+ case MatecuAlertBoxType.success:
544
+ this.iconValue = 'check_circle';
545
+ break;
546
+ case MatecuAlertBoxType.info:
547
+ this.iconValue = 'info';
548
+ break;
549
+ default:
550
+ this.iconValue = null;
551
+ break;
552
+ }
553
+ }
554
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
555
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", 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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
556
+ }
557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertBoxComponent, decorators: [{
558
+ type: Component,
559
+ 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"] }]
560
+ }], ctorParameters: () => [], propDecorators: { color: [{
561
+ type: Input
562
+ }], icon: [{
563
+ type: Input
564
+ }], className: [{
565
+ type: HostBinding,
566
+ args: ['class']
567
+ }] } });
568
+
569
+ class MatecuAlertDialogComponent {
570
+ constructor(dialogData, dialogRef) {
571
+ this.dialogData = dialogData;
572
+ this.dialogRef = dialogRef;
573
+ this.hasTitle = false;
574
+ this.hasDismissBtn = false;
575
+ this.hasActionBtn = false;
576
+ this.showActions = false;
577
+ this.setHasTitle();
578
+ this.setHasDismissBtn();
579
+ this.setHasActionBtn();
580
+ this.setShowActions();
581
+ }
582
+ ngOnInit() { }
583
+ activateAction() {
584
+ this.dialogRef.close(true);
585
+ }
586
+ setHasTitle() {
587
+ this.hasTitle = this.isValidString(this.dialogData.title);
588
+ }
589
+ setHasDismissBtn() {
590
+ this.hasDismissBtn = this.isValidString(this.dialogData.dismissText);
591
+ }
592
+ setHasActionBtn() {
593
+ this.hasActionBtn = this.isValidString(this.dialogData.action);
594
+ }
595
+ setShowActions() {
596
+ this.showActions = this.hasActionBtn || this.hasDismissBtn;
597
+ }
598
+ isValidString(str) {
599
+ const isValid = typeof str === 'string' && str.trim().length > 0;
600
+ return isValid;
601
+ }
602
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
603
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", 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.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: MatecuAlertBoxComponent, selector: "matecu-alert-box", inputs: ["color", "icon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
604
+ }
605
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertDialogComponent, decorators: [{
606
+ type: Component,
607
+ 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"] }]
608
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
609
+ type: Inject,
610
+ args: [MAT_DIALOG_DATA]
611
+ }] }, { type: i1$1.MatDialogRef }] });
612
+
613
+ class MatecuAlertSnackBarComponent {
614
+ get color() {
615
+ return this.alertColor;
616
+ }
617
+ set color(value) {
618
+ this.alertColor = value;
619
+ this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
620
+ }
621
+ constructor(data, snackBarRef) {
622
+ this.data = data;
623
+ this.snackBarRef = snackBarRef;
624
+ this.classNameBase = 'matecu-alert-snackbar';
625
+ this.className = this.classNameBase;
626
+ this.title = data.title;
627
+ this.message = data.message;
628
+ this.action = data.action;
629
+ this.color = data.type;
630
+ }
631
+ dismiss() {
632
+ this.snackBarRef.dismissWithAction();
633
+ }
634
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertSnackBarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$2.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component }); }
635
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: MatecuAlertSnackBarComponent, isStandalone: true, 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatSnackBarModule }] }); }
636
+ }
637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertSnackBarComponent, decorators: [{
638
+ type: Component,
639
+ args: [{ selector: 'matecu-alert-snack-bar', standalone: true, imports: [CommonModule, MatButtonModule, MatSnackBarModule], 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"] }]
640
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
641
+ type: Inject,
642
+ args: [MAT_SNACK_BAR_DATA]
643
+ }] }, { type: i1$2.MatSnackBarRef }], propDecorators: { className: [{
644
+ type: HostBinding,
645
+ args: ['class']
646
+ }] } });
647
+
648
+ class MatecuAlertBoxModule {
649
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
650
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertBoxModule, imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule, MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent], exports: [MatecuAlertBoxComponent] }); }
651
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertBoxModule, imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule, MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent] }); }
652
+ }
653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuAlertBoxModule, decorators: [{
654
+ type: NgModule,
655
+ args: [{
656
+ declarations: [],
657
+ imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, MatSnackBarModule, MatecuAlertBoxComponent, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent],
658
+ exports: [MatecuAlertBoxComponent]
659
+ }]
660
+ }] });
661
+
662
+ class MatecuSnackBarService {
663
+ constructor(snackBar) {
664
+ this.snackBar = snackBar;
665
+ }
666
+ openError(error, title, action, config) {
667
+ const message = this.getErrorMessage(error);
668
+ const titleStr = title || 'ERROR';
669
+ const type = MatecuAlertBoxType.danger;
670
+ return this.openAlert(message, titleStr, type, action, config);
671
+ }
672
+ openSuccess(message, title, action, config) {
673
+ const titleStr = title || 'OK';
674
+ const type = MatecuAlertBoxType.success;
675
+ return this.openAlert(message, titleStr, type, action, config);
676
+ }
677
+ openWarning(message, title, action, config) {
678
+ const titleStr = title || 'WARNING';
679
+ const type = MatecuAlertBoxType.warning;
680
+ return this.openAlert(message, titleStr, type, action, config);
681
+ }
682
+ openInfo(message, title, action, config) {
683
+ const titleStr = title || 'INFO';
684
+ const type = MatecuAlertBoxType.info;
685
+ return this.openAlert(message, titleStr, type, action, config);
686
+ }
687
+ open(message, action, config) {
688
+ return this.snackBar.open(message, action, config);
689
+ }
690
+ dismiss() {
691
+ this.snackBar.dismiss();
692
+ }
693
+ openAlert(message, title, type, action, config) {
694
+ const data = {
695
+ message,
696
+ title,
697
+ action,
698
+ type
699
+ };
700
+ const dialogConfig = { ...config, data };
701
+ return this.snackBar.openFromComponent(MatecuAlertSnackBarComponent, dialogConfig);
702
+ }
703
+ getErrorMessage(err) {
704
+ const error = new Error();
705
+ if (typeof err === 'string') {
706
+ return err;
707
+ }
708
+ if (err instanceof Error) {
709
+ return err.message;
710
+ }
711
+ return '';
712
+ }
713
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSnackBarService, deps: [{ token: i1$2.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable }); }
714
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSnackBarService, providedIn: 'root' }); }
715
+ }
716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: MatecuSnackBarService, decorators: [{
717
+ type: Injectable,
718
+ args: [{
719
+ providedIn: 'root'
720
+ }]
721
+ }], ctorParameters: () => [{ type: i1$2.MatSnackBar }] });
722
+
723
+ /*
724
+ * Public API Surface of angular-matecu
725
+ */
726
+ /**
727
+ * spinner
728
+ */
729
+
730
+ /**
731
+ * Generated bundle index. Do not edit.
732
+ */
733
+
734
+ export { MatecuAlertBoxComponent, MatecuAlertBoxModule, MatecuAlertBoxType, MatecuAlertDialogComponent, MatecuAlertSnackBarComponent, MatecuSnackBarService, MatecuSpinnerComponent, MatecuSpinnerModule, MatecuSpinnerService, MatecuTopbarActionComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent, MatecuTopbarHeaderColumnComponent, MatecuTopbarHeaderRowComponent, MatecuTopbarLayoutComponent, MatecuTopbarLayoutModule, MatecuTopbarSearchComponent, MatecuTopbarTitleComponent };
735
+ //# sourceMappingURL=angular-matecu.mjs.map