monkey-front-core 0.0.493 → 0.0.495

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.
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable, DEFAULT_CURRENCY_CODE, LOCALE_ID, Inject, InjectionToken, EventEmitter, Directive, Output, HostBinding, HostListener, forwardRef, Self, Optional, inject, SkipSelf, NgZone, ErrorHandler } from '@angular/core';
2
+ import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable, InjectionToken, DEFAULT_CURRENCY_CODE, Inject, EventEmitter, Directive, Output, HostBinding, HostListener, forwardRef, Self, Optional, inject, SkipSelf, NgZone, ErrorHandler } from '@angular/core';
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, formatNumber, CurrencyPipe, DatePipe, registerLocaleData } from '@angular/common';
6
+ import { CommonModule, formatCurrency, 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';
@@ -736,20 +736,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
736
736
  }]
737
737
  }], ctorParameters: function () { return []; } });
738
738
 
739
+ const MECX_TIMEZONEOFFSET = new InjectionToken('');
740
+ const MECX_DATE_FORMAT = new InjectionToken('');
741
+ const MECX_LANG = new InjectionToken('');
742
+
739
743
  class MonkeyEcxFormatCurrencyPipe {
740
- constructor(currencyPipe, defaultCurencyCode, localeId) {
744
+ constructor(currencyPipe, defaultCurencyCode, lang) {
741
745
  this.currencyPipe = currencyPipe;
742
746
  this.defaultCurencyCode = defaultCurencyCode;
743
- this.localeId = localeId;
747
+ this.lang = lang;
744
748
  // not to do
745
749
  }
746
750
  transform(value, symbol = 'symbol') {
747
751
  const currency = this.defaultCurencyCode.toString();
748
- const localeId = this.localeId.toString();
749
- return this.currencyPipe.transform(value, currency, symbol, '', localeId);
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);
750
759
  }
751
760
  }
752
- 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: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
761
+ 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 });
753
762
  MonkeyEcxFormatCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatCurrencyPipe, name: "monkeyecxFormatCurrency" });
754
763
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatCurrencyPipe, decorators: [{
755
764
  type: Pipe,
@@ -761,13 +770,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
761
770
  args: [DEFAULT_CURRENCY_CODE]
762
771
  }] }, { type: i0.InjectionToken, decorators: [{
763
772
  type: Inject,
764
- args: [LOCALE_ID]
773
+ args: [MECX_LANG]
765
774
  }] }]; } });
766
775
 
767
- const MECX_TIMEZONEOFFSET = new InjectionToken('');
768
- const MECX_DATE_FORMAT = new InjectionToken('');
769
- const MECX_LANG = new InjectionToken('');
770
-
771
776
  class MonkeyEcxFormatDatePipe {
772
777
  constructor(dt, dateFormat, timezone) {
773
778
  this.dt = dt;