@cauca-911/material 17.1.0 → 17.1.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.
@@ -3,11 +3,11 @@ import { Injectable, Component, Inject, EventEmitter, ViewChild, Output, Input,
3
3
  import * as i1 from '@ngx-translate/core';
4
4
  import * as i2 from '@angular/common';
5
5
  import { CommonModule, DatePipe } from '@angular/common';
6
- import * as i3$1 from '@angular/forms';
6
+ import * as i3 from '@angular/forms';
7
7
  import { Validators, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import * as i3 from '@angular/material/button';
8
+ import * as i4 from '@angular/material/button';
9
9
  import { MatButtonModule } from '@angular/material/button';
10
- import * as i4 from '@angular/material/form-field';
10
+ import * as i4$1 from '@angular/material/form-field';
11
11
  import { MatFormFieldModule } from '@angular/material/form-field';
12
12
  import * as i5 from '@angular/material/icon';
13
13
  import { MatIconModule } from '@angular/material/icon';
@@ -15,7 +15,7 @@ import * as i5$1 from '@angular/material/input';
15
15
  import { MatInputModule } from '@angular/material/input';
16
16
  import * as i6 from '@angular/material/tabs';
17
17
  import { MatTabsModule } from '@angular/material/tabs';
18
- import * as i3$2 from '@fortawesome/angular-fontawesome';
18
+ import * as i3$1 from '@fortawesome/angular-fontawesome';
19
19
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
20
20
  import * as i1$2 from '@cauca-911/core';
21
21
  import { CaucaCoreForChildModule } from '@cauca-911/core';
@@ -25,9 +25,9 @@ import * as i1$3 from '@angular/router';
25
25
  import { NavigationEnd } from '@angular/router';
26
26
  import { style, state, animate, transition, trigger } from '@angular/animations';
27
27
  import { MatNativeDateModule } from '@angular/material/core';
28
- import * as i4$1 from '@angular/material/datepicker';
28
+ import * as i5$2 from '@angular/material/datepicker';
29
29
  import { MatDatepickerModule } from '@angular/material/datepicker';
30
- import * as i6$1 from '@angular/material/list';
30
+ import * as i7 from '@angular/material/list';
31
31
  import { MatListModule } from '@angular/material/list';
32
32
 
33
33
  class CaucaMaterialService {
@@ -57,7 +57,7 @@ class CaucaMaterialComponent {
57
57
  type: Component,
58
58
  args: [{ selector: 'cauca-material', template: "<div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>" }]
59
59
  }], null, null); })();
60
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMaterialComponent, { className: "CaucaMaterialComponent", filePath: "lib/cauca-material.component.ts", lineNumber: 8 }); })();
60
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMaterialComponent, { className: "CaucaMaterialComponent", filePath: "lib\\cauca-material.component.ts", lineNumber: 8 }); })();
61
61
 
62
62
  class SimpleDialogData {
63
63
  constructor() {
@@ -109,7 +109,7 @@ class CaucaSimpleDialogComponent {
109
109
  i0.ɵɵproperty("innerHTML", ctx.data.message, i0.ɵɵsanitizeHtml);
110
110
  i0.ɵɵadvance(1);
111
111
  i0.ɵɵproperty("ngIf", ctx.data.buttons);
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
+ } }, dependencies: [i2.NgForOf, i2.NgIf, i4.MatButton, i1$1.MatDialogTitle, i1$1.MatDialogActions, i1$1.MatDialogContent], styles: ["div[mat-dialog-actions][_ngcontent-%COMP%]{margin-top:20px;text-align:center}"] }); }
113
113
  }
114
114
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaSimpleDialogComponent, [{
115
115
  type: Component,
@@ -118,7 +118,7 @@ class CaucaSimpleDialogComponent {
118
118
  type: Inject,
119
119
  args: [MAT_DIALOG_DATA]
120
120
  }] }], null); })();
121
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSimpleDialogComponent, { className: "CaucaSimpleDialogComponent", filePath: "lib/cauca-simple-dialog/cauca-simple-dialog.component.ts", lineNumber: 10 }); })();
121
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSimpleDialogComponent, { className: "CaucaSimpleDialogComponent", filePath: "lib\\cauca-simple-dialog\\cauca-simple-dialog.component.ts", lineNumber: 10 }); })();
122
122
 
123
123
  const _c0$2 = ["file"];
124
124
  function CaucaInputFileComponent_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
@@ -238,7 +238,7 @@ class CaucaInputFileComponent {
238
238
  i0.ɵɵproperty("ngIf", ctx.text);
239
239
  i0.ɵɵadvance(1);
240
240
  i0.ɵɵproperty("ngIf", ctx.multiple)("ngIfElse", _r4);
241
- } }, dependencies: [i2.NgIf, i3.MatButton, i5.MatIcon], styles: ["[_nghost-%COMP%] input[_ngcontent-%COMP%]{display:none}"] }); }
241
+ } }, dependencies: [i2.NgIf, i4.MatButton, i5.MatIcon], styles: ["[_nghost-%COMP%] input[_ngcontent-%COMP%]{display:none}"] }); }
242
242
  }
243
243
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputFileComponent, [{
244
244
  type: Component,
@@ -257,7 +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
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputFileComponent, { className: "CaucaInputFileComponent", filePath: "lib\\cauca-input-file\\cauca-input-file.component.ts", lineNumber: 11 }); })();
261
261
 
262
262
  function CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template(rf, ctx) { if (rf & 1) {
263
263
  i0.ɵɵelementStart(0, "mat-error");
@@ -326,7 +326,7 @@ class CaucaInputMultipleLangueComponent {
326
326
  i0.ɵɵproperty("selectedIndex", ctx.selectedIndex);
327
327
  i0.ɵɵadvance(1);
328
328
  i0.ɵɵproperty("ngForOf", ctx.labels);
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%}"] }); }
329
+ } }, dependencies: [i2.NgForOf, i2.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.RequiredValidator, i3.FormControlDirective, i4$1.MatFormField, i4$1.MatError, i5$1.MatInput, i6.MatTab, i6.MatTabGroup, i1.TranslatePipe], styles: [".mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"] }); }
330
330
  }
331
331
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputMultipleLangueComponent, [{
332
332
  type: Component,
@@ -334,7 +334,7 @@ class CaucaInputMultipleLangueComponent {
334
334
  }], () => [{ type: i1$2.CaucaCoreService }, { type: i1$2.TranslateService }], { value: [{
335
335
  type: Input
336
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 }); })();
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);
@@ -483,7 +483,7 @@ class CaucaMenuVerticalComponent {
483
483
  i0.ɵɵtemplate(0, CaucaMenuVerticalComponent_h4_0_Template, 5, 5, "h4", 0);
484
484
  } if (rf & 2) {
485
485
  i0.ɵɵproperty("ngForOf", ctx.menuItems);
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}"] }); }
486
+ } }, dependencies: [i2.NgForOf, i2.NgIf, i3$1.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}"] }); }
487
487
  }
488
488
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMenuVerticalComponent, [{
489
489
  type: Component,
@@ -493,7 +493,7 @@ class CaucaMenuVerticalComponent {
493
493
  }], menuItems: [{
494
494
  type: Input
495
495
  }] }); })();
496
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMenuVerticalComponent, { className: "CaucaMenuVerticalComponent", filePath: "lib/cauca-menu-vertical/cauca-menu-vertical.component.ts", lineNumber: 10 }); })();
496
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMenuVerticalComponent, { className: "CaucaMenuVerticalComponent", filePath: "lib\\cauca-menu-vertical\\cauca-menu-vertical.component.ts", lineNumber: 10 }); })();
497
497
 
498
498
  function CaucaMenuSidebarComponent_div_12_Template(rf, ctx) { if (rf & 1) {
499
499
  const _r3 = i0.ɵɵgetCurrentView();
@@ -619,7 +619,7 @@ class CaucaMenuSidebarComponent {
619
619
  i0.ɵɵproperty("menuItems", ctx.menuItems);
620
620
  i0.ɵɵadvance(5);
621
621
  i0.ɵɵproperty("ngIf", ctx.version);
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}}"] }); }
622
+ } }, dependencies: [i2.NgIf, i4.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}}"] }); }
623
623
  }
