@cauca-911/material 18.0.1-beta1 → 18.0.1-beta2

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.
@@ -4,7 +4,8 @@ import { CaucaMenuSidebarComponent } from './cauca-menu-sidebar/cauca-menu-sideb
4
4
  import { CaucaMenuVerticalComponent } from './cauca-menu-vertical/cauca-menu-vertical.component';
5
5
  import { CaucaSimpleDialogComponent } from './cauca-simple-dialog/cauca-simple-dialog.component';
6
6
  import { CaucaSlideshowComponent } from './cauca-slideshow/cauca-slideshow.component';
7
- import { CaucaInputFileComponent, CaucaInputMultipleLangueComponent } from '../public-api';
7
+ import { CaucaInputFileComponent } from './inputs/cauca-input-file/cauca-input-file.component';
8
+ import { CaucaInputMultipleLangueComponent } from './inputs/cauca-input-multiple-langue/cauca-input-multiple-langue.component';
8
9
  import * as i0 from "@angular/core";
9
10
  export class CaucaMaterialModule {
10
11
  static { this.ɵfac = function CaucaMaterialModule_Factory(t) { return new (t || CaucaMaterialModule)(); }; }
@@ -52,4 +53,4 @@ export class CaucaMaterialModule {
52
53
  CaucaMenuVerticalComponent,
53
54
  CaucaSimpleDialogComponent,
54
55
  CaucaSlideshowComponent] }); })();
55
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F1Y2EtbWF0ZXJpYWwubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2F1Y2EtbWF0ZXJpYWwvc3JjL2xpYi9jYXVjYS1tYXRlcmlhbC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUNwRSxPQUFPLEVBQUUseUJBQXlCLEVBQU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bENvbXBvbmVudCxcbiAgICBDYXVjYUlucHV0TXVsdGlwbGVMYW5ndWVDb21wb25lbnQsXG4gICAgQ2F1Y2FNZW51U2lkZWJhckNvbXBvbmVudCxcbiAgICBDYXVjYU1lbnVWZXJ0aWNhbENvbXBvbmVudCxcbiAgICBDYXVjYVNpbXBsZURpYWxvZ0NvbXBvbmVudCxcbiAgICBDYXVjYVNsaWRlc2hvd0NvbXBvbmVudCxcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIENhdWNhTWF0ZXJpYWxDb21wb25lbnQsXG4gICAgQ2F1Y2FJbnB1dEZpbGVDb21wb25lbnQsXG4gICAgQ2F1Y2FJbnB1dE11bHRpcGxlTGFuZ3VlQ29tcG9uZW50LFxuICAgIENhdWNhTWVudVNpZGViYXJDb21wb25lbnQsXG4gICAgQ2F1Y2FNZW51VmVydGljYWxDb21wb25lbnQsXG4gICAgQ2F1Y2FTaW1wbGVEaWFsb2dDb21wb25lbnQsXG4gICAgQ2F1Y2FTbGlkZXNob3dDb21wb25lbnQsXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIENhdWNhTWF0ZXJpYWxNb2R1bGUgeyB9XG4iXX0=
@@ -8,12 +8,12 @@ import * as i1 from '@angular/router';
8
8
  import { NavigationEnd, Router, RouterModule } from '@angular/router';
9
9
  import * as i2$1 from '@fortawesome/angular-fontawesome';
10
10
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
11
- import * as i1$3 from '@angular/common';
11
+ import * as i1$4 from '@angular/common';
12
12
  import { NgFor, NgIf, NgClass, CommonModule, NgForOf, AsyncPipe, DatePipe } from '@angular/common';
13
13
  import * as i1$2 from '@angular/material/dialog';
14
14
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
15
15
  import { trigger, state, style, transition, animate, AUTO_STYLE } from '@angular/animations';
16
- import * as i1$4 from '@cauca-911/core';
16
+ import * as i1$3 from '@cauca-911/core';
17
17
  import * as i5 from '@angular/forms';
18
18
  import { UntypedFormControl, Validators, ReactiveFormsModule, FormControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
19
19
  import * as i2$3 from '@angular/material/form-field';
@@ -577,6 +577,231 @@ class CaucaSlideshowComponent {
577
577
  }] }); })();
578
578
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaSlideshowComponent, { className: "CaucaSlideshowComponent", filePath: "lib\\cauca-slideshow\\cauca-slideshow.component.ts", lineNumber: 36 }); })();
579
579
 
