@cauca-911/material 16.0.1 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/assets/i18n/cauca/en-material.json +2 -0
  2. package/assets/i18n/cauca/es-material.json +2 -0
  3. package/assets/i18n/cauca/fr-material.json +2 -0
  4. package/esm2022/lib/cauca-date-time-picker/cauca-date-time-picker.component.mjs +103 -0
  5. package/esm2022/lib/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.mjs +255 -0
  6. package/esm2022/lib/cauca-date-time-picker/models/dialog-date-time-picker-data.mjs +2 -0
  7. package/esm2022/lib/cauca-input-file/cauca-input-file.component.mjs +10 -11
  8. package/esm2022/lib/cauca-input-multiple-langue/cauca-input-multiple-langue.component.mjs +5 -6
  9. package/esm2022/lib/cauca-material.component.mjs +4 -6
  10. package/esm2022/lib/cauca-material.module.mjs +5 -5
  11. package/esm2022/lib/cauca-material.service.mjs +3 -4
  12. package/esm2022/lib/cauca-menu-sidebar/cauca-menu-sidebar.component.mjs +5 -6
  13. package/esm2022/lib/cauca-menu-vertical/cauca-menu-vertical.component.mjs +8 -14
  14. package/esm2022/lib/cauca-simple-dialog/cauca-simple-dialog.component.mjs +6 -6
  15. package/esm2022/lib/cauca-slideshow/cauca-slideshow.component.mjs +4 -3
  16. package/esm2022/public-api.mjs +2 -1
  17. package/fesm2022/cauca-911-material.mjs +378 -55
  18. package/fesm2022/cauca-911-material.mjs.map +1 -1
  19. package/lib/cauca-date-time-picker/cauca-date-time-picker.component.d.ts +24 -0
  20. package/lib/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.d.ts +36 -0
  21. package/lib/cauca-date-time-picker/models/dialog-date-time-picker-data.d.ts +20 -0
  22. package/lib/cauca-material.component.d.ts +1 -4
  23. package/lib/cauca-material.service.d.ts +0 -1
  24. package/lib/cauca-menu-sidebar/cauca-menu-sidebar.component.d.ts +3 -4
  25. package/lib/cauca-menu-vertical/cauca-menu-vertical.component.d.ts +2 -3
  26. package/lib/cauca-simple-dialog/cauca-simple-dialog.component.d.ts +1 -3
  27. package/lib/cauca-slideshow/cauca-slideshow.component.d.ts +0 -1
  28. package/package.json +7 -7
  29. package/public-api.d.ts +1 -0
@@ -2,9 +2,9 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, Inject, EventEmitter, ViewChild, Output, Input, HostListener, NgModule } from '@angular/core';
3
3
  import * as i1 from '@ngx-translate/core';
4
4
  import * as i2 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
5
+ import { CommonModule, DatePipe } from '@angular/common';
6
6
  import * as i3$1 from '@angular/forms';
7
- import { UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import { Validators, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
8
  import * as i3 from '@angular/material/button';
9
9
  import { MatButtonModule } from '@angular/material/button';
10
10
  import * as i4 from '@angular/material/form-field';
@@ -23,24 +23,25 @@ import * as i1$1 from '@angular/material/dialog';
23
23
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
24
24
  import * as i1$3 from '@angular/router';
25
25
  import { NavigationEnd } from '@angular/router';
26
- import { trigger, state, style, transition, animate } from '@angular/animations';
26
+ import { style, state, animate, transition, trigger } from '@angular/animations';
27
+ import { MatNativeDateModule } from '@angular/material/core';
28
+ import * as i4$1 from '@angular/material/datepicker';
29
+ import { MatDatepickerModule } from '@angular/material/datepicker';
30
+ import * as i6$1 from '@angular/material/list';
31
+ import { MatListModule } from '@angular/material/list';
27
32
 
28
33
  class CaucaMaterialService {
29
- constructor() { }
30
34
  static { this.ɵfac = function CaucaMaterialService_Factory(t) { return new (t || CaucaMaterialService)(); }; }
31
35
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaucaMaterialService, factory: CaucaMaterialService.ɵfac, providedIn: 'root' }); }
32
36
  }
33
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMaterialService, [{
37
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMaterialService, [{
34
38
  type: Injectable,
35
39
  args: [{
36
40
  providedIn: 'root'
37
41
  }]
38
- }], function () { return []; }, null); })();
42
+ }], null, null); })();
39
43
 
40
44
  class CaucaMaterialComponent {
41
- constructor() { }
42
- ngOnInit() {
43
- }
44
45
  static { this.ɵfac = function CaucaMaterialComponent_Factory(t) { return new (t || CaucaMaterialComponent)(); }; }
45
46
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaMaterialComponent, selectors: [["cauca-material"]], decls: 3, vars: 3, template: function CaucaMaterialComponent_Template(rf, ctx) { if (rf & 1) {
46
47
  i0.ɵɵelementStart(0, "div");
@@ -52,10 +53,11 @@ class CaucaMaterialComponent {
52
53
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
53
54
  } }, dependencies: [i1.TranslatePipe], encapsulation: 2 }); }
54
55
  }
55
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMaterialComponent, [{
56
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMaterialComponent, [{
56
57
  type: Component,
57
58
  args: [{ selector: 'cauca-material', template: "<div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>" }]
58
- }], function () { return []; }, null); })();
59
+ }], null, null); })();
60
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMaterialComponent, { className: "CaucaMaterialComponent", filePath: "lib/cauca-material.component.ts", lineNumber: 8 }); })();
59
61
 
60
62
  class SimpleDialogData {
61
63
  constructor() {
@@ -88,7 +90,6 @@ class CaucaSimpleDialogComponent {
88
90
  this.dialogRef = dialogRef;
89
91
  this.data = data;
90
92
  }
91
- ngOnInit() { }
92
93
  onClick(buttonIndex) {
93
94
  this.dialogRef.close(buttonIndex);
94
95
  }
@@ -108,15 +109,16 @@ class CaucaSimpleDialogComponent {
108
109
  i0.ɵɵproperty("innerHTML", ctx.data.message, i0.ɵɵsanitizeHtml);
109
110
  i0.ɵɵadvance(1);
110
111
  i0.ɵɵproperty("ngIf", ctx.data.buttons);
111
- } }, dependencies: [i2.NgForOf, i2.NgIf, i3.MatButton, i1$1.MatDialogTitle, i1$1.MatDialogContent, i1$1.MatDialogActions], styles: ["div[mat-dialog-actions][_ngcontent-%COMP%]{margin-top:20px;text-align:center}"] }); }
112
+ } }, dependencies: [i2.NgForOf, i2.NgIf, i3.MatButton, i1$1.MatDialogTitle, i1$1.MatDialogActions, i1$1.MatDialogContent], styles: ["div[mat-dialog-actions][_ngcontent-%COMP%]{margin-top:20px;text-align:center}"] }); }
112
113
  }