624
624
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaMenuSidebarComponent, [{
625
625
  type: Component,
@@ -632,7 +632,7 @@ class CaucaMenuSidebarComponent {
632
632
  type: HostListener,
633
633
  args: ['window:resize', ['$event']]
634
634
  }] }); })();
635
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMenuSidebarComponent, { className: "CaucaMenuSidebarComponent", filePath: "lib/cauca-menu-sidebar/cauca-menu-sidebar.component.ts", lineNumber: 9 }); })();
635
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaMenuSidebarComponent, { className: "CaucaMenuSidebarComponent", filePath: "lib\\cauca-menu-sidebar\\cauca-menu-sidebar.component.ts", lineNumber: 9 }); })();
636
636
 
637
637
  const _c0 = ["container"];
638
638
  function CaucaSlideshowComponent_div_2_Template(rf, ctx) { if (rf & 1) {
@@ -768,7 +768,7 @@ class CaucaSlideshowComponent {
768
768
  }], images: [{
769
769
  type: Input
770
770
  }] }); })();
771
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSlideshowComponent, { className: "CaucaSlideshowComponent", filePath: "lib/cauca-slideshow/cauca-slideshow.component.ts", lineNumber: 33 }); })();
771
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSlideshowComponent, { className: "CaucaSlideshowComponent", filePath: "lib\\cauca-slideshow\\cauca-slideshow.component.ts", lineNumber: 33 }); })();
772
772
 
773
773
  class CaucaMaterialModule {
774
774
  static { this.ɵfac = function CaucaMaterialModule_Factory(t) { return new (t || CaucaMaterialModule)(); }; }
@@ -846,47 +846,47 @@ class CaucaMaterialModule {
846
846
  CaucaSlideshowComponent] }); })();
847
847
 
848
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)); });
849
+ const _r12 = i0.ɵɵgetCurrentView();
850
+ i0.ɵɵelementStart(0, "mat-list-item", 12);
851
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_For_7_Template_mat_list_item_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r12); const hour_r6 = restoredCtx.$implicit; const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.hourChanged(hour_r6)); });
852
852
  i0.ɵɵtext(1);
853
853
  i0.ɵɵelementEnd();
854
854
  } if (rf & 2) {
855
- const hour_r3 = ctx.$implicit;
855
+ const hour_r6 = ctx.$implicit;
856
856
  const ctx_r0 = i0.ɵɵnextContext();
857
- i0.ɵɵproperty("activated", ctx_r0.selectedHour === hour_r3)("disabled", ctx_r0.disabled.someHours.includes(hour_r3));
857
+ i0.ɵɵproperty("activated", ctx_r0.selectedHour === hour_r6)("disabled", ctx_r0.disabled.someHours.includes(hour_r6));
858
858
  i0.ɵɵadvance(1);
859
- i0.ɵɵtextInterpolate((hour_r3 < 10 ? "0" : "") + hour_r3);
859
+ i0.ɵɵtextInterpolate((hour_r6 < 10 ? "0" : "") + hour_r6);
860
860
  } }
861
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)); });
862
+ const _r19 = i0.ɵɵgetCurrentView();
863
+ i0.ɵɵelementStart(0, "mat-list-item", 12);
864
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_For_11_Template_mat_list_item_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r19); const minute_r13 = restoredCtx.$implicit; const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.minuteChanged(minute_r13)); });
865
865
  i0.ɵɵtext(1);
866
866
  i0.ɵɵelementEnd();
