@senior-agronegocio/angular-components 0.0.97 → 0.0.98
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/bundles/senior-agronegocio-angular-components.umd.js +5 -0
- package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
- package/common/agro-string-utils.class.d.ts +2 -0
- package/esm2015/common/agro-string-utils.class.js +6 -1
- package/esm5/common/agro-string-utils.class.js +6 -1
- package/fesm2015/senior-agronegocio-angular-components.js +5 -0
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +5 -0
- package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -2484,9 +2484,14 @@
|
|
|
2484
2484
|
* Aplica uma máscara simples à string fornecida.O padrão de máscaras é definido pelo enum AgroStringMasks ou
|
|
2485
2485
|
* pode ser uma string personalizada onde '9' representa um dígito a ser substituído pelo caractere correspondente
|
|
2486
2486
|
* da string.
|
|
2487
|
+
*
|
|
2488
|
+
* Se o valor informado tiver tamanho diferente da máscara, o valor original será retornado.
|
|
2487
2489
|
*/
|
|
2488
2490
|
AgroStringUtils.applyMask = function (value, mask) {
|
|
2489
2491
|
var e_1, _a;
|
|
2492
|
+
if (!(value.length) || value.length !== mask.length) {
|
|
2493
|
+
return value;
|
|
2494
|
+
}
|
|
2490
2495
|
var valueChars = value.toString().split("");
|
|
2491
2496
|
var maskChars = mask.split("");
|
|
2492
2497
|
var maskedValue = "";
|