113
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaSimpleDialogComponent, [{
114
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaSimpleDialogComponent, [{
114
115
  type: Component,
115
116
  args: [{ selector: 'cauca-simple-dialog', template: "<h1 mat-dialog-title>{{data.title}}</h1>\n<div mat-dialog-content>\n <div [innerHTML]=\"data.message\"></div>\n</div>\n<div mat-dialog-actions *ngIf=\"data.buttons\">\n <button *ngFor=\"let label of data.buttons; let i = index\" mat-raised-button (click)=\"onClick(i)\">{{label}}</button>\n</div>", styles: ["div[mat-dialog-actions]{margin-top:20px;text-align:center}\n"] }]
116
- }], function () { return [{ type: i1$1.MatDialogRef }, { type: SimpleDialogData, decorators: [{
117
+ }], () => [{ type: i1$1.MatDialogRef }, { type: SimpleDialogData, decorators: [{
117
118
  type: Inject,
118
119
  args: [MAT_DIALOG_DATA]
119
- }] }]; }, null); })();
120
+ }] }], null); })();
121
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSimpleDialogComponent, { className: "CaucaSimpleDialogComponent", filePath: "lib/cauca-simple-dialog/cauca-simple-dialog.component.ts", lineNumber: 10 }); })();
120
122
 
121
123
  const _c0$2 = ["file"];
122
124
  function CaucaInputFileComponent_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
@@ -155,8 +157,8 @@ function CaucaInputFileComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
155
157
  i0.ɵɵlistener("change", function CaucaInputFileComponent_ng_template_4_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.onSelectFile($event)); });
156
158
  i0.ɵɵelementEnd();
157
159
  } if (rf & 2) {
158
- const ctx_r4 = i0.ɵɵnextContext();
159
- i0.ɵɵproperty("accept", ctx_r4.accept);
160
+ const ctx_r3 = i0.ɵɵnextContext();
161
+ i0.ɵɵproperty("accept", ctx_r3.accept);
160
162
  } }
161
163
  class CaucaInputFileComponent {
162
164
  constructor(translateService, dialog) {
@@ -225,25 +227,23 @@ class CaucaInputFileComponent {
225
227
  } }, 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) { if (rf & 1) {
226
228
  i0.ɵɵelementStart(0, "button", 0);
227
229
  i0.ɵɵlistener("click", function CaucaInputFileComponent_Template_button_click_0_listener($event) { return ctx.openDialog($event); });
228
- i0.ɵɵtemplate(1, CaucaInputFileComponent_mat_icon_1_Template, 2, 1, "mat-icon", 1);
229
- i0.ɵɵtemplate(2, CaucaInputFileComponent_span_2_Template, 2, 1, "span", 1);
230
+ i0.ɵɵtemplate(1, CaucaInputFileComponent_mat_icon_1_Template, 2, 1, "mat-icon", 1)(2, CaucaInputFileComponent_span_2_Template, 2, 1, "span", 1);
230
231
  i0.ɵɵelementEnd();
231
- i0.ɵɵtemplate(3, CaucaInputFileComponent_ng_container_3_Template, 3, 1, "ng-container", 2);
232
- i0.ɵɵtemplate(4, CaucaInputFileComponent_ng_template_4_Template, 2, 1, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
232
+ i0.ɵɵtemplate(3, CaucaInputFileComponent_ng_container_3_Template, 3, 1, "ng-container", 2)(4, CaucaInputFileComponent_ng_template_4_Template, 2, 1, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
233
233
  } if (rf & 2) {
234
- const _r3 = i0.ɵɵreference(5);
234
+ const _r4 = i0.ɵɵreference(5);
235
235
  i0.ɵɵadvance(1);
236
236
  i0.ɵɵproperty("ngIf", ctx.icon);
237
237
  i0.ɵɵadvance(1);
238
238
  i0.ɵɵproperty("ngIf", ctx.text);
239
239
  i0.ɵɵadvance(1);
240
- i0.ɵɵproperty("ngIf", ctx.multiple)("ngIfElse", _r3);
240
+ i0.ɵɵproperty("ngIf", ctx.multiple)("ngIfElse", _r4);
241
241
  } }, dependencies: [i2.NgIf, i3.MatButton, i5.MatIcon], styles: ["[_nghost-%COMP%] input[_ngcontent-%COMP%]{display:none}"] }); }
242
242
  }
243
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputFileComponent, [{
243
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputFileComponent, [{
244
244
  type: Component,
245
245
  args: [{ selector: 'cauca-input-file', template: "<button mat-raised-button (click)=\"openDialog($event)\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n <span *ngIf=\"text\">{{text}}</span>\n</button>\n<ng-container *ngIf=\"multiple; else notMultipleInput\">\n <input #file type=\"file\" (change)=\"onSelectFile($event)\" [accept]=\"accept\" multiple=\"multiple\" />\n</ng-container>\n\n<ng-template #notMultipleInput>\n <input #file type=\"file\" (change)=\"onSelectFile($event)\" [accept]=\"accept\" />\n</ng-template>", styles: [":host input{display:none}\n"] }]
246
- }], function () { return [{ type: i1$2.TranslateService }, { type: i1$1.MatDialog }]; }, { file: [{
246
+ }], () => [{ type: i1$2.TranslateService }, { type: i1$1.MatDialog }], { file: [{
247
247
  type: ViewChild,
248
248
  args: ['file', { static: false }]
249
249
  }], readend: [{
@@ -257,6 +257,7 @@ class CaucaInputFileComponent {
257
257
  }], text: [{
258
258
  type: Input
259
259
  }] }); })();
260
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputFileComponent, { className: "CaucaInputFileComponent", filePath: "lib/cauca-input-file/cauca-input-file.component.ts", lineNumber: 11 }); })();
260
261
 
261
262
  function CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template(rf, ctx) { if (rf & 1) {
262
263
  i0.ɵɵelementStart(0, "mat-error");
@@ -304,9 +305,7 @@ class CaucaInputMultipleLangueComponent {
304
305
  });
305
306
  }
306
307
  onTagChanged(tabIndex) {
307
- console.log('cauca-material', tabIndex);
308
- console.log('cauca-material', this.value);
309
- console.log('cauca-material', this.forms);
308
+ console.log('cauca-material, onTabChanged', tabIndex);
310
309
  }
311
310
  getErrorMessage(index) {
312
311
  return this.forms[index].hasError('required') ? 'error.required' : '';
@@ -329,12 +328,13 @@ class CaucaInputMultipleLangueComponent {
329
328
  i0.ɵɵproperty("ngForOf", ctx.labels);
330
329
  } }, dependencies: [i2.NgForOf, i2.NgIf, i3$1.DefaultValueAccessor, i3$1.NgControlStatus, i3$1.RequiredValidator, i3$1.FormControlDirective, i4.MatFormField, i4.MatError, i5$1.MatInput, i6.MatTab, i6.MatTabGroup, i1.TranslatePipe], styles: [".mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"] }); }
331
330
  }