867
867
  } if (rf & 2) {
868
- const minute_r10 = ctx.$implicit;
868
+ const minute_r13 = ctx.$implicit;
869
869
  const ctx_r1 = i0.ɵɵnextContext();
870
- i0.ɵɵproperty("activated", ctx_r1.selectedMinute === minute_r10)("disabled", ctx_r1.disabled.someMinutes.includes(minute_r10));
870
+ i0.ɵɵproperty("activated", ctx_r1.selectedMinute === minute_r13)("disabled", ctx_r1.disabled.someMinutes.includes(minute_r13));
871
871
  i0.ɵɵadvance(1);
872
- i0.ɵɵtextInterpolate((minute_r10 < 10 ? "0" : "") + minute_r10);
872
+ i0.ɵɵtextInterpolate((minute_r13 < 10 ? "0" : "") + minute_r13);
873
873
  } }
874
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)); });
875
+ const _r27 = i0.ɵɵgetCurrentView();
876
+ i0.ɵɵelementStart(0, "mat-list-item", 12);
877
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_div_12_For_3_Template_mat_list_item_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r27); const second_r21 = restoredCtx.$implicit; const ctx_r26 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r26.secondChanged(second_r21)); });
878
878
  i0.ɵɵtext(1);
879
879
  i0.ɵɵelementEnd();
880
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));
881
+ const second_r21 = ctx.$implicit;
882
+ const ctx_r20 = i0.ɵɵnextContext(2);
883
+ i0.ɵɵproperty("activated", ctx_r20.selectedSecond === second_r21)("disabled", ctx_r20.disabled.someSeconds.includes(second_r21));
884
884
  i0.ɵɵadvance(1);
885
- i0.ɵɵtextInterpolate((second_r18 < 10 ? "0" : "") + second_r18);
885
+ i0.ɵɵtextInterpolate((second_r21 < 10 ? "0" : "") + second_r21);
886
886
  } }
887
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);
888
+ i0.ɵɵelementStart(0, "div", 13)(1, "mat-list", 4);
889
+ i0.ɵɵrepeaterCreate(2, DialogDateTimePickerComponent_div_12_For_3_Template, 2, 3, "mat-list-item", 14, i0.ɵɵrepeaterTrackByIdentity);
890
890
  i0.ɵɵelementEnd()();
