matcha-components 20.100.0 → 20.102.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,9 +5940,16 @@ class MatchaMaskService extends MatchaMaskApplierService {
5940
5940
  (newInputValue !== this.currentValue && this.writingValue) ||
5941
5941
  (this.previousValue === this.currentValue && justPasted);
5942
5942
  }
5943
+ console.log('=== applyMask EMIT CHECK ===');
5944
+ console.log('result:', result);
5945
+ console.log('previousValue:', this.previousValue);
5946
+ console.log('currentValue:', this.currentValue);
5947
+ console.log('_emitValue:', this._emitValue);
5948
+ console.log('maskExpression:', this.maskExpression);
5949
+ console.log('dropSpecialCharacters:', this.dropSpecialCharacters);
5943
5950
  // Propagate the input value back to the Angular model
5944
5951
  // eslint-disable-next-line no-unused-expressions,@typescript-eslint/no-unused-expressions
5945
- this._emitValue ? this.formControlResult(result) : '';
5952
+ this._emitValue ? this.formControlResult(result) : console.log('formControlResult NOT called because _emitValue is false');
5946
5953
  // Handle hidden input and showMaskTyped
5947
5954
  if (!this.showMaskTyped || (this.showMaskTyped && this.hiddenInput)) {
5948
5955
  if (this.hiddenInput) {
@@ -6217,31 +6224,47 @@ class MatchaMaskService extends MatchaMaskApplierService {
6217
6224
  this.maskChanged = false;
6218
6225
  // Para máscaras de separador (currency), fazer conversão direta para número
6219
6226
  if (this.maskExpression.startsWith("separator" /* MaskExpression.SEPARATOR */) && this.dropSpecialCharacters) {
6227
+ console.log('=== formControlResult CURRENCY DEBUG ===');
6228
+ console.log('maskExpression:', this.maskExpression);
6229
+ console.log('dropSpecialCharacters:', this.dropSpecialCharacters);
6230
+ console.log('inputValue:', inputValue);
6231
+ console.log('prefix:', this.prefix);
6232
+ console.log('thousandSeparator:', this.thousandSeparator);
6233
+ console.log('decimalMarker:', this.decimalMarker);
6220
6234
  // Remover prefixo e sufixo
6221
6235
  let cleanValue = inputValue;
6222
6236
  if (this.prefix) {
6223
6237
  cleanValue = cleanValue.replace(this.prefix, '');
6238
+ console.log('after removePrefix:', cleanValue);
6224
6239
  }
6225
6240
  if (this.suffix) {
6226
6241
  cleanValue = cleanValue.replace(this.suffix, '');
6242
+ console.log('after removeSuffix:', cleanValue);
6227
6243
  }
6228
6244
  // Remover separador de milhares
6229
6245
  if (this.thousandSeparator) {
6230
6246
  cleanValue = cleanValue.split(this.thousandSeparator).join('');
6247
+ console.log('after removeThousand:', cleanValue);
6231
6248
  }
6232
6249
  // Converter decimal marker para ponto
6233
6250
  const markers = Array.isArray(this.decimalMarker)
6234
6251
  ? this.decimalMarker
6235
6252
  : [this.decimalMarker];
6253
+ console.log('markers to replace:', markers);
6236
6254
  for (const marker of markers) {
6237
6255
  if (marker && marker !== '.') {
6238
6256
  cleanValue = cleanValue.replace(marker, '.');
6257
+ console.log('after replaceMarker ' + marker + ':', cleanValue);
6239
6258
  }
6240
6259
  }
6241
6260
  // Converter para número
6242
6261
  const numValue = parseFloat(cleanValue);
6243
6262
  const finalValue = isNaN(numValue) ? 0 : numValue;
6263
+ console.log('numValue:', numValue, 'type:', typeof numValue);
6264
+ console.log('finalValue:', finalValue, 'type:', typeof finalValue);
6265
+ console.log('onChange exists:', typeof this.onChange);
6244
6266
  this.onChange(outputTransformFn(finalValue));
6267
+ console.log('onChange called with:', finalValue);
6245
6268
  return;
6246
6269
  }
6247
6270
  // Para máscaras de separador, garantir que isNumberValue é true