ngx-dsxlibrary 1.21.37 → 1.21.39

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-dsxlibrary",
3
- "version": "1.21.37",
3
+ "version": "1.21.39",
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 };
@@ -183,17 +183,20 @@ declare class NavbarDsxComponent implements OnInit {
183
183
  * - Dígitos (0-9)
184
184
  * - Separadores punto (.)
185
185
  * - Rango con guión (-)
186
+ * - O bien un comodín completo "*" que representa "todos"
186
187
  *
187
188
  * Ejemplos válidos:
188
189
  * - 1.2.3
189
190
  * - 4-6
190
191
  * - 1.3.5-9
192
+ * - * (comodín: todos)
191
193
  *
192
194
  * Restringe:
193
195
  * - Letras
194
196
  * - Espacios
195
- * - Caracteres especiales
197
+ * - Caracteres especiales (salvo "*")
196
198
  * - Doble punto (..), doble guión (--), o combinaciones como (.-)
199
+ * - Mezclas de comodín con números (por ejemplo: *1, 1.*)
197
200
  */
198
201
  declare class OnlyRangoPatternDirective {
199
202
  private el;
@@ -1553,7 +1556,10 @@ declare class UtilityAddService {
1553
1556
  * Adaptador para procesar eventos de input y extraer rangos numéricos.
1554
1557
  *
1555
1558
  * @param event - Objeto Event del DOM, preferiblemente de un elemento input
1556
- * @returns Array de números generado a partir del valor del input
1559
+ * @returns
1560
+ * - Array de números generado a partir del valor del input, cuando hay
1561
+ * números/rangos.
1562
+ * - El carácter comodín "*" cuando el valor del input es exactamente "*".
1557
1563
  *
1558
1564
  * @example
1559
1565
  * // Uso en template Angular
@@ -1573,7 +1579,7 @@ declare class UtilityAddService {
1573
1579
  * Requiere que el evento tenga la propiedad target.value (standard DOM)
1574
1580
  * Para otros tipos de eventos (ej. Angular Material) puede necesitar ajustes
1575
1581
  */
1576
- processNumericRangesFromEvent(event: Event): number[];
1582
+ processNumericRangesFromEvent(event: Event): number[] | '*';
1577
1583
  /**
1578
1584
  * Maneja la respuesta estándar de una operación HTTP, mostrando alertas y realizando acciones comunes en formularios.
1579
1585
  *
@@ -1606,6 +1612,39 @@ declare class UtilityAddService {
1606
1612
  static ɵprov: i0.ɵɵInjectableDeclaration<UtilityAddService>;
1607
1613
  }
1608
1614
 
1615
+ /**
1616
+ * Formateador de moneda por defecto para Guatemala.
1617
+ *
1618
+ * Usa la configuración regional `es-GT` y el código de moneda `GTQ`.
1619
+ * Siempre muestra 2 decimales.
1620
+ *
1621
+ * Ejemplo de uso:
1622
+ * ```ts
1623
+ * GTQFormatter.format(1234.5); // "Q 1,234.50"
1624
+ * ```
1625
+ */
1626
+ declare const GTQFormatter: Intl.NumberFormat;
1627
+ /**
1628
+ * Crea un formateador de moneda personalizado.
1629
+ *
1630
+ * Permite definir la configuración regional (`locale`) y el código de moneda (`currency`)
1631
+ * manteniendo 2 decimales fijos.
1632
+ *
1633
+ * Ejemplos de uso:
1634
+ * ```ts
1635
+ * const usdFormatter = createCurrencyFormatter('en-US', 'USD');
1636
+ * usdFormatter.format(1000); // "$1,000.00"
1637
+ *
1638
+ * const mxnFormatter = createCurrencyFormatter('es-MX', 'MXN');
1639
+ * mxnFormatter.format(1500.75); // "$1,500.75"
1640
+ * ```
1641
+ *
1642
+ * @param locale Código de configuración regional, por ejemplo: `es-GT`, `en-US`.
1643
+ * @param currency Código de moneda ISO 4217, por ejemplo: `GTQ`, `USD`, `EUR`.
1644
+ * @returns Instancia de `Intl.NumberFormat` configurada para moneda.
1645
+ */
1646
+ declare function createCurrencyFormatter(locale: string, currency: string): Intl.NumberFormat;
1647
+
1609
1648
  /**
1610
1649
  * Valida que el control contenga un rango de fechas válido (dos fechas no nulas y válidas).
1611
1650
  */
@@ -1659,5 +1698,5 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
1659
1698
  */
1660
1699
  declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
1661
1700
 
1662
- 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 };
1701
+ 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 };
1663
1702
  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