891
891
  } if (rf & 2) {
892
892
  const ctx_r2 = i0.ɵɵnextContext();
@@ -895,6 +895,36 @@ function DialogDateTimePickerComponent_div_12_Template(rf, ctx) { if (rf & 1) {
895
895
  i0.ɵɵadvance(1);
896
896
  i0.ɵɵrepeater(ctx_r2.seconds);
897
897
  } }
898
+ function DialogDateTimePickerComponent_button_14_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
899
+ i0.ɵɵelementStart(0, "mat-icon");
900
+ i0.ɵɵtext(1, "clear");
901
+ i0.ɵɵelementEnd();
902
+ } }
903
+ function DialogDateTimePickerComponent_button_14_Template(rf, ctx) { if (rf & 1) {
904
+ const _r30 = i0.ɵɵgetCurrentView();
905
+ i0.ɵɵelementStart(0, "button", 9);
906
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_button_14_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r30); const ctx_r29 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r29.clear()); });
907
+ i0.ɵɵtemplate(1, DialogDateTimePickerComponent_button_14_mat_icon_1_Template, 2, 0, "mat-icon", 10);
908
+ i0.ɵɵtext(2);
909
+ i0.ɵɵpipe(3, "translate");
910
+ i0.ɵɵelementEnd();
911
+ } if (rf & 2) {
912
+ const ctx_r3 = i0.ɵɵnextContext();
913
+ i0.ɵɵadvance(1);
914
+ i0.ɵɵproperty("ngIf", ctx_r3.showButtonIcons);
915
+ i0.ɵɵadvance(1);
916
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "material.clear"), " ");
917
+ } }
918
+ function DialogDateTimePickerComponent_mat_icon_16_Template(rf, ctx) { if (rf & 1) {
919
+ i0.ɵɵelementStart(0, "mat-icon");
920
+ i0.ɵɵtext(1, "cancel");
921
+ i0.ɵɵelementEnd();
922
+ } }
923
+ function DialogDateTimePickerComponent_mat_icon_20_Template(rf, ctx) { if (rf & 1) {
924
+ i0.ɵɵelementStart(0, "mat-icon");
925
+ i0.ɵɵtext(1, "check");
926
+ i0.ɵɵelementEnd();
927
+ } }
898
928
  class DialogDateTimePickerComponent {
899
929
  constructor(dialogRef, options) {
900
930
  this.dialogRef = dialogRef;
@@ -902,11 +932,13 @@ class DialogDateTimePickerComponent {
902
932
  this.selectedHour = 0;
903
933
  this.selectedMinute = 0;
904
934
  this.selectedSecond = 0;
905
- this.initialDate = new Date();
935
+ this.initialDate = null;
906
936
  this.selectedDate = null;
907
937
  this.minimumDate = new Date();
908
938
  this.maximumDate = new Date();
909
939
  this.showSeconds = false;
940
+ this.showClearButton = true;
941
+ this.showButtonIcons = true;
910
942
  this.hours = [...Array(24).keys()];
911
943
  this.minutes = [...Array(60).keys()];
912
944
  this.seconds = [...Array(60).keys()];
@@ -925,6 +957,8 @@ class DialogDateTimePickerComponent {
925
957
  };
926
958
  this.step = options.step || this.step;
927
959
  this.showSeconds = options.showSeconds;
960
+ this.showButtonIcons = options.showButtonIcons ?? this.showButtonIcons;
961
+ this.showClearButton = options.showClearButton ?? this.showClearButton;
928
962
  this.setListHoursMinutes();
929
963
  this.initialEachComponentValue(options);
930
964
  }
@@ -964,11 +998,20 @@ class DialogDateTimePickerComponent {
964
998
  this.selectedSecond = second;
965
999
  this.selectedDate.setSeconds(second);
966
1000
  }
1001
+ clear() {
1002
+ this.dialogRef.close({
1003
+ value: null
1004
+ });
1005
+ }
967
1006
  cancel() {
968
- this.dialogRef.close(null);
1007
+ this.dialogRef.close({
1008
+ value: this.initialDate
1009
+ });
969
1010
  }
970
1011
  confirm() {
971
- this.dialogRef.close(this.selectedDate);
1012
+ this.dialogRef.close({
1013
+ value: this.selectedDate
1014
+ });
972
1015
  }
973
1016
  hourOfSelectedDateIsDisabled(hour) {
974
1017
  if (this.selectedDateIsTheMinimumDate()) {
@@ -1003,9 +1046,10 @@ class DialogDateTimePickerComponent {
1003
1046
  return false;
1004
1047
  }
1005
1048
  initialEachComponentValue(options) {
1006
- this.initialDate = options.selectedDate ? new Date(options.selectedDate) : new Date();
1049
+ this.initialDate = options.selectedDate ? new Date(options.selectedDate) : null;
1007
1050
  this.minimumDate = options.minimumDate ? new Date(options.minimumDate) : null;
1008
1051
  this.maximumDate = options.maximumDate ? new Date(options.maximumDate) : null;
1052
+ this.selectedDate = options.selectedDate ? new Date(options.selectedDate) : new Date();
1009
1053
  this.dateChanged(options.selectedDate ? new Date(options.selectedDate) : null);
1010
1054
  this.hourChanged(options.selectedDate ? new Date(options.selectedDate).getHours() : 0);
1011
1055
  this.minuteChanged(options.selectedDate ? new Date(options.selectedDate).getMinutes() : 0);
@@ -1029,28 +1073,32 @@ class DialogDateTimePickerComponent {
1029
1073
  this.seconds = this.seconds.filter(seconde => seconde % this.step.seconds === 0);
1030
1074
  }
1031
1075
  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) {
1076
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DialogDateTimePickerComponent, selectors: [["cauca-dialog-date-time-picker"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 23, vars: 15, 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-stroked-button", "", 3, "click", 4, "ngIf"], ["mat-stroked-button", "", 3, "click"], [4, "ngIf"], ["color", "primary", "mat-raised-button", "", "cdkFocusInitial", "", 3, "click"], [3, "activated", "disabled", "click"], [1, "seconds"], [3, "activated", "disabled"]], template: function DialogDateTimePickerComponent_Template(rf, ctx) { if (rf & 1) {
1033
1077
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div")(3, "mat-calendar", 2);
1034
1078
  i0.ɵɵlistener("selectedChange", function DialogDateTimePickerComponent_Template_mat_calendar_selectedChange_3_listener($event) { return ctx.dateChanged($event); });
1035
1079
  i0.ɵɵelementEnd()();
1036
1080
  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);
1081
+ i0.ɵɵrepeaterCreate(6, DialogDateTimePickerComponent_For_7_Template, 2, 3, "mat-list-item", 14, i0.ɵɵrepeaterTrackByIdentity);
1038
1082
  i0.ɵɵelementEnd()();
1039
1083
  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);
1084
+ i0.ɵɵrepeaterCreate(10, DialogDateTimePickerComponent_For_11_Template, 2, 3, "mat-list-item", 14, i0.ɵɵrepeaterTrackByIdentity);
1041
1085
  i0.ɵɵelementEnd()();
1042
1086
  i0.ɵɵtemplate(12, DialogDateTimePickerComponent_div_12_Template, 4, 1, "div", 6);
1043
1087
  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");
1088
+ i0.ɵɵelementStart(13, "div", 7);
1089
+ i0.ɵɵtemplate(14, DialogDateTimePickerComponent_button_14_Template, 4, 4, "button", 8);
1090
+ i0.ɵɵelementStart(15, "button", 9);
1091
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_Template_button_click_15_listener() { return ctx.cancel(); });
1092
+ i0.ɵɵtemplate(16, DialogDateTimePickerComponent_mat_icon_16_Template, 2, 0, "mat-icon", 10);
1093
+ i0.ɵɵtext(17);
1094
+ i0.ɵɵpipe(18, "translate");
1095
+ i0.ɵɵelementEnd();
1096
+ i0.ɵɵelementStart(19, "button", 11);
1097
+ i0.ɵɵlistener("click", function DialogDateTimePickerComponent_Template_button_click_19_listener() { return ctx.confirm(); });
1098
+ i0.ɵɵtemplate(20, DialogDateTimePickerComponent_mat_icon_20_Template, 2, 0, "mat-icon", 10);
1099
+ i0.ɵɵtext(21);
1100
+ i0.ɵɵpipe(22, "translate");
1048
1101
  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
1102
  } if (rf & 2) {
1055
1103
  i0.ɵɵadvance(3);
1056
1104
  i0.ɵɵproperty("minDate", ctx.minimumDate)("maxDate", ctx.maximumDate)("selected", ctx.selectedDate);
@@ -1064,8 +1112,17 @@ class DialogDateTimePickerComponent {
1064
1112
  i0.ɵɵrepeater(ctx.minutes);
1065
1113
  i0.ɵɵadvance(2);
1066
1114
  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)}"] }); }
1115
+ i0.ɵɵadvance(2);
1116
+ i0.ɵɵproperty("ngIf", ctx.showClearButton);
1117
+ i0.ɵɵadvance(2);
1118
+ i0.ɵɵproperty("ngIf", ctx.showButtonIcons);
1119
+ i0.ɵɵadvance(1);
1120
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(18, 11, "material.cancel"), " ");
1121
+ i0.ɵɵadvance(3);
1122
+ i0.ɵɵproperty("ngIf", ctx.showButtonIcons);
1123
+ i0.ɵɵadvance(1);
1124
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(22, 13, "material.ok"), " ");
1125
+ } }, dependencies: [CommonModule, i2.NgIf, CaucaCoreForChildModule, i1.TranslatePipe, MatButtonModule, i4.MatButton, MatDatepickerModule, i5$2.MatCalendar, MatIconModule, i5.MatIcon, MatListModule, i7.MatList, i7.MatListItem, MatNativeDateModule], styles: ["div[mat-dialog-actions][_ngcontent-%COMP%]{padding:8px;border-top:1px solid #ccc}div[mat-dialog-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:2px}.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
1126
  }
