ngx-dsxlibrary 1.21.38 → 1.21.40
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.
- package/fesm2022/ngx-dsxlibrary-src-lib-utils.mjs +51 -0
- package/fesm2022/ngx-dsxlibrary-src-lib-utils.mjs.map +1 -0
- package/fesm2022/ngx-dsxlibrary.mjs +50 -11
- package/fesm2022/ngx-dsxlibrary.mjs.map +1 -1
- package/ngx-dsxlibrary-1.21.40.tgz +0 -0
- package/package.json +5 -1
- package/types/ngx-dsxlibrary-src-lib-utils.d.ts +34 -0
- package/types/ngx-dsxlibrary.d.ts +40 -4
- package/ngx-dsxlibrary-1.21.38.tgz +0 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-dsxlibrary",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.40",
|
|
4
4
|
"description": "Libreria para control de código automatizado.",
|
|
5
5
|
"author": "DevSoftXela",
|
|
6
6
|
"dependencies": {
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"types": "./types/ngx-dsxlibrary-src-lib-services.d.ts",
|
|
50
50
|
"default": "./fesm2022/ngx-dsxlibrary-src-lib-services.mjs"
|
|
51
51
|
},
|
|
52
|
+
"./src/lib/utils": {
|
|
53
|
+
"types": "./types/ngx-dsxlibrary-src-lib-utils.d.ts",
|
|
54
|
+
"default": "./fesm2022/ngx-dsxlibrary-src-lib-utils.mjs"
|
|
55
|
+
},
|
|
52
56
|
"./src/lib/validations": {
|
|
53
57
|
"types": "./types/ngx-dsxlibrary-src-lib-validations.d.ts",
|
|
54
58
|
"default": "./fesm2022/ngx-dsxlibrary-src-lib-validations.mjs"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formateador de moneda por defecto para Guatemala.
|
|
3
|
+
*
|
|
4
|
+
* Usa la configuración regional `es-GT` y el código de moneda `GTQ`.
|
|
5
|
+
* Siempre muestra 2 decimales.
|
|
6
|
+
*
|
|
7
|
+
* Ejemplo de uso:
|
|
8
|
+
* ```ts
|
|
9
|
+
* GTQFormatter.format(1234.5); // "Q 1,234.50"
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
declare const GTQFormatter: Intl.NumberFormat;
|
|
13
|
+
/**
|
|
14
|
+
* Crea un formateador de moneda personalizado.
|
|
15
|
+
*
|
|
16
|
+
* Permite definir la configuración regional (`locale`) y el código de moneda (`currency`)
|
|
17
|
+
* manteniendo 2 decimales fijos.
|
|
18
|
+
*
|
|
19
|
+
* Ejemplos de uso:
|
|
20
|
+
* ```ts
|
|
21
|
+
* const usdFormatter = createCurrencyFormatter('en-US', 'USD');
|
|
22
|
+
* usdFormatter.format(1000); // "$1,000.00"
|
|
23
|
+
*
|
|
24
|
+
* const mxnFormatter = createCurrencyFormatter('es-MX', 'MXN');
|
|
25
|
+
* mxnFormatter.format(1500.75); // "$1,500.75"
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param locale Código de configuración regional, por ejemplo: `es-GT`, `en-US`.
|
|
29
|
+
* @param currency Código de moneda ISO 4217, por ejemplo: `GTQ`, `USD`, `EUR`.
|
|
30
|
+
* @returns Instancia de `Intl.NumberFormat` configurada para moneda.
|
|
31
|
+
*/
|
|
32
|
+
declare function createCurrencyFormatter(locale: string, currency: string): Intl.NumberFormat;
|
|
33
|
+
|
|
34
|
+
export { GTQFormatter, createCurrencyFormatter };
|
|
@@ -1196,14 +1196,17 @@ declare class ParameterValuesService<T extends string = string> {
|
|
|
1196
1196
|
private validateParameters;
|
|
1197
1197
|
/**
|
|
1198
1198
|
* Obtiene un valor específico de un parámetro.
|
|
1199
|
+
* Si `index` es null (valor por defecto), devuelve todo el arreglo de valores.
|
|
1199
1200
|
* Devuelve `defaultValue` si no existe el parámetro o el índice es inválido.
|
|
1200
1201
|
* Valida que el parámetro exista antes de acceder a su valor.
|
|
1201
1202
|
* @param parameterName Nombre del parámetro
|
|
1202
|
-
* @param index Índice del valor dentro del array (default
|
|
1203
|
+
* @param index Índice del valor dentro del array. Si es null (default), devuelve todos los valores.
|
|
1203
1204
|
* @param defaultValue Valor por defecto si no existe (default: null)
|
|
1204
|
-
* @returns Valor del parámetro o defaultValue si no existe o el índice es inválido
|
|
1205
|
+
* @returns Valor del parámetro, todos los valores si index es null, o defaultValue si no existe o el índice es inválido
|
|
1205
1206
|
*/
|
|
1206
|
-
getValue<U = any>(parameterName: T
|
|
1207
|
+
getValue<U = any>(parameterName: T): U[];
|
|
1208
|
+
getValue<U = any>(parameterName: T, index: number, defaultValue?: U | null): U;
|
|
1209
|
+
getValue<U = any>(parameterName: T, index: null, defaultValue?: U[] | null): U[];
|
|
1207
1210
|
/**
|
|
1208
1211
|
* Compara un valor específico con un valor esperado, usando cache para optimizar llamadas repetidas.
|
|
1209
1212
|
* @param parameterName Nombre del parámetro
|
|
@@ -1612,6 +1615,39 @@ declare class UtilityAddService {
|
|
|
1612
1615
|
static ɵprov: i0.ɵɵInjectableDeclaration<UtilityAddService>;
|
|
1613
1616
|
}
|
|
1614
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* Formateador de moneda por defecto para Guatemala.
|
|
1620
|
+
*
|
|
1621
|
+
* Usa la configuración regional `es-GT` y el código de moneda `GTQ`.
|
|
1622
|
+
* Siempre muestra 2 decimales.
|
|
1623
|
+
*
|
|
1624
|
+
* Ejemplo de uso:
|
|
1625
|
+
* ```ts
|
|
1626
|
+
* GTQFormatter.format(1234.5); // "Q 1,234.50"
|
|
1627
|
+
* ```
|
|
1628
|
+
*/
|
|
1629
|
+
declare const GTQFormatter: Intl.NumberFormat;
|
|
1630
|
+
/**
|
|
1631
|
+
* Crea un formateador de moneda personalizado.
|
|
1632
|
+
*
|
|
1633
|
+
* Permite definir la configuración regional (`locale`) y el código de moneda (`currency`)
|
|
1634
|
+
* manteniendo 2 decimales fijos.
|
|
1635
|
+
*
|
|
1636
|
+
* Ejemplos de uso:
|
|
1637
|
+
* ```ts
|
|
1638
|
+
* const usdFormatter = createCurrencyFormatter('en-US', 'USD');
|
|
1639
|
+
* usdFormatter.format(1000); // "$1,000.00"
|
|
1640
|
+
*
|
|
1641
|
+
* const mxnFormatter = createCurrencyFormatter('es-MX', 'MXN');
|
|
1642
|
+
* mxnFormatter.format(1500.75); // "$1,500.75"
|
|
1643
|
+
* ```
|
|
1644
|
+
*
|
|
1645
|
+
* @param locale Código de configuración regional, por ejemplo: `es-GT`, `en-US`.
|
|
1646
|
+
* @param currency Código de moneda ISO 4217, por ejemplo: `GTQ`, `USD`, `EUR`.
|
|
1647
|
+
* @returns Instancia de `Intl.NumberFormat` configurada para moneda.
|
|
1648
|
+
*/
|
|
1649
|
+
declare function createCurrencyFormatter(locale: string, currency: string): Intl.NumberFormat;
|
|
1650
|
+
|
|
1615
1651
|
/**
|
|
1616
1652
|
* Valida que el control contenga un rango de fechas válido (dos fechas no nulas y válidas).
|
|
1617
1653
|
*/
|
|
@@ -1665,5 +1701,5 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
|
|
|
1665
1701
|
*/
|
|
1666
1702
|
declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
|
|
1667
1703
|
|
|
1668
|
-
export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, CssV2Component, DsxAddToolsModule, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, FileComponent, INITIAL_PARAMETERS, IconDsxComponent, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SWEET_ALERT_THEMES, SecurityService, SelectAllOnFocusDirective, SpinnerLoadingService, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, dateRangeValidatorFromTo, httpAuthorizeInterceptor, nitValidator, provideEnvironment, validateEnvironmentConfig };
|
|
1704
|
+
export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, CssV2Component, DsxAddToolsModule, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, FileComponent, GTQFormatter, INITIAL_PARAMETERS, IconDsxComponent, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SWEET_ALERT_THEMES, SecurityService, SelectAllOnFocusDirective, SpinnerLoadingService, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createCurrencyFormatter, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, dateRangeValidatorFromTo, httpAuthorizeInterceptor, nitValidator, provideEnvironment, validateEnvironmentConfig };
|
|
1669
1705
|
export type { Certificacion, Column, Complemento, Complementos, DatosEmision, DatosGenerales, Direccion, DocumentoFelResponse, Dte, Emisor, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig, FilterOption, Frase, Frases, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, MyParameterValues, NITResponse, NumeroAutorizacion, ParameterSecurity, ParameterValue, Receptor, ResponseHttpModel, Sat, SeguridadITParameter, ServiceResult, ServiceResultVoid, SweetAlertThemeType, T, TipoFechaConversion, TotalImpuesto, Totales, typeModel };
|
|
Binary file
|