580
+ const _c0$5 = ["file"];
581
+ function CaucaInputFileComponent_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
582
+ i0.ɵɵelementStart(0, "mat-icon");
583
+ i0.ɵɵtext(1);
584
+ i0.ɵɵelementEnd();
585
+ } if (rf & 2) {
586
+ const ctx_r1 = i0.ɵɵnextContext();
587
+ i0.ɵɵadvance();
588
+ i0.ɵɵtextInterpolate(ctx_r1.icon);
589
+ } }
590
+ function CaucaInputFileComponent_span_2_Template(rf, ctx) { if (rf & 1) {
591
+ i0.ɵɵelementStart(0, "span");
592
+ i0.ɵɵtext(1);
593
+ i0.ɵɵelementEnd();
594
+ } if (rf & 2) {
595
+ const ctx_r1 = i0.ɵɵnextContext();
596
+ i0.ɵɵadvance();
597
+ i0.ɵɵtextInterpolate(ctx_r1.text);
598
+ } }
599
+ function CaucaInputFileComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
600
+ const _r3 = i0.ɵɵgetCurrentView();
601
+ i0.ɵɵelementContainerStart(0);
602
+ i0.ɵɵelementStart(1, "input", 5, 1);
603
+ i0.ɵɵlistener("change", function CaucaInputFileComponent_ng_container_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectFile($event)); });
604
+ i0.ɵɵelementEnd();
605
+ i0.ɵɵelementContainerEnd();
606
+ } if (rf & 2) {
607
+ const ctx_r1 = i0.ɵɵnextContext();
608
+ i0.ɵɵadvance();
609
+ i0.ɵɵproperty("accept", ctx_r1.accept);
610
+ } }
611
+ function CaucaInputFileComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
612
+ const _r4 = i0.ɵɵgetCurrentView();
613
+ i0.ɵɵelementStart(0, "input", 6, 1);
614
+ i0.ɵɵlistener("change", function CaucaInputFileComponent_ng_template_4_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectFile($event)); });
615
+ i0.ɵɵelementEnd();
616
+ } if (rf & 2) {
617
+ const ctx_r1 = i0.ɵɵnextContext();
618
+ i0.ɵɵproperty("accept", ctx_r1.accept);
619
+ } }
620
+ class CaucaInputFileComponent {
621
+ constructor(translateService, dialog) {
622
+ this.translateService = translateService;
623
+ this.dialog = dialog;
624
+ this.readend = new EventEmitter();
625
+ this.accept = '';
626
+ this.multiple = false;
627
+ this.icon = '';
628
+ this.text = '';
629
+ this.labels = {};
630
+ }
631
+ ngOnInit() {
632
+ if (!this.icon && !this.text) {
633
+ this.translateService.get(['material.select', 'material.dialogTitle', 'material.dialogMessage']).subscribe((labels) => {
634
+ this.labels = labels;
635
+ this.text = labels['material.select'];
636
+ });
637
+ }
638
+ }
639
+ onSelectFile(e) {
640
+ for (let i = 0, j = e.target.files.length; i < j; i++) {
641
+ const file = e.target.files[i];
642
+ const reader = new FileReader();
643
+ reader.onerror = ((error) => this.onError(error));
644
+ reader.onload = ((event) => this.onReadEnd(file, event));
645
+ reader.readAsDataURL(file);
646
+ }
647
+ if (e.target.files.length) {
648
+ this.dialog.open(CaucaSimpleDialogComponent, {
649
+ width: '250px',
650
+ disableClose: true,
651
+ data: {
652
+ title: this.labels['material.dialogTitle'],
653
+ message: this.labels['material.dialogMessage']
654
+ }
655
+ });
656
+ }
657
+ }
658
+ openDialog(event) {
659
+ if (this.file) {
660
+ this.file.nativeElement.click();
661
+ }
662
+ event.stopPropagation();
663
+ }
664
+ onError(error) {
665
+ throw error;
666
+ }
667
+ onReadEnd(file, e) {
668
+ this.dialog.closeAll();
669
+ this.readend.emit({
670
+ name: file.name,
671
+ size: file.size,
672
+ type: file.type,
673
+ lastModifiedDate: file.lastModifiedDate,
674
+ content: e.target['result'],
675
+ file,
676
+ });
677
+ }
678
+ static { this.ɵfac = function CaucaInputFileComponent_Factory(t) { return new (t || CaucaInputFileComponent)(i0.ɵɵdirectiveInject(i1$3.TranslateService), i0.ɵɵdirectiveInject(i1$2.MatDialog)); }; }
679
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaInputFileComponent, selectors: [["cauca-input-file"]], viewQuery: function CaucaInputFileComponent_Query(rf, ctx) { if (rf & 1) {
680
+ i0.ɵɵviewQuery(_c0$5, 5);
681
+ } if (rf & 2) {
682
+ let _t;
683
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.file = _t.first);
684
+ } }, inputs: { accept: "accept", multiple: "multiple", icon: "icon", text: "text" }, outputs: { readend: "readend" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 6, vars: 4, consts: [["notMultipleInput", ""], ["file", ""], ["mat-raised-button", "", 3, "click"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["type", "file", "multiple", "multiple", 3, "change", "accept"], ["type", "file", 3, "change", "accept"]], template: function CaucaInputFileComponent_Template(rf, ctx) { if (rf & 1) {
685
+ const _r1 = i0.ɵɵgetCurrentView();
686
+ i0.ɵɵelementStart(0, "button", 2);
687
+ i0.ɵɵlistener("click", function CaucaInputFileComponent_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openDialog($event)); });
688
+ i0.ɵɵtemplate(1, CaucaInputFileComponent_mat_icon_1_Template, 2, 1, "mat-icon", 3)(2, CaucaInputFileComponent_span_2_Template, 2, 1, "span", 3);
689
+ i0.ɵɵelementEnd();
690
+ i0.ɵɵtemplate(3, CaucaInputFileComponent_ng_container_3_Template, 3, 1, "ng-container", 4)(4, CaucaInputFileComponent_ng_template_4_Template, 2, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
691
+ } if (rf & 2) {
692
+ const notMultipleInput_r5 = i0.ɵɵreference(5);
693
+ i0.ɵɵadvance();
694
+ i0.ɵɵproperty("ngIf", ctx.icon);
695
+ i0.ɵɵadvance();
696
+ i0.ɵɵproperty("ngIf", ctx.text);
697
+ i0.ɵɵadvance();
698
+ i0.ɵɵproperty("ngIf", ctx.multiple)("ngIfElse", notMultipleInput_r5);
699
+ } }, dependencies: [MatIconModule, i1$1.MatIcon], styles: ["[_nghost-%COMP%] input[_ngcontent-%COMP%]{display:none}"] }); }
700
+ }
701
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputFileComponent, [{
702
+ type: Component,
703
+ args: [{ standalone: true, imports: [MatIconModule], 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"] }]
704
+ }], () => [{ type: i1$3.TranslateService }, { type: i1$2.MatDialog }], { file: [{
705
+ type: ViewChild,
706
+ args: ['file', { static: false }]
707
+ }], readend: [{
708
+ type: Output
709
+ }], accept: [{
710
+ type: Input
711
+ }], multiple: [{
712
+ type: Input
713
+ }], icon: [{
714
+ type: Input
715
+ }], text: [{
716
+ type: Input
717
+ }] }); })();
718
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputFileComponent, { className: "CaucaInputFileComponent", filePath: "lib\\inputs\\cauca-input-file\\cauca-input-file.component.ts", lineNumber: 14 }); })();
719
+
720
+ function CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template(rf, ctx) { if (rf & 1) {
721
+ i0.ɵɵelementStart(0, "mat-error");
722
+ i0.ɵɵtext(1);
723
+ i0.ɵɵpipe(2, "translate");
724
+ i0.ɵɵelementEnd();
725
+ } if (rf & 2) {
726
+ const i_r1 = i0.ɵɵnextContext().index;
727
+ const ctx_r1 = i0.ɵɵnextContext();
728
+ i0.ɵɵadvance();
729
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r1.getErrorMessage(i_r1)));
730
+ } }
731
+ function CaucaInputMultipleLangueComponent_mat_tab_1_Template(rf, ctx) { if (rf & 1) {
732
+ i0.ɵɵelementStart(0, "mat-tab", 2)(1, "mat-form-field", 3);
733
+ i0.ɵɵelement(2, "input", 4);
734
+ i0.ɵɵtemplate(3, CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template, 3, 3, "mat-error", 5);
735
+ i0.ɵɵelementEnd()();
736
+ } if (rf & 2) {
737
+ const lang_r3 = ctx.$implicit;
738
+ const i_r1 = ctx.index;
739
+ const ctx_r1 = i0.ɵɵnextContext();
740
+ i0.ɵɵproperty("label", lang_r3);
741
+ i0.ɵɵadvance(2);
742
+ i0.ɵɵproperty("placeholder", lang_r3)("formControl", ctx_r1.forms[i_r1]);
743
+ i0.ɵɵadvance();
744
+ i0.ɵɵproperty("ngIf", ctx_r1.forms[i_r1].invalid);
745
+ } }
746
+ class CaucaInputMultipleLangueComponent {
747
+ constructor(coreService, translate) {
748
+ this.translate = translate;
749
+ this.value = [];
750
+ this.forms = [];
751
+ this.labels = [];
752
+ this.selectedIndex = 0;
753
+ this.config = coreService.getConfig();
754
+ }
755
+ ngOnInit() {
756
+ this.translate.get(this.config.languages).subscribe((labels) => {
757
+ for (const i in labels) {
758
+ if (labels[i]) {
759
+ this.labels.push(labels[i]);
760
+ }
761
+ }
762
+ this.initializeForms();
763
+ });
764
+ }
765
+ onTagChanged(tabIndex) {
766
+ console.log('cauca-material, onTabChanged', tabIndex);
767
+ }
768
+ getErrorMessage(index) {
769
+ return this.forms[index].hasError('required') ? 'error.required' : '';
770
+ }
771
+ initializeForms() {
772
+ this.labels.forEach((item, index) => {
773
+ this.forms[index] = new UntypedFormControl('', [Validators.required]);
774
+ this.forms[index].setValue(this.value[index] || '');
775
+ });
776
+ }
777
+ static { this.ɵfac = function CaucaInputMultipleLangueComponent_Factory(t) { return new (t || CaucaInputMultipleLangueComponent)(i0.ɵɵdirectiveInject(i1$3.CaucaCoreService), i0.ɵɵdirectiveInject(i1$3.TranslateService)); }; }
778
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaInputMultipleLangueComponent, selectors: [["cauca-input-multiple-langue"]], inputs: { value: "value" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 2, vars: 2, consts: [[3, "selectedIndexChange", "selectedIndex"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label"], ["hideRequiredMarker", "never"], ["matInput", "", "required", "required", 3, "placeholder", "formControl"], [4, "ngIf"]], template: function CaucaInputMultipleLangueComponent_Template(rf, ctx) { if (rf & 1) {
779
+ i0.ɵɵelementStart(0, "mat-tab-group", 0);
780
+ i0.ɵɵlistener("selectedIndexChange", function CaucaInputMultipleLangueComponent_Template_mat_tab_group_selectedIndexChange_0_listener($event) { return ctx.onTagChanged($event); });
781
+ i0.ɵɵtemplate(1, CaucaInputMultipleLangueComponent_mat_tab_1_Template, 4, 4, "mat-tab", 1);
782
+ i0.ɵɵelementEnd();
783
+ } if (rf & 2) {
784
+ i0.ɵɵproperty("selectedIndex", ctx.selectedIndex);
785
+ i0.ɵɵadvance();
786
+ i0.ɵɵproperty("ngForOf", ctx.labels);
787
+ } }, dependencies: [MatTabsModule, i2$2.MatTab, i2$2.MatTabGroup, MatFormFieldModule, i2$3.MatFormField, i2$3.MatError, MatInputModule, i4.MatInput, NgIf,
788
+ ReactiveFormsModule, i5.DefaultValueAccessor, i5.NgControlStatus, i5.RequiredValidator, i5.FormControlDirective, TranslateModule, i2.TranslatePipe], styles: [".mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"] }); }
789
+ }
790
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputMultipleLangueComponent, [{
791
+ type: Component,
792
+ args: [{ standalone: true, imports: [
793
+ MatTabsModule,
794
+ MatFormFieldModule,
795
+ MatInputModule,
796
+ NgIf,
797
+ ReactiveFormsModule,
798
+ TranslateModule
799
+ ], 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"] }]
800
+ }], () => [{ type: i1$3.CaucaCoreService }, { type: i1$3.TranslateService }], { value: [{
801
+ type: Input
802
+ }] }); })();
803
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputMultipleLangueComponent, { className: "CaucaInputMultipleLangueComponent", filePath: "lib\\inputs\\cauca-input-multiple-langue\\cauca-input-multiple-langue.component.ts", lineNumber: 24 }); })();
804
+
580
805
  class CaucaMaterialModule {
581
806
  static { this.ɵfac = function CaucaMaterialModule_Factory(t) { return new (t || CaucaMaterialModule)(); }; }
582
807
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CaucaMaterialModule }); }
@@ -970,7 +1195,7 @@ class MenuItemComponent extends BaseButtonWithLabel {
970
1195
  }], null, null); })();
