@jvsoft/utils 0.0.13-alpha.1 → 0.0.13-alpha.3

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 (119) hide show
  1. package/classes/data-model.d.ts +25 -0
  2. package/fesm2022/jvsoft-utils-src-functions.mjs +1367 -0
  3. package/fesm2022/jvsoft-utils-src-functions.mjs.map +1 -0
  4. package/fesm2022/jvsoft-utils-src-interfaces.mjs +6 -0
  5. package/fesm2022/jvsoft-utils-src-interfaces.mjs.map +1 -0
  6. package/fesm2022/jvsoft-utils-src-pipes.mjs +290 -0
  7. package/fesm2022/jvsoft-utils-src-pipes.mjs.map +1 -0
  8. package/fesm2022/jvsoft-utils.mjs +1784 -0
  9. package/fesm2022/jvsoft-utils.mjs.map +1 -0
  10. package/functions/base64.d.ts +2 -0
  11. package/functions/browser.d.ts +1 -0
  12. package/functions/crypto-js.d.ts +2 -0
  13. package/functions/date.d.ts +3 -0
  14. package/functions/email.d.ts +2 -0
  15. package/functions/file.d.ts +10 -0
  16. package/functions/forms.d.ts +23 -0
  17. package/functions/http-client.d.ts +2 -0
  18. package/functions/index.d.ts +1 -0
  19. package/functions/local-storage.d.ts +29 -0
  20. package/functions/mat-form-controls/autocomplete.d.ts +21 -0
  21. package/functions/mat-form-controls/index.d.ts +2 -0
  22. package/functions/number.d.ts +2 -0
  23. package/functions/object-transformation.d.ts +2 -0
  24. package/functions/objects-arrays.d.ts +47 -0
  25. package/functions/public-api.d.ts +16 -0
  26. package/functions/string.d.ts +23 -0
  27. package/functions/sweetalert.d.ts +5 -0
  28. package/functions/utiles.d.ts +1 -0
  29. package/index.d.ts +5 -0
  30. package/{src/interfaces/datos.ts → interfaces/datos.d.ts} +1 -2
  31. package/interfaces/index.d.ts +1 -0
  32. package/interfaces/public-api.d.ts +1 -0
  33. package/package.json +26 -3
  34. package/pipes/data-en-lista.pipe.d.ts +8 -0
  35. package/pipes/date-diff-string.pipe.d.ts +17 -0
  36. package/pipes/filtro.pipe.d.ts +18 -0
  37. package/pipes/form-control-is-required.pipe.d.ts +9 -0
  38. package/pipes/index.d.ts +1 -0
  39. package/pipes/json-parse.pipe.d.ts +7 -0
  40. package/pipes/no-sanitize.pipe.d.ts +10 -0
  41. package/pipes/public-api.d.ts +8 -0
  42. package/pipes/tipo-valor-funcion.pipe.d.ts +9 -0
  43. package/pipes/zero-fill.pipe.d.ts +8 -0
  44. package/public-api.d.ts +4 -0
  45. package/src/functions/base64.d.ts +2 -0
  46. package/src/functions/browser.d.ts +1 -0
  47. package/src/functions/crypto-js.d.ts +2 -0
  48. package/src/functions/date.d.ts +3 -0
  49. package/src/functions/email.d.ts +2 -0
  50. package/src/functions/file.d.ts +10 -0
  51. package/src/functions/forms.d.ts +23 -0
  52. package/src/functions/http-client.d.ts +2 -0
  53. package/src/functions/index.d.ts +5 -0
  54. package/src/functions/local-storage.d.ts +29 -0
  55. package/src/functions/mat-form-controls/autocomplete.d.ts +21 -0
  56. package/src/functions/mat-form-controls/index.d.ts +2 -0
  57. package/src/functions/number.d.ts +2 -0
  58. package/src/functions/object-transformation.d.ts +2 -0
  59. package/src/functions/objects-arrays.d.ts +47 -0
  60. package/src/functions/public-api.d.ts +16 -0
  61. package/src/functions/string.d.ts +23 -0
  62. package/src/functions/sweetalert.d.ts +5 -0
  63. package/src/functions/utiles.d.ts +1 -0
  64. package/src/interfaces/datos.d.ts +4 -0
  65. package/src/interfaces/index.d.ts +5 -0
  66. package/src/interfaces/public-api.d.ts +1 -0
  67. package/src/pipes/data-en-lista.pipe.d.ts +8 -0
  68. package/src/pipes/date-diff-string.pipe.d.ts +17 -0
  69. package/src/pipes/filtro.pipe.d.ts +18 -0
  70. package/src/pipes/form-control-is-required.pipe.d.ts +9 -0
  71. package/src/pipes/index.d.ts +5 -0
  72. package/src/pipes/json-parse.pipe.d.ts +7 -0
  73. package/src/pipes/no-sanitize.pipe.d.ts +10 -0
  74. package/src/pipes/public-api.d.ts +8 -0
  75. package/src/pipes/tipo-valor-funcion.pipe.d.ts +9 -0
  76. package/src/pipes/zero-fill.pipe.d.ts +8 -0
  77. package/CHANGELOG.md +0 -13
  78. package/ng-package.json +0 -7
  79. package/src/classes/data-model.ts +0 -150
  80. package/src/functions/base64.ts +0 -8
  81. package/src/functions/browser.ts +0 -20
  82. package/src/functions/crypto-js.ts +0 -29
  83. package/src/functions/date.ts +0 -23
  84. package/src/functions/email.ts +0 -17
  85. package/src/functions/file.ts +0 -138
  86. package/src/functions/forms.ts +0 -145
  87. package/src/functions/http-client.ts +0 -110
  88. package/src/functions/index.ts +0 -1
  89. package/src/functions/local-storage.ts +0 -102
  90. package/src/functions/mat-form-controls/autocomplete.ts +0 -275
  91. package/src/functions/mat-form-controls/index.ts +0 -6
  92. package/src/functions/ng-package.json +0 -5
  93. package/src/functions/number.ts +0 -3
  94. package/src/functions/object-transformation.ts +0 -37
  95. package/src/functions/objects-arrays.ts +0 -243
  96. package/src/functions/public-api.ts +0 -19
  97. package/src/functions/string.ts +0 -9
  98. package/src/functions/sweetalert.ts +0 -95
  99. package/src/functions/utiles.ts +0 -20
  100. package/src/interfaces/index.ts +0 -1
  101. package/src/interfaces/ng-package.json +0 -5
  102. package/src/interfaces/otros.ts +0 -0
  103. package/src/interfaces/public-api.ts +0 -3
  104. package/src/interfaces/routes.ts +0 -42
  105. package/src/pipes/data-en-lista.pipe.ts +0 -40
  106. package/src/pipes/date-diff-string.pipe.ts +0 -117
  107. package/src/pipes/filtro.pipe.ts +0 -64
  108. package/src/pipes/form-control-is-required.pipe.ts +0 -17
  109. package/src/pipes/index.ts +0 -1
  110. package/src/pipes/json-parse.pipe.ts +0 -18
  111. package/src/pipes/ng-package.json +0 -5
  112. package/src/pipes/no-sanitize.pipe.ts +0 -12
  113. package/src/pipes/public-api.ts +0 -10
  114. package/src/pipes/tipo-valor-funcion.pipe.ts +0 -23
  115. package/src/pipes/zero-fill.pipe.ts +0 -19
  116. package/src/public-api.ts +0 -12
  117. package/tsconfig.lib.json +0 -17
  118. package/tsconfig.lib.prod.json +0 -11
  119. package/tsconfig.spec.json +0 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jvsoft/utils",
