matcha-components 20.115.0 → 20.116.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.
|
@@ -5117,13 +5117,13 @@ class MatchaMaskApplierService {
|
|
|
5117
5117
|
}
|
|
5118
5118
|
// Modo moeda: dígitos entram pela direita (ex: 1 → 0,01, 12 → 0,12, 123 → 1,23)
|
|
5119
5119
|
// IMPORTANTE: Detectar se devemos aplicar currencyMode
|
|
5120
|
-
// -
|
|
5121
|
-
// -
|
|
5122
|
-
// - Se tem vírgula e parte decimal com precisão correta E poucos dígitos totais: NÃO aplicar (veio do backend)
|
|
5120
|
+
// - NÃO aplicar se estamos em writeValue (valor vindo do backend/programático)
|
|
5121
|
+
// - Aplicar apenas durante digitação do usuário (onInput)
|
|
5123
5122
|
const actualDecimalMarker = typeof decimalMarker === 'string' ? decimalMarker : ',';
|
|
5124
5123
|
const hasDecimalMarker = processedValue.includes(actualDecimalMarker);
|
|
5125
5124
|
let shouldApplyCurrencyMode = false;
|
|
5126
|
-
|
|
5125
|
+
// NUNCA aplicar currencyMode quando writingValue = true (writeValue do backend)
|
|
5126
|
+
if (this.currencyMode && precision > 0 && !this.writingValue) {
|
|
5127
5127
|
if (!hasDecimalMarker) {
|
|
5128
5128
|
// Sem vírgula: aplicar currencyMode (digitação começando)
|
|
5129
5129
|
shouldApplyCurrencyMode = true;
|
|
@@ -5728,7 +5728,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5728
5728
|
type: Injectable
|
|
5729
5729
|
}] });
|
|
5730
5730
|
|
|
5731
|
-
// console.log('🎯 MATCHA-MASK VERSION:
|
|
5731
|
+
// console.log('🎯 MATCHA-MASK VERSION: v106 - CURRENCYMODE FIX BACKEND VALUES - ' + new Date().toISOString());
|
|
5732
5732
|
class MatchaMaskService extends MatchaMaskApplierService {
|
|
5733
5733
|
constructor() {
|
|
5734
5734
|
super(...arguments);
|