monkey-front-core 0.0.493 → 0.0.494
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/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +11 -8
- package/fesm2015/monkey-front-core.mjs +13 -11
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +13 -11
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +2 -2
- package/monkey-front-core-0.0.494.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.493.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable,
|
|
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';
|
|
@@ -736,20 +736,26 @@ 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,
|
|
744
|
+
constructor(currencyPipe, defaultCurencyCode, lang) {
|
|
741
745
|
this.currencyPipe = currencyPipe;
|
|
742
746
|
this.defaultCurencyCode = defaultCurencyCode;
|
|
743
|
-
this.
|
|
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
|
|
749
|
-
|
|
752
|
+
const locale = this.lang.toString();
|
|
753
|
+
console.log('coreee');
|
|
754
|
+
console.log(locale);
|
|
755
|
+
return this.currencyPipe.transform(value, currency, symbol, '', locale);
|
|
750
756
|
}
|
|
751
757
|
}
|
|
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:
|
|
758
|
+
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
759
|
MonkeyEcxFormatCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatCurrencyPipe, name: "monkeyecxFormatCurrency" });
|
|
754
760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatCurrencyPipe, decorators: [{
|
|
755
761
|
type: Pipe,
|
|
@@ -761,13 +767,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
761
767
|
args: [DEFAULT_CURRENCY_CODE]
|
|
762
768
|
}] }, { type: i0.InjectionToken, decorators: [{
|
|
763
769
|
type: Inject,
|
|
764
|
-
args: [
|
|
770
|
+
args: [MECX_LANG]
|
|
765
771
|
}] }]; } });
|
|
766
772
|
|
|
767
|
-
const MECX_TIMEZONEOFFSET = new InjectionToken('');
|
|
768
|
-
const MECX_DATE_FORMAT = new InjectionToken('');
|
|
769
|
-
const MECX_LANG = new InjectionToken('');
|
|
770
|
-
|
|
771
773
|
class MonkeyEcxFormatDatePipe {
|
|
772
774
|
constructor(dt, dateFormat, timezone) {
|
|
773
775
|
this.dt = dt;
|