matcha-components 20.91.0 → 20.94.0
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.
|
@@ -5149,7 +5149,14 @@ class MatchaMaskApplierService {
|
|
|
5149
5149
|
}
|
|
5150
5150
|
// Mover o cursor para o final
|
|
5151
5151
|
cb(result.length, result.length);
|
|
5152
|
-
|
|
5152
|
+
// Pular toda a lógica de formatação normal e ir direto para o retorno
|
|
5153
|
+
// O result já está formatado corretamente para exibição
|
|
5154
|
+
// O formControlResult (no service) vai processar e remover prefixo/sufixo
|
|
5155
|
+
let res = `${this.prefix}${result}${this.suffix}`;
|
|
5156
|
+
if (result.length === 0) {
|
|
5157
|
+
res = this.instantPrefix ? `${this.prefix}${result}` : `${result}`;
|
|
5158
|
+
}
|
|
5159
|
+
return res;
|
|
5153
5160
|
}
|
|
5154
5161
|
if (backspaced) {
|
|
5155
5162
|
const { decimalMarkerIndex, nonZeroIndex } = this._findFirstNonZeroAndDecimalIndex(processedValue, decimalMarker);
|
|
@@ -5913,12 +5920,17 @@ class MatchaMaskService extends MatchaMaskApplierService {
|
|
|
5913
5920
|
this.decimalMarker === "." /* MaskExpression.DOT */) {
|
|
5914
5921
|
this.decimalMarker = "," /* MaskExpression.COMMA */;
|
|
5915
5922
|
}
|
|
5916
|
-
// b) remove decimal marker from list of special characters to mask
|
|
5923
|
+
// b) remove ONLY decimal marker from list of special characters to mask
|
|
5924
|
+
// The thousandSeparator should REMAIN in the list to be removed from the final value
|
|
5917
5925
|
if (this.maskExpression.startsWith("separator" /* MaskExpression.SEPARATOR */) &&
|
|
5918
5926
|
this.dropSpecialCharacters === true) {
|
|
5919
|
-
this.specialCharacters = this.specialCharacters.filter((item) => !this._compareOrIncludes(item, this.decimalMarker,
|
|
5927
|
+
this.specialCharacters = this.specialCharacters.filter((item) => !this._compareOrIncludes(item, this.decimalMarker, null) // Only remove decimalMarker, keep thousandSeparator
|
|
5920
5928
|
);
|
|
5921
5929
|
}
|
|
5930
|
+
// c) set isNumberValue to true for separator masks to ensure proper number conversion
|
|
5931
|
+
if (this.maskExpression.startsWith("separator" /* MaskExpression.SEPARATOR */)) {
|
|
5932
|
+
this.isNumberValue = true;
|
|
5933
|
+
}
|
|
5922
5934
|
// Update previous and current values
|
|
5923
5935
|
if (result || result === '') {
|
|
5924
5936
|
this.previousValue = this.currentValue;
|