bit-ng-library 20.0.1 → 20.1.1

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.
@@ -1,69 +1,68 @@
1
- import { Subject, BehaviorSubject, lastValueFrom, of, ReplaySubject, combineLatest, forkJoin, fromEvent, throwError } from 'rxjs';
1
+ import { Subject, BehaviorSubject, lastValueFrom, of, ReplaySubject, combineLatest, forkJoin, throwError } from 'rxjs';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, inject, signal, EventEmitter, computed, Inject, DestroyRef, Directive, Input, ChangeDetectionStrategy, Component, Pipe, input, model, output, Output, HostListener, ViewChild, forwardRef, TemplateRef, ContentChild, ElementRef, effect, NgModule } from '@angular/core';
4
- import { map, mergeMap, tap, takeUntil, startWith, delay, filter, concatMap, take, switchMapTo, catchError, finalize } from 'rxjs/operators';
3
+ import { Injectable, inject, signal, computed, DestroyRef, Directive, input, ChangeDetectionStrategy, Component, Pipe, model, output, linkedSignal, ElementRef, Renderer2, HostListener, viewChild, forwardRef, contentChild, TemplateRef, effect, NgModule } from '@angular/core';
4
+ import { map, mergeMap, tap, takeUntil, filter, concatMap, take, catchError, finalize } from 'rxjs/operators';
5
5
  import { PrimeNG } from 'primeng/config';
6
6
  import Aura from '@primeng/themes/aura';
7
- import * as i5 from '@jsverse/transloco';
8
- import { TranslocoModule, TRANSLOCO_SCOPE } from '@jsverse/transloco';
9
- import * as i1 from '@angular/common/http';
10
- import { HttpHeaders } from '@angular/common/http';
7
+ import * as i3 from '@jsverse/transloco';
8
+ import { TranslocoService, TranslocoModule, TRANSLOCO_SCOPE } from '@jsverse/transloco';
9
+ import { HttpClient, HttpHeaders } from '@angular/common/http';
11
10
  import moment from 'moment';
12
- import * as i1$2 from '@angular/forms';
11
+ import * as i1$1 from '@angular/forms';
13
12
  import { FormGroup, UntypedFormControl, UntypedFormArray, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
14
13
  import { toSignal } from '@angular/core/rxjs-interop';
15
14
  import { saveAs } from 'file-saver';
16
- import * as i3 from '@angular/common';
15
+ import * as i2 from '@angular/common';
17
16
  import { CommonModule } from '@angular/common';
18
- import * as i1$1 from '@angular/router';
19
- import { RouterModule } from '@angular/router';
20
- import * as i3$6 from 'primeng/datepicker';
17
+ import * as i1$6 from '@angular/router';
18
+ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
19
+ import * as i1$4 from 'primeng/datepicker';
21
20
  import { DatePickerModule } from 'primeng/datepicker';
22
- import * as i2$2 from 'primeng/inputtext';
21
+ import * as i2$3 from 'primeng/inputtext';
23
22
  import { InputTextModule } from 'primeng/inputtext';
24
- import * as i2$6 from 'primeng/editor';
23
+ import * as i2$8 from 'primeng/editor';
25
24
  import { EditorModule } from 'primeng/editor';
26
- import * as i4$1 from 'primeng/multiselect';
25
+ import * as i2$7 from 'primeng/multiselect';
27
26
  import { MultiSelectModule } from 'primeng/multiselect';
28
- import * as i2 from 'primeng/select';
27
+ import * as i2$1 from 'primeng/select';
29
28
  import { SelectModule } from 'primeng/select';
30
29
  import { PaginatorModule } from 'primeng/paginator';
31
- import * as i1$3 from 'primeng/checkbox';
30
+ import * as i1$5 from 'primeng/checkbox';
32
31
  import { CheckboxModule } from 'primeng/checkbox';
33
- import * as i3$2 from 'primeng/button';
32
+ import * as i3$1 from 'primeng/button';
34
33
  import { ButtonModule } from 'primeng/button';
35
34
  import { RadioButtonModule } from 'primeng/radiobutton';
36
35
  import { TabsModule } from 'primeng/tabs';
37
- import * as i3$1 from 'primeng/dialog';
36
+ import * as i1 from 'primeng/dialog';
38
37
  import { DialogModule } from 'primeng/dialog';
39
38
  import { AccordionModule } from 'primeng/accordion';
40
- import * as i2$5 from 'primeng/autocomplete';
39
+ import * as i2$6 from 'primeng/autocomplete';
41
40
  import { AutoCompleteModule } from 'primeng/autocomplete';
42
- import * as i2$4 from 'primeng/toggleswitch';
41
+ import * as i2$5 from 'primeng/toggleswitch';
43
42
  import { ToggleSwitchModule } from 'primeng/toggleswitch';
44
- import * as i3$5 from 'primeng/tooltip';
43
+ import * as i3$2 from 'primeng/tooltip';
45
44
  import { TooltipModule } from 'primeng/tooltip';
46
- import * as i3$7 from 'primeng/popover';
45
+ import * as i3$3 from 'primeng/popover';
47
46
  import { Popover, PopoverModule } from 'primeng/popover';
48
47
  import { MessageModule } from 'primeng/message';
49
48
  import { MenuModule } from 'primeng/menu';
50
49
  import { MenubarModule } from 'primeng/menubar';
51
50
  import { MegaMenuModule } from 'primeng/megamenu';
52
- import * as i5$1 from 'primeng/table';
51
+ import * as i4$1 from 'primeng/table';
53
52
  import { TableModule } from 'primeng/table';
54
53
  import { TreeModule } from 'primeng/tree';
55
54
  import { DynamicDialogModule } from 'primeng/dynamicdialog';
56
- import * as i1$4 from 'primeng/inputnumber';
55
+ import * as i1$7 from 'primeng/inputnumber';
57
56
  import { InputNumberModule } from 'primeng/inputnumber';
58
57
  import { FieldsetModule } from 'primeng/fieldset';
59
- import * as i3$4 from 'primeng/toast';
58
+ import * as i1$2 from 'primeng/toast';
60
59
  import { ToastModule } from 'primeng/toast';
61
- import * as i6 from 'ng2-file-upload';
60
+ import * as i5 from 'ng2-file-upload';
62
61
  import { FileUploadModule as FileUploadModule$1 } from 'ng2-file-upload';
63
- import * as i2$1 from 'primeng/api';
62
+ import * as i1$3 from 'primeng/api';
64
63
  import { MessageService } from 'primeng/api';
65
64
  import { TreeTableModule } from 'primeng/treetable';
66
- import * as i2$3 from 'primeng/textarea';
65
+ import * as i2$4 from 'primeng/textarea';
67
66
  import { TextareaModule } from 'primeng/textarea';
68
67
  import { BadgeModule } from 'primeng/badge';
69
68
  import { FileUploadModule } from 'primeng/fileupload';
@@ -75,11 +74,11 @@ import { TieredMenuModule } from 'primeng/tieredmenu';
75
74
  import { InputMaskModule } from 'primeng/inputmask';
76
75
  import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
77
76
  import { InputGroupModule } from 'primeng/inputgroup';
78
- import * as i2$7 from 'primeng/selectbutton';
77
+ import * as i2$9 from 'primeng/selectbutton';
79
78
  import { SelectButtonModule } from 'primeng/selectbutton';
80
79
  import * as i4 from 'primeng/ripple';
81
80
  import { RippleModule } from 'primeng/ripple';
82
- import * as i3$3 from 'primeng/splitbutton';
81
+ import * as i2$2 from 'primeng/splitbutton';
83
82
  import { SplitButtonModule } from 'primeng/splitbutton';
84
83
  import { signalStore, withState, withMethods, patchState, withComputed } from '@ngrx/signals';
85
84
  import { withEntities, updateEntity, removeAllEntities, removeEntities, removeEntity, addEntities, addEntity, setEntity, setEntities } from '@ngrx/signals/entities';
@@ -379,7 +378,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
379
378
  class AyudaService {
380
379
  static { this.AYUDAS = []; } // Inicializar desde la aplicacion cliente
381
380
  constructor() {
382
- this.mostrar = new EventEmitter();
381
+ this.mostrar = signal(null, ...(ngDevMode ? [{ debugName: "mostrar" }] : []));
383
382
  this.themeFbitService = inject(ThemeFBitService);
384
383
  this.localeService = inject(LocaleService);
385
384
  this.baseHelpUrl$ = computed(() => `assets/docshelp/${this.localeService.locale$()}/index.html?darkMode=${this.themeFbitService.darkMode$()}`, ...(ngDevMode ? [{ debugName: "baseHelpUrl$" }] : []));
@@ -400,7 +399,7 @@ class AyudaService {
400
399
  }
401
400
  mostrarAyuda(key) {
402
401
  if (this.mapaAyudas.has(key)) {
403
- this.mostrar.emit(this.mapaAyudas.get(key));
402
+ this.mostrar.set(this.mapaAyudas.get(key));
404
403
  }
405
404
  else {
406
405
  console.warn(`No existe ayuda para la clave [${key}]`);
@@ -513,14 +512,19 @@ class GeneralUtils {
513
512
  static { this.FORMAT_SHORT_SECONDS_TIME = "HH:mm:ss"; }
514
513
  constructor() {
515
514
  this.observableLoadingSource = new Subject();
515
+ this.loading = signal(0, ...(ngDevMode ? [{ debugName: "loading" }] : []));
516
516
  console.log("GeneralUtils constructor");
517
517
  this.observableLoading = this.observableLoadingSource.asObservable();
518
518
  }
519
519
  startLoading() {
520
+ console.log("startLoading");
520
521
  this.observableLoadingSource.next("start");
522
+ this.loading.update((value) => ++value);
521
523
  }
522
524
  stopLoading() {
525
+ console.log("startLoading");
523
526
  this.observableLoadingSource.next("stop");
527
+ this.loading.update((value) => --value);
524
528
  }
525
529
  static capitalizeFirstLetter(cad) {
526
530
  return cad && cad.charAt(0).toUpperCase() + cad.slice(1);
@@ -659,9 +663,9 @@ function buildTranslatedMessage(code, context, params) {
659
663
  }
660
664
  /** wrapper al servicio de traducción de textos */
661
665
  class TranslateService {
662
- constructor(translocoService, defaultLanguage = "ca") {
663
- this.translocoService = translocoService;
664
- this.defaultLanguage = defaultLanguage;
666
+ constructor() {
667
+ this.translocoService = inject(TranslocoService);
668
+ this.defaultLanguage = inject("DEFAULT_LANGUAGE") ?? "ca";
665
669
  //para suscribirnos a cambios de idioma y emitimos un primer valor que es el idioma en curso
666
670
  console.log("default language", this.defaultLanguage);
667
671
  this.langChangeSubject = new BehaviorSubject(this.defaultLanguage);
@@ -697,16 +701,13 @@ class TranslateService {
697
701
  let lang = this.translocoService.getActiveLang();
698
702
  return lang;
699
703
  }
700
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TranslateService, deps: [{ token: i5.TranslocoService }, { token: "DEFAULT_LANGUAGE" }], target: i0.ɵɵFactoryTarget.Injectable }); }
704
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
701
705
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TranslateService, providedIn: "root" }); }
702
706
  }
703
707
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TranslateService, decorators: [{
704
708
  type: Injectable,
705
709
  args: [{ providedIn: "root" }]
706
- }], ctorParameters: () => [{ type: i5.TranslocoService }, { type: undefined, decorators: [{
707
- type: Inject,
708
- args: ["DEFAULT_LANGUAGE"]
709
- }] }] });
710
+ }], ctorParameters: () => [] });
710
711
 
711
712
  class HttpUtilsService {
712
713
  // customizado por proyecto: {provide: 'CONTEXT_PATH', useValue: environment.CONTEXT}
@@ -716,15 +717,15 @@ class HttpUtilsService {
716
717
  static { this.errorAccessServerMessage = ""; }
717
718
  static { this.errorServerTitle = ""; }
718
719
  static { this.errorServerMessage = ""; }
719
- constructor(http, bitMessageService, generalUtils, translateService, apiUrl, contextPath) {
720
- this.http = http;
721
- this.bitMessageService = bitMessageService;
722
- this.generalUtils = generalUtils;
723
- this.translateService = translateService;
724
- this.apiUrl = apiUrl;
725
- this.contextPath = contextPath;
726
- HttpUtilsService.CONTEXT_PATH = contextPath;
727
- console.log("HttpUtilsSerive creado con API Url:" + this.apiUrl);
720
+ constructor() {
721
+ this.http = inject(HttpClient);
722
+ this.bitMessageService = inject(BitMessageService);
723
+ this.generalUtils = inject(GeneralUtils);
724
+ this.translateService = inject(TranslateService);
725
+ this.apiUrl = inject("API_URL");
726
+ this.contextPath = inject("CONTEXT_PATH");
727
+ HttpUtilsService.CONTEXT_PATH = this.contextPath;
728
+ console.log(`HttpUtilsSerive creado con API Url: ${this.apiUrl} y contextPath: ${this.contextPath}`);
728
729
  this.getMessagesI18N();
729
730
  }
730
731
  getMessagesI18N() {
@@ -845,19 +846,13 @@ class HttpUtilsService {
845
846
  }
846
847
  return httpHeaders;
847
848
  }
848
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: HttpUtilsService, deps: [{ token: i1.HttpClient }, { token: BitMessageService }, { token: GeneralUtils }, { token: TranslateService }, { token: "API_URL" }, { token: "CONTEXT_PATH" }], target: i0.ɵɵFactoryTarget.Injectable }); }
849
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: HttpUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
849
850
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: HttpUtilsService, providedIn: "root" }); }
850
851
  }
851
852
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: HttpUtilsService, decorators: [{
852
853
  type: Injectable,
853
854
  args: [{ providedIn: "root" }]
854
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: BitMessageService }, { type: GeneralUtils }, { type: TranslateService }, { type: undefined, decorators: [{
855
- type: Inject,
856
- args: ["API_URL"]
857
- }] }, { type: undefined, decorators: [{
858
- type: Inject,
859
- args: ["CONTEXT_PATH"]
860
- }] }] });
855
+ }], ctorParameters: () => [] });
861
856
  var httpUtilsServiceInjectables = [
862
857
  {
863
858
  provide: HttpUtilsService,
@@ -1650,22 +1645,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
1650
1645
  }], ctorParameters: () => [] });
1651
1646
 
1652
1647
  class DomainService {
1653
- constructor(translateService) {
1654
- this.translateService = translateService;
1648
+ constructor() {
1649
+ this.translateService = inject(TranslateService);
1655
1650
  }
1656
1651
  getTranslatedDomain(domain, injector) {
1657
1652
  return toSignal(this.translateService.langChanged$.pipe(mergeMap((lang) => {
1658
- console.log("getTranslatedDomain", lang);
1659
1653
  return domain && domain[lang] ? of(domain[lang]) : of([]);
1660
1654
  })), { injector: injector });
1661
1655
  }
1662
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomainService, deps: [{ token: TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1656
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomainService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1663
1657
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomainService, providedIn: "root" }); }
1664
1658
  }
1665
1659
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomainService, decorators: [{
1666
1660
  type: Injectable,
1667
1661
  args: [{ providedIn: "root" }]
1668
- }], ctorParameters: () => [{ type: TranslateService }] });
1662
+ }] });
1669
1663
 
1670
1664
  // Devuelve el filename especificado en el content-disposition de una response
1671
1665
  function getFileNameFromResponse(response) {
@@ -1688,9 +1682,9 @@ function replaceAll(target, find, replace) {
1688
1682
  }
1689
1683
 
1690
1684
  class DownloadService {
1691
- constructor(http, generalUtils) {
1692
- this.http = http;
1693
- this.generalUtils = generalUtils;
1685
+ constructor() {
1686
+ this.http = inject(HttpClient);
1687
+ this.generalUtils = inject(GeneralUtils);
1694
1688
  }
1695
1689
  // Devuelve un objeto que contiene el nombre del fichero y su contenido como Blob
1696
1690
  // Determinamos el nombre del fichero a partir del header "Content-Disposition" de la response
@@ -1714,7 +1708,7 @@ class DownloadService {
1714
1708
  this.generalUtils.stopLoading();
1715
1709
  }, () => this.generalUtils.stopLoading());
1716
1710
  }
1717
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DownloadService, deps: [{ token: i1.HttpClient }, { token: GeneralUtils }], target: i0.ɵɵFactoryTarget.Injectable }); }
1711
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DownloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1718
1712
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DownloadService, providedIn: "root" }); }
1719
1713
  }
1720
1714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DownloadService, decorators: [{
@@ -1722,7 +1716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
1722
1716
  args: [{
1723
1717
  providedIn: "root"
1724
1718
  }]
1725
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: GeneralUtils }] });
1719
+ }] });
1726
1720
 
1727
1721
  /**
1728
1722
  * FocusService almacena el campo/elemento que actualmente tiene el foco del usuario.
@@ -1820,8 +1814,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
1820
1814
  }], ctorParameters: () => [] });
1821
1815
 
1822
1816
  class UploadService {
1823
- constructor(apiUrl) {
1824
- this.apiUrl = apiUrl;
1817
+ constructor() {
1818
+ this.apiUrl = inject("API_URL");
1825
1819
  this.UPLOAD_URL = `${this.apiUrl}ficheros/upload`;
1826
1820
  this.DOWNLOAD_URL = `${this.apiUrl}ficheros/download/`;
1827
1821
  console.log("UploadService creado con API_URL:", this.apiUrl);
@@ -1862,16 +1856,13 @@ class UploadService {
1862
1856
  getUrlDownloadFile(id) {
1863
1857
  return `${this.DOWNLOAD_URL}${id}`;
1864
1858
  }
1865
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: UploadService, deps: [{ token: "API_URL" }], target: i0.ɵɵFactoryTarget.Injectable }); }
1859
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: UploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1866
1860
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: UploadService, providedIn: "root" }); }
1867
1861
  }
1868
1862
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: UploadService, decorators: [{
1869
1863
  type: Injectable,
1870
1864
  args: [{ providedIn: "root" }]
1871
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1872
- type: Inject,
1873
- args: ["API_URL"]
1874
- }] }] });
1865
+ }], ctorParameters: () => [] });
1875
1866
 
1876
1867
  class ClearItemsService {
1877
1868
  constructor() {
@@ -2384,15 +2375,15 @@ function makeToolbarChildList(enableDelete) {
2384
2375
  * ]
2385
2376
  **/
2386
2377
  class BitBreadCrumbComponent {
2387
- constructor(router) {
2388
- this.router = router;
2378
+ constructor() {
2379
+ this.router = inject(Router);
2380
+ this.bc = input([], ...(ngDevMode ? [{ debugName: "bc", alias: "breadcrumb" }] : [{ alias: "breadcrumb" }]));
2389
2381
  }
2390
2382
  /** Comprobamos si los datos de entrada no están definidos para inicializarlos en blanco */
2391
2383
  ngOnInit() {
2392
- if (this.bc == undefined)
2393
- this.bc = [];
2394
- if (this.bc.length == 0)
2395
- this.bc.push({ label: " " });
2384
+ const bc = this.bc();
2385
+ if (bc.length == 0)
2386
+ bc.push({ label: " " });
2396
2387
  }
2397
2388
  /** Vamos a la URL que contenga el path */
2398
2389
  goAddress(path) {
@@ -2404,21 +2395,21 @@ class BitBreadCrumbComponent {
2404
2395
  }
2405
2396
  return false; //para evitar que navegue al href="#"
2406
2397
  }
2407
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitBreadCrumbComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2408
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitBreadCrumbComponent, isStandalone: false, selector: "bit-breadcrumb", inputs: { bc: ["breadcrumb", "bc"] }, ngImport: i0, template: `
2398
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitBreadCrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2399
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitBreadCrumbComponent, isStandalone: false, selector: "bit-breadcrumb", inputs: { bc: { classPropertyName: "bc", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
2409
2400
  <ul class="breadcrumb">
2410
- @for (path of bc; track path; let i = $index) {
2411
- <li [class.active]="i == bc.length - 1">
2412
- @if (i < bc.length - 1 && path.url) {
2401
+ @for (path of bc(); track path; let i = $index) {
2402
+ <li [class.active]="i == bc().length - 1">
2403
+ @if (i < bc().length - 1 && path.url) {
2413
2404
  <a class="breadcrumb-item" (click)="goAddress(path)" href="#">{{ "breadcrumb." + path.label | transloco }}</a>
2414
2405
  }
2415
- @if (i == bc.length - 1 || !path.url) {
2406
+ @if (i == bc().length - 1 || !path.url) {
2416
2407
  <span class="breadcrumb-item active">{{ "breadcrumb." + path.label | transloco }}</span>
2417
2408
  }
2418
2409
  </li>
2419
2410
  }
2420
2411
  </ul>
2421
- `, isInline: true, dependencies: [{ kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2412
+ `, isInline: true, dependencies: [{ kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2422
2413
  }
2423
2414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitBreadCrumbComponent, decorators: [{
2424
2415
  type: Component,
@@ -2427,12 +2418,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2427
2418
  changeDetection: ChangeDetectionStrategy.OnPush,
2428
2419
  template: `
2429
2420
  <ul class="breadcrumb">
2430
- @for (path of bc; track path; let i = $index) {
2431
- <li [class.active]="i == bc.length - 1">
2432
- @if (i < bc.length - 1 && path.url) {
2421
+ @for (path of bc(); track path; let i = $index) {
2422
+ <li [class.active]="i == bc().length - 1">
2423
+ @if (i < bc().length - 1 && path.url) {
2433
2424
  <a class="breadcrumb-item" (click)="goAddress(path)" href="#">{{ "breadcrumb." + path.label | transloco }}</a>
2434
2425
  }
2435
- @if (i == bc.length - 1 || !path.url) {
2426
+ @if (i == bc().length - 1 || !path.url) {
2436
2427
  <span class="breadcrumb-item active">{{ "breadcrumb." + path.label | transloco }}</span>
2437
2428
  }
2438
2429
  </li>
@@ -2443,22 +2434,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2443
2434
  ,
2444
2435
  standalone: false
2445
2436
  }]
2446
- }], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { bc: [{
2447
- type: Input,
2448
- args: ["breadcrumb"]
2449
- }] } });
2437
+ }] });
2450
2438
 
2451
2439
  class BitControlMessages {
2452
- //constructor( @Host() private formDir: FormGroup) { }
2453
- constructor(focusService, translateService) {
2454
- this.focusService = focusService;
2455
- this.translateService = translateService;
2440
+ constructor() {
2441
+ this.focusService = inject(FocusService);
2442
+ this.translateService = inject(TranslateService);
2443
+ this.control = input(...(ngDevMode ? [undefined, { debugName: "control" }] : []));
2444
+ this.field = input(...(ngDevMode ? [undefined, { debugName: "field" }] : []));
2456
2445
  }
2457
2446
  get isError() {
2458
- if (this.focusService.getFocusedElement() !== this.field) {
2459
- for (let propertyName in this.control.errors) {
2447
+ if (this.focusService.getFocusedElement() !== this.field()) {
2448
+ for (let propertyName in this.control().errors) {
2460
2449
  // If control has a error
2461
- if (this.control.errors.hasOwnProperty(propertyName) && this.control.touched) {
2450
+ const control = this.control();
2451
+ if (control.errors.hasOwnProperty(propertyName) && control.touched) {
2462
2452
  // Return the appropriate error message from the Validation Service
2463
2453
  let translatedError = CustomValidators.getValidatorErrorMessage(propertyName);
2464
2454
  this.errorMessage$ = this.translateService.selectTranslate(translatedError.code, translatedError.params, translatedError.context);
@@ -2468,14 +2458,14 @@ class BitControlMessages {
2468
2458
  }
2469
2459
  return false;
2470
2460
  }
2471
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitControlMessages, deps: [{ token: FocusService }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2472
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitControlMessages, isStandalone: false, selector: "control-messages", inputs: { control: "control", field: "field" }, ngImport: i0, template: `
2461
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitControlMessages, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2462
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitControlMessages, isStandalone: false, selector: "control-messages", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
2473
2463
  @if (isError) {
2474
2464
  <div>
2475
2465
  <span class="mensaje-error-input">{{ errorMessage$ | async }}</span>
2476
2466
  </div>
2477
2467
  }
2478
- `, isInline: true, dependencies: [{ kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
2468
+ `, isInline: true, dependencies: [{ kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
2479
2469
  }
2480
2470
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitControlMessages, decorators: [{
2481
2471
  type: Component,
@@ -2492,11 +2482,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2492
2482
  ,
2493
2483
  standalone: false
2494
2484
  }]
2495
- }], ctorParameters: () => [{ type: FocusService }, { type: TranslateService }], propDecorators: { control: [{
2496
- type: Input
2497
- }], field: [{
2498
- type: Input
2499
- }] } });
2485
+ }] });
2500
2486
 
2501
2487
  class BitMessage {
2502
2488
  static { this.WIDTH = 600; }
@@ -2521,12 +2507,13 @@ class BitMessage {
2521
2507
 
2522
2508
  class BitDialogComponent extends BaseComponent {
2523
2509
  static { this.MENSAJE_VOID = "No hi ha dades per mostrar"; }
2524
- constructor(bitMessageService, translateService) {
2510
+ constructor() {
2525
2511
  super();
2526
- this.bitMessageService = bitMessageService;
2527
- this.translateService = translateService;
2512
+ this.bitMessageService = inject(BitMessageService);
2513
+ this.translateService = inject(TranslateService);
2528
2514
  this.display = false;
2529
2515
  this.height = 200;
2516
+ const bitMessageService = this.bitMessageService;
2530
2517
  //console.log("DialogComponent contructor(" + bitMessageService + ")");
2531
2518
  //Nos suscribimos a la espera de que envíen mensajes
2532
2519
  bitMessageService.observableMessages.pipe(takeUntil(this.destroy$)).subscribe((message) => {
@@ -2624,7 +2611,7 @@ class BitDialogComponent extends BaseComponent {
2624
2611
  return '<span class="' + cls + '">' + match + "</span>";
2625
2612
  });
2626
2613
  }
2627
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDialogComponent, deps: [{ token: BitMessageService }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2614
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2628
2615
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDialogComponent, isStandalone: false, selector: "bit-dialog", usesInheritance: true, ngImport: i0, template: `
2629
2616
  @if (!isSeverityInfo) {
2630
2617
  <p-dialog
@@ -2677,7 +2664,7 @@ class BitDialogComponent extends BaseComponent {
2677
2664
  <pre [innerHTML]="syntaxHighlight(message.message)"></pre>
2678
2665
  </p-dialog>
2679
2666
  }
2680
- `, isInline: true, dependencies: [{ kind: "component", type: i3$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] }); }
2667
+ `, isInline: true, dependencies: [{ kind: "component", type: i1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] }); }
2681
2668
  }
2682
2669
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDialogComponent, decorators: [{
2683
2670
  type: Component,
@@ -2740,7 +2727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2740
2727
  ,
2741
2728
  standalone: false
2742
2729
  }]
2743
- }], ctorParameters: () => [{ type: BitMessageService }, { type: TranslateService }] });
2730
+ }], ctorParameters: () => [] });
2744
2731
 
2745
2732
  const PADDING = "000000";
2746
2733
  class CantidadMonedaPipe {
@@ -2831,43 +2818,40 @@ class BitPajigatorComponent {
2831
2818
  this.onPageChange.emit(this.page());
2832
2819
  }
2833
2820
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitPajigatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2834
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitPajigatorComponent, isStandalone: false, selector: "bit-pajigator", inputs: { paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, maxCurrentItems: { classPropertyName: "maxCurrentItems", publicName: "maxCurrentItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", itemsPerPage: "itemsPerPageChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange" }, ngImport: i0, template: "<div [class]=\"paginator() ? 'pajigator-outer-container' : 'pajigator-outer-container-single-result'\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (paginator()) { \n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n } @else {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n </div>\n @if (paginator()) { \n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select \n appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\"></p-select>\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n } \n </div>\n</div>", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i4.Ripple, selector: "[pRipple]" }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: CantidadMonedaPipe, name: "cantidadMoneda" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2821
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitPajigatorComponent, isStandalone: false, selector: "bit-pajigator", inputs: { paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, maxCurrentItems: { classPropertyName: "maxCurrentItems", publicName: "maxCurrentItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", itemsPerPage: "itemsPerPageChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange" }, ngImport: i0, template: "<div [class]=\"paginator() ? 'pajigator-outer-container' : 'pajigator-outer-container-single-result'\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (paginator()) { \n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n } @else {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n </div>\n @if (paginator()) { \n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\" />\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n } \n </div>\n</div>", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i4.Ripple, selector: "[pRipple]" }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: CantidadMonedaPipe, name: "cantidadMoneda" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2835
2822
  }
2836
2823
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitPajigatorComponent, decorators: [{
2837
2824
  type: Component,
2838
- args: [{ selector: 'bit-pajigator', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div [class]=\"paginator() ? 'pajigator-outer-container' : 'pajigator-outer-container-single-result'\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (paginator()) { \n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n } @else {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n </div>\n @if (paginator()) { \n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select \n appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\"></p-select>\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n } \n </div>\n</div>" }]
2825
+ args: [{ selector: 'bit-pajigator', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div [class]=\"paginator() ? 'pajigator-outer-container' : 'pajigator-outer-container-single-result'\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (paginator()) { \n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n } @else {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n </div>\n @if (paginator()) { \n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\" />\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n } \n </div>\n</div>" }]
2839
2826
  }] });
2840
2827
 
2841
2828
  class BitHelpComponent {
2842
- constructor(ayudaService, changeDetectorRef) {
2843
- this.ayudaService = ayudaService;
2844
- this.changeDetectorRef = changeDetectorRef;
2845
- this.ayuda = null;
2846
- // cada vez que el servicio emite una nueva ayuda, la mostramos
2847
- ayudaService.mostrar.subscribe(ayuda => {
2848
- console.log("Mostrando ayuda", ayuda);
2849
- this.ayuda = ayuda;
2850
- this.changeDetectorRef.detectChanges();
2829
+ constructor() {
2830
+ this.ayudaService = inject(AyudaService);
2831
+ this.ayuda = linkedSignal({
2832
+ source: this.ayudaService.mostrar,
2833
+ computation: (newAyuda, _) => {
2834
+ console.log("newAyuda", newAyuda);
2835
+ return newAyuda;
2836
+ }
2851
2837
  });
2838
+ this.mostrarAyuda = computed(() => this.ayuda() != null, ...(ngDevMode ? [{ debugName: "mostrarAyuda" }] : []));
2852
2839
  }
2853
2840
  /** Oculta el modal con los avisos */
2854
2841
  hideAyuda() {
2855
- this.ayuda = null;
2842
+ this.ayuda.set(null);
2856
2843
  }
2857
- get ayudaPressed() {
2858
- return this.ayuda != null;
2859
- }
2860
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitHelpComponent, deps: [{ token: AyudaService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2844
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitHelpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2861
2845
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitHelpComponent, isStandalone: false, selector: "bit-help", ngImport: i0, template: `
2862
- @if (ayudaPressed) {
2846
+ @if (mostrarAyuda()) {
2863
2847
  <div class="ventana-ayuda">
2864
2848
  <div class="ayuda-header">
2865
- {{ ayuda.header }}
2849
+ {{ ayuda().header }}
2866
2850
  <span class="fa fa-close" (click)="hideAyuda()"></span>
2867
2851
  </div>
2868
2852
  <div class="ayuda-body">
2869
- <p class="ayuda-subtitulo" [innerHTML]="ayuda.title"></p>
2870
- <p [innerHTML]="ayuda.body"></p>
2853
+ <p class="ayuda-subtitulo" [innerHTML]="ayuda().title"></p>
2854
+ <p [innerHTML]="ayuda().body"></p>
2871
2855
  </div>
2872
2856
  </div>
2873
2857
  }
@@ -2879,15 +2863,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2879
2863
  selector: "bit-help",
2880
2864
  changeDetection: ChangeDetectionStrategy.OnPush,
2881
2865
  template: `
2882
- @if (ayudaPressed) {
2866
+ @if (mostrarAyuda()) {
2883
2867
  <div class="ventana-ayuda">
2884
2868
  <div class="ayuda-header">
2885
- {{ ayuda.header }}
2869
+ {{ ayuda().header }}
2886
2870
  <span class="fa fa-close" (click)="hideAyuda()"></span>
2887
2871
  </div>
2888
2872
  <div class="ayuda-body">
2889
- <p class="ayuda-subtitulo" [innerHTML]="ayuda.title"></p>
2890
- <p [innerHTML]="ayuda.body"></p>
2873
+ <p class="ayuda-subtitulo" [innerHTML]="ayuda().title"></p>
2874
+ <p [innerHTML]="ayuda().body"></p>
2891
2875
  </div>
2892
2876
  </div>
2893
2877
  }
@@ -2896,11 +2880,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
2896
2880
  ,
2897
2881
  standalone: false
2898
2882
  }]
2899
- }], ctorParameters: () => [{ type: AyudaService }, { type: i0.ChangeDetectorRef }] });
2883
+ }] });
2900
2884
 
