@cauca-911/material 12.0.0 → 13.0.2

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 (30) hide show
  1. package/assets/i18n/cauca/es-material.json +9 -0
  2. package/assets/i18n/cauca/fr-material.json +1 -1
  3. package/{esm2015/cauca-911-material.js → esm2020/cauca-911-material.mjs} +0 -0
  4. package/esm2020/lib/cauca-input-file/cauca-input-file.component.mjs +148 -0
  5. package/esm2020/lib/cauca-input-multiple-langue/cauca-input-multiple-langue.component.mjs +88 -0
  6. package/{esm2015/lib/cauca-material.component.js → esm2020/lib/cauca-material.component.mjs} +2 -6
  7. package/{esm2015/lib/cauca-material.module.js → esm2020/lib/cauca-material.module.mjs} +0 -0
  8. package/{esm2015/lib/cauca-material.service.js → esm2020/lib/cauca-material.service.mjs} +1 -1
  9. package/esm2020/lib/cauca-menu-sidebar/cauca-menu-sidebar.component.mjs +144 -0
  10. package/{esm2015/lib/cauca-menu-vertical/cauca-menu-vertical.component.js → esm2020/lib/cauca-menu-vertical/cauca-menu-vertical.component.mjs} +7 -16
  11. package/{esm2015/lib/cauca-simple-dialog/cauca-simple-dialog.component.js → esm2020/lib/cauca-simple-dialog/cauca-simple-dialog.component.mjs} +2 -6
  12. package/esm2020/lib/cauca-slideshow/cauca-slideshow.component.mjs +139 -0
  13. package/{esm2015/lib/shared/models/menu-item.js → esm2020/lib/shared/models/menu-item.mjs} +0 -0
  14. package/{esm2015/lib/shared/models/simple-dialog-data.js → esm2020/lib/shared/models/simple-dialog-data.mjs} +0 -0
  15. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  16. package/fesm2015/cauca-911-material.mjs +984 -0
  17. package/fesm2015/cauca-911-material.mjs.map +1 -0
  18. package/{fesm2015/cauca-911-material.js → fesm2020/cauca-911-material.mjs} +31 -71
  19. package/fesm2020/cauca-911-material.mjs.map +1 -0
  20. package/lib/cauca-input-file/cauca-input-file.component.d.ts +1 -1
  21. package/lib/cauca-menu-sidebar/cauca-menu-sidebar.component.d.ts +4 -4
  22. package/lib/cauca-slideshow/cauca-slideshow.component.d.ts +4 -4
  23. package/package.json +26 -13
  24. package/bundles/cauca-911-material.umd.js +0 -1078
  25. package/bundles/cauca-911-material.umd.js.map +0 -1
  26. package/esm2015/lib/cauca-input-file/cauca-input-file.component.js +0 -152
  27. package/esm2015/lib/cauca-input-multiple-langue/cauca-input-multiple-langue.component.js +0 -94
  28. package/esm2015/lib/cauca-menu-sidebar/cauca-menu-sidebar.component.js +0 -152
  29. package/esm2015/lib/cauca-slideshow/cauca-slideshow.component.js +0 -144
  30. package/fesm2015/cauca-911-material.js.map +0 -1