332
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputMultipleLangueComponent, [{
331
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputMultipleLangueComponent, [{
333
332
  type: Component,
334
333
  args: [{ selector: 'cauca-input-multiple-langue', template: "<mat-tab-group [selectedIndex]=\"selectedIndex\" (selectedIndexChange)=\"onTagChanged($event)\">\n <mat-tab *ngFor=\"let lang of labels; let i = index\" [label]=\"lang\">\n <mat-form-field hideRequiredMarker=\"never\">\n <input matInput [placeholder]=\"lang\" [formControl]=\"forms[i]\" required=\"required\">\n <mat-error *ngIf=\"forms[i].invalid\">{{getErrorMessage(i) | translate}}</mat-error>\n </mat-form-field>\n </mat-tab>\n</mat-tab-group>", styles: [".mat-mdc-form-field{width:100%}\n"] }]
335
- }], function () { return [{ type: i1$2.CaucaCoreService }, { type: i1$2.TranslateService }]; }, { value: [{
334
+ }], () => [{ type: i1$2.CaucaCoreService }, { type: i1$2.TranslateService }], { value: [{
336
335
  type: Input
337
336
  }] }); })();
337
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputMultipleLangueComponent, { className: "CaucaInputMultipleLangueComponent", filePath: "lib/cauca-input-multiple-langue/cauca-input-multiple-langue.component.ts", lineNumber: 10 }); })();
338
338
 
339
339
  function CaucaMenuVerticalComponent_h4_0_div_2_fa_icon_1_Template(rf, ctx) { if (rf & 1) {
340
340
  i0.ɵɵelement(0, "fa-icon", 8);
@@ -350,8 +350,7 @@ function CaucaMenuVerticalComponent_h4_0_div_2_img_2_Template(rf, ctx) { if (rf
350
350
  } }
351
351
  function CaucaMenuVerticalComponent_h4_0_div_2_Template(rf, ctx) { if (rf & 1) {
352
352
  i0.ɵɵelementStart(0, "div", 5);
353
- i0.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_2_fa_icon_1_Template, 1, 1, "fa-icon", 6);
354
- i0.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_2_img_2_Template, 1, 1, "img", 7);
353
+ i0.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_2_fa_icon_1_Template, 1, 1, "fa-icon", 6)(2, CaucaMenuVerticalComponent_h4_0_div_2_img_2_Template, 1, 1, "img", 7);
355
354
  i0.ɵɵelementEnd();
356
355
  } if (rf & 2) {
357
356
  const menu_r1 = i0.ɵɵnextContext().$implicit;
@@ -389,8 +388,7 @@ function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_img_2_Template(rf, ct
389
388
  } }
390
389
  function CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_Template(rf, ctx) { if (rf & 1) {
391
390
  i0.ɵɵelementStart(0, "div", 5);
392
- i0.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_fa_icon_1_Template, 1, 1, "fa-icon", 6);
393
- i0.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_img_2_Template, 1, 1, "img", 7);
391
+ i0.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_fa_icon_1_Template, 1, 1, "fa-icon", 6)(2, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_img_2_Template, 1, 1, "img", 7);
394
392
  i0.ɵɵelementEnd();
395
393
  } if (rf & 2) {
396
394
  const submenu_r12 = i0.ɵɵnextContext().$implicit;
@@ -413,9 +411,7 @@ function CaucaMenuVerticalComponent_h4_0_div_4_div_1_Template(rf, ctx) { if (rf
413
411
  const _r23 = i0.ɵɵgetCurrentView();
414
412
  i0.ɵɵelementStart(0, "div", 13);
415
413
  i0.ɵɵlistener("click", function CaucaMenuVerticalComponent_h4_0_div_4_div_1_Template_div_click_0_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r23); const submenu_r12 = restoredCtx.$implicit; const ctx_r22 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r22.goTo(submenu_r12.path, $event)); });
416
- i0.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_1_Template, 2, 0, "div", 14);
417
- i0.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_Template, 3, 2, "div", 2);
418
- i0.ɵɵtemplate(3, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_3_Template, 4, 3, "div", 3);
414
+ i0.ɵɵtemplate(1, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_1_Template, 2, 0, "div", 14)(2, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_2_Template, 3, 2, "div", 2)(3, CaucaMenuVerticalComponent_h4_0_div_4_div_1_div_3_Template, 4, 3, "div", 3);
419
415
  i0.ɵɵelementEnd();
420
416
  } if (rf & 2) {
421
417
  const submenu_r12 = ctx.$implicit;
@@ -440,8 +436,7 @@ function CaucaMenuVerticalComponent_h4_0_Template(rf, ctx) { if (rf & 1) {
440
436
  const _r26 = i0.ɵɵgetCurrentView();
441
437
  i0.ɵɵelementStart(0, "h4")(1, "div", 1);
442
438
  i0.ɵɵlistener("click", function CaucaMenuVerticalComponent_h4_0_Template_div_click_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r26); const menu_r1 = restoredCtx.$implicit; const ctx_r25 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r25.goTo(menu_r1.path, $event)); });
443
- i0.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_2_Template, 3, 2, "div", 2);
444
- i0.ɵɵtemplate(3, CaucaMenuVerticalComponent_h4_0_div_3_Template, 4, 3, "div", 3);
439
+ i0.ɵɵtemplate(2, CaucaMenuVerticalComponent_h4_0_div_2_Template, 3, 2, "div", 2)(3, CaucaMenuVerticalComponent_h4_0_div_3_Template, 4, 3, "div", 3);
445
440
  i0.ɵɵelementEnd();
446
441
  i0.ɵɵtemplate(4, CaucaMenuVerticalComponent_h4_0_div_4_Template, 2, 1, "div", 4);
447
442
  i0.ɵɵelementEnd();
@@ -466,8 +461,6 @@ class CaucaMenuVerticalComponent {
466
461
  }
467
462
  });
468
463
  }
469
- ngOnInit() {
470
- }
471
464
  goTo(path, e) {
472
465
  this.router.navigate([path]);
473
466
  this.itemClick.emit();
@@ -492,14 +485,15 @@ class CaucaMenuVerticalComponent {
492
485
  i0.ɵɵproperty("ngForOf", ctx.menuItems);
493
486
  } }, dependencies: [i2.NgForOf, i2.NgIf, i3$2.FaIconComponent, i1.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}"] }); }
494
487
  }