2901
2885
  class BitFooterMessagesComponent {
2902
- constructor(translateService) {
2903
- this.translateService = translateService;
2886
+ constructor() {
2887
+ this.translateService = inject(TranslateService);
2904
2888
  this.status = input(PageStatus.Init, ...(ngDevMode ? [{ debugName: "status" }] : [])); // Determina en qué estado está la página: PageStatus.Init, PageStatus.SEARCHING, PageStatus.FINISH_SEARCH
2905
2889
  this.maxCurrentItems = input(...(ngDevMode ? [undefined, { debugName: "maxCurrentItems" }] : []));
2906
2890
  this.totalItems = input(...(ngDevMode ? [undefined, { debugName: "totalItems" }] : []));
@@ -2989,13 +2973,13 @@ class BitFooterMessagesComponent {
2989
2973
  return "";
2990
2974
  }, ...(ngDevMode ? [{ debugName: "message" }] : []));
2991
2975
  }
2992
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitFooterMessagesComponent, deps: [{ token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2993
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: BitFooterMessagesComponent, isStandalone: false, selector: "bit-footer-messages", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, maxCurrentItems: { classPropertyName: "maxCurrentItems", publicName: "maxCurrentItems", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, typeFooter: { classPropertyName: "typeFooter", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div>\n <div [class]=\"getStyle()\">\n <i class=\"fa fa-info\"></i>\n <span>{{message()}}</span>\n </div>\n\n <bit-help></bit-help>\n</div>", dependencies: [{ kind: "component", type: BitHelpComponent, selector: "bit-help" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2976
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitFooterMessagesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2977
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: BitFooterMessagesComponent, isStandalone: false, selector: "bit-footer-messages", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, maxCurrentItems: { classPropertyName: "maxCurrentItems", publicName: "maxCurrentItems", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, typeFooter: { classPropertyName: "typeFooter", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div>\n <div [class]=\"getStyle()\">\n <i class=\"fa fa-info\"></i>\n <span>{{message()}}</span>\n </div>\n\n <bit-help />\n</div>", dependencies: [{ kind: "component", type: BitHelpComponent, selector: "bit-help" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2994
2978
  }
2995
2979
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitFooterMessagesComponent, decorators: [{
2996
2980
  type: Component,
2997
- args: [{ selector: 'bit-footer-messages', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div>\n <div [class]=\"getStyle()\">\n <i class=\"fa fa-info\"></i>\n <span>{{message()}}</span>\n </div>\n\n <bit-help></bit-help>\n</div>" }]
2998
- }], ctorParameters: () => [{ type: TranslateService }] });
2981
+ args: [{ selector: 'bit-footer-messages', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div>\n <div [class]=\"getStyle()\">\n <i class=\"fa fa-info\"></i>\n <span>{{message()}}</span>\n </div>\n\n <bit-help />\n</div>" }]
2982
+ }] });
2999
2983
 
3000
2984
  /**
3001
2985
  * Componente que muestra un paginador en la sección footer.
@@ -3043,61 +3027,55 @@ class BitFooterComponent {
3043
3027
  this.onNewPageSize.emit(pageSize);
3044
3028
  }
3045
3029
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3046
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitFooterComponent, isStandalone: false, selector: "bit-footer", inputs: { totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, mostrarAvisos: { classPropertyName: "mostrarAvisos", publicName: "mostrarAvisos", isSignal: true, isRequired: false, transformFunction: null }, fixed: { classPropertyName: "fixed", publicName: "fixed", isSignal: true, isRequired: false, transformFunction: null }, typeFooter: { classPropertyName: "typeFooter", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPageChange: "onPageChange", onNewPageSize: "onNewPageSize" }, ngImport: i0, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator\n [paginator]=\"paginator()\"\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\"></bit-pajigator>\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages\n [type]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\"></bit-footer-messages>\n }\n\n</footer>\n", dependencies: [{ kind: "component", type: BitPajigatorComponent, selector: "bit-pajigator", inputs: ["paginator", "page", "totalItems", "rowsPerPageOptions", "itemsPerPage", "maxCurrentItems"], outputs: ["pageChange", "itemsPerPageChange", "onPageChange", "onPageSizeChange"] }, { kind: "component", type: BitFooterMessagesComponent, selector: "bit-footer-messages", inputs: ["status", "maxCurrentItems", "totalItems", "type"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3030
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitFooterComponent, isStandalone: false, selector: "bit-footer", inputs: { totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, mostrarAvisos: { classPropertyName: "mostrarAvisos", publicName: "mostrarAvisos", isSignal: true, isRequired: false, transformFunction: null }, fixed: { classPropertyName: "fixed", publicName: "fixed", isSignal: true, isRequired: false, transformFunction: null }, typeFooter: { classPropertyName: "typeFooter", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPageChange: "onPageChange", onNewPageSize: "onNewPageSize" }, ngImport: i0, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator [paginator]=\"paginator()\"\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\" />\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages [type]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\" />\n }\n\n</footer>\n", dependencies: [{ kind: "component", type: BitPajigatorComponent, selector: "bit-pajigator", inputs: ["paginator", "page", "totalItems", "rowsPerPageOptions", "itemsPerPage", "maxCurrentItems"], outputs: ["pageChange", "itemsPerPageChange", "onPageChange", "onPageSizeChange"] }, { kind: "component", type: BitFooterMessagesComponent, selector: "bit-footer-messages", inputs: ["status", "maxCurrentItems", "totalItems", "type"] }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3047
3031
  }
3048
3032
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitFooterComponent, decorators: [{
3049
3033
  type: Component,
3050
- args: [{ selector: "bit-footer", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator\n [paginator]=\"paginator()\"\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\"></bit-pajigator>\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages\n [type]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\"></bit-footer-messages>\n }\n\n</footer>\n" }]
3034
+ args: [{ selector: "bit-footer", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator [paginator]=\"paginator()\"\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\" />\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages [type]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\" />\n }\n\n</footer>\n" }]
3051
3035
  }] });
3052
3036
 
3053
3037
  class BitBotonAyudaComponent {
3054
- constructor(ayudaService) {
3055
- this.ayudaService = ayudaService;
3056
- this.boton = false; // show a little [?] or a full button
3057
- this.extraClass = ""; // extra CSS classes for HTML component
3038
+ constructor() {
3039
+ this.ayudaService = inject(AyudaService);
3040
+ this.ayuda = input(undefined, ...(ngDevMode ? [{ debugName: "ayuda" }] : []));
3041
+ this.boton = input(false, ...(ngDevMode ? [{ debugName: "boton" }] : [])); // show a little [?] or a full button
3042
+ this.extraClass = input("", ...(ngDevMode ? [{ debugName: "extraClass" }] : [])); // extra CSS classes for HTML component
3043
+ this.buttonSize = input(undefined, ...(ngDevMode ? [{ debugName: "buttonSize" }] : []));
3058
3044
  }
3059
3045
  mostrarAyuda() {
3060
- this.ayudaService.mostrarAyuda(this.ayuda);
3046
+ this.ayudaService.mostrarAyuda(this.ayuda());
3061
3047
  }
3062
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitBotonAyudaComponent, deps: [{ token: AyudaService }], target: i0.ɵɵFactoryTarget.Component }); }
3063
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitBotonAyudaComponent, isStandalone: false, selector: "bit-boton-ayuda", inputs: { ayuda: "ayuda", boton: "boton", extraClass: "extraClass", buttonSize: "buttonSize" }, ngImport: i0, template: `
3064
- @if (boton) {
3065
- <p-button type="button" (click)="mostrarAyuda()" [size]="buttonSize" [ngClass]="'p-button-outlined p-button-secondary ' + extraClass">
3048
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitBotonAyudaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3049
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitBotonAyudaComponent, isStandalone: false, selector: "bit-boton-ayuda", inputs: { ayuda: { classPropertyName: "ayuda", publicName: "ayuda", isSignal: true, isRequired: false, transformFunction: null }, boton: { classPropertyName: "boton", publicName: "boton", isSignal: true, isRequired: false, transformFunction: null }, extraClass: { classPropertyName: "extraClass", publicName: "extraClass", isSignal: true, isRequired: false, transformFunction: null }, buttonSize: { classPropertyName: "buttonSize", publicName: "buttonSize", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
3050
+ @if (boton()) {
3051
+ <p-button type="button" (click)="mostrarAyuda()" [size]="buttonSize()" [ngClass]="'p-button-outlined p-button-secondary ' + extraClass()">
3066
3052
  {{ "bitnglibrary.help" | transloco }}&nbsp;&nbsp;<span class="fa fa-life-ring"></span>
3067
3053
  </p-button>
3068
3054
  }
3069
3055
 
3070
- @if (!boton) {
3071
- <i [ngClass]="'btn-ayuda fa fa-question ' + extraClass" (click)="mostrarAyuda()"></i>
3056
+ @if (!boton()) {
3057
+ <i [ngClass]="'btn-ayuda fa fa-question ' + extraClass()" (click)="mostrarAyuda()"></i>
3072
3058
  }
3073
- `, isInline: true, dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }] }); }
3059
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] }); }
3074
3060
  }
3075
3061
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitBotonAyudaComponent, decorators: [{
3076
3062
  type: Component,
3077
3063
  args: [{
3078
3064
  selector: "bit-boton-ayuda",
3079
3065
  template: `
3080
- @if (boton) {
3081
- <p-button type="button" (click)="mostrarAyuda()" [size]="buttonSize" [ngClass]="'p-button-outlined p-button-secondary ' + extraClass">
3066
+ @if (boton()) {
3067
+ <p-button type="button" (click)="mostrarAyuda()" [size]="buttonSize()" [ngClass]="'p-button-outlined p-button-secondary ' + extraClass()">
3082
3068
  {{ "bitnglibrary.help" | transloco }}&nbsp;&nbsp;<span class="fa fa-life-ring"></span>
3083
3069
  </p-button>
3084
3070
  }
3085
3071
 
3086
- @if (!boton) {
3087
- <i [ngClass]="'btn-ayuda fa fa-question ' + extraClass" (click)="mostrarAyuda()"></i>
3072
+ @if (!boton()) {
3073
+ <i [ngClass]="'btn-ayuda fa fa-question ' + extraClass()" (click)="mostrarAyuda()"></i>
3088
3074
  }
3089
3075
  `,
3090
3076
  standalone: false
3091
3077
  }]
3092
- }], ctorParameters: () => [{ type: AyudaService }], propDecorators: { ayuda: [{
3093
- type: Input
3094
- }], boton: [{
3095
- type: Input
3096
- }], extraClass: [{
3097
- type: Input
3098
- }], buttonSize: [{
3099
- type: Input
3100
- }] } });
3078
+ }] });
3101
3079
 
3102
3080
  /**
3103
3081
  * Convierte un map de acciones del toolbar en un array de acciones pero conteniendo
@@ -3136,13 +3114,34 @@ class BitToolbarComponent extends BaseComponent {
3136
3114
  static { this.DELETE_BUTTON = "delete"; }
3137
3115
  static { this.ADD_BUTTON = "add"; }
3138
3116
  static { this.HELP_BUTTON = "help"; }
3139
- constructor(translateService) {
3117
+ constructor() {
3140
3118
  super();
3141
- this.translateService = translateService;
3119
+ this.translateService = inject(TranslateService);
3142
3120
  this.mostrar = false;
3143
- this.femenino = false; // género femenino (para los nombres de botones) o no
3144
- this.otherActionsDropdown = false; // determina si las "other actions" deben mostrarse en línea o como un desplegable
3145
- this.onToolbarButtonPressed = new EventEmitter();
3121
+ this.toolbar = input(...(ngDevMode ? [undefined, { debugName: "toolbar" }] : []));
3122
+ this.ayuda = input(...(ngDevMode ? [undefined, { debugName: "ayuda" }] : [])); // clave de la ayuda contextual que mostrar para su botón
3123
+ this.femenino = input(false, ...(ngDevMode ? [{ debugName: "femenino" }] : [])); // género femenino (para los nombres de botones) o no
3124
+ this.buttonSize = input(...(ngDevMode ? [undefined, { debugName: "buttonSize" }] : [])); // tamaño de los botones, por defecto normal
3125
+ this.otherActionsDropdown = input(false, ...(ngDevMode ? [{ debugName: "otherActionsDropdown" }] : [])); // determina si las "other actions" deben mostrarse en línea o como un desplegable
3126
+ this.onToolbarButtonPressed = output();
3127
+ this.mostrarOtherActionsEnDesplegable = computed(() => {
3128
+ // calcular si las other actions deben mostrarse en desplegable
3129
+ // (se ha pedido asi y hay más de una)
3130
+ let otherActionsVisibles = 0;
3131
+ for (let key in this.toolbar()) {
3132
+ const toolbar = this.toolbar();
3133
+ if (toolbar[key].otherAction && toolbar[key].visible) {
3134
+ otherActionsVisibles++;
3135
+ }
3136
+ }
3137
+ return this.otherActionsDropdown() && otherActionsVisibles > 1;
3138
+ }, ...(ngDevMode ? [{ debugName: "mostrarOtherActionsEnDesplegable" }] : []));
3139
+ this.itemsOtherActions = computed(() => {
3140
+ if (this.mostrarOtherActionsEnDesplegable()) {
3141
+ return this.getOtherActionsDropdownModel();
3142
+ }
3143
+ return [];
3144
+ }, ...(ngDevMode ? [{ debugName: "itemsOtherActions" }] : []));
3146
3145
  this.translateService.selectTranslate("toolbar", {}, "bitnglibrary", true)
3147
3146
  .pipe(takeUntil(this.destroy$))
3148
3147
  .subscribe((translations) => {
@@ -3150,16 +3149,20 @@ class BitToolbarComponent extends BaseComponent {
3150
3149
  });
3151
3150
  }
3152
3151
  enable(button) {
3153
- return this.toolbar && this.toolbar[button] && this.toolbar[button].enable;
3152
+ const toolbar = this.toolbar();
3153
+ return toolbar && toolbar[button] && toolbar[button].enable;
3154
3154
  }
3155
3155
  visible(button) {
3156
- return this.toolbar && this.toolbar[button] && this.toolbar[button].visible;
3156
+ const toolbar = this.toolbar();
3157
+ return toolbar && toolbar[button] && toolbar[button].visible;
3157
3158
  }
3158
3159
  label(button, defaultLabel) {
3159
- return (this.toolbar && this.toolbar[button] && this.toolbar[button].label) || defaultLabel;
3160
+ const toolbar = this.toolbar();
3161
+ return (toolbar && toolbar[button] && toolbar[button].label) || defaultLabel;
3160
3162
  }
3161
3163
  estilo(button, defaultValue) {
3162
- return (this.toolbar && this.toolbar[button] && this.toolbar[button].estilo) || defaultValue || "fa fa-balance-spinner";
3164
+ const toolbar = this.toolbar();
3165
+ return (toolbar && toolbar[button] && toolbar[button].estilo) || defaultValue || "fa fa-balance-spinner";
3163
3166
  }
3164
3167
  showFilter() {
3165
3168
  this.onToolbarButtonPressed.emit(BitToolbarComponent.FILTER_BUTTON);
@@ -3185,34 +3188,14 @@ class BitToolbarComponent extends BaseComponent {
3185
3188
  otherAction(button) {
3186
3189
  this.onToolbarButtonPressed.emit(button.action);
3187
3190
  }
3188
- /** escuchamos cuando la toolbar cambia para ajustar las other Actions */
3189
- ngOnChanges(changes) {
3190
- for (let propName in changes) {
3191
- let changedProp = changes[propName];
3192
- if (propName === "toolbar") {
3193
- this.toolbar = changedProp.currentValue;
3194
- // calcular si las other actions deben mostrarse en desplegable
3195
- // (se ha pedido asi y hay más de una)
3196
- let otherActionsVisibles = 0;
3197
- for (let key in this.toolbar) {
3198
- if (this.toolbar[key].otherAction && this.toolbar[key].visible) {
3199
- otherActionsVisibles++;
3200
- }
3201
- }
3202
- this.mostrarOtherActionsEnDesplegable = this.otherActionsDropdown && otherActionsVisibles > 1;
3203
- if (this.mostrarOtherActionsEnDesplegable) {
3204
- this.itemsOtherActions = this.getOtherActionsDropdownModel();
3205
- }
3206
- }
3207
- }
3208
- }
3209
3191
  // Recorremos el toolbar y devolvemos un array con las acciones que tengan la propiedad otherAction a true,
3210
3192
  // transformadas a MenuItem, para poder mostrarlas en el desplegable de SplitButton
3211
3193
  getOtherActionsDropdownModel() {
3212
3194
  let actions = [];
3213
- for (let key in this.toolbar) {
3214
- if (this.toolbar[key].otherAction) {
3215
- let toolbarItem = this.toolbar[key]; // capture the current toolbar item
3195
+ for (let key in this.toolbar()) {
3196
+ const toolbar = this.toolbar();
3197
+ if (toolbar[key].otherAction) {
3198
+ let toolbarItem = toolbar[key]; // capture the current toolbar item
3216
3199
  actions.push({
3217
3200
  label: this.translations[toolbarItem.label],
3218
3201
  icon: toolbarItem.estilo,
@@ -3223,36 +3206,28 @@ class BitToolbarComponent extends BaseComponent {
3223
3206
  }
3224
3207
  return actions;
3225
3208
  }
3226
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitToolbarComponent, deps: [{ token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3227
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitToolbarComponent, isStandalone: false, selector: "bit-toolbar", inputs: { toolbar: "toolbar", ayuda: "ayuda", femenino: "femenino", buttonSize: "buttonSize", otherActionsDropdown: "otherActionsDropdown" }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- acciones no estandar definidas din\u00E1micamente o muy particulares-->\n<!-- si otherActionsDropdown viene a true y hay m\u00E1s de una acci\u00F3n, se muestran como un desplegable, si no, todas las acciones en l\u00EDnea -->\n<div class=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable) {\n @if (otherActionsDropdown) {\n <p-splitbutton label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\" [model]=\"itemsOtherActions\" />\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable) {\n @for (button of (toolbar | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{(femenino ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\" [buttonSize]=\"buttonSize\"></bit-boton-ayuda>\n }\n</div>\n", dependencies: [{ kind: "component", type: i3$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3$3.SplitButton, selector: "p-splitbutton, p-splitButton, p-split-button", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "tooltip", "tooltipOptions", "styleClass", "menuStyle", "menuStyleClass", "dropdownIcon", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "tabindex", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onMenuHide", "onMenuShow", "onDropdownClick"] }, { kind: "component", type: BitBotonAyudaComponent, selector: "bit-boton-ayuda", inputs: ["ayuda", "boton", "extraClass", "buttonSize"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: OtherToolbarActionPipe, name: "otherToolbarAction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3210
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitToolbarComponent, isStandalone: false, selector: "bit-toolbar", inputs: { toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, ayuda: { classPropertyName: "ayuda", publicName: "ayuda", isSignal: true, isRequired: false, transformFunction: null }, femenino: { classPropertyName: "femenino", publicName: "femenino", isSignal: true, isRequired: false, transformFunction: null }, buttonSize: { classPropertyName: "buttonSize", publicName: "buttonSize", isSignal: true, isRequired: false, transformFunction: null }, otherActionsDropdown: { classPropertyName: "otherActionsDropdown", publicName: "otherActionsDropdown", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, usesInheritance: true, ngImport: i0, template: "<!-- acciones no estandar definidas din\u00E1micamente o muy particulares-->\n<!-- si otherActionsDropdown viene a true y hay m\u00E1s de una acci\u00F3n, se muestran como un desplegable, si no, todas las acciones en l\u00EDnea -->\n<div class=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable()) {\n @if (otherActionsDropdown()) {\n <p-splitbutton label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\" [model]=\"itemsOtherActions()\" />\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable()) {\n @for (button of (toolbar() | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize()\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize()\" styleClass=\"p-button-danger\">{{(femenino() ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize()\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize()\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize()\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize()\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize()\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda()) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda()\" [buttonSize]=\"buttonSize()\" />\n }\n</div>\n", dependencies: [{ kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i2$2.SplitButton, selector: "p-splitbutton, p-splitButton, p-split-button", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "tooltip", "tooltipOptions", "styleClass", "menuStyle", "menuStyleClass", "dropdownIcon", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "tabindex", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onMenuHide", "onMenuShow", "onDropdownClick"] }, { kind: "component", type: BitBotonAyudaComponent, selector: "bit-boton-ayuda", inputs: ["ayuda", "boton", "extraClass", "buttonSize"] }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: OtherToolbarActionPipe, name: "otherToolbarAction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3228
3211
  }
3229
3212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitToolbarComponent, decorators: [{
3230
3213
  type: Component,
3231
- args: [{ selector: "bit-toolbar", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- acciones no estandar definidas din\u00E1micamente o muy particulares-->\n<!-- si otherActionsDropdown viene a true y hay m\u00E1s de una acci\u00F3n, se muestran como un desplegable, si no, todas las acciones en l\u00EDnea -->\n<div class=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable) {\n @if (otherActionsDropdown) {\n <p-splitbutton label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\" [model]=\"itemsOtherActions\" />\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable) {\n @for (button of (toolbar | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{(femenino ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\" [buttonSize]=\"buttonSize\"></bit-boton-ayuda>\n }\n</div>\n" }]
3232
- }], ctorParameters: () => [{ type: TranslateService }], propDecorators: { toolbar: [{
3233
- type: Input
3234
- }], ayuda: [{
3235
- type: Input
3236
- }], femenino: [{
3237
- type: Input
3238
- }], buttonSize: [{
3239
- type: Input
3240
- }], otherActionsDropdown: [{
3241
- type: Input
3242
- }], onToolbarButtonPressed: [{
3243
- type: Output
3244
- }] } });
3214
+ args: [{ selector: "bit-toolbar", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- acciones no estandar definidas din\u00E1micamente o muy particulares-->\n<!-- si otherActionsDropdown viene a true y hay m\u00E1s de una acci\u00F3n, se muestran como un desplegable, si no, todas las acciones en l\u00EDnea -->\n<div class=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable()) {\n @if (otherActionsDropdown()) {\n <p-splitbutton label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\" [model]=\"itemsOtherActions()\" />\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable()) {\n @for (button of (toolbar() | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize()\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize()\" styleClass=\"p-button-danger\">{{(femenino() ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize()\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize()\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize()\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize()\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize()\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda()) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda()\" [buttonSize]=\"buttonSize()\" />\n }\n</div>\n" }]
3215
+ }], ctorParameters: () => [] });
3245
3216
 
3246
3217
  /**
3247
3218
  * Componente que muestra miga de pan y toolbar
3248
3219
  */
3249
3220
  class BitHeaderComponent {
3250
3221
  constructor() {
3251
- this.toolbar = {};
3252
- this.noToolbar = false;
3253
- this.otherActionsDropdown = false; // determina si las "other actions" deben mostrarse en línea o como un desplegable
3254
- this.femenino = false; // género femenino (para los nombres de botones) o no
3255
- this.onToolbarButtonPressed = new EventEmitter();
3222
+ this.toolbar = input({}, ...(ngDevMode ? [{ debugName: "toolbar" }] : []));
3223
+ this.noToolbar = input(false, ...(ngDevMode ? [{ debugName: "noToolbar" }] : []));
3224
+ this.otherActionsDropdown = input(false, ...(ngDevMode ? [{ debugName: "otherActionsDropdown" }] : [])); // determina si las "other actions" deben mostrarse en línea o como un desplegable
3225
+ this.breadcrumb = input(undefined, ...(ngDevMode ? [{ debugName: "breadcrumb" }] : []));
3226
+ this.masacciones = input(undefined, ...(ngDevMode ? [{ debugName: "masacciones" }] : []));
3227
+ this.colsBreadcrumb = input(undefined, ...(ngDevMode ? [{ debugName: "colsBreadcrumb" }] : []));
3228
+ this.femenino = input(false, ...(ngDevMode ? [{ debugName: "femenino" }] : [])); // género femenino (para los nombres de botones) o no
3229
+ this.ayuda = input(undefined, ...(ngDevMode ? [{ debugName: "ayuda" }] : [])); // clave de la ayuda contextual para la botonera
3230
+ this.onToolbarButtonPressed = output();
3256
3231
  }
3257
3232
  /** Tenemos que capturar el evento y volver a subirlo, por diseño Angular2 no permite enviar un evento de un nieto a su abuelo, solo
3258
3233
  * de hijo a padre
@@ -3261,101 +3236,61 @@ class BitHeaderComponent {
3261
3236
  this.onToolbarButtonPressed.emit(button);
3262
3237
  }
3263
3238
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3264
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitHeaderComponent, isStandalone: false, selector: "bit-header", inputs: { toolbar: "toolbar", noToolbar: "noToolbar", otherActionsDropdown: "otherActionsDropdown", breadcrumb: "breadcrumb", masacciones: "masacciones", colsBreadcrumb: "colsBreadcrumb", femenino: "femenino", ayuda: "ayuda" }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, ngImport: i0, template: "<!-- <div class=\"grid mt-3 mb-3\">\n<div class=\"col-12 lg:col-4 sm:col-4 caja-breadcrumb\"> -->\n <!-- ruta de donde nos encontramos (miga de pan) -->\n <!-- <bit-breadcrumb *ngIf=\"breadcrumb\" [breadcrumb]=\"breadcrumb\"></bit-breadcrumb>\n</div>\n<div *ngIf=\"noToolbar === false\"\n class=\"col-12 lg:col-8 sm:col-8\"> -->\n <!-- botonera de acciones -->\n <!-- <bit-toolbar\n [toolbar]=\"toolbar\"\n [femenino]=\"femenino\"\n [otherActionsDropdown]=\"otherActionsDropdown\"\n [ayuda]=\"ayuda\"\n(onToolbarButtonPressed)=\"onTBPressed($event)\"></bit-toolbar>\n</div>\n</div> -->\n\n<div class=\"grid mt-3 mb-3\">\n <div class=\"col-12 caja-breadcrumb\" [ngClass]=\"[colsBreadcrumb ? 'lg:col-' + colsBreadcrumb : 'lg:col-4']\">\n <!-- ruta de donde nos encontramos (miga de pan) -->\n @if (breadcrumb) {\n <bit-breadcrumb [breadcrumb]=\"breadcrumb\"></bit-breadcrumb>\n }\n </div>\n @if (noToolbar === false) {\n <div\n class=\"col-12\" [ngClass]=\"[colsBreadcrumb ? 'lg:col-' + (12- colsBreadcrumb) : 'lg:col-8']\">\n <!-- botonera de acciones -->\n <bit-toolbar\n [toolbar]=\"toolbar\"\n [femenino]=\"femenino\"\n [otherActionsDropdown]=\"otherActionsDropdown\"\n [ayuda]=\"ayuda\"\n (onToolbarButtonPressed)=\"onTBPressed($event)\"></bit-toolbar>\n </div>\n }\n</div>", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BitBreadCrumbComponent, selector: "bit-breadcrumb", inputs: ["breadcrumb"] }, { kind: "component", type: BitToolbarComponent, selector: "bit-toolbar", inputs: ["toolbar", "ayuda", "femenino", "buttonSize", "otherActionsDropdown"], outputs: ["onToolbarButtonPressed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitHeaderComponent, isStandalone: false, selector: "bit-header", inputs: { toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, noToolbar: { classPropertyName: "noToolbar", publicName: "noToolbar", isSignal: true, isRequired: false, transformFunction: null }, otherActionsDropdown: { classPropertyName: "otherActionsDropdown", publicName: "otherActionsDropdown", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null }, masacciones: { classPropertyName: "masacciones", publicName: "masacciones", isSignal: true, isRequired: false, transformFunction: null }, colsBreadcrumb: { classPropertyName: "colsBreadcrumb", publicName: "colsBreadcrumb", isSignal: true, isRequired: false, transformFunction: null }, femenino: { classPropertyName: "femenino", publicName: "femenino", isSignal: true, isRequired: false, transformFunction: null }, ayuda: { classPropertyName: "ayuda", publicName: "ayuda", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, ngImport: i0, template: "<!-- <div class=\"grid mt-3 mb-3\">\n<div class=\"col-12 lg:col-4 sm:col-4 caja-breadcrumb\"> -->\n <!-- ruta de donde nos encontramos (miga de pan) -->\n <!-- <bit-breadcrumb *ngIf=\"breadcrumb\" [breadcrumb]=\"breadcrumb\"></bit-breadcrumb>\n</div>\n<div *ngIf=\"noToolbar === false\"\n class=\"col-12 lg:col-8 sm:col-8\"> -->\n <!-- botonera de acciones -->\n <!-- <bit-toolbar\n [toolbar]=\"toolbar\"\n [femenino]=\"femenino\"\n [otherActionsDropdown]=\"otherActionsDropdown\"\n [ayuda]=\"ayuda\"\n(onToolbarButtonPressed)=\"onTBPressed($event)\"></bit-toolbar>\n</div>\n</div> -->\n\n<div class=\"grid mt-3 mb-3\">\n <div class=\"col-12 caja-breadcrumb\" [ngClass]=\"[colsBreadcrumb() ? 'lg:col-' + colsBreadcrumb() : 'lg:col-4']\">\n <!-- ruta de donde nos encontramos (miga de pan) -->\n @if (breadcrumb()) {\n <bit-breadcrumb [breadcrumb]=\"breadcrumb()\" />\n }\n </div>\n @if (noToolbar() === false) {\n <div\n class=\"col-12\" [ngClass]=\"[colsBreadcrumb() ? 'lg:col-' + (12- colsBreadcrumb()) : 'lg:col-8']\">\n <!-- botonera de acciones -->\n <bit-toolbar [toolbar]=\"toolbar()\"\n [femenino]=\"femenino()\"\n [otherActionsDropdown]=\"otherActionsDropdown()\"\n [ayuda]=\"ayuda()\"\n (onToolbarButtonPressed)=\"onTBPressed($event)\" />\n </div>\n }\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BitBreadCrumbComponent, selector: "bit-breadcrumb", inputs: ["breadcrumb"] }, { kind: "component", type: BitToolbarComponent, selector: "bit-toolbar", inputs: ["toolbar", "ayuda", "femenino", "buttonSize", "otherActionsDropdown"], outputs: ["onToolbarButtonPressed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3265
3240
  }
3266
3241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitHeaderComponent, decorators: [{
3267
3242
  type: Component,
3268
- args: [{ selector: "bit-header", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- <div class=\"grid mt-3 mb-3\">\n<div class=\"col-12 lg:col-4 sm:col-4 caja-breadcrumb\"> -->\n <!-- ruta de donde nos encontramos (miga de pan) -->\n <!-- <bit-breadcrumb *ngIf=\"breadcrumb\" [breadcrumb]=\"breadcrumb\"></bit-breadcrumb>\n</div>\n<div *ngIf=\"noToolbar === false\"\n class=\"col-12 lg:col-8 sm:col-8\"> -->\n <!-- botonera de acciones -->\n <!-- <bit-toolbar\n [toolbar]=\"toolbar\"\n [femenino]=\"femenino\"\n [otherActionsDropdown]=\"otherActionsDropdown\"\n [ayuda]=\"ayuda\"\n(onToolbarButtonPressed)=\"onTBPressed($event)\"></bit-toolbar>\n</div>\n</div> -->\n\n<div class=\"grid mt-3 mb-3\">\n <div class=\"col-12 caja-breadcrumb\" [ngClass]=\"[colsBreadcrumb ? 'lg:col-' + colsBreadcrumb : 'lg:col-4']\">\n <!-- ruta de donde nos encontramos (miga de pan) -->\n @if (breadcrumb) {\n <bit-breadcrumb [breadcrumb]=\"breadcrumb\"></bit-breadcrumb>\n }\n </div>\n @if (noToolbar === false) {\n <div\n class=\"col-12\" [ngClass]=\"[colsBreadcrumb ? 'lg:col-' + (12- colsBreadcrumb) : 'lg:col-8']\">\n <!-- botonera de acciones -->\n <bit-toolbar\n [toolbar]=\"toolbar\"\n [femenino]=\"femenino\"\n [otherActionsDropdown]=\"otherActionsDropdown\"\n [ayuda]=\"ayuda\"\n (onToolbarButtonPressed)=\"onTBPressed($event)\"></bit-toolbar>\n </div>\n }\n</div>" }]
3269
- }], propDecorators: { toolbar: [{
3270
- type: Input
3271
- }], noToolbar: [{
3272
- type: Input
3273
- }], otherActionsDropdown: [{
3274
- type: Input
3275
- }], breadcrumb: [{
3276
- type: Input
3277
- }], masacciones: [{
3278
- type: Input
3279
- }], colsBreadcrumb: [{
3280
- type: Input
3281
- }], femenino: [{
3282
- type: Input
3283
- }], ayuda: [{
3284
- type: Input
3285
- }], onToolbarButtonPressed: [{
3286
- type: Output
3287
- }] } });
3243
+ args: [{ selector: "bit-header", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- <div class=\"grid mt-3 mb-3\">\n<div class=\"col-12 lg:col-4 sm:col-4 caja-breadcrumb\"> -->\n <!-- ruta de donde nos encontramos (miga de pan) -->\n <!-- <bit-breadcrumb *ngIf=\"breadcrumb\" [breadcrumb]=\"breadcrumb\"></bit-breadcrumb>\n</div>\n<div *ngIf=\"noToolbar === false\"\n class=\"col-12 lg:col-8 sm:col-8\"> -->\n <!-- botonera de acciones -->\n <!-- <bit-toolbar\n [toolbar]=\"toolbar\"\n [femenino]=\"femenino\"\n [otherActionsDropdown]=\"otherActionsDropdown\"\n [ayuda]=\"ayuda\"\n(onToolbarButtonPressed)=\"onTBPressed($event)\"></bit-toolbar>\n</div>\n</div> -->\n\n<div class=\"grid mt-3 mb-3\">\n <div class=\"col-12 caja-breadcrumb\" [ngClass]=\"[colsBreadcrumb() ? 'lg:col-' + colsBreadcrumb() : 'lg:col-4']\">\n <!-- ruta de donde nos encontramos (miga de pan) -->\n @if (breadcrumb()) {\n <bit-breadcrumb [breadcrumb]=\"breadcrumb()\" />\n }\n </div>\n @if (noToolbar() === false) {\n <div\n class=\"col-12\" [ngClass]=\"[colsBreadcrumb() ? 'lg:col-' + (12- colsBreadcrumb()) : 'lg:col-8']\">\n <!-- botonera de acciones -->\n <bit-toolbar [toolbar]=\"toolbar()\"\n [femenino]=\"femenino()\"\n [otherActionsDropdown]=\"otherActionsDropdown()\"\n [ayuda]=\"ayuda()\"\n (onToolbarButtonPressed)=\"onTBPressed($event)\" />\n </div>\n }\n</div>" }]
3244
+ }] });
3288
3245
 
3289
3246
  class BitLoadingComponent {
3290
- constructor(generalUtils) {
3291
- this.generalUtils = generalUtils;
3292
- this.loading = false;
3247
+ constructor() {
3248
+ this.generalUtils = inject(GeneralUtils);
3249
+ this.imageSource = input(undefined, ...(ngDevMode ? [{ debugName: "imageSource", alias: "source" }] : [{ alias: "source" }]));
3250
+ this.loading = computed(() => this.generalUtils.loading() > 0, ...(ngDevMode ? [{ debugName: "loading" }] : []));
3293
3251
  console.log("Constructor bitloading");
3294
- this.inProgressCount = 0;
3295
- }
3296
- ngOnInit() {
3297
- this.subscription = this.generalUtils.observableLoading
3298
- .pipe(map(value => (value == "start" ? true : false)), startWith(false), delay(0) //esto es para evitar el error ExpressionChangedAfterItHasBeenCheckedError. Mas info en: https://blog.angular-university.io/angular-debugging/
3299
- )
3300
- .subscribe(value => {
3301
- if (value) {
3302
- this.inProgressCount++;
3303
- }
3304
- else {
3305
- if (this.inProgressCount > 0)
3306
- this.inProgressCount--;
3307
- }
3308
- this.loading = this.inProgressCount > 0;
3309
- });
3310
3252
  }
3311
3253
  ngOnDestroy() {
3312
- this.loading = false;
3313
- if (this.subscription != null)
3314
- this.subscription.unsubscribe();
3315
- }
3316
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitLoadingComponent, deps: [{ token: GeneralUtils }], target: i0.ɵɵFactoryTarget.Component }); }
3317
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitLoadingComponent, isStandalone: false, selector: "bit-loading", inputs: { imageSource: ["source", "imageSource"] }, ngImport: i0, template: `
3318
- @if (loading) {
3319
- <div class="modal">
3320
- <div class="grid">
3321
- <div class="col-12 text-center">
3322
- <i class="pi pi-spin pi-spinner icono-loading"></i>
3254
+ this.generalUtils.loading.set(0);
3255
+ }
3256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3257
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitLoadingComponent, isStandalone: false, selector: "bit-loading", inputs: { imageSource: { classPropertyName: "imageSource", publicName: "source", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
3258
+ @if (loading()) {
3259
+ <div class="modal">
3260
+ <div class="grid">
3261
+ <div class="col-12 text-center">
3262
+ <i class="pi pi-spin pi-spinner icono-loading"></i>
3263
+ </div>
3264
+ </div>
3323
3265
  </div>
3324
- </div>
3325
- </div>
3326
- }
3327
- `, isInline: true }); }
3266
+ }
3267
+ `, isInline: true }); }
3328
3268
  }
3329
3269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitLoadingComponent, decorators: [{
3330
3270
  type: Component,
3331
3271
  args: [{
3332
3272
  selector: "bit-loading",
3333
3273
  template: `
3334
- @if (loading) {
3335
- <div class="modal">
3336
- <div class="grid">
3337
- <div class="col-12 text-center">
3338
- <i class="pi pi-spin pi-spinner icono-loading"></i>
3274
+ @if (loading()) {
3275
+ <div class="modal">
3276
+ <div class="grid">
3277
+ <div class="col-12 text-center">
3278
+ <i class="pi pi-spin pi-spinner icono-loading"></i>
3279
+ </div>
3280
+ </div>
3339
3281
  </div>
3340
- </div>
3341
- </div>
3342
- }
3343
- `
3344
- //styleUrls: ["bit-loading.component.css"]
3345
- ,
3282
+ }
3283
+ `,
3346
3284
  standalone: false
3347
3285
  }]
3348
- }], ctorParameters: () => [{ type: GeneralUtils }], propDecorators: { imageSource: [{
3349
- type: Input,
3350
- args: ["source"]
3351
- }] } });
3286
+ }], ctorParameters: () => [] });
3352
3287
 
3353
3288
  class BitNotificationToastComponent extends BaseComponent {
3354
- constructor(bitMessageService, primeMessageService, translateService) {
3355
- super();
3356
- this.bitMessageService = bitMessageService;
3357
- this.primeMessageService = primeMessageService;
3358
- this.translateService = translateService;
3289
+ constructor() {
3290
+ super(...arguments);
3291
+ this.bitMessageService = inject(BitMessageService);
3292
+ this.primeMessageService = inject(MessageService);
3293
+ this.translateService = inject(TranslateService);
3359
3294
  }
3360
3295
  ngOnInit() {
3361
3296
  this.subscribeToNotifications();
@@ -3389,25 +3324,25 @@ class BitNotificationToastComponent extends BaseComponent {
3389
3324
  getLife(life) {
3390
3325
  return life ? life : DEFAULT_LIFE; // Si no se especifica el tiempo, usamos el valor por defecto
3391
3326
  }
3392
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNotificationToastComponent, deps: [{ token: BitMessageService }, { token: i2$1.MessageService }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3393
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitNotificationToastComponent, isStandalone: false, selector: "bit-notification-toast", usesInheritance: true, ngImport: i0, template: ` <p-toast key="notification" position="top-right"></p-toast> `, isInline: true, dependencies: [{ kind: "component", type: i3$4.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
3327
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNotificationToastComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3328
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitNotificationToastComponent, isStandalone: false, selector: "bit-notification-toast", usesInheritance: true, ngImport: i0, template: ` <p-toast key="notification" position="top-right" /> `, isInline: true, dependencies: [{ kind: "component", type: i1$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
3394
3329
  }
3395
3330
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNotificationToastComponent, decorators: [{
3396
3331
  type: Component,
3397
3332
  args: [{
3398
3333
  selector: "bit-notification-toast",
3399
- template: ` <p-toast key="notification" position="top-right"></p-toast> `,
3334
+ template: ` <p-toast key="notification" position="top-right" /> `,
3400
3335
  standalone: false
3401
3336
  }]
3402
- }], ctorParameters: () => [{ type: BitMessageService }, { type: i2$1.MessageService }, { type: TranslateService }] });
3337
+ }] });
3403
3338
  const DEFAULT_LIFE = 3000; // Tiempo por defecto en milisegundos para que se cierre la notificación
3404
3339
 
3405
3340
  class BitNotificationErrorComponent extends BaseComponent {
3406
- constructor(bitMessageService, primeMessageService, translateService) {
3407
- super();
3408
- this.bitMessageService = bitMessageService;
3409
- this.primeMessageService = primeMessageService;
3410
- this.translateService = translateService;
3341
+ constructor() {
3342
+ super(...arguments);
3343
+ this.bitMessageService = inject(BitMessageService);
3344
+ this.primeMessageService = inject(MessageService);
3345
+ this.translateService = inject(TranslateService);
3411
3346
  this.escape = input(true, ...(ngDevMode ? [{ debugName: "escape" }] : []));
3412
3347
  this.closable = input(true, ...(ngDevMode ? [{ debugName: "closable" }] : []));
3413
3348
  this.messages = [];
@@ -3520,8 +3455,8 @@ class BitNotificationErrorComponent extends BaseComponent {
3520
3455
  return of([]);
3521
3456
  }
3522
3457
  }
3523
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNotificationErrorComponent, deps: [{ token: BitMessageService }, { token: i2$1.MessageService }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3524
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: BitNotificationErrorComponent, isStandalone: false, selector: "bit-notification-error", inputs: { escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: ` <p-toast /> `, isInline: true, dependencies: [{ kind: "component", type: i3$4.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
3458
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNotificationErrorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3459
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: BitNotificationErrorComponent, isStandalone: false, selector: "bit-notification-error", inputs: { escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: ` <p-toast /> `, isInline: true, dependencies: [{ kind: "component", type: i1$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
3525
3460
  }
3526
3461
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNotificationErrorComponent, decorators: [{
3527
3462
  type: Component,
@@ -3530,13 +3465,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3530
3465
  template: ` <p-toast /> `,
3531
3466
  standalone: false
3532
3467
  }]
3533
- }], ctorParameters: () => [{ type: BitMessageService }, { type: i2$1.MessageService }, { type: TranslateService }] });
3468
+ }] });
3534
3469
 
3535
3470
  class FocusRegisterDirective {
3536
- constructor(elRef, renderer, focusService) {
3537
- this.elRef = elRef;
3538
- this.renderer = renderer;
3539
- this.focusService = focusService;
3471
+ constructor() {
3472
+ this.elRef = inject(ElementRef);
3473
+ this.renderer = inject(Renderer2);
3474
+ this.focusService = inject(FocusService);
3540
3475
  }
3541
3476
  onFocus() {
3542
3477
  this.focusService.focus(this.elRef.nativeElement.id);
@@ -3544,7 +3479,7 @@ class FocusRegisterDirective {
3544
3479
  onBlur() {
3545
3480
  this.focusService.clear();
3546
3481
  }
3547
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: FocusRegisterDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FocusService }], target: i0.ɵɵFactoryTarget.Directive }); }
3482
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: FocusRegisterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3548
3483
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: FocusRegisterDirective, isStandalone: false, selector: "input,select,textarea,bit-input,bit-select", host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" } }, ngImport: i0 }); }
3549
3484
  }
3550
3485
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: FocusRegisterDirective, decorators: [{
@@ -3554,7 +3489,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3554
3489
  ,
3555
3490
  standalone: false
3556
3491
  }]
3557
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FocusService }], propDecorators: { onFocus: [{
3492
+ }], propDecorators: { onFocus: [{
3558
3493
  type: HostListener,
3559
3494
  args: ["focus"]
3560
3495
  }], onBlur: [{
@@ -3563,61 +3498,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3563
3498
  }] } });
3564
3499
 
3565
3500
  class BitNGUploadComponent {
3566
- constructor(generalUtils, changeDetector) {
3567
- this.generalUtils = generalUtils;
3568
- this.changeDetector = changeDetector;
3569
- this.inputAccept = "*";
3570
- this.onSuccess = new EventEmitter();
3571
- this.onError = new EventEmitter();
3501
+ constructor() {
3502
+ this.generalUtils = inject(GeneralUtils);
3503
+ this.uploader = input.required(...(ngDevMode ? [{ debugName: "uploader" }] : []));
3504
+ this.hasDropZone = input(...(ngDevMode ? [undefined, { debugName: "hasDropZone" }] : []));
3505
+ this.hasQueue = input(...(ngDevMode ? [undefined, { debugName: "hasQueue" }] : []));
3506
+ this.hasSingleUpload = input(...(ngDevMode ? [undefined, { debugName: "hasSingleUpload" }] : []));
3507
+ this.hasMultipleUpload = input(...(ngDevMode ? [undefined, { debugName: "hasMultipleUpload" }] : []));
3508
+ this.deleteItemAfterUpload = input(...(ngDevMode ? [undefined, { debugName: "deleteItemAfterUpload" }] : []));
3509
+ this.canUpload = input(...(ngDevMode ? [undefined, { debugName: "canUpload" }] : []));
3510
+ this.hasProgressBar = input(...(ngDevMode ? [undefined, { debugName: "hasProgressBar" }] : []));
3511
+ this.sizeDropZone = input(...(ngDevMode ? [undefined, { debugName: "sizeDropZone" }] : []));
3512
+ this.sizeQueue = input(...(ngDevMode ? [undefined, { debugName: "sizeQueue" }] : []));
3513
+ this.inputAccept = input("*", ...(ngDevMode ? [{ debugName: "inputAccept" }] : []));
3514
+ this.onSuccess = output();
3515
+ this.onError = output();
3516
+ this.fileInput = viewChild("fileRef", ...(ngDevMode ? [{ debugName: "fileInput" }] : []));
3517
+ this.hasBaseDropZoneOver = signal(false, ...(ngDevMode ? [{ debugName: "hasBaseDropZoneOver" }] : []));
3572
3518
  }
3573
3519
  ngOnInit() {
3574
- this.uploader.onSuccessItem = (item, response, status, headers) => {
3520
+ this.uploader().onSuccessItem = (item, response, status, headers) => {
3575
3521
  console.log("success upload file");
3576
3522
  this.stopLoading();
3577
3523
  this.onSuccess.emit({ item, response, status, headers });
3578
- if (this.deleteItemAfterUpload) {
3524
+ if (this.deleteItemAfterUpload()) {
3579
3525
  item.remove();
3580
3526
  }
3581
3527
  };
3582
- this.uploader.onErrorItem = (item, response, status, headers) => {
3528
+ this.uploader().onErrorItem = (item, response, status, headers) => {
3583
3529
  console.log("error upload file");
3584
3530
  this.stopLoading();
3585
3531
  this.onError.emit({ item, response, status, headers });
3586
3532
  };
3587
- this.uploader.onProgressItem = (item, progress) => {
3533
+ this.uploader().onProgressItem = (item, progress) => {
3588
3534
  console.log(progress);
3589
- this.changeDetector.detectChanges();
3590
3535
  };
3591
- this.hasBaseDropZoneOver = false;
3536
+ this.hasBaseDropZoneOver.set(true);
3592
3537
  }
3593
3538
  /** Arrancará el spinner en el caso de que la barra de progreso esté desactivada*/
3594
3539
  startLoading() {
3595
- if (!this.hasProgressBar) {
3540
+ if (!this.hasProgressBar()) {
3596
3541
  this.generalUtils.startLoading();
3597
3542
  }
3598
3543
  }
3599
3544
  /** Parará el spinner en el caso de que la barra de progreso esté desactivada*/
3600
3545
  stopLoading() {
3601
- if (!this.hasProgressBar) {
3546
+ if (!this.hasProgressBar()) {
3602
3547
  this.generalUtils.stopLoading();
3603
3548
  }
3604
3549
  }
3605
3550
  /** Sube todos los ficheros en cola al servidor */
3606
3551
  uploadAll() {
3607
3552
  this.startLoading();
3608
- this.uploader.uploadAll();
3553
+ this.uploader().uploadAll();
3609
3554
  }
3610
3555
  /** Elimina la cola de ficheros y des-selecciona el fichero que pudiera estar seleccionado en el single input file */
3611
3556
  removeQueue() {
3612
3557
  this.stopLoading();
3613
- this.uploader.clearQueue();
3614
- this.changeDetector.detectChanges();
3558
+ this.uploader().clearQueue();
3615
3559
  this.removeInputFile();
3616
3560
  }
3617
3561
  /** Cancela la subida de ficheros al servidor */
3618
3562
  cancelQueue() {
3619
3563
  this.stopLoading();
3620
- this.uploader.cancelAll();
3564
+ this.uploader().cancelAll();
3621
3565
  }
3622
3566
  /** Sube un fichero al servidor de manera individual */
3623
3567
  uploadFile(item) {
@@ -3629,7 +3573,8 @@ class BitNGUploadComponent {
3629
3573
  */
3630
3574
  removeFile(item) {
3631
3575
  this.stopLoading();
3632
- if (this.fileInput && this.fileInput.nativeElement.value.indexOf(item.file.name) != -1) {
3576
+ const fileInput = this.fileInput();
3577
+ if (fileInput && fileInput.nativeElement.value.indexOf(item.file.name) != -1) {
3633
3578
  this.removeInputFile();
3634
3579
  }
3635
3580
  item.remove();
@@ -3641,49 +3586,21 @@ class BitNGUploadComponent {
3641
3586
  }
3642
3587
  /** Des-selecciona el fichero seleccionado en el input file */
3643
3588
  removeInputFile() {
3644
- if (this.fileInput)
3645
- this.fileInput.nativeElement.value = "";
3589
+ const fileInput = this.fileInput();
3590
+ if (fileInput)
3591
+ fileInput.nativeElement.value = "";
3646
3592
  }
3647
3593
  /** Evento que se dispara cuando arrastran un fichero a la zona de drag&drop */
3648
3594
  fileOverBase(e) {
3649
- this.hasBaseDropZoneOver = e;
3595
+ this.hasBaseDropZoneOver.set(e);
3650
3596
  }
3651
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNGUploadComponent, deps: [{ token: GeneralUtils }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3652
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitNGUploadComponent, isStandalone: false, selector: "bit-ng-upload", inputs: { uploader: "uploader", hasDropZone: "hasDropZone", hasQueue: "hasQueue", hasSingleUpload: "hasSingleUpload", hasMultipleUpload: "hasMultipleUpload", deleteItemAfterUpload: "deleteItemAfterUpload", canUpload: "canUpload", hasProgressBar: "hasProgressBar", sizeDropZone: "sizeDropZone", sizeQueue: "sizeQueue", inputAccept: "inputAccept" }, outputs: { onSuccess: "onSuccess", onError: "onError" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileRef"], descendants: true }], ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n @if (hasDropZone) {\n <div\n ng2FileDrop\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver}\"\n (fileOver)=\"fileOverBase($event)\"\n [uploader]=\"uploader\"\n class=\"well my-drop-zone\">\n <div class=\"contenedor-upload\">\n <i class=\"fa fa-file documento\"></i>\n <div>\n <span>{{ \"bitnglibrary.upload.dropfiles\" | transloco }}</span>\n <div class=\"grid\">\n <div class=\"col-12\">\n @if (hasMultipleUpload) {\n <label class=\"btn-upload\">\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple [accept]=\"inputAccept\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.multiple' | transloco}}\n </label>\n }\n @if (hasSingleUpload) {\n <label class=\"btn-upload\">\n <input #fileRef type=\"file\" ng2FileSelect [uploader]=\"uploader\" [accept]=\"inputAccept\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.simple' | transloco}}\n </label>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<div class=\"grid\">\n @if (hasQueue) {\n <div class=\"col-12\">\n <p>{{\"bitnglibrary.upload.uploadfiles\" | transloco}}: {{ uploader?.queue?.length }}</p>\n <p-table [value]=\"uploader.queue\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th width=\"50%\">{{\"bitnglibrary.upload.filename\" | transloco}}</th>\n @if (uploader.options.isHTML5) {\n <th>{{\"bitnglibrary.upload.filesize\" | transloco}}</th>\n }\n @if (uploader.options.isHTML5 && hasProgressBar) {\n <th>{{\"bitnglibrary.upload.progress\" | transloco}}</th>\n }\n @if (canUpload) {\n <th>Estat</th>\n }\n <th>{{\"bitnglibrary.upload.actions\" | transloco}}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item>\n <tr>\n <td><strong>{{ item?.file?.name }}</strong></td>\n @if (uploader.options.isHTML5) {\n <td nowrap>{{ item?.file?.size/1024 | number:'.2' }} KB</td>\n }\n @if (uploader.options.isHTML5 && hasProgressBar) {\n <td>\n <div class=\"progress\" style=\"margin-bottom: 0;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': item.progress + '%' }\"></div>\n </div>\n </td>\n }\n @if (canUpload) {\n <td class=\"p-text-center\">\n @if (item.isSuccess) {\n <span><i class=\"fa fa-check\"></i></span>\n }\n @if (item.isCancel) {\n <span><i class=\"fa fa-ban\"></i></span>\n }\n @if (item.isError) {\n <span><i class=\"fa fa-times\"></i></span>\n }\n </td>\n }\n <td nowrap>\n @if (canUpload) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.upload' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadFile(item)\" [disabled]=\"item.isReady || item.isUploading || item.isSuccess\">\n </p-button>\n }\n @if (canUpload) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelupload' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelFile(item)\" [disabled]=\"!item.isUploading\">\n </p-button>\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removefromqueue' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeFile(item)\">\n </p-button>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (hasProgressBar) {\n <div class=\"cola-progreso\">\n <span>{{\"bitnglibrary.upload.progressqueue\" | transloco}}<span>{{(uploader.progress.toString() == 'NaN'? (\"bitnglibrary.upload.finishupload\"|transloco): uploader.progress + '&nbsp;%')}}</span></span>\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': (uploader.progress.toString() == 'NaN'?'0':uploader.progress) + '%' }\"></div>\n </div>\n </div>\n }\n <div>\n @if (canUpload) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.uploadall' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadAll()\" [disabled]=\"!uploader.getNotUploadedItems().length\">\n </p-button>\n }\n @if (canUpload) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelall' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelQueue()\" [disabled]=\"!uploader.isUploading\">\n </p-button>\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removeall' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeQueue()\" [disabled]=\"!uploader.queue.length\">\n </p-button>\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i5$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i6.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i6.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3597
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNGUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3598
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitNGUploadComponent, isStandalone: false, selector: "bit-ng-upload", inputs: { uploader: { classPropertyName: "uploader", publicName: "uploader", isSignal: true, isRequired: true, transformFunction: null }, hasDropZone: { classPropertyName: "hasDropZone", publicName: "hasDropZone", isSignal: true, isRequired: false, transformFunction: null }, hasQueue: { classPropertyName: "hasQueue", publicName: "hasQueue", isSignal: true, isRequired: false, transformFunction: null }, hasSingleUpload: { classPropertyName: "hasSingleUpload", publicName: "hasSingleUpload", isSignal: true, isRequired: false, transformFunction: null }, hasMultipleUpload: { classPropertyName: "hasMultipleUpload", publicName: "hasMultipleUpload", isSignal: true, isRequired: false, transformFunction: null }, deleteItemAfterUpload: { classPropertyName: "deleteItemAfterUpload", publicName: "deleteItemAfterUpload", isSignal: true, isRequired: false, transformFunction: null }, canUpload: { classPropertyName: "canUpload", publicName: "canUpload", isSignal: true, isRequired: false, transformFunction: null }, hasProgressBar: { classPropertyName: "hasProgressBar", publicName: "hasProgressBar", isSignal: true, isRequired: false, transformFunction: null }, sizeDropZone: { classPropertyName: "sizeDropZone", publicName: "sizeDropZone", isSignal: true, isRequired: false, transformFunction: null }, sizeQueue: { classPropertyName: "sizeQueue", publicName: "sizeQueue", isSignal: true, isRequired: false, transformFunction: null }, inputAccept: { classPropertyName: "inputAccept", publicName: "inputAccept", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSuccess: "onSuccess", onError: "onError" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n @if (hasDropZone()) {\n <div\n ng2FileDrop\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver()}\"\n (fileOver)=\"fileOverBase($event)\"\n [uploader]=\"uploader()\"\n class=\"well my-drop-zone\">\n <div class=\"contenedor-upload\">\n <i class=\"fa fa-file documento\"></i>\n <div>\n <span>{{ \"bitnglibrary.upload.dropfiles\" | transloco }}</span>\n <div class=\"grid\">\n <div class=\"col-12\">\n @if (hasMultipleUpload()) {\n <label class=\"btn-upload\">\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader()\" multiple [accept]=\"inputAccept()\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.multiple' | transloco}}\n </label>\n }\n @if (hasSingleUpload()) {\n <label class=\"btn-upload\">\n <input #fileRef type=\"file\" ng2FileSelect [uploader]=\"uploader()\" [accept]=\"inputAccept()\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.simple' | transloco}}\n </label>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<div class=\"grid\">\n @if (hasQueue()) {\n <div class=\"col-12\">\n <p>{{\"bitnglibrary.upload.uploadfiles\" | transloco}}: {{ uploader()?.queue?.length }}</p>\n <p-table [value]=\"uploader()?.queue\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th width=\"50%\">{{\"bitnglibrary.upload.filename\" | transloco}}</th>\n @if (uploader().options.isHTML5) {\n <th>{{\"bitnglibrary.upload.filesize\" | transloco}}</th>\n }\n @if (uploader().options.isHTML5 && hasProgressBar()) {\n <th>{{\"bitnglibrary.upload.progress\" | transloco}}</th>\n }\n @if (canUpload()) {\n <th>Estat</th>\n }\n <th>{{\"bitnglibrary.upload.actions\" | transloco}}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item>\n <tr>\n <td><strong>{{ item?.file?.name }}</strong></td>\n @if (uploader()?.options?.isHTML5) {\n <td nowrap>{{ item?.file?.size/1024 | number:'.2' }} KB</td>\n }\n @if (uploader().options.isHTML5 && hasProgressBar()) {\n <td>\n <div class=\"progress\" style=\"margin-bottom: 0;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': item.progress + '%' }\"></div>\n </div>\n </td>\n }\n @if (canUpload()) {\n <td class=\"p-text-center\">\n @if (item.isSuccess) {\n <span><i class=\"fa fa-check\"></i></span>\n }\n @if (item.isCancel) {\n <span><i class=\"fa fa-ban\"></i></span>\n }\n @if (item.isError) {\n <span><i class=\"fa fa-times\"></i></span>\n }\n </td>\n }\n <td nowrap>\n @if (canUpload()) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.upload' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadFile(item)\" [disabled]=\"item.isReady || item.isUploading || item.isSuccess\" />\n }\n @if (canUpload()) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelupload' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelFile(item)\" [disabled]=\"!item.isUploading\" />\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removefromqueue' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeFile(item)\" />\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (hasProgressBar()) {\n <div class=\"cola-progreso\">\n <span>{{\"bitnglibrary.upload.progressqueue\" | transloco}}<span>{{(uploader()?.progress?.toString() == 'NaN'? (\"bitnglibrary.upload.finishupload\"|transloco): uploader()?.progress + '&nbsp;%')}}</span></span>\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': (uploader()?.progress?.toString() == 'NaN'?'0':uploader()?.progress) + '%' }\"></div>\n </div>\n </div>\n }\n <div>\n\n @if (canUpload()) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.uploadall' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadAll()\" [disabled]=\"!(uploader()?.getNotUploadedItems()?.length)\" />\n }\n @if (canUpload()) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelall' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelQueue()\" [disabled]=\"!(uploader()?.isUploading)\" />\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removeall' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeQueue()\" [disabled]=\"!(uploader()?.queue?.length)\" />\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i5.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i5.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3653
3599
  }
3654
3600
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNGUploadComponent, decorators: [{
3655
3601
  type: Component,
3656
- args: [{ selector: "bit-ng-upload", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"grid\">\n <div class=\"col-12\">\n @if (hasDropZone) {\n <div\n ng2FileDrop\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver}\"\n (fileOver)=\"fileOverBase($event)\"\n [uploader]=\"uploader\"\n class=\"well my-drop-zone\">\n <div class=\"contenedor-upload\">\n <i class=\"fa fa-file documento\"></i>\n <div>\n <span>{{ \"bitnglibrary.upload.dropfiles\" | transloco }}</span>\n <div class=\"grid\">\n <div class=\"col-12\">\n @if (hasMultipleUpload) {\n <label class=\"btn-upload\">\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple [accept]=\"inputAccept\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.multiple' | transloco}}\n </label>\n }\n @if (hasSingleUpload) {\n <label class=\"btn-upload\">\n <input #fileRef type=\"file\" ng2FileSelect [uploader]=\"uploader\" [accept]=\"inputAccept\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.simple' | transloco}}\n </label>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<div class=\"grid\">\n @if (hasQueue) {\n <div class=\"col-12\">\n <p>{{\"bitnglibrary.upload.uploadfiles\" | transloco}}: {{ uploader?.queue?.length }}</p>\n <p-table [value]=\"uploader.queue\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th width=\"50%\">{{\"bitnglibrary.upload.filename\" | transloco}}</th>\n @if (uploader.options.isHTML5) {\n <th>{{\"bitnglibrary.upload.filesize\" | transloco}}</th>\n }\n @if (uploader.options.isHTML5 && hasProgressBar) {\n <th>{{\"bitnglibrary.upload.progress\" | transloco}}</th>\n }\n @if (canUpload) {\n <th>Estat</th>\n }\n <th>{{\"bitnglibrary.upload.actions\" | transloco}}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item>\n <tr>\n <td><strong>{{ item?.file?.name }}</strong></td>\n @if (uploader.options.isHTML5) {\n <td nowrap>{{ item?.file?.size/1024 | number:'.2' }} KB</td>\n }\n @if (uploader.options.isHTML5 && hasProgressBar) {\n <td>\n <div class=\"progress\" style=\"margin-bottom: 0;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': item.progress + '%' }\"></div>\n </div>\n </td>\n }\n @if (canUpload) {\n <td class=\"p-text-center\">\n @if (item.isSuccess) {\n <span><i class=\"fa fa-check\"></i></span>\n }\n @if (item.isCancel) {\n <span><i class=\"fa fa-ban\"></i></span>\n }\n @if (item.isError) {\n <span><i class=\"fa fa-times\"></i></span>\n }\n </td>\n }\n <td nowrap>\n @if (canUpload) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.upload' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadFile(item)\" [disabled]=\"item.isReady || item.isUploading || item.isSuccess\">\n </p-button>\n }\n @if (canUpload) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelupload' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelFile(item)\" [disabled]=\"!item.isUploading\">\n </p-button>\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removefromqueue' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeFile(item)\">\n </p-button>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (hasProgressBar) {\n <div class=\"cola-progreso\">\n <span>{{\"bitnglibrary.upload.progressqueue\" | transloco}}<span>{{(uploader.progress.toString() == 'NaN'? (\"bitnglibrary.upload.finishupload\"|transloco): uploader.progress + '&nbsp;%')}}</span></span>\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': (uploader.progress.toString() == 'NaN'?'0':uploader.progress) + '%' }\"></div>\n </div>\n </div>\n }\n <div>\n @if (canUpload) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.uploadall' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadAll()\" [disabled]=\"!uploader.getNotUploadedItems().length\">\n </p-button>\n }\n @if (canUpload) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelall' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelQueue()\" [disabled]=\"!uploader.isUploading\">\n </p-button>\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removeall' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeQueue()\" [disabled]=\"!uploader.queue.length\">\n </p-button>\n </div>\n </div>\n }\n</div>\n" }]
3657
- }], ctorParameters: () => [{ type: GeneralUtils }, { type: i0.ChangeDetectorRef }], propDecorators: { uploader: [{
3658
- type: Input
3659
- }], hasDropZone: [{
3660
- type: Input
3661
- }], hasQueue: [{
3662
- type: Input
3663
- }], hasSingleUpload: [{
3664
- type: Input
3665
- }], hasMultipleUpload: [{
3666
- type: Input
3667
- }], deleteItemAfterUpload: [{
3668
- type: Input
3669
- }], canUpload: [{
3670
- type: Input
3671
- }], hasProgressBar: [{
3672
- type: Input
3673
- }], sizeDropZone: [{
3674
- type: Input
3675
- }], sizeQueue: [{
3676
- type: Input
3677
- }], inputAccept: [{
3678
- type: Input
3679
- }], onSuccess: [{
3680
- type: Output
3681
- }], onError: [{
3682
- type: Output
3683
- }], fileInput: [{
3684
- type: ViewChild,
3685
- args: ["fileRef"]
3686
- }] } });
3602
+ args: [{ selector: "bit-ng-upload", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"grid\">\n <div class=\"col-12\">\n @if (hasDropZone()) {\n <div\n ng2FileDrop\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver()}\"\n (fileOver)=\"fileOverBase($event)\"\n [uploader]=\"uploader()\"\n class=\"well my-drop-zone\">\n <div class=\"contenedor-upload\">\n <i class=\"fa fa-file documento\"></i>\n <div>\n <span>{{ \"bitnglibrary.upload.dropfiles\" | transloco }}</span>\n <div class=\"grid\">\n <div class=\"col-12\">\n @if (hasMultipleUpload()) {\n <label class=\"btn-upload\">\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader()\" multiple [accept]=\"inputAccept()\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.multiple' | transloco}}\n </label>\n }\n @if (hasSingleUpload()) {\n <label class=\"btn-upload\">\n <input #fileRef type=\"file\" ng2FileSelect [uploader]=\"uploader()\" [accept]=\"inputAccept()\" />\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.simple' | transloco}}\n </label>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<div class=\"grid\">\n @if (hasQueue()) {\n <div class=\"col-12\">\n <p>{{\"bitnglibrary.upload.uploadfiles\" | transloco}}: {{ uploader()?.queue?.length }}</p>\n <p-table [value]=\"uploader()?.queue\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th width=\"50%\">{{\"bitnglibrary.upload.filename\" | transloco}}</th>\n @if (uploader().options.isHTML5) {\n <th>{{\"bitnglibrary.upload.filesize\" | transloco}}</th>\n }\n @if (uploader().options.isHTML5 && hasProgressBar()) {\n <th>{{\"bitnglibrary.upload.progress\" | transloco}}</th>\n }\n @if (canUpload()) {\n <th>Estat</th>\n }\n <th>{{\"bitnglibrary.upload.actions\" | transloco}}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item>\n <tr>\n <td><strong>{{ item?.file?.name }}</strong></td>\n @if (uploader()?.options?.isHTML5) {\n <td nowrap>{{ item?.file?.size/1024 | number:'.2' }} KB</td>\n }\n @if (uploader().options.isHTML5 && hasProgressBar()) {\n <td>\n <div class=\"progress\" style=\"margin-bottom: 0;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': item.progress + '%' }\"></div>\n </div>\n </td>\n }\n @if (canUpload()) {\n <td class=\"p-text-center\">\n @if (item.isSuccess) {\n <span><i class=\"fa fa-check\"></i></span>\n }\n @if (item.isCancel) {\n <span><i class=\"fa fa-ban\"></i></span>\n }\n @if (item.isError) {\n <span><i class=\"fa fa-times\"></i></span>\n }\n </td>\n }\n <td nowrap>\n @if (canUpload()) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.upload' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadFile(item)\" [disabled]=\"item.isReady || item.isUploading || item.isSuccess\" />\n }\n @if (canUpload()) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelupload' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelFile(item)\" [disabled]=\"!item.isUploading\" />\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removefromqueue' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeFile(item)\" />\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (hasProgressBar()) {\n <div class=\"cola-progreso\">\n <span>{{\"bitnglibrary.upload.progressqueue\" | transloco}}<span>{{(uploader()?.progress?.toString() == 'NaN'? (\"bitnglibrary.upload.finishupload\"|transloco): uploader()?.progress + '&nbsp;%')}}</span></span>\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': (uploader()?.progress?.toString() == 'NaN'?'0':uploader()?.progress) + '%' }\"></div>\n </div>\n </div>\n }\n <div>\n\n @if (canUpload()) {\n <p-button icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.uploadall' | transloco}}\" styleClass=\"p-button-success\"\n (click)=\"uploadAll()\" [disabled]=\"!(uploader()?.getNotUploadedItems()?.length)\" />\n }\n @if (canUpload()) {\n <p-button icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelall' | transloco}}\" styleClass=\"p-button-warning\"\n (click)=\"cancelQueue()\" [disabled]=\"!(uploader()?.isUploading)\" />\n }\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removeall' | transloco}}\" styleClass=\"p-button-danger\"\n (click)=\"removeQueue()\" [disabled]=\"!(uploader()?.queue?.length)\" />\n </div>\n </div>\n }\n</div>\n" }]
3603
+ }] });
3687
3604
 
3688
3605
  /**
3689
3606
  * Componente general que muestra controles de sesión de usuario.
@@ -3691,47 +3608,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3691
3608
  * Informa del login actualmente en sesión
3692
3609
  */
3693
3610
  class BitUserControlsComponent {
3694
- constructor() { }
3695
- get json() {
3696
- return this.usuario && JSON.stringify(this.usuario, null, 4);
3611
+ constructor() {
3612
+ this.usuario = input.required(...(ngDevMode ? [{ debugName: "usuario" }] : []));
3613
+ this.json = computed(() => JSON.stringify(this.usuario(), null, 4), ...(ngDevMode ? [{ debugName: "json" }] : []));
3697
3614
  }
3698
3615
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitUserControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3699
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitUserControlsComponent, isStandalone: false, selector: "bit-user-controls", inputs: { usuario: "usuario" }, ngImport: i0, template: `
3700
- @if (usuario) {
3701
- <span class="userControls"><span class="fa fa-user" title="{{ json }}"></span>&nbsp;&nbsp;{{ usuario.nombreCompleto }} ({{usuario.login}})&nbsp;&nbsp;</span>
3702
- }
3703
- `, isInline: true }); }
3616
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitUserControlsComponent, isStandalone: false, selector: "bit-user-controls", inputs: { usuario: { classPropertyName: "usuario", publicName: "usuario", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (usuario()) {\n <span class=\"userControls\"><span class=\"fa fa-user\" title=\"{{ json() }}\"></span>&nbsp;&nbsp;{{ usuario().nombreCompleto }} ({{usuario().login}})&nbsp;&nbsp;</span>\n}" }); }
3704
3617
  }
3705
3618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitUserControlsComponent, decorators: [{
3706
3619
  type: Component,
3707
- args: [{
3708
- selector: "bit-user-controls",
3709
- template: `
3710
- @if (usuario) {
3711
- <span class="userControls"><span class="fa fa-user" title="{{ json }}"></span>&nbsp;&nbsp;{{ usuario.nombreCompleto }} ({{usuario.login}})&nbsp;&nbsp;</span>
3712
- }
3713
- `
3714
- //styleUrls:['bit-user-controls.component.css']
3715
- ,
3716
- standalone: false
3717
- }]
3718
- }], ctorParameters: () => [], propDecorators: { usuario: [{
3719
- type: Input
3720
- }] } });
3620
+ args: [{ selector: "bit-user-controls", standalone: false, template: "@if (usuario()) {\n <span class=\"userControls\"><span class=\"fa fa-user\" title=\"{{ json() }}\"></span>&nbsp;&nbsp;{{ usuario().nombreCompleto }} ({{usuario().login}})&nbsp;&nbsp;</span>\n}" }]
3621
+ }] });
3721
3622
 
3722
3623
  /**
3723
3624
  * Componenente que muestra un paginador en la sección footer.
3724
3625
  **/
3725
3626
  class BitColumnBooleanComponent {
3726
3627
  constructor() {
3727
- this.textTrue = "";
3728
- this.textFalse = "No";
3628
+ this.data = input(undefined, ...(ngDevMode ? [{ debugName: "data" }] : [])); // objeto del que extraer la propiedad
3629
+ this.field = input(undefined, ...(ngDevMode ? [{ debugName: "field" }] : [])); // propiedad booleana que procesar
3630
+ this.textTrue = input("Sí", ...(ngDevMode ? [{ debugName: "textTrue" }] : []));
3631
+ this.textFalse = input("No", ...(ngDevMode ? [{ debugName: "textFalse" }] : []));
3729
3632
  }
3730
3633
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitColumnBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3731
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitColumnBooleanComponent, isStandalone: false, selector: "bit-column-boolean", inputs: { data: "data", field: "field", textTrue: "textTrue", textFalse: "textFalse" }, ngImport: i0, template: `
3732
- @if (data) {
3634
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitColumnBooleanComponent, isStandalone: false, selector: "bit-column-boolean", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, textTrue: { classPropertyName: "textTrue", publicName: "textTrue", isSignal: true, isRequired: false, transformFunction: null }, textFalse: { classPropertyName: "textFalse", publicName: "textFalse", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
3635
+ @if (data()) {
3733
3636
  <span class="ui-cell-data">
3734
- {{ data[field] ? textTrue : textFalse }}
3637
+ {{ data()[field()] ? textTrue() : textFalse() }}
3735
3638
  </span>
3736
3639
  }
3737
3640
  `, isInline: true }); }
@@ -3741,49 +3644,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3741
3644
  args: [{
3742
3645
  selector: "bit-column-boolean",
3743
3646
  template: `
3744
- @if (data) {
3647
+ @if (data()) {
3745
3648
  <span class="ui-cell-data">
3746
- {{ data[field] ? textTrue : textFalse }}
3649
+ {{ data()[field()] ? textTrue() : textFalse() }}
3747
3650
  </span>
3748
3651
  }
3749
3652
  `,
3750
3653
  standalone: false
3751
3654
  }]
3752
- }], ctorParameters: () => [], propDecorators: { data: [{
3753
- type: Input
3754
- }], field: [{
3755
- type: Input
3756
- }], textTrue: [{
3757
- type: Input
3758
- }], textFalse: [{
3759
- type: Input
3760
- }] } });
3655
+ }], ctorParameters: () => [] });
3761
3656
 
