monkey-front-core 0.0.495 → 0.0.496

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.
@@ -3,7 +3,7 @@ import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable, Inject
3
3
  import * as i1 from 'monkey-style-guide';
4
4
  import { MonkeyButtonModule, MonkeyModalModule, MonkeyIconModule, MonkeyInputModule, MonkeyRadioButtonModule, MonkeyOptionModule, MonkeyUtils, MonkeyStyleGuideModule, MonkeyStyleGuideModalService, MonkeyStyleGuideSettingsService, MonkeyStyleGuideSnackbarService } from 'monkey-style-guide';
5
5
  import * as i2 from '@angular/common';
6
- import { CommonModule, formatCurrency, formatNumber, CurrencyPipe, DatePipe, registerLocaleData } from '@angular/common';
6
+ import { CommonModule, formatNumber, CurrencyPipe, DatePipe, registerLocaleData } from '@angular/common';
7
7
  import * as i1$1 from '@ngx-translate/core';
8
8
  import { TranslateModule, TranslateService } from '@ngx-translate/core';
9
9
  import * as moment_ from 'moment';
@@ -750,12 +750,18 @@ class MonkeyEcxFormatCurrencyPipe {
750
750
  transform(value, symbol = 'symbol') {
751
751
  const currency = this.defaultCurencyCode.toString();
752
752
  const locale = this.lang.toString();
753
- console.log('coreee');
754
- console.log(locale);
755
- console.log(this.currencyPipe.transform(value, currency, symbol, '', locale));
756
- console.log('======');
757
- console.log(formatCurrency(value, locale, currency));
758
- return this.currencyPipe.transform(value, currency, symbol, '', locale);
753
+ try {
754
+ if (currency === 'CLP') {
755
+ let fmt = this.currencyPipe.transform(value, '$', symbol, '1.0-0', locale);
756
+ fmt = `${fmt}`.replace('$', '');
757
+ return `${fmt} ${currency}`;
758
+ }
759
+ return this.currencyPipe.transform(value, currency, symbol, '', locale);
760
+ }
761
+ catch (e) {
762
+ // not to do
763
+ }
764
+ return value;
759
765
  }
760
766
  }
761
767
  MonkeyEcxFormatCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatCurrencyPipe, deps: [{ token: i2.CurrencyPipe }, { token: DEFAULT_CURRENCY_CODE }, { token: MECX_LANG }], target: i0.ɵɵFactoryTarget.Pipe });