@jvsoft/utils 1.0.0-alpha.5 → 1.0.0-alpha.7

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 (56) hide show
  1. package/README.md +5 -0
  2. package/directives/autocomplete-match-validator.directive.d.ts +10 -0
  3. package/directives/autocomplete.directive.d.ts +23 -0
  4. package/{src/pipes → directives}/index.d.ts +1 -1
  5. package/directives/public-api.d.ts +2 -0
  6. package/fesm2022/jvsoft-utils-directives.mjs +150 -0
  7. package/fesm2022/jvsoft-utils-directives.mjs.map +1 -0
  8. package/fesm2022/jvsoft-utils.mjs +270 -41
  9. package/fesm2022/jvsoft-utils.mjs.map +1 -1
  10. package/package.json +8 -16
  11. package/public-api.d.ts +5 -4
  12. package/src/functions/mat-form-controls/autocomplete.d.ts +21 -2
  13. package/src/pipes/display-with.pipe.d.ts +14 -0
  14. package/src/pipes/public-api.d.ts +1 -0
  15. package/fesm2022/jvsoft-utils-src-functions.mjs +0 -1707
  16. package/fesm2022/jvsoft-utils-src-functions.mjs.map +0 -1
  17. package/fesm2022/jvsoft-utils-src-interfaces.mjs +0 -6
  18. package/fesm2022/jvsoft-utils-src-interfaces.mjs.map +0 -1
  19. package/fesm2022/jvsoft-utils-src-pipes.mjs +0 -290
  20. package/fesm2022/jvsoft-utils-src-pipes.mjs.map +0 -1
  21. package/functions/base64.d.ts +0 -89
  22. package/functions/browser.d.ts +0 -1
  23. package/functions/crypto-js.d.ts +0 -2
  24. package/functions/date.d.ts +0 -3
  25. package/functions/dev-log.d.ts +0 -97
  26. package/functions/email.d.ts +0 -2
  27. package/functions/file.d.ts +0 -10
  28. package/functions/forms.d.ts +0 -23
  29. package/functions/http-client.d.ts +0 -2
  30. package/functions/index.d.ts +0 -1
  31. package/functions/local-storage.d.ts +0 -29
  32. package/functions/mat-form-controls/autocomplete.d.ts +0 -48
  33. package/functions/mat-form-controls/index.d.ts +0 -2
  34. package/functions/number.d.ts +0 -2
  35. package/functions/object-transformation.d.ts +0 -2
  36. package/functions/objects-arrays.d.ts +0 -63
  37. package/functions/public-api.d.ts +0 -17
  38. package/functions/string.d.ts +0 -23
  39. package/functions/sweetalert.d.ts +0 -5
  40. package/functions/utiles.d.ts +0 -1
  41. package/interfaces/datos.d.ts +0 -4
  42. package/interfaces/index.d.ts +0 -1
  43. package/interfaces/public-api.d.ts +0 -1
  44. package/pipes/data-en-lista.pipe.d.ts +0 -8
  45. package/pipes/date-diff-string.pipe.d.ts +0 -17
  46. package/pipes/filtro.pipe.d.ts +0 -18
  47. package/pipes/form-control-is-required.pipe.d.ts +0 -9
  48. package/pipes/index.d.ts +0 -1
  49. package/pipes/json-parse.pipe.d.ts +0 -7
  50. package/pipes/no-sanitize.pipe.d.ts +0 -10
  51. package/pipes/public-api.d.ts +0 -8
  52. package/pipes/tipo-valor-funcion.pipe.d.ts +0 -9
  53. package/pipes/zero-fill.pipe.d.ts +0 -8
  54. package/src/functions/index.d.ts +0 -5
  55. package/src/interfaces/index.d.ts +0 -5
  56. /package/{classes → src/classes}/data-model.d.ts +0 -0
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@jvsoft/utils",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-alpha.7",
4
4
  "description": "JVSOFT Angular Utils",
5
5
  "publishConfig": {
6
6
  "tag": "alpha",
7
7
  "access": "public"
8
8
  },
9
9
  "peerDependencies": {
10
- "@angular/common": ">=16.0.0",
11
- "@angular/core": ">=16.0.0",
12
- "@angular/forms": ">=16.0.0",
13
- "@angular/material": ">=16.0.0",
10
+ "@angular/common": ">=17.1.0",
11
+ "@angular/core": ">=17.1.0",
12
+ "@angular/forms": ">=17.1.0",
13
+ "@angular/material": ">=17.1.0",
14
14
  "@rxweb/reactive-form-validators": ">=13.0.0",
15
15
  "crypto-js": "^4.2.0",
16
16
  "file-saver": "^2.0.5",
@@ -31,17 +31,9 @@
31
31
  "types": "./index.d.ts",
32
32
  "default": "./fesm2022/jvsoft-utils.mjs"
33
33
  },
34
- "./src/functions": {
35
- "types": "./src/functions/index.d.ts",
36
- "default": "./fesm2022/jvsoft-utils-src-functions.mjs"
37
- },
38
- "./src/interfaces": {
39
- "types": "./src/interfaces/index.d.ts",
40
- "default": "./fesm2022/jvsoft-utils-src-interfaces.mjs"
41
- },
42
- "./src/pipes": {
43
- "types": "./src/pipes/index.d.ts",
44
- "default": "./fesm2022/jvsoft-utils-src-pipes.mjs"
34
+ "./directives": {
35
+ "types": "./directives/index.d.ts",
36
+ "default": "./fesm2022/jvsoft-utils-directives.mjs"
45
37
  }
46
38
  },
47
39
  "dependencies": {
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export * from './classes/data-model';
2
- export * from './functions';
3
- export * from './pipes';
4
- export * from './interfaces';
1
+ export * from './src/classes/data-model';
2
+ export * from './src/functions/public-api';
3
+ export * from './src/pipes/public-api';
4
+ export * from './src/interfaces/public-api';
5
+ export * from './directives/public-api';
@@ -1,12 +1,23 @@
1
1
  import { AbstractControl } from '@angular/forms';
2
+ import { DestroyRef } from '@angular/core';
2
3
  export declare function mostrarValorEnBusqueda(campos: any, idxSel: any): string;
4
+ /**
5
+ * @deprecated Use JvsAutocompleteDirective en su lugar para un enfoque más declarativo y robusto.
6
+ */
3
7
  export declare function changeSelectData(objThis: any, dataFiltro: {
4
8
  formControl: AbstractControl;
5
9
  data: any[];
6
10
  campoBuscar: string | string[];
7
11
  variableResultado: string;
12
+ destroyRef?: DestroyRef;
8
13
  }): void;
9
- export declare function changeSelect(control: any, formControl: AbstractControl, tipo: any, campoBuscar: any, campoFiltro?: null): void;
14
+ /**
15
+ * @deprecated Use JvsAutocompleteDirective en su lugar para un enfoque más declarativo y robusto.
16
+ */
17
+ export declare function changeSelect(control: any, formControl: AbstractControl, tipo: any, campoBuscar: any, campoFiltro?: null, destroyRef?: DestroyRef): void;
18
+ /**
19
+ * @deprecated Use JvsAutocompleteDirective en su lugar para un enfoque más declarativo y robusto.
20
+ */
10
21
  export declare function changeSelectDataApi(objThis: any, dataFiltro: {
11
22
  tipoReq: string;
12
23
  campoId?: string;
@@ -17,8 +28,12 @@ export declare function changeSelectDataApi(objThis: any, dataFiltro: {
17
28
  queryService: any;
18
29
  formControl: AbstractControl;
19
30
  variableResultado?: string;
31
+ destroyRef?: DestroyRef;
20
32
  }): void;
21
- export declare function changeSelectApi(control: any, queryService: any, formControl: AbstractControl, tipo: any, dataExtra?: {}, dataExtraVariable?: any[] | null, minLength?: number, anonimo?: boolean): void;
33
+ /**
34
+ * @deprecated Use JvsAutocompleteDirective en su lugar para un enfoque más declarativo y robusto.
35
+ */
36
+ export declare function changeSelectApi(control: any, queryService: any, formControl: AbstractControl, tipo: any, dataExtra?: {}, dataExtraVariable?: any[] | null, minLength?: number, anonimo?: boolean, destroyRef?: DestroyRef): void;
22
37
  /**
23
38
  * Comprueba si un valor es una Promesa
24
39
  * @param valor - Valor a verificar
@@ -34,6 +49,9 @@ export declare function seleccionarTextoInput(event: any): void;
34
49
  * Función genérica para vincular un FormControl con datos desde API o Promise.
35
50
  * Preparada para migrar a signals en el futuro.
36
51
  */
52
+ /**
53
+ * @deprecated Use JvsAutocompleteDirective en su lugar para un enfoque más declarativo y robusto.
54
+ */
37
55
  export declare function changeSelectReformateado(config: {
38
56
  objThis: any;
39
57
  tipoReq: string;
@@ -45,4 +63,5 @@ export declare function changeSelectReformateado(config: {
45
63
  dataExtraVariable?: any[];
46
64
  anonimo?: boolean;
47
65
  variableResultado?: string;
66
+ destroyRef?: DestroyRef;
48
67
  }): void;
@@ -0,0 +1,14 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class JvsDisplayWithPipe implements PipeTransform {
4
+ /**
5
+ * Retorna una función compatible con [displayWith] de MatAutocomplete.
6
+ * @param lista La lista de objetos donde buscar.
7
+ * @param campoId El nombre del campo que coincide con el valor del control (ej: 'iCarreraId').
8
+ * @param campoValue El nombre del campo (o campos) a mostrar (ej: 'cCarreraNombre' o ['cCodigo', 'cNombre']).
9
+ * @param opcExtra Lista opcional de objetos extra donde buscar si no se encuentra en la lista principal.
10
+ */
11
+ transform(lista: any[] | null, campoId: string, campoValue: string | string[], opcExtra?: any[] | null): (value: any) => string;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<JvsDisplayWithPipe, never>;
13
+ static ɵpipe: i0.ɵɵPipeDeclaration<JvsDisplayWithPipe, "jvsDisplayWith", true>;
14
+ }
@@ -6,3 +6,4 @@ export * from './json-parse.pipe';
6
6
  export * from './no-sanitize.pipe';
7
7
  export * from './tipo-valor-funcion.pipe';
8
8
  export * from './zero-fill.pipe';
9
+ export * from './display-with.pipe';