@@ -1,1078 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngx-translate/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/tabs'), require('@fortawesome/angular-fontawesome'), require('@cauca-911/core'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/animations')) :
3
- typeof define === 'function' && define.amd ? define('@cauca-911/material', ['exports', '@angular/core', '@ngx-translate/core', '@angular/common', '@angular/forms', '@angular/material/button', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/tabs', '@fortawesome/angular-fontawesome', '@cauca-911/core', '@angular/material/dialog', '@angular/router', '@angular/animations'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["cauca-911"] = global["cauca-911"] || {}, global["cauca-911"].material = {}), global.ng.core, global["@ngx-translate/core"], global.ng.common, global.ng.forms, global.ng.material.button, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.tabs, global["@fortawesome/angular-fontawesome"], global["@cauca-911/core"], global.ng.material.dialog, global.ng.router, global.ng.animations));
5
- })(this, (function (exports, i0, i1, i2, i6, i3, i4, i5, i5$1, i2$1, i3$1, i1$2, i1$1, i1$3, animations) { '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 () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
29
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
31
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
33
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
34
- var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
35
- var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
36
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
37
- var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
38
-
39
- var CaucaMaterialService = /** @class */ (function () {
40
- function CaucaMaterialService() {
41
- }
42
- return CaucaMaterialService;
43
- }());
44
- CaucaMaterialService.ɵfac = function CaucaMaterialService_Factory(t) { return new (t || CaucaMaterialService)(); };
45
- CaucaMaterialService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: CaucaMaterialService, factory: CaucaMaterialService.ɵfac, providedIn: 'root' });
46
- (function () {
47
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaMaterialService, [{
48
- type: i0.Injectable,
49
- args: [{
50
- providedIn: 'root'
51
- }]
52
- }], function () { return []; }, null);
53
- })();
54
-
55
- var CaucaMaterialComponent = /** @class */ (function () {
56
- function CaucaMaterialComponent() {
57
- }
58
- CaucaMaterialComponent.prototype.ngOnInit = function () {
59
- };
60
- return CaucaMaterialComponent;
61
- }());
62
- CaucaMaterialComponent.ɵfac = function CaucaMaterialComponent_Factory(t) { return new (t || CaucaMaterialComponent)(); };
63
- CaucaMaterialComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaMaterialComponent, selectors: [["cauca-material"]], decls: 3, vars: 3, template: function CaucaMaterialComponent_Template(rf, ctx) {
64
- if (rf & 1) {
65
- i0__namespace.ɵɵelementStart(0, "div");
66
- i0__namespace.ɵɵtext(1);
67
- i0__namespace.ɵɵpipe(2, "translate");
68
- i0__namespace.ɵɵelementEnd();
69
- }
70
- if (rf & 2) {
71
- i0__namespace.ɵɵadvance(1);
72
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
73
- }
74
- }, pipes: [i1__namespace.TranslatePipe], encapsulation: 2 });
75
- (function () {
76
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaMaterialComponent, [{
77
- type: i0.Component,
78
- args: [{
79
- selector: 'cauca-material',
80
- templateUrl: './cauca-material.component.html',
81
- styles: []
82
- }]
83
- }], function () { return []; }, null);
84
- })();
85
-
86
- var SimpleDialogData = /** @class */ (function () {
87
- function SimpleDialogData() {
88
- this.buttons = [];
89
- }
90
- return SimpleDialogData;
91
- }());
92
-
93
- function CaucaSimpleDialogComponent_div_4_button_1_Template(rf, ctx) {
94
- if (rf & 1) {
95
- var _r5_1 = i0__namespace.ɵɵgetCurrentView();
96
- i0__namespace.ɵɵelementStart(0, "button", 6);
97
- i0__namespace.ɵɵlistener("click", function CaucaSimpleDialogComponent_div_4_button_1_Template_button_click_0_listener() { var restoredCtx = i0__namespace.ɵɵrestoreView(_r5_1); var i_r3 = restoredCtx.index; var ctx_r4 = i0__namespace.ɵɵnextContext(2); return ctx_r4.onClick(i_r3); });
98
- i0__namespace.ɵɵtext(1);
99
- i0__namespace.ɵɵelementEnd();
100
- }
101
- if (rf & 2) {
102
- var label_r2 = ctx.$implicit;
103
- i0__namespace.ɵɵadvance(1);
104
- i0__namespace.ɵɵtextInterpolate(label_r2);
105
- }
106
- }
107
- function CaucaSimpleDialogComponent_div_4_Template(rf, ctx) {
108
- if (rf & 1) {
109
- i0__namespace.ɵɵelementStart(0, "div", 4);
110
- i0__namespace.ɵɵtemplate(1, CaucaSimpleDialogComponent_div_4_button_1_Template, 2, 1, "button", 5);
111
- i0__namespace.ɵɵelementEnd();
112
- }
113
- if (rf & 2) {
114
- var ctx_r0 = i0__namespace.ɵɵnextContext();
115
- i0__namespace.ɵɵadvance(1);
116
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.data.buttons);
117
- }
118
- }
119
- var CaucaSimpleDialogComponent = /** @class */ (function () {
120
- function CaucaSimpleDialogComponent(dialogRef, data) {
121
- this.dialogRef = dialogRef;
122
- this.data = data;
123
- }
124
- CaucaSimpleDialogComponent.prototype.ngOnInit = function () { };
125
- CaucaSimpleDialogComponent.prototype.onClick = function (buttonIndex) {
126
- this.dialogRef.close(buttonIndex);
127
- };
128
- return CaucaSimpleDialogComponent;
129
- }());
130
- CaucaSimpleDialogComponent.ɵfac = function CaucaSimpleDialogComponent_Factory(t) { return new (t || CaucaSimpleDialogComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.MatDialogRef), i0__namespace.ɵɵdirectiveInject(i1$1.MAT_DIALOG_DATA)); };
131
- CaucaSimpleDialogComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaSimpleDialogComponent, selectors: [["cauca-simple-dialog"]], decls: 5, vars: 3, consts: [["mat-dialog-title", ""], ["mat-dialog-content", ""], [3, "innerHTML"], ["mat-dialog-actions", "", 4, "ngIf"], ["mat-dialog-actions", ""], ["mat-raised-button", "", 3, "click", 4, "ngFor", "ngForOf"], ["mat-raised-button", "", 3, "click"]], template: function CaucaSimpleDialogComponent_Template(rf, ctx) {
132
- if (rf & 1) {
133
- i0__namespace.ɵɵelementStart(0, "h1", 0);
134
- i0__namespace.ɵɵtext(1);
135
- i0__namespace.ɵɵelementEnd();
136
- i0__namespace.ɵɵelementStart(2, "div", 1);
137
- i0__namespace.ɵɵelement(3, "div", 2);
138
- i0__namespace.ɵɵelementEnd();
139
- i0__namespace.ɵɵtemplate(4, CaucaSimpleDialogComponent_div_4_Template, 2, 1, "div", 3);
140
- }
141
- if (rf & 2) {
142
- i0__namespace.ɵɵadvance(1);
143
- i0__namespace.ɵɵtextInterpolate(ctx.data.title);
144
- i0__namespace.ɵɵadvance(2);
145
- i0__namespace.ɵɵproperty("innerHTML", ctx.data.message, i0__namespace.ɵɵsanitizeHtml);
146
- i0__namespace.ɵɵadvance(1);
147
- i0__namespace.ɵɵproperty("ngIf", ctx.data.buttons);
148
- }
149
- }, directives: [i2__namespace.NgIf, i2__namespace.NgForOf, i3__namespace.MatButton], styles: ["div[mat-dialog-actions][_ngcontent-%COMP%]{margin-top:20px;text-align:center}"] });
150
- (function () {
151
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaSimpleDialogComponent, [{
152
- type: i0.Component,
153
- args: [{
154
- selector: 'cauca-simple-dialog',
155
- templateUrl: './cauca-simple-dialog.component.html',
156
- styleUrls: ['./cauca-simple-dialog.component.scss']
157
- }]
158
- }], function () {
159
- return [{ type: i1__namespace$1.MatDialogRef }, { type: SimpleDialogData, decorators: [{
160
- type: i0.Inject,
161
- args: [i1$1.MAT_DIALOG_DATA]
162
- }] }];
163
- }, null);
164
- })();
165
-
166
- var _c0$2 = ["file"];
167
- function CaucaInputFileComponent_mat_icon_1_Template(rf, ctx) {
168
- if (rf & 1) {
169
- i0__namespace.ɵɵelementStart(0, "mat-icon");
170
- i0__namespace.ɵɵtext(1);
171
- i0__namespace.ɵɵelementEnd();
172
- }
173
- if (rf & 2) {
174
- var ctx_r0 = i0__namespace.ɵɵnextContext();
175
- i0__namespace.ɵɵadvance(1);
176
- i0__namespace.ɵɵtextInterpolate(ctx_r0.icon);
177
- }
178
- }
179
- function CaucaInputFileComponent_span_2_Template(rf, ctx) {
180
- if (rf & 1) {
181
- i0__namespace.ɵɵelementStart(0, "span");
182
- i0__namespace.ɵɵtext(1);
183
- i0__namespace.ɵɵelementEnd();
184
- }
185
- if (rf & 2) {
186
- var ctx_r1 = i0__namespace.ɵɵnextContext();
187
- i0__namespace.ɵɵadvance(1);
188
- i0__namespace.ɵɵtextInterpolate(ctx_r1.text);
189
- }
190
- }
191
- function CaucaInputFileComponent_ng_container_3_Template(rf, ctx) {
192
- if (rf & 1) {
193
- var _r7_1 = i0__namespace.ɵɵgetCurrentView();
194
- i0__namespace.ɵɵelementContainerStart(0);
195
- i0__namespace.ɵɵelementStart(1, "input", 4, 5);
196
- i0__namespace.ɵɵlistener("change", function CaucaInputFileComponent_ng_container_3_Template_input_change_1_listener($event) { i0__namespace.ɵɵrestoreView(_r7_1); var ctx_r6 = i0__namespace.ɵɵnextContext(); return ctx_r6.onSelectFile($event); });
197
- i0__namespace.ɵɵelementEnd();
198
- i0__namespace.ɵɵelementContainerEnd();
199
- }
200
- if (rf & 2) {
201
- var ctx_r2 = i0__namespace.ɵɵnextContext();
202
- i0__namespace.ɵɵadvance(1);
203
- i0__namespace.ɵɵproperty("accept", ctx_r2.accept);
204
- }
205
- }
206
- function CaucaInputFileComponent_ng_template_4_Template(rf, ctx) {
207
- if (rf & 1) {
208
- var _r10_1 = i0__namespace.ɵɵgetCurrentView();
209
- i0__namespace.ɵɵelementStart(0, "input", 6, 5);
210
- i0__namespace.ɵɵlistener("change", function CaucaInputFileComponent_ng_template_4_Template_input_change_0_listener($event) { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.onSelectFile($event); });
211
- i0__namespace.ɵɵelementEnd();
212
- }
213
- if (rf & 2) {
214
- var ctx_r4 = i0__namespace.ɵɵnextContext();
215
- i0__namespace.ɵɵproperty("accept", ctx_r4.accept);
216
- }
217
- }
218
- var CaucaInputFileComponent = /** @class */ (function () {
219
- function CaucaInputFileComponent(translateService, dialog) {
220
- this.translateService = translateService;
221
- this.dialog = dialog;
222
- this.labels = {};
223
- this.readend = new i0.EventEmitter();
224
- this.accept = '';
225
- this.multiple = false;
226
- this.icon = '';
227
- this.text = '';
228
- }
229
- CaucaInputFileComponent.prototype.ngOnInit = function () {
230
- var _this = this;
231
- if (!this.icon && !this.text) {
232
- this.translateService.get(['material.select', 'material.dialogTitle', 'material.dialogMessage']).subscribe(function (labels) {
233
- _this.labels = labels;
234
- _this.text = labels['material.select'];
235
- });
236
- }
237
- };
238
- CaucaInputFileComponent.prototype.onSelectFile = function (e) {
239
- var _this = this;
240
- var _loop_1 = function (i, j) {
241
- var file = e.target.files[i];
242
- var reader = new FileReader();
243
- reader.onerror = (function (error) { return _this.onError(error); });
244
- reader.onload = (function (event) { return _this.onReadEnd(file, event); });
245
- reader.readAsDataURL(file);
246
- };
247
- for (var i = 0, j = e.target.files.length; i < j; i++) {
248
- _loop_1(i, j);
249
- }
250
- if (e.target.files.length) {
251
- this.dialog.open(CaucaSimpleDialogComponent, {
252
- width: '250px',
253
- disableClose: true,
254
- data: {
255
- title: this.labels['material.dialogTitle'],
256
- message: this.labels['material.dialogMessage']
257
- }
258
- });
259
- }
260
- };
261
- CaucaInputFileComponent.prototype.openDialog = function (event) {
262
- if (this.file) {
263
- this.file.nativeElement.click();
264
- }
265
- event.stopPropagation();
266
- };
267
- CaucaInputFileComponent.prototype.onError = function (error) {
268
- throw error;
269
- };
270
- CaucaInputFileComponent.prototype.onReadEnd = function (file, e) {
271
- this.dialog.closeAll();
272
- this.readend.emit({
273
- name: file.name,
274
- size: file.size,
275
- type: file.type,
276
- lastModifiedDate: file.lastModifiedDate,
277
- content: e.target['result'],
278
- file: file,
279
- });
280
- };
281
- return CaucaInputFileComponent;
282
- }());
283
- CaucaInputFileComponent.ɵfac = function CaucaInputFileComponent_Factory(t) { return new (t || CaucaInputFileComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$2.TranslateService), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.MatDialog)); };
284
- CaucaInputFileComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaInputFileComponent, selectors: [["cauca-input-file"]], viewQuery: function CaucaInputFileComponent_Query(rf, ctx) {
285
- if (rf & 1) {
286
- i0__namespace.ɵɵviewQuery(_c0$2, 5);
287
- }
288
- if (rf & 2) {
289
- var _t = void 0;
290
- i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.file = _t.first);
291
- }
292
- }, inputs: { accept: "accept", multiple: "multiple", icon: "icon", text: "text" }, outputs: { readend: "readend" }, decls: 6, vars: 4, consts: [["mat-raised-button", "", 3, "click"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["notMultipleInput", ""], ["type", "file", "multiple", "multiple", 3, "accept", "change"], ["file", ""], ["type", "file", 3, "accept", "change"]], template: function CaucaInputFileComponent_Template(rf, ctx) {
293
- if (rf & 1) {
294
- i0__namespace.ɵɵelementStart(0, "button", 0);
295
- i0__namespace.ɵɵlistener("click", function CaucaInputFileComponent_Template_button_click_0_listener($event) { return ctx.openDialog($event); });
296
- i0__namespace.ɵɵtemplate(1, CaucaInputFileComponent_mat_icon_1_Template, 2, 1, "mat-icon", 1);
297
- i0__namespace.ɵɵtemplate(2, CaucaInputFileComponent_span_2_Template, 2, 1, "span", 1);
298
- i0__namespace.ɵɵelementEnd();
299
- i0__namespace.ɵɵtemplate(3, CaucaInputFileComponent_ng_container_3_Template, 3, 1, "ng-container", 2);
300
- i0__namespace.ɵɵtemplate(4, CaucaInputFileComponent_ng_template_4_Template, 2, 1, "ng-template", null, 3, i0__namespace.ɵɵtemplateRefExtractor);
301
- }
302
- if (rf & 2) {
303
- var _r3 = i0__namespace.ɵɵreference(5);
304
- i0__namespace.ɵɵadvance(1);
305
- i0__namespace.ɵɵproperty("ngIf", ctx.icon);
306
- i0__namespace.ɵɵadvance(1);
307
- i0__namespace.ɵɵproperty("ngIf", ctx.text);
308
- i0__namespace.ɵɵadvance(1);
309
- i0__namespace.ɵɵproperty("ngIf", ctx.multiple)("ngIfElse", _r3);
310
- }
311
- }, directives: [i3__namespace.MatButton, i2__namespace.NgIf, i5__namespace.MatIcon], styles: ["[_nghost-%COMP%] input[_ngcontent-%COMP%]{display:none}"] });
312
- (function () {
313
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaInputFileComponent, [{
314
- type: i0.Component,
315
- args: [{
316
- selector: 'cauca-input-file',
317
- templateUrl: './cauca-input-file.component.html',
318
- styleUrls: ['./cauca-input-file.component.scss']
319
- }]
320
- }], function () { return [{ type: i1__namespace$2.TranslateService }, { type: i1__namespace$1.MatDialog }]; }, { file: [{
321
- type: i0.ViewChild,
322
- args: ['file', { static: false }]
323
- }], readend: [{
324
- type: i0.Output
325
- }], accept: [{
326
- type: i0.Input
327
- }], multiple: [{
328
- type: i0.Input
329
- }], icon: [{
330
- type: i0.Input
331
- }], text: [{
332
- type: i0.Input
333
- }] });
334
- })();
335
-
336
- function CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template(rf, ctx) {
337
- if (rf & 1) {
338
- i0__namespace.ɵɵelementStart(0, "mat-error");
339
- i0__namespace.ɵɵtext(1);
340
- i0__namespace.ɵɵpipe(2, "translate");
341
- i0__namespace.ɵɵelementEnd();
342
- }
343
- if (rf & 2) {
344
- var i_r2 = i0__namespace.ɵɵnextContext().index;
345
- var ctx_r3 = i0__namespace.ɵɵnextContext();
346
- i0__namespace.ɵɵadvance(1);
347
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.getErrorMessage(i_r2)));
348
- }
349
- }
350
- function CaucaInputMultipleLangueComponent_mat_tab_1_Template(rf, ctx) {
351
- if (rf & 1) {
352
- i0__namespace.ɵɵelementStart(0, "mat-tab", 2);
353
- i0__namespace.ɵɵelementStart(1, "mat-form-field", 3);
354
- i0__namespace.ɵɵelement(2, "input", 4);
355
- i0__namespace.ɵɵtemplate(3, CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template, 3, 3, "mat-error", 5);
356
- i0__namespace.ɵɵelementEnd();
357
- i0__namespace.ɵɵelementEnd();
358
- }
359
- if (rf & 2) {
360
- var lang_r1 = ctx.$implicit;
361
- var i_r2 = ctx.index;
362
- var ctx_r0 = i0__namespace.ɵɵnextContext();
363
- i0__namespace.ɵɵproperty("label", lang_r1);
364
- i0__namespace.ɵɵadvance(2);
365
- i0__namespace.ɵɵproperty("placeholder", lang_r1)("formControl", ctx_r0.forms[i_r2]);
366
- i0__namespace.ɵɵadvance(1);
367
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.forms[i_r2].invalid);
368
- }
369
- }
370
- var CaucaInputMultipleLangueComponent = /** @class */ (function () {
371
- function CaucaInputMultipleLangueComponent(coreService, translate) {
372
- this.translate = translate;
373
- this.value = [];
374
- this.forms = [];
375
- this.labels = [];
376
- this.selectedIndex = 0;
377
- this.config = coreService.getConfig();
378
- }
379
- CaucaInputMultipleLangueComponent.prototype.ngOnInit = function () {
380
- var _this = this;
381
- this.translate.get(this.config.languages).subscribe(function (labels) {
382
- for (var i in labels) {
383
- if (labels[i]) {
384
- _this.labels.push(labels[i]);
385
- }
386
- }
387
- _this.initializeForms();
388
- });
389
- };
390
- CaucaInputMultipleLangueComponent.prototype.onTagChanged = function (tabIndex) {
391
- console.log('cauca-material', tabIndex);
392
- console.log('cauca-material', this.value);
393
- console.log('cauca-material', this.forms);
394
- };
395
- CaucaInputMultipleLangueComponent.prototype.getErrorMessage = function (index) {
396
- return this.forms[index].hasError('required') ? 'error.required' : '';
397
- };
398
- CaucaInputMultipleLangueComponent.prototype.initializeForms = function () {
399
- var _this = this;
400
- this.labels.forEach(function (item, index) {
401
- _this.forms[index] = new i6.FormControl('', [i6.Validators.required]);
402
- _this.forms[index].setValue(_this.value[index] || '');
403
- });
404
- };
405
- return CaucaInputMultipleLangueComponent;
406
- }());
407
- CaucaInputMultipleLangueComponent.ɵfac = function CaucaInputMultipleLangueComponent_Factory(t) { return new (t || CaucaInputMultipleLangueComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$2.CaucaCoreService), i0__namespace.ɵɵdirectiveInject(i1__namespace$2.TranslateService)); };
408
- CaucaInputMultipleLangueComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaInputMultipleLangueComponent, selectors: [["cauca-input-multiple-langue"]], inputs: { value: "value" }, decls: 2, vars: 2, consts: [[3, "selectedIndex", "selectedIndexChange"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label"], ["hideRequiredMarker", "never"], ["matInput", "", "required", "required", 3, "placeholder", "formControl"], [4, "ngIf"]], template: function CaucaInputMultipleLangueComponent_Template(rf, ctx) {
409
- if (rf & 1) {
410
- i0__namespace.ɵɵelementStart(0, "mat-tab-group", 0);
411
- i0__namespace.ɵɵlistener("selectedIndexChange", function CaucaInputMultipleLangueComponent_Template_mat_tab_group_selectedIndexChange_0_listener($event) { return ctx.onTagChanged($event); });
412
- i0__namespace.ɵɵtemplate(1, CaucaInputMultipleLangueComponent_mat_tab_1_Template, 4, 4, "mat-tab", 1);
413
- i0__namespace.ɵɵelementEnd();
414
- }
415
- if (rf & 2) {
416
- i0__namespace.ɵɵproperty("selectedIndex", ctx.selectedIndex);
417
- i0__namespace.ɵɵadvance(1);
418
- i0__namespace.ɵɵproperty("ngForOf", ctx.labels);
419
- }
420
- }, directives: [i2__namespace$1.MatTabGroup, i2__namespace.NgForOf, i2__namespace$1.MatTab, i4__namespace.MatFormField, i5__namespace$1.MatInput, i6__namespace.DefaultValueAccessor, i6__namespace.RequiredValidator, i6__namespace.NgControlStatus, i6__namespace.FormControlDirective, i2__namespace.NgIf, i4__namespace.MatError], pipes: [i1__namespace.TranslatePipe], styles: [".mat-form-field[_ngcontent-%COMP%]{width:100%}"] });
421
- (function () {
422
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaInputMultipleLangueComponent, [{
423
- type: i0.Component,
424
- args: [{
425
- selector: 'cauca-input-multiple-langue',
426
- templateUrl: './cauca-input-multiple-langue.component.html',
427
- styleUrls: ['./cauca-input-multiple-langue.component.scss']
428
- }]
429
- }], function () { return [{ type: i1__namespace$2.CaucaCoreService }, { type: i1__namespace$2.TranslateService }]; }, { value: [{
430
- type: i0.Input
431
- }] });
432
- })();
433
-
434
- function CaucaMenuVerticalComponent_h4_0_div_2_fa_icon_1_Template(rf, ctx) {
435
- if (rf & 1) {
436
- i0__namespace.ɵɵelement(0, "fa-icon", 8);
437
- }
438
- if (rf & 2) {
439
- var menu_r1 = i0__namespace.ɵɵnextContext(2).$implicit;
440
- i0__namespace.ɵɵproperty("icon", menu_r1.icon);
441
- }
442
- }
443
- function CaucaMenuVerticalComponent_h4_0_div_2_img_2_Template(rf, ctx) {
444
- if (rf & 1) {
445
- i0__namespace.ɵɵelement(0, "img", 9);
446
- }
447
- if (rf & 2) {
448
- var menu_r1 = i0__namespace.ɵɵnextContext(2).$implicit;
449
- i0__namespace.ɵɵproperty("src", menu_r1.icon, i0__namespace.ɵɵsanitizeUrl);
450
- }
451
- }
452
- function CaucaMenuVerticalComponent_h4_0_div_2_Template(rf, ctx) {
453
- if (rf & 1) {
454
- i0__namespace.ɵɵelementStart(0, "div", 5);
455
- i0__namespace.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_2_fa_icon_1_Template, 1, 1, "fa-icon", 6);
456
- i0__namespace.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_2_img_2_Template, 1, 1, "img", 7);
457
- i0__namespace.ɵɵelementEnd();
458
- }
459
- if (rf & 2) {
460
- var menu_r1 = i0__namespace.ɵɵnextContext().$implicit;
461
- i0__namespace.ɵɵadvance(1);
462
- i0__namespace.ɵɵproperty("ngIf", menu_r1.icon.filter !== undefined);
463
- i0__namespace.ɵɵadvance(1);
464
- i0__namespace.ɵɵproperty("ngIf", menu_r1.icon.filter === undefined);
465
- }
466
- }
467
- function CaucaMenuVerticalComponent_h4_0_div_3_Template(rf, ctx) {
468
- if (rf & 1) {
469
- i0__namespace.ɵɵelementStart(0, "div", 10);
470
- i0__namespace.ɵɵelementStart(1, "span");
471
- i0__namespace.ɵɵtext(2);
472
- i0__namespace.ɵɵpipe(3, "translate");
473
- i0__namespace.ɵɵelementEnd();
474
- i0__namespace.ɵɵelementEnd();
475
- }
476
- if (rf & 2) {
477
- var menu_r1 = i0__namespace.ɵɵnextContext().$implicit;
478
- i0__namespace.ɵɵadvance(2);
479
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(3, 1, menu_r1.label));
480
- }
481
- }
482
- function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_1_Template(rf, ctx) {
483
- if (rf & 1) {
484
- i0__namespace.ɵɵelementStart(0, "div", 15);
485
- i0__namespace.ɵɵtext(1, "\u2022");
486
- i0__namespace.ɵɵelementEnd();
487
- }
488
- }
489
- function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_fa_icon_1_Template(rf, ctx) {
490
- if (rf & 1) {
491
- i0__namespace.ɵɵelement(0, "fa-icon", 8);
492
- }
493
- if (rf & 2) {
494
- var submenu_r12 = i0__namespace.ɵɵnextContext(2).$implicit;
495
- i0__namespace.ɵɵproperty("icon", submenu_r12.icon);
496
- }
497
- }
498
- function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_img_2_Template(rf, ctx) {
499
- if (rf & 1) {
500
- i0__namespace.ɵɵelement(0, "img", 9);
501
- }
502
- if (rf & 2) {
503
- var submenu_r12 = i0__namespace.ɵɵnextContext(2).$implicit;
504
- i0__namespace.ɵɵproperty("src", submenu_r12.icon, i0__namespace.ɵɵsanitizeUrl);
505
- }
506
- }
507
- function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_Template(rf, ctx) {
508
- if (rf & 1) {
509
- i0__namespace.ɵɵelementStart(0, "div", 5);
510
- i0__namespace.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_fa_icon_1_Template, 1, 1, "fa-icon", 6);
511
- i0__namespace.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_img_2_Template, 1, 1, "img", 7);
512
- i0__namespace.ɵɵelementEnd();
513
- }
514
- if (rf & 2) {
515
- var submenu_r12 = i0__namespace.ɵɵnextContext().$implicit;
516
- i0__namespace.ɵɵadvance(1);
517
- i0__namespace.ɵɵproperty("ngIf", submenu_r12.icon.filter !== undefined);
518
- i0__namespace.ɵɵadvance(1);
519
- i0__namespace.ɵɵproperty("ngIf", submenu_r12.icon.filter === undefined);
520
- }
521
- }
522
- function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_3_Template(rf, ctx) {
523
- if (rf & 1) {
524
- i0__namespace.ɵɵelementStart(0, "div", 10);
525
- i0__namespace.ɵɵelementStart(1, "span");
526
- i0__namespace.ɵɵtext(2);
527
- i0__namespace.ɵɵpipe(3, "translate");
528
- i0__namespace.ɵɵelementEnd();
529
- i0__namespace.ɵɵelementEnd();
530
- }
531
- if (rf & 2) {
532
- var submenu_r12 = i0__namespace.ɵɵnextContext().$implicit;
533
- i0__namespace.ɵɵadvance(2);
534
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(3, 1, submenu_r12.label));
535
- }
536
- }
537
- function CaucaMenuVerticalComponent_h4_0_div_4_div_1_Template(rf, ctx) {
538
- if (rf & 1) {
539
- var _r23_1 = i0__namespace.ɵɵgetCurrentView();
540
- i0__namespace.ɵɵelementStart(0, "div", 13);
541
- i0__namespace.ɵɵlistener("click", function CaucaMenuVerticalComponent_h4_0_div_4_div_1_Template_div_click_0_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r23_1); var submenu_r12 = restoredCtx.$implicit; var ctx_r22 = i0__namespace.ɵɵnextContext(3); return ctx_r22.goTo(submenu_r12.path, $event); });
542
- i0__namespace.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_1_Template, 2, 0, "div", 14);
543
- i0__namespace.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_Template, 3, 2, "div", 2);
544
- i0__namespace.ɵɵtemplate(3, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_3_Template, 4, 3, "div", 3);
545
- i0__namespace.ɵɵelementEnd();
546
- }
547
- if (rf & 2) {
548
- var submenu_r12 = ctx.$implicit;
549
- i0__namespace.ɵɵclassMap(submenu_r12.activated ? "menu selected" : "menu");
550
- i0__namespace.ɵɵadvance(1);
551
- i0__namespace.ɵɵproperty("ngIf", !submenu_r12.icon);
552
- i0__namespace.ɵɵadvance(1);
553
- i0__namespace.ɵɵproperty("ngIf", submenu_r12.icon);
554
- i0__namespace.ɵɵadvance(1);
555
- i0__namespace.ɵɵproperty("ngIf", submenu_r12.label);
556
- }
557
- }
558
- function CaucaMenuVerticalComponent_h4_0_div_4_Template(rf, ctx) {
559
- if (rf & 1) {
560
- i0__namespace.ɵɵelementStart(0, "div", 11);
561
- i0__namespace.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_Template, 4, 5, "div", 12);
562
- i0__namespace.ɵɵelementEnd();
563
- }
564
- if (rf & 2) {
565
- var menu_r1 = i0__namespace.ɵɵnextContext().$implicit;
566
- i0__namespace.ɵɵadvance(1);
567
- i0__namespace.ɵɵproperty("ngForOf", menu_r1.childs);
568
- }
569
- }
570
- function CaucaMenuVerticalComponent_h4_0_Template(rf, ctx) {
571
- if (rf & 1) {
572
- var _r26_1 = i0__namespace.ɵɵgetCurrentView();
573
- i0__namespace.ɵɵelementStart(0, "h4");
574
- i0__namespace.ɵɵelementStart(1, "div", 1);
575
- i0__namespace.ɵɵlistener("click", function CaucaMenuVerticalComponent_h4_0_Template_div_click_1_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r26_1); var menu_r1 = restoredCtx.$implicit; var ctx_r25 = i0__namespace.ɵɵnextContext(); return ctx_r25.goTo(menu_r1.path, $event); });
576
- i0__namespace.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_2_Template, 3, 2, "div", 2);
577
- i0__namespace.ɵɵtemplate(3, CaucaMenuVerticalComponent_h4_0_div_3_Template, 4, 3, "div", 3);
578
- i0__namespace.ɵɵelementEnd();
579
- i0__namespace.ɵɵtemplate(4, CaucaMenuVerticalComponent_h4_0_div_4_Template, 2, 1, "div", 4);
580
- i0__namespace.ɵɵelementEnd();
581
- }
582
- if (rf & 2) {
583
- var menu_r1 = ctx.$implicit;
584
- i0__namespace.ɵɵclassMap(menu_r1.activated ? "selected" : "");
585
- i0__namespace.ɵɵadvance(2);
586
- i0__namespace.ɵɵproperty("ngIf", menu_r1.icon);
587
- i0__namespace.ɵɵadvance(1);
588
- i0__namespace.ɵɵproperty("ngIf", menu_r1.label);
589
- i0__namespace.ɵɵadvance(1);
590
- i0__namespace.ɵɵproperty("ngIf", menu_r1.childs.length && menu_r1.activated);
591
- }
592
- }
593
- var CaucaMenuVerticalComponent = /** @class */ (function () {
594
- function CaucaMenuVerticalComponent(router) {
595
- var _this = this;
596
- this.router = router;
597
- this.itemClick = new i0.EventEmitter();
598
- this.menuItems = [];
599
- this.router.events.subscribe(function (route) {
600
- if (route instanceof i1$3.NavigationEnd) {
601
- _this.selectActiveRoute(route);
602
- }
603
- });
604
- }
605
- CaucaMenuVerticalComponent.prototype.ngOnInit = function () {
606
- };
607
- CaucaMenuVerticalComponent.prototype.goTo = function (path, e) {
608
- this.router.navigate([path]);
609
- this.itemClick.emit();
610
- e.stopPropagation();
611
- };
612
- CaucaMenuVerticalComponent.prototype.selectActiveRoute = function (route) {
613
- this.menuItems.forEach(function (menu) {
614
- if (route.url) {
615
- menu.activated = (route.url === menu.path || (menu.childs.length && route.url.indexOf(menu.path) > -1));
616
- }
617
- menu.childs.forEach(function (subMenu) {
618
- if (route.url) {
619
- subMenu.activated = (route.url === subMenu.path || route.urlAfterRedirects === subMenu.path);
620
- }
621
- });
622
- });
623
- };
624
- return CaucaMenuVerticalComponent;
625
- }());
626
- CaucaMenuVerticalComponent.ɵfac = function CaucaMenuVerticalComponent_Factory(t) { return new (t || CaucaMenuVerticalComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$3.Router)); };
627
- CaucaMenuVerticalComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaMenuVerticalComponent, selectors: [["cauca-menu-vertical"]], inputs: { menuItems: "menuItems" }, outputs: { itemClick: "itemClick" }, decls: 1, vars: 1, consts: [[3, "class", 4, "ngFor", "ngForOf"], [1, "menu", 3, "click"], ["class", "menu-icon", 4, "ngIf"], ["class", "menu-caption", 4, "ngIf"], ["class", "submenu", 4, "ngIf"], [1, "menu-icon"], [3, "icon", 4, "ngIf"], [3, "src", 4, "ngIf"], [3, "icon"], [3, "src"], [1, "menu-caption"], [1, "submenu"], [3, "class", "click", 4, "ngFor", "ngForOf"], [3, "click"], ["class", "menu-dot", 4, "ngIf"], [1, "menu-dot"]], template: function CaucaMenuVerticalComponent_Template(rf, ctx) {
628
- if (rf & 1) {
629
- i0__namespace.ɵɵtemplate(0, CaucaMenuVerticalComponent_h4_0_Template, 5, 5, "h4", 0);
630
- }
631
- if (rf & 2) {
632
- i0__namespace.ɵɵproperty("ngForOf", ctx.menuItems);
633
- }
634
- }, directives: [i2__namespace.NgForOf, i2__namespace.NgIf, i3__namespace$1.FaIconComponent], pipes: [i1__namespace.TranslatePipe], styles: [".menu[_ngcontent-%COMP%], .submenu[_ngcontent-%COMP%]{cursor:pointer}h4[_ngcontent-%COMP%]{margin:0;padding:0}h4[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{padding:1em 0;display:flex;flex-direction:row}h4[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 auto;align-self:center}.menu-dot[_ngcontent-%COMP%]{max-width:1.1em;text-align:center;margin-right:.5em;font-size:2em}.menu-icon[_ngcontent-%COMP%]{max-width:60px;text-align:center;margin-right:.5em}.submenu[_ngcontent-%COMP%]{margin-left:1em}.submenu[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{padding:0;font-size:.9em;line-height:2.2em}.submenu[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]:before{content:\"\";margin-left:1.1em;width:.1em;height:2.5em;position:relative;background:#ffffff;margin-right:-1.17em}"] });
635
- (function () {
636
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaMenuVerticalComponent, [{
637
- type: i0.Component,
638
- args: [{
639
- selector: 'cauca-menu-vertical',
640
- templateUrl: './cauca-menu-vertical.component.html',
641
- styleUrls: ['./cauca-menu-vertical.component.scss']
642
- }]
643
- }], function () { return [{ type: i1__namespace$3.Router }]; }, { itemClick: [{
644
- type: i0.Output
645
- }], menuItems: [{
646
- type: i0.Input
647
- }] });
648
- })();
649
-
650
- function CaucaMenuSidebarComponent_div_10_Template(rf, ctx) {
651
- if (rf & 1) {
652
- var _r3_1 = i0__namespace.ɵɵgetCurrentView();
653
- i0__namespace.ɵɵelementStart(0, "div", 4);
654
- i0__namespace.ɵɵelementStart(1, "div", 5);
655
- i0__namespace.ɵɵlistener("click", function CaucaMenuSidebarComponent_div_10_Template_div_click_1_listener() { i0__namespace.ɵɵrestoreView(_r3_1); var ctx_r2 = i0__namespace.ɵɵnextContext(); return ctx_r2.onToggleCollapse(); });
656
- i0__namespace.ɵɵelementEnd();
657
- i0__namespace.ɵɵelementStart(2, "span", 6);
658
- i0__namespace.ɵɵtext(3);
659
- i0__namespace.ɵɵpipe(4, "translate");
660
- i0__namespace.ɵɵelementEnd();
661
- i0__namespace.ɵɵelementStart(5, "span", 7);
662
- i0__namespace.ɵɵtext(6);
663
- i0__namespace.ɵɵelementEnd();
664
- i0__namespace.ɵɵelementEnd();
665
- }
666
- if (rf & 2) {
667
- var ctx_r1 = i0__namespace.ɵɵnextContext();
668
- i0__namespace.ɵɵadvance(3);
669
- i0__namespace.ɵɵtextInterpolate2("", i0__namespace.ɵɵpipeBind1(4, 3, "material.version"), " ", ctx_r1.version, "");
670
- i0__namespace.ɵɵadvance(3);
671
- i0__namespace.ɵɵtextInterpolate(ctx_r1.version);
672
- }
673
- }
674
- var _c0$1 = [[["", "header", ""]], [["", "beforeMenu", ""]], [["", "afterMenu", ""]]];
675
- var _c1 = ["[header]", "[beforeMenu]", "[afterMenu]"];
676
- var CaucaMenuSidebarComponent = /** @class */ (function () {
677
- function CaucaMenuSidebarComponent(element) {
678
- var _this = this;
679
- this.keepMenuExpanded = false;
680
- this.menuItems = [];
681
- this.version = '';
682
- this.hostElement = element.nativeElement;
683
- this.hostElement.addEventListener('mouseover', function (e) { return _this.onMouseOver(e); });
684
- this.hostElement.addEventListener('mouseout', function (e) { return _this.onMouseOut(e); });
685
- this.setDisplayMenu();
686
- }
687
- CaucaMenuSidebarComponent.prototype.ngOnInit = function () {
688
- };
689
- CaucaMenuSidebarComponent.prototype.onResize = function (e) {
690
- this.setDisplayMenu();
691
- };
692
- CaucaMenuSidebarComponent.prototype.onMenuItemClick = function () {
693
- if (window.innerWidth < 1000) {
694
- this.hideOnMobile();
695
- }
696
- };
697
- CaucaMenuSidebarComponent.prototype.hideOnMobile = function () {
698
- this.hostElement.classList.remove('mobile');
699
- this.hostElement.classList.add('hidden');
700
- };
701
- CaucaMenuSidebarComponent.prototype.showOnMobile = function () {
702
- this.hostElement.classList.remove('hidden');
703
- this.hostElement.classList.add('mobile');
704
- };
705
- CaucaMenuSidebarComponent.prototype.onToggleCollapse = function () {
706
- if (this.keepMenuExpanded) {
707
- this.onCollpseMenu();
708
- this.hostElement.classList.remove('keepExpanded');
709
- }
710
- else {
711
- this.onExpandedMenu();
712
- this.hostElement.classList.add('keepExpanded');
713
- }
714
- this.keepMenuExpanded = !this.keepMenuExpanded;
715
- localStorage.setItem('cauca-menu-status', this.keepMenuExpanded ? 'expanded' : 'collapsed');
716
- };
717
- CaucaMenuSidebarComponent.prototype.setDisplayMenu = function () {
718
- this.hostElement.className = '';
719
- if (window.innerWidth < 1000) {
720
- this.hostElement.classList.add('hidden');
721
- }
722
- else {
723
- if (localStorage.getItem('cauca-menu-status') === 'expanded') {
724
- this.keepMenuExpanded = true;
725
- this.hostElement.classList.add('keepExpanded');
726
- }
727
- this.hostElement.classList.add(this.keepMenuExpanded ? 'expanded' : 'collapsed');
728
- }
729
- };
730
- CaucaMenuSidebarComponent.prototype.onMouseOver = function (e) {
731
- if (!this.keepMenuExpanded) {
732
- this.onExpandedMenu();
733
- }
734
- e.stopPropagation();
735
- };
736
- CaucaMenuSidebarComponent.prototype.onMouseOut = function (e) {
737
- if (!this.keepMenuExpanded) {
738
- this.onCollpseMenu();
739
- }
740
- e.stopPropagation();
741
- };
742
- CaucaMenuSidebarComponent.prototype.onExpandedMenu = function () {
743
- if (window.innerWidth >= 1000) {
744
- this.hostElement.classList.remove('collapsed');
745
- this.hostElement.classList.add('expanded');
746
- }
747
- };
748
- CaucaMenuSidebarComponent.prototype.onCollpseMenu = function () {
749
- if (window.innerWidth >= 1000) {
750
- this.hostElement.classList.remove('expanded');
751
- this.hostElement.classList.add('collapsed');
752
- }
753
- };
754
- return CaucaMenuSidebarComponent;
755
- }());
756
- CaucaMenuSidebarComponent.ɵfac = function CaucaMenuSidebarComponent_Factory(t) { return new (t || CaucaMenuSidebarComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef)); };
757
- CaucaMenuSidebarComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaMenuSidebarComponent, selectors: [["cauca-menu-sidebar"]], hostBindings: function CaucaMenuSidebarComponent_HostBindings(rf, ctx) {
758
- if (rf & 1) {
759
- i0__namespace.ɵɵlistener("resize", function CaucaMenuSidebarComponent_resize_HostBindingHandler($event) { return ctx.onResize($event); }, false, i0__namespace.ɵɵresolveWindow);
760
- }
761
- }, inputs: { menuItems: "menuItems", version: "version" }, ngContentSelectors: _c1, decls: 11, vars: 2, consts: [["mat-icon-button", "", 1, "close", 3, "click"], [3, "menuItems", "itemClick"], ["menu", ""], ["class", "version", 4, "ngIf"], [1, "version"], [1, "double-arrow", 3, "click"], [1, "full"], [1, "abbr"]], template: function CaucaMenuSidebarComponent_Template(rf, ctx) {
762
- if (rf & 1) {
763
- i0__namespace.ɵɵprojectionDef(_c0$1);
764
- i0__namespace.ɵɵelementStart(0, "div");
765
- i0__namespace.ɵɵelementStart(1, "button", 0);
766
- i0__namespace.ɵɵlistener("click", function CaucaMenuSidebarComponent_Template_button_click_1_listener() { return ctx.hideOnMobile(); });
767
- i0__namespace.ɵɵelementStart(2, "mat-icon");
768
- i0__namespace.ɵɵtext(3, "clear");
769
- i0__namespace.ɵɵelementEnd();
770
- i0__namespace.ɵɵelementEnd();
771
- i0__namespace.ɵɵprojection(4);
772
- i0__namespace.ɵɵelementEnd();
773
- i0__namespace.ɵɵelementStart(5, "div");
774
- i0__namespace.ɵɵprojection(6, 1);
775
- i0__namespace.ɵɵelementStart(7, "cauca-menu-vertical", 1, 2);
776
- i0__namespace.ɵɵlistener("itemClick", function CaucaMenuSidebarComponent_Template_cauca_menu_vertical_itemClick_7_listener() { return ctx.onMenuItemClick(); });
777
- i0__namespace.ɵɵelementEnd();
778
- i0__namespace.ɵɵprojection(9, 2);
779
- i0__namespace.ɵɵelementEnd();
780
- i0__namespace.ɵɵtemplate(10, CaucaMenuSidebarComponent_div_10_Template, 7, 5, "div", 3);
781
- }
782
- if (rf & 2) {
783
- i0__namespace.ɵɵadvance(7);
784
- i0__namespace.ɵɵproperty("menuItems", ctx.menuItems);
785
- i0__namespace.ɵɵadvance(3);
786
- i0__namespace.ɵɵproperty("ngIf", ctx.version);
787
- }
788
- }, directives: [i3__namespace.MatButton, i5__namespace.MatIcon, CaucaMenuVerticalComponent, i2__namespace.NgIf], pipes: [i1__namespace.TranslatePipe], styles: ["[_nghost-%COMP%]{height:100%;flex-direction:column;display:flex;transition:all .1s ease-out;overflow:hidden;scrollbar-width:5px;scrollbar-color:rgba(0,0,0,.1) rgba(0,0,0,.2)}[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-radius:5px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1)}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:5px;background-color:#0003;outline:1px solid slategrey}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child{flex:0 0 auto}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){flex-grow:1;overflow:hidden auto}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:last-child{max-height:1em}.hidden[_nghost-%COMP%]{width:0;min-width:0;max-width:0}.mobile[_nghost-%COMP%]{width:275px;min-width:275px;max-width:275px;position:absolute;z-index:10}.collapsed[_nghost-%COMP%]{width:75px;min-width:75px;max-width:75px}.expanded[_nghost-%COMP%]{width:275px;min-width:275px;max-width:275px}[_nghost-%COMP%] .close[_ngcontent-%COMP%]{display:none}.mobile[_nghost-%COMP%] .close[_ngcontent-%COMP%]{right:0;display:inline-block;position:absolute}.double-arrow[_ngcontent-%COMP%]{height:2.9em;line-height:2.9em;cursor:pointer;position:absolute;opacity:.25;margin-top:-1em}.double-arrow[_ngcontent-%COMP%]:hover{opacity:1}.expanded[_nghost-%COMP%] .double-arrow[_ngcontent-%COMP%]:before, .collapsed[_nghost-%COMP%] .double-arrow[_ngcontent-%COMP%]:before{font-family:\"Material Icons\";content:\"double_arrow\";font-size:2.9em;text-align:right}.collapsed[_nghost-%COMP%] .double-arrow[_ngcontent-%COMP%]{margin-left:10px}.expanded[_nghost-%COMP%] .double-arrow[_ngcontent-%COMP%]{margin-left:200px}.collapsed[_nghost-%COMP%] .menu-caption, .collapsed[_nghost-%COMP%] .submenu{display:none}.keepExpanded[_nghost-%COMP%] .double-arrow[_ngcontent-%COMP%]{transform:rotate(180deg);opacity:1}.version[_ngcontent-%COMP%]{bottom:0;padding:1em}.full[_ngcontent-%COMP%], .abbr[_ngcontent-%COMP%]{display:none}.collapsed[_nghost-%COMP%] .abbr[_ngcontent-%COMP%]{display:inline}.mobile[_nghost-%COMP%] .full[_ngcontent-%COMP%], .expanded[_nghost-%COMP%] .full[_ngcontent-%COMP%]{display:inline}@media only screen and (max-width: 1000px){.double-arrow[_ngcontent-%COMP%]{display:none}}"] });
789
- (function () {
790
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaMenuSidebarComponent, [{
791
- type: i0.Component,
792
- args: [{
793
- selector: 'cauca-menu-sidebar',
794
- templateUrl: './cauca-menu-sidebar.component.html',
795
- styleUrls: ['./cauca-menu-sidebar.component.scss']
796
- }]
797
- }], function () { return [{ type: i0__namespace.ElementRef }]; }, { menuItems: [{
798
- type: i0.Input
799
- }], version: [{
800
- type: i0.Input
801
- }], onResize: [{
802
- type: i0.HostListener,
803
- args: ['window:resize', ['$event']]
804
- }] });
805
- })();
806
-
807
- var _c0 = ["container"];
808
- function CaucaSlideshowComponent_div_2_Template(rf, ctx) {
809
- if (rf & 1) {
810
- i0__namespace.ɵɵelementStart(0, "div");
811
- i0__namespace.ɵɵelement(1, "img", 3);
812
- i0__namespace.ɵɵelementEnd();
813
- }
814
- if (rf & 2) {
815
- var url_r2 = ctx.$implicit;
816
- var index_r3 = ctx.index;
817
- var ctx_r1 = i0__namespace.ɵɵnextContext();
818
- i0__namespace.ɵɵproperty("@slideLeftRight", ctx_r1.getState(index_r3));
819
- i0__namespace.ɵɵadvance(1);
820
- i0__namespace.ɵɵproperty("src", url_r2, i0__namespace.ɵɵsanitizeUrl);
821
- }
822
- }
823
- var CaucaSlideshowComponent = /** @class */ (function () {
824
- function CaucaSlideshowComponent() {
825
- this.timer = null;
826
- this.items = [];
827
- this.states = [];
828
- this.selectedIndex = 0;
829
- this.height = '150px';
830
- this.autoPlay = true;
831
- }
832
- Object.defineProperty(CaucaSlideshowComponent.prototype, "images", {
833
- get: function () {
834
- return this.items;
835
- },
836
- set: function (list) {
837
- this.items = list;
838
- this.restart();
839
- },
840
- enumerable: false,
841
- configurable: true
842
- });
843
- CaucaSlideshowComponent.prototype.ngOnInit = function () {
844
- this.container.nativeElement.style.height = this.height;
845
- this.container.nativeElement.style.width = '100%';
846
- };
847
- CaucaSlideshowComponent.prototype.getState = function (index) {
848
- if (this.states[index]) {
849
- return this.states[index];
850
- }
851
- return (this.selectedIndex === index ? 'in' : 'out');
852
- };
853
- CaucaSlideshowComponent.prototype.restart = function () {
854
- var _this = this;
855
- if (this.timer) {
856
- window.clearInterval(this.timer);
857
- }
858
- if (this.images && this.images.length) {
859
- this.timer = window.setInterval(function () { return _this.changed('next'); }, 5000);
860
- }
861
- };
862
- CaucaSlideshowComponent.prototype.next = function () {
863
- if (this.selectedIndex < this.items.length - 1) {
864
- this.selectedIndex++;
865
- }
866
- else {
867
- this.selectedIndex = 0;
868
- }
869
- };
870
- CaucaSlideshowComponent.prototype.changed = function (action) {
871
- this.states[this.selectedIndex] = 'out';
872
- this[action]();
873
- this.states[this.selectedIndex] = 'in';
874
- };
875
- return CaucaSlideshowComponent;
876
- }());
877
- CaucaSlideshowComponent.ɵfac = function CaucaSlideshowComponent_Factory(t) { return new (t || CaucaSlideshowComponent)(); };
878
- CaucaSlideshowComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaSlideshowComponent, selectors: [["cauca-slideshow"]], viewQuery: function CaucaSlideshowComponent_Query(rf, ctx) {
879
- if (rf & 1) {
880
- i0__namespace.ɵɵviewQuery(_c0, 7);
881
- }
882
- if (rf & 2) {
883
- var _t = void 0;
884
- i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.container = _t.first);
885
- }
886
- }, inputs: { height: "height", autoPlay: "autoPlay", images: "images" }, decls: 3, vars: 1, consts: [[1, "slideshow"], ["container", ""], [4, "ngFor", "ngForOf"], [3, "src"]], template: function CaucaSlideshowComponent_Template(rf, ctx) {
887
- if (rf & 1) {
888
- i0__namespace.ɵɵelementStart(0, "div", 0, 1);
889
- i0__namespace.ɵɵtemplate(2, CaucaSlideshowComponent_div_2_Template, 2, 2, "div", 2);
890
- i0__namespace.ɵɵelementEnd();
891
- }
892
- if (rf & 2) {
893
- i0__namespace.ɵɵadvance(2);
894
- i0__namespace.ɵɵproperty("ngForOf", ctx.images);
895
- }
896
- }, directives: [i2__namespace.NgForOf], styles: [".slideshow[_ngcontent-%COMP%]{margin:0 auto;position:relative;overflow:hidden}.slideshow[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute}img[_ngcontent-%COMP%]{max-height:100%;max-width:100%;margin:0 auto;display:block}"], data: { animation: [
897
- animations.trigger('slideUpDown', [
898
- animations.state('in', animations.style({ transform: 'translateY(0%)' })),
899
- animations.state('out', animations.style({ transform: 'translateY(-100%)' })),
900
- animations.transition('in => out', [
901
- animations.animate('500ms ease-in')
902
- ]),
903
- animations.transition('out => in', [
904
- animations.style({ transform: 'translateY(100%)' }),
905
- animations.animate('500ms ease-in')
906
- ]),
907
- ]),
908
- animations.trigger('slideLeftRight', [
909
- animations.state('in', animations.style({ transform: 'translateX(0%)' })),
910
- animations.state('out', animations.style({ transform: 'translateX(-100%)' })),
911
- animations.transition('in => out', [
912
- animations.animate('500ms ease-in')
913
- ]),
914
- animations.transition('out => in', [
915
- animations.style({ transform: 'translateX(100%)' }),
916
- animations.animate('500ms ease-in')
917
- ]),
918
- ]),
919
- ] } });
920
- (function () {
921
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaSlideshowComponent, [{
922
- type: i0.Component,
923
- args: [{
924
- selector: 'cauca-slideshow',
925
- templateUrl: './cauca-slideshow.component.html',
926
- styleUrls: ['./cauca-slideshow.component.scss'],
927
- animations: [
928
- animations.trigger('slideUpDown', [
929
- animations.state('in', animations.style({ transform: 'translateY(0%)' })),
930
- animations.state('out', animations.style({ transform: 'translateY(-100%)' })),
931
- animations.transition('in => out', [
932
- animations.animate('500ms ease-in')
933
- ]),
934
- animations.transition('out => in', [
935
- animations.style({ transform: 'translateY(100%)' }),
936
- animations.animate('500ms ease-in')
937
- ]),
938
- ]),
939
- animations.trigger('slideLeftRight', [
940
- animations.state('in', animations.style({ transform: 'translateX(0%)' })),
941
- animations.state('out', animations.style({ transform: 'translateX(-100%)' })),
942
- animations.transition('in => out', [
943
- animations.animate('500ms ease-in')
944
- ]),
945
- animations.transition('out => in', [
946
- animations.style({ transform: 'translateX(100%)' }),
947
- animations.animate('500ms ease-in')
948
- ]),
949
- ]),
950
- ],
951
- }]
952
- }], function () { return []; }, { container: [{
953
- type: i0.ViewChild,
954
- args: ['container', { static: true }]
955
- }], height: [{
956
- type: i0.Input
957
- }], autoPlay: [{
958
- type: i0.Input
959
- }], images: [{
960
- type: i0.Input
961
- }] });
962
- })();
963
-
964
- var CaucaMaterialModule = /** @class */ (function () {
965
- function CaucaMaterialModule() {
966
- }
967
- return CaucaMaterialModule;
968
- }());
969
- CaucaMaterialModule.ɵfac = function CaucaMaterialModule_Factory(t) { return new (t || CaucaMaterialModule)(); };
970
- CaucaMaterialModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: CaucaMaterialModule });
971
- CaucaMaterialModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
972
- i2.CommonModule,
973
- i1$2.CaucaCoreForChildModule,
974
- i3$1.FontAwesomeModule,
975
- i6.FormsModule,
976
- i6.ReactiveFormsModule,
977
- i3.MatButtonModule,
978
- i4.MatFormFieldModule,
979
- i5.MatIconModule,
980
- i5$1.MatInputModule,
981
- i2$1.MatTabsModule,
982
- ]] });
983
- (function () {
984
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaMaterialModule, [{
985
- type: i0.NgModule,
986
- args: [{
987
- declarations: [
988
- CaucaMaterialComponent,
989
- CaucaInputFileComponent,
990
- CaucaInputMultipleLangueComponent,
991
- CaucaMenuSidebarComponent,
992
- CaucaMenuVerticalComponent,
993
- CaucaSimpleDialogComponent,
994
- CaucaSlideshowComponent,
995
- ],
996
- imports: [
997
- i2.CommonModule,
998
- i1$2.CaucaCoreForChildModule,
999
- i3$1.FontAwesomeModule,
1000
- i6.FormsModule,
1001
- i6.ReactiveFormsModule,
1002
- i3.MatButtonModule,
1003
- i4.MatFormFieldModule,
1004
- i5.MatIconModule,
1005
- i5$1.MatInputModule,
1006
- i2$1.MatTabsModule,
1007
- ],
1008
- exports: [
1009
- CaucaMaterialComponent,
1010
- CaucaInputFileComponent,
1011
- CaucaInputMultipleLangueComponent,
1012
- CaucaMenuSidebarComponent,
1013
- CaucaMenuVerticalComponent,
1014
- CaucaSimpleDialogComponent,
1015
- CaucaSlideshowComponent,
1016
- ]
1017
- }]
1018
- }], null, null);
1019
- })();
1020
- (function () {
1021
- (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(CaucaMaterialModule, { declarations: [CaucaMaterialComponent,
1022
- CaucaInputFileComponent,
1023
- CaucaInputMultipleLangueComponent,
1024
- CaucaMenuSidebarComponent,
1025
- CaucaMenuVerticalComponent,
1026
- CaucaSimpleDialogComponent,
1027
- CaucaSlideshowComponent], imports: [i2.CommonModule,
1028
- i1$2.CaucaCoreForChildModule,
1029
- i3$1.FontAwesomeModule,
1030
- i6.FormsModule,
1031
- i6.ReactiveFormsModule,
1032
- i3.MatButtonModule,
1033
- i4.MatFormFieldModule,
1034
- i5.MatIconModule,
1035
- i5$1.MatInputModule,
1036
- i2$1.MatTabsModule], exports: [CaucaMaterialComponent,
1037
- CaucaInputFileComponent,
1038
- CaucaInputMultipleLangueComponent,
1039
- CaucaMenuSidebarComponent,
1040
- CaucaMenuVerticalComponent,
1041
- CaucaSimpleDialogComponent,
1042
- CaucaSlideshowComponent] });
1043
- })();
1044
-
1045
- var MenuItem = /** @class */ (function () {
1046
- function MenuItem(label, path, icon) {
1047
- if (icon === void 0) { icon = ''; }
1048
- this.label = label;
1049
- this.path = path;
1050
- this.icon = icon;
1051
- this.childs = [];
1052
- }
1053
- return MenuItem;
1054
- }());
1055
-
1056
- /*
1057
- * Public API Surface of cauca-material
1058
- */
1059
-
1060
- /**
1061
- * Generated bundle index. Do not edit.
1062
- */
1063
-
1064
- exports.CaucaInputFileComponent = CaucaInputFileComponent;
1065
- exports.CaucaInputMultipleLangueComponent = CaucaInputMultipleLangueComponent;
1066
- exports.CaucaMaterialComponent = CaucaMaterialComponent;
1067
- exports.CaucaMaterialModule = CaucaMaterialModule;
1068
- exports.CaucaMaterialService = CaucaMaterialService;
1069
- exports.CaucaMenuSidebarComponent = CaucaMenuSidebarComponent;
1070
- exports.CaucaMenuVerticalComponent = CaucaMenuVerticalComponent;
1071
- exports.CaucaSimpleDialogComponent = CaucaSimpleDialogComponent;
1072
- exports.CaucaSlideshowComponent = CaucaSlideshowComponent;
1073
- exports.MenuItem = MenuItem;
1074
-
1075
- Object.defineProperty(exports, '__esModule', { value: true });
1076
-
1077
- }));
1078
- //# sourceMappingURL=cauca-911-material.umd.js.map