3762
3657
  class BitDomainValueComponent {
3763
3658
  constructor() {
3764
- this.translatedValue = "carregant...";
3765
- this.emptyText = "";
3766
- }
3767
- ngOnChanges() {
3768
- // cada vez que cambia algo en el input, recalculamos
3769
- this.translatedValue = this.resolveTranslatedValue();
3770
- }
3771
- resolveTranslatedValue() {
3772
- // buscar traducción para el valor en el dominio
3773
- let domainMatch = this.data && this.data.find(obj => obj.value == this.value);
3774
- if (domainMatch) {
3775
- return domainMatch.label;
3776
- }
3777
- else if (this.value) {
3778
- return String(`??${this.value}??`);
3779
- }
3780
- else {
3781
- return this.emptyText;
3782
- }
3659
+ this.value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
3660
+ this.emptyText = input("", ...(ngDevMode ? [{ debugName: "emptyText" }] : []));
3661
+ this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
3662
+ this.translatedValue = computed(() => {
3663
+ // buscar traducción para el valor en el dominio
3664
+ const data = this.data();
3665
+ let domainMatch = data && data.find(obj => obj.value == this.value());
3666
+ const value = this.value();
3667
+ if (domainMatch) {
3668
+ return domainMatch.label;
3669
+ }
3670
+ else if (value) {
3671
+ return String(`??${value}??`);
3672
+ }
3673
+ else {
3674
+ return this.emptyText() ?? "Carregant...";
3675
+ }
3676
+ }, ...(ngDevMode ? [{ debugName: "translatedValue" }] : []));
3783
3677
  }
3784
3678
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDomainValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3785
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitDomainValueComponent, isStandalone: false, selector: "bit-domain-value", inputs: { value: "value", emptyText: "emptyText", data: "data" }, usesOnChanges: true, ngImport: i0, template: `
3786
- <span>{{ translatedValue }}</span>
3679
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: BitDomainValueComponent, isStandalone: false, selector: "bit-domain-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
3680
+ <span>{{ translatedValue() }}</span>
3787
3681
  `, isInline: true }); }
3788
3682
  }
3789
3683
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDomainValueComponent, decorators: [{
@@ -3791,17 +3685,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3791
3685
  args: [{
3792
3686
  selector: "bit-domain-value",
3793
3687
  template: `
3794
- <span>{{ translatedValue }}</span>
3688
+ <span>{{ translatedValue() }}</span>
3795
3689
  `,
3796
3690
  standalone: false
3797
3691
  }]
3798
- }], ctorParameters: () => [], propDecorators: { value: [{
3799
- type: Input
3800
- }], emptyText: [{
3801
- type: Input
3802
- }], data: [{
3803
- type: Input
3804
- }] } });
3692
+ }] });
3805
3693
 
3806
3694
  /**
3807
3695
  * Clase general que todos los componentes personalizados deben extender. Contiene toda la lógica común para trabajar con
@@ -3810,67 +3698,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3810
3698
  class BitGeneralComponent extends BaseComponent {
3811
3699
  constructor() {
3812
3700
  super(...arguments);
3813
- this.placeholder = "";
3814
- this.readOnly = false;
3815
- this.hideLabel = false; // forzar que no se reserve espacio para el nombre del campo
3816
- this.forceObligatorio = false;
3817
- this.onChange = new EventEmitter();
3818
- this.onTouch = new EventEmitter();
3819
- this.onBlur = new EventEmitter();
3820
- this.onFocus = new EventEmitter();
3821
- }
3822
- get dataTestId() {
3823
- return this.testid ? this.testid : this.nombre;
3824
- }
3825
- // decidimos marcar el campo como obligatorio si se ha indicado a la fuerza (por parámetro)
3826
- // o si el control de formulario asociado está saltando por ser obligatorio y no haberse rellenado
3701
+ this.control = input(undefined, ...(ngDevMode ? [{ debugName: "control", alias: "formControl" }] : [{ alias: "formControl" }]));
3702
+ this.nombre = input(...(ngDevMode ? [undefined, { debugName: "nombre" }] : []));
3703
+ this.nombreDirectiva = input(...(ngDevMode ? [undefined, { debugName: "nombreDirectiva" }] : []));
3704
+ this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
3705
+ this.estilo = input(...(ngDevMode ? [undefined, { debugName: "estilo" }] : []));
3706
+ this.tooltipTexto = input(...(ngDevMode ? [undefined, { debugName: "tooltipTexto" }] : []));
3707
+ this.tooltipPosicion = input(...(ngDevMode ? [undefined, { debugName: "tooltipPosicion" }] : []));
3708
+ this.ayuda = input(...(ngDevMode ? [undefined, { debugName: "ayuda" }] : [])); // clave de la ayuda contextual
3709
+ this.placeholder = input("", ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
3710
+ this.readOnly = input(false, ...(ngDevMode ? [{ debugName: "readOnly" }] : []));
3711
+ this.hideLabel = input(false, ...(ngDevMode ? [{ debugName: "hideLabel" }] : [])); // forzar que no se reserve espacio para el nombre del campo
3712
+ this.forceObligatorio = input(false, ...(ngDevMode ? [{ debugName: "forceObligatorio" }] : []));
3713
+ this.testid = input(...(ngDevMode ? [undefined, { debugName: "testid" }] : []));
3714
+ this.log = input(false, ...(ngDevMode ? [{ debugName: "log" }] : []));
3715
+ this.onChange = output();
3716
+ this.onTouch = output();
3717
+ this.onBlur = output();
3718
+ this.onFocus = output();
3719
+ this.elementRef = inject(ElementRef);
3720
+ this.dataTestId = computed(() => {
3721
+ const testid = this.testid();
3722
+ return testid ? testid : this.nombre();
3723
+ }, ...(ngDevMode ? [{ debugName: "dataTestId" }] : []));
3724
+ }
3827
3725
  get obligatorio() {
3828
- return this.forceObligatorio || (this.control && this.control.errors && this.control.errors["required"]);
3726
+ let control = this.control();
3727
+ return this.forceObligatorio() || (control && control.errors && control.errors["required"]);
3829
3728
  }
3830
3729
  showAyuda() {
3831
- this.ayudaService.mostrarAyuda(this.ayuda);
3730
+ this.ayudaService.mostrarAyuda(this.ayuda());
3832
3731
  }
3833
3732
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitGeneralComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3834
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: BitGeneralComponent, isStandalone: true, inputs: { control: ["formControl", "control"], nombre: "nombre", nombreDirectiva: "nombreDirectiva", label: "label", estilo: "estilo", tooltipTexto: "tooltipTexto", tooltipPosicion: "tooltipPosicion", ayuda: "ayuda", placeholder: "placeholder", readOnly: "readOnly", hideLabel: "hideLabel", forceObligatorio: "forceObligatorio", testid: "testid" }, outputs: { onChange: "onChange", onTouch: "onTouch", onBlur: "onBlur", onFocus: "onFocus" }, usesInheritance: true, ngImport: i0 }); }
3733
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.4", type: BitGeneralComponent, isStandalone: true, inputs: { control: { classPropertyName: "control", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, nombre: { classPropertyName: "nombre", publicName: "nombre", isSignal: true, isRequired: false, transformFunction: null }, nombreDirectiva: { classPropertyName: "nombreDirectiva", publicName: "nombreDirectiva", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, estilo: { classPropertyName: "estilo", publicName: "estilo", isSignal: true, isRequired: false, transformFunction: null }, tooltipTexto: { classPropertyName: "tooltipTexto", publicName: "tooltipTexto", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosicion: { classPropertyName: "tooltipPosicion", publicName: "tooltipPosicion", isSignal: true, isRequired: false, transformFunction: null }, ayuda: { classPropertyName: "ayuda", publicName: "ayuda", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, forceObligatorio: { classPropertyName: "forceObligatorio", publicName: "forceObligatorio", isSignal: true, isRequired: false, transformFunction: null }, testid: { classPropertyName: "testid", publicName: "testid", isSignal: true, isRequired: false, transformFunction: null }, log: { classPropertyName: "log", publicName: "log", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onTouch: "onTouch", onBlur: "onBlur", onFocus: "onFocus" }, usesInheritance: true, ngImport: i0 }); }
3835
3734
  }
3836
3735
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitGeneralComponent, decorators: [{
3837
3736
  type: Directive
3838
- }], propDecorators: { control: [{
3839
- type: Input,
3840
- args: ["formControl"]
3841
- }], nombre: [{
3842
- type: Input
3843
- }], nombreDirectiva: [{
3844
- type: Input
3845
- }], label: [{
3846
- type: Input
3847
- }], estilo: [{
3848
- type: Input
3849
- }], tooltipTexto: [{
3850
- type: Input
3851
- }], tooltipPosicion: [{
3852
- type: Input
3853
- }], ayuda: [{
3854
- type: Input
3855
- }], placeholder: [{
3856
- type: Input
3857
- }], readOnly: [{
3858
- type: Input
3859
- }], hideLabel: [{
3860
- type: Input
3861
- }], forceObligatorio: [{
3862
- type: Input
3863
- }], testid: [{
3864
- type: Input
3865
- }], onChange: [{
3866
- type: Output
3867
- }], onTouch: [{
3868
- type: Output
3869
- }], onBlur: [{
3870
- type: Output
3871
- }], onFocus: [{
3872
- type: Output
3873
- }] } });
3737
+ }] });
3874
3738
 
3875
3739
  /** Clase customizada para componentes personalizados que requieren implementar la interface ControlValueAccessor.
3876
3740
  * Tipicamente para aquellos componentes personalizados que trabajan sobre otros componentes no estándars HTML como
@@ -3878,30 +3742,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3878
3742
  */
3879
3743
  class BitCustomComponent extends BitGeneralComponent {
3880
3744
  constructor() {
3881
- super();
3745
+ super(...arguments);
3746
+ this.isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
3882
3747
  // nos permite decirle a Angular que nuestro componente ha modificado su valor
3883
3748
  this._onChange = (_) => { };
3884
3749
  // nos permite decirle a Angular que nuestro componente ha sido tacado
3885
3750
  this._onTouch = () => { };
3886
3751
  }
3887
3752
  setDisabledState(isDisabled) {
3888
- this.isDisabled = isDisabled;
3753
+ this.isDisabled.set(isDisabled);
3889
3754
  }
3890
3755
  _onBlur(event = {}) {
3891
- this.onBlur.emit();
3756
+ this.log() && console.log("_onBlur forComponent:" + this.nombre());
3757
+ this.onBlur.emit({});
3892
3758
  this.touchComponent();
3893
3759
  }
3894
3760
  _onFocus() {
3895
- this.onFocus.emit();
3761
+ this.log() && console.log("_onFocus forComponent:" + this.nombre());
3762
+ this.onFocus.emit({});
3896
3763
  }
3897
3764
  changeComponentValue(value) {
3898
- console.log("changeComponentValue", value);
3765
+ this.log() && console.log("changeComponentValue forComponent:" + this.nombre() + " and value:" + value);
3899
3766
  this._onChange(value);
3900
3767
  this.onChange.emit(value);
3901
3768
  }
3902
3769
  touchComponent() {
3770
+ this.log() && console.log("touchComponent forComponent:" + this.nombre());
3903
3771
  this._onTouch();
3904
- this.onTouch.emit();
3772
+ this.onTouch.emit({});
3905
3773
  }
3906
3774
  registerOnChange(fn) {
3907
3775
  this._onChange = fn;
@@ -3909,23 +3777,26 @@ class BitCustomComponent extends BitGeneralComponent {
3909
3777
  registerOnTouched(fn) {
3910
3778
  this._onTouch = fn;
3911
3779
  }
3912
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCustomComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3780
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3913
3781
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: BitCustomComponent, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
3914
3782
  }
3915
3783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCustomComponent, decorators: [{
3916
3784
  type: Directive
3917
- }], ctorParameters: () => [] });
3785
+ }] });
3918
3786
 
3919
3787
  class BitTextComponent extends BitCustomComponent {
3920
3788
  get value_lectura() {
3921
3789
  if (this.value == null) {
3790
+ this.log() && console.log("value lectura is null");
3922
3791
  return "";
3923
3792
  } // si es null o undefined (es lo que evalúa el "==null")
3924
3793
  else {
3794
+ this.log() && console.log("value lectura: " + this.value);
3925
3795
  return this.value;
3926
3796
  }
3927
3797
  }
3928
3798
  writeValue(v) {
3799
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
3929
3800
  if (!v) {
3930
3801
  this.value = "";
3931
3802
  }
@@ -3934,6 +3805,7 @@ class BitTextComponent extends BitCustomComponent {
3934
3805
  }
3935
3806
  }
3936
3807
  onChangeValue(text) {
3808
+ this.log() && console.log("_onChangeValue forComponent: " + this.nombre() + " with value:" + text);
3937
3809
  this.value = text;
3938
3810
  this.changeComponentValue(this.value);
3939
3811
  }
@@ -3942,7 +3814,7 @@ class BitTextComponent extends BitCustomComponent {
3942
3814
  provide: NG_VALUE_ACCESSOR,
3943
3815
  useExisting: forwardRef(() => BitTextComponent),
3944
3816
  multi: true
3945
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto && !readOnly) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [placeholder]=\"placeholder\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (tooltipTexto && !readOnly) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [pTooltip]=\"tooltipTexto\"\n [tooltipPosition]=\"tooltipPosicion\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: i3$5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
3817
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto() && !readOnly()) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [placeholder]=\"placeholder()\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (tooltipTexto() && !readOnly()) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [pTooltip]=\"tooltipTexto()\"\n [tooltipPosition]=\"tooltipPosicion()\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$3.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: i3$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
3946
3818
  }
3947
3819
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitTextComponent, decorators: [{
3948
3820
  type: Component,
@@ -3950,23 +3822,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3950
3822
  provide: NG_VALUE_ACCESSOR,
3951
3823
  useExisting: forwardRef(() => BitTextComponent),
3952
3824
  multi: true
3953
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto && !readOnly) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [placeholder]=\"placeholder\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (tooltipTexto && !readOnly) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [pTooltip]=\"tooltipTexto\"\n [tooltipPosition]=\"tooltipPosicion\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
3825
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto() && !readOnly()) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [placeholder]=\"placeholder()\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (tooltipTexto() && !readOnly()) {\n <input\n pInputText\n type=\"text\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [pTooltip]=\"tooltipTexto()\"\n [tooltipPosition]=\"tooltipPosicion()\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
3954
3826
  }] });
3955
3827
 
3956
3828
  class BitTextAreaComponent extends BitCustomComponent {
3957
3829
  constructor() {
3958
3830
  super(...arguments);
3959
- this.filas = 2;
3831
+ this.filas = input(2, ...(ngDevMode ? [{ debugName: "filas" }] : []));
3960
3832
  }
3961
3833
  get value_lectura() {
3962
3834
  if (this.value == null) {
3835
+ this.log() && console.log("value lectura is null");
3963
3836
  return "";
3964
3837
  } // si es null o undefined (es lo que evalúa el "==null")
3965
3838
  else {
3839
+ this.log() && console.log("value lectura: " + this.value);
3966
3840
  return this.value;
3967
3841
  }
3968
3842
  }
3969
3843
  writeValue(v) {
3844
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
3970
3845
  if (!v) {
3971
3846
  this.value = "";
3972
3847
  }
@@ -3975,15 +3850,16 @@ class BitTextAreaComponent extends BitCustomComponent {
3975
3850
  }
3976
3851
  }
3977
3852
  onChangeValue(text) {
3853
+ this.log() && console.log("_onChangeValue forComponent: " + this.nombre() + " with value:" + text);
3978
3854
  this.value = text;
3979
3855
  this.changeComponentValue(this.value);
3980
3856
  }
3981
3857
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitTextAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3982
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitTextAreaComponent, isStandalone: false, selector: "bit-textarea", inputs: { filas: "filas" }, providers: [{
3858
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitTextAreaComponent, isStandalone: false, selector: "bit-textarea", inputs: { filas: { classPropertyName: "filas", publicName: "filas", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
3983
3859
  provide: NG_VALUE_ACCESSOR,
3984
3860
  useExisting: forwardRef(() => BitTextAreaComponent),
3985
3861
  multi: true
3986
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <pre class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</pre>\n}\n@if (!readOnly) {\n <textarea\n pInputTextarea\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n class=\"{{ estilo }}\"\n [rows]=\"filas\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n ></textarea>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$3.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
3862
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <pre class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</pre>\n}\n@if (!readOnly()) {\n <textarea\n pInputTextarea\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n class=\"{{ estilo() }}\"\n [rows]=\"filas()\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n ></textarea>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
3987
3863
  }
3988
3864
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitTextAreaComponent, decorators: [{
3989
3865
  type: Component,
@@ -3991,16 +3867,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3991
3867
  provide: NG_VALUE_ACCESSOR,
3992
3868
  useExisting: forwardRef(() => BitTextAreaComponent),
3993
3869
  multi: true
3994
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <pre class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</pre>\n}\n@if (!readOnly) {\n <textarea\n pInputTextarea\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n class=\"{{ estilo }}\"\n [rows]=\"filas\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n ></textarea>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
3995
- }], propDecorators: { filas: [{
3996
- type: Input
3997
- }] } });
3870
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <pre class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</pre>\n}\n@if (!readOnly()) {\n <textarea\n pInputTextarea\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n class=\"{{ estilo() }}\"\n [rows]=\"filas()\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n ></textarea>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
3871
+ }] });
3998
3872
 
3999
3873
  /** Clase general para componentes personalizados de tipo Fecha como puede ser BitDate, BitTime y BitDateTime */
4000
3874
  class BitCalendarComponent extends BitCustomComponent {
4001
- constructor(translateService) {
4002
- super();
4003
- this.translateService = translateService;
3875
+ constructor() {
3876
+ super(...arguments);
4004
3877
  // calendarios
4005
3878
  this.fechaMinima = input(undefined, ...(ngDevMode ? [{ debugName: "fechaMinima" }] : [])); // fecha mínima seleccionable
4006
3879
  this.fechaMaxima = input(undefined, ...(ngDevMode ? [{ debugName: "fechaMaxima" }] : [])); // fecha máxima seleccionable
@@ -4010,29 +3883,32 @@ class BitCalendarComponent extends BitCustomComponent {
4010
3883
  this.appendTo = input("body", ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
4011
3884
  this.onSelect = output();
4012
3885
  this.dateUtils = inject(DateUtils);
3886
+ this.translateService = inject(TranslateService);
4013
3887
  }
4014
3888
  _onTodayClick(event) {
3889
+ this.log() && console.log("_onTodayClick forComponent:" + this.nombre());
4015
3890
  this.value = new Date();
4016
3891
  this.emitNewValue();
4017
3892
  }
4018
3893
  _onSelect(date) {
3894
+ this.log() && console.log("onSelect forComponent:" + this.nombre() + " with date:" + date);
4019
3895
  this.value = date;
4020
- console.log("onSelect", date);
4021
3896
  this.emitNewValue();
4022
3897
  this.onSelect.emit(date);
4023
3898
  }
4024
3899
  _onInput(data) {
3900
+ this.log() && console.log("_onInput forComponent:" + this.nombre());
4025
3901
  // recuperamos el valor del campo
4026
3902
  let value = data.currentTarget.value;
4027
3903
  try {
4028
- console.log("value", value);
3904
+ this.log() && console.log("value", value);
4029
3905
  // si es una fecha, hora o fecha/hora
4030
3906
  if (this.isValueCorrect(value)) {
4031
3907
  // hacemos una transformación de string a date y de date a string porque en el caso de DateTime la representación visual e informática no tiene nada que ver
4032
3908
  let d = this.dateUtils.getStringAsDate(value, this.visual_format);
4033
- console.log("converted to date value", d);
3909
+ this.log() && console.log("converted to date value", d);
4034
3910
  value = this.getDateAsString(d);
4035
- console.log("converted to string value", value);
3911
+ this.log() && console.log("converted to string value", value);
4036
3912
  this.writeValue(value);
4037
3913
  this.emitNewValue();
4038
3914
  }
@@ -4041,11 +3917,12 @@ class BitCalendarComponent extends BitCustomComponent {
4041
3917
  }
4042
3918
  }
4043
3919
  _onBlur(data) {
3920
+ this.log() && console.log("_onInput forComponent:" + this.nombre());
4044
3921
  super._onBlur();
4045
3922
  // recuperamos el valor del campo
4046
3923
  let value = data.currentTarget.value;
4047
3924
  try {
4048
- console.log("onBlur value", value);
3925
+ this.log() && console.log("onBlur value", value);
4049
3926
  // Cuando abandonemos el campo si el valor es un truño, seteamos null en el formcontrol
4050
3927
  if (!this.isValueCorrect(value)) {
4051
3928
  this.writeValue(null);
@@ -4056,6 +3933,7 @@ class BitCalendarComponent extends BitCustomComponent {
4056
3933
  }
4057
3934
  }
4058
3935
  _onClear() {
3936
+ this.log() && console.log("_onClear forComponent:" + this.nombre());
4059
3937
  this.writeValue(null);
4060
3938
  this.emitNewValue();
4061
3939
  }
@@ -4063,46 +3941,53 @@ class BitCalendarComponent extends BitCustomComponent {
4063
3941
  let v = null;
4064
3942
  if (this.value) {
4065
3943
  try {
4066
- console.log("emitNewValue", this.value);
3944
+ this.log() && console.log("emitNewValue", this.value);
4067
3945
  v = this.dateUtils.getDateAsString(this.value, this.getDateFormat());
4068
3946
  }
4069
3947
  catch (e) {
4070
3948
  }
4071
3949
  }
3950
+ else {
3951
+ this.log() && console.log("noValue to emit for component:" + this.nombre());
3952
+ }
4072
3953
  this.changeComponentValue(v);
4073
3954
  }
4074
3955
  isValueCorrect(value) {
4075
3956
  return moment(value, this.visual_format, true).isValid();
4076
3957
  }
4077
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCalendarComponent, deps: [{ token: TranslateService }], target: i0.ɵɵFactoryTarget.Directive }); }
3958
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCalendarComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4078
3959
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.4", type: BitCalendarComponent, isStandalone: true, inputs: { fechaMinima: { classPropertyName: "fechaMinima", publicName: "fechaMinima", isSignal: true, isRequired: false, transformFunction: null }, fechaMaxima: { classPropertyName: "fechaMaxima", publicName: "fechaMaxima", isSignal: true, isRequired: false, transformFunction: null }, calendarReadOnlyInput: { classPropertyName: "calendarReadOnlyInput", publicName: "calendarReadOnlyInput", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect" }, usesInheritance: true, ngImport: i0 }); }
4079
3960
  }
4080
3961
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCalendarComponent, decorators: [{
4081
3962
  type: Directive
4082
- }], ctorParameters: () => [{ type: TranslateService }] });
3963
+ }] });
4083
3964
 
4084
3965
  class BitDateComponent extends BitCalendarComponent {
4085
- constructor(translateService, dateUtils) {
4086
- super(translateService);
4087
- this.translateService = translateService;
4088
- this.dateUtils = dateUtils;
4089
- this.placeholder = "dd/mm/yyyy";
3966
+ constructor() {
3967
+ super();
3968
+ this.dateUtils = inject(DateUtils);
3969
+ this.placeholder = input("dd/mm/yyyy", ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
4090
3970
  this.visual_format = DateUtils.FORMAT_SHORT_DATE;
4091
3971
  }
4092
3972
  get value_lectura() {
4093
3973
  if (this.value == null) {
3974
+ this.log() && console.log("value lectura is null");
4094
3975
  return "";
4095
3976
  }
4096
3977
  else {
4097
- return this.dateUtils.getDateAsString(this.value, this.getDateFormat());
3978
+ let v = this.dateUtils.getDateAsString(this.value, this.getDateFormat());
3979
+ this.log() && console.log("value lectura: " + v);
3980
+ return v;
4098
3981
  }
4099
3982
  }
4100
3983
  writeValue(v) {
3984
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4101
3985
  if (!v || v === "") {
4102
3986
  this.value = null;
4103
3987
  }
4104
3988
  else {
4105
3989
  this.value = this.dateUtils.getStringAsDate(v, this.getDateFormat());
3990
+ this.log() && console.log("new value:" + this.value);
4106
3991
  }
4107
3992
  }
4108
3993
  getDateAsString(d) {
@@ -4112,12 +3997,12 @@ class BitDateComponent extends BitCalendarComponent {
4112
3997
  getDateFormat() {
4113
3998
  return this.format() ? this.format() : DateUtils.FORMAT_SHORT_DATE;
4114
3999
  }
4115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDateComponent, deps: [{ token: TranslateService }, { token: DateUtils }], target: i0.ɵɵFactoryTarget.Component }); }
4116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDateComponent, isStandalone: false, selector: "bit-date", providers: [{
4000
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4001
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDateComponent, isStandalone: false, selector: "bit-date", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
4117
4002
  provide: NG_VALUE_ACCESSOR,
4118
4003
  useExisting: forwardRef(() => BitDateComponent),
4119
4004
  multi: true
4120
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura | date: \"dd/MM/yyyy\" }}</p>\n}\n@if (!readOnly) {\n <p-datepicker\n class=\"FormControl\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder }}\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n [readonlyInput]=\"calendarReadOnlyInput()\"\n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n yearRange=\"2000:2050\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-datepicker>\n}\n@if (!readOnly) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i3$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] }); }
4005
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-datepicker class=\"FormControl\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder() }}\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n [readonlyInput]=\"calendarReadOnlyInput()\"\n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n yearRange=\"2000:2050\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (!readOnly()) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$4.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4121
4006
  }
4122
4007
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDateComponent, decorators: [{
4123
4008
  type: Component,
@@ -4125,31 +4010,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4125
4010
  provide: NG_VALUE_ACCESSOR,
4126
4011
  useExisting: forwardRef(() => BitDateComponent),
4127
4012
  multi: true
4128
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura | date: \"dd/MM/yyyy\" }}</p>\n}\n@if (!readOnly) {\n <p-datepicker\n class=\"FormControl\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder }}\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n [readonlyInput]=\"calendarReadOnlyInput()\"\n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n yearRange=\"2000:2050\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-datepicker>\n}\n@if (!readOnly) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4129
- }], ctorParameters: () => [{ type: TranslateService }, { type: DateUtils }] });
4013
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-datepicker class=\"FormControl\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder() }}\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n [readonlyInput]=\"calendarReadOnlyInput()\"\n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n yearRange=\"2000:2050\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (!readOnly()) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4014
+ }], ctorParameters: () => [] });
4130
4015
 
4131
4016
  class BitTimeComponent extends BitCalendarComponent {
4132
- constructor(translateService, dateUtils) {
4133
- super(translateService);
4134
- this.translateService = translateService;
4135
- this.dateUtils = dateUtils;
4136
- this.placeholder = "hh:mm";
4017
+ constructor() {
4018
+ super();
4019
+ this.dateUtils = inject(DateUtils);
4020
+ this.placeholder = input("hh:mm", ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
4137
4021
  this.visual_format = DateUtils.FORMAT_SHORT_TIME;
4138
4022
  }
4139
4023
  get value_lectura() {
4140
4024
  if (this.value == null) {
4025
+ this.log() && console.log("value lectura is null");
4141
4026
  return "";
4142
4027
  }
4143
4028
  else {
4144
- return this.dateUtils.getTimeAsString(this.value, this.getDateFormat());
4029
+ let v = this.dateUtils.getTimeAsString(this.value, this.getDateFormat());
4030
+ this.log() && console.log("value lectura: " + v);
4031
+ return v;
4145
4032
  }
4146
4033
  }
4147
4034
  writeValue(v) {
4035
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4148
4036
  if (!v) {
4149
4037
  this.value = null;
4150
4038
  }
4151
4039
  else {
4152
4040
  this.value = this.dateUtils.getStringAsDate(v, this.getDateFormat());
4041
+ this.log() && console.log("new value:" + this.value);
4153
4042
  }
4154
4043
  }
4155
4044
  getDateAsString(d) {
@@ -4159,12 +4048,12 @@ class BitTimeComponent extends BitCalendarComponent {
4159
4048
  getDateFormat() {
4160
4049
  return this.format() ? this.format() : DateUtils.FORMAT_SHORT_TIME;
4161
4050
  }
4162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitTimeComponent, deps: [{ token: TranslateService }, { token: DateUtils }], target: i0.ɵɵFactoryTarget.Component }); }
4163
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitTimeComponent, isStandalone: false, selector: "bit-time", providers: [{
4051
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4052
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitTimeComponent, isStandalone: false, selector: "bit-time", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
4164
4053
  provide: NG_VALUE_ACCESSOR,
4165
4054
  useExisting: forwardRef(() => BitTimeComponent),
4166
4055
  multi: true
4167
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura | date: \"HH:mm\" }}</p>\n}\n@if (!readOnly) {\n <p-datepicker\n class=\"FormControl\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"value\"\n dateFormat=\"HH:mm\"\n [timeOnly]=\"true\"\n placeholder=\"{{ placeholder }}\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n (onTodayClick)=\"_onTodayClick($event)\"\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-datepicker>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i3$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] }); }
4056
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-datepicker class=\"FormControl\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"value\"\n dateFormat=\"HH:mm\"\n [timeOnly]=\"true\"\n placeholder=\"{{ placeholder() }}\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n (onTodayClick)=\"_onTodayClick($event)\"\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$4.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4168
4057
  }
4169
4058
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitTimeComponent, decorators: [{
4170
4059
  type: Component,
@@ -4172,31 +4061,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4172
4061
  provide: NG_VALUE_ACCESSOR,
4173
4062
  useExisting: forwardRef(() => BitTimeComponent),
4174
4063
  multi: true
4175
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura | date: \"HH:mm\" }}</p>\n}\n@if (!readOnly) {\n <p-datepicker\n class=\"FormControl\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"value\"\n dateFormat=\"HH:mm\"\n [timeOnly]=\"true\"\n placeholder=\"{{ placeholder }}\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n (onTodayClick)=\"_onTodayClick($event)\"\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-datepicker>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4176
- }], ctorParameters: () => [{ type: TranslateService }, { type: DateUtils }] });
4064
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-datepicker class=\"FormControl\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"value\"\n dateFormat=\"HH:mm\"\n [timeOnly]=\"true\"\n placeholder=\"{{ placeholder() }}\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n (onTodayClick)=\"_onTodayClick($event)\"\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4065
+ }], ctorParameters: () => [] });
4177
4066
 
