matcha-components 20.96.0 → 20.97.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.
|
@@ -5940,6 +5940,12 @@ class MatchaMaskService extends MatchaMaskApplierService {
|
|
|
5940
5940
|
(newInputValue !== this.currentValue && this.writingValue) ||
|
|
5941
5941
|
(this.previousValue === this.currentValue && justPasted);
|
|
5942
5942
|
}
|
|
5943
|
+
// DEBUG: Verificar se formControlResult está sendo chamado
|
|
5944
|
+
console.log('=== applyMask DEBUG ===');
|
|
5945
|
+
console.log('result:', result);
|
|
5946
|
+
console.log('_emitValue:', this._emitValue);
|
|
5947
|
+
console.log('previousValue:', this.previousValue);
|
|
5948
|
+
console.log('currentValue:', this.currentValue);
|
|
5943
5949
|
// Propagate the input value back to the Angular model
|
|
5944
5950
|
// eslint-disable-next-line no-unused-expressions,@typescript-eslint/no-unused-expressions
|
|
5945
5951
|
this._emitValue ? this.formControlResult(result) : '';
|
|
@@ -6220,15 +6226,35 @@ class MatchaMaskService extends MatchaMaskApplierService {
|
|
|
6220
6226
|
if (this.maskExpression.startsWith("separator" /* MaskExpression.SEPARATOR */)) {
|
|
6221
6227
|
this.isNumberValue = true;
|
|
6222
6228
|
}
|
|
6229
|
+
console.log('=== formControlResult DEBUG ===');
|
|
6230
|
+
console.log('inputValue:', inputValue);
|
|
6231
|
+
console.log('isNumberValue:', this.isNumberValue);
|
|
6232
|
+
console.log('dropSpecialCharacters:', this.dropSpecialCharacters);
|
|
6223
6233
|
if (Array.isArray(this.dropSpecialCharacters)) {
|
|
6224
|
-
this.
|
|
6234
|
+
const afterPrefix = this._removePrefix(inputValue);
|
|
6235
|
+
const afterSuffix = this._removeSuffix(afterPrefix);
|
|
6236
|
+
const afterMask = this._removeMask(afterSuffix, this.dropSpecialCharacters);
|
|
6237
|
+
const afterSymbols = this._checkSymbols(afterMask);
|
|
6238
|
+
const afterNumber = this._toNumber(afterSymbols);
|
|
6239
|
+
const finalValue = outputTransformFn(afterNumber);
|
|
6240
|
+
console.log('Array: afterPrefix:', afterPrefix, 'afterSuffix:', afterSuffix, 'afterMask:', afterMask, 'afterSymbols:', afterSymbols, 'afterNumber:', afterNumber, 'final:', finalValue, 'type:', typeof finalValue);
|
|
6241
|
+
this.onChange(finalValue);
|
|
6225
6242
|
}
|
|
6226
6243
|
else if (this.dropSpecialCharacters ||
|
|
6227
6244
|
(!this.dropSpecialCharacters && this.prefix === inputValue)) {
|
|
6228
|
-
this.
|
|
6245
|
+
const afterPrefix = this._removePrefix(inputValue);
|
|
6246
|
+
const afterSuffix = this._removeSuffix(afterPrefix);
|
|
6247
|
+
const afterSymbols = this._checkSymbols(afterSuffix);
|
|
6248
|
+
const afterNumber = this._toNumber(afterSymbols);
|
|
6249
|
+
const finalValue = outputTransformFn(afterNumber);
|
|
6250
|
+
console.log('Boolean: afterPrefix:', afterPrefix, 'afterSuffix:', afterSuffix, 'afterSymbols:', afterSymbols, 'afterNumber:', afterNumber, 'final:', finalValue, 'type:', typeof finalValue);
|
|
6251
|
+
this.onChange(finalValue);
|
|
6229
6252
|
}
|
|
6230
6253
|
else {
|
|
6231
|
-
this.
|
|
6254
|
+
const afterNumber = this._toNumber(inputValue);
|
|
6255
|
+
const finalValue = outputTransformFn(afterNumber);
|
|
6256
|
+
console.log('Else: afterNumber:', afterNumber, 'final:', finalValue);
|
|
6257
|
+
this.onChange(finalValue);
|
|
6232
6258
|
}
|
|
6233
6259
|
}
|
|
6234
6260
|
_toNumber(value) {
|