3
- "version": "0.0.13-alpha.1",
3
+ "version": "0.0.13-alpha.3",
4
4
  "description": "JVSOFT Angular Utils",
5
5
  "publishConfig": {
6
6
  "tag": "alpha",
@@ -23,5 +23,28 @@
23
23
  "dependencies": {
24
24
  "tslib": "^2.3.0"
25
25
  },
26
- "sideEffects": false
27
- }
26
+ "sideEffects": false,
27
+ "module": "fesm2022/jvsoft-utils.mjs",
28
+ "typings": "index.d.ts",
29
+ "exports": {
30
+ "./package.json": {
31
+ "default": "./package.json"
32
+ },
33
+ ".": {
34
+ "types": "./index.d.ts",
35
+ "default": "./fesm2022/jvsoft-utils.mjs"
36
+ },
37
+ "./src/functions": {
38
+ "types": "./src/functions/index.d.ts",
39
+ "default": "./fesm2022/jvsoft-utils-src-functions.mjs"
40
+ },
41
+ "./src/pipes": {
42
+ "types": "./src/pipes/index.d.ts",
43
+ "default": "./fesm2022/jvsoft-utils-src-pipes.mjs"
44
+ },
45
+ "./src/interfaces": {
46
+ "types": "./src/interfaces/index.d.ts",
47
+ "default": "./fesm2022/jvsoft-utils-src-interfaces.mjs"
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DataEnListaPipe implements PipeTransform {
4
+ transform(coleccion: object[], idBuscar: string | string[], dato: any): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataEnListaPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<DataEnListaPipe, "dataEnLista", true>;
7
+ }
8
+ export declare function dataEnLista(coleccion: object[], idBuscar: string | string[], dato: any): any;
@@ -0,0 +1,17 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DateDiffStringPipe implements PipeTransform {
4
+ transform(startingDate: Date, endingDate: Date): any;
5
+ separarMilisegundos(milisegundos: any): {
6
+ years: number;
7
+ months: number;
8
+ weeks: number;
9
+ days: number;
10
+ hours: number;
11
+ minutes: number;
12
+ seconds: number;
13
+ };
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateDiffStringPipe, never>;
15
+ static ɵpipe: i0.ɵɵPipeDeclaration<DateDiffStringPipe, "dateDiffString", true>;
16
+ }
17
+ export declare function dateDiffString(startingDate: Date, endingDate: Date): any;
@@ -0,0 +1,18 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ interface OpcionesBusqueda {
4
+ texto: string;
5
+ longitudMinima?: number;
6
+ campo?: string | string[];
7
+ mostrarObligado?: MostrarObligado;
8
+ }
9
+ interface MostrarObligado {
10
+ campo: string;
11
+ items: any[];
12
+ }
13
+ export declare class FiltroPipe implements PipeTransform {
14
+ transform(items: any[], opcionesBusqueda: OpcionesBusqueda): any[];
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<FiltroPipe, never>;
16
+ static ɵpipe: i0.ɵɵPipeDeclaration<FiltroPipe, "filtro", true>;
17
+ }
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FormControlIsRequiredPipe implements PipeTransform {
5
+ transform(formControl: AbstractControl, ...args: unknown[]): any;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlIsRequiredPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormControlIsRequiredPipe, "formControlIsRequired", true>;
8
+ }
9
+ export declare function formControlIsRequired(formControl: AbstractControl): any;
@@ -0,0 +1 @@
1
+ export * from './public-api';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class JsonParsePipe implements PipeTransform {
4
+ transform(value: string, ...args: unknown[]): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonParsePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<JsonParsePipe, "jsonParse", true>;
7
+ }
@@ -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
+ export * from './data-en-lista.pipe';
2
+ export * from './date-diff-string.pipe';
3
+ export * from './filtro.pipe';
4
+ export * from './form-control-is-required.pipe';
5
+ export * from './json-parse.pipe';
6
+ export * from './no-sanitize.pipe';
7
+ export * from './tipo-valor-funcion.pipe';
8
+ export * from './zero-fill.pipe';
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export type TipoValorFuncion<T> = T | ((...param: any) => T);
4
+ export declare class TipoValorFuncionPipe implements PipeTransform {
5
+ transform<T>(datoParam: TipoValorFuncion<T>, defaultValue?: T, ...param: any[]): T | undefined;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TipoValorFuncionPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<TipoValorFuncionPipe, "tipoValorFuncion", true>;
8
+ }
9
+ export declare function tipoValorFuncion<T>(datoParam: TipoValorFuncion<T>, defaultValue?: T, ...param: any[]): T | undefined;
@@ -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,4 @@
1
+ export * from './classes/data-model';
2
+ export * from './functions';
3
+ export * from './pipes';
4
+ export * from './interfaces';
@@ -0,0 +1,2 @@
1
+ export declare function b64Encode(val: string): string;
2
+ export declare function b64Decode(val: string): string;
@@ -0,0 +1 @@
1
+ export declare function getBrowserName(): "edge" | "opera" | "chrome" | "ie" | "firefox" | "safari" | "other";
@@ -0,0 +1,2 @@
1
+ export declare function encriptar(text: string): string;
2
+ export declare function desencriptar(ciphertext: string): string;
@@ -0,0 +1,3 @@
1
+ export declare function formatearFechaFormato(val: string, format?: string): string;
2
+ export declare function formatearFecha(val: string, hora?: string): string | Date;
3
+ export declare function formatearFechaCadena(fecha: string): Date;
@@ -0,0 +1,2 @@
1
+ export declare function maskEmail(email: string): string;
2
+ export declare function isEmail(email: string): boolean;
@@ -0,0 +1,10 @@
1
+ export declare function obtenerMimeType(nombreArchivo: string): string | null;
2
+ export declare function sanitizarNombreArchivo(nombre: string, reemplazo?: string): string;
3
+ export declare function getDataArchivoFromPath(value: string, conTimeStamp?: boolean): {
4
+ nombre: string;
5
+ extension?: string;
6
+ d?: any;
7
+ fechaSubida: any;
8
+ };
9
+ export declare function convertirBytes(valor: number, unidadSalida?: string | null, incluirUnidad?: boolean): string | number | null;
10
+ export declare function downLoadFileStream(data: any, type: string, nombreArchivo?: string): void;
@@ -0,0 +1,23 @@
1
+ import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ export declare function establecerQuitarRequired(formulario: FormGroup, establecer?: any[], quitar?: any[], camposDisabled?: string[] | 'todos'): void;
4
+ export declare function getFormValidationErrors(form: FormGroup): {
5
+ control: string;
6
+ error: string;
7
+ value: any;
8
+ }[];
9
+ export declare function mensajesErrorFormControl(control: AbstractControl | null): string;
10
+ export declare function toFormData<T extends Record<string, any>>(formValue: T): FormData;
11
+ export declare function markAsTouchedWithoutEmitEvent(control: AbstractControl): void;
12
+ export interface SetControlDesdeListaConfig<T, V = any> {
13
+ lista$: BehaviorSubject<T[]>;
14
+ formControl?: FormControl<V>;
15
+ formGroup?: FormGroup;
16
+ controlName?: string;
17
+ idProp?: keyof T;
18
+ idValor?: any;
19
+ selector?: (item: T) => V;
20
+ usarPrimeraOpcion?: boolean;
21
+ }
22
+ export declare function setControlDesdeLista<T, V = any>(config: SetControlDesdeListaConfig<T, V>): void;
23
+ export declare function transformarFechasPorNombreDeCampo<T extends Record<string, any>>(formValue: T): T;
@@ -0,0 +1,2 @@
1
+ import { HttpErrorResponse } from '@angular/common/http';
2
+ export declare function mensajesDeError(error: HttpErrorResponse, toast?: boolean): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@jvsoft/utils/src/functions" />
5
+ export * from './public-api';
@@ -0,0 +1,29 @@
1
+ export interface JwtTokenResponse {
2
+ access_token: string;
3
+ expires_in: number;
4
+ token_type: string;
5
+ user: any;
6
+ }
7
+ export interface DataSessionStorage {
8
+ tokenStringKey?: string;
9
+ changePasswordKey?: string;
10
+ logoUrl?: string;
11
+ logoLogin?: string;
12
+ backgroundLogin?: string;
13
+ favicon?: string;
14
+ darkMode?: string;
15
+ serverTimestamp?: string;
16
+ apiDataKey?: string;
17
+ }
18
+ export declare let localStorageKeys: DataSessionStorage;
19
+ export declare function inicializarVariablesSessionStorage(datSesion: DataSessionStorage): void;
20
+ export declare function setJwtTokenData(data: string): void;
21
+ export declare function jwtTokenData(key?: string): JwtTokenResponse | null;
22
+ export declare function jwtToken(key?: string): string;
23
+ export declare function jwtTokenExpiracion(key?: string): number | null;
24
+ export declare function jwtTokenExpiracionFaltante(): number;
25
+ export declare function setCambiarPwd(accion?: boolean): void;
26
+ export declare function getCambiarPwd(): boolean | null;
27
+ export declare function delLocalStorage(keyElim?: string[]): void;
28
+ export declare function getLocalStorage(key: string | undefined): string | null;
29
+ export declare function setLocalStorage(key: string, value?: string): void;
@@ -0,0 +1,21 @@
1
+ import { AbstractControl } from '@angular/forms';
2
+ export declare function mostrarValorEnBusqueda(campos: any, idxSel: any): string;
3
+ export declare function changeSelectData(objThis: any, dataFiltro: {
4
+ formControl: AbstractControl;
5
+ data: any[];
6
+ campoBuscar: string | string[];
7
+ variableResultado: string;
8
+ }): void;
9
+ export declare function changeSelect(control: any, formControl: AbstractControl, tipo: any, campoBuscar: any, campoFiltro?: null): void;
10
+ export declare function changeSelectDataApi(objThis: any, dataFiltro: {
11
+ tipoReq: string;
12
+ campoId?: string;
13
+ minLength?: number;
14
+ dataExtra?: any;
15
+ dataExtraVariable?: any;
16
+ anonimo?: boolean;
17
+ queryService: any;
18
+ formControl: AbstractControl;
19
+ variableResultado?: string;
20
+ }): void;
21
+ export declare function changeSelectApi(control: any, queryService: any, formControl: AbstractControl, tipo: any, dataExtra?: {}, dataExtraVariable?: any[] | null, minLength?: number, anonimo?: boolean): void;
@@ -0,0 +1,2 @@
1
+ export * from './autocomplete';
2
+ export declare function seleccionarTextoInput(event: any): void;
@@ -0,0 +1,2 @@
1
+ export declare function roundToDecimal(number: number, decimal: number): number;
2
+ export declare function numberToWords(num: number): string;
@@ -0,0 +1,2 @@
1
+ export declare function objectPropertiesToType(formFields: Record<string, any>): Record<string, any>;
2
+ export declare function objectPropertiesBoolean(formFields: Record<string, any>, retorno?: 'boolean' | 'bit'): Record<string, any>;
@@ -0,0 +1,47 @@
1
+ export declare function deepMerge(source: any, target: any): any;
2
+ export declare function deepClone(obj: any): any;
3
+ /**
4
+ * Busca un elemento en un array o jerarquía de objetos según un campo y valor especificado.
5
+ *
6
+ * @returns El elemento encontrado o undefined si no existe.
7
+ */
8
+ export declare function buscarPorCampo<T>(datosFn: {
9
+ items: T[];
10
+ campo: keyof T;
11
+ valor: any;
12
+ campoHijo?: string;
13
+ }): T | undefined;
14
+ export declare function sumarPropiedades(item: Record<string, any>, campos: string[]): number;
15
+ export declare function esNumero(value: any): boolean;
16
+ export declare function sumarObjetos(arrayObjetos: any[], campos: string[]): Record<string, number>;
17
+ export declare function getUniqueValues(array: any[]): any[];
18
+ export declare function getUniqueValuesByProperty<T>(objetos: T[], campo: string): T[];
19
+ export declare function ordenarArray(array: any[], numeros?: boolean, sentido?: 'ASC' | 'DESC'): any[];
20
+ export declare function ordenarPorPropiedad(objData: any, propiedad: string, /**@deprecated*/ numeros?: boolean): {
21
+ [x: string]: {};
22
+ }[];
23
+ export declare function ordenarPorPropiedades<T>(arr: T[], options: {
24
+ propiedades: (keyof T)[];
25
+ direcciones?: ('asc' | 'desc' | '')[];
26
+ }): T[];
27
+ export declare function groupBy<T extends Record<string, any>, K extends keyof T>(array: T[], key: K | ((obj: T) => string)): Record<string, T[]>;
28
+ export declare function nestGroupsBy(arr: any, properties: any): any;
29
+ /**
30
+ * Retorna el valor máximo del campo especificado (incluso anidado) en un arreglo de objetos.
31
+ *
32
+ * @param data - Lista de objetos a procesar.
33
+ * @param campo - Nombre del campo a evaluar, puede ser anidado (ej. "campo.orden").
34
+ * @param incrementar - Si es true, retorna el valor máximo + 1. Por defecto es true.
35
+ * @returns El valor máximo encontrado, posiblemente incrementado.
36
+ */
37
+ export declare function obtenerUltimoOrden(data: any[], campo: string, incrementar?: boolean): number;
38
+ /**
39
+ * Elimina una o varias columnas específicas (por índice) de una tabla representada como array de arrays.
40
+ *
41
+ * @param data - Array de filas (cada fila debe ser un array).
42
+ * @param columnIndex - Índice o lista de índices de las columnas a eliminar.
43
+ * @returns Nuevo array con las columnas eliminadas.
44
+ */
45
+ export declare function eliminarColumnaPorIndex<T extends unknown[][]>(data: T, columnIndex: number | number[]): T;
46
+ export declare function eliminarDuplicados<T extends object>(array: T[], claves?: (keyof T)[]): T[];
47
+ export declare function eliminarElementos<T extends object>(origen: T[], elementosAEliminar: T[], claves?: (keyof T)[]): T[];
@@ -0,0 +1,16 @@
1
+ export * from './mat-form-controls';
2
+ export * from './base64';
3
+ export * from './browser';
4
+ export * from './crypto-js';
5
+ export * from './date';
6
+ export * from './email';
7
+ export * from './file';
8
+ export * from './forms';
9
+ export * from './http-client';
10
+ export * from './local-storage';
11
+ export * from './number';
12
+ export * from './object-transformation';
13
+ export * from './objects-arrays';
14
+ export * from './string';
15
+ export * from './sweetalert';
16
+ export * from './utiles';
@@ -0,0 +1,23 @@
1
+ export declare function generateRandomString(length: number): string;
2
+ /**
3
+ * Obtiene el host (hostname) de una URL o cadena host[:port].
4
+ * Opcionalmente puede devolver también el puerto si está presente.
5
+ *
6
+ * - Acepta inputs como:
7
+ * 'https://example.com/path', 'example.com:3000', 'localhost', 'http://[::1]:4200'
8
+ * - Usa la API URL cuando es posible (más robusta) y cae a un regex de respaldo.
9
+ *
10
+ * @param url Cadena que representa una URL o host
11
+ * @param options
12
+ * @param options.includePort Si es true, incluye":puerto" cuando exista (por defecto false)
13
+ * @param options.includeProtocol Incluye "http://" o "https://" según corresponda (por defecto false)
14
+ */
15
+ export declare function obtenerHostDesdeUrl(url: string | null | undefined, options?: {
16
+ includePort?: boolean;
17
+ includeProtocol?: boolean;
18
+ }): string | null;
19
+ /** @deprecated Alias compatible (deprecated) — preferir usar `obtenerHostDesdeUrl`. */
20
+ export declare const extraerDominio: (url: string | null | undefined, options?: {
21
+ includePort?: boolean;
22
+ includeProtocol?: boolean;
23
+ }) => string | null;
@@ -0,0 +1,5 @@
1
+ import { SweetAlertOptions, SweetAlertResult } from 'sweetalert2';
2
+ export declare function mensajeAlerta(tipo: 'success' | 'error' | 'info' | 'warning' | 'question', titulo: string, mensaje: string, opciones?: SweetAlertOptions): Promise<SweetAlertResult<any>>;
3
+ export declare function mensajeTimer(tipo: 'success' | 'error' | 'info' | 'warning' | 'question', titulo: string, mensaje: string, milisegundos?: number, showLoading?: boolean, opciones?: SweetAlertOptions): Promise<SweetAlertResult<any>>;
4
+ export declare function mensajeConfirmacion(tipo: 'success' | 'error' | 'info' | 'warning' | 'question', titulo: any, mensaje: any, opciones?: SweetAlertOptions): Promise<SweetAlertResult<Awaited<any>>>;
5
+ export declare function mensajeToast(tipo: 'success' | 'error' | 'info' | 'warning' | 'question', titulo: string, mensaje: string, opciones?: SweetAlertOptions): Promise<SweetAlertResult<any>>;
@@ -0,0 +1 @@
1
+ export declare function verificarRUC(ruc: string): boolean;
@@ -0,0 +1,4 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ export interface DataServidor {
3
+ [key: string]: BehaviorSubject<any>;
4
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@jvsoft/utils/src/interfaces" />
5
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ export * from './datos';
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DataEnListaPipe implements PipeTransform {
4
+ transform(coleccion: object[], idBuscar: string | string[], dato: any): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataEnListaPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<DataEnListaPipe, "dataEnLista", true>;
7
+ }
8
+ export declare function dataEnLista(coleccion: object[], idBuscar: string | string[], dato: any): any;
@@ -0,0 +1,17 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DateDiffStringPipe implements PipeTransform {
4
+ transform(startingDate: Date, endingDate: Date): any;
5
+ separarMilisegundos(milisegundos: any): {
6
+ years: number;
7
+ months: number;
8
+ weeks: number;
9
+ days: number;
10
+ hours: number;
11
+ minutes: number;
12
+ seconds: number;
13
+ };
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateDiffStringPipe, never>;
15
+ static ɵpipe: i0.ɵɵPipeDeclaration<DateDiffStringPipe, "dateDiffString", true>;
16
+ }
17
+ export declare function dateDiffString(startingDate: Date, endingDate: Date): any;
@@ -0,0 +1,18 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ interface OpcionesBusqueda {
4
+ texto: string;
5
+ longitudMinima?: number;
6
+ campo?: string | string[];
7
+ mostrarObligado?: MostrarObligado;
8
+ }
9
+ interface MostrarObligado {
10
+ campo: string;
11
+ items: any[];
12
+ }
13
+ export declare class FiltroPipe implements PipeTransform {
14
+ transform(items: any[], opcionesBusqueda: OpcionesBusqueda): any[];
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<FiltroPipe, never>;
16
+ static ɵpipe: i0.ɵɵPipeDeclaration<FiltroPipe, "filtro", true>;
17
+ }
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FormControlIsRequiredPipe implements PipeTransform {
5
+ transform(formControl: AbstractControl, ...args: unknown[]): any;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlIsRequiredPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormControlIsRequiredPipe, "formControlIsRequired", true>;
8
+ }
9
+ export declare function formControlIsRequired(formControl: AbstractControl): any;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@jvsoft/utils/src/pipes" />
5
+ export * from './public-api';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class JsonParsePipe implements PipeTransform {
4
+ transform(value: string, ...args: unknown[]): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonParsePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<JsonParsePipe, "jsonParse", true>;
7
+ }
@@ -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
+ export * from './data-en-lista.pipe';
2
+ export * from './date-diff-string.pipe';
3
+ export * from './filtro.pipe';
4
+ export * from './form-control-is-required.pipe';
5
+ export * from './json-parse.pipe';
6
+ export * from './no-sanitize.pipe';
7
+ export * from './tipo-valor-funcion.pipe';
8
+ export * from './zero-fill.pipe';
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export type TipoValorFuncion<T> = T | ((...param: any) => T);
4
+ export declare class TipoValorFuncionPipe implements PipeTransform {
5
+ transform<T>(datoParam: TipoValorFuncion<T>, defaultValue?: T, ...param: any[]): T | undefined;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TipoValorFuncionPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<TipoValorFuncionPipe, "tipoValorFuncion", true>;
8
+ }
9
+ export declare function tipoValorFuncion<T>(datoParam: TipoValorFuncion<T>, defaultValue?: T, ...param: any[]): T | undefined;
@@ -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;
package/CHANGELOG.md DELETED
@@ -1,13 +0,0 @@
1
- # @jvsoft/utils
2
-
3
- ## 0.0.13-alpha.1
4
-
5
- ### Patch Changes
6
-
7
- - Fix Error
8
-
9
- ## 0.0.10-alpha.0
10
-
11
- ### Patch Changes
12
-
13
- - FIX ERROR
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/utils",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }