@jvsoft/components 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +63 -0
  2. package/dialog-flotante/dialog-flotante.component.d.ts +32 -0
  3. package/dialog-flotante/dialog-flotante.interface.d.ts +11 -0
  4. package/dialog-flotante/index.d.ts +5 -0
  5. package/dialog-flotante/public-api.d.ts +1 -0
  6. package/fesm2022/jvsoft-components-dialog-flotante.mjs +119 -0
  7. package/fesm2022/jvsoft-components-dialog-flotante.mjs.map +1 -0
  8. package/fesm2022/jvsoft-components-luces-navidad.mjs +33 -0
  9. package/fesm2022/jvsoft-components-luces-navidad.mjs.map +1 -0
  10. package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs +47 -0
  11. package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs.map +1 -0
  12. package/fesm2022/jvsoft-components-progress-spinner.mjs +78 -0
  13. package/fesm2022/jvsoft-components-progress-spinner.mjs.map +1 -0
  14. package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs +89 -0
  15. package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs.map +1 -0
  16. package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs +1481 -0
  17. package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -0
  18. package/fesm2022/jvsoft-components.mjs +1714 -0
  19. package/fesm2022/jvsoft-components.mjs.map +1 -0
  20. package/index.d.ts +5 -0
  21. package/luces-navidad/index.d.ts +5 -0
  22. package/luces-navidad/luces-navidad.component.d.ts +11 -0
  23. package/luces-navidad/public-api.d.ts +1 -0
  24. package/mat-suffix-search-button/index.d.ts +5 -0
  25. package/mat-suffix-search-button/mat-suffix-search-button.component.d.ts +12 -0
  26. package/mat-suffix-search-button/public-api.d.ts +1 -0
  27. package/package.json +53 -0
  28. package/progress-spinner/index.d.ts +5 -0
  29. package/progress-spinner/progress-spinner.component.d.ts +9 -0
  30. package/progress-spinner/progress-spinner.service.d.ts +25 -0
  31. package/progress-spinner/public-api.d.ts +2 -0
  32. package/src/styles.scss +3 -0
  33. package/tabla-mantenimiento/classes/data-model.d.ts +25 -0
  34. package/tabla-mantenimiento/components/progress-bar/index.d.ts +5 -0
  35. package/tabla-mantenimiento/components/progress-bar/progress-bar.component.d.ts +30 -0
  36. package/tabla-mantenimiento/components/progress-bar/public-api.d.ts +1 -0
  37. package/tabla-mantenimiento/index.d.ts +5 -0
  38. package/tabla-mantenimiento/interfaces/global/boton-mantenimiento.d.ts +41 -0
  39. package/tabla-mantenimiento/interfaces/global/columnas-tabla.d.ts +108 -0
  40. package/tabla-mantenimiento/interfaces/global/index.d.ts +3 -0
  41. package/tabla-mantenimiento/interfaces/global/otros.d.ts +26 -0
  42. package/tabla-mantenimiento/mat-row-keyboard-selection.directive.d.ts +19 -0
  43. package/tabla-mantenimiento/pipes/no-sanitize.pipe.d.ts +10 -0
  44. package/tabla-mantenimiento/pipes/zero-fill.pipe.d.ts +8 -0
  45. package/tabla-mantenimiento/public-api.d.ts +3 -0
  46. package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.d.ts +26 -0
  47. package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.d.ts +18 -0
  48. package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +143 -0
  49. package/tabla-mantenimiento/tabla-mantenimiento.functions.d.ts +5 -0
  50. package/tabla-mantenimiento/tabla-mantenimiento.service.d.ts +8 -0
  51. package/tabla-mantenimiento/table-util.d.ts +11 -0