971
1196
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MenuItemComponent, { className: "MenuItemComponent", filePath: "lib\\buttons\\menu-item\\menu-item.component.ts", lineNumber: 15 }); })();
972
1197
 
973
- const _c0$5 = ["*"];
1198
+ const _c0$4 = ["*"];
974
1199
  const DEFAULT_DURATION$1 = 500;
975
1200
  class ExpandablePanelComponent {
976
1201
  constructor() {
@@ -982,7 +1207,7 @@ class ExpandablePanelComponent {
982
1207
  this.isCollapsed.update(value => !value);
983
1208
  }
984
1209
  static { this.ɵfac = function ExpandablePanelComponent_Factory(t) { return new (t || ExpandablePanelComponent)(); }; }
985
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExpandablePanelComponent, selectors: [["app-expandable-panel"]], inputs: { isCollapsed: [1, "isCollapsed"], title: [1, "title"], subTitle: [1, "subTitle"] }, outputs: { isCollapsed: "isCollapsedChange" }, standalone: true, features: [i0.ɵɵStandaloneFeature], ngContentSelectors: _c0$5, decls: 11, vars: 4, consts: [[1, "expansion-button", 3, "click"], [1, "primary"], [1, "body2"], [1, "expansion-panel"]], template: function ExpandablePanelComponent_Template(rf, ctx) { if (rf & 1) {
1210
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExpandablePanelComponent, selectors: [["app-expandable-panel"]], inputs: { isCollapsed: [1, "isCollapsed"], title: [1, "title"], subTitle: [1, "subTitle"] }, outputs: { isCollapsed: "isCollapsedChange" }, standalone: true, features: [i0.ɵɵStandaloneFeature], ngContentSelectors: _c0$4, decls: 11, vars: 4, consts: [[1, "expansion-button", 3, "click"], [1, "primary"], [1, "body2"], [1, "expansion-panel"]], template: function ExpandablePanelComponent_Template(rf, ctx) { if (rf & 1) {
986
1211
  i0.ɵɵprojectionDef();
987
1212
  i0.ɵɵelementStart(0, "section")(1, "div", 0);
988
1213
  i0.ɵɵlistener("click", function ExpandablePanelComponent_Template_div_click_1_listener() { return ctx.changeState(); });
@@ -1292,7 +1517,7 @@ class PageTitleComponent {
1292
1517
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, ctx.title()));
1293
1518
  i0.ɵɵadvance(2);
1294
1519
  i0.ɵɵproperty("ngIf", ctx.showBreadcrumb);
1295
- } }, dependencies: [CommonModule, i1$3.NgForOf, i1$3.NgIf, TranslateModule, i2.TranslatePipe, RouterModule, i1.RouterLink], styles: [".title-section[_ngcontent-%COMP%]{display:flex;gap:8px;flex-direction:column;align-items:flex-start;align-self:stretch}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}h4[_ngcontent-%COMP%]{padding:0}"], changeDetection: 0 }); }
1520
+ } }, dependencies: [CommonModule, i1$4.NgForOf, i1$4.NgIf, TranslateModule, i2.TranslatePipe, RouterModule, i1.RouterLink], styles: [".title-section[_ngcontent-%COMP%]{display:flex;gap:8px;flex-direction:column;align-items:flex-start;align-self:stretch}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}h4[_ngcontent-%COMP%]{padding:0}"], changeDetection: 0 }); }
1296
1521
  }
1297
1522
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PageTitleComponent, [{
1298
1523
  type: Component,
@@ -1300,231 +1525,6 @@ class PageTitleComponent {
1300
1525
  }], null, null); })();
1301
1526
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PageTitleComponent, { className: "PageTitleComponent", filePath: "lib\\layout\\page-title\\page-title.component.ts", lineNumber: 14 }); })();
1302
1527
 
1303
- const _c0$4 = ["file"];
1304
- function CaucaInputFileComponent_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
1305
- i0.ɵɵelementStart(0, "mat-icon");
1306
- i0.ɵɵtext(1);
1307
- i0.ɵɵelementEnd();
1308
- } if (rf & 2) {
1309
- const ctx_r1 = i0.ɵɵnextContext();
1310
- i0.ɵɵadvance();
1311
- i0.ɵɵtextInterpolate(ctx_r1.icon);
1312
- } }
1313
- function CaucaInputFileComponent_span_2_Template(rf, ctx) { if (rf & 1) {
1314
- i0.ɵɵelementStart(0, "span");
1315
- i0.ɵɵtext(1);
1316
- i0.ɵɵelementEnd();
1317
- } if (rf & 2) {
1318
- const ctx_r1 = i0.ɵɵnextContext();
1319
- i0.ɵɵadvance();
1320
- i0.ɵɵtextInterpolate(ctx_r1.text);
1321
- } }
1322
- function CaucaInputFileComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
1323
- const _r3 = i0.ɵɵgetCurrentView();
1324
- i0.ɵɵelementContainerStart(0);
1325
- i0.ɵɵelementStart(1, "input", 5, 1);
1326
- i0.ɵɵlistener("change", function CaucaInputFileComponent_ng_container_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectFile($event)); });
1327
- i0.ɵɵelementEnd();
1328
- i0.ɵɵelementContainerEnd();
1329
- } if (rf & 2) {
1330
- const ctx_r1 = i0.ɵɵnextContext();
1331
- i0.ɵɵadvance();
1332
- i0.ɵɵproperty("accept", ctx_r1.accept);
1333
- } }
1334
- function CaucaInputFileComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
1335
- const _r4 = i0.ɵɵgetCurrentView();
1336
- i0.ɵɵelementStart(0, "input", 6, 1);
1337
- i0.ɵɵlistener("change", function CaucaInputFileComponent_ng_template_4_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectFile($event)); });
1338
- i0.ɵɵelementEnd();
1339
- } if (rf & 2) {
1340
- const ctx_r1 = i0.ɵɵnextContext();
1341
- i0.ɵɵproperty("accept", ctx_r1.accept);
1342
- } }
1343
- class CaucaInputFileComponent {
1344
- constructor(translateService, dialog) {
1345
- this.translateService = translateService;
1346
- this.dialog = dialog;
1347
- this.readend = new EventEmitter();
1348
- this.accept = '';
1349
- this.multiple = false;
1350
- this.icon = '';
1351
- this.text = '';
1352
- this.labels = {};
1353
- }
1354
- ngOnInit() {
1355
- if (!this.icon && !this.text) {
1356
- this.translateService.get(['material.select', 'material.dialogTitle', 'material.dialogMessage']).subscribe((labels) => {
1357
- this.labels = labels;
1358
- this.text = labels['material.select'];
1359
- });
1360
- }
1361
- }
1362
- onSelectFile(e) {
1363
- for (let i = 0, j = e.target.files.length; i < j; i++) {
1364
- const file = e.target.files[i];
1365
- const reader = new FileReader();
1366
- reader.onerror = ((error) => this.onError(error));
1367
- reader.onload = ((event) => this.onReadEnd(file, event));
1368
- reader.readAsDataURL(file);
1369
- }
1370
- if (e.target.files.length) {
1371
- this.dialog.open(CaucaSimpleDialogComponent, {
1372
- width: '250px',
1373
- disableClose: true,
1374
- data: {
1375
- title: this.labels['material.dialogTitle'],
1376
- message: this.labels['material.dialogMessage']
1377
- }
1378
- });
1379
- }
1380
- }
1381
- openDialog(event) {
1382
- if (this.file) {
1383
- this.file.nativeElement.click();
1384
- }
1385
- event.stopPropagation();
1386
- }
1387
- onError(error) {
1388
- throw error;
1389
- }
1390
- onReadEnd(file, e) {
1391
- this.dialog.closeAll();
1392
- this.readend.emit({
1393
- name: file.name,
1394
- size: file.size,
1395
- type: file.type,
1396
- lastModifiedDate: file.lastModifiedDate,
1397
- content: e.target['result'],
1398
- file,
1399
- });
1400
- }
1401
- static { this.ɵfac = function CaucaInputFileComponent_Factory(t) { return new (t || CaucaInputFileComponent)(i0.ɵɵdirectiveInject(i1$4.TranslateService), i0.ɵɵdirectiveInject(i1$2.MatDialog)); }; }
1402
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaInputFileComponent, selectors: [["cauca-input-file"]], viewQuery: function CaucaInputFileComponent_Query(rf, ctx) { if (rf & 1) {
1403
- i0.ɵɵviewQuery(_c0$4, 5);
1404
- } if (rf & 2) {
1405
- let _t;
1406
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.file = _t.first);
1407
- } }, inputs: { accept: "accept", multiple: "multiple", icon: "icon", text: "text" }, outputs: { readend: "readend" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 6, vars: 4, consts: [["notMultipleInput", ""], ["file", ""], ["mat-raised-button", "", 3, "click"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["type", "file", "multiple", "multiple", 3, "change", "accept"], ["type", "file", 3, "change", "accept"]], template: function CaucaInputFileComponent_Template(rf, ctx) { if (rf & 1) {
1408
- const _r1 = i0.ɵɵgetCurrentView();
1409
- i0.ɵɵelementStart(0, "button", 2);
1410
- i0.ɵɵlistener("click", function CaucaInputFileComponent_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openDialog($event)); });
1411
- i0.ɵɵtemplate(1, CaucaInputFileComponent_mat_icon_1_Template, 2, 1, "mat-icon", 3)(2, CaucaInputFileComponent_span_2_Template, 2, 1, "span", 3);
1412
- i0.ɵɵelementEnd();
1413
- i0.ɵɵtemplate(3, CaucaInputFileComponent_ng_container_3_Template, 3, 1, "ng-container", 4)(4, CaucaInputFileComponent_ng_template_4_Template, 2, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
1414
- } if (rf & 2) {
1415
- const notMultipleInput_r5 = i0.ɵɵreference(5);
1416
- i0.ɵɵadvance();
1417
- i0.ɵɵproperty("ngIf", ctx.icon);
1418
- i0.ɵɵadvance();
1419
- i0.ɵɵproperty("ngIf", ctx.text);
1420
- i0.ɵɵadvance();
1421
- i0.ɵɵproperty("ngIf", ctx.multiple)("ngIfElse", notMultipleInput_r5);
1422
- } }, dependencies: [MatIconModule, i1$1.MatIcon], styles: ["[_nghost-%COMP%] input[_ngcontent-%COMP%]{display:none}"] }); }
1423
- }
1424
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputFileComponent, [{
1425
- type: Component,
1426
- args: [{ standalone: true, imports: [MatIconModule], 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"] }]
1427
- }], () => [{ type: i1$4.TranslateService }, { type: i1$2.MatDialog }], { file: [{
1428
- type: ViewChild,
1429
- args: ['file', { static: false }]
1430
- }], readend: [{
1431
- type: Output
1432
- }], accept: [{
1433
- type: Input
1434
- }], multiple: [{
1435
- type: Input
1436
- }], icon: [{
1437
- type: Input
1438
- }], text: [{
1439
- type: Input
1440
- }] }); })();
1441
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputFileComponent, { className: "CaucaInputFileComponent", filePath: "lib\\inputs\\cauca-input-file\\cauca-input-file.component.ts", lineNumber: 14 }); })();
1442
-
1443
- function CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template(rf, ctx) { if (rf & 1) {
1444
- i0.ɵɵelementStart(0, "mat-error");
1445
- i0.ɵɵtext(1);
1446
- i0.ɵɵpipe(2, "translate");
1447
- i0.ɵɵelementEnd();
1448
- } if (rf & 2) {
1449
- const i_r1 = i0.ɵɵnextContext().index;
1450
- const ctx_r1 = i0.ɵɵnextContext();
1451
- i0.ɵɵadvance();
1452
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r1.getErrorMessage(i_r1)));
1453
- } }
1454
- function CaucaInputMultipleLangueComponent_mat_tab_1_Template(rf, ctx) { if (rf & 1) {
1455
- i0.ɵɵelementStart(0, "mat-tab", 2)(1, "mat-form-field", 3);
1456
- i0.ɵɵelement(2, "input", 4);
1457
- i0.ɵɵtemplate(3, CaucaInputMultipleLangueComponent_mat_tab_1_mat_error_3_Template, 3, 3, "mat-error", 5);
1458
- i0.ɵɵelementEnd()();
1459
- } if (rf & 2) {
1460
- const lang_r3 = ctx.$implicit;
1461
- const i_r1 = ctx.index;
1462
- const ctx_r1 = i0.ɵɵnextContext();
1463
- i0.ɵɵproperty("label", lang_r3);
1464
- i0.ɵɵadvance(2);
1465
- i0.ɵɵproperty("placeholder", lang_r3)("formControl", ctx_r1.forms[i_r1]);
1466
- i0.ɵɵadvance();
1467
- i0.ɵɵproperty("ngIf", ctx_r1.forms[i_r1].invalid);
1468
- } }
1469
- class CaucaInputMultipleLangueComponent {
1470
- constructor(coreService, translate) {
1471
- this.translate = translate;
1472
- this.value = [];
1473
- this.forms = [];
1474
- this.labels = [];
1475
- this.selectedIndex = 0;
1476
- this.config = coreService.getConfig();
1477
- }
1478
- ngOnInit() {
1479
- this.translate.get(this.config.languages).subscribe((labels) => {
1480
- for (const i in labels) {
1481
- if (labels[i]) {
1482
- this.labels.push(labels[i]);
1483
- }
1484
- }
1485
- this.initializeForms();
1486
- });
1487
- }
1488
- onTagChanged(tabIndex) {
1489
- console.log('cauca-material, onTabChanged', tabIndex);
1490
- }
1491
- getErrorMessage(index) {
1492
- return this.forms[index].hasError('required') ? 'error.required' : '';
1493
- }
1494
- initializeForms() {
1495
- this.labels.forEach((item, index) => {
1496
- this.forms[index] = new UntypedFormControl('', [Validators.required]);
1497
- this.forms[index].setValue(this.value[index] || '');
1498
- });
1499
- }
1500
- static { this.ɵfac = function CaucaInputMultipleLangueComponent_Factory(t) { return new (t || CaucaInputMultipleLangueComponent)(i0.ɵɵdirectiveInject(i1$4.CaucaCoreService), i0.ɵɵdirectiveInject(i1$4.TranslateService)); }; }
1501
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaucaInputMultipleLangueComponent, selectors: [["cauca-input-multiple-langue"]], inputs: { value: "value" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 2, vars: 2, consts: [[3, "selectedIndexChange", "selectedIndex"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label"], ["hideRequiredMarker", "never"], ["matInput", "", "required", "required", 3, "placeholder", "formControl"], [4, "ngIf"]], template: function CaucaInputMultipleLangueComponent_Template(rf, ctx) { if (rf & 1) {
1502
- i0.ɵɵelementStart(0, "mat-tab-group", 0);
1503
- i0.ɵɵlistener("selectedIndexChange", function CaucaInputMultipleLangueComponent_Template_mat_tab_group_selectedIndexChange_0_listener($event) { return ctx.onTagChanged($event); });
1504
- i0.ɵɵtemplate(1, CaucaInputMultipleLangueComponent_mat_tab_1_Template, 4, 4, "mat-tab", 1);
1505
- i0.ɵɵelementEnd();
1506
- } if (rf & 2) {
1507
- i0.ɵɵproperty("selectedIndex", ctx.selectedIndex);
1508
- i0.ɵɵadvance();
1509
- i0.ɵɵproperty("ngForOf", ctx.labels);
1510
- } }, dependencies: [MatTabsModule, i2$2.MatTab, i2$2.MatTabGroup, MatFormFieldModule, i2$3.MatFormField, i2$3.MatError, MatInputModule, i4.MatInput, NgIf,
1511
- ReactiveFormsModule, i5.DefaultValueAccessor, i5.NgControlStatus, i5.RequiredValidator, i5.FormControlDirective, TranslateModule, i2.TranslatePipe], styles: [".mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}"] }); }
1512
- }
1513
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaucaInputMultipleLangueComponent, [{
1514
- type: Component,
1515
- args: [{ standalone: true, imports: [
1516
- MatTabsModule,
1517
- MatFormFieldModule,
1518
- MatInputModule,
1519
- NgIf,
1520
- ReactiveFormsModule,
1521
- TranslateModule
1522
- ], 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"] }]
1523
- }], () => [{ type: i1$4.CaucaCoreService }, { type: i1$4.TranslateService }], { value: [{
1524
- type: Input
1525
- }] }); })();
1526
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaucaInputMultipleLangueComponent, { className: "CaucaInputMultipleLangueComponent", filePath: "lib\\inputs\\cauca-input-multiple-langue\\cauca-input-multiple-langue.component.ts", lineNumber: 24 }); })();
1527
-
1528
1528
  function PasswordCriteriaComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