1070
1127
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DialogDateTimePickerComponent, [{
1071
1128
  type: Component,
@@ -1077,15 +1134,16 @@ class DialogDateTimePickerComponent {
1077
1134
  MatIconModule,
1078
1135
  MatListModule,
1079
1136
  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"] }]
1137
+ ], 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\n<div mat-dialog-actions align=\"end\">\n <button mat-stroked-button (click)=\"clear()\" *ngIf=\"showClearButton\">\n <mat-icon *ngIf=\"showButtonIcons\">clear</mat-icon>\n {{'material.clear' | translate}}\n </button>\n <button mat-stroked-button (click)=\"cancel()\">\n <mat-icon *ngIf=\"showButtonIcons\">cancel</mat-icon>\n {{'material.cancel' | translate}}\n </button>\n <button color=\"primary\" mat-raised-button cdkFocusInitial (click)=\"confirm()\">\n <mat-icon *ngIf=\"showButtonIcons\">check</mat-icon>\n {{'material.ok' | translate}}\n </button>\n</div>", styles: ["div[mat-dialog-actions]{padding:8px;border-top:1px solid #ccc}div[mat-dialog-actions] button{margin:2px}.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
1138
  }], () => [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
1082
1139
  type: Inject,
1083
1140
  args: [MAT_DIALOG_DATA]
1084
1141
  }] }], 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 }); })();
