@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.
- package/dsivd-prestations-ng-v15.3.1-beta8.tgz +0 -0
- package/esm2020/directives/currency-formatter.directive.mjs +10 -4
- package/fesm2015/dsivd-prestations-ng.mjs +9 -3
- package/fesm2015/dsivd-prestations-ng.mjs.map +1 -1
- package/fesm2020/dsivd-prestations-ng.mjs +9 -3
- package/fesm2020/dsivd-prestations-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/dsivd-prestations-ng-v15.3.1-beta7.tgz +0 -0
|
@@ -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
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
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
|