495
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMenuVerticalComponent, [{
488
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMenuVerticalComponent, [{
496
489
  type: Component,
497
490
  args: [{ selector: 'cauca-menu-vertical', template: "<h4 *ngFor=\"let menu of menuItems\" [class]=\"menu.activated ? 'selected' : ''\">\n <div (click)=\"goTo(menu.path, $event)\" class=\"menu\">\n <div *ngIf=\"menu.icon\" class=\"menu-icon\">\n <fa-icon *ngIf=\"menu.icon.filter !== undefined\" [icon]=\"menu.icon\"></fa-icon>\n <img *ngIf=\"menu.icon.filter === undefined\" [src]=\"menu.icon\" />\n </div>\n <div *ngIf=\"menu.label\" class=\"menu-caption\">\n <span>{{menu.label | translate}}</span>\n </div>\n </div>\n <div *ngIf=\"menu.childs.length && menu.activated\" class=\"submenu\">\n <div\n *ngFor=\"let submenu of menu.childs\"\n [class]=\"submenu.activated ? 'menu selected' : 'menu'\"\n (click)=\"goTo(submenu.path, $event)\">\n <div *ngIf=\"!submenu.icon\" class=\"menu-dot\">&bull;</div>\n <div *ngIf=\"submenu.icon\" class=\"menu-icon\">\n <fa-icon *ngIf=\"submenu.icon.filter !== undefined\" [icon]=\"submenu.icon\"></fa-icon>\n <img *ngIf=\"submenu.icon.filter === undefined\" [src]=\"submenu.icon\" />\n </div>\n <div *ngIf=\"submenu.label\" class=\"menu-caption\">\n <span>{{submenu.label | translate}}</span>\n </div>\n </div>\n </div>\n</h4>\n", styles: [".menu,.submenu{cursor:pointer}h4{margin:0;padding:0}h4 .menu{padding:1em 0;display:flex;flex-direction:row}h4 .menu>div{flex:1 1 auto;align-self:center}.menu-dot{max-width:1.1em;text-align:center;margin-right:.5em;font-size:2em}.menu-icon{max-width:60px;text-align:center;margin-right:.5em}.submenu{margin-left:1em}.submenu .menu{padding:0;font-size:.9em;line-height:2.2em}.submenu .menu:before{content:\"\";margin-left:1.1em;width:.1em;height:2.5em;position:relative;background:#ffffff;margin-right:-1.17em}\n"] }]
498
- }], function () { return [{ type: i1$3.Router }]; }, { itemClick: [{
491
+ }], () => [{ type: i1$3.Router }], { itemClick: [{
499
492
  type: Output
500
493
  }], menuItems: [{
501
494
  type: Input
502
495
  }] }); })();
496
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMenuVerticalComponent, { className: "CaucaMenuVerticalComponent", filePath: "lib/cauca-menu-vertical/cauca-menu-vertical.component.ts", lineNumber: 10 }); })();
503
497
 
504
498
  function CaucaMenuSidebarComponent_div_12_Template(rf, ctx) { if (rf & 1) {
505
499
  const _r3 = i0.ɵɵgetCurrentView();
@@ -532,11 +526,9 @@ class CaucaMenuSidebarComponent {
532
526
  this.hostElement.addEventListener('mouseout', (e) => this.onMouseOut(e));
533
527
  this.setDisplayMenu();
534
528
  }
535
- onResize(e) {
529
+ onResize(_e) {
536
530
  this.setDisplayMenu();
537
531
  }
538
- ngOnInit() {
539
- }
540
532
  onMenuItemClick() {
541
533
  if (window.innerWidth < 1000) {
542
534
  this.hideOnMobile();
@@ -629,10 +621,10 @@ class CaucaMenuSidebarComponent {
629
621
  i0.ɵɵproperty("ngIf", ctx.version);
630
622
  } }, dependencies: [i2.NgIf, i3.MatIconButton, i5.MatIcon, CaucaMenuVerticalComponent, i1.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%] > .header[_ngcontent-%COMP%], [_nghost-%COMP%] > .footer[_ngcontent-%COMP%]{flex:0 0 auto}[_nghost-%COMP%] > .content[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden auto}[_nghost-%COMP%] > .version[_ngcontent-%COMP%]{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:3em;line-height:3em;cursor:pointer;position:fixed;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:3em;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}}"] }); }
631
623
  }
632
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMenuSidebarComponent, [{
624
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMenuSidebarComponent, [{
633
625
  type: Component,
634
626
  args: [{ selector: 'cauca-menu-sidebar', template: "<div class=\"header\">\n <button mat-icon-button class=\"close\" (click)=\"hideOnMobile()\">\n <mat-icon>clear</mat-icon>\n </button>\n <ng-content select=\"[header]\"></ng-content>\n</div>\n<div class=\"content\">\n <ng-content select=\"[beforeMenu]\"></ng-content>\n <cauca-menu-vertical #menu [menuItems]=\"menuItems\" (itemClick)=\"onMenuItemClick()\"></cauca-menu-vertical>\n <ng-content select=\"[afterMenu]\"></ng-content>\n</div>\n<div class=\"footer\">\n <ng-content select=\"[footer]\"></ng-content>\n</div>\n<div *ngIf=\"version\" class=\"version\">\n <div class=\"double-arrow\" (click)=\"onToggleCollapse()\"></div>\n <span class=\"full\">{{'material.version' | translate}} {{version}}</span>\n <span class=\"abbr\">{{version}}</span>\n</div>\n", styles: [":host{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)}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{border-radius:5px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1)}::-webkit-scrollbar-thumb{border-radius:5px;background-color:#0003;outline:1px solid slategrey}:host>div{flex:1}:host>.header,:host>.footer{flex:0 0 auto}:host>.content{flex-grow:1;overflow:hidden auto}:host>.version{max-height:1em}:host.hidden{width:0;min-width:0;max-width:0}:host.mobile{width:275px;min-width:275px;max-width:275px;position:absolute;z-index:10}:host.collapsed{width:75px;min-width:75px;max-width:75px}:host.expanded{width:275px;min-width:275px;max-width:275px}:host .close{display:none}:host.mobile .close{right:0;display:inline-block;position:absolute}.double-arrow{height:3em;line-height:3em;cursor:pointer;position:fixed;opacity:.25;margin-top:-1em}.double-arrow:hover{opacity:1}:host.expanded .double-arrow:before,:host.collapsed .double-arrow:before{font-family:Material Icons;content:\"double_arrow\";font-size:3em;text-align:right}:host.collapsed .double-arrow{margin-left:10px}:host.expanded .double-arrow{margin-left:200px}:host.collapsed ::ng-deep .menu-caption,:host.collapsed ::ng-deep .submenu{display:none}:host.keepExpanded .double-arrow{transform:rotate(180deg);opacity:1}.version{bottom:0;padding:1em}.full,.abbr{display:none}:host.collapsed .abbr{display:inline}:host.mobile .full,:host.expanded .full{display:inline}@media only screen and (max-width: 1000px){.double-arrow{display:none}}\n"] }]
635
- }], function () { return [{ type: i0.ElementRef }]; }, { menuItems: [{
627
+ }], () => [{ type: i0.ElementRef }], { menuItems: [{
636
628
  type: Input
637
629
  }], version: [{
638
630
  type: Input
@@ -640,6 +632,7 @@ class CaucaMenuSidebarComponent {
640
632
  type: HostListener,
641
633
  args: ['window:resize', ['$event']]
642
634
  }] }); })();
635
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMenuSidebarComponent, { className: "CaucaMenuSidebarComponent", filePath: "lib/cauca-menu-sidebar/cauca-menu-sidebar.component.ts", lineNumber: 9 }); })();
643
636
 
644
637
  const _c0 = ["container"];
645
638
  function CaucaSlideshowComponent_div_2_Template(rf, ctx) { if (rf & 1) {
@@ -739,7 +732,7 @@ class CaucaSlideshowComponent {
739
732
  ]),
740
733
  ] } }); }
741
734
  }