1529
1529
  i0.ɵɵelementStart(0, "mat-icon", 0);
1530
1530
  i0.ɵɵtext(1, "check_circle");
@@ -2493,7 +2493,7 @@ class CaucaDateTimePickerComponent {
2493
2493
  bottom: `${bottom}px`,
2494
2494
  };
2495
2495
  }
2496
- static { this.ɵfac = function CaucaDateTimePickerComponent_Factory(t) { return new (t || CaucaDateTimePickerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$2.MatDialog), i0.ɵɵdirectiveInject(i1$3.DatePipe)); }; }
2496
+ static { this.ɵfac = function CaucaDateTimePickerComponent_Factory(t) { return new (t || CaucaDateTimePickerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$2.MatDialog), i0.ɵɵdirectiveInject(i1$4.DatePipe)); }; }
2497
2497
  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([
2498
2498
  DatePipe,
2499
2499
  ]), 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) {
@@ -2518,7 +2518,7 @@ class CaucaDateTimePickerComponent {
2518
2518
  ], providers: [
2519
2519
  DatePipe,
2520
2520
  ], 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"] }]
2521
- }], () => [{ type: i0.ElementRef }, { type: i1$2.MatDialog }, { type: i1$3.DatePipe }], { stepHours: [{
2521
+ }], () => [{ type: i0.ElementRef }, { type: i1$2.MatDialog }, { type: i1$4.DatePipe }], { stepHours: [{
2522
2522
  type: Input
2523
2523
  }], stepMinutes: [{
2524
2524
  type: Input