4178
4067
  class BitDateTimeComponent extends BitCalendarComponent {
4179
- constructor(translateService, dateUtils) {
4180
- super(translateService);
4181
- this.translateService = translateService;
4182
- this.dateUtils = dateUtils;
4183
- this.placeholder = "dd/mm/yyyy hh:mm";
4068
+ constructor() {
4069
+ super();
4070
+ this.dateUtils = inject(DateUtils);
4071
+ this.placeholder = input("dd/mm/yyyy hh:mm", ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
4184
4072
  this.visual_format = DateUtils.FORMAT_LONG_DATE;
4185
4073
  }
4186
4074
  get value_lectura() {
4187
4075
  if (this.value == null) {
4076
+ this.log() && console.log("value lectura is null");
4188
4077
  return "";
4189
4078
  }
4190
4079
  else {
4191
- return this.dateUtils.getDateTimeAsString(this.value, this.getDateFormat());
4080
+ let v = this.dateUtils.getDateTimeAsString(this.value, this.getDateFormat());
4081
+ this.log() && console.log("value lectura: " + v);
4082
+ return v;
4192
4083
  }
4193
4084
  }
4194
4085
  writeValue(v) {
4086
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4195
4087
  if (!v) {
4196
4088
  this.value = null;
4197
4089
  }
4198
4090
  else {
4199
4091
  this.value = this.dateUtils.getStringAsDate(v, this.getDateFormat());
4092
+ this.log() && console.log("new value:" + this.value);
4200
4093
  }
4201
4094
  }
4202
4095
  getDateAsString(d) {
@@ -4206,12 +4099,12 @@ class BitDateTimeComponent extends BitCalendarComponent {
4206
4099
  getDateFormat() {
4207
4100
  return this.format() ? this.format() : DateUtils.FORMAT_LONG_DATE;
4208
4101
  }
4209
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDateTimeComponent, deps: [{ token: TranslateService }, { token: DateUtils }], target: i0.ɵɵFactoryTarget.Component }); }
4210
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDateTimeComponent, isStandalone: false, selector: "bit-datetime", providers: [{
4102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDateTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4103
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDateTimeComponent, isStandalone: false, selector: "bit-datetime", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
4211
4104
  provide: NG_VALUE_ACCESSOR,
4212
4105
  useExisting: forwardRef(() => BitDateTimeComponent),
4213
4106
  multi: true
4214
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura | date: \"dd/MM/yyyy HH:mm\" }}</p>\n}\n@if (!readOnly) {\n <p-datepicker\n class=\"FormControl\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder }}\" \n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n yearRange=\"2000:2050\"\n [showTime]=\"true\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-datepicker>\n}\n@if (!readOnly) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i3$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] }); }
4107
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-datepicker class=\"FormControl\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder() }}\" \n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n yearRange=\"2000:2050\"\n [showTime]=\"true\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (!readOnly()) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$4.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4215
4108
  }
4216
4109
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDateTimeComponent, decorators: [{
4217
4110
  type: Component,
@@ -4219,18 +4112,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4219
4112
  provide: NG_VALUE_ACCESSOR,
4220
4113
  useExisting: forwardRef(() => BitDateTimeComponent),
4221
4114
  multi: true
4222
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura | date: \"dd/MM/yyyy HH:mm\" }}</p>\n}\n@if (!readOnly) {\n <p-datepicker\n class=\"FormControl\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder }}\" \n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n yearRange=\"2000:2050\"\n [showTime]=\"true\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-datepicker>\n}\n@if (!readOnly) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4223
- }], ctorParameters: () => [{ type: TranslateService }, { type: DateUtils }] });
4115
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-datepicker class=\"FormControl\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"value\"\n dateFormat=\"dd/mm/yy\"\n placeholder=\"{{ placeholder() }}\" \n [minDate]=\"fechaMinima()\"\n [maxDate]=\"fechaMaxima()\"\n [showOtherMonths]=\"true\"\n [selectOtherMonths]=\"true\"\n yearRange=\"2000:2050\"\n [showTime]=\"true\"\n [firstDayOfWeek]=\"1\"\n showButtonBar={{showButtonBar()}}\n [appendTo]=\"appendTo()\"\n (onSelect)=\"_onSelect(value)\"\n (onClear)=\"_onClear()\"\n (onClearClick)=\"_onClear()\"\n (onFocus)=\"_onFocus()\"\n (onBlur)=\"_onBlur($event)\"\n (onInput)=\"_onInput($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (!readOnly()) {\n <span class=\"glyphicon glyphicon-calendar icono-input\"></span>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4116
+ }], ctorParameters: () => [] });
4224
4117
 
4225
4118
  class BitCheckBoxComponent extends BitCustomComponent {
4226
4119
  get value_lectura() {
4120
+ this.log() && console.log("value lectura: " + this.value);
4227
4121
  return this.value ? "Sí" : "No";
4228
4122
  }
4229
4123
  writeValue(v) {
4124
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4230
4125
  this.value = v;
4231
4126
  }
4232
4127
  onChangeValue(event) {
4233
4128
  this.value = event.checked;
4129
+ this.log() && console.log("_onChangeValue forComponent: " + this.nombre() + " with value:" + this.value);
4234
4130
  this.changeComponentValue(this.value);
4235
4131
  }
4236
4132
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCheckBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
@@ -4238,7 +4134,7 @@ class BitCheckBoxComponent extends BitCustomComponent {
4238
4134
  provide: NG_VALUE_ACCESSOR,
4239
4135
  useExisting: forwardRef(() => BitCheckBoxComponent),
4240
4136
  multi: true
4241
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-checkbox\n class=\"{{ estilo }}\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n id=\"{{ nombre }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-checkbox>\n}\n\n@if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n}\n\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i1$3.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4137
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-checkbox class=\"{{ estilo() }}\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n id=\"{{ nombre() }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n\n@if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n}\n\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4242
4138
  }
4243
4139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitCheckBoxComponent, decorators: [{
4244
4140
  type: Component,
@@ -4246,18 +4142,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4246
4142
  provide: NG_VALUE_ACCESSOR,
4247
4143
  useExisting: forwardRef(() => BitCheckBoxComponent),
4248
4144
  multi: true
4249
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-checkbox\n class=\"{{ estilo }}\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n id=\"{{ nombre }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-checkbox>\n}\n\n@if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n}\n\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4145
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-checkbox class=\"{{ estilo() }}\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n id=\"{{ nombre() }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n\n@if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n}\n\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4250
4146
  }] });
4251
4147
 
4252
4148
  class BitSwitchComponent extends BitCustomComponent {
4253
4149
  get value_lectura() {
4150
+ this.log() && console.log("value lectura: " + this.value);
4254
4151
  return this.value ? "Sí" : "No";
4255
4152
  }
4256
4153
  writeValue(v) {
4154
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4257
4155
  this.value = v;
4258
4156
  }
4259
4157
  onChangeValue(event) {
4260
4158
  this.value = event.checked;
4159
+ this.log() && console.log("_onChangeValue forComponent: " + this.nombre() + " with value:" + this.value);
4261
4160
  this.changeComponentValue(this.value);
4262
4161
  }
4263
4162
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
@@ -4265,7 +4164,7 @@ class BitSwitchComponent extends BitCustomComponent {
4265
4164
  provide: NG_VALUE_ACCESSOR,
4266
4165
  useExisting: forwardRef(() => BitSwitchComponent),
4267
4166
  multi: true
4268
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-toggleswitch\n onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n id=\"{{ nombre }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-toggleswitch>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$4.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4167
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-toggleswitch onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n id=\"{{ nombre() }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$5.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4269
4168
  }
4270
4169
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSwitchComponent, decorators: [{
4271
4170
  type: Component,
@@ -4273,59 +4172,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4273
4172
  provide: NG_VALUE_ACCESSOR,
4274
4173
  useExisting: forwardRef(() => BitSwitchComponent),
4275
4174
  multi: true
4276
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-toggleswitch\n onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n id=\"{{ nombre }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-toggleswitch>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4175
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-toggleswitch onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n id=\"{{ nombre() }}\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4277
4176
  }] });
4278
4177
 
4279
4178
  class BitAutoCompleteComponent extends BitCustomComponent {
4280
4179
  constructor() {
4281
4180
  super(...arguments);
4282
- this.multiple = false;
4283
- this.id = "id";
4284
- this.customTemplate = false; // si se usa un template personalizado para mostrar los items
4285
- this.completeMethod = new EventEmitter();
4286
- this.onSelect = new EventEmitter();
4287
- this.onClear = new EventEmitter();
4181
+ this.suggestions = input([], ...(ngDevMode ? [{ debugName: "suggestions" }] : []));
4182
+ this.suggestionField = input(...(ngDevMode ? [undefined, { debugName: "suggestionField" }] : []));
4183
+ this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
4184
+ this.inputStyleClass = input(...(ngDevMode ? [undefined, { debugName: "inputStyleClass" }] : []));
4185
+ this.id = input("id", ...(ngDevMode ? [{ debugName: "id" }] : []));
4186
+ this.displayValue = input(...(ngDevMode ? [undefined, { debugName: "displayValue" }] : []));
4187
+ this.customTemplate = input(false, ...(ngDevMode ? [{ debugName: "customTemplate" }] : [])); // si se usa un template personalizado para mostrar los items
4188
+ this.completeMethod = output();
4189
+ this.onSelect = output();
4190
+ this.onClear = output();
4191
+ this.itemTemplate = contentChild('itemTemplate', ...(ngDevMode ? [{ debugName: "itemTemplate", read: TemplateRef }] : [{ read: TemplateRef }]));
4192
+ this.suggestions_mapped = computed(() => {
4193
+ let suggestions = this.suggestions();
4194
+ if (suggestions) {
4195
+ let newList = suggestions.map((obj) => ((obj instanceof Object && !this.customTemplate()) ? obj[this.suggestionField()] : obj));
4196
+ this.log() && console.log("suggestions mapped for component: " + this.nombre(), newList);
4197
+ return newList;
4198
+ }
4199
+ }, ...(ngDevMode ? [{ debugName: "suggestions_mapped" }] : []));
4288
4200
  }
4289
4201
  ngAfterViewInit() {
4290
4202
  // Control de errores:
4291
4203
  // 1. Si se quiere usar una template personalizada, se debe especificar el input customTemplate.
4292
4204
  // 2. Si se usa customTemplate, se debe especificar el input suggestionField para poder mapear el objeto en el campo de texto.
4293
4205
  // 3. Si se usa itemTemplate, se debe especificar customTemplate a true. (warning)
4294
- if (this.customTemplate && !this.itemTemplate) {
4206
+ const customTemplate = this.customTemplate();
4207
+ const itemTemplate = this.itemTemplate();
4208
+ if (customTemplate && !itemTemplate) {
4295
4209
  throw new Error("BitAutoCompleteComponent: Si se especifica el input customTemplate se debe proporcionar una template a través de '<ng-template #itemTemplate let-item>'");
4296
4210
  }
4297
- else if (this.customTemplate && !this.suggestionField) {
4211
+ else if (customTemplate && !this.suggestionField()) {
4298
4212
  throw new Error("BitAutoCompleteComponent: Si se especifica el input customTemplate, se debe especificar el input suggestionField para poder mapear el objeto en el campo de texto cuando elijamos uno de la lista.");
4299
4213
  }
4300
- else if (!this.customTemplate && this.itemTemplate) {
4301
- console.warn("BitAutoCompleteComponent: Se ha proporcionado una template personalizada a través de 'itemTemplate', pero se está pasando de ella. Para usarla, debe establecer customTemplate a true.");
4302
- }
4303
- }
4304
- ngOnChanges(changes) {
4305
- for (let propName in changes) {
4306
- if (propName === "suggestions") {
4307
- let changedProp = changes[propName];
4308
- let newList = changedProp.currentValue;
4309
- // El mapeo tiene que ser con todo el objeto, no solo con el campo suggestionField, porque si se usa un template personalizado
4310
- // se necesita el objeto completo para poder pasarlos a la template y que se pinte correctamente.
4311
- this.suggestions_mapped = newList && newList.map((obj) => ((obj instanceof Object && !this.customTemplate) ? obj[this.suggestionField] : obj));
4312
- //console.log("newList", this.suggestions_mapped);
4313
- }
4314
- }
4315
- }
4214
+ else if (!customTemplate && itemTemplate) {
4215
+ this.log() && console.warn("BitAutoCompleteComponent: Se ha proporcionado una template personalizada a través de 'itemTemplate', pero se está pasando de ella. Para usarla, debe establecer customTemplate a true.");
4216
+ }
4217
+ }
4218
+ // ngOnChanges(changes: { [propKey: string]: SimpleChange }) {
4219
+ // for (let propName in changes) {
4220
+ // if (propName === "suggestions") {
4221
+ // let changedProp = changes[propName];
4222
+ // let newList = changedProp.currentValue;
4223
+ // // El mapeo tiene que ser con todo el objeto, no solo con el campo suggestionField, porque si se usa un template personalizado
4224
+ // // se necesita el objeto completo para poder pasarlos a la template y que se pinte correctamente.
4225
+ // this.suggestions_mapped = newList && newList.map((obj: { [x: string]: any }) => ((obj instanceof Object && !this.customTemplate()) ? obj[this.suggestionField()] : obj));
4226
+ // //console.log("newList", this.suggestions_mapped);
4227
+ // }
4228
+ // }
4229
+ // }
4316
4230
  search(event) {
4231
+ this.log() && console.log("search for component: " + this.nombre(), event);
4317
4232
  this.completeMethod.emit(event);
4318
4233
  }
4319
4234
  get value_lectura() {
4320
4235
  if (this.value == null) {
4236
+ this.log() && console.log("value lectura is null");
4321
4237
  return "";
4322
4238
  } // si es null o undefined (es lo que evalúa el "==null")
4323
4239
  else {
4240
+ this.log() && console.log("value lectura: " + this.value);
4324
4241
  return this.value;
4325
4242
  }
4326
4243
  }
4327
4244
  writeValue(v) {
4328
4245
  // El 0 es un valor válido
4246
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4329
4247
  if (v === null || v === undefined || v === "") {
4330
4248
  this.value = "";
4331
4249
  }
@@ -4334,33 +4252,39 @@ class BitAutoCompleteComponent extends BitCustomComponent {
4334
4252
  this.value = v.toString();
4335
4253
  }
4336
4254
  else {
4337
- this.value = this.displayValue;
4255
+ this.value = this.displayValue();
4338
4256
  }
4339
4257
  }
4340
4258
  }
4341
4259
  changeComponentValue(value) {
4260
+ this.log() && console.log(`changeComponentValue forComponent ${this.nombre()} with value ${value}`);
4342
4261
  let valueConverted;
4343
- if (this.suggestionField) {
4262
+ if (this.suggestionField()) {
4344
4263
  // si estamos especificando que lo que el autocompletar hace es operar sobre una lista de objetos
4345
4264
  // recuperamos el objeto dentro de la lista con el valor del campo suggestionField igual al seleccionado
4346
4265
  let selectedObject = this._findObject(value);
4266
+ this.log() && console.log("selectedObject", selectedObject);
4347
4267
  // el valor reconvertido será el ID del objeto que es lo que vamos a meter en el FormControl
4348
- valueConverted = selectedObject && selectedObject[this.id];
4268
+ valueConverted = selectedObject && selectedObject[this.id()];
4269
+ this.log() && console.log("valueConverted", valueConverted);
4349
4270
  // emitimos que ha cambiado el objeto
4350
4271
  this.onChange.emit(selectedObject);
4351
4272
  }
4352
4273
  else {
4353
4274
  // si no es una lista de objetos el comportamiento es el de siempre
4354
4275
  valueConverted = value;
4276
+ this.log() && console.log("valueConverted", valueConverted);
4355
4277
  this.onChange.emit(valueConverted);
4356
4278
  }
4357
4279
  this._onChange(valueConverted);
4358
4280
  }
4359
4281
  _onSelect(event) {
4360
4282
  this.value = event.value;
4283
+ this.log() && console.log("_onSelect forComponent: " + this.nombre() + " with value:" + this.value);
4361
4284
  this.changeComponentValue(this.value);
4362
- if (this.suggestionField) {
4285
+ if (this.suggestionField()) {
4363
4286
  let selectedObject = this._findObject(event.value);
4287
+ this.log() && console.log("selectedObject: " + selectedObject);
4364
4288
  this.onSelect.emit(selectedObject);
4365
4289
  }
4366
4290
  else {
@@ -4369,26 +4293,32 @@ class BitAutoCompleteComponent extends BitCustomComponent {
4369
4293
  }
4370
4294
  _onClear() {
4371
4295
  this.value = "";
4296
+ this.log() && console.log("_onClear forComponent: " + this.nombre());
4372
4297
  this.changeComponentValue(this.value);
4373
- this.onClear.emit();
4298
+ this.onClear.emit({});
4374
4299
  }
4375
4300
  _findObject(value) {
4301
+ this.log() && console.log("_findObject forComponent: " + this.nombre() + " with value", value);
4376
4302
  // Si se usa un template personalizado, devolvemos el valor directamente, porque ya estará allí, no hace falta buscarlo en la lista de sugerencias
4377
- if (this.customTemplate) {
4303
+ if (this.customTemplate()) {
4378
4304
  return this.value;
4379
4305
  }
4380
4306
  else {
4381
- return value && this.suggestions.find((obj) => obj[this.suggestionField] === value);
4307
+ if (value) {
4308
+ let v = this.suggestions().find((obj) => obj[this.suggestionField()] === value);
4309
+ this.log() && console.log("_findObject forComponent: " + this.nombre() + " find value", v);
4310
+ return v;
4311
+ }
4382
4312
  }
4383
4313
  }
4384
4314
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitAutoCompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4385
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitAutoCompleteComponent, isStandalone: false, selector: "bit-autocomplete", inputs: { suggestions: "suggestions", suggestionField: "suggestionField", multiple: "multiple", inputStyleClass: "inputStyleClass", id: "id", displayValue: "displayValue", customTemplate: "customTemplate" }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onClear: "onClear" }, providers: [
4315
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitAutoCompleteComponent, isStandalone: false, selector: "bit-autocomplete", inputs: { suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, suggestionField: { classPropertyName: "suggestionField", publicName: "suggestionField", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onClear: "onClear" }, providers: [
4386
4316
  {
4387
4317
  provide: NG_VALUE_ACCESSOR,
4388
4318
  useExisting: forwardRef(() => BitAutoCompleteComponent),
4389
4319
  multi: true
4390
4320
  }
4391
- ], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, read: TemplateRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <!-- Si usamos un template personalizado, hay que indicar el optionLabel para que sepa cu\u00E1l es el campo a mostrar al seleccionar un elemento -->\n <p-autoComplete\n [(ngModel)]=\"value\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"placeholder\"\n [delay]=\"400\"\n [suggestions]=\"suggestions_mapped\"\n [multiple]=\"multiple\"\n [inputStyleClass]=\"inputStyleClass\"\n optionLabel=\"{{ customTemplate ? this.suggestionField : '' }}\"\n appendTo=\"body\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"_onSelect($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n @if (customTemplate && itemTemplate) {\n <ng-template pTemplate=\"item\" let-item>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n </ng-template>\n }\n </p-autoComplete>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$5.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4321
+ ], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true, read: TemplateRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <!-- Si usamos un template personalizado, hay que indicar el optionLabel para que sepa cu\u00E1l es el campo a mostrar al seleccionar un elemento -->\n <p-autoComplete\n [(ngModel)]=\"value\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [delay]=\"400\"\n [suggestions]=\"suggestions_mapped()\"\n [multiple]=\"multiple()\"\n [inputStyleClass]=\"inputStyleClass()\"\n optionLabel=\"{{ customTemplate() ? this.suggestionField() : '' }}\"\n appendTo=\"body\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"_onSelect($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n >\n @if (customTemplate() && itemTemplate()) {\n <ng-template pTemplate=\"item\" let-item>\n <ng-container *ngTemplateOutlet=\"itemTemplate(); context: { $implicit: item }\" />\n </ng-template>\n }\n </p-autoComplete>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$6.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4392
4322
  }
4393
4323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitAutoCompleteComponent, decorators: [{
4394
4324
  type: Component,
@@ -4398,31 +4328,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4398
4328
  useExisting: forwardRef(() => BitAutoCompleteComponent),
4399
4329
  multi: true
4400
4330
  }
4401
- ], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <!-- Si usamos un template personalizado, hay que indicar el optionLabel para que sepa cu\u00E1l es el campo a mostrar al seleccionar un elemento -->\n <p-autoComplete\n [(ngModel)]=\"value\"\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"placeholder\"\n [delay]=\"400\"\n [suggestions]=\"suggestions_mapped\"\n [multiple]=\"multiple\"\n [inputStyleClass]=\"inputStyleClass\"\n optionLabel=\"{{ customTemplate ? this.suggestionField : '' }}\"\n appendTo=\"body\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"_onSelect($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n @if (customTemplate && itemTemplate) {\n <ng-template pTemplate=\"item\" let-item>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n </ng-template>\n }\n </p-autoComplete>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4402
- }], propDecorators: { suggestions: [{
4403
- type: Input
4404
- }], suggestionField: [{
4405
- type: Input
4406
- }], multiple: [{
4407
- type: Input
4408
- }], inputStyleClass: [{
4409
- type: Input
4410
- }], id: [{
4411
- type: Input
4412
- }], displayValue: [{
4413
- type: Input
4414
- }], customTemplate: [{
4415
- type: Input
4416
- }], completeMethod: [{
4417
- type: Output
4418
- }], onSelect: [{
4419
- type: Output
4420
- }], onClear: [{
4421
- type: Output
4422
- }], itemTemplate: [{
4423
- type: ContentChild,
4424
- args: ['itemTemplate', { read: TemplateRef }]
4425
- }] } });
4331
+ ], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <!-- Si usamos un template personalizado, hay que indicar el optionLabel para que sepa cu\u00E1l es el campo a mostrar al seleccionar un elemento -->\n <p-autoComplete\n [(ngModel)]=\"value\"\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [delay]=\"400\"\n [suggestions]=\"suggestions_mapped()\"\n [multiple]=\"multiple()\"\n [inputStyleClass]=\"inputStyleClass()\"\n optionLabel=\"{{ customTemplate() ? this.suggestionField() : '' }}\"\n appendTo=\"body\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"_onSelect($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n >\n @if (customTemplate() && itemTemplate()) {\n <ng-template pTemplate=\"item\" let-item>\n <ng-container *ngTemplateOutlet=\"itemTemplate(); context: { $implicit: item }\" />\n </ng-template>\n }\n </p-autoComplete>\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4332
+ }] });
4426
4333
 
4427
4334
  /**
4428
4335
  * Clase general común a ambos bit-dropdown (El normal y el múltiple).
@@ -4438,75 +4345,51 @@ class BitDropDownGeneralComponent extends BitCustomComponent {
4438
4345
  super();
4439
4346
  this.router = router;
4440
4347
  this.translateService = translateService;
4441
- this.hideLabel = false; // forzar no reservar espacio para el nombre del campo
4442
- this.emptyText = "bitnglibrary.bitdropdown.any"; //valor por defecto seleccionable como primer elemento
4443
- this.includeEmpty = true;
4444
- this.appendTo = "body";
4445
- this.group = false;
4446
- this.atributoLabel = "label"; // El atributo de los objetos de la lista que corresponde al label
4447
- this.atributoValue = "value"; // El atributo de los objetos de la lista que corresponde al valor
4448
- this.atributoDisabled = "inactivo"; // El atributo de los objetos de la lista que indica si un valor está deshabilitado
4449
- this.listaOpciones = [];
4450
- this.listaOpcionesVisible = [];
4451
- this.emptyTextResolved = "";
4452
- }
4453
- // custom processing after retrieving data array from service
4454
- // custom processing after retrieving data array from service
4455
- postRetrieveData() {
4456
- if (this.listaOpciones) {
4457
- this.listaOpcionesVisible = Object.assign([], this.listaOpciones);
4458
- // repasamos si hay opciones a excluir que debamos eliminar
4459
- if (this.excludedValues) {
4460
- this.listaOpcionesVisible = this.listaOpcionesVisible.filter((op) => this.excludedValues.indexOf(op.value) < 0);
4348
+ this.hideLabel = input(false, ...(ngDevMode ? [{ debugName: "hideLabel" }] : [])); // forzar no reservar espacio para el nombre del campo
4349
+ this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : [])); // lista de valores estáticos con lo que inicializamos el select
4350
+ this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
4351
+ this.excludedValues = input(...(ngDevMode ? [undefined, { debugName: "excludedValues" }] : []));
4352
+ this.emptyText = input("bitnglibrary.bitdropdown.any", ...(ngDevMode ? [{ debugName: "emptyText" }] : [])); //valor por defecto seleccionable como primer elemento
4353
+ this.includeEmpty = input(true, ...(ngDevMode ? [{ debugName: "includeEmpty" }] : []));
4354
+ this.valueAs = input(...(ngDevMode ? [undefined, { debugName: "valueAs" }] : []));
4355
+ this.appendTo = input("body", ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
4356
+ this.group = input(false, ...(ngDevMode ? [{ debugName: "group" }] : []));
4357
+ this.atributoLabel = input("label", ...(ngDevMode ? [{ debugName: "atributoLabel" }] : [])); // El atributo de los objetos de la lista que corresponde al label
4358
+ this.atributoValue = input("value", ...(ngDevMode ? [{ debugName: "atributoValue" }] : [])); // El atributo de los objetos de la lista que corresponde al valor
4359
+ this.atributoDisabled = input("inactivo", ...(ngDevMode ? [{ debugName: "atributoDisabled" }] : [])); // El atributo de los objetos de la lista que indica si un valor está deshabilitado
4360
+ this.translatedEmptyText = toSignal(this.translateService.selectTranslateWithContext(this.emptyText()));
4361
+ this.listaOpciones = computed(() => {
4362
+ let list = this.data() ? this.data().slice() : [];
4363
+ this.log() && console.log("Lista de opciones forComponent:" + this.nombre(), list);
4364
+ return list;
4365
+ }, ...(ngDevMode ? [{ debugName: "listaOpciones" }] : []));
4366
+ this.listaOpcionesVisible = computed(() => {
4367
+ let opciones = [];
4368
+ if (this.listaOpciones()) {
4369
+ opciones = Object.assign([], this.listaOpciones());
4370
+ // repasamos si hay opciones a excluir que debamos eliminar
4371
+ if (this.excludedValues()) {
4372
+ opciones = opciones.filter((op) => this.excludedValues().indexOf(op.value) < 0);
4373
+ this.log() && console.log("Lista de opciones forComponent:" + this.nombre() + " después de excludeValues", opciones);
4374
+ }
4461
4375
  }
4462
- }
4463
- else {
4464
- this.listaOpcionesVisible = [];
4465
- }
4466
- // determinamos si debemos incluir la opción "sin selección" y con qué texto
4467
- if (this.includeEmpty) {
4468
- this.translateService
4469
- .selectTranslateWithContext(this.emptyText)
4470
- .pipe(take(1))
4471
- .subscribe((translation) => {
4472
- let newOption = { value: null, label: translation };
4473
- newOption[this.atributoValue] = null;
4474
- newOption[this.atributoLabel] = translation;
4475
- this.listaOpcionesVisible.splice(0, 0, newOption);
4476
- this.emptyTextResolved = translation;
4477
- });
4478
- }
4376
+ if (this.includeEmpty()) {
4377
+ let newOption = { value: null, label: this.translatedEmptyText() };
4378
+ newOption[this.atributoValue()] = null;
4379
+ newOption[this.atributoLabel()] = this.translatedEmptyText();
4380
+ opciones.splice(0, 0, newOption);
4381
+ this.log() && console.log("Lista de opciones forComponent:" + this.nombre() + " después de includeEmpty", opciones);
4382
+ }
4383
+ this.log() && console.log("Lista de opciones visibles forComponent:" + this.nombre() + " después de excludeValues", opciones);
4384
+ return opciones;
4385
+ }, ...(ngDevMode ? [{ debugName: "listaOpcionesVisible" }] : []));
4479
4386
  }
4480
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownGeneralComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Directive }); }
4481
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: BitDropDownGeneralComponent, isStandalone: true, inputs: { hideLabel: "hideLabel", data: "data", id: "id", excludedValues: "excludedValues", emptyText: "emptyText", includeEmpty: "includeEmpty", valueAs: "valueAs", appendTo: "appendTo", group: "group", atributoLabel: "atributoLabel", atributoValue: "atributoValue", atributoDisabled: "atributoDisabled" }, usesInheritance: true, ngImport: i0 }); }
4387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownGeneralComponent, deps: [{ token: i1$6.ActivatedRoute }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Directive }); }
4388
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.4", type: BitDropDownGeneralComponent, isStandalone: true, inputs: { hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, excludedValues: { classPropertyName: "excludedValues", publicName: "excludedValues", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, includeEmpty: { classPropertyName: "includeEmpty", publicName: "includeEmpty", isSignal: true, isRequired: false, transformFunction: null }, valueAs: { classPropertyName: "valueAs", publicName: "valueAs", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, atributoLabel: { classPropertyName: "atributoLabel", publicName: "atributoLabel", isSignal: true, isRequired: false, transformFunction: null }, atributoValue: { classPropertyName: "atributoValue", publicName: "atributoValue", isSignal: true, isRequired: false, transformFunction: null }, atributoDisabled: { classPropertyName: "atributoDisabled", publicName: "atributoDisabled", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
4482
4389
  }
4483
4390
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownGeneralComponent, decorators: [{
4484
4391
  type: Directive
4485
- }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: TranslateService }], propDecorators: { hideLabel: [{
4486
- type: Input
4487
- }], data: [{
4488
- type: Input
4489
- }], id: [{
4490
- type: Input
4491
- }], excludedValues: [{
4492
- type: Input
4493
- }], emptyText: [{
4494
- type: Input
4495
- }], includeEmpty: [{
4496
- type: Input
4497
- }], valueAs: [{
4498
- type: Input
4499
- }], appendTo: [{
4500
- type: Input
4501
- }], group: [{
4502
- type: Input
4503
- }], atributoLabel: [{
4504
- type: Input
4505
- }], atributoValue: [{
4506
- type: Input
4507
- }], atributoDisabled: [{
4508
- type: Input
4509
- }] } });
4392
+ }], ctorParameters: () => [{ type: i1$6.ActivatedRoute }, { type: TranslateService }] });
4510
4393
 
4511
4394
  /**
4512
4395
  * Clase que utiliza un custom componente para select de elementos
@@ -4518,54 +4401,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4518
4401
  * @input filter: true indicará que podemos buscar dentro del select, false que no.
4519
4402
  **/
4520
4403
  class BitDropDownComponent extends BitDropDownGeneralComponent {
4521
- constructor(router, translateService) {
4404
+ constructor() {
4405
+ const router = inject(ActivatedRoute);
4406
+ const translateService = inject(TranslateService);
4522
4407
  super(router, translateService);
4408
+ this.filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : []));
4523
4409
  this.router = router;
4524
4410
  this.translateService = translateService;
4525
- this.filter = false;
4526
- }
4527
- ngOnChanges(changes) {
4528
- let hayCambios = false;
4529
- for (let propName in changes) {
4530
- let changedProp = changes[propName];
4531
- if (propName === "data") {
4532
- this.listaOpciones = changedProp.currentValue ? changedProp.currentValue.slice() : [];
4533
- hayCambios = true;
4534
- }
4535
- else if (propName === "excludedValues") {
4536
- this.excludedValues = changedProp.currentValue;
4537
- hayCambios = true;
4538
- }
4539
- else if (propName === "includeEmpty") {
4540
- this.includeEmpty = changedProp.currentValue;
4541
- hayCambios = true;
4542
- }
4543
- }
4544
- if (hayCambios) {
4545
- this.postRetrieveData();
4546
- }
4547
4411
  }
4548
4412
  get value_lectura() {
4549
- let dom = this.listaOpciones && this.listaOpciones.find((d) => d[this.atributoValue] == this.value);
4550
- return dom ? dom[this.atributoLabel] : this.value;
4413
+ let dom = this.listaOpciones() && this.listaOpciones().find((d) => d[this.atributoValue()] == this.value);
4414
+ let v = dom ? dom[this.atributoLabel()] : this.value;
4415
+ this.log() && console.log("value lectura: " + v);
4416
+ return v;
4551
4417
  }
4552
4418
  writeValue(v) {
4553
- if (this.valueAs == "string") {
4419
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4420
+ if (this.valueAs() == "string") {
4554
4421
  // convertimos el number a string porque nos han dicho que el ID del select es string
4555
4422
  this.value = v != null ? "" + v : v;
4556
- console.log("writeValue as string", this.value);
4557
4423
  }
4558
4424
  else {
4559
4425
  this.value = v;
4560
- console.log("writeValue", this.value);
4561
4426
  }
4562
4427
  }
4563
4428
  _onChangeValue(event) {
4564
4429
  this.value = event.value;
4565
- console.log("onChangeValue", event.value);
4566
4430
  // convertimos el string seleccionado del select a number
4567
- if (this.valueAs == "string") {
4568
- console.log("value as string");
4431
+ if (this.valueAs() == "string") {
4432
+ this.log() && console.log(`_onChangeValue forComponent ${this.nombre()} value as string`);
4569
4433
  this.changeComponentValue(this.value != null ? +event.value : null);
4570
4434
  }
4571
4435
  else {
@@ -4576,14 +4440,14 @@ class BitDropDownComponent extends BitDropDownGeneralComponent {
4576
4440
  this.value = null;
4577
4441
  this.changeComponentValue(this.value);
4578
4442
  }
4579
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
4580
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDropDownComponent, isStandalone: false, selector: "bit-dropdown", inputs: { filter: "filter" }, providers: [
4443
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4444
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDropDownComponent, isStandalone: false, selector: "bit-dropdown", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
4581
4445
  {
4582
4446
  provide: NG_VALUE_ACCESSOR,
4583
4447
  useExisting: forwardRef(() => BitDropDownComponent),
4584
4448
  multi: true
4585
4449
  }
4586
- ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-select\n id=\"{{ nombre }}\"\n [(ngModel)]=\"value\"\n [disabled]=\"isDisabled\"\n [options]=\"listaOpcionesVisible\"\n [filter]=\"filter\"\n [group]=\"group\"\n [optionLabel]=\"atributoLabel\"\n [optionValue]=\"atributoValue\"\n [optionDisabled]=\"atributoDisabled\"\n [appendTo]=\"appendTo\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n <ng-template let-item pTemplate=\"item\">\n <span [ngClass]=\"{ 'opcion-desactivada': item[atributoDisabled] }\">{{ item[atributoLabel] }}</span>\n </ng-template>\n </p-select>\n @if (control != null) {\n <control-messages [control]=\"control\" [field]=\"id\"></control-messages>\n }\n}\n", dependencies: [{ kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4450
+ ], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-select\n id=\"{{ nombre() }}\"\n [(ngModel)]=\"value\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [options]=\"listaOpcionesVisible()\"\n [filter]=\"filter()\"\n [group]=\"group()\"\n [optionLabel]=\"atributoLabel()\"\n [optionValue]=\"atributoValue()\"\n [optionDisabled]=\"atributoDisabled()\"\n [appendTo]=\"appendTo()\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n >\n <ng-template let-item pTemplate=\"item\">\n <span [ngClass]=\"{ 'opcion-desactivada': item[atributoDisabled()] }\">{{ item[atributoLabel()] }}</span>\n </ng-template>\n </p-select>\n @if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"id()\" />\n }\n}\n", dependencies: [{ kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4587
4451
  }
4588
4452
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownComponent, decorators: [{
4589
4453
  type: Component,
@@ -4593,113 +4457,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4593
4457
  useExisting: forwardRef(() => BitDropDownComponent),
4594
4458
  multi: true
4595
4459
  }
4596
- ], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-select\n id=\"{{ nombre }}\"\n [(ngModel)]=\"value\"\n [disabled]=\"isDisabled\"\n [options]=\"listaOpcionesVisible\"\n [filter]=\"filter\"\n [group]=\"group\"\n [optionLabel]=\"atributoLabel\"\n [optionValue]=\"atributoValue\"\n [optionDisabled]=\"atributoDisabled\"\n [appendTo]=\"appendTo\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n <ng-template let-item pTemplate=\"item\">\n <span [ngClass]=\"{ 'opcion-desactivada': item[atributoDisabled] }\">{{ item[atributoLabel] }}</span>\n </ng-template>\n </p-select>\n @if (control != null) {\n <control-messages [control]=\"control\" [field]=\"id\"></control-messages>\n }\n}\n" }]
4597
- }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: TranslateService }], propDecorators: { filter: [{
4598
- type: Input
4599
- }] } });
4460
+ ], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-select\n id=\"{{ nombre() }}\"\n [(ngModel)]=\"value\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [options]=\"listaOpcionesVisible()\"\n [filter]=\"filter()\"\n [group]=\"group()\"\n [optionLabel]=\"atributoLabel()\"\n [optionValue]=\"atributoValue()\"\n [optionDisabled]=\"atributoDisabled()\"\n [appendTo]=\"appendTo()\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n >\n <ng-template let-item pTemplate=\"item\">\n <span [ngClass]=\"{ 'opcion-desactivada': item[atributoDisabled()] }\">{{ item[atributoLabel()] }}</span>\n </ng-template>\n </p-select>\n @if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"id()\" />\n }\n}\n" }]
4461
+ }], ctorParameters: () => [] });
4600
4462
 