742
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaSlideshowComponent, [{
735
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaSlideshowComponent, [{
743
736
  type: Component,
744
737
  args: [{ selector: 'cauca-slideshow', animations: [
745
738
  trigger('slideUpDown', [
@@ -765,7 +758,7 @@ class CaucaSlideshowComponent {
765
758
  ]),
766
759
  ]),
767
760
  ], template: "<div #container class=\"slideshow\">\n <div *ngFor=\"let url of images; let index = index;\" [@slideLeftRight]=\"getState(index)\">\n <img [src]=\"url\" />\n </div>\n</div>", styles: [".slideshow{margin:0 auto;position:relative;overflow:hidden}.slideshow>div{width:100%;height:100%;position:absolute}img{max-height:100%;max-width:100%;margin:0 auto;display:block}\n"] }]
768
- }], function () { return []; }, { container: [{
761
+ }], null, { container: [{
769
762
  type: ViewChild,
770
763
  args: ['container', { static: true }]
771
764
  }], height: [{
@@ -775,6 +768,7 @@ class CaucaSlideshowComponent {
775
768
  }], images: [{
776
769
  type: Input
777
770
  }] }); })();
771
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSlideshowComponent, { className: "CaucaSlideshowComponent", filePath: "lib/cauca-slideshow/cauca-slideshow.component.ts", lineNumber: 33 }); })();
778
772
 
779
773
  class CaucaMaterialModule {
780
774
  static { this.ɵfac = function CaucaMaterialModule_Factory(t) { return new (t || CaucaMaterialModule)(); }; }
@@ -791,7 +785,7 @@ class CaucaMaterialModule {
791
785
  MatTabsModule,
792
786
  MatDialogModule] }); }
793
787
  }
794
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMaterialModule, [{
788
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMaterialModule, [{
795
789
  type: NgModule,
796
790
  args: [{
797
791
  declarations: [
@@ -814,7 +808,7 @@ class CaucaMaterialModule {
814
808
  MatIconModule,
815
809
  MatInputModule,
816
810
  MatTabsModule,
817
- MatDialogModule
811
+ MatDialogModule,
818
812
  ],
819
813
  exports: [
820
814
  CaucaMaterialComponent,
@@ -824,7 +818,7 @@ class CaucaMaterialModule {
824
818
  CaucaMenuVerticalComponent,
825
819
  CaucaSimpleDialogComponent,
826
820
  CaucaSlideshowComponent,
827
- ]
821
+ ],
828
822
  }]
829
823
  }], null, null); })();
830
824
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CaucaMaterialModule, { declarations: [CaucaMaterialComponent,
@@ -851,6 +845,335 @@ class CaucaMaterialModule {
851
845
  CaucaSimpleDialogComponent,
852
846
  CaucaSlideshowComponent] }); })();
853
847
 