1142
+ (() => { (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
1143
 
1087
1144
  class CaucaDateTimePickerComponent {
1088
- constructor(dialog, datePipe) {
1145
+ constructor(elementRef, dialog, datePipe) {
1146
+ this.elementRef = elementRef;
1089
1147
  this.dialog = dialog;
1090
1148
  this.datePipe = datePipe;
1091
1149
  this.stepHours = 1;
@@ -1095,6 +1153,8 @@ class CaucaDateTimePickerComponent {
1095
1153
  this.maximumDate = null;
1096
1154
  this.showSeconds = false;
1097
1155
  this.showFormat = 'yyyy/MM/dd, HH:mm';
1156
+ this.showClearButton = true;
1157
+ this.showButtonIcons = true;
1098
1158
  this.selectedChange = new EventEmitter();
1099
1159
  this.stringDate = '';
1100
1160
  }
@@ -1105,36 +1165,55 @@ class CaucaDateTimePickerComponent {
1105
1165
  }
1106
1166
  }
1107
1167
  showDialog() {
1108
- const options = {
1168
+ const dialogRef = this.dialog.open(DialogDateTimePickerComponent, {
1169
+ position: this.getDialogPosition(),
1170
+ data: this.getDateTimePickerOptions(),
1171
+ });
1172
+ dialogRef.afterClosed().subscribe((data) => {
1173
+ if (data) {
1174
+ this.stringDate = this.stringifyDate(data.value);
1175
+ this.selectedDate = data.value;
1176
+ this.selectedChange.emit(data.value);
1177
+ }
1178
+ });
1179
+ }
1180
+ getDateTimePickerOptions() {
1181
+ return {
1109
1182
  selectedDate: this.selectedDate,
1110
1183
  minimumDate: this.minimumDate,
1111
1184
  maximumDate: this.maximumDate,
1112
1185
  showSeconds: this.showSeconds,
1186
+ showClearButton: this.showClearButton,
1187
+ showButtonIcons: this.showButtonIcons,
1113
1188
  step: {
1114
1189
  hours: this.stepHours,
1115
1190
  minutes: this.stepMinutes,
1116
1191
  seconds: this.stepSecondes,
1117
1192
  }
1118
1193
  };
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
1194
  }
1128
1195
  stringifyDate(date) {
1129
1196
  return this.datePipe.transform(date, this.showFormat);
1130
1197
  }
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([
1198
+ getDialogPosition() {
1199
+ const rect = this.elementRef.nativeElement.getBoundingClientRect();
1200
+ const top = rect.y + rect.height - 22;
1201
+ const bottom = window.innerHeight - rect.y;
1202
+ return window.innerHeight > (top + 350) ? {
1203
+ left: `${rect.x}px`,
1204
+ top: `${top}px`,
1205
+ } : {
1206
+ left: `${rect.x}px`,
1207
+ bottom: `${bottom}px`,
1208
+ };
1209
+ }
1210
+ static { this.ɵfac = function CaucaDateTimePickerComponent_Factory(t) { return new (t || CaucaDateTimePickerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.MatDialog), i0.ɵɵdirectiveInject(i2.DatePipe)); }; }
1211
+ 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", showClearButton: "showClearButton", showButtonIcons: "showButtonIcons", value: "value" }, outputs: { selectedChange: "selectedChange" }, standalone: true, features: [i0.ɵɵProvidersFeature([
1133
1212
  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);
1213
+ ]), i0.ɵɵStandaloneFeature], decls: 5, vars: 1, consts: [["matInput", "", "readonly", "readonly", 3, "value"], ["matSuffix", "", "mat-icon-button", "", 3, "click"]], template: function CaucaDateTimePickerComponent_Template(rf, ctx) { if (rf & 1) {
1214
+ i0.ɵɵelementStart(0, "mat-form-field");
1215
+ i0.ɵɵelement(1, "input", 0);
1216
+ i0.ɵɵelementStart(2, "button", 1);
1138
1217
  i0.ɵɵlistener("click", function CaucaDateTimePickerComponent_Template_button_click_2_listener() { return ctx.showDialog(); });
1139
1218
  i0.ɵɵelementStart(3, "mat-icon");
1140
1219
  i0.ɵɵtext(4, "calendar_month");
@@ -1142,7 +1221,7 @@ class CaucaDateTimePickerComponent {
1142
1221
  } if (rf & 2) {
1143
1222
  i0.ɵɵadvance(1);
1144
1223
  i0.ɵɵproperty("value", ctx.stringDate);
1145
- } }, dependencies: [MatButtonModule, i3.MatIconButton, MatIconModule, i5.MatIcon, MatInputModule, i5$1.MatInput, i4.MatFormField, i4.MatSuffix] }); }
1224
+ } }, dependencies: [MatButtonModule, i4.MatIconButton, MatIconModule, i5.MatIcon, MatInputModule, i5$1.MatInput, i4$1.MatFormField, i4$1.MatSuffix], styles: ["[_nghost-%COMP%]{display:block}mat-form-field[_ngcontent-%COMP%]{width:100%}"] }); }
1146
1225
  }