@@ -0,0 +1,25 @@
1
+ import { Overlay } from '@angular/cdk/overlay';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export interface ProgressSpinnerConfig {
5
+ fondoStyle?: string;
6
+ mensaje?: string;
7
+ icono?: string;
8
+ }
9
+ export declare class ProgressSpinnerService {
10
+ private overlay;
11
+ private overlayRef;
12
+ _mensaje: BehaviorSubject<string>;
13
+ mensaje$: import("rxjs").Observable<string>;
14
+ _config: BehaviorSubject<{}>;
15
+ config$: import("rxjs").Observable<{}>;
16
+ overlayActivo: boolean;
17
+ get configActual(): ProgressSpinnerConfig;
18
+ set configActual(data: ProgressSpinnerConfig);
19
+ constructor(overlay: Overlay);
20
+ private createOverlay;
21
+ show(config?: ProgressSpinnerConfig): void;
22
+ hide(config?: ProgressSpinnerConfig, timeout?: number): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProgressSpinnerService, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<ProgressSpinnerService>;
25
+ }
@@ -0,0 +1,2 @@
1
+ export * from './progress-spinner.component';
2
+ export * from './progress-spinner.service';
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,25 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ export declare class DataModel {
3
+ modelosChk: {
4
+ [key: string]: boolean | any;
5
+ };
6
+ checkbox: ForCheckboxModel;
7
+ constructor();
8
+ generarId(row: any, campoValor: string[] | string, separador?: string): string;
9
+ agregarControles(lista: any[], idLista: string, limpiar?: boolean, campoValor?: string[] | string | null, campoValorSeparador?: string): void;
10
+ setState(idx: string, state: boolean): void;
11
+ getState(idx: string): boolean | any;
12
+ getDataMultiple(idx: string): any;
13
+ generarLista(tipoRetorno?: 'array' | 'object' | null, esCampoNumerico?: boolean): string | object | any[];
14
+ generarFormGroupFromModelosChk(tipo?: string): FormGroup;
15
+ }
16
+ declare class ForCheckboxModel {
17
+ private modeloCheck;
18
+ constructor(modeloCheck: DataModel);
19
+ get cantidadActivos(): number;
20
+ get existenActivados(): boolean;
21
+ get todosActivos(): boolean;
22
+ get algunosActivos(): boolean;
23
+ establecerTodos(activo: boolean): void;
24
+ }
25
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@jvsoft/components/tabla-mantenimiento/components/progress-bar" />
5
+ export * from './public-api';
@@ -0,0 +1,30 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface EstilosBarra {
4
+ valorMaximo: number;
5
+ class?: string;
6
+ style?: string;
7
+ }
8
+ export declare class ProgressBarComponent implements OnInit {
9
+ objThis: any;
10
+ porcentaje: number;
11
+ textoCentrado: boolean;
12
+ private _textoMostrar;
13
+ get textoMostrar(): string;
14
+ set textoMostrar(val: string);
15
+ private _formatoNumero;
16
+ get formatoNumero(): string;
17
+ set formatoNumero(val: string);
18
+ private _coloresValor;
19
+ get coloresValor(): EstilosBarra[];
20
+ set coloresValor(val: EstilosBarra[]);
21
+ constructor();
22
+ ngOnInit(): void;
23
+ colorEstilo(): {
24
+ style: string;
25
+ class: string;
26
+ };
27
+ ordenarPorPropiedad(objData: any[], propiedad: string, numeros?: boolean): any[];
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProgressBarComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProgressBarComponent, "jvsoft-progress-bar", never, { "objThis": { "alias": "objThis"; "required": false; }; "porcentaje": { "alias": "porcentaje"; "required": false; }; "textoCentrado": { "alias": "textoCentrado"; "required": false; }; "textoMostrar": { "alias": "textoMostrar"; "required": false; }; "formatoNumero": { "alias": "formatoNumero"; "required": false; }; "coloresValor": { "alias": "coloresValor"; "required": false; }; }, {}, never, never, true, never>;
30
+ }
@@ -0,0 +1 @@
1
+ export * from './progress-bar.component';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@jvsoft/components/tabla-mantenimiento" />
5
+ export * from './public-api';
@@ -0,0 +1,41 @@
1
+ import { TablaMantenimientoComponent } from '../../tabla-mantenimiento.component';
2
+ export type TiposOpciones = 'ver' | 'nuevo' | 'editar' | 'guardar' | 'eliminar' | 'seleccionar' | 'editar_item' | 'detalle' | 'ver_archivos' | 'eliminar_fila' | 'imprimir' | 'descargar' | 'exportar_pdf' | 'exportar_excel' | 'exportacion_avanzada' | 'ver_mapa' | string;
3
+ export interface BotonMantenimiento {
4
+ tipo: TiposOpciones;
5
+ tipoTemplate?: TiposOpciones;
6
+ cDerechoCodigo?: string;
7
+ class?: string;
8
+ icono?: string;
9
+ label?: string;
10
+ soloIcono?: boolean;
11
+ sinCondicion?: boolean;
12
+ esIndependiente?: boolean;
13
+ ignorarDerecho?: boolean;
14
+ ignorarReadOnly?: boolean;
15
+ badge?: string;
16
+ tooltip?: string;
17
+ noContextual?: boolean;
18
+ subItems?: BotonMantenimiento[];
19
+ datosExtra?: any;
20
+ esVisible?(item: any, tablaRef?: TablaMantenimientoComponent<any>): boolean;
21
+ estaDeshabilitado?(item: any, tablaRef?: TablaMantenimientoComponent<any>): boolean;
22
+ }
23
+ export interface BotonDialog {
24
+ tipo?: TiposOpciones;
25
+ class?: string;
26
+ icono?: string;
27
+ label?: string;
28
+ sinCondicion?: boolean;
29
+ }
30
+ export interface SeccionesBotonesMantenimiento {
31
+ crud?: BotonMantenimiento[];
32
+ principal?: BotonMantenimiento[];
33
+ izquierda?: BotonMantenimiento[];
34
+ derecha?: BotonMantenimiento[];
35
+ secundario?: BotonMantenimiento[];
36
+ inferior?: BotonMantenimiento[];
37
+ [key: string]: BotonMantenimiento[] | undefined;
38
+ }
39
+ export interface TablaMantenimientoSeccionBotones {
40
+ [key: string]: SeccionesBotonesMantenimiento;
41
+ }
@@ -0,0 +1,108 @@
1
+ import { TipoValorFuncion } from './otros';
2
+ import { EstilosBarra } from '../../components/progress-bar';
3
+ type TiposColumnas = 'estiloEstablecido' | 'text_rows' | 'text_template' | 'text' | 'number' | 'money' | 'date' | 'image' | 'estado' | 'badge' | 'progress' | 'checkbox' | 'button' | 'icon' | 'icons' | 'icon_checkbox' | 'buttons' | 'custom' | 'expandir' | 'numeracion_automatica';
4
+ export interface ColumnaTabla<T> {
5
+ label: string;
6
+ labelLista?: string;
7
+ property?: keyof T | string | any;
8
+ /** esta propiedad solo se usa cuando se usará una funcion para modificarla */
9
+ propertyTemplate?: keyof T | string | any;
10
+ type: TiposColumnas;
11
+ sortType?: 'number' | 'date';
12
+ reportType?: TiposColumnas;
13
+ visible?: boolean;
14
+ /** esta propiedad NO TIENE USO REAL */
15
+ visibleAlias?: boolean;
16
+ cssClasses?: string[];
17
+ cssClassesTH?: string[];
18
+ textCss?: string | string[];
19
+ cssFooterClasses?: string | string[];
20
+ headerCssClasses?: string[];
21
+ opcSwitchIcon?: any;
22
+ fields?: any;
23
+ format?: any;
24
+ chkField?: string | string[];
25
+ chkFieldPersistente?: boolean;
26
+ chkFieldSeparador?: string;
27
+ simboloMoneda?: any;
28
+ zeroFill?: null | number;
29
+ sticky?: boolean;
30
+ sort?: boolean;
31
+ /** @deprecated usar '`reporte`', '`ocultar`' en su lugar */
32
+ ocultarReporte?: boolean;
33
+ stickyEnd?: boolean;
34
+ textArray?: string[];
35
+ text_rows?: TextRow[];
36
+ estados?: object[];
37
+ text?: PropiedadesText;
38
+ reporte?: ColumnaTablaReporte;
39
+ /** esta propiedad solo se usa cuando el tipo es 'progress' */
40
+ progressbar?: PropiedadesProgressBar;
41
+ iconsDef?: ColumnaIcons;
42
+ /** usar para cargar datos extra y evaluar durante la ejecucion */
43
+ datosExtra?: any;
44
+ innerHTML?(row: any): string;
45
+ innerHTMLInvisible?(row: any): string;
46
+ click?(row: any): void;
47
+ esVisible?(): boolean;
48
+ noMostrar?(): boolean;
49
+ condicionHabilitado?(): boolean;
50
+ /** @deprecated usar '`noMostrar`' en su lugar */
51
+ isIncluded?(vThis: any): boolean;
52
+ transformar?(row: any): any;
53
+ transformarDirecto?(row: any): any;
54
+ transformarFooter?(): any;
55
+ }
56
+ export interface ColumnaTablaReporte {
57
+ ocultar?: boolean;
58
+ totalizar?: boolean | {
59
+ campoTotal?: string;
60
+ transformar?(titulo?: any): any;
61
+ };
62
+ opcionesPdfmake?: {
63
+ titulo?: object;
64
+ cuerpo?: object;
65
+ total?: TipoValorFuncion<any>;
66
+ };
67
+ }
68
+ export interface PropiedadesProgressBar {
69
+ formatoNumero?: string;
70
+ coloresValor?: EstilosBarra[];
71
+ textoCentrado?: boolean;
72
+ textoMostrar?(row: any): string;
73
+ porcentaje(row: any): number;
74
+ }
75
+ export interface PropiedadesText {
76
+ separador?: string;
77
+ cssContenedor?: string;
78
+ cssStyle?: object;
79
+ click?(row: any): void;
80
+ }
81
+ export interface TextRow {
82
+ cssClasses?: string[];
83
+ label?: string;
84
+ cssLabelClasses?: string[];
85
+ value: string;
86
+ textArray?: string[];
87
+ salto?: boolean;
88
+ cssValueClasses?: string[];
89
+ siCampoNulo?: string[];
90
+ valueType?: 'number' | 'date' | 'money';
91
+ valueFormat?: string;
92
+ }
93
+ export interface ColumnaIcons {
94
+ items: TipoValorFuncion<IconsIcon[]>;
95
+ soloIcono?: boolean;
96
+ iconSize?: string;
97
+ }
98
+ export interface IconsIcon {
99
+ icon: string;
100
+ iconSize?: string;
101
+ toolTip?: string;
102
+ toolTipField?: string;
103
+ contentCss?: string;
104
+ cssClass?: string;
105
+ click?(row: any): void;
106
+ esVisible?(row: any): boolean;
107
+ }
108
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './columnas-tabla';
2
+ export * from './boton-mantenimiento';
3
+ export * from './otros';
@@ -0,0 +1,26 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { TiposOpciones } from './boton-mantenimiento';
3
+ export type TipoValorFuncion<T> = T | ((...param: any) => T);
4
+ export declare function tipoValorFuncion<T>(datoParam: T, ...param: any[]): T;
5
+ export interface OpcionSeleccionada {
6
+ item?: any;
7
+ seccion: string;
8
+ tipo: TiposOpciones;
9
+ /** Solo emite cuando se tiene los checkbox para seleccion */
10
+ idsSeleccionados?: any;
11
+ datosExtra?: any;
12
+ /** @deprecated usar '`datosExtra`' en su lugar */
13
+ formGroup?: any;
14
+ /** @deprecated usar '`datosExtra`' en su lugar */
15
+ dialog?: any;
16
+ }
17
+ export interface DialogDatosRecibidos {
18
+ opcMenuSubmit?: OpcionSeleccionada;
19
+ [key: string]: any;
20
+ }
21
+ export interface DataServidor {
22
+ [key: string]: BehaviorSubject<any>;
23
+ }
24
+ export interface OpcMenuEvent extends OpcionSeleccionada {
25
+ datosGuardados?: any;
26
+ }
@@ -0,0 +1,19 @@
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { MatTable } from '@angular/material/table';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MatRowKeyboardSelectionDirective implements OnInit, OnDestroy {
5
+ private el;
6
+ private rows;
7
+ private renderedData;
8
+ tabla: MatTable<any>;
9
+ rowModel: any;
10
+ seleccionarSiguiente: EventEmitter<any>;
11
+ private unsubscriber$;
12
+ constructor(el: ElementRef);
13
+ ngOnInit(): void;
14
+ ngOnDestroy(): void;
15
+ onKeydown(event: KeyboardEvent): void;
16
+ private getTableRows;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatRowKeyboardSelectionDirective, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatRowKeyboardSelectionDirective, "[matRowKeyboardSelection]", never, { "tabla": { "alias": "matRowKeyboardSelection"; "required": false; }; "rowModel": { "alias": "rowModel"; "required": false; }; }, { "seleccionarSiguiente": "seleccionarSiguiente"; }, never, never, true, never>;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NoSanitizePipe implements PipeTransform {
5
+ private domSanitizer;
6
+ constructor(domSanitizer: DomSanitizer);
7
+ transform(html: string): SafeHtml;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NoSanitizePipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<NoSanitizePipe, "noSanitize", true>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ZeroFillPipe implements PipeTransform {
4
+ transform(value: unknown, digitos: number, ...args: unknown[]): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZeroFillPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<ZeroFillPipe, "zeroFill", true>;
7
+ }
8
+ export declare function zeroFill(value: unknown, digitos: number, ...args: unknown[]): string;
@@ -0,0 +1,3 @@
1
+ export * from './tabla-mantenimiento.component';
2
+ export * from './tabla-mantenimiento.service';
3
+ export * from './components/progress-bar';
@@ -0,0 +1,26 @@
1
+ import { AfterContentInit, ChangeDetectorRef, EventEmitter, QueryList } from '@angular/core';
2
+ import { MatColumnDef, MatTable } from '@angular/material/table';
3
+ import { ColumnaTabla, IconsIcon } from '../interfaces/global';
4
+ import { DataModel } from '../classes/data-model';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "../classes/data-model";
7
+ export declare class TablaMantenimientoColumnDefsComponent implements AfterContentInit {
8
+ table: MatTable<any>;
9
+ private cdRef;
10
+ objThis: any;
11
+ nombreColeccion: any;
12
+ colDetalle: ColumnaTabla<any>[];
13
+ chkLista: DataModel;
14
+ chkListaChange: EventEmitter<DataModel>;
15
+ columnDef: QueryList<MatColumnDef>;
16
+ constructor(table: MatTable<any>, cdRef: ChangeDetectorRef);
17
+ ngAfterContentInit(): void;
18
+ trackByProperty<T>(index: number, column: ColumnaTabla<T>): any;
19
+ verTexto(row: any, campo: any, glue?: string): any;
20
+ camposNulos(row: any, campos: string[]): boolean;
21
+ accionClick(column: any, item: any, event: any): boolean;
22
+ obtenerItems(columna: any, row: any): IconsIcon[];
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<TablaMantenimientoColumnDefsComponent, [{ optional: true; }, null]>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<TablaMantenimientoColumnDefsComponent, "jvs-tabla-mantenimiento-column-defs", never, { "objThis": { "alias": "objThis"; "required": false; }; "nombreColeccion": { "alias": "nombreColeccion"; "required": false; }; "colDetalle": { "alias": "colDetalle"; "required": false; }; "chkLista": { "alias": "chkLista"; "required": false; }; }, { "chkListaChange": "chkListaChange"; }, never, ["*"], true, never>;
25
+ static ngAcceptInputType_chkLista: i1.DataModel;
26
+ }
@@ -0,0 +1,18 @@
1
+ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
+ import { MatMenu } from '@angular/material/menu';
3
+ import { BotonMantenimiento } from '../interfaces/global';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TablaMantenimientoMenuComponent implements OnInit {
6
+ objThis: any;
7
+ nombreColeccion: string;
8
+ item: any;
9
+ derechosActuales: any;
10
+ opcionSelecionada: EventEmitter<any>;
11
+ menu: MatMenu;
12
+ subItems: BotonMantenimiento[];
13
+ botonTemplate: TemplateRef<any>;
14
+ constructor();
15
+ ngOnInit(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<TablaMantenimientoMenuComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<TablaMantenimientoMenuComponent, "jvs-tabla-mantenimiento-menu", never, { "objThis": { "alias": "objThis"; "required": false; }; "nombreColeccion": { "alias": "nombreColeccion"; "required": false; }; "item": { "alias": "item"; "required": false; }; "derechosActuales": { "alias": "derechosActuales"; "required": false; }; "subItems": { "alias": "subItems"; "required": true; }; "botonTemplate": { "alias": "botonTemplate"; "required": true; }; }, { "opcionSelecionada": "opcionSelecionada"; }, never, never, true, never>;
18
+ }
@@ -0,0 +1,143 @@
1
+ import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { FormBuilder, FormControl } from '@angular/forms';
3
+ import { MatPaginator } from '@angular/material/paginator';
4
+ import { MatSort } from '@angular/material/sort';
5
+ import { MatColumnDef, MatTable, MatTableDataSource } from '@angular/material/table';
6
+ import { Observable, Subscription } from 'rxjs';
7
+ import { Overlay, OverlayRef } from '@angular/cdk/overlay';
8
+ import { BotonMantenimiento, ColumnaTabla, OpcionSeleccionada, SeccionesBotonesMantenimiento } from './interfaces/global';
9
+ import { TablaMantenimientoService } from './tabla-mantenimiento.service';
10
+ import { capitalizarTexto } from './tabla-mantenimiento.functions';
11
+ import { DataModel } from './classes/data-model';
12
+ import * as i0 from "@angular/core";
13
+ export interface MantenimientoFilaExtraData {
14
+ template?: TemplateRef<any>;
15
+ esVisible?(item?: any): boolean;
16
+ }
17
+ type TiposControlBusqueda = 'query' | 'simple' | '';
18
+ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterContentInit, OnChanges {
19
+ private fb;
20
+ overlay: Overlay;
21
+ viewContainerRef: ViewContainerRef;
22
+ protected tablaMantenimientoService: TablaMantenimientoService;
23
+ private cdRef;
24
+ static nextId: number;
25
+ readonly id: string;
26
+ get templateBotonesComunes(): BotonMantenimiento[];
27
+ get templateColumnasTabla(): ColumnaTabla<any>[];
28
+ virtualScroll: boolean;
29
+ itemSize: number;
30
+ headerize: number;
31
+ placeholderHeight: number;
32
+ dataSuscription: Observable<any> | undefined;
33
+ objThis: any;
34
+ nombreColeccion: any;
35
+ ctrlBusquedaValue: string;
36
+ ctrlBusquedaPlaceholder: string;
37
+ filtroCampos: boolean;
38
+ paginador: boolean;
39
+ esTabla: boolean;
40
+ readOnly: boolean | 'permitirSeleccion';
41
+ filaExtraHeader: MantenimientoFilaExtraData | any;
42
+ filaFooter: boolean;
43
+ botonesCRUD: string;
44
+ dblclickItem: EventEmitter<any>;
45
+ objBotonesCRUD: BotonMantenimiento[];
46
+ classSeleccionado: string[];
47
+ classAnulado: string[];
48
+ campoAnulado: any;
49
+ campoAnuladoMensaje: any;
50
+ opcionSelecionada: EventEmitter<any>;
51
+ opcBusqueda: EventEmitter<any>;
52
+ accionRecargar: EventEmitter<any>;
53
+ isRecargarUsed: boolean;
54
+ filaExtraTemplate: TemplateRef<any> | undefined;
55
+ paginator: MatPaginator;
56
+ sort: MatSort;
57
+ exportarExcel: boolean;
58
+ pageSize: number;
59
+ pageSizeOptions: number[];
60
+ dataSourceChange: EventEmitter<any>;
61
+ resultados: EventEmitter<any>;
62
+ resultadosConLabel: EventEmitter<any>;
63
+ dataFiltro: EventEmitter<any>;
64
+ dataSource: MatTableDataSource<unknown, MatPaginator>;
65
+ table: MatTable<T>;
66
+ columnDefs: QueryList<MatColumnDef>;
67
+ componenteCargadoTotalmente: boolean;
68
+ paginacion: {
69
+ pageSize: number;
70
+ pageSizeOptions: number[];
71
+ pageCurrent: any;
72
+ pageIndex: number;
73
+ pageLength: null;
74
+ };
75
+ ignorarDerechos: boolean;
76
+ derechosActuales: any;
77
+ rows: QueryList<ElementRef<HTMLTableRowElement>>;
78
+ rowFooter: ElementRef<HTMLTableRowElement>;
79
+ mouseEvent$: Subscription | undefined;
80
+ overlayRef: OverlayRef | undefined;
81
+ userMenu: TemplateRef<any>;
82
+ opcFiltroActual: {};
83
+ protected readonly capitalizarTexto: typeof capitalizarTexto;
84
+ cCampoBusqueda: FormControl<string | null>;
85
+ chkLista: DataModel;
86
+ constructor(fb: FormBuilder, overlay: Overlay, viewContainerRef: ViewContainerRef, tablaMantenimientoService: TablaMantenimientoService, cdRef: ChangeDetectorRef);
87
+ _ctrlBusqueda: TiposControlBusqueda;
88
+ get ctrlBusqueda(): TiposControlBusqueda;
89
+ set ctrlBusqueda(val: TiposControlBusqueda);
90
+ private _leyenda;
91
+ get leyenda(): {
92
+ text: string;
93
+ class?: string;
94
+ } | undefined;
95
+ set leyenda(val: {
96
+ text: string;
97
+ class?: string;
98
+ } | string);
99
+ private _idTabla;
100
+ get idTabla(): string[];
101
+ set idTabla(val: string[] | string);
102
+ private _columnasTabla;
103
+ get columnasTabla(): ColumnaTabla<any>[];
104
+ set columnasTabla(val: ColumnaTabla<any>[]);
105
+ private _botonesMenu;
106
+ get botonesMenu(): SeccionesBotonesMantenimiento;
107
+ get botonesMenuFinal(): SeccionesBotonesMantenimiento;
108
+ set botonesMenu(val: SeccionesBotonesMantenimiento);
109
+ get listaMenuCompleto(): BotonMantenimiento[];
110
+ get objVisibleColumns(): ColumnaTabla<any>[];
111
+ get visibleColumns(): any[];
112
+ get tieneCheckbox(): false | ColumnaTabla<any>;
113
+ get objSeleccionado(): any;
114
+ set objSeleccionado(val: any);
115
+ get idsSeleccionado(): string;
116
+ idTablaValor(data: any): string;
117
+ condicionesClaseFila: (item: any) => never[];
118
+ ngOnInit(): void;
119
+ ngAfterContentInit(): void;
120
+ ngOnChanges(changes: SimpleChanges): void;
121
+ trackByFn(index: number, item: {
122
+ id: number;
123
+ value: number;
124
+ }): string;
125
+ agregarBotonesExportacion(): void;
126
+ actualizarCrud(): void;
127
+ classFila(item: any): any[];
128
+ subItemsActivos(btn: any, item: any): boolean;
129
+ get noData(): any;
130
+ onFilterChange(value: string): void;
131
+ toggleColumnVisibility(column: any, event: any): void;
132
+ cargarData(retorno?: boolean): any;
133
+ setData(data: any): void;
134
+ botonDisabled(btn: BotonMantenimiento, item: any): boolean | undefined;
135
+ opcMenu(item: any, objMenu: OpcionSeleccionada, modal?: null, retorno?: boolean): OpcionSeleccionada | 1;
136
+ emitirResultados(evento?: {}): void;
137
+ abrirMenuContextual({ x, y }: MouseEvent, user: any): void;
138
+ cerrarMenuContextual(): void;
139
+ emitirAccionRecargar(): void;
140
+ static ɵfac: i0.ɵɵFactoryDeclaration<TablaMantenimientoComponent<any>, never>;
141
+ static ɵcmp: i0.ɵɵComponentDeclaration<TablaMantenimientoComponent<any>, "jvs-tabla-mantenimiento", never, { "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "headerize": { "alias": "headerize"; "required": false; }; "dataSuscription": { "alias": "dataSuscription"; "required": false; }; "objThis": { "alias": "objThis"; "required": true; }; "nombreColeccion": { "alias": "nombreColeccion"; "required": true; }; "ctrlBusquedaValue": { "alias": "ctrlBusquedaValue"; "required": false; }; "ctrlBusquedaPlaceholder": { "alias": "ctrlBusquedaPlaceholder"; "required": false; }; "filtroCampos": { "alias": "filtroCampos"; "required": false; }; "paginador": { "alias": "paginador"; "required": false; }; "esTabla": { "alias": "esTabla"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "filaExtraHeader": { "alias": "filaExtraHeader"; "required": false; }; "filaFooter": { "alias": "filaFooter"; "required": false; }; "botonesCRUD": { "alias": "botonesCRUD"; "required": false; }; "objBotonesCRUD": { "alias": "objBotonesCRUD"; "required": false; }; "classSeleccionado": { "alias": "classSeleccionado"; "required": false; }; "classAnulado": { "alias": "classAnulado"; "required": false; }; "campoAnulado": { "alias": "campoAnulado"; "required": false; }; "campoAnuladoMensaje": { "alias": "campoAnuladoMensaje"; "required": false; }; "filaExtraTemplate": { "alias": "filaExtraTemplate"; "required": false; }; "exportarExcel": { "alias": "exportarExcel"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "derechosActuales": { "alias": "derechosActuales"; "required": false; }; "ctrlBusqueda": { "alias": "ctrlBusqueda"; "required": false; }; "leyenda": { "alias": "leyenda"; "required": false; }; "idTabla": { "alias": "idTabla"; "required": false; }; "columnasTabla": { "alias": "columnasTabla"; "required": false; }; "botonesMenu": { "alias": "botonesMenu"; "required": false; }; "condicionesClaseFila": { "alias": "condicionesClaseFila"; "required": false; }; }, { "dblclickItem": "dblclickItem"; "opcionSelecionada": "opcionSelecionada"; "opcBusqueda": "opcBusqueda"; "accionRecargar": "accionRecargar"; "dataSourceChange": "dataSourceChange"; "resultados": "resultados"; "resultadosConLabel": "resultadosConLabel"; "dataFiltro": "dataFiltro"; }, ["columnDefs"], ["[filtro]", "[objetosMenuPegado]", "[objetosMenu]", "[botonesFiltro]", "[cuerpo]", "[tableDefinitions]", "[appendTable]"], true, never>;
142
+ }
143
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare function buscarEnArray<T extends Record<string, any>>(coleccion: T[], idBuscar: string | string[], dato: any): T | null;
2
+ export declare function formatearFecha(val: string, hora?: string): string | Date;
3
+ export declare function esNumero(value: any): boolean;
4
+ export declare function capitalizarTexto(texto: string): string;
5
+ export declare function getBrowserName(): "edge" | "opera" | "chrome" | "ie" | "firefox" | "safari" | "other";
@@ -0,0 +1,8 @@
1
+ import { BotonMantenimiento, ColumnaTabla } from './interfaces/global';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TablaMantenimientoService {
4
+ get templateBotonesComunes(): BotonMantenimiento[];
5
+ get templateColumnasTabla(): ColumnaTabla<any>[];
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TablaMantenimientoService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<TablaMantenimientoService>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import * as XLSX from 'xlsx';
2
+ export declare class TableUtil {
3
+ static exportTableToExcelV2(targetTableElm: HTMLElement, name?: string): void;
4
+ static exportTableToExcel(tableId: string, name?: string): void;
5
+ static exportArrayToExcel(arr: any[], name?: string): void;
6
+ static getWorkBook(htmlTableId: string, data: any[]): {
7
+ tableToSheet: XLSX.WorkSheet;
8
+ jsonToSheet: XLSX.WorkSheet;
9
+ sheetToJson: any;
10
+ };
11
+ }