848
+ function DialogDateTimePickerComponent_For_7_Template(rf, ctx) { if (rf & 1) {
849
+ const _r9 = i0.ɵɵgetCurrentView();
850
+ i0.ɵɵelementStart(0, "mat-list-item", 10);
851
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_For_7_Template_mat_list_item_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r9); const hour_r3 = restoredCtx.$implicit; const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.hourChanged(hour_r3)); });
852
+ i0.ɵɵtext(1);
853
+ i0.ɵɵelementEnd();
854
+ } if (rf & 2) {
855
+ const hour_r3 = ctx.$implicit;
856
+ const ctx_r0 = i0.ɵɵnextContext();
857
+ i0.ɵɵproperty("activated", ctx_r0.selectedHour === hour_r3)("disabled", ctx_r0.disabled.someHours.includes(hour_r3));
858
+ i0.ɵɵadvance(1);
859
+ i0.ɵɵtextInterpolate((hour_r3 < 10 ? "0" : "") + hour_r3);
860
+ } }
861
+ function DialogDateTimePickerComponent_For_11_Template(rf, ctx) { if (rf & 1) {
862
+ const _r16 = i0.ɵɵgetCurrentView();
863
+ i0.ɵɵelementStart(0, "mat-list-item", 10);
864
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_For_11_Template_mat_list_item_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r16); const minute_r10 = restoredCtx.$implicit; const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.minuteChanged(minute_r10)); });
865
+ i0.ɵɵtext(1);
866
+ i0.ɵɵelementEnd();
867
+ } if (rf & 2) {
868
+ const minute_r10 = ctx.$implicit;
869
+ const ctx_r1 = i0.ɵɵnextContext();
870
+ i0.ɵɵproperty("activated", ctx_r1.selectedMinute === minute_r10)("disabled", ctx_r1.disabled.someMinutes.includes(minute_r10));
871
+ i0.ɵɵadvance(1);
872
+ i0.ɵɵtextInterpolate((minute_r10 < 10 ? "0" : "") + minute_r10);
873
+ } }
874
+ function DialogDateTimePickerComponent_div_12_For_3_Template(rf, ctx) { if (rf & 1) {
875
+ const _r24 = i0.ɵɵgetCurrentView();
876
+ i0.ɵɵelementStart(0, "mat-list-item", 10);
877
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_div_12_For_3_Template_mat_list_item_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r24); const second_r18 = restoredCtx.$implicit; const ctx_r23 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r23.secondChanged(second_r18)); });
878
+ i0.ɵɵtext(1);
879
+ i0.ɵɵelementEnd();
880
+ } if (rf & 2) {
881
+ const second_r18 = ctx.$implicit;
882
+ const ctx_r17 = i0.ɵɵnextContext(2);
883
+ i0.ɵɵproperty("activated", ctx_r17.selectedSecond === second_r18)("disabled", ctx_r17.disabled.someSeconds.includes(second_r18));
884
+ i0.ɵɵadvance(1);
885
+ i0.ɵɵtextInterpolate((second_r18 < 10 ? "0" : "") + second_r18);
886
+ } }
887
+ function DialogDateTimePickerComponent_div_12_Template(rf, ctx) { if (rf & 1) {
888
+ i0.ɵɵelementStart(0, "div", 11)(1, "mat-list", 4);
889
+ i0.ɵɵrepeaterCreate(2, DialogDateTimePickerComponent_div_12_For_3_Template, 2, 3, "mat-list-item", 12, i0.ɵɵrepeaterTrackByIdentity);
890
+ i0.ɵɵelementEnd()();
891
+ } if (rf & 2) {
892
+ const ctx_r2 = i0.ɵɵnextContext();
893
+ i0.ɵɵadvance(1);
894
+ i0.ɵɵproperty("disabled", ctx_r2.disabled.seconds);
895
+ i0.ɵɵadvance(1);
896
+ i0.ɵɵrepeater(ctx_r2.seconds);
897
+ } }
898
+ class DialogDateTimePickerComponent {
899
+ constructor(dialogRef, options) {
900
+ this.dialogRef = dialogRef;
901
+ this.options = options;
902
+ this.selectedHour = 0;
903
+ this.selectedMinute = 0;
904
+ this.selectedSecond = 0;
905
+ this.initialDate = new Date();
906
+ this.selectedDate = null;
907
+ this.minimumDate = new Date();
908
+ this.maximumDate = new Date();
909
+ this.showSeconds = false;
910
+ this.hours = [...Array(24).keys()];
911
+ this.minutes = [...Array(60).keys()];
912
+ this.seconds = [...Array(60).keys()];
913
+ this.disabled = {
914
+ hours: true,
915
+ someHours: [],
916
+ minutes: true,
917
+ someMinutes: [],
918
+ seconds: true,
919
+ someSeconds: [],
920
+ };
921
+ this.step = {
922
+ hours: 1,
923
+ minutes: 1,
924
+ seconds: 1,
925
+ };
926
+ this.step = options.step || this.step;
927
+ this.showSeconds = options.showSeconds;
928
+ this.setListHoursMinutes();
929
+ this.initialEachComponentValue(options);
930
+ }
931
+ dateChanged(date) {
932
+ if (date) {
933
+ this.selectedDate = date;
934
+ this.selectedDate.setHours(this.selectedHour);
935
+ this.selectedDate.setMinutes(this.selectedMinute);
936
+ this.selectedDate.setSeconds(this.selectedSecond);
937
+ this.disabled.hours = false;
938
+ this.disabled.someHours = this.hours.filter(hour => this.hourOfSelectedDateIsDisabled(hour));
939
+ }
940
+ else {
941
+ this.selectedDate = null;
942
+ this.disabled.hours = true;
943
+ }
944
+ }
945
+ hourChanged(hour) {
946
+ if (this.disabled.hours || this.disabled.someHours.includes(hour))
947
+ return;
948
+ this.selectedHour = hour;
949
+ this.selectedDate.setHours(hour);
950
+ this.disabled.minutes = false;
951
+ this.disabled.someMinutes = this.minutes.filter(minute => this.minuteOfSelectedDateIsDisabled(minute));
952
+ }
953
+ minuteChanged(minute) {
954
+ if (this.disabled.minutes || this.disabled.someMinutes.includes(minute))
955
+ return;
956
+ this.selectedMinute = minute;
957
+ this.selectedDate.setMinutes(minute);
958
+ this.disabled.seconds = false;
959
+ this.disabled.someSeconds = this.seconds.filter(second => this.secondOfSelectedDateIsDisabled(second));
960
+ }
961
+ secondChanged(second) {
962
+ if (this.disabled.seconds || this.disabled.someSeconds.includes(second))
963
+ return;
964
+ this.selectedSecond = second;
965
+ this.selectedDate.setSeconds(second);
966
+ }
967
+ cancel() {
968
+ this.dialogRef.close(null);
969
+ }
970
+ confirm() {
971
+ this.dialogRef.close(this.selectedDate);
972
+ }
973
+ hourOfSelectedDateIsDisabled(hour) {
974
+ if (this.selectedDateIsTheMinimumDate()) {
975
+ return hour < this.minimumDate.getHours();
976
+ }
977
+ else if (this.selectedDateIsTheMaximumDate()) {
978
+ return hour > this.maximumDate.getHours();
979
+ }
980
+ return false;
981
+ }
982
+ minuteOfSelectedDateIsDisabled(minute) {
983
+ if (this.selectedDateIsTheMinimumDate() &&
984
+ this.selectedDate.getHours() === this.minimumDate.getHours()) {
985
+ return minute < this.minimumDate.getMinutes();
986
+ }
987
+ else if (this.selectedDateIsTheMaximumDate() &&
988
+ this.selectedDate.getHours() === this.maximumDate.getHours()) {
989
+ return minute > this.maximumDate.getMinutes();
990
+ }
991
+ return false;
992
+ }
993
+ secondOfSelectedDateIsDisabled(second) {
994
+ if (this.selectedDateIsTheMinimumDate() &&
995
+ this.selectedDate.getHours() === this.minimumDate.getHours() &&
996
+ this.selectedDate.getMinutes() === this.minimumDate.getMinutes()) {
997
+ return second < this.minimumDate.getSeconds();
998
+ }
999
+ else if (this.selectedDateIsTheMaximumDate() &&
1000
+ this.selectedDate.getMinutes() === this.maximumDate.getMinutes()) {
1001
+ return second > this.maximumDate.getSeconds();
1002
+ }
1003
+ return false;
1004
+ }
1005
+ initialEachComponentValue(options) {
1006
+ this.initialDate = options.selectedDate ? new Date(options.selectedDate) : new Date();
1007
+ this.minimumDate = options.minimumDate ? new Date(options.minimumDate) : null;
1008
+ this.maximumDate = options.maximumDate ? new Date(options.maximumDate) : null;
1009
+ this.dateChanged(options.selectedDate ? new Date(options.selectedDate) : null);
1010
+ this.hourChanged(options.selectedDate ? new Date(options.selectedDate).getHours() : 0);
1011
+ this.minuteChanged(options.selectedDate ? new Date(options.selectedDate).getMinutes() : 0);
1012
+ this.secondChanged(options.selectedDate ? new Date(options.selectedDate).getSeconds() : 0);
1013
+ }
1014
+ selectedDateIsTheMinimumDate() {
1015
+ return (this.minimumDate &&
1016
+ this.selectedDate.getFullYear() === this.minimumDate.getFullYear() &&
1017
+ this.selectedDate.getMonth() === this.minimumDate.getMonth() &&
1018
+ this.selectedDate.getDate() === this.minimumDate.getDate());
1019
+ }
1020
+ selectedDateIsTheMaximumDate() {
1021
+ return (this.maximumDate &&
1022
+ this.selectedDate.getFullYear() === this.maximumDate.getFullYear() &&
1023
+ this.selectedDate.getMonth() === this.maximumDate.getMonth() &&
1024
+ this.selectedDate.getDate() === this.maximumDate.getDate());
1025
+ }
1026
+ setListHoursMinutes() {
1027
+ this.hours = this.hours.filter(hour => hour % this.step.hours === 0);
1028
+ this.minutes = this.minutes.filter(minute => minute % this.step.minutes === 0);
1029
+ this.seconds = this.seconds.filter(seconde => seconde % this.step.seconds === 0);
1030
+ }
1031
+ static { this.ɵfac = function DialogDateTimePickerComponent_Factory(t) { return new (t || DialogDateTimePickerComponent)(i0.ɵɵdirectiveInject(i1$1.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); }; }
1032
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DialogDateTimePickerComponent, selectors: [["cauca-dialog-date-time-picker"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 20, vars: 6, consts: [["mat-dialog-content", ""], [1, "date-time-picker"], [3, "minDate", "maxDate", "selected", "selectedChange"], [1, "hours"], [3, "disabled"], [1, "minutes"], ["class", "seconds", 4, "ngIf"], ["mat-dialog-actions", "", "align", "end"], ["mat-icon-button", "", 3, "click"], ["mat-icon-button", "", "cdkFocusInitial", "", 3, "click"], [3, "activated", "disabled", "click"], [1, "seconds"], [3, "activated", "disabled"]], template: function DialogDateTimePickerComponent_Template(rf, ctx) { if (rf & 1) {
1033
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div")(3, "mat-calendar", 2);
1034
+ i0.ɵɵlistener("selectedChange", function DialogDateTimePickerComponent_Template_mat_calendar_selectedChange_3_listener($event) { return ctx.dateChanged($event); });
1035
+ i0.ɵɵelementEnd()();
1036
+ i0.ɵɵelementStart(4, "div", 3)(5, "mat-list", 4);
1037
+ i0.ɵɵrepeaterCreate(6, DialogDateTimePickerComponent_For_7_Template, 2, 3, "mat-list-item", 12, i0.ɵɵrepeaterTrackByIdentity);
1038
+ i0.ɵɵelementEnd()();
1039
+ i0.ɵɵelementStart(8, "div", 5)(9, "mat-list", 4);
1040
+ i0.ɵɵrepeaterCreate(10, DialogDateTimePickerComponent_For_11_Template, 2, 3, "mat-list-item", 12, i0.ɵɵrepeaterTrackByIdentity);
1041
+ i0.ɵɵelementEnd()();
1042
+ i0.ɵɵtemplate(12, DialogDateTimePickerComponent_div_12_Template, 4, 1, "div", 6);
1043
+ i0.ɵɵelementEnd()();
1044
+ i0.ɵɵelementStart(13, "div", 7)(14, "button", 8);
1045
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_Template_button_click_14_listener() { return ctx.cancel(); });
1046
+ i0.ɵɵelementStart(15, "mat-icon");
1047
+ i0.ɵɵtext(16, "cancel");
1048
+ i0.ɵɵelementEnd()();
1049
+ i0.ɵɵelementStart(17, "button", 9);
1050
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_Template_button_click_17_listener() { return ctx.confirm(); });
1051
+ i0.ɵɵelementStart(18, "mat-icon");
1052
+ i0.ɵɵtext(19, "check");
1053
+ i0.ɵɵelementEnd()()();
1054
+ } if (rf & 2) {
1055
+ i0.ɵɵadvance(3);
1056
+ i0.ɵɵproperty("minDate", ctx.minimumDate)("maxDate", ctx.maximumDate)("selected", ctx.selectedDate);
1057
+ i0.ɵɵadvance(2);
1058
+ i0.ɵɵproperty("disabled", ctx.disabled.hours);
1059
+ i0.ɵɵadvance(1);
1060
+ i0.ɵɵrepeater(ctx.hours);
1061
+ i0.ɵɵadvance(3);
1062
+ i0.ɵɵproperty("disabled", ctx.disabled.minutes);
1063
+ i0.ɵɵadvance(1);
1064
+ i0.ɵɵrepeater(ctx.minutes);
1065
+ i0.ɵɵadvance(2);
1066
+ i0.ɵɵproperty("ngIf", ctx.showSeconds);
1067
+ } }, dependencies: [CommonModule, i2.NgIf, CaucaCoreForChildModule,
1068
+ MatButtonModule, i3.MatIconButton, MatDatepickerModule, i4$1.MatCalendar, MatIconModule, i5.MatIcon, MatListModule, i6$1.MatList, i6$1.MatListItem, MatNativeDateModule], styles: ["div[mat-dialog-actions][_ngcontent-%COMP%]{padding:10px 0;border-top:1px solid #ccc}.date-time-picker[_ngcontent-%COMP%]{display:flex;height:350px;overflow:hidden;justify-content:center}.date-time-picker[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{overflow:auto;flex:1;max-width:50px;scrollbar-width:none;border-left:1px solid #ccc}.date-time-picker[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > mat-list[_ngcontent-%COMP%]{width:50px;padding:0}.date-time-picker[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > mat-list[_ngcontent-%COMP%] .mat-mdc-list-item[_ngcontent-%COMP%]:not(.mat-mdc-list-item-interactive){cursor:pointer}.date-time-picker[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{flex:4;max-width:290px;border-left:none}.date-time-picker[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child mat-calendar[_ngcontent-%COMP%]{width:290px}.date-time-picker[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.date-time-picker[_ngcontent-%COMP%] .mdc-list-item__primary-text{font-family:var(--mat-datepicker-calendar-text-font);font-size:var(--mat-datepicker-calendar-text-size)}.date-time-picker[_ngcontent-%COMP%] .mdc-list-item--activated{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color)}.date-time-picker[_ngcontent-%COMP%] .mdc-list-item--activated .mdc-list-item__primary-text{color:var(--mat-datepicker-calendar-date-selected-state-text-color)}"] }); }
1069
+ }
1070
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DialogDateTimePickerComponent, [{
1071
+ type: Component,
1072
+ args: [{ selector: 'cauca-dialog-date-time-picker', standalone: true, imports: [
1073
+ CommonModule,
1074
+ CaucaCoreForChildModule,
1075
+ MatButtonModule,
1076
+ MatDatepickerModule,
1077
+ MatIconModule,
1078
+ MatListModule,
1079
+ MatNativeDateModule,
1080
+ ], template: "<div mat-dialog-content>\n <div class=\"date-time-picker\">\n <div>\n <mat-calendar\n [minDate]=\"minimumDate\"\n [maxDate]=\"maximumDate\"\n [selected]=\"selectedDate\"\n (selectedChange)=\"dateChanged($event)\"\n ></mat-calendar>\n </div>\n <div class=\"hours\">\n <mat-list [disabled]=\"disabled.hours\">\n @for (hour of hours; track hour) {\n <mat-list-item\n [activated]=\"selectedHour === hour\"\n [disabled]=\"disabled.someHours.includes(hour)\"\n (click)=\"hourChanged(hour)\"\n >{{(hour < 10 ? '0' : '') + hour}}</mat-list-item>\n }\n </mat-list>\n </div>\n <div class=\"minutes\">\n <mat-list [disabled]=\"disabled.minutes\">\n @for (minute of minutes; track minute) {\n <mat-list-item\n [activated]=\"selectedMinute === minute\"\n [disabled]=\"disabled.someMinutes.includes(minute)\"\n (click)=\"minuteChanged(minute)\"\n >{{(minute < 10 ? '0' : '') + minute}}</mat-list-item>\n }\n </mat-list>\n </div>\n <div class=\"seconds\" *ngIf=\"showSeconds\">\n <mat-list [disabled]=\"disabled.seconds\">\n @for (second of seconds; track second) {\n <mat-list-item\n [activated]=\"selectedSecond === second\"\n [disabled]=\"disabled.someSeconds.includes(second)\"\n (click)=\"secondChanged(second)\"\n >{{(second < 10 ? '0' : '') + second}}</mat-list-item>\n }\n </mat-list>\n </div>\n </div>\n</div>\n<div mat-dialog-actions align=\"end\">\n <button mat-icon-button (click)=\"cancel()\"><mat-icon>cancel</mat-icon></button>\n <button mat-icon-button cdkFocusInitial (click)=\"confirm()\"><mat-icon>check</mat-icon></button>\n</div>", styles: ["div[mat-dialog-actions]{padding:10px 0;border-top:1px solid #ccc}.date-time-picker{display:flex;height:350px;overflow:hidden;justify-content:center}.date-time-picker>div{overflow:auto;flex:1;max-width:50px;scrollbar-width:none;border-left:1px solid #ccc}.date-time-picker>div>mat-list{width:50px;padding:0}.date-time-picker>div>mat-list .mat-mdc-list-item:not(.mat-mdc-list-item-interactive){cursor:pointer}.date-time-picker>div:first-child{flex:4;max-width:290px;border-left:none}.date-time-picker>div:first-child mat-calendar{width:290px}.date-time-picker>div::-webkit-scrollbar{display:none}.date-time-picker ::ng-deep .mdc-list-item__primary-text{font-family:var(--mat-datepicker-calendar-text-font);font-size:var(--mat-datepicker-calendar-text-size)}.date-time-picker ::ng-deep .mdc-list-item--activated{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color)}.date-time-picker ::ng-deep .mdc-list-item--activated .mdc-list-item__primary-text{color:var(--mat-datepicker-calendar-date-selected-state-text-color)}\n"] }]
1081
+ }], () => [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
1082
+ type: Inject,
1083
+ args: [MAT_DIALOG_DATA]
1084
+ }] }], null); })();
1085
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DialogDateTimePickerComponent, { className: "DialogDateTimePickerComponent", filePath: "lib/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.ts", lineNumber: 27 }); })();
1086
+
1087
+ class CaucaDateTimePickerComponent {
1088
+ constructor(dialog, datePipe) {
1089
+ this.dialog = dialog;
1090
+ this.datePipe = datePipe;
1091
+ this.stepHours = 1;
1092
+ this.stepMinutes = 1;
1093
+ this.stepSecondes = 1;
1094
+ this.minimumDate = null;
1095
+ this.maximumDate = null;
1096
+ this.showSeconds = false;
1097
+ this.showFormat = 'yyyy/MM/dd, HH:mm';
1098
+ this.selectedChange = new EventEmitter();
1099
+ this.stringDate = '';
1100
+ }
1101
+ set value(value) {
1102
+ if (value) {
1103
+ this.stringDate = this.stringifyDate(value);
1104
+ this.selectedDate = value;
1105
+ }
1106
+ }
1107
+ showDialog() {
1108
+ const options = {
1109
+ selectedDate: this.selectedDate,
1110
+ minimumDate: this.minimumDate,
1111
+ maximumDate: this.maximumDate,
1112
+ showSeconds: this.showSeconds,
1113
+ step: {
1114
+ hours: this.stepHours,
1115
+ minutes: this.stepMinutes,
1116
+ seconds: this.stepSecondes,
1117
+ }
1118
+ };
1119
+ const dialogRef = this.dialog.open(DialogDateTimePickerComponent, {
1120
+ data: options,
1121
+ });
1122
+ dialogRef.afterClosed().subscribe((date) => {
1123
+ this.stringDate = this.stringifyDate(date);
1124
+ this.selectedDate = date;
1125
+ this.selectedChange.emit(date);
1126
+ });
1127
+ }
1128
+ stringifyDate(date) {
1129
+ return this.datePipe.transform(date, this.showFormat);
1130
+ }
1131
+ static { this.ɵfac = function CaucaDateTimePickerComponent_Factory(t) { return new (t || CaucaDateTimePickerComponent)(i0.ɵɵdirectiveInject(i1$1.MatDialog), i0.ɵɵdirectiveInject(i2.DatePipe)); }; }
1132
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaDateTimePickerComponent, selectors: [["cauca-date-time-picker"]], inputs: { stepHours: "stepHours", stepMinutes: "stepMinutes", stepSecondes: "stepSecondes", minimumDate: "minimumDate", maximumDate: "maximumDate", showSeconds: "showSeconds", showFormat: "showFormat", value: "value" }, outputs: { selectedChange: "selectedChange" }, standalone: true, features: [i0.ɵɵProvidersFeature([
1133
+ DatePipe,
1134
+ ]), i0.ɵɵStandaloneFeature], decls: 5, vars: 1, consts: [[1, "example-full-width"], ["matInput", "", "readonly", "readonly", 3, "value"], ["matSuffix", "", "mat-icon-button", "", 3, "click"]], template: function CaucaDateTimePickerComponent_Template(rf, ctx) { if (rf & 1) {
1135
+ i0.ɵɵelementStart(0, "mat-form-field", 0);
1136
+ i0.ɵɵelement(1, "input", 1);
1137
+ i0.ɵɵelementStart(2, "button", 2);
1138
+ i0.ɵɵlistener("click", function CaucaDateTimePickerComponent_Template_button_click_2_listener() { return ctx.showDialog(); });
1139
+ i0.ɵɵelementStart(3, "mat-icon");
1140
+ i0.ɵɵtext(4, "calendar_month");
1141
+ i0.ɵɵelementEnd()()();
1142
+ } if (rf & 2) {
1143
+ i0.ɵɵadvance(1);
1144
+ i0.ɵɵproperty("value", ctx.stringDate);
1145
+ } }, dependencies: [MatButtonModule, i3.MatIconButton, MatIconModule, i5.MatIcon, MatInputModule, i5$1.MatInput, i4.MatFormField, i4.MatSuffix] }); }
1146
+ }
1147
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaDateTimePickerComponent, [{
1148
+ type: Component,
1149
+ args: [{ selector: 'cauca-date-time-picker', standalone: true, imports: [
1150
+ MatButtonModule,
1151
+ MatIconModule,
1152
+ MatInputModule,
1153
+ ], providers: [
1154
+ DatePipe,
1155
+ ], template: "<mat-form-field class=\"example-full-width\">\n <input matInput [value]=\"stringDate\" readonly=\"readonly\">\n <button matSuffix mat-icon-button (click)=\"showDialog()\">\n <mat-icon>calendar_month</mat-icon>\n </button>\n</mat-form-field>" }]
1156
+ }], () => [{ type: i1$1.MatDialog }, { type: i2.DatePipe }], { stepHours: [{
1157
+ type: Input
1158
+ }], stepMinutes: [{
1159
+ type: Input
1160
+ }], stepSecondes: [{
1161
+ type: Input
1162
+ }], minimumDate: [{
1163
+ type: Input
1164
+ }], maximumDate: [{
1165
+ type: Input
1166
+ }], showSeconds: [{
1167
+ type: Input
1168
+ }], showFormat: [{
1169
+ type: Input
1170
+ }], selectedChange: [{
1171
+ type: Output
1172
+ }], value: [{
1173
+ type: Input
1174
+ }] }); })();
1175
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaDateTimePickerComponent, { className: "CaucaDateTimePickerComponent", filePath: "lib/cauca-date-time-picker/cauca-date-time-picker.component.ts", lineNumber: 24 }); })();
1176
+
854
1177
  class MenuItem {
855
1178
  constructor(label, path, icon = '') {
856
1179
  this.label = label;
@@ -868,5 +1191,5 @@ class MenuItem {
868
1191
  * Generated bundle index. Do not edit.
869
1192
  */
870
1193
 
871
- export { CaucaInputFileComponent, CaucaInputMultipleLangueComponent, CaucaMaterialComponent, CaucaMaterialModule, CaucaMaterialService, CaucaMenuSidebarComponent, CaucaMenuVerticalComponent, CaucaSimpleDialogComponent, CaucaSlideshowComponent, MenuItem };
1194
+ export { CaucaDateTimePickerComponent, CaucaInputFileComponent, CaucaInputMultipleLangueComponent, CaucaMaterialComponent, CaucaMaterialModule, CaucaMaterialService, CaucaMenuSidebarComponent, CaucaMenuVerticalComponent, CaucaSimpleDialogComponent, CaucaSlideshowComponent, MenuItem };
872
1195
  //# sourceMappingURL=cauca-911-material.mjs.map