4601
4463
  /**
4602
4464
  * Clase que utiliza un custom componente para select múltiple de elementos
4603
4465
  * <bit-dropdown-multiple id="tipolog" [formControl]="formControl"">&nbsp;&nbsp;Tipus d'operació</bit-dropdown-multiple>
4604
4466
  **/
4605
4467
  class BitDropDownMultipleComponent extends BitDropDownGeneralComponent {
4606
- constructor(router, translateService, changeDetectorRef) {
4468
+ constructor() {
4469
+ const router = inject(ActivatedRoute);
4470
+ const translateService = inject(TranslateService);
4607
4471
  super(router, translateService);
4472
+ this.maxSelectedLabels = input(3, ...(ngDevMode ? [{ debugName: "maxSelectedLabels" }] : []));
4473
+ this.showSeparateSelectedLabels = input(false, ...(ngDevMode ? [{ debugName: "showSeparateSelectedLabels" }] : [])); // indica si se muestran los elementos seleccionados en una columna separada
4474
+ this.title = input(undefined, ...(ngDevMode ? [{ debugName: "title" }] : [])); //título que aparece en el link para eliminar un elemento una vez seleccionado
4475
+ this.filter = input(undefined, ...(ngDevMode ? [{ debugName: "filter" }] : []));
4608
4476
  this.router = router;
4609
4477
  this.translateService = translateService;
4610
- this.changeDetectorRef = changeDetectorRef;
4611
- this.maxSelectedLabels = 3;
4612
- this.showSeparateSelectedLabels = false; // indica si se muestran los elementos seleccionados en una columna separada
4613
- }
4614
- ngOnChanges(changes) {
4615
- let hayCambios = false;
4616
- for (let propName in changes) {
4617
- let changedProp = changes[propName];
4618
- if (propName === "data") {
4619
- this.listaOpciones = changedProp.currentValue ? changedProp.currentValue.slice() : [];
4620
- hayCambios = true;
4621
- }
4622
- else if (propName === "excludedValues") {
4623
- this.excludedValues = changedProp.currentValue;
4624
- hayCambios = true;
4625
- }
4626
- else if (propName === "includeEmpty") {
4627
- this.includeEmpty = changedProp.currentValue;
4628
- hayCambios = true;
4629
- }
4630
- }
4631
- if (hayCambios) {
4632
- this.postRetrieveData();
4633
- }
4634
4478
  }
4635
4479
  labelSelectedItem(id) {
4636
4480
  let label = "";
4637
- if (this.listaOpciones) {
4638
- let selected = this.listaOpciones.find((c) => c[this.atributoValue] == id);
4481
+ if (this.listaOpciones()) {
4482
+ let selected = this.listaOpciones().find((c) => c[this.atributoValue()] == id);
4639
4483
  if (selected) {
4640
- label = selected[this.atributoLabel];
4484
+ label = selected[this.atributoLabel()];
4485
+ this.log() && console.log(`labelSelectedItem forComponent ${this.nombre()} selected: ${label}`);
4641
4486
  }
4642
4487
  }
4643
4488
  return label;
4644
4489
  }
4645
4490
  deleteSelectedItem(event, item) {
4491
+ this.log() && console.log("deleteSelectedItem forComponent:" + this.nombre(), item);
4646
4492
  event.preventDefault();
4647
4493
  let index = this.value.indexOf(item);
4648
4494
  var currentValue = this.value;
4495
+ this.log() && console.log("currentValue: " + currentValue);
4649
4496
  currentValue.splice(index, 1);
4650
4497
  this.value = currentValue.slice(0);
4498
+ this.log() && console.log("value: " + currentValue);
4651
4499
  this.emitValue();
4652
4500
  }
4653
4501
  get value_lectura() {
4654
- let vals = this.control.value;
4502
+ let vals = this.control().value;
4655
4503
  if (!!vals) {
4656
4504
  let value = [];
4657
4505
  for (let val of vals) {
4658
- let opcion = this.listaOpciones.find((d) => d[this.atributoValue] == val);
4506
+ let opcion = this.listaOpciones().find((d) => d[this.atributoValue()] == val);
4659
4507
  if (opcion) {
4660
- value.push(opcion[this.atributoLabel]);
4508
+ value.push(opcion[this.atributoLabel()]);
4661
4509
  }
4662
4510
  else {
4663
4511
  value.push(val);
4664
4512
  }
4665
4513
  }
4666
- return value.join(", ");
4514
+ let v = value.join(", ");
4515
+ this.log() && console.log("value lectura: " + v);
4516
+ return v;
4667
4517
  }
4518
+ this.log() && console.log("value lectura is blank");
4668
4519
  return "";
4669
4520
  }
4670
4521
  writeValue(v) {
4522
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4671
4523
  this.value = v;
4672
- if (this.valueAs == "string") {
4524
+ if (this.valueAs() == "string") {
4673
4525
  // convertimos el number a string porque nos han dicho que el ID del select es string
4674
4526
  if (v != null) {
4675
4527
  this.value = [];
4676
4528
  v.forEach((item) => this.value.push("" + item));
4529
+ this.log() && console.log("currentValues: ", this.value);
4677
4530
  }
4678
4531
  }
4679
4532
  }
4680
4533
  _onChangeValue(event) {
4681
4534
  this.value = event.value;
4535
+ this.log() && console.log("_onChangeValue forComponent:" + this.nombre() + " with values: " + this.value);
4682
4536
  // convertimos el string selecionado del select a number
4683
4537
  let v = this.value;
4684
- if (this.valueAs == "string") {
4538
+ if (this.valueAs() == "string") {
4685
4539
  v = [];
4686
4540
  this.value.forEach((item) => v.push(+item));
4541
+ this.log() && console.log("value as string: ", this.value);
4687
4542
  }
4688
4543
  this.emitValue();
4689
4544
  }
4690
4545
  _onClear() {
4546
+ this.log() && console.log("_onClear forComponent:" + this.nombre());
4691
4547
  this.value = null;
4692
4548
  this.emitValue();
4693
4549
  }
4694
4550
  emitValue() {
4695
4551
  this.changeComponentValue(this.value);
4696
4552
  }
4697
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownMultipleComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: TranslateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4698
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDropDownMultipleComponent, isStandalone: false, selector: "bit-dropdown-multiple", inputs: { maxSelectedLabels: "maxSelectedLabels", showSeparateSelectedLabels: "showSeparateSelectedLabels", title: "title", filter: "filter" }, providers: [{
4553
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownMultipleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4554
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitDropDownMultipleComponent, isStandalone: false, selector: "bit-dropdown-multiple", inputs: { maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, showSeparateSelectedLabels: { classPropertyName: "showSeparateSelectedLabels", publicName: "showSeparateSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
4699
4555
  provide: NG_VALUE_ACCESSOR,
4700
4556
  useExisting: forwardRef(() => BitDropDownMultipleComponent),
4701
4557
  multi: true
4702
- }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (!hideLabel) {\n <label><ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly && !showSeparateSelectedLabels) {\n <p class=\"lectura\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-multiSelect\n id=\"{{ id }}\"\n [(ngModel)]=\"value\"\n [options]=\"listaOpciones\"\n [disabled]=\"isDisabled\"\n [optionLabel]=\"atributoLabel\"\n [optionValue]=\"atributoValue\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [appendTo]=\"appendTo\"\n selectedItemsLabel=\"{0} elements seleccionats\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-multiSelect>\n @if (control != null) {\n <control-messages [control]=\"control\" [field]=\"id\"></control-messages>\n }\n @if (showSeparateSelectedLabels) {\n <div>\n <label>&nbsp;</label>\n <div class=\"multiselect-labels\">\n @for (item of value; track item) {\n <div class=\"label label-primary multiselect-labels-lg\">\n <span>{{ labelSelectedItem(item) }}</span>\n @if (!readOnly) {\n &nbsp;&nbsp;\n <a (click)=\"deleteSelectedItem($event, item)\" title=\"{{ title }}\"><i class=\"fa fa-times\"></i></a>\n }\n </div>\n }\n </div>\n </div>\n }\n}", styles: ["bit-dropdown-multiple div{margin-right:2px!important}bit-dropdown-multiple .row{margin-left:0}.multiselect-labels .label{font-size:90%}.multiselect-labels .label span{margin-right:2px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4558
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label><ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly() && !showSeparateSelectedLabels()) {\n <p class=\"lectura\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-multiSelect id=\"{{ id() }}\"\n [(ngModel)]=\"value\"\n aria-label=\"{{ nombre() }}\"\n [options]=\"listaOpciones()\"\n [disabled]=\"isDisabled()\"\n [optionLabel]=\"atributoLabel()\"\n [optionValue]=\"atributoValue()\"\n [maxSelectedLabels]=\"maxSelectedLabels()\"\n [appendTo]=\"appendTo()\"\n selectedItemsLabel=\"{0} elements seleccionats\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n @if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"id()\" />\n }\n @if (showSeparateSelectedLabels()) {\n <div>\n <label>&nbsp;</label>\n <div class=\"multiselect-labels\">\n @for (item of value; track item) {\n <div class=\"label label-primary multiselect-labels-lg\">\n <span>{{ labelSelectedItem(item) }}</span>\n @if (!readOnly()) {\n &nbsp;&nbsp;\n <a (click)=\"deleteSelectedItem($event, item)\" title=\"{{ title() }}\"><i class=\"fa fa-times\"></i></a>\n }\n </div>\n }\n </div>\n </div>\n }\n}", styles: ["bit-dropdown-multiple div{margin-right:2px!important}bit-dropdown-multiple .row{margin-left:0}.multiselect-labels .label{font-size:90%}.multiselect-labels .label span{margin-right:2px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$7.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4703
4559
  }
4704
4560
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitDropDownMultipleComponent, decorators: [{
4705
4561
  type: Component,
@@ -4707,16 +4563,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4707
4563
  provide: NG_VALUE_ACCESSOR,
4708
4564
  useExisting: forwardRef(() => BitDropDownMultipleComponent),
4709
4565
  multi: true
4710
- }], standalone: false, template: "@if (!hideLabel) {\n <label><ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly && !showSeparateSelectedLabels) {\n <p class=\"lectura\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-multiSelect\n id=\"{{ id }}\"\n [(ngModel)]=\"value\"\n [options]=\"listaOpciones\"\n [disabled]=\"isDisabled\"\n [optionLabel]=\"atributoLabel\"\n [optionValue]=\"atributoValue\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [appendTo]=\"appendTo\"\n selectedItemsLabel=\"{0} elements seleccionats\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-multiSelect>\n @if (control != null) {\n <control-messages [control]=\"control\" [field]=\"id\"></control-messages>\n }\n @if (showSeparateSelectedLabels) {\n <div>\n <label>&nbsp;</label>\n <div class=\"multiselect-labels\">\n @for (item of value; track item) {\n <div class=\"label label-primary multiselect-labels-lg\">\n <span>{{ labelSelectedItem(item) }}</span>\n @if (!readOnly) {\n &nbsp;&nbsp;\n <a (click)=\"deleteSelectedItem($event, item)\" title=\"{{ title }}\"><i class=\"fa fa-times\"></i></a>\n }\n </div>\n }\n </div>\n </div>\n }\n}", styles: ["bit-dropdown-multiple div{margin-right:2px!important}bit-dropdown-multiple .row{margin-left:0}.multiselect-labels .label{font-size:90%}.multiselect-labels .label span{margin-right:2px}\n"] }]
4711
- }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: TranslateService }, { type: i0.ChangeDetectorRef }], propDecorators: { maxSelectedLabels: [{
4712
- type: Input
4713
- }], showSeparateSelectedLabels: [{
4714
- type: Input
4715
- }], title: [{
4716
- type: Input
4717
- }], filter: [{
4718
- type: Input
4719
- }] } });
4566
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label><ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda fa fa-question\"></i>\n }\n </label>\n}\n@if (readOnly() && !showSeparateSelectedLabels()) {\n <p class=\"lectura\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-multiSelect id=\"{{ id() }}\"\n [(ngModel)]=\"value\"\n aria-label=\"{{ nombre() }}\"\n [options]=\"listaOpciones()\"\n [disabled]=\"isDisabled()\"\n [optionLabel]=\"atributoLabel()\"\n [optionValue]=\"atributoValue()\"\n [maxSelectedLabels]=\"maxSelectedLabels()\"\n [appendTo]=\"appendTo()\"\n selectedItemsLabel=\"{0} elements seleccionats\"\n (onChange)=\"_onChangeValue($event)\"\n (onClear)=\"_onClear()\"\n (onBlur)=\"_onBlur()\"\n (onFocus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n @if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"id()\" />\n }\n @if (showSeparateSelectedLabels()) {\n <div>\n <label>&nbsp;</label>\n <div class=\"multiselect-labels\">\n @for (item of value; track item) {\n <div class=\"label label-primary multiselect-labels-lg\">\n <span>{{ labelSelectedItem(item) }}</span>\n @if (!readOnly()) {\n &nbsp;&nbsp;\n <a (click)=\"deleteSelectedItem($event, item)\" title=\"{{ title() }}\"><i class=\"fa fa-times\"></i></a>\n }\n </div>\n }\n </div>\n </div>\n }\n}", styles: ["bit-dropdown-multiple div{margin-right:2px!important}bit-dropdown-multiple .row{margin-left:0}.multiselect-labels .label{font-size:90%}.multiselect-labels .label span{margin-right:2px}\n"] }]
4567
+ }], ctorParameters: () => [] });
4720
4568
 
4721
4569
  class ConfigurationEditor {
4722
4570
  constructor() {
@@ -4751,24 +4599,27 @@ class ConfigurationEditor {
4751
4599
  class BitEditorComponent extends BitCustomComponent {
4752
4600
  constructor() {
4753
4601
  super(...arguments);
4754
- this.tipo = "default";
4602
+ this.tipo = input("default", ...(ngDevMode ? [{ debugName: "tipo" }] : []));
4755
4603
  // si es "custom", se utiliza el objeto de configuracion: configuration.
4756
4604
  // si es "default", no se utiliza ninguna configuracion (se muestran todos los controles)
4757
- this.configuration = BitEditorComponent.globalConfiguration;
4758
- this.height = 100;
4759
- this.onTextChange = new EventEmitter();
4605
+ this.configuration = input(BitEditorComponent.globalConfiguration, ...(ngDevMode ? [{ debugName: "configuration" }] : []));
4606
+ this.height = input(100, ...(ngDevMode ? [{ debugName: "height" }] : []));
4607
+ this.onTextChange = output();
4760
4608
  }
4761
4609
  // es posible tener configuraciones globales en todos los bit-editor de un proyecto
4762
4610
  static { this.globalConfiguration = ConfigurationEditor.newObject(); }
4763
4611
  get value_lectura() {
4764
4612
  if (this.value == null) {
4613
+ this.log() && console.log("value lectura is null");
4765
4614
  return "";
4766
4615
  } // si es null o undefined (es lo que evalúa el "==null")
4767
4616
  else {
4617
+ this.log() && console.log("value lectura: " + this.value);
4768
4618
  return this.value;
4769
4619
  }
4770
4620
  }
4771
4621
  writeValue(v) {
4622
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
4772
4623
  if (!v) {
4773
4624
  this.value = "";
4774
4625
  }
@@ -4778,6 +4629,7 @@ class BitEditorComponent extends BitCustomComponent {
4778
4629
  }
4779
4630
  onChangeValue(text) {
4780
4631
  this.value = text;
4632
+ this.log() && console.log("_onSelect forComponent: " + this.nombre() + " with value:" + this.value);
4781
4633
  this.changeComponentValue(this.value);
4782
4634
  }
4783
4635
  onInit(quill) {
@@ -4792,17 +4644,19 @@ class BitEditorComponent extends BitCustomComponent {
4792
4644
  });*/
4793
4645
  }
4794
4646
  _onTextChange(event) {
4647
+ this.log() && console.log("_onTextChange forComponent: " + this.nombre() + " with event:", event);
4795
4648
  this.onTextChange.emit(event);
4796
4649
  }
4797
4650
  get configuracion() {
4798
- return this.configuration ? this.configuration : BitEditorComponent.globalConfiguration;
4651
+ const configuration = this.configuration();
4652
+ return configuration ? configuration : BitEditorComponent.globalConfiguration;
4799
4653
  }
4800
4654
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4801
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitEditorComponent, isStandalone: false, selector: "bit-editor", inputs: { tipo: "tipo", configuration: "configuration", height: "height" }, outputs: { onTextChange: "onTextChange" }, providers: [{
4655
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitEditorComponent, isStandalone: false, selector: "bit-editor", inputs: { tipo: { classPropertyName: "tipo", publicName: "tipo", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onTextChange: "onTextChange" }, providers: [{
4802
4656
  provide: NG_VALUE_ACCESSOR,
4803
4657
  useExisting: forwardRef(() => BitEditorComponent),
4804
4658
  multi: true
4805
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\">\n {{ value_lectura && value_lectura != \"\" ? value_lectura : \"&nbsp;\" }}\n </p>\n}\n@if (!readOnly && tipo == 'custom') {\n <p-editor\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"placeholder\"\n [style]=\"{ height: height + 'px' }\"\n (onInit)=\"onInit($event)\"\n (ngModelChange)=\"onChangeValue($event)\"\n (onTextChange)=\"_onTextChange($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n <p-header>\n @if (configuracion.fontSize) {\n <span class=\"ql-formats\">\n <select class=\"ql-size\">\n <option value=\"small\">{{ \"bitnglibrary.form.biteditor.small\" | transloco }}</option>\n <!-- Note a missing, thus falsy value, is used to reset to default -->\n <option selected>{{ \"bitnglibrary.form.biteditor.normal\" | transloco }}</option>\n <option value=\"large\">{{ \"bitnglibrary.form.biteditor.large\" | transloco }}</option>\n <option value=\"huge\">{{ \"bitnglibrary.form.biteditor.huge\" | transloco }}</option>\n </select>\n </span>\n }\n @if (configuracion.fontFormat) {\n <span class=\"ql-formats\">\n <button class=\"ql-bold\" aria-label=\"Bold\"></button>\n <button class=\"ql-italic\" aria-label=\"Italic\"></button>\n <button class=\"ql-underline\" aria-label=\"Underline\"></button>\n <button class=\"ql-strike\" aria-label=\"Strikethrough\"></button>\n </span>\n }\n @if (configuracion.bullet) {\n <span class=\"ql-formats\">\n <button class=\"ql-list\" value=\"ordered\" type=\"button\"></button>\n <button class=\"ql-list\" value=\"bullet\" type=\"button\"></button>\n </span>\n }\n @if (configuracion.link) {\n <span class=\"ql-formats\">\n <button class=\"ql-link\" aria-label=\"Insert Link\" type=\"button\"></button>\n </span>\n }\n </p-header>\n </p-editor>\n}\n@if (!readOnly && (!tipo || tipo == 'default')) {\n <p-editor\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [placeholder]=\"placeholder\"\n [placeholder]=\"placeholder\"\n [style]=\"{ height: height + 'px' }\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-editor>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i2$1.Header, selector: "p-header" }, { kind: "component", type: i2$6.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }] }); }
4659
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\">\n {{ value_lectura && value_lectura != \"\" ? value_lectura : \"&nbsp;\" }}\n </p>\n}\n@if (!readOnly() && tipo() == 'custom') {\n <p-editor\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [style]=\"{ height: height() + 'px' }\"\n (onInit)=\"onInit($event)\"\n (ngModelChange)=\"onChangeValue($event)\"\n (onTextChange)=\"_onTextChange($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n >\n <p-header>\n @if (configuracion.fontSize) {\n <span class=\"ql-formats\">\n <select class=\"ql-size\">\n <option value=\"small\">{{ \"bitnglibrary.form.biteditor.small\" | transloco }}</option>\n <!-- Note a missing, thus falsy value, is used to reset to default -->\n <option selected>{{ \"bitnglibrary.form.biteditor.normal\" | transloco }}</option>\n <option value=\"large\">{{ \"bitnglibrary.form.biteditor.large\" | transloco }}</option>\n <option value=\"huge\">{{ \"bitnglibrary.form.biteditor.huge\" | transloco }}</option>\n </select>\n </span>\n }\n @if (configuracion.fontFormat) {\n <span class=\"ql-formats\">\n <button class=\"ql-bold\" aria-label=\"Bold\"></button>\n <button class=\"ql-italic\" aria-label=\"Italic\"></button>\n <button class=\"ql-underline\" aria-label=\"Underline\"></button>\n <button class=\"ql-strike\" aria-label=\"Strikethrough\"></button>\n </span>\n }\n @if (configuracion.bullet) {\n <span class=\"ql-formats\">\n <button class=\"ql-list\" value=\"ordered\" type=\"button\"></button>\n <button class=\"ql-list\" value=\"bullet\" type=\"button\"></button>\n </span>\n }\n @if (configuracion.link) {\n <span class=\"ql-formats\">\n <button class=\"ql-link\" aria-label=\"Insert Link\" type=\"button\"></button>\n </span>\n }\n </p-header>\n </p-editor>\n}\n@if (!readOnly() && (!tipo() || tipo() == 'default')) {\n <p-editor id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [placeholder]=\"placeholder()\"\n [placeholder]=\"placeholder()\"\n [style]=\"{ height: height() + 'px' }\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$3.Header, selector: "p-header" }, { kind: "component", type: i2$8.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: FocusRegisterDirective, selector: "input,select,textarea,bit-input,bit-select" }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] }); }
4806
4660
  }
4807
4661
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitEditorComponent, decorators: [{
4808
4662
  type: Component,
@@ -4810,273 +4664,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
4810
4664
  provide: NG_VALUE_ACCESSOR,
4811
4665
  useExisting: forwardRef(() => BitEditorComponent),
4812
4666
  multi: true
4813
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\">\n {{ value_lectura && value_lectura != \"\" ? value_lectura : \"&nbsp;\" }}\n </p>\n}\n@if (!readOnly && tipo == 'custom') {\n <p-editor\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"placeholder\"\n [style]=\"{ height: height + 'px' }\"\n (onInit)=\"onInit($event)\"\n (ngModelChange)=\"onChangeValue($event)\"\n (onTextChange)=\"_onTextChange($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n <p-header>\n @if (configuracion.fontSize) {\n <span class=\"ql-formats\">\n <select class=\"ql-size\">\n <option value=\"small\">{{ \"bitnglibrary.form.biteditor.small\" | transloco }}</option>\n <!-- Note a missing, thus falsy value, is used to reset to default -->\n <option selected>{{ \"bitnglibrary.form.biteditor.normal\" | transloco }}</option>\n <option value=\"large\">{{ \"bitnglibrary.form.biteditor.large\" | transloco }}</option>\n <option value=\"huge\">{{ \"bitnglibrary.form.biteditor.huge\" | transloco }}</option>\n </select>\n </span>\n }\n @if (configuracion.fontFormat) {\n <span class=\"ql-formats\">\n <button class=\"ql-bold\" aria-label=\"Bold\"></button>\n <button class=\"ql-italic\" aria-label=\"Italic\"></button>\n <button class=\"ql-underline\" aria-label=\"Underline\"></button>\n <button class=\"ql-strike\" aria-label=\"Strikethrough\"></button>\n </span>\n }\n @if (configuracion.bullet) {\n <span class=\"ql-formats\">\n <button class=\"ql-list\" value=\"ordered\" type=\"button\"></button>\n <button class=\"ql-list\" value=\"bullet\" type=\"button\"></button>\n </span>\n }\n @if (configuracion.link) {\n <span class=\"ql-formats\">\n <button class=\"ql-link\" aria-label=\"Insert Link\" type=\"button\"></button>\n </span>\n }\n </p-header>\n </p-editor>\n}\n@if (!readOnly && (!tipo || tipo == 'default')) {\n <p-editor\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [placeholder]=\"placeholder\"\n [placeholder]=\"placeholder\"\n [style]=\"{ height: height + 'px' }\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-editor>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
4814
- }], propDecorators: { tipo: [{
4815
- type: Input
4816
- }], configuration: [{
4817
- type: Input
4818
- }], height: [{
4819
- type: Input
4820
- }], onTextChange: [{
4821
- type: Output
4822
- }] } });
4667
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp; @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\">\n {{ value_lectura && value_lectura != \"\" ? value_lectura : \"&nbsp;\" }}\n </p>\n}\n@if (!readOnly() && tipo() == 'custom') {\n <p-editor\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [style]=\"{ height: height() + 'px' }\"\n (onInit)=\"onInit($event)\"\n (ngModelChange)=\"onChangeValue($event)\"\n (onTextChange)=\"_onTextChange($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n >\n <p-header>\n @if (configuracion.fontSize) {\n <span class=\"ql-formats\">\n <select class=\"ql-size\">\n <option value=\"small\">{{ \"bitnglibrary.form.biteditor.small\" | transloco }}</option>\n <!-- Note a missing, thus falsy value, is used to reset to default -->\n <option selected>{{ \"bitnglibrary.form.biteditor.normal\" | transloco }}</option>\n <option value=\"large\">{{ \"bitnglibrary.form.biteditor.large\" | transloco }}</option>\n <option value=\"huge\">{{ \"bitnglibrary.form.biteditor.huge\" | transloco }}</option>\n </select>\n </span>\n }\n @if (configuracion.fontFormat) {\n <span class=\"ql-formats\">\n <button class=\"ql-bold\" aria-label=\"Bold\"></button>\n <button class=\"ql-italic\" aria-label=\"Italic\"></button>\n <button class=\"ql-underline\" aria-label=\"Underline\"></button>\n <button class=\"ql-strike\" aria-label=\"Strikethrough\"></button>\n </span>\n }\n @if (configuracion.bullet) {\n <span class=\"ql-formats\">\n <button class=\"ql-list\" value=\"ordered\" type=\"button\"></button>\n <button class=\"ql-list\" value=\"bullet\" type=\"button\"></button>\n </span>\n }\n @if (configuracion.link) {\n <span class=\"ql-formats\">\n <button class=\"ql-link\" aria-label=\"Insert Link\" type=\"button\"></button>\n </span>\n }\n </p-header>\n </p-editor>\n}\n@if (!readOnly() && (!tipo() || tipo() == 'default')) {\n <p-editor id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [ngModel]=\"value\"\n styleClass=\"editor\"\n [placeholder]=\"placeholder()\"\n [placeholder]=\"placeholder()\"\n [style]=\"{ height: height() + 'px' }\"\n (ngModelChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4668
+ }] });
4823
4669
 
4824
4670
  class BitReadonlyComponent {
4825
- constructor(router, sessionShared, ayudaService, changeDetectorRef, dateUtils) {
4826
- this.router = router;
4827
- this.sessionShared = sessionShared;
4828
- this.ayudaService = ayudaService;
4829
- this.changeDetectorRef = changeDetectorRef;
4830
- this.dateUtils = dateUtils;
4831
- this.hideLabel = false;
4832
- this.opcionesDropdown = [];
4833
- }
4834
- ngOnInit() {
4835
- if (!!this.domain && !this.data) {
4836
- this.router.data.subscribe(result => {
4837
- let dominios = result["dominios"];
4838
- let domainTipo = dominios[this.domain];
4839
- if (domainTipo != null) {
4840
- domainTipo.subscribe((result) => {
4841
- //console.log(result);
4842
- this.sessionShared.set(this.domain, result.slice()); // almacenamos en sesión una copia para evitar transmitir cambios
4843
- this.opcionesDropdown = result.slice();
4844
- this.changeDetectorRef.detectChanges();
4845
- }, (error) => {
4846
- console.log("Error carrega dominis", this.domain, error);
4847
- });
4848
- }
4849
- else {
4850
- console.log("Domini sense dades", this.domain);
4851
- }
4852
- });
4853
- }
4854
- else if (this.data) {
4855
- this.opcionesDropdown = this.data.slice();
4856
- }
4857
- }
4858
- ngOnChanges(changes) {
4859
- for (let propName in changes) {
4860
- if (propName === "data") {
4861
- let newData = changes[propName].currentValue || [];
4862
- this.opcionesDropdown = newData.slice();
4863
- this.changeDetectorRef.detectChanges();
4864
- }
4865
- }
4671
+ constructor() {
4672
+ this.router = inject(ActivatedRoute);
4673
+ this.sessionShared = inject(SessionSharedService);
4674
+ this.ayudaService = inject(AyudaService);
4675
+ this.dateUtils = inject(DateUtils);
4676
+ this.ayuda = input(...(ngDevMode ? [undefined, { debugName: "ayuda" }] : []));
4677
+ this.valor = input(...(ngDevMode ? [undefined, { debugName: "valor" }] : []));
4678
+ this.tipo = input("text", ...(ngDevMode ? [{ debugName: "tipo" }] : [])); // text (default), date, datetime, time, boolean, textarea, list, list-multiple
4679
+ this.hideLabel = input(false, ...(ngDevMode ? [{ debugName: "hideLabel" }] : []));
4680
+ this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : [])); //lista de valores estáticos con lo que inicializamos el select
4681
+ this.isTextarea = computed(() => this.tipo() === "textarea", ...(ngDevMode ? [{ debugName: "isTextarea" }] : []));
4682
+ this.opcionesDropdown = computed(() => {
4683
+ return (this.data() && this.data().slice()) || [];
4684
+ }, ...(ngDevMode ? [{ debugName: "opcionesDropdown" }] : []));
4866
4685
  }
4867
4686
  showAyuda() {
4868
- this.ayudaService.mostrarAyuda(this.ayuda);
4687
+ this.ayudaService.mostrarAyuda(this.ayuda());
4869
4688
  }
4870
4689
  get value_lectura() {
4871
- this.tipo = this.tipo || "text";
4872
- switch (this.tipo) {
4690
+ const valor = this.valor();
4691
+ switch (this.tipo()) {
4873
4692
  case "date":
4874
- return this.valor ? this.dateUtils.getDateAsString(this.dateUtils.stringShortToDate(this.valor)) : "";
4693
+ return valor ? this.dateUtils.getDateAsString(this.dateUtils.stringShortToDate(valor)) : "";
4875
4694
  case "datetime":
4876
- return this.valor ? this.dateUtils.getDateTimeAsString(this.dateUtils.stringToDate(this.valor)) : "";
4695
+ return valor ? this.dateUtils.getDateTimeAsString(this.dateUtils.stringToDate(valor)) : "";
4877
4696
  case "time":
4878
- return this.valor ? this.dateUtils.getTimeAsString(this.dateUtils.stringToTime(this.valor)) : "";
4697
+ return valor ? this.dateUtils.getTimeAsString(this.dateUtils.stringToTime(valor)) : "";
4879
4698
  case "boolean":
4880
- return this.valor ? "Sí" : "No";
4699
+ return valor ? "Sí" : "No";
4881
4700
  case "list":
4882
- let d = this.opcionesDropdown.find(d => d.value == this.valor);
4701
+ let d = this.opcionesDropdown().find(d => d.value == valor);
4883
4702
  return d ? d.label : "";
4884
4703
  case "list-multiple":
4885
- let labels = this.opcionesDropdown && this.opcionesDropdown.filter(d => this.valor && this.valor.indexOf(d.value) > -1).map(d => d.label);
4704
+ let labels = this.opcionesDropdown() && this.opcionesDropdown().filter(d => valor && valor.indexOf(d.value) > -1).map(d => d.label);
4886
4705
  return labels ? labels.join(", ") : null;
4887
4706
  default:
4888
- return this.valor;
4707
+ return valor;
4889
4708
  }
4890
4709
  }
4891
- get isTextarea() {
4892
- return this.tipo === "textarea";
4893
- }
4894
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitReadonlyComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: SessionSharedService }, { token: AyudaService }, { token: i0.ChangeDetectorRef }, { token: DateUtils }], target: i0.ɵɵFactoryTarget.Component }); }
4895
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitReadonlyComponent, isStandalone: false, selector: "bit-readonly", inputs: { ayuda: "ayuda", valor: "valor", tipo: "tipo", hideLabel: "hideLabel", data: "data", domain: "domain" }, usesOnChanges: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (!isTextarea) {\n <p class=\"lectura\">{{value_lectura}}</p>\n}\n@if (isTextarea) {\n <pre class=\"lectura\">{{value_lectura}}</pre>\n}" }); }
4710
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitReadonlyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4711
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitReadonlyComponent, isStandalone: false, selector: "bit-readonly", inputs: { ayuda: { classPropertyName: "ayuda", publicName: "ayuda", isSignal: true, isRequired: false, transformFunction: null }, valor: { classPropertyName: "valor", publicName: "valor", isSignal: true, isRequired: false, transformFunction: null }, tipo: { classPropertyName: "tipo", publicName: "tipo", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (!isTextarea()) {\n <p class=\"lectura\">{{value_lectura}}</p>\n}\n@if (isTextarea()) {\n <pre class=\"lectura\">{{value_lectura}}</pre>\n}" }); }
4896
4712
  }
