@wavemaker/angular-codegen 11.2.2-next.23479 → 11.2.2-next.23481
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.
|
@@ -69521,17 +69521,17 @@ ToDatePipe.ctorParameters = () => [
|
|
|
69521
69521
|
{ type: AbstractI18nService }
|
|
69522
69522
|
];
|
|
69523
69523
|
class ToNumberPipe {
|
|
69524
|
-
constructor(decimalPipe,
|
|
69524
|
+
constructor(decimalPipe, i18nService) {
|
|
69525
69525
|
this.decimalPipe = decimalPipe;
|
|
69526
|
-
this.
|
|
69526
|
+
this.i18nService = i18nService;
|
|
69527
69527
|
}
|
|
69528
69528
|
transform(data, fracSize) {
|
|
69529
69529
|
if (fracSize && !String(fracSize).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)) {
|
|
69530
69530
|
fracSize = '1.' + fracSize + '-' + fracSize;
|
|
69531
69531
|
}
|
|
69532
69532
|
if (!_.isNaN(+data)) {
|
|
69533
|
-
const locale = this.
|
|
69534
|
-
const formattedLocale = locale ? locale['number'] :
|
|
69533
|
+
const locale = this.i18nService && this.i18nService.getwidgetLocale() ? this.i18nService.getwidgetLocale() : undefined;
|
|
69534
|
+
const formattedLocale = locale ? locale['number'] : null;
|
|
69535
69535
|
return this.decimalPipe.transform(data, fracSize, formattedLocale);
|
|
69536
69536
|
}
|
|
69537
69537
|
}
|
|
@@ -69546,13 +69546,13 @@ ToNumberPipe.ctorParameters = () => [
|
|
|
69546
69546
|
{ type: AbstractI18nService, decorators: [{ type: Inject$1, args: [AbstractI18nService,] }] }
|
|
69547
69547
|
];
|
|
69548
69548
|
class ToCurrencyPipe {
|
|
69549
|
-
constructor(decimalPipe,
|
|
69549
|
+
constructor(decimalPipe, i18nService) {
|
|
69550
69550
|
this.decimalPipe = decimalPipe;
|
|
69551
|
-
this.
|
|
69551
|
+
this.i18nService = i18nService;
|
|
69552
69552
|
}
|
|
69553
69553
|
transform(data, currencySymbol, fracSize) {
|
|
69554
69554
|
const _currencySymbol = (CURRENCY_INFO[currencySymbol] || {}).symbol || currencySymbol || '';
|
|
69555
|
-
let _val = new ToNumberPipe(this.decimalPipe, this.
|
|
69555
|
+
let _val = new ToNumberPipe(this.decimalPipe, this.i18nService).transform(data, fracSize);
|
|
69556
69556
|
const isNegativeNumber = _.startsWith(_val, '-');
|
|
69557
69557
|
if (isNegativeNumber) {
|
|
69558
69558
|
_val = _val.replace('-', '');
|