1147
1226
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaDateTimePickerComponent, [{
1148
1227
  type: Component,
@@ -1152,8 +1231,8 @@ class CaucaDateTimePickerComponent {
1152
1231
  MatInputModule,
1153
1232
  ], providers: [
1154
1233
  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: [{
1234
+ ], template: "<mat-form-field>\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>", styles: [":host{display:block}mat-form-field{width:100%}\n"] }]
1235
+ }], () => [{ type: i0.ElementRef }, { type: i1$1.MatDialog }, { type: i2.DatePipe }], { stepHours: [{
1157
1236
  type: Input
1158
1237
  }], stepMinutes: [{
1159
1238
  type: Input
@@ -1167,12 +1246,16 @@ class CaucaDateTimePickerComponent {
1167
1246
  type: Input
1168
1247
  }], showFormat: [{
1169
1248
  type: Input
1249
+ }], showClearButton: [{
1250
+ type: Input
1251
+ }], showButtonIcons: [{
1252
+ type: Input
1170
1253
  }], selectedChange: [{
1171
1254
  type: Output
1172
1255
  }], value: [{
1173
1256
  type: Input
1174
1257
  }] }); })();
1175
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaDateTimePickerComponent, { className: "CaucaDateTimePickerComponent", filePath: "lib/cauca-date-time-picker/cauca-date-time-picker.component.ts", lineNumber: 24 }); })();
1258
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaDateTimePickerComponent, { className: "CaucaDateTimePickerComponent", filePath: "lib\\cauca-date-time-picker\\cauca-date-time-picker.component.ts", lineNumber: 24 }); })();
1176
1259
 
1177
1260
  class MenuItem {
1178
1261
  constructor(label, path, icon = '') {