angular-matecu 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -0
- package/angular-matecu.d.ts +5 -0
- package/bundles/angular-matecu.umd.js +561 -0
- package/bundles/angular-matecu.umd.js.map +1 -0
- package/esm2015/angular-matecu.js +5 -0
- package/esm2015/lib/modules/matecu-alert-box/components/matecu-alert-box/matecu-alert-box.component.js +69 -0
- package/esm2015/lib/modules/matecu-alert-box/components/matecu-alert-dialog/matecu-alert-dialog.component.js +55 -0
- package/esm2015/lib/modules/matecu-alert-box/matecu-alert-box.module.js +22 -0
- package/esm2015/lib/modules/matecu-alert-box/types/matecu-alert-dialog.js +2 -0
- package/esm2015/lib/modules/matecu-alert-box/types/matecu-altert-box-type.js +8 -0
- package/esm2015/lib/modules/matecu-spinner/components/matecu-spinner/matecu-spinner.component.js +61 -0
- package/esm2015/lib/modules/matecu-spinner/matecu-spinner.module.js +24 -0
- package/esm2015/lib/modules/matecu-spinner/services/matecu-spinner.service.js +44 -0
- package/esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-body/matecu-topbar-body.component.js +23 -0
- package/esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-fab/matecu-topbar-fab.component.js +33 -0
- package/esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-layout/matecu-topbar-layout.component.js +115 -0
- package/esm2015/lib/modules/matecu-topbar-layout/components/matecu-topbar-title/matecu-topbar-title.component.js +23 -0
- package/esm2015/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.js +46 -0
- package/esm2015/public-api.js +26 -0
- package/fesm2015/angular-matecu.js +489 -0
- package/fesm2015/angular-matecu.js.map +1 -0
- package/lib/modules/matecu-alert-box/components/matecu-alert-box/matecu-alert-box.component.d.ts +19 -0
- package/lib/modules/matecu-alert-box/components/matecu-alert-dialog/matecu-alert-dialog.component.d.ts +22 -0
- package/lib/modules/matecu-alert-box/matecu-alert-box.module.d.ts +12 -0
- package/lib/modules/matecu-alert-box/types/matecu-alert-dialog.d.ts +9 -0
- package/lib/modules/matecu-alert-box/types/matecu-altert-box-type.d.ts +6 -0
- package/lib/modules/matecu-spinner/components/matecu-spinner/matecu-spinner.component.d.ts +20 -0
- package/lib/modules/matecu-spinner/matecu-spinner.module.d.ts +8 -0
- package/lib/modules/matecu-spinner/services/matecu-spinner.service.d.ts +15 -0
- package/lib/modules/matecu-topbar-layout/components/matecu-topbar-body/matecu-topbar-body.component.d.ts +9 -0
- package/lib/modules/matecu-topbar-layout/components/matecu-topbar-fab/matecu-topbar-fab.component.d.ts +12 -0
- package/lib/modules/matecu-topbar-layout/components/matecu-topbar-layout/matecu-topbar-layout.component.d.ts +32 -0
- package/lib/modules/matecu-topbar-layout/components/matecu-topbar-title/matecu-topbar-title.component.d.ts +9 -0
- package/lib/modules/matecu-topbar-layout/matecu-topbar-layout.module.d.ts +15 -0
- package/package.json +19 -0
- package/public-api.d.ts +22 -0
- package/src/css/main.css +1 -0
- package/src/scss/main.scss +2 -0
- package/src/scss/matecu-spinner-module/_matecu-spinner-component.scss +8 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('@angular/forms'), require('@angular/material/toolbar'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/material/dialog')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('angular-matecu', ['exports', '@angular/core', '@angular/common', 'rxjs', 'rxjs/operators', '@angular/forms', '@angular/material/toolbar', '@angular/material/button', '@angular/material/icon', '@angular/material/dialog'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['angular-matecu'] = {}, global.ng.core, global.ng.common, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.material.toolbar, global.ng.material.button, global.ng.material.icon, global.ng.material.dialog));
|
|
5
|
+
}(this, (function (exports, i0, i4, rxjs, operators, i5, i1, i2, i3, i1$1) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return e[k];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n['default'] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
29
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
32
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
33
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
34
|
+
|
|
35
|
+
var MatecuSpinnerService = /** @class */ (function () {
|
|
36
|
+
function MatecuSpinnerService() {
|
|
37
|
+
this.active$ = new rxjs.BehaviorSubject(false);
|
|
38
|
+
this.requestsKeys = [];
|
|
39
|
+
}
|
|
40
|
+
MatecuSpinnerService.prototype.watch = function () {
|
|
41
|
+
return this.active$.pipe();
|
|
42
|
+
};
|
|
43
|
+
MatecuSpinnerService.prototype.add = function (customKey) {
|
|
44
|
+
var key = (typeof (customKey) === 'string' && customKey.length > 0) ? customKey : this.createKey();
|
|
45
|
+
this.requestsKeys.push(key);
|
|
46
|
+
this.updateStatus();
|
|
47
|
+
return key;
|
|
48
|
+
};
|
|
49
|
+
MatecuSpinnerService.prototype.remove = function (key) {
|
|
50
|
+
this.requestsKeys = this.requestsKeys.filter(function (requestKey) { return requestKey !== key; });
|
|
51
|
+
this.updateStatus();
|
|
52
|
+
};
|
|
53
|
+
MatecuSpinnerService.prototype.clear = function () {
|
|
54
|
+
this.requestsKeys = [];
|
|
55
|
+
this.updateStatus();
|
|
56
|
+
};
|
|
57
|
+
MatecuSpinnerService.prototype.updateStatus = function () {
|
|
58
|
+
var active = this.requestsKeys.length > 0;
|
|
59
|
+
this.active$.next(active);
|
|
60
|
+
};
|
|
61
|
+
MatecuSpinnerService.prototype.createKey = function () {
|
|
62
|
+
var time = new Date().getTime();
|
|
63
|
+
var complement = Math.random();
|
|
64
|
+
return time + "__" + complement;
|
|
65
|
+
};
|
|
66
|
+
return MatecuSpinnerService;
|
|
67
|
+
}());
|
|
68
|
+
MatecuSpinnerService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
69
|
+
MatecuSpinnerService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerService, providedIn: 'root' });
|
|
70
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerService, decorators: [{
|
|
71
|
+
type: i0.Injectable,
|
|
72
|
+
args: [{
|
|
73
|
+
providedIn: 'root',
|
|
74
|
+
}]
|
|
75
|
+
}], ctorParameters: function () { return []; } });
|
|
76
|
+
|
|
77
|
+
var MatecuSpinnerComponent = /** @class */ (function () {
|
|
78
|
+
function MatecuSpinnerComponent(spinnerService) {
|
|
79
|
+
this.spinnerService = spinnerService;
|
|
80
|
+
this.destroy$ = new rxjs.Subject();
|
|
81
|
+
this.hiddenClass = 'matecu-spinner--hidden';
|
|
82
|
+
this.activeCache = false;
|
|
83
|
+
this.className = 'matecu-spinner';
|
|
84
|
+
this.color = '#2196F3';
|
|
85
|
+
this.global = false;
|
|
86
|
+
this.size = '70px';
|
|
87
|
+
}
|
|
88
|
+
Object.defineProperty(MatecuSpinnerComponent.prototype, "active", {
|
|
89
|
+
get: function () {
|
|
90
|
+
return this.activeCache;
|
|
91
|
+
},
|
|
92
|
+
set: function (value) {
|
|
93
|
+
if (this.global) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.activeCache = value;
|
|
97
|
+
this.className = value
|
|
98
|
+
? this.className.replace(" " + this.hiddenClass, '')
|
|
99
|
+
: (this.className += " " + this.hiddenClass);
|
|
100
|
+
},
|
|
101
|
+
enumerable: false,
|
|
102
|
+
configurable: true
|
|
103
|
+
});
|
|
104
|
+
MatecuSpinnerComponent.prototype.ngOnDestroy = function () {
|
|
105
|
+
this.destroy$.next();
|
|
106
|
+
this.destroy$.complete();
|
|
107
|
+
};
|
|
108
|
+
MatecuSpinnerComponent.prototype.ngOnInit = function () {
|
|
109
|
+
var _this = this;
|
|
110
|
+
if (this.global) {
|
|
111
|
+
this.spinnerService.watch().pipe(operators.tap(function (value) { return _this.activeCache = value; }), operators.takeUntil(this.destroy$)).subscribe();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return MatecuSpinnerComponent;
|
|
115
|
+
}());
|
|
116
|
+
MatecuSpinnerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerComponent, deps: [{ token: MatecuSpinnerService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
117
|
+
MatecuSpinnerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuSpinnerComponent, selector: "matecu-spinner", inputs: { color: "color", global: "global", active: "active", size: "size" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, 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}"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
118
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerComponent, decorators: [{
|
|
119
|
+
type: i0.Component,
|
|
120
|
+
args: [{
|
|
121
|
+
selector: 'matecu-spinner',
|
|
122
|
+
templateUrl: './matecu-spinner.component.html',
|
|
123
|
+
styleUrls: ['./matecu-spinner.component.css']
|
|
124
|
+
}]
|
|
125
|
+
}], ctorParameters: function () { return [{ type: MatecuSpinnerService }]; }, propDecorators: { className: [{
|
|
126
|
+
type: i0.HostBinding,
|
|
127
|
+
args: ['class']
|
|
128
|
+
}], color: [{
|
|
129
|
+
type: i0.Input
|
|
130
|
+
}], global: [{
|
|
131
|
+
type: i0.Input
|
|
132
|
+
}], active: [{
|
|
133
|
+
type: i0.Input
|
|
134
|
+
}], size: [{
|
|
135
|
+
type: i0.Input
|
|
136
|
+
}] } });
|
|
137
|
+
|
|
138
|
+
var MatecuSpinnerModule = /** @class */ (function () {
|
|
139
|
+
function MatecuSpinnerModule() {
|
|
140
|
+
}
|
|
141
|
+
return MatecuSpinnerModule;
|
|
142
|
+
}());
|
|
143
|
+
MatecuSpinnerModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
144
|
+
MatecuSpinnerModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerModule, declarations: [MatecuSpinnerComponent], imports: [i4.CommonModule], exports: [MatecuSpinnerComponent] });
|
|
145
|
+
MatecuSpinnerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerModule, imports: [[
|
|
146
|
+
i4.CommonModule
|
|
147
|
+
]] });
|
|
148
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuSpinnerModule, decorators: [{
|
|
149
|
+
type: i0.NgModule,
|
|
150
|
+
args: [{
|
|
151
|
+
declarations: [MatecuSpinnerComponent],
|
|
152
|
+
imports: [
|
|
153
|
+
i4.CommonModule
|
|
154
|
+
],
|
|
155
|
+
exports: [
|
|
156
|
+
MatecuSpinnerComponent
|
|
157
|
+
]
|
|
158
|
+
}]
|
|
159
|
+
}] });
|
|
160
|
+
|
|
161
|
+
var MatecuTopbarLayoutComponent = /** @class */ (function () {
|
|
162
|
+
function MatecuTopbarLayoutComponent() {
|
|
163
|
+
this.className = 'matecu-topbar-layout';
|
|
164
|
+
this.showSearchInput = false;
|
|
165
|
+
this.search = false;
|
|
166
|
+
this.searchInput = new i5.FormControl();
|
|
167
|
+
this.isProminent = false;
|
|
168
|
+
this.scrollingClass = 'matecu-topbar-layout--scrolling';
|
|
169
|
+
this.prominentClass = 'matecu-topbar-layout--prominent';
|
|
170
|
+
this.searchPlaceholder = 'Buscar';
|
|
171
|
+
this.color = 'primary';
|
|
172
|
+
this.navMenu = true;
|
|
173
|
+
this.actionMenu = false;
|
|
174
|
+
this.clickNavMenu = new i0.EventEmitter();
|
|
175
|
+
this.clickActionMenu = new i0.EventEmitter();
|
|
176
|
+
}
|
|
177
|
+
Object.defineProperty(MatecuTopbarLayoutComponent.prototype, "prominent", {
|
|
178
|
+
set: function (value) {
|
|
179
|
+
this.isProminent = value;
|
|
180
|
+
if (value) {
|
|
181
|
+
this.className += ' ' + this.prominentClass;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
var regex = new RegExp(this.prominentClass, 'ig');
|
|
185
|
+
this.className = this.className.replace(regex, '').trim();
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
enumerable: false,
|
|
189
|
+
configurable: true
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(MatecuTopbarLayoutComponent.prototype, "searchControl", {
|
|
192
|
+
set: function (value) {
|
|
193
|
+
if (!!value) {
|
|
194
|
+
this.searchInput = value;
|
|
195
|
+
this.search = true;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
this.searchInput = new i5.FormControl();
|
|
199
|
+
this.search = false;
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
enumerable: false,
|
|
203
|
+
configurable: true
|
|
204
|
+
});
|
|
205
|
+
MatecuTopbarLayoutComponent.prototype.ngOnInit = function () {
|
|
206
|
+
this.spyScroll().subscribe();
|
|
207
|
+
};
|
|
208
|
+
MatecuTopbarLayoutComponent.prototype.toogleSearch = function () {
|
|
209
|
+
this.showSearchInput = !this.showSearchInput;
|
|
210
|
+
};
|
|
211
|
+
MatecuTopbarLayoutComponent.prototype.closeSearch = function () {
|
|
212
|
+
this.showSearchInput = false;
|
|
213
|
+
this.searchInput.reset();
|
|
214
|
+
};
|
|
215
|
+
MatecuTopbarLayoutComponent.prototype.onMenuClick = function () {
|
|
216
|
+
};
|
|
217
|
+
MatecuTopbarLayoutComponent.prototype.onClickNavMenu = function () {
|
|
218
|
+
this.clickNavMenu.emit();
|
|
219
|
+
};
|
|
220
|
+
MatecuTopbarLayoutComponent.prototype.onClickActionMenu = function () {
|
|
221
|
+
this.clickActionMenu.emit();
|
|
222
|
+
};
|
|
223
|
+
MatecuTopbarLayoutComponent.prototype.spyScroll = function () {
|
|
224
|
+
var _this = this;
|
|
225
|
+
var scrollabe = document.querySelector('.matecu-topbar-layout__body');
|
|
226
|
+
if (!scrollabe) {
|
|
227
|
+
return rxjs.of(null);
|
|
228
|
+
}
|
|
229
|
+
return rxjs.fromEvent(scrollabe, 'scroll').pipe(operators.tap(function () { return _this.applyScrollStyles(scrollabe); }), operators.map(function () { return scrollabe; }));
|
|
230
|
+
};
|
|
231
|
+
MatecuTopbarLayoutComponent.prototype.applyScrollStyles = function (scrollabe) {
|
|
232
|
+
if (!scrollabe) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
var scrollPosition = scrollabe.scrollTop;
|
|
236
|
+
if (scrollPosition > 30) {
|
|
237
|
+
this.className += ' ' + this.scrollingClass;
|
|
238
|
+
}
|
|
239
|
+
if (scrollPosition < 10) {
|
|
240
|
+
var regexp = new RegExp(this.scrollingClass, 'ig');
|
|
241
|
+
this.className = this.className.replace(regexp, '').trim();
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
return MatecuTopbarLayoutComponent;
|
|
245
|
+
}());
|
|
246
|
+
MatecuTopbarLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarLayoutComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
247
|
+
MatecuTopbarLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuTopbarLayoutComponent, selector: "matecu-topbar-layout", inputs: { searchPlaceholder: "searchPlaceholder", color: "color", navMenu: "navMenu", actionMenu: "actionMenu", prominent: "prominent", searchControl: "searchControl" }, outputs: { clickNavMenu: "clickNavMenu", clickActionMenu: "clickActionMenu" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<div>\n <mat-toolbar [color]=\"color\">\n <div *ngIf=\"navMenu\">\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"onClickNavMenu()\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n </div>\n <div class=\"matecu-topbar-layout__fab\">\n <ng-content select=\"matecu-topbar-fab\"></ng-content>\n </div>\n <div class=\"matecu-topbar-layout__title\">\n <ng-content select=\"matecu-topbar-title\"></ng-content>\n </div>\n \n <div *ngIf=\"search\">\n <button type=\"button\" (click)=\"toogleSearch()\" mat-icon-button>\n <mat-icon>search</mat-icon>\n </button>\n </div>\n \n <div *ngIf=\"actionMenu\">\n <button type=\"button\" (click)=\"onClickActionMenu()\" mat-icon-button>\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n \n <div\n class=\"matecu-topbar-layout__search\"\n [ngClass]=\"{ active: showSearchInput }\"\n >\n <input\n type=\"text\"\n [formControl]=\"searchInput\"\n [placeholder]=\"searchPlaceholder\"\n />\n <button mat-icon-button type=\"button\" (click)=\"closeSearch()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </mat-toolbar>\n \n \n</div>\n<div class=\"matecu-topbar-layout__body\" >\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n</div>\n", styles: [".matecu-topbar-layout,:host{display:grid;height:100vh;grid-template-rows:auto 1fr;position:relative;overflow:hidden}.matecu-topbar-layout,.matecu-topbar-layout *,:host,:host *{box-sizing:border-box}.matecu-topbar-layout mat-toolbar,:host mat-toolbar{position:relative;height:64px;max-height:64px;transition:all .3s}.matecu-topbar-layout mat-toolbar>div,:host mat-toolbar>div{display:flex;align-items:flex-start;min-height:100%}.matecu-topbar-layout__title,:host__title{margin-right:auto;height:100%;padding-left:10px;align-items:center!important}.matecu-topbar-layout__fab,:host__fab{z-index:1;height:100%;display:flex;align-items:flex-end!important}@media screen and (max-width:425px){.matecu-topbar-layout__fab,:host__fab{position:fixed;bottom:20px;right:20px;height:auto!important;min-height:auto!important}}.matecu-topbar-layout__search,:host__search{position:absolute;top:0;left:0;width:100%;transform:translateY(-110%);overflow:hidden;transition:transform .2s ease-in-out;display:flex;align-items:center!important;height:64px;min-height:64px!important;box-shadow:0 4px 8px #00000080}.matecu-topbar-layout__search input,:host__search input{position:absolute;display:block;top:0;left:0;width:100%;bottom:0;padding:0 50px 0 10px;border:none;border-bottom:1px solid #ccc}.matecu-topbar-layout__search button,:host__search button{z-index:2;position:absolute;right:10px;color:#000}.matecu-topbar-layout__search.active,:host__search.active{transform:translateY(0)}.matecu-topbar-layout__body,:host__body{padding-top:50px;padding-bottom:50px;overflow-y:auto}:host.matecu-topbar-layout--prominent .mat-toolbar{height:128px;max-height:128px;align-items:flex-start}:host.matecu-topbar-layout--scrolling .mat-toolbar{height:64px!important;max-height:64px!important;align-items:center!important;box-shadow:0 4px 8px #00000080}"], components: [{ type: i1__namespace.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i2__namespace.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__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.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: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
248
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarLayoutComponent, decorators: [{
|
|
249
|
+
type: i0.Component,
|
|
250
|
+
args: [{
|
|
251
|
+
selector: 'matecu-topbar-layout',
|
|
252
|
+
templateUrl: './matecu-topbar-layout.component.html',
|
|
253
|
+
styleUrls: ['./matecu-topbar-layout.component.scss']
|
|
254
|
+
}]
|
|
255
|
+
}], ctorParameters: function () { return []; }, propDecorators: { className: [{
|
|
256
|
+
type: i0.HostBinding,
|
|
257
|
+
args: ['class']
|
|
258
|
+
}], searchPlaceholder: [{
|
|
259
|
+
type: i0.Input
|
|
260
|
+
}], color: [{
|
|
261
|
+
type: i0.Input
|
|
262
|
+
}], navMenu: [{
|
|
263
|
+
type: i0.Input
|
|
264
|
+
}], actionMenu: [{
|
|
265
|
+
type: i0.Input
|
|
266
|
+
}], clickNavMenu: [{
|
|
267
|
+
type: i0.Output
|
|
268
|
+
}], clickActionMenu: [{
|
|
269
|
+
type: i0.Output
|
|
270
|
+
}], prominent: [{
|
|
271
|
+
type: i0.Input
|
|
272
|
+
}], searchControl: [{
|
|
273
|
+
type: i0.Input
|
|
274
|
+
}] } });
|
|
275
|
+
|
|
276
|
+
var MatecuTopbarTitleComponent = /** @class */ (function () {
|
|
277
|
+
function MatecuTopbarTitleComponent() {
|
|
278
|
+
this.className = 'title';
|
|
279
|
+
}
|
|
280
|
+
MatecuTopbarTitleComponent.prototype.ngOnInit = function () {
|
|
281
|
+
};
|
|
282
|
+
return MatecuTopbarTitleComponent;
|
|
283
|
+
}());
|
|
284
|
+
MatecuTopbarTitleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarTitleComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
285
|
+
MatecuTopbarTitleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuTopbarTitleComponent, selector: "matecu-topbar-title", host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<ng-content></ng-content>", styles: [""] });
|
|
286
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarTitleComponent, decorators: [{
|
|
287
|
+
type: i0.Component,
|
|
288
|
+
args: [{
|
|
289
|
+
selector: 'matecu-topbar-title',
|
|
290
|
+
templateUrl: './matecu-topbar-title.component.html',
|
|
291
|
+
styleUrls: ['./matecu-topbar-title.component.scss']
|
|
292
|
+
}]
|
|
293
|
+
}], ctorParameters: function () { return []; }, propDecorators: { className: [{
|
|
294
|
+
type: i0.HostBinding,
|
|
295
|
+
args: ['class']
|
|
296
|
+
}] } });
|
|
297
|
+
|
|
298
|
+
var MatecuTopbarBodyComponent = /** @class */ (function () {
|
|
299
|
+
function MatecuTopbarBodyComponent() {
|
|
300
|
+
this.className = 'matecu-topbar-body';
|
|
301
|
+
}
|
|
302
|
+
MatecuTopbarBodyComponent.prototype.ngOnInit = function () {
|
|
303
|
+
};
|
|
304
|
+
return MatecuTopbarBodyComponent;
|
|
305
|
+
}());
|
|
306
|
+
MatecuTopbarBodyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarBodyComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
307
|
+
MatecuTopbarBodyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuTopbarBodyComponent, selector: "matecu-topbar-body", host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<ng-content></ng-content>", styles: [":host{display:block}"] });
|
|
308
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarBodyComponent, decorators: [{
|
|
309
|
+
type: i0.Component,
|
|
310
|
+
args: [{
|
|
311
|
+
selector: 'matecu-topbar-body',
|
|
312
|
+
templateUrl: './matecu-topbar-body.component.html',
|
|
313
|
+
styleUrls: ['./matecu-topbar-body.component.scss']
|
|
314
|
+
}]
|
|
315
|
+
}], ctorParameters: function () { return []; }, propDecorators: { className: [{
|
|
316
|
+
type: i0.HostBinding,
|
|
317
|
+
args: ['class']
|
|
318
|
+
}] } });
|
|
319
|
+
|
|
320
|
+
var MatecuTopbarFabComponent = /** @class */ (function () {
|
|
321
|
+
function MatecuTopbarFabComponent() {
|
|
322
|
+
this.color = 'accent';
|
|
323
|
+
this.clickAction = new i0.EventEmitter();
|
|
324
|
+
this.className = 'matecu-topbar-fab';
|
|
325
|
+
}
|
|
326
|
+
MatecuTopbarFabComponent.prototype.ngOnInit = function () {
|
|
327
|
+
};
|
|
328
|
+
MatecuTopbarFabComponent.prototype.onClickAction = function () {
|
|
329
|
+
this.clickAction.emit();
|
|
330
|
+
};
|
|
331
|
+
return MatecuTopbarFabComponent;
|
|
332
|
+
}());
|
|
333
|
+
MatecuTopbarFabComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarFabComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
334
|
+
MatecuTopbarFabComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuTopbarFabComponent, selector: "matecu-topbar-fab", inputs: { color: "color" }, outputs: { clickAction: "clickAction" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<button type=\"button\" mat-raised-button [color]=\"color\" (click)=\"onClickAction()\">\n <ng-content></ng-content>\n</button>", styles: [".matecu-topbar-fab,:host{display:flex;justify-content:center;align-content:center}.matecu-topbar-fab button,:host button{transform:translateY(50%);height:4rem;box-sizing:border-box;border-radius:4rem}@media screen and (max-width:425px){.matecu-topbar-fab button,:host button{transform:translateY(0)}}"], components: [{ type: i2__namespace.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"] }] });
|
|
335
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarFabComponent, decorators: [{
|
|
336
|
+
type: i0.Component,
|
|
337
|
+
args: [{
|
|
338
|
+
selector: 'matecu-topbar-fab',
|
|
339
|
+
templateUrl: './matecu-topbar-fab.component.html',
|
|
340
|
+
styleUrls: ['./matecu-topbar-fab.component.scss']
|
|
341
|
+
}]
|
|
342
|
+
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
|
|
343
|
+
type: i0.Input
|
|
344
|
+
}], clickAction: [{
|
|
345
|
+
type: i0.Output
|
|
346
|
+
}], className: [{
|
|
347
|
+
type: i0.HostBinding,
|
|
348
|
+
args: ['class']
|
|
349
|
+
}] } });
|
|
350
|
+
|
|
351
|
+
var MatecuTopbarLayoutModule = /** @class */ (function () {
|
|
352
|
+
function MatecuTopbarLayoutModule() {
|
|
353
|
+
}
|
|
354
|
+
return MatecuTopbarLayoutModule;
|
|
355
|
+
}());
|
|
356
|
+
MatecuTopbarLayoutModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarLayoutModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
357
|
+
MatecuTopbarLayoutModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarLayoutModule, declarations: [MatecuTopbarLayoutComponent, MatecuTopbarTitleComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent], imports: [i4.CommonModule,
|
|
358
|
+
i1.MatToolbarModule,
|
|
359
|
+
i3.MatIconModule,
|
|
360
|
+
i5.FormsModule,
|
|
361
|
+
i5.ReactiveFormsModule,
|
|
362
|
+
i2.MatButtonModule], exports: [MatecuTopbarLayoutComponent, MatecuTopbarTitleComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent] });
|
|
363
|
+
MatecuTopbarLayoutModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarLayoutModule, imports: [[
|
|
364
|
+
i4.CommonModule,
|
|
365
|
+
i1.MatToolbarModule,
|
|
366
|
+
i3.MatIconModule,
|
|
367
|
+
i5.FormsModule,
|
|
368
|
+
i5.ReactiveFormsModule,
|
|
369
|
+
i2.MatButtonModule
|
|
370
|
+
]] });
|
|
371
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuTopbarLayoutModule, decorators: [{
|
|
372
|
+
type: i0.NgModule,
|
|
373
|
+
args: [{
|
|
374
|
+
declarations: [MatecuTopbarLayoutComponent, MatecuTopbarTitleComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent],
|
|
375
|
+
imports: [
|
|
376
|
+
i4.CommonModule,
|
|
377
|
+
i1.MatToolbarModule,
|
|
378
|
+
i3.MatIconModule,
|
|
379
|
+
i5.FormsModule,
|
|
380
|
+
i5.ReactiveFormsModule,
|
|
381
|
+
i2.MatButtonModule
|
|
382
|
+
],
|
|
383
|
+
exports: [
|
|
384
|
+
MatecuTopbarLayoutComponent, MatecuTopbarTitleComponent, MatecuTopbarBodyComponent, MatecuTopbarFabComponent
|
|
385
|
+
]
|
|
386
|
+
}]
|
|
387
|
+
}] });
|
|
388
|
+
|
|
389
|
+
exports.MatecuAlertBoxType = void 0;
|
|
390
|
+
(function (MatecuAlertBoxType) {
|
|
391
|
+
MatecuAlertBoxType["warning"] = "warning";
|
|
392
|
+
MatecuAlertBoxType["success"] = "success";
|
|
393
|
+
MatecuAlertBoxType["danger"] = "danger";
|
|
394
|
+
MatecuAlertBoxType["info"] = "info";
|
|
395
|
+
})(exports.MatecuAlertBoxType || (exports.MatecuAlertBoxType = {}));
|
|
396
|
+
|
|
397
|
+
var MatecuAlertBoxComponent = /** @class */ (function () {
|
|
398
|
+
function MatecuAlertBoxComponent() {
|
|
399
|
+
this.classNameBase = 'matecu-alert-box';
|
|
400
|
+
this.alertIcon = false;
|
|
401
|
+
this.className = this.classNameBase;
|
|
402
|
+
}
|
|
403
|
+
Object.defineProperty(MatecuAlertBoxComponent.prototype, "color", {
|
|
404
|
+
get: function () {
|
|
405
|
+
return this.alertColor;
|
|
406
|
+
},
|
|
407
|
+
set: function (value) {
|
|
408
|
+
this.alertColor = value;
|
|
409
|
+
if (!!value) {
|
|
410
|
+
this.className = this.classNameBase + " " + this.classNameBase + "--" + value;
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
this.className = this.classNameBase;
|
|
414
|
+
}
|
|
415
|
+
this.updateIcon();
|
|
416
|
+
},
|
|
417
|
+
enumerable: false,
|
|
418
|
+
configurable: true
|
|
419
|
+
});
|
|
420
|
+
Object.defineProperty(MatecuAlertBoxComponent.prototype, "icon", {
|
|
421
|
+
get: function () {
|
|
422
|
+
return this.alertIcon;
|
|
423
|
+
},
|
|
424
|
+
set: function (value) {
|
|
425
|
+
this.alertIcon = value;
|
|
426
|
+
},
|
|
427
|
+
enumerable: false,
|
|
428
|
+
configurable: true
|
|
429
|
+
});
|
|
430
|
+
MatecuAlertBoxComponent.prototype.ngOnInit = function () { };
|
|
431
|
+
MatecuAlertBoxComponent.prototype.updateIcon = function () {
|
|
432
|
+
switch (this.color) {
|
|
433
|
+
case exports.MatecuAlertBoxType.danger:
|
|
434
|
+
this.iconValue = 'dangerous';
|
|
435
|
+
break;
|
|
436
|
+
case exports.MatecuAlertBoxType.warning:
|
|
437
|
+
this.iconValue = 'warning';
|
|
438
|
+
break;
|
|
439
|
+
case exports.MatecuAlertBoxType.success:
|
|
440
|
+
this.iconValue = 'check_circle';
|
|
441
|
+
break;
|
|
442
|
+
case exports.MatecuAlertBoxType.info:
|
|
443
|
+
this.iconValue = 'info';
|
|
444
|
+
break;
|
|
445
|
+
default:
|
|
446
|
+
this.iconValue = null;
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
return MatecuAlertBoxComponent;
|
|
451
|
+
}());
|
|
452
|
+
MatecuAlertBoxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertBoxComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
453
|
+
MatecuAlertBoxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuAlertBoxComponent, selector: "matecu-alert-box", inputs: { color: "color", icon: "icon" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, 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}"], components: [{ type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
454
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertBoxComponent, decorators: [{
|
|
455
|
+
type: i0.Component,
|
|
456
|
+
args: [{
|
|
457
|
+
selector: 'matecu-alert-box',
|
|
458
|
+
templateUrl: './matecu-alert-box.component.html',
|
|
459
|
+
styleUrls: ['./matecu-alert-box.component.scss'],
|
|
460
|
+
}]
|
|
461
|
+
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
|
|
462
|
+
type: i0.Input
|
|
463
|
+
}], icon: [{
|
|
464
|
+
type: i0.Input
|
|
465
|
+
}], className: [{
|
|
466
|
+
type: i0.HostBinding,
|
|
467
|
+
args: ['class']
|
|
468
|
+
}] } });
|
|
469
|
+
|
|
470
|
+
var MatecuAlertDialogComponent = /** @class */ (function () {
|
|
471
|
+
function MatecuAlertDialogComponent(dialogData, dialogRef) {
|
|
472
|
+
this.dialogData = dialogData;
|
|
473
|
+
this.dialogRef = dialogRef;
|
|
474
|
+
this.hasTitle = false;
|
|
475
|
+
this.hasDismissBtn = false;
|
|
476
|
+
this.hasActionBtn = false;
|
|
477
|
+
this.showActions = false;
|
|
478
|
+
this.setHasTitle();
|
|
479
|
+
this.setHasDismissBtn();
|
|
480
|
+
this.setHasActionBtn();
|
|
481
|
+
this.setShowActions();
|
|
482
|
+
}
|
|
483
|
+
MatecuAlertDialogComponent.prototype.ngOnInit = function () { };
|
|
484
|
+
MatecuAlertDialogComponent.prototype.activateAction = function () {
|
|
485
|
+
this.dialogRef.close(true);
|
|
486
|
+
};
|
|
487
|
+
MatecuAlertDialogComponent.prototype.setHasTitle = function () {
|
|
488
|
+
this.hasTitle = this.isValidString(this.dialogData.title);
|
|
489
|
+
};
|
|
490
|
+
MatecuAlertDialogComponent.prototype.setHasDismissBtn = function () {
|
|
491
|
+
this.hasDismissBtn = this.isValidString(this.dialogData.dismissText);
|
|
492
|
+
};
|
|
493
|
+
MatecuAlertDialogComponent.prototype.setHasActionBtn = function () {
|
|
494
|
+
this.hasActionBtn = this.isValidString(this.dialogData.action);
|
|
495
|
+
};
|
|
496
|
+
MatecuAlertDialogComponent.prototype.setShowActions = function () {
|
|
497
|
+
this.showActions = this.hasActionBtn || this.hasDismissBtn;
|
|
498
|
+
};
|
|
499
|
+
MatecuAlertDialogComponent.prototype.isValidString = function (str) {
|
|
500
|
+
var isValid = typeof str === 'string' && str.trim().length > 0;
|
|
501
|
+
return isValid;
|
|
502
|
+
};
|
|
503
|
+
return MatecuAlertDialogComponent;
|
|
504
|
+
}());
|
|
505
|
+
MatecuAlertDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertDialogComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: i1__namespace$1.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
506
|
+
MatecuAlertDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.4", type: MatecuAlertDialogComponent, selector: "matecu-alert-dialog", ngImport: i0__namespace, 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: [""], components: [{ type: MatecuAlertBoxComponent, selector: "matecu-alert-box", inputs: ["color", "icon"] }, { type: i2__namespace.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: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
507
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertDialogComponent, decorators: [{
|
|
508
|
+
type: i0.Component,
|
|
509
|
+
args: [{
|
|
510
|
+
selector: 'matecu-alert-dialog',
|
|
511
|
+
templateUrl: './matecu-alert-dialog.component.html',
|
|
512
|
+
styleUrls: ['./matecu-alert-dialog.component.scss'],
|
|
513
|
+
}]
|
|
514
|
+
}], ctorParameters: function () {
|
|
515
|
+
return [{ type: undefined, decorators: [{
|
|
516
|
+
type: i0.Inject,
|
|
517
|
+
args: [i1$1.MAT_DIALOG_DATA]
|
|
518
|
+
}] }, { type: i1__namespace$1.MatDialogRef }];
|
|
519
|
+
} });
|
|
520
|
+
|
|
521
|
+
var MatecuAlertBoxModule = /** @class */ (function () {
|
|
522
|
+
function MatecuAlertBoxModule() {
|
|
523
|
+
}
|
|
524
|
+
return MatecuAlertBoxModule;
|
|
525
|
+
}());
|
|
526
|
+
MatecuAlertBoxModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertBoxModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
527
|
+
MatecuAlertBoxModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertBoxModule, declarations: [MatecuAlertBoxComponent, MatecuAlertDialogComponent], imports: [i4.CommonModule, i3.MatIconModule, i1$1.MatDialogModule, i2.MatButtonModule], exports: [MatecuAlertBoxComponent] });
|
|
528
|
+
MatecuAlertBoxModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertBoxModule, imports: [[i4.CommonModule, i3.MatIconModule, i1$1.MatDialogModule, i2.MatButtonModule]] });
|
|
529
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.4", ngImport: i0__namespace, type: MatecuAlertBoxModule, decorators: [{
|
|
530
|
+
type: i0.NgModule,
|
|
531
|
+
args: [{
|
|
532
|
+
declarations: [MatecuAlertBoxComponent, MatecuAlertDialogComponent],
|
|
533
|
+
imports: [i4.CommonModule, i3.MatIconModule, i1$1.MatDialogModule, i2.MatButtonModule],
|
|
534
|
+
exports: [MatecuAlertBoxComponent],
|
|
535
|
+
}]
|
|
536
|
+
}] });
|
|
537
|
+
|
|
538
|
+
/*
|
|
539
|
+
* Public API Surface of angular-matecu
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Generated bundle index. Do not edit.
|
|
544
|
+
*/
|
|
545
|
+
|
|
546
|
+
exports.MatecuAlertBoxComponent = MatecuAlertBoxComponent;
|
|
547
|
+
exports.MatecuAlertBoxModule = MatecuAlertBoxModule;
|
|
548
|
+
exports.MatecuAlertDialogComponent = MatecuAlertDialogComponent;
|
|
549
|
+
exports.MatecuSpinnerComponent = MatecuSpinnerComponent;
|
|
550
|
+
exports.MatecuSpinnerModule = MatecuSpinnerModule;
|
|
551
|
+
exports.MatecuSpinnerService = MatecuSpinnerService;
|
|
552
|
+
exports.MatecuTopbarBodyComponent = MatecuTopbarBodyComponent;
|
|
553
|
+
exports.MatecuTopbarFabComponent = MatecuTopbarFabComponent;
|
|
554
|
+
exports.MatecuTopbarLayoutComponent = MatecuTopbarLayoutComponent;
|
|
555
|
+
exports.MatecuTopbarLayoutModule = MatecuTopbarLayoutModule;
|
|
556
|
+
exports.MatecuTopbarTitleComponent = MatecuTopbarTitleComponent;
|
|
557
|
+
|
|
558
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
559
|
+
|
|
560
|
+
})));
|
|
561
|
+
//# sourceMappingURL=angular-matecu.umd.js.map
|