4897
4713
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitReadonlyComponent, decorators: [{
4898
4714
  type: Component,
4899
- args: [{ selector: "bit-readonly", standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (!isTextarea) {\n <p class=\"lectura\">{{value_lectura}}</p>\n}\n@if (isTextarea) {\n <pre class=\"lectura\">{{value_lectura}}</pre>\n}" }]
4900
- }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: SessionSharedService }, { type: AyudaService }, { type: i0.ChangeDetectorRef }, { type: DateUtils }], propDecorators: { ayuda: [{
4901
- type: Input
4902
- }], valor: [{
4903
- type: Input
4904
- }], tipo: [{
4905
- type: Input
4906
- }], hideLabel: [{
4907
- type: Input
4908
- }], data: [{
4909
- type: Input
4910
- }], domain: [{
4911
- type: Input
4912
- }] } });
4913
-
4914
- class ViewModeDirective {
4915
- constructor(tpl) {
4916
- this.tpl = tpl;
4917
- }
4918
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ViewModeDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4919
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: ViewModeDirective, isStandalone: false, selector: "[viewMode]", ngImport: i0 }); }
4920
- }
4921
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ViewModeDirective, decorators: [{
4922
- type: Directive,
4923
- args: [{
4924
- selector: "[viewMode]",
4925
- standalone: false
4926
- }]
4927
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
4928
-
4929
- class EditModeDirective {
4930
- constructor(tpl) {
4931
- this.tpl = tpl;
4932
- }
4933
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: EditModeDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4934
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: EditModeDirective, isStandalone: false, selector: "[editMode]", ngImport: i0 }); }
4935
- }
4936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: EditModeDirective, decorators: [{
4937
- type: Directive,
4938
- args: [{
4939
- selector: "[editMode]",
4940
- standalone: false
4941
- }]
4942
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
4943
-
4944
- /**
4945
- * Componente que permite editar en linea valores
4946
- */
4947
- class BitEditableComponent extends BaseComponent {
4948
- constructor(host, changeDetectorRef) {
4949
- super();
4950
- this.host = host;
4951
- this.changeDetectorRef = changeDetectorRef;
4952
- this.update = new EventEmitter();
4953
- this.editMode = new Subject();
4954
- this.editMode$ = this.editMode.asObservable();
4955
- this.mode = "view";
4956
- }
4957
- ngOnInit() {
4958
- this.viewModeHandler();
4959
- this.editModeHandler();
4960
- }
4961
- /**alterna entre las dos vistas, la de visualización y la edición */
4962
- get currentView() {
4963
- return this.mode === "view" ? this.viewModeTpl.tpl : this.editModeTpl.tpl;
4964
- }
4965
- get element() {
4966
- return this.host.nativeElement;
4967
- }
4968
- /**Gestiona el dobleClick sobre el componente */
4969
- viewModeHandler() {
4970
- fromEvent(this.element, "click")
4971
- .pipe(takeUntil(this.destroy$))
4972
- .subscribe(() => {
4973
- console.log("click on element", this.element);
4974
- this.mode = "edit";
4975
- this.editMode.next(true); //emitimos el evento de que hemos pasado a edición
4976
- this.changeDetectorRef.detectChanges(); //tenemos que activar el mecanismo de detección de cambios
4977
- });
4978
- }
4979
- /**Gestiona hacer click fuera del componente. Solo se activa si estamos en modo edición */
4980
- editModeHandler() {
4981
- //observable cuando pulsan con el ratón en cualquier parte de la página
4982
- const clickOutside$ = fromEvent(document, "click").pipe(filter(({ target }) => {
4983
- //filtramos que el click no sea precisamente en el elemento que estamos editando
4984
- return this.element.contains(target) === false;
4985
- }), take(1));
4986
- //observable cuando pulsan enter en el input
4987
- fromEvent(this.element, "keyup")
4988
- .pipe(filter((e) => e.keyCode == 13), takeUntil(this.destroy$))
4989
- .subscribe((event) => {
4990
- console.log("event enter pressed");
4991
- this.throwUpdate();
4992
- });
4993
- //cuando editMode se dispara, al hacer dobleclick el usuario, activamos el observable clickOutside para gestionar cuando
4994
- //el usuario ha terminado de editar el componente
4995
- this.editMode$.pipe(switchMapTo(clickOutside$), takeUntil(this.destroy$)).subscribe((event) => {
4996
- console.log("event click outside");
4997
- this.throwUpdate();
4998
- });
4999
- }
5000
- throwUpdate() {
5001
- this.update.next(null);
5002
- this.mode = "view";
5003
- }
5004
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitEditableComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
5005
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitEditableComponent, isStandalone: false, selector: "bit-editable", outputs: { update: "update" }, queries: [{ propertyName: "viewModeTpl", first: true, predicate: ViewModeDirective, descendants: true }, { propertyName: "editModeTpl", first: true, predicate: EditModeDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-container *ngTemplateOutlet="currentView"></ng-container> `, isInline: true, dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
5006
- }
5007
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitEditableComponent, decorators: [{
5008
- type: Component,
5009
- args: [{
5010
- selector: "bit-editable",
5011
- template: ` <ng-container *ngTemplateOutlet="currentView"></ng-container> `,
5012
- standalone: false
5013
- }]
5014
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { update: [{
5015
- type: Output
5016
- }], viewModeTpl: [{
5017
- type: ContentChild,
5018
- args: [ViewModeDirective]
5019
- }], editModeTpl: [{
5020
- type: ContentChild,
5021
- args: [EditModeDirective]
5022
- }] } });
4715
+ args: [{ selector: "bit-readonly", standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (!isTextarea()) {\n <p class=\"lectura\">{{value_lectura}}</p>\n}\n@if (isTextarea()) {\n <pre class=\"lectura\">{{value_lectura}}</pre>\n}" }]
4716
+ }] });
5023
4717
 
5024
4718
  class BitNumberComponent extends BitCustomComponent {
5025
4719
  constructor() {
5026
4720
  super(...arguments);
5027
- this.modo = "decimal";
5028
- this.separadorGrupo = false;
5029
- this.incremento = 1;
4721
+ this.modo = input("decimal", ...(ngDevMode ? [{ debugName: "modo" }] : []));
4722
+ this.divisa = input(...(ngDevMode ? [undefined, { debugName: "divisa" }] : []));
4723
+ this.prefijo = input(...(ngDevMode ? [undefined, { debugName: "prefijo" }] : []));
4724
+ this.sufijo = input(...(ngDevMode ? [undefined, { debugName: "sufijo" }] : []));
4725
+ this.minimo = input(...(ngDevMode ? [undefined, { debugName: "minimo" }] : []));
4726
+ this.maximo = input(...(ngDevMode ? [undefined, { debugName: "maximo" }] : []));
4727
+ this.numeroDecimales = input(...(ngDevMode ? [undefined, { debugName: "numeroDecimales" }] : []));
4728
+ this.maximoDecimales = input(...(ngDevMode ? [undefined, { debugName: "maximoDecimales" }] : []));
4729
+ this.separadorGrupo = input(false, ...(ngDevMode ? [{ debugName: "separadorGrupo" }] : []));
4730
+ this.mostrarBotones = input(...(ngDevMode ? [undefined, { debugName: "mostrarBotones" }] : []));
4731
+ this.incremento = input(1, ...(ngDevMode ? [{ debugName: "incremento" }] : []));
4732
+ this.inputElement = viewChild('inputReference', ...(ngDevMode ? [{ debugName: "inputElement" }] : []));
5030
4733
  }
5031
4734
  get value_lectura() {
4735
+ this.log() && console.log("value lectura: " + this.value);
5032
4736
  return this.value;
5033
4737
  }
5034
4738
  writeValue(v) {
4739
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
5035
4740
  this.value = v;
5036
4741
  }
5037
4742
  onChangeValue(text) {
4743
+ this.log() && console.log("_onChangeValue forComponent: " + this.nombre() + " with value:" + text);
5038
4744
  this.value = text;
5039
4745
  this.changeComponentValue(this.value);
5040
4746
  }
5041
- // Hasta que https://github.com/primefaces/primeng/issues/11442 no se resuelva,
5042
- // hacemos esta triquiñuela para que al pulsar el 'punto' o la 'coma'
5043
- // se nos situe el cursor en la primera posición decimal.
5044
- // (basado en https://github.com/primefaces/primeng/issues/8985#issuecomment-1351712540 y
5045
- // https://stackoverflow.com/a/70303350/9741090)
5046
- onKeyDown(key) {
5047
- const input = this.inputElement.nativeElement.firstChild.childNodes[0];
5048
- if (!input)
5049
- return;
5050
- if (key === "," || key === ".") {
5051
- if (input.value.indexOf(",") === -1) {
5052
- input.value += ",";
5053
- }
5054
- else {
5055
- let posicionComa = input.value.indexOf(",");
5056
- input.focus();
5057
- input.setSelectionRange(posicionComa + 1, posicionComa + 1);
5058
- }
5059
- }
5060
- else if (key === "ArrowLeft") {
5061
- // corregir efecto cursor a la izquierda si estamos detrás de €
5062
- if (this.modo === "currency") {
5063
- let posicionEspacio = input.value.indexOf(String.fromCharCode(160));
5064
- if (posicionEspacio > 0 && input.selectionStart > posicionEspacio) {
5065
- input.setSelectionRange(posicionEspacio, posicionEspacio);
5066
- }
5067
- }
5068
- // corregir efecto cursor a la izquierda con el texto seleccionado por completo
5069
- if (input.selectionStart === 0 && input.selectionEnd === input.value.length) {
5070
- input.setSelectionRange(0, 0);
5071
- }
5072
- }
5073
- }
5074
4747
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5075
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitNumberComponent, isStandalone: false, selector: "bit-number", inputs: { modo: "modo", divisa: "divisa", prefijo: "prefijo", sufijo: "sufijo", minimo: "minimo", maximo: "maximo", numeroDecimales: "numeroDecimales", maximoDecimales: "maximoDecimales", separadorGrupo: "separadorGrupo", mostrarBotones: "mostrarBotones", incremento: "incremento" }, host: { listeners: { "keydown": "onKeyDown($event.key)" } }, providers: [{
4748
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitNumberComponent, isStandalone: false, selector: "bit-number", inputs: { modo: { classPropertyName: "modo", publicName: "modo", isSignal: true, isRequired: false, transformFunction: null }, divisa: { classPropertyName: "divisa", publicName: "divisa", isSignal: true, isRequired: false, transformFunction: null }, prefijo: { classPropertyName: "prefijo", publicName: "prefijo", isSignal: true, isRequired: false, transformFunction: null }, sufijo: { classPropertyName: "sufijo", publicName: "sufijo", isSignal: true, isRequired: false, transformFunction: null }, minimo: { classPropertyName: "minimo", publicName: "minimo", isSignal: true, isRequired: false, transformFunction: null }, maximo: { classPropertyName: "maximo", publicName: "maximo", isSignal: true, isRequired: false, transformFunction: null }, numeroDecimales: { classPropertyName: "numeroDecimales", publicName: "numeroDecimales", isSignal: true, isRequired: false, transformFunction: null }, maximoDecimales: { classPropertyName: "maximoDecimales", publicName: "maximoDecimales", isSignal: true, isRequired: false, transformFunction: null }, separadorGrupo: { classPropertyName: "separadorGrupo", publicName: "separadorGrupo", isSignal: true, isRequired: false, transformFunction: null }, mostrarBotones: { classPropertyName: "mostrarBotones", publicName: "mostrarBotones", isSignal: true, isRequired: false, transformFunction: null }, incremento: { classPropertyName: "incremento", publicName: "incremento", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
5076
4749
  provide: NG_VALUE_ACCESSOR,
5077
4750
  useExisting: forwardRef(() => BitNumberComponent),
5078
4751
  multi: true
5079
- }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputReference"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [placeholder]=\"placeholder\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [pTooltip]=\"tooltipTexto\"\n [tooltipPosition]=\"tooltipPosicion\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i1$4.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4752
+ }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputReference"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [placeholder]=\"placeholder()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [pTooltip]=\"tooltipTexto()\"\n [tooltipPosition]=\"tooltipPosicion()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$7.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
5080
4753
  }
5081
4754
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitNumberComponent, decorators: [{
5082
4755
  type: Component,
@@ -5084,52 +4757,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5084
4757
  provide: NG_VALUE_ACCESSOR,
5085
4758
  useExisting: forwardRef(() => BitNumberComponent),
5086
4759
  multi: true
5087
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [placeholder]=\"placeholder\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [pTooltip]=\"tooltipTexto\"\n [tooltipPosition]=\"tooltipPosicion\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
5088
- }], propDecorators: { modo: [{
5089
- type: Input
5090
- }], divisa: [{
5091
- type: Input
5092
- }], prefijo: [{
5093
- type: Input
5094
- }], sufijo: [{
5095
- type: Input
5096
- }], minimo: [{
5097
- type: Input
5098
- }], maximo: [{
5099
- type: Input
5100
- }], numeroDecimales: [{
5101
- type: Input
5102
- }], maximoDecimales: [{
5103
- type: Input
5104
- }], separadorGrupo: [{
5105
- type: Input
5106
- }], mostrarBotones: [{
5107
- type: Input
5108
- }], incremento: [{
5109
- type: Input
5110
- }], inputElement: [{
5111
- type: ViewChild,
5112
- args: ['inputReference', { read: ElementRef }]
5113
- }], onKeyDown: [{
5114
- type: HostListener,
5115
- args: ["keydown", ["$event.key"]]
5116
- }] } });
4760
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [placeholder]=\"placeholder()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [pTooltip]=\"tooltipTexto()\"\n [tooltipPosition]=\"tooltipPosicion()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4761
+ }] });
5117
4762
 
5118
4763
  class BitAmountComponent extends BitNumberComponent {
5119
4764
  constructor() {
5120
4765
  super(...arguments);
5121
- this.modo = "currency";
5122
- this.divisa = "EUR";
5123
- this.mostrarMoneda = true;
5124
- this.maximoDecimales = 2;
5125
- this.separadorGrupo = true;
4766
+ this.prefijo = input(...(ngDevMode ? [undefined, { debugName: "prefijo" }] : []));
4767
+ this.sufijo = input(...(ngDevMode ? [undefined, { debugName: "sufijo" }] : []));
4768
+ this.minimo = input(...(ngDevMode ? [undefined, { debugName: "minimo" }] : []));
4769
+ this.maximo = input(...(ngDevMode ? [undefined, { debugName: "maximo" }] : []));
4770
+ this.mostrarBotones = input(...(ngDevMode ? [undefined, { debugName: "mostrarBotones" }] : []));
4771
+ this.incremento = input(...(ngDevMode ? [undefined, { debugName: "incremento" }] : []));
4772
+ this.modo = input("currency", ...(ngDevMode ? [{ debugName: "modo" }] : []));
4773
+ this.divisa = input("EUR", ...(ngDevMode ? [{ debugName: "divisa" }] : []));
4774
+ this.maximoDecimales = input(2, ...(ngDevMode ? [{ debugName: "maximoDecimales" }] : []));
4775
+ this.separadorGrupo = input(true, ...(ngDevMode ? [{ debugName: "separadorGrupo" }] : []));
5126
4776
  }
5127
4777
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitAmountComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5128
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitAmountComponent, isStandalone: false, selector: "bit-amount", inputs: { prefijo: "prefijo", sufijo: "sufijo", minimo: "minimo", maximo: "maximo", mostrarBotones: "mostrarBotones", incremento: "incremento" }, providers: [{
4778
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitAmountComponent, isStandalone: false, selector: "bit-amount", inputs: { prefijo: { classPropertyName: "prefijo", publicName: "prefijo", isSignal: true, isRequired: false, transformFunction: null }, sufijo: { classPropertyName: "sufijo", publicName: "sufijo", isSignal: true, isRequired: false, transformFunction: null }, minimo: { classPropertyName: "minimo", publicName: "minimo", isSignal: true, isRequired: false, transformFunction: null }, maximo: { classPropertyName: "maximo", publicName: "maximo", isSignal: true, isRequired: false, transformFunction: null }, mostrarBotones: { classPropertyName: "mostrarBotones", publicName: "mostrarBotones", isSignal: true, isRequired: false, transformFunction: null }, incremento: { classPropertyName: "incremento", publicName: "incremento", isSignal: true, isRequired: false, transformFunction: null }, modo: { classPropertyName: "modo", publicName: "modo", isSignal: true, isRequired: false, transformFunction: null }, divisa: { classPropertyName: "divisa", publicName: "divisa", isSignal: true, isRequired: false, transformFunction: null }, maximoDecimales: { classPropertyName: "maximoDecimales", publicName: "maximoDecimales", isSignal: true, isRequired: false, transformFunction: null }, separadorGrupo: { classPropertyName: "separadorGrupo", publicName: "separadorGrupo", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
5129
4779
  provide: NG_VALUE_ACCESSOR,
5130
4780
  useExisting: forwardRef(() => BitAmountComponent),
5131
4781
  multi: true
5132
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [placeholder]=\"placeholder\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [pTooltip]=\"tooltipTexto\"\n [tooltipPosition]=\"tooltipPosicion\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "component", type: i1$4.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
4782
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [placeholder]=\"placeholder()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [pTooltip]=\"tooltipTexto()\"\n [tooltipPosition]=\"tooltipPosicion()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "component", type: i1$7.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
5133
4783
  }
5134
4784
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitAmountComponent, decorators: [{
5135
4785
  type: Component,
@@ -5137,20 +4787,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5137
4787
  provide: NG_VALUE_ACCESSOR,
5138
4788
  useExisting: forwardRef(() => BitAmountComponent),
5139
4789
  multi: true
5140
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [placeholder]=\"placeholder\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (tooltipTexto && !readOnly) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre }}\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva\"\n [pTooltip]=\"tooltipTexto\"\n [tooltipPosition]=\"tooltipPosicion\"\n [mode]=\"modo\"\n [currency]=\"divisa\"\n [prefix]=\"prefijo\"\n [suffix]=\"sufijo\"\n [min]=\"minimo\"\n [max]=\"maximo\"\n [minFractionDigits]=\"numeroDecimales\"\n [maxFractionDigits]=\"maximoDecimales == null ? numeroDecimales : maximoDecimales\"\n [useGrouping]=\"separadorGrupo\"\n [showButtons]=\"mostrarBotones\"\n [step]=\"incremento\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId }}\"\n />\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
5141
- }], propDecorators: { prefijo: [{
5142
- type: Input
5143
- }], sufijo: [{
5144
- type: Input
5145
- }], minimo: [{
5146
- type: Input
5147
- }], maximo: [{
5148
- type: Input
5149
- }], mostrarBotones: [{
5150
- type: Input
5151
- }], incremento: [{
5152
- type: Input
5153
- }] } });
4790
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [placeholder]=\"placeholder()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (tooltipTexto() && !readOnly()) {\n <p-inputNumber\n #inputReference\n id=\"{{ nombre() }}\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"value\"\n [attr.directive]=\"nombreDirectiva()\"\n [pTooltip]=\"tooltipTexto()\"\n [tooltipPosition]=\"tooltipPosicion()\"\n [mode]=\"modo()\"\n [currency]=\"divisa()\"\n [prefix]=\"prefijo()\"\n [suffix]=\"sufijo()\"\n [min]=\"minimo()\"\n [max]=\"maximo()\"\n [minFractionDigits]=\"numeroDecimales()\"\n [maxFractionDigits]=\"maximoDecimales() == null ? numeroDecimales() : maximoDecimales()\"\n [useGrouping]=\"separadorGrupo()\"\n [showButtons]=\"mostrarBotones()\"\n [step]=\"incremento()\"\n locale=\"es-ES\"\n (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"_onBlur()\"\n (focus)=\"_onFocus()\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
4791
+ }] });
5154
4792
 
5155
4793
  /** Esta clase contiene información sobre el menú pulsado por el usuairo. Permite setear dicho valor y recuperarlo mediante un signal */
5156
4794
  class MenuService {
@@ -5180,9 +4818,11 @@ class MenuTitle {
5180
4818
 
5181
4819
  class BitSidebarComponent {
5182
4820
  constructor() {
5183
- this.onSelectLanguage = new EventEmitter();
5184
- this.onCloseMenu = new EventEmitter();
5185
- this.onMenuTitle = new EventEmitter();
4821
+ this.items = input(undefined, ...(ngDevMode ? [{ debugName: "items" }] : []));
4822
+ this.visibilidad = input(undefined, ...(ngDevMode ? [{ debugName: "visibilidad" }] : []));
4823
+ this.onSelectLanguage = output();
4824
+ this.onCloseMenu = output();
4825
+ this.onMenuTitle = output();
5186
4826
  // servicio para almacenar datos en la sesión del navegador
5187
4827
  this.storageService = inject(StorageService);
5188
4828
  }
@@ -5191,7 +4831,7 @@ class BitSidebarComponent {
5191
4831
  }
5192
4832
  clickMenu(item) {
5193
4833
  item.expanded = !item.expanded;
5194
- this.storageService.setData(StorageService.MENU, this.items);
4834
+ this.storageService.setData(StorageService.MENU, this.items());
5195
4835
  }
5196
4836
  clickMenuItem(event, item, subitem) {
5197
4837
  event.stopPropagation();
@@ -5208,22 +4848,12 @@ class BitSidebarComponent {
5208
4848
  this.onSelectLanguage.emit(language);
5209
4849
  }
5210
4850
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5211
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitSidebarComponent, isStandalone: false, selector: "bit-sidebar", inputs: { items: "items", visibilidad: "visibilidad" }, outputs: { onSelectLanguage: "onSelectLanguage", onCloseMenu: "onCloseMenu", onMenuTitle: "onMenuTitle" }, ngImport: i0, template: "<div id=\"mySidebar\" class=\"sidebar\" [style.min-width]=\"visibilidad ? '300px' : '0px'\">\n <i class=\"closebtn fa fa-times\" (click)=\"closeMenu()\"></i>\n <ul>\n @for (item of items; track item) {\n <li class=\"item\" (click)=\"clickMenu(item)\">\n @if (item.items.length > 0) {\n <i class=\"fa\" [ngClass]=\"{'fa-chevron-right':!item.expanded,'fa-chevron-down':item.expanded}\"></i>\n }\n {{ \"menu.\" + item.label | transloco }}\n @if (item.expanded) {\n <ul>\n @for (subitem of item.items; track subitem) {\n <li class=\"subitem\" [routerLink]=\"subitem.routerLink\" (click)=\"clickMenuItem($event, item, subitem)\">\n <i class=\"{{subitem.icon}}\"></i>&nbsp;&nbsp;\n <a>{{ \"menu.\" + subitem.label | transloco }}</a></li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n <!-- <p class=\"idioma-selector\"> \n <bit-language-selector (onSelectLanguage)=\"selectLanguage($event)\"></bit-language-selector>\n </p> -->\n <p class=\"nombre-desarrollado\">{{ \"menu.desarrollado-por\" | transloco }} <a href=\"https://www.fundaciobit.org/\" target=\"_blank\">Fundaci\u00F3 Bit</a></p>\n</div>\n", styles: [".idioma-selector{padding:0;width:100%;position:absolute;bottom:44px;text-align:center}.sidebar{height:100%;width:0;position:fixed;z-index:100;top:0;left:0;background-color:#eaeaea;overflow:hidden;padding-top:60px;transition:.3s;cursor:pointer;box-shadow:1px 0 10px #656565}.sidebar>ul{padding-left:20px;overflow-x:hidden;overflow-y:auto;height:86.2%;padding-bottom:30px}.sidebar i,.sidebar a{text-decoration:none}.sidebar i{padding-left:10px;margin-right:5px}.sidebar li{padding:8px 0}.sidebar li.item{font-weight:700;cursor:pointer}li.item ul{padding-left:20px}.sidebar li.subitem{font-weight:400;transition:.5s}.sidebar li.subitem:hover{background:#ffffff80;-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.sidebar li.subitem:hover a,.sidebar li.subitem:hover i{color:#0068a0}.sidebar .closebtn{color:#9a9a9a;position:absolute;top:18px;right:25px;font-size:25px}.sidebar .nombre-desarrollado{position:absolute;bottom:-13px;width:100%;background:#fff;padding:20px;text-align:center;cursor:auto}.sidebar .nombre-desarrollado a{font-weight:700;color:#1b8ac6}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4851
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitSidebarComponent, isStandalone: false, selector: "bit-sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, visibilidad: { classPropertyName: "visibilidad", publicName: "visibilidad", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectLanguage: "onSelectLanguage", onCloseMenu: "onCloseMenu", onMenuTitle: "onMenuTitle" }, ngImport: i0, template: "<div id=\"mySidebar\" class=\"sidebar\" [style.min-width]=\"visibilidad() ? '300px' : '0px'\">\n <i class=\"closebtn fa fa-times\" (click)=\"closeMenu()\"></i>\n <ul>\n @for (item of items(); track item) {\n <li class=\"item\" (click)=\"clickMenu(item)\">\n @if (item.items.length > 0) {\n <i class=\"fa\" [ngClass]=\"{'fa-chevron-right':!item.expanded,'fa-chevron-down':item.expanded}\"></i>\n }\n {{ \"menu.\" + item.label | transloco }}\n @if (item.expanded) {\n <ul>\n @for (subitem of item.items; track subitem) {\n <li class=\"subitem\" [routerLink]=\"subitem.routerLink\" (click)=\"clickMenuItem($event, item, subitem)\">\n <i class=\"{{subitem.icon}}\"></i>&nbsp;&nbsp;\n <a>{{ \"menu.\" + subitem.label | transloco }}</a></li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n <!-- <p class=\"idioma-selector\"> \n <bit-language-selector (onSelectLanguage)=\"selectLanguage($event)\"></bit-language-selector>\n </p> -->\n <p class=\"nombre-desarrollado\">{{ \"menu.desarrollado-por\" | transloco }} <a href=\"https://www.fundaciobit.org/\" target=\"_blank\">Fundaci\u00F3 Bit</a></p>\n</div>\n", styles: [".idioma-selector{padding:0;width:100%;position:absolute;bottom:44px;text-align:center}.sidebar{height:100%;width:0;position:fixed;z-index:100;top:0;left:0;background-color:#eaeaea;overflow:hidden;padding-top:60px;transition:.3s;cursor:pointer;box-shadow:1px 0 10px #656565}.sidebar>ul{padding-left:20px;overflow-x:hidden;overflow-y:auto;height:86.2%;padding-bottom:30px}.sidebar i,.sidebar a{text-decoration:none}.sidebar i{padding-left:10px;margin-right:5px}.sidebar li{padding:8px 0}.sidebar li.item{font-weight:700;cursor:pointer}li.item ul{padding-left:20px}.sidebar li.subitem{font-weight:400;transition:.5s}.sidebar li.subitem:hover{background:#ffffff80;-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.sidebar li.subitem:hover a,.sidebar li.subitem:hover i{color:#0068a0}.sidebar .closebtn{color:#9a9a9a;position:absolute;top:18px;right:25px;font-size:25px}.sidebar .nombre-desarrollado{position:absolute;bottom:-13px;width:100%;background:#fff;padding:20px;text-align:center;cursor:auto}.sidebar .nombre-desarrollado a{font-weight:700;color:#1b8ac6}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5212
4852
  }
5213
4853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSidebarComponent, decorators: [{
5214
4854
  type: Component,
5215
- args: [{ selector: "bit-sidebar", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div id=\"mySidebar\" class=\"sidebar\" [style.min-width]=\"visibilidad ? '300px' : '0px'\">\n <i class=\"closebtn fa fa-times\" (click)=\"closeMenu()\"></i>\n <ul>\n @for (item of items; track item) {\n <li class=\"item\" (click)=\"clickMenu(item)\">\n @if (item.items.length > 0) {\n <i class=\"fa\" [ngClass]=\"{'fa-chevron-right':!item.expanded,'fa-chevron-down':item.expanded}\"></i>\n }\n {{ \"menu.\" + item.label | transloco }}\n @if (item.expanded) {\n <ul>\n @for (subitem of item.items; track subitem) {\n <li class=\"subitem\" [routerLink]=\"subitem.routerLink\" (click)=\"clickMenuItem($event, item, subitem)\">\n <i class=\"{{subitem.icon}}\"></i>&nbsp;&nbsp;\n <a>{{ \"menu.\" + subitem.label | transloco }}</a></li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n <!-- <p class=\"idioma-selector\"> \n <bit-language-selector (onSelectLanguage)=\"selectLanguage($event)\"></bit-language-selector>\n </p> -->\n <p class=\"nombre-desarrollado\">{{ \"menu.desarrollado-por\" | transloco }} <a href=\"https://www.fundaciobit.org/\" target=\"_blank\">Fundaci\u00F3 Bit</a></p>\n</div>\n", styles: [".idioma-selector{padding:0;width:100%;position:absolute;bottom:44px;text-align:center}.sidebar{height:100%;width:0;position:fixed;z-index:100;top:0;left:0;background-color:#eaeaea;overflow:hidden;padding-top:60px;transition:.3s;cursor:pointer;box-shadow:1px 0 10px #656565}.sidebar>ul{padding-left:20px;overflow-x:hidden;overflow-y:auto;height:86.2%;padding-bottom:30px}.sidebar i,.sidebar a{text-decoration:none}.sidebar i{padding-left:10px;margin-right:5px}.sidebar li{padding:8px 0}.sidebar li.item{font-weight:700;cursor:pointer}li.item ul{padding-left:20px}.sidebar li.subitem{font-weight:400;transition:.5s}.sidebar li.subitem:hover{background:#ffffff80;-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.sidebar li.subitem:hover a,.sidebar li.subitem:hover i{color:#0068a0}.sidebar .closebtn{color:#9a9a9a;position:absolute;top:18px;right:25px;font-size:25px}.sidebar .nombre-desarrollado{position:absolute;bottom:-13px;width:100%;background:#fff;padding:20px;text-align:center;cursor:auto}.sidebar .nombre-desarrollado a{font-weight:700;color:#1b8ac6}\n"] }]
5216
- }], propDecorators: { items: [{
5217
- type: Input
5218
- }], visibilidad: [{
5219
- type: Input
5220
- }], onSelectLanguage: [{
5221
- type: Output
5222
- }], onCloseMenu: [{
5223
- type: Output
5224
- }], onMenuTitle: [{
5225
- type: Output
5226
- }] } });
4855
+ args: [{ selector: "bit-sidebar", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div id=\"mySidebar\" class=\"sidebar\" [style.min-width]=\"visibilidad() ? '300px' : '0px'\">\n <i class=\"closebtn fa fa-times\" (click)=\"closeMenu()\"></i>\n <ul>\n @for (item of items(); track item) {\n <li class=\"item\" (click)=\"clickMenu(item)\">\n @if (item.items.length > 0) {\n <i class=\"fa\" [ngClass]=\"{'fa-chevron-right':!item.expanded,'fa-chevron-down':item.expanded}\"></i>\n }\n {{ \"menu.\" + item.label | transloco }}\n @if (item.expanded) {\n <ul>\n @for (subitem of item.items; track subitem) {\n <li class=\"subitem\" [routerLink]=\"subitem.routerLink\" (click)=\"clickMenuItem($event, item, subitem)\">\n <i class=\"{{subitem.icon}}\"></i>&nbsp;&nbsp;\n <a>{{ \"menu.\" + subitem.label | transloco }}</a></li>\n }\n </ul>\n }\n </li>\n }\n </ul>\n <!-- <p class=\"idioma-selector\"> \n <bit-language-selector (onSelectLanguage)=\"selectLanguage($event)\"></bit-language-selector>\n </p> -->\n <p class=\"nombre-desarrollado\">{{ \"menu.desarrollado-por\" | transloco }} <a href=\"https://www.fundaciobit.org/\" target=\"_blank\">Fundaci\u00F3 Bit</a></p>\n</div>\n", styles: [".idioma-selector{padding:0;width:100%;position:absolute;bottom:44px;text-align:center}.sidebar{height:100%;width:0;position:fixed;z-index:100;top:0;left:0;background-color:#eaeaea;overflow:hidden;padding-top:60px;transition:.3s;cursor:pointer;box-shadow:1px 0 10px #656565}.sidebar>ul{padding-left:20px;overflow-x:hidden;overflow-y:auto;height:86.2%;padding-bottom:30px}.sidebar i,.sidebar a{text-decoration:none}.sidebar i{padding-left:10px;margin-right:5px}.sidebar li{padding:8px 0}.sidebar li.item{font-weight:700;cursor:pointer}li.item ul{padding-left:20px}.sidebar li.subitem{font-weight:400;transition:.5s}.sidebar li.subitem:hover{background:#ffffff80;-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.sidebar li.subitem:hover a,.sidebar li.subitem:hover i{color:#0068a0}.sidebar .closebtn{color:#9a9a9a;position:absolute;top:18px;right:25px;font-size:25px}.sidebar .nombre-desarrollado{position:absolute;bottom:-13px;width:100%;background:#fff;padding:20px;text-align:center;cursor:auto}.sidebar .nombre-desarrollado a{font-weight:700;color:#1b8ac6}\n"] }]
4856
+ }] });
5227
4857
 
5228
4858
  class BitThemeSelectorComponent {
5229
4859
  constructor() {
@@ -5249,7 +4879,7 @@ class BitThemeSelectorComponent {
5249
4879
  this.onChangeTheme.emit(theme);
5250
4880
  }
5251
4881
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitThemeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5252
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitThemeSelectorComponent, isStandalone: false, selector: "bit-theme-selector", outputs: { onChangeTheme: "onChangeTheme" }, ngImport: i0, template: "<p-selectbutton \n [options]=\"themeList$()\" \n [ngModel]=\"currentTheme$()\" \n optionLabel=\"name\" \n optionValue=\"name\" \n (onOptionClick)=\"selectGroupChanged($event)\"/>", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$7.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }] }); }
4882
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitThemeSelectorComponent, isStandalone: false, selector: "bit-theme-selector", outputs: { onChangeTheme: "onChangeTheme" }, ngImport: i0, template: "<p-selectbutton \n [options]=\"themeList$()\" \n [ngModel]=\"currentTheme$()\" \n optionLabel=\"name\" \n optionValue=\"name\" \n (onOptionClick)=\"selectGroupChanged($event)\"/>", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$9.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }] }); }
5253
4883
  }
5254
4884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitThemeSelectorComponent, decorators: [{
5255
4885
  type: Component,
@@ -5258,11 +4888,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5258
4888
 
5259
4889
  class BitLanguageSelectorComponent {
5260
4890
  constructor() {
5261
- this.onSelectLanguage = new EventEmitter();
4891
+ this.onSelectLanguage = output();
5262
4892
  this.localeService = inject(LocaleService);
5263
4893
  this.languageList$ = signal(this.localeService.locales, ...(ngDevMode ? [{ debugName: "languageList$" }] : []));
5264
- this.currentLanguage$ = signal(this.localeService.locale$(), ...(ngDevMode ? [{ debugName: "currentLanguage$" }] : []));
4894
+ this.currentLanguage$ = linkedSignal(() => this.localeService.locale$());
5265
4895
  }
4896
+ //signal(this.localeService.locale$());
5266
4897
  selectGroupChanged(_event) {
5267
4898
  console.log("event", _event);
5268
4899
  this.selectLanguage(_event.option["value"]);
@@ -5273,14 +4904,12 @@ class BitLanguageSelectorComponent {
5273
4904
  this.onSelectLanguage.emit(language);
5274
4905
  }
5275
4906
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitLanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5276
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitLanguageSelectorComponent, isStandalone: false, selector: "bit-language-selector", outputs: { onSelectLanguage: "onSelectLanguage" }, ngImport: i0, template: "<p-selectbutton \n [options]=\"languageList$()\" \n [ngModel]=\"currentLanguage$()\" \n optionLabel=\"label\" \n optionValue=\"value\" \n (onOptionClick)=\"selectGroupChanged($event)\"/>", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$7.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4907
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitLanguageSelectorComponent, isStandalone: false, selector: "bit-language-selector", outputs: { onSelectLanguage: "onSelectLanguage" }, ngImport: i0, template: "<p-selectbutton \n [options]=\"languageList$()\" \n [ngModel]=\"currentLanguage$()\" \n optionLabel=\"label\" \n optionValue=\"value\" \n (onOptionClick)=\"selectGroupChanged($event)\"/>", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$9.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5277
4908
  }
5278
4909
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitLanguageSelectorComponent, decorators: [{
5279
4910
  type: Component,
5280
4911
  args: [{ selector: "bit-language-selector", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<p-selectbutton \n [options]=\"languageList$()\" \n [ngModel]=\"currentLanguage$()\" \n optionLabel=\"label\" \n optionValue=\"value\" \n (onOptionClick)=\"selectGroupChanged($event)\"/>" }]
5281
- }], propDecorators: { onSelectLanguage: [{
5282
- type: Output
5283
- }] } });
4912
+ }] });
5284
4913
 
5285
4914
  class BitSettingsComponent {
5286
4915
  constructor() {
@@ -5304,7 +4933,7 @@ class BitSettingsComponent {
5304
4933
  this.onDarkModeChange.emit(this.isDarkMode); // Emit the new state
5305
4934
  }
5306
4935
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5307
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitSettingsComponent, isStandalone: false, selector: "bit-settings", outputs: { onSelectLanguage: "onSelectLanguage", onDarkModeChange: "onDarkModeChange" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <i (click)=\"op.toggle($event)\" class=\"pi pi-cog icono-header\" pTooltip=\"{{ t('configselection') }}\" tooltipPosition=\"left\"></i>\n <p-popover #op>\n <div class=\"config-panel-settings\">\n <span class=\"config-panel-label\">{{ t('themelabel') }}</span>\n <bit-theme-selector/>\n <span class=\"config-panel-label\">{{ t('darkmodeselection') }}</span>\n <p-toggleswitch [(ngModel)]=\"isDarkMode\" (onChange)=\"toggleDarkMode($event);\" attr.data-testid=\"darkMode\"/>\n <span class=\"config-panel-label\">{{ t('languageselection') }}</span>\n <bit-language-selector (onSelectLanguage)=\"selectLanguage($event)\"/>\n </div> \n </p-popover>\n</ng-container>", styles: [".config-panel-settings{display:flex;flex-direction:column;gap:.5rem}.config-panel-label{font-weight:700;line-height:1}\n"], dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$4.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i3$7.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i3$5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: i5.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: BitLanguageSelectorComponent, selector: "bit-language-selector", outputs: ["onSelectLanguage"] }, { kind: "component", type: BitThemeSelectorComponent, selector: "bit-theme-selector", outputs: ["onChangeTheme"] }] }); }
4936
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: BitSettingsComponent, isStandalone: false, selector: "bit-settings", outputs: { onSelectLanguage: "onSelectLanguage", onDarkModeChange: "onDarkModeChange" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <i (click)=\"op.toggle($event)\" class=\"pi pi-cog icono-header\" pTooltip=\"{{ t('configselection') }}\" tooltipPosition=\"left\"></i>\n <p-popover #op>\n <div class=\"config-panel-settings\">\n <span class=\"config-panel-label\">{{ t('themelabel') }}</span>\n <bit-theme-selector/>\n <span class=\"config-panel-label\">{{ t('darkmodeselection') }}</span>\n <p-toggleswitch [(ngModel)]=\"isDarkMode\" (onChange)=\"toggleDarkMode($event);\" attr.data-testid=\"darkMode\"/>\n <span class=\"config-panel-label\">{{ t('languageselection') }}</span>\n <bit-language-selector (onSelectLanguage)=\"selectLanguage($event)\"/>\n </div> \n </p-popover>\n</ng-container>", styles: [".config-panel-settings{display:flex;flex-direction:column;gap:.5rem}.config-panel-label{font-weight:700;line-height:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$5.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i3$3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i3$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: BitLanguageSelectorComponent, selector: "bit-language-selector", outputs: ["onSelectLanguage"] }, { kind: "component", type: BitThemeSelectorComponent, selector: "bit-theme-selector", outputs: ["onChangeTheme"] }] }); }
5308
4937
  }
5309
4938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSettingsComponent, decorators: [{
5310
4939
  type: Component,
@@ -5598,33 +5227,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5598
5227
 
5599
5228
  const directives = [
5600
5229
  BitPanelDirective,
5601
- FocusRegisterDirective,
5602
- EditModeDirective,
5603
- ViewModeDirective
5230
+ FocusRegisterDirective
5604
5231
  ];
5605
5232
 
5606
5233
  class BitSwitchSiNoComponent extends BitCustomComponent {
5607
5234
  constructor() {
5608
5235
  super(...arguments);
5609
- this.valorTrue = true;
5610
- this.valorFalse = false;
5236
+ this.valorTrue = input(true, ...(ngDevMode ? [{ debugName: "valorTrue" }] : []));
5237
+ this.valorFalse = input(false, ...(ngDevMode ? [{ debugName: "valorFalse" }] : []));
5611
5238
  }
5612
5239
  get value_lectura() {
5240
+ this.log() && console.log("value lectura: " + this.value);
5613
5241
  return this.value ? "Sí" : "No";
5614
5242
  }
5615
5243
  writeValue(v) {
5244
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
5616
5245
  this.value = v;
5617
5246
  }
5618
5247
  onChangeValue(event) {
5619
5248
  this.value = event.checked;
5249
+ this.log() && console.log("_onChangeValue forComponent: " + this.nombre() + " with value:" + this.value);
5620
5250
  this.changeComponentValue(this.value);
5621
5251
  }
5622
5252
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSwitchSiNoComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5623
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitSwitchSiNoComponent, isStandalone: false, selector: "bit-switch-si-no", inputs: { valorTrue: "valorTrue", valorFalse: "valorFalse" }, providers: [{
5253
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitSwitchSiNoComponent, isStandalone: false, selector: "bit-switch-si-no", inputs: { valorTrue: { classPropertyName: "valorTrue", publicName: "valorTrue", isSignal: true, isRequired: false, transformFunction: null }, valorFalse: { classPropertyName: "valorFalse", publicName: "valorFalse", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
5624
5254
  provide: NG_VALUE_ACCESSOR,
5625
5255
  useExisting: forwardRef(() => BitSwitchSiNoComponent),
5626
5256
  multi: true
5627
- }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-toggleswitch\n onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n id=\"{{ nombre }}\"\n [trueValue]=\"valorTrue\"\n [falseValue]=\"valorFalse\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-toggleswitch>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$4.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
5257
+ }], usesInheritance: true, ngImport: i0, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-toggleswitch onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n id=\"{{ nombre() }}\"\n [trueValue]=\"valorTrue()\"\n [falseValue]=\"valorFalse()\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$5.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
5628
5258
  }
5629
5259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitSwitchSiNoComponent, decorators: [{
5630
5260
  type: Component,
@@ -5632,37 +5262,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5632
5262
  provide: NG_VALUE_ACCESSOR,
5633
5263
  useExisting: forwardRef(() => BitSwitchSiNoComponent),
5634
5264
  multi: true
5635
- }], standalone: false, template: "@if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n}\n@if (!readOnly) {\n <p-toggleswitch\n onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre }}\"\n [disabled]=\"isDisabled\"\n id=\"{{ nombre }}\"\n [trueValue]=\"valorTrue\"\n [falseValue]=\"valorFalse\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId }}\"\n >\n </p-toggleswitch>\n}\n@if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n}\n" }]
5636
- }], propDecorators: { valorTrue: [{
5637
- type: Input
5638
- }], valorFalse: [{
5639
- type: Input
5640
- }] } });
5265
+ }], standalone: false, template: "@if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;@if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>\n }&nbsp;&nbsp;\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n}\n@if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n}\n@if (!readOnly()) {\n <p-toggleswitch onLabel=\"S\u00ED\"\n offLabel=\"No\"\n binary=\"true\"\n [(ngModel)]=\"value\"\n name=\"{{ nombre() }}\"\n aria-label=\"{{ nombre() }}\"\n [disabled]=\"isDisabled()\"\n id=\"{{ nombre() }}\"\n [trueValue]=\"valorTrue()\"\n [falseValue]=\"valorFalse()\"\n (onChange)=\"onChangeValue($event)\"\n attr.data-testid=\"{{ dataTestId()}}\"\n />\n}\n@if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n}\n" }]
5266
+ }] });
5641
5267
 
5642
5268
  class BitMultipleCheckboxComponent extends BitCustomComponent {
5643
5269
  constructor() {
5644
5270
  super(...arguments);
5645
- this.chekAll = true;
5646
- this.isCheckAll = false;
5271
+ this.chekAll = input(true, ...(ngDevMode ? [{ debugName: "chekAll" }] : []));
5272
+ this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
5273
+ this.isCheckAll = signal(false, ...(ngDevMode ? [{ debugName: "isCheckAll" }] : []));
5274
+ this.estiloCheckAll = computed(() => {
5275
+ if (this.isCheckAll()) {
5276
+ return "pi pi-check-square";
5277
+ }
5278
+ else {
5279
+ return "pi pi-stop";
5280
+ }
5281
+ }, ...(ngDevMode ? [{ debugName: "estiloCheckAll" }] : []));
5647
5282
  }
5648
5283
  get value_lectura() {
5649
5284
  if (this.value) {
5650
5285
  // Mostramos los labels del dominio que está en data.
5651
- return this.value.map((v) => {
5652
- const label = this.data?.find((d) => d.value === v)?.label;
5286
+ let v = this.value.map((v) => {
5287
+ const label = this.data()?.find((d) => d.value === v)?.label;
5653
5288
  return label ? label : v;
5654
5289
  })?.join(", ");
5290
+ this.log() && console.log("value lectura", v);
5291
+ return v;
5655
5292
  }
5656
5293
  else {
5294
+ this.log() && console.log("value lectura is blank");
5657
5295
  return "";
5658
5296
  }
5659
5297
  }
5660
5298
  writeValue(v) {
5299
+ this.log() && console.log(`writeValue forComponent ${this.nombre()} with value ${v}`);
5661
5300
  this.value = v;
5662
5301
  this.refreshCheckAll();
5663
5302
  }
5664
5303
  onChangeValue(event) {
5665
5304
  let selected = event && event.checked;
5305
+ this.log() && console.log("onChangeValue forComponent: " + this.nombre() + " selected:" + selected);
5666
5306
  if (selected && selected.length > 0) {
5667
5307
  this.value = selected;
5668
5308
  }
@@ -5673,34 +5313,29 @@ class BitMultipleCheckboxComponent extends BitCustomComponent {
5673
5313
  this.changeComponentValue(this.value);
5674
5314
  }
5675
5315
  onCheckAll() {
5676
- this.isCheckAll = !this.isCheckAll;
5677
- if (this.isCheckAll) {
5678
- this.value = this.data.map((v) => v.value);
5316
+ this.isCheckAll.update((value) => !value);
5317
+ this.log() && console.log("onCheckAll forComponent: " + this.nombre() + " with new value for checkAll:" + this.isCheckAll());
5318
+ if (this.isCheckAll()) {
5319
+ this.value = this.data().map((v) => v.value);
5320
+ this.log() && console.log("currentValue: " + this.value);
5679
5321
  }
5680
5322
  else {
5681
5323
  this.value = null;
5324
+ this.log() && console.log("currentValue is null");
5682
5325
  }
5683
5326
  this.changeComponentValue(this.value);
5684
5327
  }
5685
- get estiloCheckAll() {
5686
- if (this.isCheckAll) {
5687
- return "pi pi-check-square";
5688
- }
5689
- else {
5690
- return "pi pi-stop";
5691
- }
5692
- }
5693
5328
  refreshCheckAll() {
5694
- this.isCheckAll = this.data?.length === this.value?.length;
5329
+ this.isCheckAll.set(this.data()?.length === this.value?.length);
5695
5330
  }
5696
5331
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitMultipleCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5697
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitMultipleCheckboxComponent, isStandalone: false, selector: "bit-checkbox-multiple", inputs: { chekAll: "chekAll", data: "data" }, providers: [
5332
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: BitMultipleCheckboxComponent, isStandalone: false, selector: "bit-checkbox-multiple", inputs: { chekAll: { classPropertyName: "chekAll", publicName: "chekAll", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
5698
5333
  {
5699
5334
  provide: NG_VALUE_ACCESSOR,
5700
5335
  useExisting: forwardRef(() => BitMultipleCheckboxComponent),
5701
5336
  multi: true
5702
5337
  }
5703
- ], usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n\n @if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;\n @if (!readOnly && this.chekAll) {\n <i title=\"{{t('bitnglibrary.form.bitmultiplecheckbox.checkall')}}\"\n style=\"color: #ced4da\"\n class=\"font-normal cursor-pointer hover:text-blue-600 cursor-pointer text-sm {{ estiloCheckAll }}\"\n (click)=\"onCheckAll()\"></i>&nbsp;\n }\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>&nbsp;&nbsp;\n }\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n }\n\n @if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n } @else {\n\n @for (dominio of data; track dominio) {\n <div class=\"field-checkbox inline-block\">\n <p-checkbox\n id=\"{{ nombre + '-' + dominio.value }}\"\n name=\"{{ nombre + '-' + dominio.value }}\"\n [value]=\"dominio.value\"\n [(ngModel)]=\"value\"\n [inputId]=\"dominio.value\"\n [disabled]=\"isDisabled\"\n (onChange)=\"onChangeValue($event)\">\n attr.data-testid=\"{{ dataTestId + \"-\" + dominio.value }}\"\n </p-checkbox>\n <label class=\"inline-block ml-2 mr-4 font-normal cursor-pointer hover:text-blue-400\"\n [for]=\"dominio.value\">{{ dominio.label }}</label>\n </div>\n }\n @if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n }\n\n @if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n }\n }\n\n\n</ng-container>\n", dependencies: [{ kind: "component", type: i1$3.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
5338
+ ], usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n\n @if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;\n @if (!readOnly() && this.chekAll()) {\n <i title=\"{{t('bitnglibrary.form.bitmultiplecheckbox.checkall')}}\"\n style=\"color: #ced4da\"\n class=\"font-normal cursor-pointer hover:text-blue-600 cursor-pointer text-sm {{ estiloCheckAll() }}\"\n (click)=\"onCheckAll()\"></i>&nbsp;\n }\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>&nbsp;&nbsp;\n }\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n }\n\n @if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n } @else {\n\n @for (dominio of data(); track dominio) {\n <div class=\"field-checkbox inline-block\">\n <p-checkbox\n id=\"{{ nombre() + '-' + dominio.value }}\"\n name=\"{{ nombre() + '-' + dominio.value }}\"\n aria-label=\"{{ nombre() }}\"\n [value]=\"dominio.value\"\n [(ngModel)]=\"value\"\n [inputId]=\"dominio.value\"\n [disabled]=\"isDisabled()\"\n (onChange)=\"onChangeValue($event)\">\n attr.data-testid=\"{{ dataTestId() + \"-\" + dominio.value }}\"\n </p-checkbox>\n <label class=\"inline-block ml-2 mr-4 font-normal cursor-pointer hover:text-blue-400\"\n [for]=\"dominio.value\">{{ dominio.label }}</label>\n </div>\n }\n @if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n }\n\n @if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n }\n }\n\n</ng-container>\n", dependencies: [{ kind: "component", type: i1$5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: BitControlMessages, selector: "control-messages", inputs: ["control", "field"] }] }); }
5704
5339
  }
5705
5340
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: BitMultipleCheckboxComponent, decorators: [{
5706
5341
  type: Component,
@@ -5710,12 +5345,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
5710
5345
  useExisting: forwardRef(() => BitMultipleCheckboxComponent),
5711
5346
  multi: true
5712
5347
  }
5713
- ], standalone: false, template: "<ng-container *transloco=\"let t\">\n\n @if (!hideLabel) {\n <label>\n <ng-content></ng-content>&nbsp;\n @if (!readOnly && this.chekAll) {\n <i title=\"{{t('bitnglibrary.form.bitmultiplecheckbox.checkall')}}\"\n style=\"color: #ced4da\"\n class=\"font-normal cursor-pointer hover:text-blue-600 cursor-pointer text-sm {{ estiloCheckAll }}\"\n (click)=\"onCheckAll()\"></i>&nbsp;\n }\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>&nbsp;&nbsp;\n }\n @if (ayuda) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n }\n\n @if (readOnly) {\n <p class=\"lectura\" [id]=\"nombre\">{{ value_lectura }}</p>\n } @else {\n\n @for (dominio of data; track dominio) {\n <div class=\"field-checkbox inline-block\">\n <p-checkbox\n id=\"{{ nombre + '-' + dominio.value }}\"\n name=\"{{ nombre + '-' + dominio.value }}\"\n [value]=\"dominio.value\"\n [(ngModel)]=\"value\"\n [inputId]=\"dominio.value\"\n [disabled]=\"isDisabled\"\n (onChange)=\"onChangeValue($event)\">\n attr.data-testid=\"{{ dataTestId + \"-\" + dominio.value }}\"\n </p-checkbox>\n <label class=\"inline-block ml-2 mr-4 font-normal cursor-pointer hover:text-blue-400\"\n [for]=\"dominio.value\">{{ dominio.label }}</label>\n </div>\n }\n @if (ayuda) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n }\n\n @if (control != null) {\n <control-messages [control]=\"control\" [field]=\"nombre\"></control-messages>\n }\n }\n\n\n</ng-container>\n" }]
5714
- }], propDecorators: { chekAll: [{
5715
- type: Input
5716
- }], data: [{
5717
- type: Input
5718
- }] } });
5348
+ ], standalone: false, template: "<ng-container *transloco=\"let t\">\n\n @if (!hideLabel()) {\n <label>\n <ng-content />&nbsp;\n @if (!readOnly() && this.chekAll()) {\n <i title=\"{{t('bitnglibrary.form.bitmultiplecheckbox.checkall')}}\"\n style=\"color: #ced4da\"\n class=\"font-normal cursor-pointer hover:text-blue-600 cursor-pointer text-sm {{ estiloCheckAll() }}\"\n (click)=\"onCheckAll()\"></i>&nbsp;\n }\n @if (obligatorio) {\n <span class=\"obligatorio fa fa-asterisk\"></span>&nbsp;&nbsp;\n }\n @if (ayuda()) {\n <i class=\"btn-ayuda fa fa-question\" (click)=\"showAyuda()\"></i>\n }\n </label>\n }\n\n @if (readOnly()) {\n <p class=\"lectura\" [id]=\"nombre()\">{{ value_lectura }}</p>\n } @else {\n\n @for (dominio of data(); track dominio) {\n <div class=\"field-checkbox inline-block\">\n <p-checkbox\n id=\"{{ nombre() + '-' + dominio.value }}\"\n name=\"{{ nombre() + '-' + dominio.value }}\"\n aria-label=\"{{ nombre() }}\"\n [value]=\"dominio.value\"\n [(ngModel)]=\"value\"\n [inputId]=\"dominio.value\"\n [disabled]=\"isDisabled()\"\n (onChange)=\"onChangeValue($event)\">\n attr.data-testid=\"{{ dataTestId() + \"-\" + dominio.value }}\"\n </p-checkbox>\n <label class=\"inline-block ml-2 mr-4 font-normal cursor-pointer hover:text-blue-400\"\n [for]=\"dominio.value\">{{ dominio.label }}</label>\n </div>\n }\n @if (ayuda()) {\n <i (click)=\"showAyuda()\" class=\"btn-ayuda-checkbox fa fa-question\"></i>\n }\n\n @if (control() != null) {\n <control-messages [control]=\"control()\" [field]=\"nombre()\" />\n }\n }\n\n</ng-container>\n" }]
5349
+ }] });
5719
5350
 
5720
5351
  const modules = [
5721
5352
  AccordionModule,
@@ -5801,13 +5432,12 @@ const formComponents = [
5801
5432
  BitDropDownMultipleComponent,
5802
5433
  BitEditorComponent,
5803
5434
  BitReadonlyComponent,
5804
- BitEditableComponent,
5805
5435
  BitNumberComponent,
5806
5436
  BitAmountComponent
5807
5437
  ];
5808
5438
  class SharedLibraryModule {
5809
5439
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SharedLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5810
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: SharedLibraryModule, declarations: [BitPanelDirective, FocusRegisterDirective, EditModeDirective, ViewModeDirective, BitBreadCrumbComponent,
5440
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: SharedLibraryModule, declarations: [BitPanelDirective, FocusRegisterDirective, BitBreadCrumbComponent,
5811
5441
  BitControlMessages,
5812
5442
  BitDialogComponent,
5813
5443
  BitFooterComponent,
@@ -5841,7 +5471,6 @@ class SharedLibraryModule {
5841
5471
  BitDropDownMultipleComponent,
5842
5472
  BitEditorComponent,
5843
5473
  BitReadonlyComponent,
5844
- BitEditableComponent,
5845
5474
  BitNumberComponent,
5846
5475
  BitAmountComponent, BytesPipe, CapitalizePipe, CutTextPipe, DomainValuePipe, DomainListValuePipe, ListValuePipe, OtherToolbarActionPipe, CantidadMonedaPipe, RemoveLineBreaksPipe, SiONoPipe, StringifyPipe], imports: [AccordionModule,
5847
5476
  AutoCompleteModule,
@@ -5929,7 +5558,7 @@ class SharedLibraryModule {
5929
5558
  ToggleButtonModule,
5930
5559
  TooltipModule,
5931
5560
  TreeModule,
5932
- TreeTableModule, BitPanelDirective, FocusRegisterDirective, EditModeDirective, ViewModeDirective, BytesPipe, CapitalizePipe, CutTextPipe, DomainValuePipe, DomainListValuePipe, ListValuePipe, OtherToolbarActionPipe, CantidadMonedaPipe, RemoveLineBreaksPipe, SiONoPipe, StringifyPipe, BitBreadCrumbComponent,
5561
+ TreeTableModule, BitPanelDirective, FocusRegisterDirective, BytesPipe, CapitalizePipe, CutTextPipe, DomainValuePipe, DomainListValuePipe, ListValuePipe, OtherToolbarActionPipe, CantidadMonedaPipe, RemoveLineBreaksPipe, SiONoPipe, StringifyPipe, BitBreadCrumbComponent,
5933
5562
  BitControlMessages,
5934
5563
  BitDialogComponent,
5935
5564
  BitFooterComponent,
@@ -5963,7 +5592,6 @@ class SharedLibraryModule {
5963
5592
  BitDropDownMultipleComponent,
5964
5593
  BitEditorComponent,
5965
5594
  BitReadonlyComponent,
5966
- BitEditableComponent,
5967
5595
  BitNumberComponent,
5968
5596
  BitAmountComponent] }); }
5969
5597
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SharedLibraryModule, providers: [{ provide: TRANSLOCO_SCOPE, useValue: "bitnglibrary" }, MessageService], imports: [modules, RouterModule, FileUploadModule$1, TranslocoModule, AccordionModule,
@@ -6092,9 +5720,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
6092
5720
  }] });
6093
5721
 
6094
5722
  class CustomHttpInterceptor {
6095
- constructor(bitMessageService, generalUtils) {
6096
- this.bitMessageService = bitMessageService;
6097
- this.generalUtils = generalUtils;
5723
+ constructor() {
5724
+ this.bitMessageService = inject(BitMessageService);
5725
+ this.generalUtils = inject(GeneralUtils);
6098
5726
  console.log("construyendo el CustomHttpInterceptor");
6099
5727
  }
6100
5728
  intercept(request, next) {
@@ -6112,13 +5740,13 @@ class CustomHttpInterceptor {
6112
5740
  this.generalUtils.stopLoading();
6113
5741
  }));
6114
5742
  }
6115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CustomHttpInterceptor, deps: [{ token: BitMessageService }, { token: GeneralUtils }], target: i0.ɵɵFactoryTarget.Injectable }); }
5743
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CustomHttpInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6116
5744
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CustomHttpInterceptor, providedIn: "root" }); }
6117
5745
  }
6118
5746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CustomHttpInterceptor, decorators: [{
6119
5747
  type: Injectable,
6120
5748
  args: [{ providedIn: "root" }]
6121
- }], ctorParameters: () => [{ type: BitMessageService }, { type: GeneralUtils }] });
5749
+ }], ctorParameters: () => [] });
6122
5750
 
6123
5751
  /**
6124
5752
  * Permite registrar los servicios de DataService que utilizarán los servicios EntityCollectionService para alimentar su signalStore
@@ -6812,5 +6440,5 @@ function normalizeRoot(root) {
6812
6440
  * Generated bundle index. Do not edit.
6813
6441
  */
6814
6442
 
6815
- export { Autocomplete, AutocompleteDataService, AyudaContextual, AyudaService, BASE_RESULTADOS_PAGE, BIT_NOTIFICATION_MAX_LIFE, BaseCRUDService, BaseComponent, BaseDataAdapterService, BaseDataService, BaseFilter, BitAmountComponent, BitAutoCompleteComponent, BitBotonAyudaComponent, BitBreadCrumbComponent, BitCalendarComponent, BitCheckBoxComponent, BitColumnBooleanComponent, BitControlMessages, BitCustomComponent, BitDateComponent, BitDateTimeComponent, BitDialogComponent, BitDomainValueComponent, BitDropDownComponent, BitDropDownGeneralComponent, BitDropDownMultipleComponent, BitEditableComponent, BitEditorComponent, BitFooterComponent, BitFooterMessagesComponent, BitGeneralComponent, BitHeaderComponent, BitHelpComponent, BitLanguageSelectorComponent, BitLoadingComponent, BitMessage, BitMessageService, BitMultipleCheckboxComponent, BitNGUploadComponent, BitNotification, BitNotificationError, BitNotificationErrorComponent, BitNotificationToastComponent, BitNumberComponent, BitPajigatorComponent, BitPanelDirective, BitPanelService, BitReadonlyComponent, BitSettingsComponent, BitSidebarComponent, BitSwitchComponent, BitSwitchSiNoComponent, BitTextAreaComponent, BitTextComponent, BitThemeSelectorComponent, BitTimeComponent, BitToolbarComponent, BitUserControlsComponent, BytesPipe, CanDeactivateGuard, CanDeactivateGuardFn, CantidadMonedaPipe, CapitalizePipe, ClearItemsService, ConfigurationEditor, CustomHttpInterceptor, CustomValidators, CutTextPipe, DateUtils, DefaultDataService, Domain, DomainListValuePipe, DomainService, DomainValuePipe, DownloadService, EditModeDirective, EntityCollectionServiceBase, EntityDataService, EntityHttpResourceUrls, EntityOp, Error$1 as Error, Fichero, FocusRegisterDirective, FocusService, FormType, GENERIC_TYPE, GeneralUtils, HttpUrlGenerator, HttpUtilsService, Item, ListValuePipe, LocaleService, LocatorService, MenuService, MenuTitle, OP_ERROR, OP_SUCCESS, OtherToolbarActionPipe, PageStatus, PropsFilterFnFactory, RemoveLineBreaksPipe, SessionSharedService, SharedLibraryModule, SiONoPipe, StorageService, StringifyPipe, TYPE_BLANK, TYPE_FORM, TYPE_LIST, TYPE_SCROLL, TableViewService, ThemeFBitService, ToolbarService, TranslateService, UploadService, ViewModeDirective, addButtonToToolbar, assign, baseFilterFn, buildButtonToolbar, buildDefaultToolbarForm, buildTranslatedMessage, choose, components, deleteElement, emptyFilter, entityDefaultDispatcherOptions, formComponents, getFileNameFromResponse, getInitToolbar, getToolbarObjectLoadedDefault, httpUtilsServiceInjectables, initialEntityState, isNumber, isString, makeErrorOp, makeSuccessOp, makeToolbarChildList, makeToolbarForm, makeToolbarList, normalizeRoot, objectToQueryParametersWithZeroValues, objectoToQueryParameters, reject, removeNull, replaceAll, setErrorUpdater, setFilterUpdater, setLoadedUpdater, setLoadingUpdater, setPatternUpdater, setTotalItemsUpdater, upsertElement };
6443
+ export { Autocomplete, AutocompleteDataService, AyudaContextual, AyudaService, BASE_RESULTADOS_PAGE, BIT_NOTIFICATION_MAX_LIFE, BaseCRUDService, BaseComponent, BaseDataAdapterService, BaseDataService, BaseFilter, BitAmountComponent, BitAutoCompleteComponent, BitBotonAyudaComponent, BitBreadCrumbComponent, BitCalendarComponent, BitCheckBoxComponent, BitColumnBooleanComponent, BitControlMessages, BitCustomComponent, BitDateComponent, BitDateTimeComponent, BitDialogComponent, BitDomainValueComponent, BitDropDownComponent, BitDropDownGeneralComponent, BitDropDownMultipleComponent, BitEditorComponent, BitFooterComponent, BitFooterMessagesComponent, BitGeneralComponent, BitHeaderComponent, BitHelpComponent, BitLanguageSelectorComponent, BitLoadingComponent, BitMessage, BitMessageService, BitMultipleCheckboxComponent, BitNGUploadComponent, BitNotification, BitNotificationError, BitNotificationErrorComponent, BitNotificationToastComponent, BitNumberComponent, BitPajigatorComponent, BitPanelDirective, BitPanelService, BitReadonlyComponent, BitSettingsComponent, BitSidebarComponent, BitSwitchComponent, BitSwitchSiNoComponent, BitTextAreaComponent, BitTextComponent, BitThemeSelectorComponent, BitTimeComponent, BitToolbarComponent, BitUserControlsComponent, BytesPipe, CanDeactivateGuard, CanDeactivateGuardFn, CantidadMonedaPipe, CapitalizePipe, ClearItemsService, ConfigurationEditor, CustomHttpInterceptor, CustomValidators, CutTextPipe, DateUtils, DefaultDataService, Domain, DomainListValuePipe, DomainService, DomainValuePipe, DownloadService, EntityCollectionServiceBase, EntityDataService, EntityHttpResourceUrls, EntityOp, Error$1 as Error, Fichero, FocusRegisterDirective, FocusService, FormType, GENERIC_TYPE, GeneralUtils, HttpUrlGenerator, HttpUtilsService, Item, ListValuePipe, LocaleService, LocatorService, MenuService, MenuTitle, OP_ERROR, OP_SUCCESS, OtherToolbarActionPipe, PageStatus, PropsFilterFnFactory, RemoveLineBreaksPipe, SessionSharedService, SharedLibraryModule, SiONoPipe, StorageService, StringifyPipe, TYPE_BLANK, TYPE_FORM, TYPE_LIST, TYPE_SCROLL, TableViewService, ThemeFBitService, ToolbarService, TranslateService, UploadService, addButtonToToolbar, assign, baseFilterFn, buildButtonToolbar, buildDefaultToolbarForm, buildTranslatedMessage, choose, components, deleteElement, emptyFilter, entityDefaultDispatcherOptions, formComponents, getFileNameFromResponse, getInitToolbar, getToolbarObjectLoadedDefault, httpUtilsServiceInjectables, initialEntityState, isNumber, isString, makeErrorOp, makeSuccessOp, makeToolbarChildList, makeToolbarForm, makeToolbarList, normalizeRoot, objectToQueryParametersWithZeroValues, objectoToQueryParameters, reject, removeNull, replaceAll, setErrorUpdater, setFilterUpdater, setLoadedUpdater, setLoadingUpdater, setPatternUpdater, setTotalItemsUpdater, upsertElement };
6816
6444
  //# sourceMappingURL=bit-ng-library.mjs.map