@dsivd/prestations-ng 15.3.1-beta7 → 15.3.1-beta8

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.
@@ -6888,9 +6888,15 @@ class NumberCurrencyFormatterDirective {
6888
6888
  }
6889
6889
  setFormatting(value) {
6890
6890
  // Hooks on the inputs of the component to customize the behavior
6891
- const formattedValue = this.host.allowDecimal || this.host.allowFreeInput
6892
- ? formatDecimalCurrency(value, this.host.maxDecimalCount, this.host.maxlength, this.host.allowFreeInput)
6893
- : formatNonDecimalCurrency(value);
6891
+ let formattedValue = null;
6892
+ if (this.host.allowFreeInput && !this.host.allowDecimal) {
6893
+ formattedValue = formatNumberAsGiven(value);
6894
+ }
6895
+ else {
6896
+ formattedValue = this.host.allowDecimal
6897
+ ? formatDecimalCurrency(value, this.host.maxDecimalCount, this.host.maxlength, this.host.allowFreeInput)
6898
+ : formatNonDecimalCurrency(value);
6899
+ }
6894
6900
  const newValueWithoutFormatting = removeFormatting(formattedValue);
6895
6901
  if (this.hasValueChanged(newValueWithoutFormatting)) {
6896
6902
  // Since we have altered the model (i.e. by removing some decimals), we have to update it