@ngneat/transloco-locale
Advanced tools
Comparing version 1.0.1 to 1.1.1
@@ -184,2 +184,20 @@ (function (global, factory) { | ||
*/ | ||
/** | ||
* @param {?} locale | ||
* @param {?} type | ||
* @param {?} localeConfig | ||
* @return {?} | ||
*/ | ||
function getDefaultOptions(locale, type, localeConfig) { | ||
/** @type {?} */ | ||
var defaultConfig = localeConfig.global[type] || {}; | ||
/** @type {?} */ | ||
var settings = localeConfig.localeBased[locale]; | ||
return settings && settings[type] ? __assign({}, defaultConfig, settings[type]) : defaultConfig; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var LOCALE_CURRENCY = { | ||
@@ -863,7 +881,62 @@ "aa-DJ": "DJF", | ||
*/ | ||
/** @type {?} */ | ||
var TRANSLOCO_DATE_TRANSFORMER = new i0.InjectionToken('TRANSLOCO_DATE_TRANSFORMER'); | ||
/** @type {?} */ | ||
var TRANSLOCO_NUMBER_TRANSFORMER = new i0.InjectionToken('TRANSLOCO_NUMBER_TRANSFORMER'); | ||
var DefaultDateTransformer = /** @class */ (function () { | ||
function DefaultDateTransformer() { | ||
} | ||
/** | ||
* @param {?} date | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
DefaultDateTransformer.prototype.transform = /** | ||
* @param {?} date | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
function (date, locale, options) { | ||
return localizeDate(date, locale, options); | ||
}; | ||
return DefaultDateTransformer; | ||
}()); | ||
var DefaultNumberTransformer = /** @class */ (function () { | ||
function DefaultNumberTransformer() { | ||
} | ||
/** | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
DefaultNumberTransformer.prototype.transform = /** | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
function (value, type, locale, options) { | ||
return localizeNumber(value, locale, __assign({}, options, { style: type })); | ||
}; | ||
return DefaultNumberTransformer; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var TranslocoLocaleService = /** @class */ (function () { | ||
function TranslocoLocaleService(translocoService, langLocaleMapping, defaultLocale) { | ||
function TranslocoLocaleService(translocoService, langLocaleMapping, defaultLocale, localeConfig, localeCurrencyMapping, numberTransformer, dateTransformer) { | ||
this.translocoService = translocoService; | ||
this.langLocaleMapping = langLocaleMapping; | ||
this.defaultLocale = defaultLocale; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
this.numberTransformer = numberTransformer; | ||
this.dateTransformer = dateTransformer; | ||
this._locale = defaultLocale || this.toLocale(this.translocoService.getActiveLang()); | ||
@@ -905,2 +978,119 @@ this.locale = new rxjs.BehaviorSubject(this._locale); | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* @example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
*/ | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype.localizeDate = /** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
function (date, locale, options) { | ||
if (locale === void 0) { | ||
locale = this.getLocale(); | ||
} | ||
options = options ? options : getDefaultOptions(locale, 'date', this.localeConfig); | ||
return this.dateTransformer.transform(date, locale, options); | ||
}; | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
*/ | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype.localizeNumber = /** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
function (value, type, locale, options) { | ||
if (locale === void 0) { | ||
locale = this.getLocale(); | ||
} | ||
options = options ? options : getDefaultOptions(locale, type, this.localeConfig); | ||
if (type === 'currency') { | ||
options = __assign({}, options, { currency: options.currency || this._resolveCurrencyCode(locale) }); | ||
} | ||
return this.numberTransformer.transform(value, type, locale, options); | ||
}; | ||
/** | ||
* @internal | ||
*/ | ||
/** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype._resolveCurrencyCode = /** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
function (locale) { | ||
if (locale === void 0) { | ||
locale = this.getLocale(); | ||
} | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
}; | ||
/** | ||
* @private | ||
@@ -943,6 +1133,10 @@ * @param {?} val | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_LANG_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_DEFAULT_LOCALE,] }] } | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_DEFAULT_LOCALE,] }] }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_CURRENCY_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [TRANSLOCO_NUMBER_TRANSFORMER,] }] }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [TRANSLOCO_DATE_TRANSFORMER,] }] } | ||
]; | ||
}; | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = i0.defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(i0.inject(i1.TranslocoService), i0.inject(LOCALE_LANG_MAPPING), i0.inject(LOCALE_DEFAULT_LOCALE)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = i0.defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(i0.inject(i1.TranslocoService), i0.inject(LOCALE_LANG_MAPPING), i0.inject(LOCALE_DEFAULT_LOCALE), i0.inject(LOCALE_CONFIG), i0.inject(LOCALE_CURRENCY_MAPPING), i0.inject(TRANSLOCO_NUMBER_TRANSFORMER), i0.inject(TRANSLOCO_DATE_TRANSFORMER)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
return TranslocoLocaleService; | ||
@@ -955,20 +1149,2 @@ }()); | ||
*/ | ||
/** | ||
* @param {?} locale | ||
* @param {?} type | ||
* @param {?} localeConfig | ||
* @return {?} | ||
*/ | ||
function getDefaultOptions(locale, type, localeConfig) { | ||
/** @type {?} */ | ||
var defaultConfig = localeConfig.global[type] || {}; | ||
/** @type {?} */ | ||
var settings = localeConfig.localeBased[locale]; | ||
return settings && settings[type] ? __assign({}, defaultConfig, settings[type]) : defaultConfig; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var TranslocoLocalePipe = /** @class */ (function () { | ||
@@ -1016,3 +1192,3 @@ function TranslocoLocalePipe(translocoLocaleService, cdr) { | ||
__extends(TranslocoCurrencyPipe, _super); | ||
function TranslocoCurrencyPipe(translocoLocaleService, cdr, localeConfig, localeCurrencyMapping) { | ||
function TranslocoCurrencyPipe(translocoLocaleService, cdr, localeConfig) { | ||
var _this = _super.call(this, translocoLocaleService, cdr) || this; | ||
@@ -1022,3 +1198,2 @@ _this.translocoLocaleService = translocoLocaleService; | ||
_this.localeConfig = localeConfig; | ||
_this.localeCurrencyMapping = localeCurrencyMapping; | ||
return _this; | ||
@@ -1079,18 +1254,5 @@ } | ||
/** @type {?} */ | ||
var options = __assign({}, numberFormatOptions, { currencyDisplay: display, style: 'currency', currency: currencyCode || this.getCurrencyCode(this.translocoLocaleService.getLocale()) }); | ||
return localizeNumber(value, locale, __assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), options)); | ||
var options = __assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), numberFormatOptions, { currencyDisplay: display, currency: currencyCode || this.translocoLocaleService._resolveCurrencyCode() }); | ||
return this.translocoLocaleService.localizeNumber(value, 'currency', locale, options); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
TranslocoCurrencyPipe.prototype.getCurrencyCode = /** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
function (locale) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
}; | ||
TranslocoCurrencyPipe.decorators = [ | ||
@@ -1107,4 +1269,3 @@ { type: i0.Pipe, args: [{ | ||
{ type: i0.ChangeDetectorRef }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_CURRENCY_MAPPING,] }] } | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [LOCALE_CONFIG,] }] } | ||
]; | ||
@@ -1185,4 +1346,3 @@ }; | ||
locale = this.getLocale(locale); | ||
value = toDate(value); | ||
return localizeDate(value, locale, __assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
return this.translocoLocaleService.localizeDate(toDate(value), locale, __assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
}; | ||
@@ -1262,4 +1422,4 @@ TranslocoDatePipe.decorators = [ | ||
/** @type {?} */ | ||
var options = __assign({ style: 'decimal' }, numberFormatOptions); | ||
return localizeNumber(value, locale, __assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), options)); | ||
var options = __assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'decimal', locale, options); | ||
}; | ||
@@ -1339,4 +1499,4 @@ TranslocoDecimalPipe.decorators = [ | ||
/** @type {?} */ | ||
var options = __assign({ style: 'percent' }, numberFormatOptions); | ||
return localizeNumber(value, locale, __assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), options)); | ||
var options = __assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'percent', locale, options); | ||
}; | ||
@@ -1399,2 +1559,10 @@ TranslocoPercentPipe.decorators = [ | ||
useValue: config.defaultLocale || defaultConfig.defaultLocale | ||
}, | ||
{ | ||
provide: TRANSLOCO_DATE_TRANSFORMER, | ||
useClass: DefaultDateTransformer | ||
}, | ||
{ | ||
provide: TRANSLOCO_NUMBER_TRANSFORMER, | ||
useClass: DefaultNumberTransformer | ||
} | ||
@@ -1435,2 +1603,6 @@ ] | ||
exports.TranslocoDecimalPipe = TranslocoDecimalPipe; | ||
exports.TRANSLOCO_DATE_TRANSFORMER = TRANSLOCO_DATE_TRANSFORMER; | ||
exports.TRANSLOCO_NUMBER_TRANSFORMER = TRANSLOCO_NUMBER_TRANSFORMER; | ||
exports.DefaultDateTransformer = DefaultDateTransformer; | ||
exports.DefaultNumberTransformer = DefaultNumberTransformer; | ||
exports.ɵa = TranslocoLocalePipe; | ||
@@ -1437,0 +1609,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core"),require("@ngneat/transloco")):"function"==typeof define&&define.amd?define("@ngneat/transloco-locale",["exports","rxjs","rxjs/operators","@angular/core","@ngneat/transloco"],r):r((e.ngneat=e.ngneat||{},e.ngneat["transloco-locale"]={}),e.rxjs,e.rxjs.operators,e.ng.core,e.i1)}(this,function(e,t,R,r,a){"use strict";var o=function(e,r){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])})(e,r)};function n(e,r){function n(){this.constructor=e}o(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var R in r=arguments[n])Object.prototype.hasOwnProperty.call(r,R)&&(e[R]=r[R]);return e}).apply(this,arguments)};var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;function i(e){return"string"==typeof e&&!!e.match(/[a-z]{2}-[A-Z]{2}/)}function E(e,r,n){var t=a.toNumber(e);return null!==t?new Intl.NumberFormat(r,n).format(t):""}function l(e){return e instanceof Date&&!isNaN(e)}function N(e){var r;if("string"==typeof e&&(e=e.trim()),l(e))return e;if(!isNaN(e-parseFloat(e)))return new Date(parseFloat(e));if("string"==typeof e&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){var n=function i(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,R,o=n.call(e),a=[];try{for(;(void 0===r||0<r--)&&!(t=o.next()).done;)a.push(t.value)}catch(s){R={error:s}}finally{try{t&&!t.done&&(n=o["return"])&&n.call(o)}finally{if(R)throw R.error}}return a}(e.split("-").map(function(e){return parseInt(e,10)}),3),t=n[0],R=n[1],o=n[2];return new Date(t,R-1,o)}return"string"==typeof e&&(r=e.match(c))?function E(e){var r=new Date(0),n=0,t=0,R=e[8]?r.setUTCFullYear:r.setFullYear,o=e[8]?r.setUTCHours:r.setHours;e[9]&&(n=+(e[9]+e[10]),t=+(e[9]+e[11]));R.call(r,+e[1],+e[2]-1,+e[3]);var a=+(e[4]||"0")-n,s=+(e[5]||"0")-t,i=+(e[6]||"0"),c=Math.round(1e3*parseFloat("0."+(e[7]||0)));return o.call(r,a,s,i,c),r}(r):new Date(e)}var U={localeConfig:{global:{},localeBased:{}},defaultLocale:"en-US",localeToCurrencyMapping:{"aa-DJ":"DJF","aa-ER":"ERN","aa-ET":"ETB","ab-GE":"ETB","ab-TR":"ETB","af-BW":"ETB","af-NA":"ETB","af-ZA":"ZAR","ak-GH":"ZAR","am-ET":"ETB","am-IL":"ETB","ar-AE":"AED","ar-AR":"AED","ar-BH":"BHD","ar-CM":"BHD","ar-CY":"BHD","ar-DJ":"BHD","ar-DZ":"DZD","ar-EG":"EGP","ar-EH":"EGP","ar-ER":"EGP","ar-IL":"EGP","ar-IQ":"IQD","ar-IR":"IQD","ar-JO":"JOD","ar-KE":"JOD","ar-KM":"JOD","ar-KW":"KWD","ar-LB":"LBP","ar-LY":"LYD","ar-MA":"MAD","ar-ML":"MAD","ar-MR":"MAD","ar-NE":"MAD","ar-NG":"MAD","ar-OM":"OMR","ar-PS":"OMR","ar-QA":"QAR","ar-SA":"SAR","ar-SD":"SDD","ar-SS":"SDD","ar-SY":"SYP","ar-TD":"SYP","ar-TJ":"SYP","ar-TN":"TND","ar-TR":"TND","ar-YE":"YER","as-IN":"INR","av-RU":"INR","ay-BO":"INR","ay-PE":"INR","az-AZ":"AZM","ba-RU":"AZM","be-BY":"BYR","be-PL":"BYR","be-UA":"BYR","bg-BG":"BGN","bg-GR":"BGN","bg-MD":"BGN","bg-RO":"BGN","bg-TR":"BGN","bg-UA":"BGN","bi-VU":"BGN","bm-ML":"BGN","bn-BD":"BDT","bn-GB":"BDT","bn-IN":"INR","bn-NP":"INR","bo-CN":"CNY","bo-IN":"INR","bo-NP":"INR","br-FR":"EUR","bs-BA":"BAM","ca-AD":"EUR","ca-ES":"EUR","ca-FR":"EUR","ca-IT":"EUR","ce-RU":"EUR","ch-GU":"EUR","ch-MP":"EUR","co-FR":"EUR","cs-CZ":"CZK","cv-RU":"RUB","cy-AR":"RUB","cy-GB":"GBP","da-DE":"GBP","da-DK":"DKK","da-GL":"DKK","da-IS":"DKK","de-AT":"EUR","de-BE":"EUR","de-BR":"EUR","de-CA":"EUR","de-CH":"CHF","de-CZ":"CHF","de-DE":"EUR","de-DK":"EUR","de-HU":"EUR","de-IT":"EUR","de-KZ":"EUR","de-LI":"EUR","de-LU":"EUR","de-NA":"EUR","de-PL":"EUR","de-PY":"EUR","de-RO":"EUR","de-SK":"EUR","de-US":"EUR","dv-IN":"EUR","dv-MV":"MVR","dz-BT":"BTN","dz-IN":"BTN","ee-GH":"BTN","ee-TG":"BTN","el-AL":"BTN","el-CY":"EUR","el-DE":"EUR","el-EG":"EUR","el-GB":"EUR","el-GR":"EUR","el-IT":"EUR","el-RO":"EUR","el-TR":"EUR","el-UA":"EUR","en-AC":"EUR","en-AG":"XCD","en-AI":"XCD","en-AS":"XCD","en-AU":"AUD","en-AW":"AUD","en-BB":"AUD","en-BE":"AUD","en-BM":"AUD","en-BN":"AUD","en-BS":"AUD","en-BW":"BWP","en-BZ":"BWP","en-CA":"CAD","en-CC":"CAD","en-CK":"CAD","en-CM":"CAD","en-CN":"CAD","en-CX":"CAD","en-DE":"CAD","en-DG":"CAD","en-DM":"CAD","en-DO":"CAD","en-ES":"CAD","en-ET":"CAD","en-FI":"CAD","en-FJ":"CAD","en-FK":"CAD","en-FM":"CAD","en-FR":"CAD","en-GB":"GBP","en-GD":"GBP","en-GG":"GBP","en-GH":"GBP","en-GI":"GBP","en-GM":"GBP","en-GU":"GBP","en-GY":"GBP","en-HK":"HKD","en-HN":"HKD","en-IE":"EUR","en-IL":"EUR","en-IM":"EUR","en-IN":"INR","en-IO":"INR","en-IT":"INR","en-JE":"INR","en-JM":"INR","en-KE":"INR","en-KI":"INR","en-KN":"INR","en-KY":"INR","en-LB":"INR","en-LC":"INR","en-LK":"INR","en-LR":"INR","en-LS":"INR","en-MG":"INR","en-MH":"INR","en-MP":"INR","en-MS":"INR","en-MT":"INR","en-MU":"INR","en-MW":"INR","en-MY":"INR","en-NA":"INR","en-NF":"INR","en-NG":"NGN","en-NL":"NGN","en-NR":"NGN","en-NU":"NGN","en-NZ":"NZD","en-PA":"NZD","en-PG":"NZD","en-PH":"PHP","en-PI":"PHP","en-PK":"PHP","en-PM":"PHP","en-PN":"PHP","en-PR":"PHP","en-PW":"PHP","en-RW":"PHP","en-SB":"PHP","en-SC":"PHP","en-SG":"SGD","en-SH":"SGD","en-SL":"SGD","en-SS":"SGD","en-SZ":"SGD","en-TA":"SGD","en-TC":"SGD","en-TK":"SGD","en-TO":"SGD","en-TT":"SGD","en-TV":"SGD","en-TZ":"SGD","en-UD":"SGD","en-UG":"SGD","en-UM":"SGD","en-US":"USD","en-VC":"USD","en-VG":"USD","en-VI":"USD","en-VU":"USD","en-WS":"USD","en-ZA":"ZAR","en-ZM":"ZAR","en-ZW":"ZWD","eo-EO":"ZWD","eo-SM":"ZWD","es-AD":"ZWD","es-AR":"ARS","es-BO":"BOB","es-BZ":"BOB","es-CL":"CLP","es-CO":"COP","es-CR":"CRC","es-CU":"CRC","es-DE":"CRC","es-DO":"DOP","es-EA":"DOP","es-EC":"USD","es-ES":"EUR","es-GQ":"EUR","es-GT":"GTQ","es-HN":"HNL","es-IC":"HNL","es-LA":"HNL","es-MA":"HNL","es-MX":"MXN","es-NI":"NIO","es-PA":"PAB","es-PE":"PEN","es-PH":"PEN","es-PR":"USD","es-PY":"PYG","es-SV":"SVC","es-TT":"SVC","es-US":"USD","es-UY":"UYU","es-VE":"VEB","et-EE":"EEK","et-FI":"EEK","eu-ES":"EUR","eu-FR":"EUR","fa-AE":"EUR","fa-AF":"EUR","fa-IQ":"EUR","fa-IR":"IRR","fa-OM":"IRR","fa-PK":"IRR","fa-QA":"IRR","fa-TJ":"IRR","fb-LT":"IRR","ff-GN":"IRR","ff-MR":"IRR","ff-SN":"IRR","fi-FI":"EUR","fi-RU":"EUR","fi-SE":"EUR","fj-FJ":"EUR","fo-FO":"DKK","fr-AD":"DKK","fr-BE":"EUR","fr-BF":"EUR","fr-BI":"EUR","fr-BJ":"EUR","fr-BL":"EUR","fr-CA":"CAD","fr-CD":"CAD","fr-CF":"CAD","fr-CG":"CAD","fr-CH":"CHF","fr-CI":"CHF","fr-CM":"CHF","fr-CP":"CHF","fr-DJ":"CHF","fr-DZ":"CHF","fr-FR":"EUR","fr-GA":"EUR","fr-GB":"EUR","fr-GF":"EUR","fr-GN":"EUR","fr-GP":"EUR","fr-GQ":"EUR","fr-HT":"EUR","fr-IT":"EUR","fr-KM":"EUR","fr-LB":"EUR","fr-LU":"EUR","fr-MA":"EUR","fr-MC":"EUR","fr-MF":"EUR","fr-MG":"EUR","fr-ML":"EUR","fr-MQ":"EUR","fr-MR":"EUR","fr-MU":"EUR","fr-NC":"EUR","fr-NE":"EUR","fr-PF":"EUR","fr-PM":"EUR","fr-RE":"EUR","fr-RW":"EUR","fr-SC":"EUR","fr-SN":"EUR","fr-SY":"EUR","fr-TD":"EUR","fr-TF":"EUR","fr-TG":"EUR","fr-TN":"EUR","fr-US":"EUR","fr-VU":"EUR","fr-WF":"EUR","fr-YT":"EUR","fy-NL":"EUR","ga-GB":"EUR","ga-IE":"EUR","gd-GB":"GBP","gl-ES":"EUR","gl-PT":"EUR","gn-AR":"EUR","gn-BO":"EUR","gn-PY":"EUR","gu-IN":"INR","gu-KE":"INR","gv-IM":"INR","he-IL":"ILS","hi-FJ":"ILS","hi-IN":"INR","hi-NP":"INR","hi-UG":"INR","hi-ZA":"INR","ho-PG":"INR","hr-AT":"INR","hr-BA":"INR","hr-DE":"INR","hr-HR":"HRK","hr-HU":"HRK","hr-IT":"HRK","ht-HT":"HTG","hu-AT":"HTG","hu-HU":"HUF","hu-IL":"HUF","hu-RO":"HUF","hu-RS":"HUF","hu-SI":"HUF","hu-SK":"HUF","hu-UA":"HUF","hy-AM":"AMD","hy-CY":"AMD","hy-GE":"AMD","hy-IR":"AMD","hy-LB":"AMD","hy-SY":"AMD","hy-TR":"AMD","ia-SE":"AMD","id-ID":"IDR","id-NL":"IDR","ig-NG":"NGN","ii-CN":"NGN","ik-US":"NGN","is-IS":"ISK","it-AU":"ISK","it-BR":"ISK","it-CA":"ISK","it-CH":"CHF","it-DE":"CHF","it-FR":"CHF","it-GB":"CHF","it-HR":"CHF","it-IT":"EUR","it-SI":"EUR","it-SM":"EUR","it-US":"EUR","it-VA":"EUR","iu-GL":"EUR","ja-BR":"EUR","ja-JP":"JPY","jv-ID":"JPY","jv-MY":"JPY","ka-GE":"GEL","ka-IR":"GEL","ka-TR":"GEL","kg-CD":"GEL","ki-KE":"GEL","kj-NA":"GEL","kl-DK":"GEL","kl-GL":"DKK","km-KH":"KHR","kn-IN":"INR","ko-BR":"INR","ko-CN":"INR","ko-JP":"INR","ko-KP":"INR","ko-KR":"KRW","ko-US":"KRW","ks-GB":"KRW","ks-IN":"INR","ks-PK":"INR","ku-TR":"TRY","kw-GB":"GBP","la-VA":"GBP","lb-LU":"GBP","lg-UG":"UGX","li-NL":"EUR","ln-CD":"EUR","ln-CG":"EUR","lo-LA":"LAK","lt-LT":"LTL","lu-CD":"LTL","lv-LV":"LVL","mg-MG":"MGA","mh-MH":"MGA","mi-NZ":"NZD","mk-AL":"NZD","mk-GR":"NZD","mk-MK":"MKD","ml-AE":"MKD","ml-BH":"MKD","ml-GB":"MKD","ml-IL":"MKD","ml-IN":"INR","ml-MY":"INR","ml-QA":"INR","ml-SG":"INR","mr-IN":"INR","ms-BN":"INR","ms-CC":"INR","ms-ID":"INR","ms-MY":"MYR","ms-SG":"MYR","mt-MT":"EUR","my-BD":"EUR","my-MM":"MMK","na-NR":"MMK","nb-NO":"NOK","nb-SJ":"NOK","nd-ZW":"NOK","ne-BT":"NOK","ne-IN":"NOK","ne-NP":"INR","ng-NA":"INR","nl-AW":"AWG","nl-BE":"EUR","nl-DE":"EUR","nl-FR":"EUR","nl-NL":"EUR","nl-SR":"EUR","nn-NO":"NOK","nr-ZA":"ZAR","nv-US":"ZAR","ny-MW":"ZAR","ny-MZ":"ZAR","ny-ZM":"ZAR","ny-ZW":"ZAR","oc-FR":"EUR","om-ET":"ETB","om-KE":"KES","om-SO":"KES","or-IN":"INR","os-GE":"INR","pa-IN":"INR","pl-CZ":"INR","pl-DE":"INR","pl-IL":"INR","pl-PL":"PLN","pl-RO":"PLN","pl-SK":"PLN","pl-UA":"PLN","ps-AE":"PLN","ps-AF":"AFN","ps-IR":"AFN","ps-PK":"AFN","pt-AG":"AFN","pt-AO":"AFN","pt-BR":"BRL","pt-CV":"BRL","pt-FR":"BRL","pt-GW":"BRL","pt-MO":"BRL","pt-MZ":"BRL","pt-PT":"EUR","pt-ST":"EUR","pt-TL":"EUR","qu-BO":"EUR","qu-PE":"EUR","rm-CH":"EUR","rn-BI":"EUR","ro-HU":"EUR","ro-IL":"EUR","ro-MD":"EUR","ro-RO":"RON","ro-RS":"RON","ro-UA":"RON","ru-BY":"RON","ru-CN":"RON","ru-DE":"RON","ru-EE":"RON","ru-FI":"RON","ru-GE":"RON","ru-IL":"RON","ru-KG":"RON","ru-KZ":"RON","ru-LT":"RON","ru-LV":"RON","ru-MD":"RON","ru-MN":"RON","ru-RU":"RUB","ru-SJ":"RUB","ru-TM":"RUB","ru-UA":"UAH","ru-US":"UAH","ru-UZ":"UAH","rw-CD":"UAH","rw-RW":"RWF","rw-UG":"RWF","sa-IN":"INR","se-FI":"INR","se-NO":"NOK","se-SE":"NOK","sg-CF":"NOK","si-LK":"LKR","sk-HU":"LKR","sk-RS":"LKR","sk-SK":"EUR","sl-AT":"EUR","sl-HU":"EUR","sl-IT":"EUR","sl-SI":"EUR","sm-AS":"EUR","sm-WS":"EUR","sn-ZW":"EUR","so-DJ":"DJF","so-ET":"ETB","so-KE":"ETB","so-SO":"SOS","sq-AL":"ALL","sq-GR":"ALL","sq-ME":"ALL","sq-MK":"MKD","sq-RS":"MKD","sq-TR":"MKD","sr-RS":"RSD","ss-LS":"RSD","ss-SZ":"RSD","ss-ZA":"ZAR","st-LS":"ZAR","st-ZA":"ZAR","su-ID":"ZAR","sv-AX":"ZAR","sv-FI":"EUR","sv-SE":"SEK","sw-BI":"SEK","sw-CD":"SEK","sw-KE":"SEK","sw-MZ":"SEK","sw-SO":"SEK","sw-TZ":"SEK","sw-UG":"SEK","sw-YT":"SEK","sw-ZA":"SEK","ta-IN":"INR","ta-LK":"INR","ta-MU":"INR","ta-MY":"INR","ta-RE":"INR","ta-SG":"INR","te-IN":"INR","th-TH":"THB","ti-ER":"ERN","ti-ET":"ETB","ti-IL":"ETB","tk-AF":"ETB","tk-IR":"ETB","tk-TM":"TMM","tl-PH":"PHP","tl-US":"PHP","tn-BW":"PHP","tn-NA":"PHP","tn-ZA":"ZAR","tn-ZW":"ZAR","to-TO":"ZAR","tr-BG":"ZAR","tr-CY":"TRY","tr-DE":"TRY","tr-GR":"TRY","tr-MK":"TRY","tr-NL":"TRY","tr-RO":"TRY","tr-TR":"TRY","tr-UA":"TRY","tr-UZ":"TRY","ts-MZ":"TRY","ts-SZ":"TRY","ts-ZA":"ZAR","tt-RU":"RUB","ty-PF":"RUB","uk-PL":"RUB","uk-SK":"RUB","uk-UA":"UAH","ur-IN":"UAH","ur-MU":"UAH","ur-PK":"PKR","ve-ZA":"ZAR","ve-ZW":"ZAR","vi-CN":"ZAR","vi-US":"ZAR","vi-VN":"VND","wa-BE":"EUR","xh-LS":"EUR","xh-ZA":"ZAR","yi-UA":"ZAR","yo-BJ":"ZAR","yo-NG":"NGN","za-CN":"NGN","zh-CN":"CNY","zh-HK":"HKD","zh-TW":"TWD","zu-LS":"TWD","zu-MW":"TWD","zu-MZ":"TWD","zu-SZ":"TWD","zu-ZA":"ZAR"},langToLocaleMapping:{}},u=new r.InjectionToken("DEFAULT_LOCALE"),A=new r.InjectionToken("LOCALE_LANG_MAPPING"),D=new r.InjectionToken("LOCALE_CONFIG"),I=new r.InjectionToken("LOCALE_CURRENCY_MAPPING"),f=(p.prototype.getLocale=function(){return this._locale},p.prototype.setLocale=function(e){if(!i(e))return console.error(e+" isn't a valid locale format"),!1;this.locale.next(e),this._locale=e},p.prototype.toLocale=function(e){return i(e)?e:this.langLocaleMapping[e]?this.langLocaleMapping[e]:null},p.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},p.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[{type:a.TranslocoService},{type:undefined,decorators:[{type:r.Inject,args:[A]}]},{type:undefined,decorators:[{type:r.Inject,args:[u]}]}]},p.ngInjectableDef=r.defineInjectable({factory:function(){return new p(r.inject(a.TranslocoService),r.inject(A),r.inject(u))},token:p,providedIn:"root"}),p);function p(e,r,n){this.translocoService=e,this.langLocaleMapping=r,this.defaultLocale=n,this._locale=n||this.toLocale(this.translocoService.getActiveLang()),this.locale=new t.BehaviorSubject(this._locale),this.localeChanges$=this.locale.asObservable().pipe(R.distinctUntilChanged()),this.subscription=e.langChanges$.pipe(R.map(this.toLocale.bind(this)),R.filter(function(e){return!!e})).subscribe(this.setLocale.bind(this))}function L(e,r,n){var t=n.global[r]||{},R=n.localeBased[e];return R&&R[r]?s({},t,R[r]):t}var C=(S.prototype.getLocale=function(e){return e||this.translocoLocaleService.getLocale()},S.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},S);function S(e,r){var n=this;this.translocoLocaleService=e,this.cdr=r,this.subscription=this.translocoLocaleService.localeChanges$.subscribe(function(){n.cdr.markForCheck()})}var G,P=(n(B,G=C),B.prototype.transform=function(e,r,n,t,R){if(void 0===r&&(r="symbol"),void 0===n&&(n={}),a.isNil(e))return"";R=this.getLocale(R);var o=s({},n,{currencyDisplay:r,style:"currency",currency:t||this.getCurrencyCode(this.translocoLocaleService.getLocale())});return E(e,R,s({},L(R,"currency",this.localeConfig),o))},B.prototype.getCurrencyCode=function(e){return this.localeCurrencyMapping[e]||"USD"},B.decorators=[{type:r.Pipe,args:[{name:"translocoCurrency",pure:!1}]}],B.ctorParameters=function(){return[{type:f},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[D]}]},{type:undefined,decorators:[{type:r.Inject,args:[I]}]}]},B);function B(e,r,n,t){var R=G.call(this,e,r)||this;return R.translocoLocaleService=e,R.cdr=r,R.localeConfig=n,R.localeCurrencyMapping=t,R}var T,M=(n(d,T=C),d.prototype.transform=function(e,r,n){return void 0===r&&(r={}),a.isNil(e)?"":(n=this.getLocale(n),function t(e,r,n){return l(e)?e.toLocaleDateString(r,n):""}(e=N(e),n,s({},L(n,"date",this.localeConfig),r)))},d.decorators=[{type:r.Pipe,args:[{name:"translocoDate",pure:!1}]}],d.ctorParameters=function(){return[{type:f},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[D]}]}]},d);function d(e,r,n){var t=T.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var g,K=(n(h,g=C),h.prototype.transform=function(e,r,n){if(void 0===r&&(r={}),a.isNil(e))return"";n=this.getLocale(n);var t=s({style:"decimal"},r);return E(e,n,s({},L(n,"decimal",this.localeConfig),t))},h.decorators=[{type:r.Pipe,args:[{name:"translocoDecimal",pure:!1}]}],h.ctorParameters=function(){return[{type:f},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[D]}]}]},h);function h(e,r,n){var t=g.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var y,H=(n(O,y=C),O.prototype.transform=function(e,r,n){if(void 0===r&&(r={}),a.isNil(e))return"";n=this.getLocale(n);var t=s({style:"percent"},r);return E(e,n,s({},L(n,"percent",this.localeConfig),t))},O.decorators=[{type:r.Pipe,args:[{name:"translocoPercent",pure:!1}]}],O.ctorParameters=function(){return[{type:f},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[D]}]}]},O);function O(e,r,n){var t=y.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var Z=[P,M,K,H],v=(F.init=function(e){return void 0===e&&(e={}),{ngModule:F,providers:[{provide:A,useValue:e.langToLocaleMapping||U.langToLocaleMapping},{provide:D,useValue:e.localeConfig||U.localeConfig},{provide:I,useValue:e.localeToCurrencyMapping||U.localeToCurrencyMapping},{provide:u,useValue:e.defaultLocale||U.defaultLocale}]}},F.decorators=[{type:r.NgModule,args:[{declarations:Z,exports:Z}]}],F);function F(){}e.TranslocoLocaleService=f,e.defaultConfig=U,e.LOCALE_DEFAULT_LOCALE=u,e.LOCALE_LANG_MAPPING=A,e.LOCALE_CONFIG=D,e.LOCALE_CURRENCY_MAPPING=I,e.pipes=Z,e.TranslocoLocaleModule=v,e.TranslocoDatePipe=M,e.TranslocoCurrencyPipe=P,e.TranslocoPercentPipe=H,e.TranslocoDecimalPipe=K,e.ɵa=C,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core"),require("@ngneat/transloco")):"function"==typeof define&&define.amd?define("@ngneat/transloco-locale",["exports","rxjs","rxjs/operators","@angular/core","@ngneat/transloco"],r):r((e.ngneat=e.ngneat||{},e.ngneat["transloco-locale"]={}),e.rxjs,e.rxjs.operators,e.ng.core,e.i1)}(this,function(e,s,i,r,a){"use strict";var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])})(e,r)};function n(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var c=function(){return(c=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};var E=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;function o(e){return"string"==typeof e&&!!e.match(/[a-z]{2}-[A-Z]{2}/)}function N(e){return e instanceof Date&&!isNaN(e)}function R(e){var r;if("string"==typeof e&&(e=e.trim()),N(e))return e;if(!isNaN(e-parseFloat(e)))return new Date(parseFloat(e));if("string"==typeof e&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){var n=function i(e,r){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var t,o,R=n.call(e),a=[];try{for(;(void 0===r||0<r--)&&!(t=R.next()).done;)a.push(t.value)}catch(s){o={error:s}}finally{try{t&&!t.done&&(n=R["return"])&&n.call(R)}finally{if(o)throw o.error}}return a}(e.split("-").map(function(e){return parseInt(e,10)}),3),t=n[0],o=n[1],R=n[2];return new Date(t,o-1,R)}return"string"==typeof e&&(r=e.match(E))?function l(e){var r=new Date(0),n=0,t=0,o=e[8]?r.setUTCFullYear:r.setFullYear,R=e[8]?r.setUTCHours:r.setHours;e[9]&&(n=+(e[9]+e[10]),t=+(e[9]+e[11]));o.call(r,+e[1],+e[2]-1,+e[3]);var a=+(e[4]||"0")-n,s=+(e[5]||"0")-t,i=+(e[6]||"0"),c=Math.round(1e3*parseFloat("0."+(e[7]||0)));return R.call(r,a,s,i,c),r}(r):new Date(e)}function l(e,r,n){var t=n.global[r]||{},o=n.localeBased[e];return o&&o[r]?c({},t,o[r]):t}var U={localeConfig:{global:{},localeBased:{}},defaultLocale:"en-US",localeToCurrencyMapping:{"aa-DJ":"DJF","aa-ER":"ERN","aa-ET":"ETB","ab-GE":"ETB","ab-TR":"ETB","af-BW":"ETB","af-NA":"ETB","af-ZA":"ZAR","ak-GH":"ZAR","am-ET":"ETB","am-IL":"ETB","ar-AE":"AED","ar-AR":"AED","ar-BH":"BHD","ar-CM":"BHD","ar-CY":"BHD","ar-DJ":"BHD","ar-DZ":"DZD","ar-EG":"EGP","ar-EH":"EGP","ar-ER":"EGP","ar-IL":"EGP","ar-IQ":"IQD","ar-IR":"IQD","ar-JO":"JOD","ar-KE":"JOD","ar-KM":"JOD","ar-KW":"KWD","ar-LB":"LBP","ar-LY":"LYD","ar-MA":"MAD","ar-ML":"MAD","ar-MR":"MAD","ar-NE":"MAD","ar-NG":"MAD","ar-OM":"OMR","ar-PS":"OMR","ar-QA":"QAR","ar-SA":"SAR","ar-SD":"SDD","ar-SS":"SDD","ar-SY":"SYP","ar-TD":"SYP","ar-TJ":"SYP","ar-TN":"TND","ar-TR":"TND","ar-YE":"YER","as-IN":"INR","av-RU":"INR","ay-BO":"INR","ay-PE":"INR","az-AZ":"AZM","ba-RU":"AZM","be-BY":"BYR","be-PL":"BYR","be-UA":"BYR","bg-BG":"BGN","bg-GR":"BGN","bg-MD":"BGN","bg-RO":"BGN","bg-TR":"BGN","bg-UA":"BGN","bi-VU":"BGN","bm-ML":"BGN","bn-BD":"BDT","bn-GB":"BDT","bn-IN":"INR","bn-NP":"INR","bo-CN":"CNY","bo-IN":"INR","bo-NP":"INR","br-FR":"EUR","bs-BA":"BAM","ca-AD":"EUR","ca-ES":"EUR","ca-FR":"EUR","ca-IT":"EUR","ce-RU":"EUR","ch-GU":"EUR","ch-MP":"EUR","co-FR":"EUR","cs-CZ":"CZK","cv-RU":"RUB","cy-AR":"RUB","cy-GB":"GBP","da-DE":"GBP","da-DK":"DKK","da-GL":"DKK","da-IS":"DKK","de-AT":"EUR","de-BE":"EUR","de-BR":"EUR","de-CA":"EUR","de-CH":"CHF","de-CZ":"CHF","de-DE":"EUR","de-DK":"EUR","de-HU":"EUR","de-IT":"EUR","de-KZ":"EUR","de-LI":"EUR","de-LU":"EUR","de-NA":"EUR","de-PL":"EUR","de-PY":"EUR","de-RO":"EUR","de-SK":"EUR","de-US":"EUR","dv-IN":"EUR","dv-MV":"MVR","dz-BT":"BTN","dz-IN":"BTN","ee-GH":"BTN","ee-TG":"BTN","el-AL":"BTN","el-CY":"EUR","el-DE":"EUR","el-EG":"EUR","el-GB":"EUR","el-GR":"EUR","el-IT":"EUR","el-RO":"EUR","el-TR":"EUR","el-UA":"EUR","en-AC":"EUR","en-AG":"XCD","en-AI":"XCD","en-AS":"XCD","en-AU":"AUD","en-AW":"AUD","en-BB":"AUD","en-BE":"AUD","en-BM":"AUD","en-BN":"AUD","en-BS":"AUD","en-BW":"BWP","en-BZ":"BWP","en-CA":"CAD","en-CC":"CAD","en-CK":"CAD","en-CM":"CAD","en-CN":"CAD","en-CX":"CAD","en-DE":"CAD","en-DG":"CAD","en-DM":"CAD","en-DO":"CAD","en-ES":"CAD","en-ET":"CAD","en-FI":"CAD","en-FJ":"CAD","en-FK":"CAD","en-FM":"CAD","en-FR":"CAD","en-GB":"GBP","en-GD":"GBP","en-GG":"GBP","en-GH":"GBP","en-GI":"GBP","en-GM":"GBP","en-GU":"GBP","en-GY":"GBP","en-HK":"HKD","en-HN":"HKD","en-IE":"EUR","en-IL":"EUR","en-IM":"EUR","en-IN":"INR","en-IO":"INR","en-IT":"INR","en-JE":"INR","en-JM":"INR","en-KE":"INR","en-KI":"INR","en-KN":"INR","en-KY":"INR","en-LB":"INR","en-LC":"INR","en-LK":"INR","en-LR":"INR","en-LS":"INR","en-MG":"INR","en-MH":"INR","en-MP":"INR","en-MS":"INR","en-MT":"INR","en-MU":"INR","en-MW":"INR","en-MY":"INR","en-NA":"INR","en-NF":"INR","en-NG":"NGN","en-NL":"NGN","en-NR":"NGN","en-NU":"NGN","en-NZ":"NZD","en-PA":"NZD","en-PG":"NZD","en-PH":"PHP","en-PI":"PHP","en-PK":"PHP","en-PM":"PHP","en-PN":"PHP","en-PR":"PHP","en-PW":"PHP","en-RW":"PHP","en-SB":"PHP","en-SC":"PHP","en-SG":"SGD","en-SH":"SGD","en-SL":"SGD","en-SS":"SGD","en-SZ":"SGD","en-TA":"SGD","en-TC":"SGD","en-TK":"SGD","en-TO":"SGD","en-TT":"SGD","en-TV":"SGD","en-TZ":"SGD","en-UD":"SGD","en-UG":"SGD","en-UM":"SGD","en-US":"USD","en-VC":"USD","en-VG":"USD","en-VI":"USD","en-VU":"USD","en-WS":"USD","en-ZA":"ZAR","en-ZM":"ZAR","en-ZW":"ZWD","eo-EO":"ZWD","eo-SM":"ZWD","es-AD":"ZWD","es-AR":"ARS","es-BO":"BOB","es-BZ":"BOB","es-CL":"CLP","es-CO":"COP","es-CR":"CRC","es-CU":"CRC","es-DE":"CRC","es-DO":"DOP","es-EA":"DOP","es-EC":"USD","es-ES":"EUR","es-GQ":"EUR","es-GT":"GTQ","es-HN":"HNL","es-IC":"HNL","es-LA":"HNL","es-MA":"HNL","es-MX":"MXN","es-NI":"NIO","es-PA":"PAB","es-PE":"PEN","es-PH":"PEN","es-PR":"USD","es-PY":"PYG","es-SV":"SVC","es-TT":"SVC","es-US":"USD","es-UY":"UYU","es-VE":"VEB","et-EE":"EEK","et-FI":"EEK","eu-ES":"EUR","eu-FR":"EUR","fa-AE":"EUR","fa-AF":"EUR","fa-IQ":"EUR","fa-IR":"IRR","fa-OM":"IRR","fa-PK":"IRR","fa-QA":"IRR","fa-TJ":"IRR","fb-LT":"IRR","ff-GN":"IRR","ff-MR":"IRR","ff-SN":"IRR","fi-FI":"EUR","fi-RU":"EUR","fi-SE":"EUR","fj-FJ":"EUR","fo-FO":"DKK","fr-AD":"DKK","fr-BE":"EUR","fr-BF":"EUR","fr-BI":"EUR","fr-BJ":"EUR","fr-BL":"EUR","fr-CA":"CAD","fr-CD":"CAD","fr-CF":"CAD","fr-CG":"CAD","fr-CH":"CHF","fr-CI":"CHF","fr-CM":"CHF","fr-CP":"CHF","fr-DJ":"CHF","fr-DZ":"CHF","fr-FR":"EUR","fr-GA":"EUR","fr-GB":"EUR","fr-GF":"EUR","fr-GN":"EUR","fr-GP":"EUR","fr-GQ":"EUR","fr-HT":"EUR","fr-IT":"EUR","fr-KM":"EUR","fr-LB":"EUR","fr-LU":"EUR","fr-MA":"EUR","fr-MC":"EUR","fr-MF":"EUR","fr-MG":"EUR","fr-ML":"EUR","fr-MQ":"EUR","fr-MR":"EUR","fr-MU":"EUR","fr-NC":"EUR","fr-NE":"EUR","fr-PF":"EUR","fr-PM":"EUR","fr-RE":"EUR","fr-RW":"EUR","fr-SC":"EUR","fr-SN":"EUR","fr-SY":"EUR","fr-TD":"EUR","fr-TF":"EUR","fr-TG":"EUR","fr-TN":"EUR","fr-US":"EUR","fr-VU":"EUR","fr-WF":"EUR","fr-YT":"EUR","fy-NL":"EUR","ga-GB":"EUR","ga-IE":"EUR","gd-GB":"GBP","gl-ES":"EUR","gl-PT":"EUR","gn-AR":"EUR","gn-BO":"EUR","gn-PY":"EUR","gu-IN":"INR","gu-KE":"INR","gv-IM":"INR","he-IL":"ILS","hi-FJ":"ILS","hi-IN":"INR","hi-NP":"INR","hi-UG":"INR","hi-ZA":"INR","ho-PG":"INR","hr-AT":"INR","hr-BA":"INR","hr-DE":"INR","hr-HR":"HRK","hr-HU":"HRK","hr-IT":"HRK","ht-HT":"HTG","hu-AT":"HTG","hu-HU":"HUF","hu-IL":"HUF","hu-RO":"HUF","hu-RS":"HUF","hu-SI":"HUF","hu-SK":"HUF","hu-UA":"HUF","hy-AM":"AMD","hy-CY":"AMD","hy-GE":"AMD","hy-IR":"AMD","hy-LB":"AMD","hy-SY":"AMD","hy-TR":"AMD","ia-SE":"AMD","id-ID":"IDR","id-NL":"IDR","ig-NG":"NGN","ii-CN":"NGN","ik-US":"NGN","is-IS":"ISK","it-AU":"ISK","it-BR":"ISK","it-CA":"ISK","it-CH":"CHF","it-DE":"CHF","it-FR":"CHF","it-GB":"CHF","it-HR":"CHF","it-IT":"EUR","it-SI":"EUR","it-SM":"EUR","it-US":"EUR","it-VA":"EUR","iu-GL":"EUR","ja-BR":"EUR","ja-JP":"JPY","jv-ID":"JPY","jv-MY":"JPY","ka-GE":"GEL","ka-IR":"GEL","ka-TR":"GEL","kg-CD":"GEL","ki-KE":"GEL","kj-NA":"GEL","kl-DK":"GEL","kl-GL":"DKK","km-KH":"KHR","kn-IN":"INR","ko-BR":"INR","ko-CN":"INR","ko-JP":"INR","ko-KP":"INR","ko-KR":"KRW","ko-US":"KRW","ks-GB":"KRW","ks-IN":"INR","ks-PK":"INR","ku-TR":"TRY","kw-GB":"GBP","la-VA":"GBP","lb-LU":"GBP","lg-UG":"UGX","li-NL":"EUR","ln-CD":"EUR","ln-CG":"EUR","lo-LA":"LAK","lt-LT":"LTL","lu-CD":"LTL","lv-LV":"LVL","mg-MG":"MGA","mh-MH":"MGA","mi-NZ":"NZD","mk-AL":"NZD","mk-GR":"NZD","mk-MK":"MKD","ml-AE":"MKD","ml-BH":"MKD","ml-GB":"MKD","ml-IL":"MKD","ml-IN":"INR","ml-MY":"INR","ml-QA":"INR","ml-SG":"INR","mr-IN":"INR","ms-BN":"INR","ms-CC":"INR","ms-ID":"INR","ms-MY":"MYR","ms-SG":"MYR","mt-MT":"EUR","my-BD":"EUR","my-MM":"MMK","na-NR":"MMK","nb-NO":"NOK","nb-SJ":"NOK","nd-ZW":"NOK","ne-BT":"NOK","ne-IN":"NOK","ne-NP":"INR","ng-NA":"INR","nl-AW":"AWG","nl-BE":"EUR","nl-DE":"EUR","nl-FR":"EUR","nl-NL":"EUR","nl-SR":"EUR","nn-NO":"NOK","nr-ZA":"ZAR","nv-US":"ZAR","ny-MW":"ZAR","ny-MZ":"ZAR","ny-ZM":"ZAR","ny-ZW":"ZAR","oc-FR":"EUR","om-ET":"ETB","om-KE":"KES","om-SO":"KES","or-IN":"INR","os-GE":"INR","pa-IN":"INR","pl-CZ":"INR","pl-DE":"INR","pl-IL":"INR","pl-PL":"PLN","pl-RO":"PLN","pl-SK":"PLN","pl-UA":"PLN","ps-AE":"PLN","ps-AF":"AFN","ps-IR":"AFN","ps-PK":"AFN","pt-AG":"AFN","pt-AO":"AFN","pt-BR":"BRL","pt-CV":"BRL","pt-FR":"BRL","pt-GW":"BRL","pt-MO":"BRL","pt-MZ":"BRL","pt-PT":"EUR","pt-ST":"EUR","pt-TL":"EUR","qu-BO":"EUR","qu-PE":"EUR","rm-CH":"EUR","rn-BI":"EUR","ro-HU":"EUR","ro-IL":"EUR","ro-MD":"EUR","ro-RO":"RON","ro-RS":"RON","ro-UA":"RON","ru-BY":"RON","ru-CN":"RON","ru-DE":"RON","ru-EE":"RON","ru-FI":"RON","ru-GE":"RON","ru-IL":"RON","ru-KG":"RON","ru-KZ":"RON","ru-LT":"RON","ru-LV":"RON","ru-MD":"RON","ru-MN":"RON","ru-RU":"RUB","ru-SJ":"RUB","ru-TM":"RUB","ru-UA":"UAH","ru-US":"UAH","ru-UZ":"UAH","rw-CD":"UAH","rw-RW":"RWF","rw-UG":"RWF","sa-IN":"INR","se-FI":"INR","se-NO":"NOK","se-SE":"NOK","sg-CF":"NOK","si-LK":"LKR","sk-HU":"LKR","sk-RS":"LKR","sk-SK":"EUR","sl-AT":"EUR","sl-HU":"EUR","sl-IT":"EUR","sl-SI":"EUR","sm-AS":"EUR","sm-WS":"EUR","sn-ZW":"EUR","so-DJ":"DJF","so-ET":"ETB","so-KE":"ETB","so-SO":"SOS","sq-AL":"ALL","sq-GR":"ALL","sq-ME":"ALL","sq-MK":"MKD","sq-RS":"MKD","sq-TR":"MKD","sr-RS":"RSD","ss-LS":"RSD","ss-SZ":"RSD","ss-ZA":"ZAR","st-LS":"ZAR","st-ZA":"ZAR","su-ID":"ZAR","sv-AX":"ZAR","sv-FI":"EUR","sv-SE":"SEK","sw-BI":"SEK","sw-CD":"SEK","sw-KE":"SEK","sw-MZ":"SEK","sw-SO":"SEK","sw-TZ":"SEK","sw-UG":"SEK","sw-YT":"SEK","sw-ZA":"SEK","ta-IN":"INR","ta-LK":"INR","ta-MU":"INR","ta-MY":"INR","ta-RE":"INR","ta-SG":"INR","te-IN":"INR","th-TH":"THB","ti-ER":"ERN","ti-ET":"ETB","ti-IL":"ETB","tk-AF":"ETB","tk-IR":"ETB","tk-TM":"TMM","tl-PH":"PHP","tl-US":"PHP","tn-BW":"PHP","tn-NA":"PHP","tn-ZA":"ZAR","tn-ZW":"ZAR","to-TO":"ZAR","tr-BG":"ZAR","tr-CY":"TRY","tr-DE":"TRY","tr-GR":"TRY","tr-MK":"TRY","tr-NL":"TRY","tr-RO":"TRY","tr-TR":"TRY","tr-UA":"TRY","tr-UZ":"TRY","ts-MZ":"TRY","ts-SZ":"TRY","ts-ZA":"ZAR","tt-RU":"RUB","ty-PF":"RUB","uk-PL":"RUB","uk-SK":"RUB","uk-UA":"UAH","ur-IN":"UAH","ur-MU":"UAH","ur-PK":"PKR","ve-ZA":"ZAR","ve-ZW":"ZAR","vi-CN":"ZAR","vi-US":"ZAR","vi-VN":"VND","wa-BE":"EUR","xh-LS":"EUR","xh-ZA":"ZAR","yi-UA":"ZAR","yo-BJ":"ZAR","yo-NG":"NGN","za-CN":"NGN","zh-CN":"CNY","zh-HK":"HKD","zh-TW":"TWD","zu-LS":"TWD","zu-MW":"TWD","zu-MZ":"TWD","zu-SZ":"TWD","zu-ZA":"ZAR"},langToLocaleMapping:{}},u=new r.InjectionToken("DEFAULT_LOCALE"),f=new r.InjectionToken("LOCALE_LANG_MAPPING"),A=new r.InjectionToken("LOCALE_CONFIG"),D=new r.InjectionToken("LOCALE_CURRENCY_MAPPING"),I=new r.InjectionToken("TRANSLOCO_DATE_TRANSFORMER"),p=new r.InjectionToken("TRANSLOCO_NUMBER_TRANSFORMER"),C=(L.prototype.transform=function(e,r,n){return function t(e,r,n){return N(e)?e.toLocaleDateString(r,n):""}(e,r,n)},L);function L(){}var S=(T.prototype.transform=function(e,r,n,t){return function o(e,r,n){var t=a.toNumber(e);return null!==t?new Intl.NumberFormat(r,n).format(t):""}(e,n,c({},t,{style:r}))},T);function T(){}var d=(G.prototype.getLocale=function(){return this._locale},G.prototype.setLocale=function(e){if(!o(e))return console.error(e+" isn't a valid locale format"),!1;this.locale.next(e),this._locale=e},G.prototype.localizeDate=function(e,r,n){return void 0===r&&(r=this.getLocale()),n=n||l(r,"date",this.localeConfig),this.dateTransformer.transform(e,r,n)},G.prototype.localizeNumber=function(e,r,n,t){return void 0===n&&(n=this.getLocale()),t=t||l(n,r,this.localeConfig),"currency"===r&&(t=c({},t,{currency:t.currency||this._resolveCurrencyCode(n)})),this.numberTransformer.transform(e,r,n,t)},G.prototype._resolveCurrencyCode=function(e){return void 0===e&&(e=this.getLocale()),this.localeCurrencyMapping[e]||"USD"},G.prototype.toLocale=function(e){return o(e)?e:this.langLocaleMapping[e]?this.langLocaleMapping[e]:null},G.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},G.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],G.ctorParameters=function(){return[{type:a.TranslocoService},{type:undefined,decorators:[{type:r.Inject,args:[f]}]},{type:undefined,decorators:[{type:r.Inject,args:[u]}]},{type:undefined,decorators:[{type:r.Inject,args:[A]}]},{type:undefined,decorators:[{type:r.Inject,args:[D]}]},{type:undefined,decorators:[{type:r.Inject,args:[p]}]},{type:undefined,decorators:[{type:r.Inject,args:[I]}]}]},G.ngInjectableDef=r.defineInjectable({factory:function(){return new G(r.inject(a.TranslocoService),r.inject(f),r.inject(u),r.inject(A),r.inject(D),r.inject(p),r.inject(I))},token:G,providedIn:"root"}),G);function G(e,r,n,t,o,R,a){this.translocoService=e,this.langLocaleMapping=r,this.defaultLocale=n,this.localeConfig=t,this.localeCurrencyMapping=o,this.numberTransformer=R,this.dateTransformer=a,this._locale=n||this.toLocale(this.translocoService.getActiveLang()),this.locale=new s.BehaviorSubject(this._locale),this.localeChanges$=this.locale.asObservable().pipe(i.distinctUntilChanged()),this.subscription=e.langChanges$.pipe(i.map(this.toLocale.bind(this)),i.filter(function(e){return!!e})).subscribe(this.setLocale.bind(this))}var B=(P.prototype.getLocale=function(e){return e||this.translocoLocaleService.getLocale()},P.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},P);function P(e,r){var n=this;this.translocoLocaleService=e,this.cdr=r,this.subscription=this.translocoLocaleService.localeChanges$.subscribe(function(){n.cdr.markForCheck()})}var M,h=(n(y,M=B),y.prototype.transform=function(e,r,n,t,o){if(void 0===r&&(r="symbol"),void 0===n&&(n={}),a.isNil(e))return"";o=this.getLocale(o);var R=c({},l(o,"currency",this.localeConfig),n,{currencyDisplay:r,currency:t||this.translocoLocaleService._resolveCurrencyCode()});return this.translocoLocaleService.localizeNumber(e,"currency",o,R)},y.decorators=[{type:r.Pipe,args:[{name:"translocoCurrency",pure:!1}]}],y.ctorParameters=function(){return[{type:d},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[A]}]}]},y);function y(e,r,n){var t=M.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var g,K=(n(O,g=B),O.prototype.transform=function(e,r,n){return void 0===r&&(r={}),a.isNil(e)?"":(n=this.getLocale(n),this.translocoLocaleService.localizeDate(R(e),n,c({},l(n,"date",this.localeConfig),r)))},O.decorators=[{type:r.Pipe,args:[{name:"translocoDate",pure:!1}]}],O.ctorParameters=function(){return[{type:d},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[A]}]}]},O);function O(e,r,n){var t=g.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var v,H=(n(Z,v=B),Z.prototype.transform=function(e,r,n){if(void 0===r&&(r={}),a.isNil(e))return"";n=this.getLocale(n);var t=c({},l(n,"decimal",this.localeConfig),r);return this.translocoLocaleService.localizeNumber(e,"decimal",n,t)},Z.decorators=[{type:r.Pipe,args:[{name:"translocoDecimal",pure:!1}]}],Z.ctorParameters=function(){return[{type:d},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[A]}]}]},Z);function Z(e,r,n){var t=v.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var m,F=(n(b,m=B),b.prototype.transform=function(e,r,n){if(void 0===r&&(r={}),a.isNil(e))return"";n=this.getLocale(n);var t=c({},l(n,"percent",this.localeConfig),r);return this.translocoLocaleService.localizeNumber(e,"percent",n,t)},b.decorators=[{type:r.Pipe,args:[{name:"translocoPercent",pure:!1}]}],b.ctorParameters=function(){return[{type:d},{type:r.ChangeDetectorRef},{type:undefined,decorators:[{type:r.Inject,args:[A]}]}]},b);function b(e,r,n){var t=m.call(this,e,r)||this;return t.translocoLocaleService=e,t.cdr=r,t.localeConfig=n,t}var Y=[h,K,H,F],j=(k.init=function(e){return void 0===e&&(e={}),{ngModule:k,providers:[{provide:f,useValue:e.langToLocaleMapping||U.langToLocaleMapping},{provide:A,useValue:e.localeConfig||U.localeConfig},{provide:D,useValue:e.localeToCurrencyMapping||U.localeToCurrencyMapping},{provide:u,useValue:e.defaultLocale||U.defaultLocale},{provide:I,useClass:C},{provide:p,useClass:S}]}},k.decorators=[{type:r.NgModule,args:[{declarations:Y,exports:Y}]}],k);function k(){}e.TranslocoLocaleService=d,e.defaultConfig=U,e.LOCALE_DEFAULT_LOCALE=u,e.LOCALE_LANG_MAPPING=f,e.LOCALE_CONFIG=A,e.LOCALE_CURRENCY_MAPPING=D,e.pipes=Y,e.TranslocoLocaleModule=j,e.TranslocoDatePipe=K,e.TranslocoCurrencyPipe=h,e.TranslocoPercentPipe=F,e.TranslocoDecimalPipe=H,e.TRANSLOCO_DATE_TRANSFORMER=I,e.TRANSLOCO_NUMBER_TRANSFORMER=p,e.DefaultDateTransformer=C,e.DefaultNumberTransformer=S,e.ɵa=B,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngneat-transloco-locale.umd.min.js.map |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -7,5 +7,4 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { localizeNumber } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
import { LOCALE_CURRENCY_MAPPING, LOCALE_CONFIG } from '../transloco-locale.config'; | ||
import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
import { TranslocoLocaleService } from '../transloco-locale.service'; | ||
@@ -18,5 +17,4 @@ import { TranslocoLocalePipe } from './transloco-locale.pipe'; | ||
* @param {?} localeConfig | ||
* @param {?} localeCurrencyMapping | ||
*/ | ||
constructor(translocoLocaleService, cdr, localeConfig, localeCurrencyMapping) { | ||
constructor(translocoLocaleService, cdr, localeConfig) { | ||
super(translocoLocaleService, cdr); | ||
@@ -26,3 +24,2 @@ this.translocoLocaleService = translocoLocaleService; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
} | ||
@@ -50,13 +47,5 @@ /** | ||
/** @type {?} */ | ||
const options = Object.assign({}, numberFormatOptions, { currencyDisplay: display, style: 'currency', currency: currencyCode || this.getCurrencyCode(this.translocoLocaleService.getLocale()) }); | ||
return localizeNumber(value, locale, Object.assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), options)); | ||
const options = Object.assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), numberFormatOptions, { currencyDisplay: display, currency: currencyCode || this.translocoLocaleService._resolveCurrencyCode() }); | ||
return this.translocoLocaleService.localizeNumber(value, 'currency', locale, options); | ||
} | ||
/** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
getCurrencyCode(locale) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
} | ||
} | ||
@@ -73,4 +62,3 @@ TranslocoCurrencyPipe.decorators = [ | ||
{ type: ChangeDetectorRef }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] } | ||
]; | ||
@@ -93,8 +81,3 @@ if (false) { | ||
TranslocoCurrencyPipe.prototype.localeConfig; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoCurrencyPipe.prototype.localeCurrencyMapping; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWN1cnJlbmN5LnBpcGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJsaWIvcGlwZXMvdHJhbnNsb2NvLWN1cnJlbmN5LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLGlCQUFpQixFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBQUUsS0FBSyxFQUFXLE1BQU0sbUJBQW1CLENBQUM7QUFDbkQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDOUMsT0FBTyxFQUFFLHVCQUF1QixFQUFFLGFBQWEsRUFBZ0IsTUFBTSw0QkFBNEIsQ0FBQztBQUNsRyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVyRSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQU05RCxNQUFNLE9BQU8scUJBQXNCLFNBQVEsbUJBQW1COzs7Ozs7O0lBQzVELFlBQ1ksc0JBQThDLEVBQzlDLEdBQXNCLEVBQ0QsWUFBMEIsRUFDaEIscUJBQXdDO1FBRWpGLEtBQUssQ0FBQyxzQkFBc0IsRUFBRSxHQUFHLENBQUMsQ0FBQztRQUx6QiwyQkFBc0IsR0FBdEIsc0JBQXNCLENBQXdCO1FBQzlDLFFBQUcsR0FB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3VycmVuY3k6ICdzeW1ib2wnIDoge21pbmltdW1GcmFjdGlvbkRpZ2l0czogMCB9IDogVVNEIC8vICQxLDAwMCwwMDBcbiAgICpcbiAgICovXG4gIHRyYW5zZm9ybShcbiAgICB2YWx1ZTogbnVtYmVyIHwgc3RyaW5nLFxuICAgIGRpc3BsYXk6ICdjb2RlJyB8ICdzeW1ib2wnIHwgJ25hbWUnID0gJ3N5bWJvbCcsXG4gICAgbnVtYmVyRm9ybWF0T3B0aW9uczogTnVtYmVyRm9ybWF0T3B0aW9ucyA9IHt9LFxuICAgIGN1cnJlbmN5Q29kZT86IEN1cnJlbmN5LFxuICAgIGxvY2FsZT86IExvY2FsZVxuICApOiBzdHJpbmcge1xuICAgIGlmIChpc05pbCh2YWx1ZSkpIHJldHVybiAnJztcbiAgICBsb2NhbGUgPSB0aGlzLmdldExvY2FsZShsb2NhbGUpO1xuXG4gICAgY29uc3Qgb3B0aW9ucyA9IHtcbiAgICAgIC4uLmdldERlZmF1bHRPcHRpb25zKGxvY2FsZSwgJ2N1cnJlbmN5JywgdGhpcy5sb2NhbGVDb25maWcpLFxuICAgICAgLi4ubnVtYmVyRm9ybWF0T3B0aW9ucyxcbiAgICAgIGN1cnJlbmN5RGlzcGxheTogZGlzcGxheSxcbiAgICAgIGN1cnJlbmN5OiBjdXJyZW5jeUNvZGUgfHwgdGhpcy50cmFuc2xvY29Mb2NhbGVTZXJ2aWNlLl9yZXNvbHZlQ3VycmVuY3lDb2RlKClcbiAgICB9O1xuICAgIHJldHVybiB0aGlzLnRyYW5zbG9jb0xvY2FsZVNlcnZpY2UubG9jYWxpemVOdW1iZXIodmFsdWUsICdjdXJyZW5jeScsIGxvY2FsZSwgb3B0aW9ucyk7XG4gIH1cbn1cbiJdfQ== |
@@ -7,3 +7,3 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { toDate, localizeDate } from '../helpers'; | ||
import { toDate } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
@@ -47,4 +47,3 @@ import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
locale = this.getLocale(locale); | ||
value = toDate(value); | ||
return localizeDate(value, locale, Object.assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
return this.translocoLocaleService.localizeDate(toDate(value), locale, Object.assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
} | ||
@@ -81,2 +80,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWRhdGUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi9waXBlcy90cmFuc2xvY28tZGF0ZS5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLGlCQUFpQixFQUFpQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sWUFBWSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUM5QyxPQUFPLEVBQUUsYUFBYSxFQUFnQixNQUFNLDRCQUE0QixDQUFDO0FBQ3pFLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRXJFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBTTlELE1BQU0sT0FBTyxpQkFBa0IsU0FBUSxtQkFBbUI7Ozs7OztJQUN4RCxZQUNZLHNCQUE4QyxFQUM5QyxHQUFzQixFQUNELFlBQTBCO1FBRXpELEtBQUssQ0FBQyxzQkFBc0IsRU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HtcbiAgICAgIC4uLmdldERlZmF1bHRPcHRpb25zKGxvY2FsZSwgJ2RhdGUnLCB0aGlzLmxvY2FsZUNvbmZpZyksXG4gICAgICAuLi5vcHRpb25zXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ== |
@@ -7,3 +7,2 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { localizeNumber } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
@@ -43,4 +42,4 @@ import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
/** @type {?} */ | ||
const options = Object.assign({ style: 'decimal' }, numberFormatOptions); | ||
return localizeNumber(value, locale, Object.assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), options)); | ||
const options = Object.assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'decimal', locale, options); | ||
} | ||
@@ -77,2 +76,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWRlY2ltYWwucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi9waXBlcy90cmFuc2xvY28tZGVjaW1hbC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixpQkFBaUIsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzFDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFDNUMsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQzlDLE9BQU8sRUFBRSxhQUFhLEVBQWdCLE1BQU0sNEJBQ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3JtKHZhbHVlOiBzdHJpbmcgfCBudW1iZXIsIG51bWJlckZvcm1hdE9wdGlvbnM6IE51bWJlckZvcm1hdE9wdGlvbnMgPSB7fSwgbG9jYWxlPzogTG9jYWxlKTogc3RyaW5nIHtcbiAgICBpZiAoaXNOaWwodmFsdWUpKSByZXR1cm4gJyc7XG4gICAgbG9jYWxlID0gdGhpcy5nZXRMb2NhbGUobG9jYWxlKTtcblxuICAgIGNvbnN0IG9wdGlvbnMgPSB7XG4gICAgICAuLi5nZXREZWZhdWx0T3B0aW9ucyhsb2NhbGUsICdkZWNpbWFsJywgdGhpcy5sb2NhbGVDb25maWcpLFxuICAgICAgLi4ubnVtYmVyRm9ybWF0T3B0aW9uc1xuICAgIH07XG4gICAgcmV0dXJuIHRoaXMudHJhbnNsb2NvTG9jYWxlU2VydmljZS5sb2NhbGl6ZU51bWJlcih2YWx1ZSwgJ2RlY2ltYWwnLCBsb2NhbGUsIG9wdGlvbnMpO1xuICB9XG59XG4iXX0= |
@@ -0,0 +0,0 @@ /** |
@@ -7,3 +7,2 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { localizeNumber } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
@@ -43,4 +42,4 @@ import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
/** @type {?} */ | ||
const options = Object.assign({ style: 'percent' }, numberFormatOptions); | ||
return localizeNumber(value, locale, Object.assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), options)); | ||
const options = Object.assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'percent', locale, options); | ||
} | ||
@@ -77,2 +76,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLXBlcmNlbnQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iL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BUcmFuc2Zvcm0gYSBnaXZlbiBudW1iZXIgaW50byB0aGUgbG9jYWxlJ3MgY3VycmVuY3kgZm9ybWF0LlxuICAgKlxuICAgKiBAZXhhbXBsZVxuICAgKlxuICAgKiAxIHwgdHJhbnNsb2NvUGVyY2VudCA6IHt9IDogZW4tVVMgLy8gMTAwJVxuICAgKiBcIjFcIiB8IHRyYW5zbG9jb1BlcmNlbnQgOiB7fSA6IGVuLVVTIC8vIDEwMCVcbiAgICpcbiAgICovXG4gIHRyYW5zZm9ybSh2YWx1ZTogbnVtYmVyIHwgc3RyaW5nLCBudW1iZXJGb3JtYXRPcHRpb25zOiBOdW1iZXJGb3JtYXRPcHRpb25zID0ge30sIGxvY2FsZT86IExvY2FsZSk6IHN0cmluZyB7XG4gICAgaWYgKGlzTmlsKHZhbHVlKSkgcmV0dXJuICcnO1xuICAgIGxvY2FsZSA9IHRoaXMuZ2V0TG9jYWxlKGxvY2FsZSk7XG5cbiAgICBjb25zdCBvcHRpb25zID0ge1xuICAgICAgLi4uZ2V0RGVmYXVsdE9wdGlvbnMobG9jYWxlLCAncGVyY2VudCcsIHRoaXMubG9jYWxlQ29uZmlnKSxcbiAgICAgIC4uLm51bWJlckZvcm1hdE9wdGlvbnNcbiAgICB9O1xuICAgIHJldHVybiB0aGlzLnRyYW5zbG9jb0xvY2FsZVNlcnZpY2UubG9jYWxpemVOdW1iZXIodmFsdWUsICdwZXJjZW50JywgbG9jYWxlLCBvcHRpb25zKTtcbiAgfVxufVxuIl19 |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -11,2 +11,3 @@ /** | ||
import { LOCALE_CURRENCY_MAPPING, LOCALE_LANG_MAPPING, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_CONFIG } from './transloco-locale.config'; | ||
import { TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer } from './transloco-locale.transformers'; | ||
/** @type {?} */ | ||
@@ -38,2 +39,10 @@ export const pipes = [TranslocoCurrencyPipe, TranslocoDatePipe, TranslocoDecimalPipe, TranslocoPercentPipe]; | ||
useValue: config.defaultLocale || defaultConfig.defaultLocale | ||
}, | ||
{ | ||
provide: TRANSLOCO_DATE_TRANSFORMER, | ||
useClass: DefaultDateTransformer | ||
}, | ||
{ | ||
provide: TRANSLOCO_NUMBER_TRANSFORMER, | ||
useClass: DefaultNumberTransformer | ||
} | ||
@@ -50,2 +59,2 @@ ] | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJsaWIvdHJhbnNsb2NvLWxvY2FsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBQzlELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ3hFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFFTCx1QkFBdUIsRUFDdkIsbUJBQW1CLEVBQ25CLGFBQWEsRUFDYixxQkFBcUIsRUFDckIsYUFBYSxFQUNkLE1BQU0sMkJBQTJCLENBQUM7O0FBRW5DLE1BQU0sT0FBTyxLQUFLLEdBQUcsQ0FBQyxxQkFBcUIsRUFBRSxpQkFBaUIsRUFBRSxvQkFBb0IsRUFBRSxvQkFBb0IsQ0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ZmlnXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBMT0NBTEVfQ1VSUkVOQ1lfTUFQUElORyxcbiAgICAgICAgICB1c2VWYWx1ZTogY29uZmlnLmxvY2FsZVRvQ3VycmVuY3lNYXBwaW5nIHx8IGRlZmF1bHRDb25maWcubG9jYWxlVG9DdXJyZW5jeU1hcHBpbmdcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IExPQ0FMRV9ERUZBVUxUX0xPQ0FMRSxcbiAgICAgICAgICB1c2VWYWx1ZTogY29uZmlnLmRlZmF1bHRMb2NhbGUgfHwgZGVmYXVsdENvbmZpZy5kZWZhdWx0TG9jYWxlXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBUUkFOU0xPQ09fREFURV9UUkFOU0ZPUk1FUixcbiAgICAgICAgICB1c2VDbGFzczogRGVmYXVsdERhdGVUcmFuc2Zvcm1lclxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogVFJBTlNMT0NPX05VTUJFUl9UUkFOU0ZPUk1FUixcbiAgICAgICAgICB1c2VDbGFzczogRGVmYXVsdE51bWJlclRyYW5zZm9ybWVyXG4gICAgICAgIH1cbiAgICAgIF1cbiAgICB9O1xuICB9XG59XG4iXX0= |
@@ -10,6 +10,9 @@ /** | ||
import { isLocaleFormat } from './helpers'; | ||
import { LOCALE_LANG_MAPPING, LOCALE_DEFAULT_LOCALE } from './transloco-locale.config'; | ||
import { getDefaultOptions } from './shared'; | ||
import { LOCALE_LANG_MAPPING, LOCALE_DEFAULT_LOCALE, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING } from './transloco-locale.config'; | ||
import { TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER } from './transloco-locale.transformers'; | ||
import * as i0 from "@angular/core"; | ||
import * as i1 from "@ngneat/transloco"; | ||
import * as i2 from "./transloco-locale.config"; | ||
import * as i3 from "./transloco-locale.transformers"; | ||
export class TranslocoLocaleService { | ||
@@ -20,7 +23,15 @@ /** | ||
* @param {?} defaultLocale | ||
* @param {?} localeConfig | ||
* @param {?} localeCurrencyMapping | ||
* @param {?} numberTransformer | ||
* @param {?} dateTransformer | ||
*/ | ||
constructor(translocoService, langLocaleMapping, defaultLocale) { | ||
constructor(translocoService, langLocaleMapping, defaultLocale, localeConfig, localeCurrencyMapping, numberTransformer, dateTransformer) { | ||
this.translocoService = translocoService; | ||
this.langLocaleMapping = langLocaleMapping; | ||
this.defaultLocale = defaultLocale; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
this.numberTransformer = numberTransformer; | ||
this.dateTransformer = dateTransformer; | ||
this._locale = defaultLocale || this.toLocale(this.translocoService.getActiveLang()); | ||
@@ -56,2 +67,51 @@ this.locale = new BehaviorSubject(this._locale); | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
localizeDate(date, locale = this.getLocale(), options) { | ||
options = options ? options : getDefaultOptions(locale, 'date', this.localeConfig); | ||
return this.dateTransformer.transform(date, locale, options); | ||
} | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
localizeNumber(value, type, locale = this.getLocale(), options) { | ||
options = options ? options : getDefaultOptions(locale, type, this.localeConfig); | ||
if (type === 'currency') { | ||
options = Object.assign({}, options, { currency: options.currency || this._resolveCurrencyCode(locale) }); | ||
} | ||
return this.numberTransformer.transform(value, type, locale, options); | ||
} | ||
/** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
_resolveCurrencyCode(locale = this.getLocale()) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
} | ||
/** | ||
* @private | ||
@@ -86,5 +146,9 @@ * @param {?} val | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_LANG_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_NUMBER_TRANSFORMER,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_DATE_TRANSFORMER,] }] } | ||
]; | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = i0.defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(i0.inject(i1.TranslocoService), i0.inject(i2.LOCALE_LANG_MAPPING), i0.inject(i2.LOCALE_DEFAULT_LOCALE)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = i0.defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(i0.inject(i1.TranslocoService), i0.inject(i2.LOCALE_LANG_MAPPING), i0.inject(i2.LOCALE_DEFAULT_LOCALE), i0.inject(i2.LOCALE_CONFIG), i0.inject(i2.LOCALE_CURRENCY_MAPPING), i0.inject(i3.TRANSLOCO_NUMBER_TRANSFORMER), i0.inject(i3.TRANSLOCO_DATE_TRANSFORMER)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
if (false) { | ||
@@ -123,3 +187,23 @@ /** @type {?} */ | ||
TranslocoLocaleService.prototype.defaultLocale; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.localeConfig; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.localeCurrencyMapping; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.numberTransformer; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.dateTransformer; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nbmVhdC90cmFuc2xvY28tbG9jYWxlLyIsInNvdXJjZXMiOlsibGliL3RyYW5zbG9jby1sb2NhbGUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFDLFVBQVUsRUFBRSxNQUFNLEVBQVksTUFBTSxlQUFlLENBQUM7QUFDNUQsT0FBTyxFQUFFLGdCQUFnQixFQUFXLE1BQU0sbUJBQW1CLENBQUM7QUFDOUQsT0FBTyxFQUFhLGVBQWUsRUFBZSxNQUFNLE1BQU0sQ0FBQztBQUMvRCxPQUFPLEVBQUUsR0FBRyxFQUFFLG9CQUFvQixFQUFFLE1B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cHBpbmdbdmFsXSkge1xuICAgICAgcmV0dXJuIHRoaXMubGFuZ0xvY2FsZU1hcHBpbmdbdmFsXTtcbiAgICB9XG5cbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIG5nT25EZXN0cm95KCkge1xuICAgIHRoaXMuc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7XG4gIH1cbn1cbiJdfQ== |
@@ -42,2 +42,3 @@ /** | ||
/** | ||
* Supported Intl calender types | ||
* @record | ||
@@ -58,2 +59,67 @@ */ | ||
/** | ||
* Number of fractional seconds to show | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.fractionalSecondDigits; | ||
/** | ||
* The way day periods should be displayed | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.dayPeriod; | ||
/** | ||
* The option for 12/24 hour display | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.hour12; | ||
/** | ||
* Locale matcher options | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.localeMatcher; | ||
/** | ||
* Format matcher options | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.formatMatcher; | ||
/** | ||
* The weekday formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.weekDay; | ||
/** | ||
* The era formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.era; | ||
/** | ||
* The year formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.year; | ||
/** | ||
* The Month formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.month; | ||
/** | ||
* The Day formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.day; | ||
/** | ||
* The Hour formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.hour; | ||
/** | ||
* The Minute formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.minute; | ||
/** | ||
* The Seconds formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.second; | ||
/** | ||
* The time zone to use. The only value implementations must recognize is "UTC"; the default is the runtime's default time zone. Implementations may also recognize the time zone names of the IANA time zone database, such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York". | ||
@@ -63,3 +129,8 @@ * @type {?|undefined} | ||
DateFormatOptions.prototype.timeZone; | ||
/** | ||
* The formatting for the time zone name | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.timeZoneName; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi90cmFuc2xvY28tbG9jYWxlLnR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSx5Q0F5QkM7Ozs7OztJQXJCQywwQ0FBc0Q7Ozs7O0lBSXRELG1EQUF3RTs7Ozs7SUFJeEUsb0RBQTBFOzs7OztJQUkxRSxvREFBMEU7Ozs7O0lBSTFFLHVEQUFnRjs7Ozs7SUFJaEYsdURBQWtDOzs7OztBQUdwQyx1Q0FhQzs7Ozs7O0lBVEMsc0NBQWlEOzs7OztJQUlqRCxzQ0FBaUQ7Ozs7O0lBSWpELHFDQUFrRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgTnVtYmVyRm9ybWF0T3B0aW9ucyB7XHJcbiAgLyoqXHJcbiAgICogV2hldGhlciB0byB1c2UgZ3JvdXBpbmcgc2VwYXJhdG9ycywgc3VjaCBhcyB0aG91c2FuZHMgc2VwYXJhdG9ycyBvciB0aG91c2FuZC9sYWtoL2Nyb3JlIHNlcGFyYXRvcnMuIFBvc3NpYmxlIHZhbHVlcyBhcmUgdHJ1ZSB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Vjb25kPzogRGF0ZU51bWJlckZvcm1hdHM7XHJcbiAgLyoqXHJcbiAgICogVGhlIHRpbWUgem9uZSB0byB1c2UuIFRoZSBvbmx5IHZhbHVlIGltcGxlbWVudGF0aW9ucyBtdXN0IHJlY29nbml6ZSBpcyBcIlVUQ1wiOyB0aGUgZGVmYXVsdCBpcyB0aGUgcnVudGltZSdzIGRlZmF1bHQgdGltZSB6b25lLiBJbXBsZW1lbnRhdGlvbnMgbWF5IGFsc28gcmVjb2duaXplIHRoZSB0aW1lIHpvbmUgbmFtZXMgb2YgdGhlIElBTkEgdGltZSB6b25lIGRhdGFiYXNlLCBzdWNoIGFzIFwiQXNpYS9TaGFuZ2hhaVwiLCBcIkFzaWEvS29sa2F0YVwiLCBcIkFtZXJpY2EvTmV3X1lvcmtcIi5cclxuICAgKi9cclxuICB0aW1lWm9uZT86IEludGwuRGF0ZVRpbWVGb3JtYXRPcHRpb25zWyd0aW1lWm9uZSddO1xyXG4gIC8qKlxyXG4gICAqIFRoZSBmb3JtYXR0aW5nIGZvciB0aGUgdGltZSB6b25lIG5hbWVcclxuICAgKi9cclxuICB0aW1lWm9uZU5hbWU/OiBUaW1lem9uZU5hbWVGb3JtYXRzO1xyXG59XHJcblxyXG4vL0JDUCA0NyBsb2NhbGUgc3RyaW5nIChlLmcuIGVuLVVTLCBlcy1FUykuXHJcbmV4cG9ydCB0eXBlIExvY2FsZSA9IHN0cmluZztcclxuXHJcbi8vSVNPIDQyMTcgY3VycmVuY3kgc3RyaW5nIChlLmcuIFVTRCwgRVVSKS5cclxuZXhwb3J0IHR5cGUgQ3VycmVuY3kgPSBzdHJpbmc7XHJcbiJdfQ== |
@@ -8,4 +8,4 @@ /** | ||
*/ | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe } from './public-api'; | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe, TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer } from './public-api'; | ||
export { TranslocoLocalePipe as ɵa } from './lib/pipes/transloco-locale.pipe'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmduZWF0LXRyYW5zbG9jby1sb2NhbGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJuZ25lYXQtdHJhbnNsb2NvLWxvY2FsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsOFBBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxtQkFBbUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcblxuZXhwb3J0IHtUcmFuc2xvY29Mb2NhbGVQaXBlIGFzIMm1YX0gZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWxvY2FsZS5waXBlJzsiXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmduZWF0LXRyYW5zbG9jby1sb2NhbGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJuZ25lYXQtdHJhbnNsb2NvLWxvY2FsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsMFdBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxtQkFBbUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcblxuZXhwb3J0IHtUcmFuc2xvY29Mb2NhbGVQaXBlIGFzIMm1YX0gZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWxvY2FsZS5waXBlJzsiXX0= |
@@ -16,2 +16,3 @@ /** | ||
export { TranslocoDecimalPipe } from './lib/pipes/transloco-decimal.pipe'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGtIQUFjLCtCQUErQixDQUFDO0FBQzlDLGVBQWMsOEJBQThCLENBQUM7QUFDN0MsNkNBQWMsK0JBQStCLENBQUM7QUFDOUMsa0NBQWMsaUNBQWlDLENBQUM7QUFDaEQsc0NBQWMscUNBQXFDLENBQUM7QUFDcEQscUNBQWMsb0NBQW9DLENBQUM7QUFDbkQscUNBQWMsb0NBQW9DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHRyYW5zbG9jby1sb2NhbGVcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS50eXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9waXBlcy90cmFuc2xvY28tZGF0ZS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1jdXJyZW5jeS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1wZXJjZW50LnBpcGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWRlY2ltYWwucGlwZSc7XG4iXX0= | ||
export { TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer } from './lib/transloco-locale.transformers'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGtIQUFjLCtCQUErQixDQUFDO0FBQzlDLGVBQWMsOEJBQThCLENBQUM7QUFDN0MsNkNBQWMsK0JBQStCLENBQUM7QUFDOUMsa0NBQWMsaUNBQWlDLENBQUM7QUFDaEQsc0NBQWMscUNBQXFDLENBQUM7QUFDcEQscUNBQWMsb0NBQW9DLENBQUM7QUFDbkQscUNBQWMsb0NBQW9DLENBQUM7QUFDbkQsMkhBQWMscUNBQXFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHRyYW5zbG9jby1sb2NhbGVcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS50eXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9waXBlcy90cmFuc2xvY28tZGF0ZS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1jdXJyZW5jeS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1wZXJjZW50LnBpcGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWRlY2ltYWwucGlwZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLnRyYW5zZm9ybWVycyc7XG4iXX0= |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -8,5 +8,4 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { localizeNumber } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
import { LOCALE_CURRENCY_MAPPING, LOCALE_CONFIG } from '../transloco-locale.config'; | ||
import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
import { TranslocoLocaleService } from '../transloco-locale.service'; | ||
@@ -16,3 +15,3 @@ import { TranslocoLocalePipe } from './transloco-locale.pipe'; | ||
tslib_1.__extends(TranslocoCurrencyPipe, _super); | ||
function TranslocoCurrencyPipe(translocoLocaleService, cdr, localeConfig, localeCurrencyMapping) { | ||
function TranslocoCurrencyPipe(translocoLocaleService, cdr, localeConfig) { | ||
var _this = _super.call(this, translocoLocaleService, cdr) || this; | ||
@@ -22,3 +21,2 @@ _this.translocoLocaleService = translocoLocaleService; | ||
_this.localeConfig = localeConfig; | ||
_this.localeCurrencyMapping = localeCurrencyMapping; | ||
return _this; | ||
@@ -75,18 +73,5 @@ } | ||
/** @type {?} */ | ||
var options = tslib_1.__assign({}, numberFormatOptions, { currencyDisplay: display, style: 'currency', currency: currencyCode || this.getCurrencyCode(this.translocoLocaleService.getLocale()) }); | ||
return localizeNumber(value, locale, tslib_1.__assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), options)); | ||
var options = tslib_1.__assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), numberFormatOptions, { currencyDisplay: display, currency: currencyCode || this.translocoLocaleService._resolveCurrencyCode() }); | ||
return this.translocoLocaleService.localizeNumber(value, 'currency', locale, options); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
TranslocoCurrencyPipe.prototype.getCurrencyCode = /** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
function (locale) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
}; | ||
TranslocoCurrencyPipe.decorators = [ | ||
@@ -102,4 +87,3 @@ { type: Pipe, args: [{ | ||
{ type: ChangeDetectorRef }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] } | ||
]; }; | ||
@@ -125,8 +109,3 @@ return TranslocoCurrencyPipe; | ||
TranslocoCurrencyPipe.prototype.localeConfig; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoCurr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2RlKClcbiAgICB9O1xuICAgIHJldHVybiB0aGlzLnRyYW5zbG9jb0xvY2FsZVNlcnZpY2UubG9jYWxpemVOdW1iZXIodmFsdWUsICdjdXJyZW5jeScsIGxvY2FsZSwgb3B0aW9ucyk7XG4gIH1cbn1cbiJdfQ== |
@@ -8,3 +8,3 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { toDate, localizeDate } from '../helpers'; | ||
import { toDate } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
@@ -78,4 +78,3 @@ import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
locale = this.getLocale(locale); | ||
value = toDate(value); | ||
return localizeDate(value, locale, tslib_1.__assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
return this.translocoLocaleService.localizeDate(toDate(value), locale, tslib_1.__assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
}; | ||
@@ -114,2 +113,2 @@ TranslocoDatePipe.decorators = [ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWRhdGUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi9waXBlcy90cmFuc2xvY28tZGF0ZS5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLElBQUksRUFBRSxpQkFBaUIsRUFBaUIsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQy9FLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUMxQyxPQUFPLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLFlBQVksQ0FBQztBQUNsRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDOUMsT0FBTyxFQUF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vbmU6ICdVVEMnLCB0aW1lU3R5bGU6ICdmdWxsJyB9IDogZW4tVVMgLy8gNzo0MDozMiBQTSBDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZVxuICAgKiAxIHwgdHJhbnNsb2NvRGF0ZTogeyBkYXRlU3R5bGU6ICdtZWRpdW0nIH0gLy8gSmFuIDEsIDE5NzBcbiAgICogJzIwMTktMDItMDgnIHwgdHJhbnNsb2NvRGF0ZTogeyBkYXRlU3R5bGU6ICdtZWRpdW0nIH0gLy8gRmViIDgsIDIwMTlcbiAgICovXG4gIHRyYW5zZm9ybSh2YWx1ZTogRGF0ZSB8IHN0cmluZyB8IG51bWJlciwgb3B0aW9uczogRGF0ZUZvcm1hdE9wdGlvbnMgPSB7fSwgbG9jYWxlPzogTG9jYWxlKSB7XG4gICAgaWYgKGlzTmlsKHZhbHVlKSkgcmV0dXJuICcnO1xuICAgIGxvY2FsZSA9IHRoaXMuZ2V0TG9jYWxlKGxvY2FsZSk7XG5cbiAgICByZXR1cm4gdGhpcy50cmFuc2xvY29Mb2NhbGVTZXJ2aWNlLmxvY2FsaXplRGF0ZSh0b0RhdGUodmFsdWUpLCBsb2NhbGUsIHtcbiAgICAgIC4uLmdldERlZmF1bHRPcHRpb25zKGxvY2FsZSwgJ2RhdGUnLCB0aGlzLmxvY2FsZUNvbmZpZyksXG4gICAgICAuLi5vcHRpb25zXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ== |
@@ -8,3 +8,2 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { localizeNumber } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
@@ -64,4 +63,4 @@ import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
/** @type {?} */ | ||
var options = tslib_1.__assign({ style: 'decimal' }, numberFormatOptions); | ||
return localizeNumber(value, locale, tslib_1.__assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), options)); | ||
var options = tslib_1.__assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'decimal', locale, options); | ||
}; | ||
@@ -100,2 +99,2 @@ TranslocoDecimalPipe.decorators = [ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWRlY2ltYWwucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi9waXBlcy90cmFuc2xvY28tZGVjaW1hbC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsaUJBQWlCLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQy9FLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUMxQyxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sWUFBWSxDQUFDO0FBQzVDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUM5QyxPQUFPLEVBQUUsYUFBYSxFQUFnQixNQUFNLDRCQUE0QixDQUFDO0FBQ3pFLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRXJFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRTlEO0lBSTBDLGdEQUFtQjtJQUMzRCw4QkFDWSxzQkFBOEMsRUFDOUMsR0FBc0IsRUFDRCxZQUEwQjtRQUgzRCxZQUtFLGtCQUFNLHNCQUFzQixFQUFFLEdBQUcsQ0FBQyxTQUNuQztRQUxXLDRCQUFzQixHQUF0QixzQkFBc0IsQ0FBd0I7UUFDOUMsU0FBRyxHQUFILEdBQUcsQ0FBbUI7UUFDRCxrQkFBWSxHQUFaLFlBQVksQ0FBYzs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AgaWYgKGlzTmlsKHZhbHVlKSkgcmV0dXJuICcnO1xuICAgIGxvY2FsZSA9IHRoaXMuZ2V0TG9jYWxlKGxvY2FsZSk7XG5cbiAgICBjb25zdCBvcHRpb25zID0ge1xuICAgICAgLi4uZ2V0RGVmYXVsdE9wdGlvbnMobG9jYWxlLCAnZGVjaW1hbCcsIHRoaXMubG9jYWxlQ29uZmlnKSxcbiAgICAgIC4uLm51bWJlckZvcm1hdE9wdGlvbnNcbiAgICB9O1xuICAgIHJldHVybiB0aGlzLnRyYW5zbG9jb0xvY2FsZVNlcnZpY2UubG9jYWxpemVOdW1iZXIodmFsdWUsICdkZWNpbWFsJywgbG9jYWxlLCBvcHRpb25zKTtcbiAgfVxufVxuIl19 |
@@ -0,0 +0,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
import { isNil } from '@ngneat/transloco'; | ||
import { localizeNumber } from '../helpers'; | ||
import { getDefaultOptions } from '../shared'; | ||
@@ -64,4 +63,4 @@ import { LOCALE_CONFIG } from '../transloco-locale.config'; | ||
/** @type {?} */ | ||
var options = tslib_1.__assign({ style: 'percent' }, numberFormatOptions); | ||
return localizeNumber(value, locale, tslib_1.__assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), options)); | ||
var options = tslib_1.__assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'percent', locale, options); | ||
}; | ||
@@ -100,2 +99,2 @@ TranslocoPercentPipe.decorators = [ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLXBlcmNlbnQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi9waXBlcy90cmFuc2xvY28tcGVyY2VudC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ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ultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_CONFIG } from './transloco-locale.config'; | ||
import { TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer } from './transloco-locale.transformers'; | ||
/** @type {?} */ | ||
@@ -45,2 +46,10 @@ export var pipes = [TranslocoCurrencyPipe, TranslocoDatePipe, TranslocoDecimalPipe, TranslocoPercentPipe]; | ||
useValue: config.defaultLocale || defaultConfig.defaultLocale | ||
}, | ||
{ | ||
provide: TRANSLOCO_DATE_TRANSFORMER, | ||
useClass: DefaultDateTransformer | ||
}, | ||
{ | ||
provide: TRANSLOCO_NUMBER_TRANSFORMER, | ||
useClass: DefaultNumberTransformer | ||
} | ||
@@ -59,2 +68,2 @@ ] | ||
export { TranslocoLocaleModule }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJsaWIvdHJhbnNsb2NvLWxvY2FsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBQzlELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ3hFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFFTCx1QkFBdUIsRUFDdkIsbUJBQW1CLEVBQ25CLGFBQWEsRUF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4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBUcmFuc2xvY29Mb2NhbGVNb2R1bGUsXG4gICAgICBwcm92aWRlcnM6IFtcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IExPQ0FMRV9MQU5HX01BUFBJTkcsXG4gICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZy5sYW5nVG9Mb2NhbGVNYXBwaW5nIHx8IGRlZmF1bHRDb25maWcubGFuZ1RvTG9jYWxlTWFwcGluZ1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogTE9DQUxFX0NPTkZJRyxcbiAgICAgICAgICB1c2VWYWx1ZTogY29uZmlnLmxvY2FsZUNvbmZpZyB8fCBkZWZhdWx0Q29uZmlnLmxvY2FsZUNvbmZpZ1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogTE9DQUxFX0NVUlJFTkNZX01BUFBJTkcsXG4gICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZy5sb2NhbGVUb0N1cnJlbmN5TWFwcGluZyB8fCBkZWZhdWx0Q29uZmlnLmxvY2FsZVRvQ3VycmVuY3lNYXBwaW5nXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm92aWRlOiBMT0NBTEVfREVGQVVMVF9MT0NBTEUsXG4gICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZy5kZWZhdWx0TG9jYWxlIHx8IGRlZmF1bHRDb25maWcuZGVmYXVsdExvY2FsZVxuICAgICAgICB9XG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJsaWIvdHJhbnNsb2NvLWxvY2F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,2 +5,3 @@ /** | ||
*/ | ||
import * as tslib_1 from "tslib"; | ||
import { Injectable, Inject } from '@angular/core'; | ||
@@ -11,11 +12,18 @@ import { TranslocoService } from '@ngneat/transloco'; | ||
import { isLocaleFormat } from './helpers'; | ||
import { LOCALE_LANG_MAPPING, LOCALE_DEFAULT_LOCALE } from './transloco-locale.config'; | ||
import { getDefaultOptions } from './shared'; | ||
import { LOCALE_LANG_MAPPING, LOCALE_DEFAULT_LOCALE, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING } from './transloco-locale.config'; | ||
import { TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER } from './transloco-locale.transformers'; | ||
import * as i0 from "@angular/core"; | ||
import * as i1 from "@ngneat/transloco"; | ||
import * as i2 from "./transloco-locale.config"; | ||
import * as i3 from "./transloco-locale.transformers"; | ||
var TranslocoLocaleService = /** @class */ (function () { | ||
function TranslocoLocaleService(translocoService, langLocaleMapping, defaultLocale) { | ||
function TranslocoLocaleService(translocoService, langLocaleMapping, defaultLocale, localeConfig, localeCurrencyMapping, numberTransformer, dateTransformer) { | ||
this.translocoService = translocoService; | ||
this.langLocaleMapping = langLocaleMapping; | ||
this.defaultLocale = defaultLocale; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
this.numberTransformer = numberTransformer; | ||
this.dateTransformer = dateTransformer; | ||
this._locale = defaultLocale || this.toLocale(this.translocoService.getActiveLang()); | ||
@@ -58,2 +66,113 @@ this.locale = new BehaviorSubject(this._locale); | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* @example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
*/ | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype.localizeDate = /** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
function (date, locale, options) { | ||
if (locale === void 0) { locale = this.getLocale(); } | ||
options = options ? options : getDefaultOptions(locale, 'date', this.localeConfig); | ||
return this.dateTransformer.transform(date, locale, options); | ||
}; | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
*/ | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype.localizeNumber = /** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
function (value, type, locale, options) { | ||
if (locale === void 0) { locale = this.getLocale(); } | ||
options = options ? options : getDefaultOptions(locale, type, this.localeConfig); | ||
if (type === 'currency') { | ||
options = tslib_1.__assign({}, options, { currency: options.currency || this._resolveCurrencyCode(locale) }); | ||
} | ||
return this.numberTransformer.transform(value, type, locale, options); | ||
}; | ||
/** | ||
* @internal | ||
*/ | ||
/** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype._resolveCurrencyCode = /** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
function (locale) { | ||
if (locale === void 0) { locale = this.getLocale(); } | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
}; | ||
/** | ||
* @private | ||
@@ -95,5 +214,9 @@ * @param {?} val | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_LANG_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_NUMBER_TRANSFORMER,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_DATE_TRANSFORMER,] }] } | ||
]; }; | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = i0.defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(i0.inject(i1.TranslocoService), i0.inject(i2.LOCALE_LANG_MAPPING), i0.inject(i2.LOCALE_DEFAULT_LOCALE)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = i0.defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(i0.inject(i1.TranslocoService), i0.inject(i2.LOCALE_LANG_MAPPING), i0.inject(i2.LOCALE_DEFAULT_LOCALE), i0.inject(i2.LOCALE_CONFIG), i0.inject(i2.LOCALE_CURRENCY_MAPPING), i0.inject(i3.TRANSLOCO_NUMBER_TRANSFORMER), i0.inject(i3.TRANSLOCO_DATE_TRANSFORMER)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
return TranslocoLocaleService; | ||
@@ -135,3 +258,23 @@ }()); | ||
TranslocoLocaleService.prototype.defaultLocale; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.localeConfig; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.localeCurrencyMapping; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.numberTransformer; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
TranslocoLocaleService.prototype.dateTransformer; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nbmVhdC90cmFuc2xvY28tbG9jYWxlLyIsInNvdXJjZXMiOlsibGliL3RyYW5zbG9jby1sb2NhbGUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFDLFVBQVUsRUFBRSxNQUFNLEVBQVksTUFBTSxlQUFlLENBQUM7QUFDNUQsT0FBTyxFQUFFLGdCQUFnQixFQUFXLE1BQU0sbUJBQW1CLENBQUM7QUFDOUQsT0FBTyxFQUFhLGVBQWUsRUFBZSxNQUFNLE1BQU0sQ0FBQztBQUMvRCxPQUFPLEVBQUUsR0FBRyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ25FLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDM0MsT0FBTyxFQUFFLG1CQUFtQixFQUFFLHFCQUFxQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7Ozs7QUFHdkY7SUFTRSxnQ0FDVSxnQkFBa0MsRUFDTCxpQkFBa0MsRUFDaEMsYUFBcUI7UUFGcEQscUJBQWdCLEdBQWhCLGdCQUFnQixDQUFrQjtRQUNMLHNCQUFpQixHQUFqQixpQkFBaUIsQ0FBaUI7UUFDaEMsa0JBQWEsR0FBYixhQUFhLENBQVE7UUFFNUQsSUFBSSxDQUFDLE9BQU8sR0FBRyxhQUFhLElBQUksSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMs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1hcHBpbmdbdmFsXTtcbiAgICB9XG5cbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIG5nT25EZXN0cm95KCkge1xuICAgIHRoaXMuc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7XG4gIH1cbn1cbiJdfQ== |
@@ -42,2 +42,3 @@ /** | ||
/** | ||
* Supported Intl calender types | ||
* @record | ||
@@ -58,2 +59,67 @@ */ | ||
/** | ||
* Number of fractional seconds to show | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.fractionalSecondDigits; | ||
/** | ||
* The way day periods should be displayed | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.dayPeriod; | ||
/** | ||
* The option for 12/24 hour display | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.hour12; | ||
/** | ||
* Locale matcher options | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.localeMatcher; | ||
/** | ||
* Format matcher options | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.formatMatcher; | ||
/** | ||
* The weekday formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.weekDay; | ||
/** | ||
* The era formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.era; | ||
/** | ||
* The year formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.year; | ||
/** | ||
* The Month formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.month; | ||
/** | ||
* The Day formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.day; | ||
/** | ||
* The Hour formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.hour; | ||
/** | ||
* The Minute formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.minute; | ||
/** | ||
* The Seconds formatting style | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.second; | ||
/** | ||
* The time zone to use. The only value implementations must recognize is "UTC"; the default is the runtime's default time zone. Implementations may also recognize the time zone names of the IANA time zone database, such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York". | ||
@@ -63,3 +129,8 @@ * @type {?|undefined} | ||
DateFormatOptions.prototype.timeZone; | ||
/** | ||
* The formatting for the time zone name | ||
* @type {?|undefined} | ||
*/ | ||
DateFormatOptions.prototype.timeZoneName; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsb2NvLWxvY2FsZS50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbImxpYi90cmFuc2xvY28tbG9jYWxlLnR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSx5Q0F5QkM7Ozs7OztJQXJCQywwQ0FBc0Q7Ozs7O0lBSXRELG1EQUF3RTs7Ozs7SUFJeEUsb0RBQTBFOzs7OztJQUkxRSxvREFBMEU7Ozs7O0lBSTFFLHVEQUFnRjs7Ozs7SUFJaEYsdURBQWtDOzs7OztBQUdwQyx1Q0FhQzs7Ozs7O0lBVEMsc0NBQWlEOzs7OztJQUlqRCxzQ0FBaUQ7Ozs7O0lBSWpELHFDQUFrRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgTnVtYmVyRm9ybWF0T3B0aW9ucyB7XHJcbiAgLyoqXHJcbiAgICogV2hldGhlciB0byB1c2UgZ3JvdXBpbmcgc2VwYXJhdG9ycywgc3VjaCBhcyB0aG91c2FuZHMgc2VwYXJhdG9ycyBvciB0aG91c2FuZC9sYWtoL2Nyb3JlIHNlcGFyYXRvcnMuIFBvc3NpYmxlIHZhbHVlcyBhcmUgdHJ1ZSBhbmQgZmFsc2U7IHRoZSBkZWZhdWx0IGlzIHRydWUuXHJcbiAgICovXHJcb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GhlIHRpbWUgem9uZSB0byB1c2UuIFRoZSBvbmx5IHZhbHVlIGltcGxlbWVudGF0aW9ucyBtdXN0IHJlY29nbml6ZSBpcyBcIlVUQ1wiOyB0aGUgZGVmYXVsdCBpcyB0aGUgcnVudGltZSdzIGRlZmF1bHQgdGltZSB6b25lLiBJbXBsZW1lbnRhdGlvbnMgbWF5IGFsc28gcmVjb2duaXplIHRoZSB0aW1lIHpvbmUgbmFtZXMgb2YgdGhlIElBTkEgdGltZSB6b25lIGRhdGFiYXNlLCBzdWNoIGFzIFwiQXNpYS9TaGFuZ2hhaVwiLCBcIkFzaWEvS29sa2F0YVwiLCBcIkFtZXJpY2EvTmV3X1lvcmtcIi5cclxuICAgKi9cclxuICB0aW1lWm9uZT86IEludGwuRGF0ZVRpbWVGb3JtYXRPcHRpb25zWyd0aW1lWm9uZSddO1xyXG4gIC8qKlxyXG4gICAqIFRoZSBmb3JtYXR0aW5nIGZvciB0aGUgdGltZSB6b25lIG5hbWVcclxuICAgKi9cclxuICB0aW1lWm9uZU5hbWU/OiBUaW1lem9uZU5hbWVGb3JtYXRzO1xyXG59XHJcblxyXG4vL0JDUCA0NyBsb2NhbGUgc3RyaW5nIChlLmcuIGVuLVVTLCBlcy1FUykuXHJcbmV4cG9ydCB0eXBlIExvY2FsZSA9IHN0cmluZztcclxuXHJcbi8vSVNPIDQyMTcgY3VycmVuY3kgc3RyaW5nIChlLmcuIFVTRCwgRVVSKS5cclxuZXhwb3J0IHR5cGUgQ3VycmVuY3kgPSBzdHJpbmc7XHJcbiJdfQ== |
@@ -8,4 +8,4 @@ /** | ||
*/ | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe } from './public-api'; | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe, TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer } from './public-api'; | ||
export { TranslocoLocalePipe as ɵa } from './lib/pipes/transloco-locale.pipe'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmduZWF0LXRyYW5zbG9jby1sb2NhbGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJuZ25lYXQtdHJhbnNsb2NvLWxvY2FsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsOFBBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxtQkFBbUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcblxuZXhwb3J0IHtUcmFuc2xvY29Mb2NhbGVQaXBlIGFzIMm1YX0gZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWxvY2FsZS5waXBlJzsiXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmduZWF0LXRyYW5zbG9jby1sb2NhbGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbmduZWF0L3RyYW5zbG9jby1sb2NhbGUvIiwic291cmNlcyI6WyJuZ25lYXQtdHJhbnNsb2NvLWxvY2FsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsMFdBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxtQkFBbUIsSUFBSSxFQUFFLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcblxuZXhwb3J0IHtUcmFuc2xvY29Mb2NhbGVQaXBlIGFzIMm1YX0gZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWxvY2FsZS5waXBlJzsiXX0= |
@@ -16,2 +16,3 @@ /** | ||
export { TranslocoDecimalPipe } from './lib/pipes/transloco-decimal.pipe'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGtIQUFjLCtCQUErQixDQUFDO0FBQzlDLGVBQWMsOEJBQThCLENBQUM7QUFDN0MsNkNBQWMsK0JBQStCLENBQUM7QUFDOUMsa0NBQWMsaUNBQWlDLENBQUM7QUFDaEQsc0NBQWMscUNBQXFDLENBQUM7QUFDcEQscUNBQWMsb0NBQW9DLENBQUM7QUFDbkQscUNBQWMsb0NBQW9DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHRyYW5zbG9jby1sb2NhbGVcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS50eXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9waXBlcy90cmFuc2xvY28tZGF0ZS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1jdXJyZW5jeS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1wZXJjZW50LnBpcGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWRlY2ltYWwucGlwZSc7XG4iXX0= | ||
export { TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer } from './lib/transloco-locale.transformers'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ25lYXQvdHJhbnNsb2NvLWxvY2FsZS8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGtIQUFjLCtCQUErQixDQUFDO0FBQzlDLGVBQWMsOEJBQThCLENBQUM7QUFDN0MsNkNBQWMsK0JBQStCLENBQUM7QUFDOUMsa0NBQWMsaUNBQWlDLENBQUM7QUFDaEQsc0NBQWMscUNBQXFDLENBQUM7QUFDcEQscUNBQWMsb0NBQW9DLENBQUM7QUFDbkQscUNBQWMsb0NBQW9DLENBQUM7QUFDbkQsMkhBQWMscUNBQXFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHRyYW5zbG9jby1sb2NhbGVcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsb2NvLWxvY2FsZS50eXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9waXBlcy90cmFuc2xvY28tZGF0ZS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1jdXJyZW5jeS5waXBlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RyYW5zbG9jby1wZXJjZW50LnBpcGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvdHJhbnNsb2NvLWRlY2ltYWwucGlwZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xvY28tbG9jYWxlLnRyYW5zZm9ybWVycyc7XG4iXX0= |
import { BehaviorSubject } from 'rxjs'; | ||
import { map, distinctUntilChanged, filter } from 'rxjs/operators'; | ||
import { InjectionToken, Injectable, Inject, Pipe, ChangeDetectorRef, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { InjectionToken, Injectable, Inject, NgModule, Pipe, ChangeDetectorRef, defineInjectable, inject } from '@angular/core'; | ||
import { toNumber, TranslocoService, isNil } from '@ngneat/transloco'; | ||
@@ -119,2 +119,20 @@ | ||
*/ | ||
/** | ||
* @param {?} locale | ||
* @param {?} type | ||
* @param {?} localeConfig | ||
* @return {?} | ||
*/ | ||
function getDefaultOptions(locale, type, localeConfig) { | ||
/** @type {?} */ | ||
const defaultConfig = localeConfig.global[type] || {}; | ||
/** @type {?} */ | ||
const settings = localeConfig.localeBased[locale]; | ||
return settings && settings[type] ? Object.assign({}, defaultConfig, settings[type]) : defaultConfig; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var LOCALE_CURRENCY = { | ||
@@ -798,2 +816,34 @@ "aa-DJ": "DJF", | ||
*/ | ||
/** @type {?} */ | ||
const TRANSLOCO_DATE_TRANSFORMER = new InjectionToken('TRANSLOCO_DATE_TRANSFORMER'); | ||
/** @type {?} */ | ||
const TRANSLOCO_NUMBER_TRANSFORMER = new InjectionToken('TRANSLOCO_NUMBER_TRANSFORMER'); | ||
class DefaultDateTransformer { | ||
/** | ||
* @param {?} date | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
transform(date, locale, options) { | ||
return localizeDate(date, locale, options); | ||
} | ||
} | ||
class DefaultNumberTransformer { | ||
/** | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
transform(value, type, locale, options) { | ||
return localizeNumber(value, locale, Object.assign({}, options, { style: type })); | ||
} | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
class TranslocoLocaleService { | ||
@@ -804,7 +854,15 @@ /** | ||
* @param {?} defaultLocale | ||
* @param {?} localeConfig | ||
* @param {?} localeCurrencyMapping | ||
* @param {?} numberTransformer | ||
* @param {?} dateTransformer | ||
*/ | ||
constructor(translocoService, langLocaleMapping, defaultLocale) { | ||
constructor(translocoService, langLocaleMapping, defaultLocale, localeConfig, localeCurrencyMapping, numberTransformer, dateTransformer) { | ||
this.translocoService = translocoService; | ||
this.langLocaleMapping = langLocaleMapping; | ||
this.defaultLocale = defaultLocale; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
this.numberTransformer = numberTransformer; | ||
this.dateTransformer = dateTransformer; | ||
this._locale = defaultLocale || this.toLocale(this.translocoService.getActiveLang()); | ||
@@ -840,2 +898,51 @@ this.locale = new BehaviorSubject(this._locale); | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
localizeDate(date, locale = this.getLocale(), options) { | ||
options = options ? options : getDefaultOptions(locale, 'date', this.localeConfig); | ||
return this.dateTransformer.transform(date, locale, options); | ||
} | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
localizeNumber(value, type, locale = this.getLocale(), options) { | ||
options = options ? options : getDefaultOptions(locale, type, this.localeConfig); | ||
if (type === 'currency') { | ||
options = Object.assign({}, options, { currency: options.currency || this._resolveCurrencyCode(locale) }); | ||
} | ||
return this.numberTransformer.transform(value, type, locale, options); | ||
} | ||
/** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
_resolveCurrencyCode(locale = this.getLocale()) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
} | ||
/** | ||
* @private | ||
@@ -870,5 +977,9 @@ * @param {?} val | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_LANG_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_NUMBER_TRANSFORMER,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_DATE_TRANSFORMER,] }] } | ||
]; | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(inject(TranslocoService), inject(LOCALE_LANG_MAPPING), inject(LOCALE_DEFAULT_LOCALE)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(inject(TranslocoService), inject(LOCALE_LANG_MAPPING), inject(LOCALE_DEFAULT_LOCALE), inject(LOCALE_CONFIG), inject(LOCALE_CURRENCY_MAPPING), inject(TRANSLOCO_NUMBER_TRANSFORMER), inject(TRANSLOCO_DATE_TRANSFORMER)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
@@ -884,20 +995,2 @@ /** | ||
*/ | ||
/** | ||
* @param {?} locale | ||
* @param {?} type | ||
* @param {?} localeConfig | ||
* @return {?} | ||
*/ | ||
function getDefaultOptions(locale, type, localeConfig) { | ||
/** @type {?} */ | ||
const defaultConfig = localeConfig.global[type] || {}; | ||
/** @type {?} */ | ||
const settings = localeConfig.localeBased[locale]; | ||
return settings && settings[type] ? Object.assign({}, defaultConfig, settings[type]) : defaultConfig; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
class TranslocoLocalePipe { | ||
@@ -943,5 +1036,4 @@ /** | ||
* @param {?} localeConfig | ||
* @param {?} localeCurrencyMapping | ||
*/ | ||
constructor(translocoLocaleService, cdr, localeConfig, localeCurrencyMapping) { | ||
constructor(translocoLocaleService, cdr, localeConfig) { | ||
super(translocoLocaleService, cdr); | ||
@@ -951,3 +1043,2 @@ this.translocoLocaleService = translocoLocaleService; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
} | ||
@@ -975,13 +1066,5 @@ /** | ||
/** @type {?} */ | ||
const options = Object.assign({}, numberFormatOptions, { currencyDisplay: display, style: 'currency', currency: currencyCode || this.getCurrencyCode(this.translocoLocaleService.getLocale()) }); | ||
return localizeNumber(value, locale, Object.assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), options)); | ||
const options = Object.assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), numberFormatOptions, { currencyDisplay: display, currency: currencyCode || this.translocoLocaleService._resolveCurrencyCode() }); | ||
return this.translocoLocaleService.localizeNumber(value, 'currency', locale, options); | ||
} | ||
/** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
getCurrencyCode(locale) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
} | ||
} | ||
@@ -998,4 +1081,3 @@ TranslocoCurrencyPipe.decorators = [ | ||
{ type: ChangeDetectorRef }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] } | ||
]; | ||
@@ -1041,4 +1123,3 @@ | ||
locale = this.getLocale(locale); | ||
value = toDate(value); | ||
return localizeDate(value, locale, Object.assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
return this.translocoLocaleService.localizeDate(toDate(value), locale, Object.assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
} | ||
@@ -1093,4 +1174,4 @@ } | ||
/** @type {?} */ | ||
const options = Object.assign({ style: 'decimal' }, numberFormatOptions); | ||
return localizeNumber(value, locale, Object.assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), options)); | ||
const options = Object.assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'decimal', locale, options); | ||
} | ||
@@ -1145,4 +1226,4 @@ } | ||
/** @type {?} */ | ||
const options = Object.assign({ style: 'percent' }, numberFormatOptions); | ||
return localizeNumber(value, locale, Object.assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), options)); | ||
const options = Object.assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'percent', locale, options); | ||
} | ||
@@ -1193,2 +1274,10 @@ } | ||
useValue: config.defaultLocale || defaultConfig.defaultLocale | ||
}, | ||
{ | ||
provide: TRANSLOCO_DATE_TRANSFORMER, | ||
useClass: DefaultDateTransformer | ||
}, | ||
{ | ||
provide: TRANSLOCO_NUMBER_TRANSFORMER, | ||
useClass: DefaultNumberTransformer | ||
} | ||
@@ -1216,4 +1305,4 @@ ] | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe, TranslocoLocalePipe as ɵa }; | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe, TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer, TranslocoLocalePipe as ɵa }; | ||
//# sourceMappingURL=ngneat-transloco-locale.js.map |
import { BehaviorSubject } from 'rxjs'; | ||
import { map, distinctUntilChanged, filter } from 'rxjs/operators'; | ||
import { __extends, __assign, __read } from 'tslib'; | ||
import { InjectionToken, Injectable, Inject, NgModule, Pipe, ChangeDetectorRef, defineInjectable, inject } from '@angular/core'; | ||
import { __assign, __extends, __read } from 'tslib'; | ||
import { InjectionToken, Injectable, Inject, NgModule, defineInjectable, inject, Pipe, ChangeDetectorRef } from '@angular/core'; | ||
import { toNumber, TranslocoService, isNil } from '@ngneat/transloco'; | ||
@@ -120,2 +120,20 @@ | ||
*/ | ||
/** | ||
* @param {?} locale | ||
* @param {?} type | ||
* @param {?} localeConfig | ||
* @return {?} | ||
*/ | ||
function getDefaultOptions(locale, type, localeConfig) { | ||
/** @type {?} */ | ||
var defaultConfig = localeConfig.global[type] || {}; | ||
/** @type {?} */ | ||
var settings = localeConfig.localeBased[locale]; | ||
return settings && settings[type] ? __assign({}, defaultConfig, settings[type]) : defaultConfig; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var LOCALE_CURRENCY = { | ||
@@ -799,7 +817,62 @@ "aa-DJ": "DJF", | ||
*/ | ||
/** @type {?} */ | ||
var TRANSLOCO_DATE_TRANSFORMER = new InjectionToken('TRANSLOCO_DATE_TRANSFORMER'); | ||
/** @type {?} */ | ||
var TRANSLOCO_NUMBER_TRANSFORMER = new InjectionToken('TRANSLOCO_NUMBER_TRANSFORMER'); | ||
var DefaultDateTransformer = /** @class */ (function () { | ||
function DefaultDateTransformer() { | ||
} | ||
/** | ||
* @param {?} date | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
DefaultDateTransformer.prototype.transform = /** | ||
* @param {?} date | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
function (date, locale, options) { | ||
return localizeDate(date, locale, options); | ||
}; | ||
return DefaultDateTransformer; | ||
}()); | ||
var DefaultNumberTransformer = /** @class */ (function () { | ||
function DefaultNumberTransformer() { | ||
} | ||
/** | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
DefaultNumberTransformer.prototype.transform = /** | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?} locale | ||
* @param {?} options | ||
* @return {?} | ||
*/ | ||
function (value, type, locale, options) { | ||
return localizeNumber(value, locale, __assign({}, options, { style: type })); | ||
}; | ||
return DefaultNumberTransformer; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var TranslocoLocaleService = /** @class */ (function () { | ||
function TranslocoLocaleService(translocoService, langLocaleMapping, defaultLocale) { | ||
function TranslocoLocaleService(translocoService, langLocaleMapping, defaultLocale, localeConfig, localeCurrencyMapping, numberTransformer, dateTransformer) { | ||
this.translocoService = translocoService; | ||
this.langLocaleMapping = langLocaleMapping; | ||
this.defaultLocale = defaultLocale; | ||
this.localeConfig = localeConfig; | ||
this.localeCurrencyMapping = localeCurrencyMapping; | ||
this.numberTransformer = numberTransformer; | ||
this.dateTransformer = dateTransformer; | ||
this._locale = defaultLocale || this.toLocale(this.translocoService.getActiveLang()); | ||
@@ -842,2 +915,113 @@ this.locale = new BehaviorSubject(this._locale); | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* @example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
*/ | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype.localizeDate = /** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* \@example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
* @param {?} date | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
function (date, locale, options) { | ||
if (locale === void 0) { locale = this.getLocale(); } | ||
options = options ? options : getDefaultOptions(locale, 'date', this.localeConfig); | ||
return this.dateTransformer.transform(date, locale, options); | ||
}; | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
*/ | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype.localizeNumber = /** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
* @param {?} value | ||
* @param {?} type | ||
* @param {?=} locale | ||
* @param {?=} options | ||
* @return {?} | ||
*/ | ||
function (value, type, locale, options) { | ||
if (locale === void 0) { locale = this.getLocale(); } | ||
options = options ? options : getDefaultOptions(locale, type, this.localeConfig); | ||
if (type === 'currency') { | ||
options = __assign({}, options, { currency: options.currency || this._resolveCurrencyCode(locale) }); | ||
} | ||
return this.numberTransformer.transform(value, type, locale, options); | ||
}; | ||
/** | ||
* @internal | ||
*/ | ||
/** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
TranslocoLocaleService.prototype._resolveCurrencyCode = /** | ||
* \@internal | ||
* @param {?=} locale | ||
* @return {?} | ||
*/ | ||
function (locale) { | ||
if (locale === void 0) { locale = this.getLocale(); } | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
}; | ||
/** | ||
* @private | ||
@@ -879,5 +1063,9 @@ * @param {?} val | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_LANG_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_DEFAULT_LOCALE,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_NUMBER_TRANSFORMER,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [TRANSLOCO_DATE_TRANSFORMER,] }] } | ||
]; }; | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(inject(TranslocoService), inject(LOCALE_LANG_MAPPING), inject(LOCALE_DEFAULT_LOCALE)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
/** @nocollapse */ TranslocoLocaleService.ngInjectableDef = defineInjectable({ factory: function TranslocoLocaleService_Factory() { return new TranslocoLocaleService(inject(TranslocoService), inject(LOCALE_LANG_MAPPING), inject(LOCALE_DEFAULT_LOCALE), inject(LOCALE_CONFIG), inject(LOCALE_CURRENCY_MAPPING), inject(TRANSLOCO_NUMBER_TRANSFORMER), inject(TRANSLOCO_DATE_TRANSFORMER)); }, token: TranslocoLocaleService, providedIn: "root" }); | ||
return TranslocoLocaleService; | ||
@@ -895,20 +1083,2 @@ }()); | ||
*/ | ||
/** | ||
* @param {?} locale | ||
* @param {?} type | ||
* @param {?} localeConfig | ||
* @return {?} | ||
*/ | ||
function getDefaultOptions(locale, type, localeConfig) { | ||
/** @type {?} */ | ||
var defaultConfig = localeConfig.global[type] || {}; | ||
/** @type {?} */ | ||
var settings = localeConfig.localeBased[locale]; | ||
return settings && settings[type] ? __assign({}, defaultConfig, settings[type]) : defaultConfig; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var TranslocoLocalePipe = /** @class */ (function () { | ||
@@ -957,3 +1127,3 @@ function TranslocoLocalePipe(translocoLocaleService, cdr) { | ||
__extends(TranslocoCurrencyPipe, _super); | ||
function TranslocoCurrencyPipe(translocoLocaleService, cdr, localeConfig, localeCurrencyMapping) { | ||
function TranslocoCurrencyPipe(translocoLocaleService, cdr, localeConfig) { | ||
var _this = _super.call(this, translocoLocaleService, cdr) || this; | ||
@@ -963,3 +1133,2 @@ _this.translocoLocaleService = translocoLocaleService; | ||
_this.localeConfig = localeConfig; | ||
_this.localeCurrencyMapping = localeCurrencyMapping; | ||
return _this; | ||
@@ -1016,18 +1185,5 @@ } | ||
/** @type {?} */ | ||
var options = __assign({}, numberFormatOptions, { currencyDisplay: display, style: 'currency', currency: currencyCode || this.getCurrencyCode(this.translocoLocaleService.getLocale()) }); | ||
return localizeNumber(value, locale, __assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), options)); | ||
var options = __assign({}, getDefaultOptions(locale, 'currency', this.localeConfig), numberFormatOptions, { currencyDisplay: display, currency: currencyCode || this.translocoLocaleService._resolveCurrencyCode() }); | ||
return this.translocoLocaleService.localizeNumber(value, 'currency', locale, options); | ||
}; | ||
/** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
TranslocoCurrencyPipe.prototype.getCurrencyCode = /** | ||
* @private | ||
* @param {?} locale | ||
* @return {?} | ||
*/ | ||
function (locale) { | ||
return this.localeCurrencyMapping[locale] || 'USD'; | ||
}; | ||
TranslocoCurrencyPipe.decorators = [ | ||
@@ -1043,4 +1199,3 @@ { type: Pipe, args: [{ | ||
{ type: ChangeDetectorRef }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CURRENCY_MAPPING,] }] } | ||
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_CONFIG,] }] } | ||
]; }; | ||
@@ -1118,4 +1273,3 @@ return TranslocoCurrencyPipe; | ||
locale = this.getLocale(locale); | ||
value = toDate(value); | ||
return localizeDate(value, locale, __assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
return this.translocoLocaleService.localizeDate(toDate(value), locale, __assign({}, getDefaultOptions(locale, 'date', this.localeConfig), options)); | ||
}; | ||
@@ -1191,4 +1345,4 @@ TranslocoDatePipe.decorators = [ | ||
/** @type {?} */ | ||
var options = __assign({ style: 'decimal' }, numberFormatOptions); | ||
return localizeNumber(value, locale, __assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), options)); | ||
var options = __assign({}, getDefaultOptions(locale, 'decimal', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'decimal', locale, options); | ||
}; | ||
@@ -1264,4 +1418,4 @@ TranslocoDecimalPipe.decorators = [ | ||
/** @type {?} */ | ||
var options = __assign({ style: 'percent' }, numberFormatOptions); | ||
return localizeNumber(value, locale, __assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), options)); | ||
var options = __assign({}, getDefaultOptions(locale, 'percent', this.localeConfig), numberFormatOptions); | ||
return this.translocoLocaleService.localizeNumber(value, 'percent', locale, options); | ||
}; | ||
@@ -1320,2 +1474,10 @@ TranslocoPercentPipe.decorators = [ | ||
useValue: config.defaultLocale || defaultConfig.defaultLocale | ||
}, | ||
{ | ||
provide: TRANSLOCO_DATE_TRANSFORMER, | ||
useClass: DefaultDateTransformer | ||
}, | ||
{ | ||
provide: TRANSLOCO_NUMBER_TRANSFORMER, | ||
useClass: DefaultNumberTransformer | ||
} | ||
@@ -1344,4 +1506,4 @@ ] | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe, TranslocoLocalePipe as ɵa }; | ||
export { TranslocoLocaleService, defaultConfig, LOCALE_DEFAULT_LOCALE, LOCALE_LANG_MAPPING, LOCALE_CONFIG, LOCALE_CURRENCY_MAPPING, pipes, TranslocoLocaleModule, TranslocoDatePipe, TranslocoCurrencyPipe, TranslocoPercentPipe, TranslocoDecimalPipe, TRANSLOCO_DATE_TRANSFORMER, TRANSLOCO_NUMBER_TRANSFORMER, DefaultDateTransformer, DefaultNumberTransformer, TranslocoLocalePipe as ɵa }; | ||
//# sourceMappingURL=ngneat-transloco-locale.js.map |
@@ -0,0 +0,0 @@ import NumberFormatOptions = Intl.NumberFormatOptions; |
@@ -0,0 +0,0 @@ declare const _default: { |
import { PipeTransform, ChangeDetectorRef } from '@angular/core'; | ||
import { HashMap } from '@ngneat/transloco'; | ||
import { LocaleConfig } from '../transloco-locale.config'; | ||
@@ -11,4 +10,3 @@ import { TranslocoLocaleService } from '../transloco-locale.service'; | ||
private localeConfig; | ||
private localeCurrencyMapping; | ||
constructor(translocoLocaleService: TranslocoLocaleService, cdr: ChangeDetectorRef, localeConfig: LocaleConfig, localeCurrencyMapping: HashMap<Currency>); | ||
constructor(translocoLocaleService: TranslocoLocaleService, cdr: ChangeDetectorRef, localeConfig: LocaleConfig); | ||
/** | ||
@@ -25,3 +23,2 @@ * Transform a given number into the locale's currency format. | ||
transform(value: number | string, display?: 'code' | 'symbol' | 'name', numberFormatOptions?: NumberFormatOptions, currencyCode?: Currency, locale?: Locale): string; | ||
private getCurrencyCode; | ||
} |
@@ -0,0 +0,0 @@ import { ChangeDetectorRef, PipeTransform } from '@angular/core'; |
@@ -0,0 +0,0 @@ import { PipeTransform, ChangeDetectorRef } from '@angular/core'; |
@@ -0,0 +0,0 @@ import { ChangeDetectorRef, OnDestroy } from '@angular/core'; |
@@ -0,0 +0,0 @@ import { PipeTransform, ChangeDetectorRef } from '@angular/core'; |
import { Locale } from './transloco-locale.types'; | ||
import { LocaleFormatOptions, LocaleConfig } from './transloco-locale.config'; | ||
export declare function getDefaultOptions(locale: Locale, type: keyof LocaleFormatOptions, localeConfig: LocaleConfig): any; |
@@ -0,0 +0,0 @@ import { InjectionToken } from '@angular/core'; |
@@ -0,0 +0,0 @@ import { ModuleWithProviders } from '@angular/core'; |
import { OnDestroy } from '@angular/core'; | ||
import { TranslocoService, HashMap } from '@ngneat/transloco'; | ||
import { Observable } from 'rxjs'; | ||
import { Locale } from './transloco-locale.types'; | ||
import { LocaleConfig } from './transloco-locale.config'; | ||
import { TranslocoDateTransformer, TranslocoNumberTransformer } from './transloco-locale.transformers'; | ||
import { Locale, DateFormatOptions, NumberTypes, Currency } from './transloco-locale.types'; | ||
export declare class TranslocoLocaleService implements OnDestroy { | ||
@@ -9,2 +11,6 @@ private translocoService; | ||
private defaultLocale; | ||
private localeConfig; | ||
private localeCurrencyMapping; | ||
private numberTransformer; | ||
private dateTransformer; | ||
localeChanges$: Observable<Locale>; | ||
@@ -14,7 +20,34 @@ private locale; | ||
private subscription; | ||
constructor(translocoService: TranslocoService, langLocaleMapping: HashMap<Locale>, defaultLocale: Locale); | ||
constructor(translocoService: TranslocoService, langLocaleMapping: HashMap<Locale>, defaultLocale: Locale, localeConfig: LocaleConfig, localeCurrencyMapping: HashMap<Currency>, numberTransformer: TranslocoNumberTransformer, dateTransformer: TranslocoDateTransformer); | ||
getLocale(): string; | ||
setLocale(locale: Locale): boolean; | ||
/** | ||
* Transform a date into the locale's date format. | ||
* | ||
* The date expression: a `Date` object, a number | ||
* (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime). | ||
* | ||
* @example | ||
* | ||
* localizeDate(new Date(2019, 9, 7, 12, 0, 0)) // 10/7/2019 | ||
* localizeDate(date, 'en-US', { dateStyle: 'medium', timeStyle: 'medium' }) // Sep 10, 2019, 10:46:12 PM | ||
* localizeDate(date) 'en-US', { timeZone: 'UTC', timeStyle: 'full' } // 7:40:32 PM Coordinated Universal Time | ||
* localizeDate(1, 'en-US', { dateStyle: 'medium' }) // Jan 1, 1970 | ||
* localizeDate('2019-02-08', 'en-US', { dateStyle: 'medium' }) // Feb 8, 2019 | ||
*/ | ||
localizeDate(date: Date, locale?: Locale, options?: DateFormatOptions): string; | ||
/** | ||
* Transform a number into the locale's number format according to the number type. | ||
* | ||
* localizeNumber(1234567890, 'decimal') // 1,234,567,890 | ||
* localizeNumber(0.5, 'percent') // 50% | ||
* localizeNumber(1000, 'currency') // $1,000.00 | ||
*/ | ||
localizeNumber(value: number | string, type: NumberTypes, locale?: Locale, options?: Intl.NumberFormatOptions): string; | ||
/** | ||
* @internal | ||
*/ | ||
_resolveCurrencyCode(locale?: Locale): string; | ||
private toLocale; | ||
ngOnDestroy(): void; | ||
} |
@@ -27,2 +27,25 @@ export interface NumberFormatOptions { | ||
} | ||
/** | ||
* The number display formatting type. | ||
*/ | ||
export declare type NumberTypes = 'currency' | 'decimal' | 'percent'; | ||
/** | ||
* Allowed values with Date and Time formats | ||
*/ | ||
export declare type DateFormatStyles = 'full' | 'long' | 'medium' | 'short'; | ||
/** | ||
* Common allowed formats for time zones | ||
*/ | ||
export declare type TimezoneNameFormats = 'short' | 'long'; | ||
/** | ||
* Common allowed formats for date strings | ||
*/ | ||
export declare type DateStringFormats = TimezoneNameFormats | 'narrow'; | ||
/** | ||
* Common allowed formats for numbers | ||
*/ | ||
export declare type DateNumberFormats = 'numeric' | '2-digit'; | ||
/** | ||
* Supported Intl calender types | ||
*/ | ||
export interface DateFormatOptions { | ||
@@ -32,13 +55,69 @@ /** | ||
*/ | ||
dateStyle?: 'full' | 'long' | 'medium' | 'short'; | ||
dateStyle?: DateFormatStyles; | ||
/** | ||
* The time formatting style. | ||
*/ | ||
timeStyle?: 'full' | 'long' | 'medium' | 'short'; | ||
timeStyle?: DateFormatStyles; | ||
/** | ||
* Number of fractional seconds to show | ||
*/ | ||
fractionalSecondDigits?: 0 | 1 | 2 | 3; | ||
/** | ||
* The way day periods should be displayed | ||
*/ | ||
dayPeriod?: DateStringFormats; | ||
/** | ||
* The option for 12/24 hour display | ||
*/ | ||
hour12?: boolean; | ||
/** | ||
* Locale matcher options | ||
*/ | ||
localeMatcher?: 'lookup' | 'best fit'; | ||
/** | ||
* Format matcher options | ||
*/ | ||
formatMatcher?: 'lookup' | 'best fit'; | ||
/** | ||
* The weekday formatting style | ||
*/ | ||
weekDay?: DateStringFormats; | ||
/** | ||
* The era formatting style | ||
*/ | ||
era?: DateStringFormats; | ||
/** | ||
* The year formatting style | ||
*/ | ||
year?: DateNumberFormats; | ||
/** | ||
* The Month formatting style | ||
*/ | ||
month?: DateStringFormats | DateNumberFormats; | ||
/** | ||
* The Day formatting style | ||
*/ | ||
day?: DateNumberFormats; | ||
/** | ||
* The Hour formatting style | ||
*/ | ||
hour?: DateNumberFormats; | ||
/** | ||
* The Minute formatting style | ||
*/ | ||
minute?: DateNumberFormats; | ||
/** | ||
* The Seconds formatting style | ||
*/ | ||
second?: DateNumberFormats; | ||
/** | ||
* The time zone to use. The only value implementations must recognize is "UTC"; the default is the runtime's default time zone. Implementations may also recognize the time zone names of the IANA time zone database, such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York". | ||
*/ | ||
timeZone?: Intl.DateTimeFormatOptions['timeZone']; | ||
/** | ||
* The formatting for the time zone name | ||
*/ | ||
timeZoneName?: TimezoneNameFormats; | ||
} | ||
export declare type Locale = string; | ||
export declare type Currency = string; |
@@ -0,0 +0,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"TranslocoLocaleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_LANG_MAPPING"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_DEFAULT_LOCALE"}]}]],"parameters":[{"__symbolic":"reference","module":"@ngneat/transloco","name":"TranslocoService","line":18,"character":30},{"__symbolic":"reference","name":"HashMap","module":"@ngneat/transloco","arguments":[{"__symbolic":"reference","name":"Locale"}]},{"__symbolic":"reference","name":"Locale"}]}],"getLocale":[{"__symbolic":"method"}],"setLocale":[{"__symbolic":"method"}],"toLocale":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"LocaleFormatOptions":{"__symbolic":"interface"},"LocaleConfig":{"__symbolic":"interface"},"TranslocoLocaleConfig":{"__symbolic":"interface"},"defaultConfig":{"localeConfig":{"global":{},"localeBased":{}},"defaultLocale":"en-US","langToLocaleMapping":{}},"LOCALE_DEFAULT_LOCALE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":34,"character":41},"arguments":["DEFAULT_LOCALE"]},"LOCALE_LANG_MAPPING":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":35,"character":39},"arguments":["LOCALE_LANG_MAPPING"]},"LOCALE_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":36,"character":33},"arguments":["LOCALE_CONFIG"]},"LOCALE_CURRENCY_MAPPING":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":37,"character":43},"arguments":["LOCALE_CURRENCY_MAPPING"]},"NumberFormatOptions":{"__symbolic":"interface"},"DateFormatOptions":{"__symbolic":"interface"},"Locale":{"__symbolic":"interface"},"Currency":{"__symbolic":"interface"},"pipes":[{"__symbolic":"reference","name":"TranslocoCurrencyPipe"},{"__symbolic":"reference","name":"TranslocoDatePipe"},{"__symbolic":"reference","name":"TranslocoDecimalPipe"},{"__symbolic":"reference","name":"TranslocoPercentPipe"}],"TranslocoLocaleModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":{"__symbolic":"reference","name":"pipes"},"exports":{"__symbolic":"reference","name":"pipes"}}]}],"members":{},"statics":{"init":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"TranslocoLocaleModule"},"providers":[{"provide":{"__symbolic":"reference","name":"LOCALE_LANG_MAPPING"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"langToLocaleMapping"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"langToLocaleMapping"}}},{"provide":{"__symbolic":"reference","name":"LOCALE_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"localeConfig"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"localeConfig"}}},{"provide":{"__symbolic":"reference","name":"LOCALE_CURRENCY_MAPPING"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"localeToCurrencyMapping"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"localeToCurrencyMapping"}}},{"provide":{"__symbolic":"reference","name":"LOCALE_DEFAULT_LOCALE"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"defaultLocale"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"defaultLocale"}}}]}}}},"TranslocoDatePipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":9,"character":1},"arguments":[{"name":"translocoDate","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":16,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"TranslocoCurrencyPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":9,"character":1},"arguments":[{"name":"translocoCurrency","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CURRENCY_MAPPING"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":16,"character":19},{"__symbolic":"reference","name":"LocaleConfig"},{"__symbolic":"reference","name":"HashMap","module":"@ngneat/transloco","arguments":[{"__symbolic":"reference","name":"Currency"}]}]}],"transform":[{"__symbolic":"method"}],"getCurrencyCode":[{"__symbolic":"method"}]}},"TranslocoPercentPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":9,"character":1},"arguments":[{"name":"translocoPercent","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":16,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"TranslocoDecimalPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":9,"character":1},"arguments":[{"name":"translocoDecimal","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":16,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":8,"character":87}]}],"getLocale":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"TranslocoLocaleService":"./lib/transloco-locale.service","LocaleFormatOptions":"./lib/transloco-locale.config","LocaleConfig":"./lib/transloco-locale.config","TranslocoLocaleConfig":"./lib/transloco-locale.config","defaultConfig":"./lib/transloco-locale.config","LOCALE_DEFAULT_LOCALE":"./lib/transloco-locale.config","LOCALE_LANG_MAPPING":"./lib/transloco-locale.config","LOCALE_CONFIG":"./lib/transloco-locale.config","LOCALE_CURRENCY_MAPPING":"./lib/transloco-locale.config","NumberFormatOptions":"./lib/transloco-locale.types","DateFormatOptions":"./lib/transloco-locale.types","Locale":"./lib/transloco-locale.types","Currency":"./lib/transloco-locale.types","pipes":"./lib/transloco-locale.module","TranslocoLocaleModule":"./lib/transloco-locale.module","TranslocoDatePipe":"./lib/pipes/transloco-date.pipe","TranslocoCurrencyPipe":"./lib/pipes/transloco-currency.pipe","TranslocoPercentPipe":"./lib/pipes/transloco-percent.pipe","TranslocoDecimalPipe":"./lib/pipes/transloco-decimal.pipe","ɵa":"./lib/pipes/transloco-locale.pipe"},"importAs":"@ngneat/transloco-locale"} | ||
{"__symbolic":"module","version":4,"metadata":{"TranslocoLocaleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":21,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":32,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_LANG_MAPPING"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":33,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_DEFAULT_LOCALE"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":34,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":35,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CURRENCY_MAPPING"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":36,"character":5},"arguments":[{"__symbolic":"reference","name":"TRANSLOCO_NUMBER_TRANSFORMER"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":37,"character":5},"arguments":[{"__symbolic":"reference","name":"TRANSLOCO_DATE_TRANSFORMER"}]}]],"parameters":[{"__symbolic":"reference","module":"@ngneat/transloco","name":"TranslocoService","line":31,"character":30},{"__symbolic":"reference","name":"HashMap","module":"@ngneat/transloco","arguments":[{"__symbolic":"reference","name":"Currency"}]},{"__symbolic":"reference","name":"Locale"},{"__symbolic":"reference","name":"LocaleConfig"},{"__symbolic":"reference","name":"HashMap","module":"@ngneat/transloco","arguments":[{"__symbolic":"reference","name":"Currency"}]},{"__symbolic":"reference","name":"TranslocoNumberTransformer"},{"__symbolic":"reference","name":"TranslocoDateTransformer"}]}],"getLocale":[{"__symbolic":"method"}],"setLocale":[{"__symbolic":"method"}],"localizeDate":[{"__symbolic":"method"}],"localizeNumber":[{"__symbolic":"method"}],"_resolveCurrencyCode":[{"__symbolic":"method"}],"toLocale":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"LocaleFormatOptions":{"__symbolic":"interface"},"LocaleConfig":{"__symbolic":"interface"},"TranslocoLocaleConfig":{"__symbolic":"interface"},"defaultConfig":{"localeConfig":{"global":{},"localeBased":{}},"defaultLocale":"en-US","langToLocaleMapping":{}},"LOCALE_DEFAULT_LOCALE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":34,"character":41},"arguments":["DEFAULT_LOCALE"]},"LOCALE_LANG_MAPPING":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":35,"character":39},"arguments":["LOCALE_LANG_MAPPING"]},"LOCALE_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":36,"character":33},"arguments":["LOCALE_CONFIG"]},"LOCALE_CURRENCY_MAPPING":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":37,"character":43},"arguments":["LOCALE_CURRENCY_MAPPING"]},"NumberFormatOptions":{"__symbolic":"interface"},"NumberTypes":{"__symbolic":"interface"},"DateFormatStyles":{"__symbolic":"interface"},"TimezoneNameFormats":{"__symbolic":"interface"},"DateStringFormats":{"__symbolic":"interface"},"DateNumberFormats":{"__symbolic":"interface"},"DateFormatOptions":{"__symbolic":"interface"},"Locale":{"__symbolic":"interface"},"Currency":{"__symbolic":"interface"},"pipes":[{"__symbolic":"reference","name":"TranslocoCurrencyPipe"},{"__symbolic":"reference","name":"TranslocoDatePipe"},{"__symbolic":"reference","name":"TranslocoDecimalPipe"},{"__symbolic":"reference","name":"TranslocoPercentPipe"}],"TranslocoLocaleModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"declarations":{"__symbolic":"reference","name":"pipes"},"exports":{"__symbolic":"reference","name":"pipes"}}]}],"members":{},"statics":{"init":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"TranslocoLocaleModule"},"providers":[{"provide":{"__symbolic":"reference","name":"LOCALE_LANG_MAPPING"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"langToLocaleMapping"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"langToLocaleMapping"}}},{"provide":{"__symbolic":"reference","name":"LOCALE_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"localeConfig"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"localeConfig"}}},{"provide":{"__symbolic":"reference","name":"LOCALE_CURRENCY_MAPPING"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"localeToCurrencyMapping"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"localeToCurrencyMapping"}}},{"provide":{"__symbolic":"reference","name":"LOCALE_DEFAULT_LOCALE"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"defaultLocale"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"defaultConfig"},"member":"defaultLocale"}}},{"provide":{"__symbolic":"reference","name":"TRANSLOCO_DATE_TRANSFORMER"},"useClass":{"__symbolic":"reference","name":"DefaultDateTransformer"}},{"provide":{"__symbolic":"reference","name":"TRANSLOCO_NUMBER_TRANSFORMER"},"useClass":{"__symbolic":"reference","name":"DefaultNumberTransformer"}}]}}}},"TranslocoDatePipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":9,"character":1},"arguments":[{"name":"translocoDate","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":16,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"TranslocoCurrencyPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":8,"character":1},"arguments":[{"name":"translocoCurrency","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":15,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"TranslocoPercentPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":8,"character":1},"arguments":[{"name":"translocoPercent","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":15,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"TranslocoDecimalPipe":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":8,"character":1},"arguments":[{"name":"translocoDecimal","pure":false}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":5},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":15,"character":19},{"__symbolic":"reference","name":"LocaleConfig"}]}],"transform":[{"__symbolic":"method"}]}},"TRANSLOCO_DATE_TRANSFORMER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":46},"arguments":["TRANSLOCO_DATE_TRANSFORMER"]},"TRANSLOCO_NUMBER_TRANSFORMER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":48},"arguments":["TRANSLOCO_NUMBER_TRANSFORMER"]},"TranslocoDateTransformer":{"__symbolic":"interface"},"TranslocoNumberTransformer":{"__symbolic":"interface"},"DefaultDateTransformer":{"__symbolic":"class","members":{"transform":[{"__symbolic":"method"}]}},"DefaultNumberTransformer":{"__symbolic":"class","members":{"transform":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TranslocoLocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":8,"character":87}]}],"getLocale":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"TranslocoLocaleService":"./lib/transloco-locale.service","LocaleFormatOptions":"./lib/transloco-locale.config","LocaleConfig":"./lib/transloco-locale.config","TranslocoLocaleConfig":"./lib/transloco-locale.config","defaultConfig":"./lib/transloco-locale.config","LOCALE_DEFAULT_LOCALE":"./lib/transloco-locale.config","LOCALE_LANG_MAPPING":"./lib/transloco-locale.config","LOCALE_CONFIG":"./lib/transloco-locale.config","LOCALE_CURRENCY_MAPPING":"./lib/transloco-locale.config","NumberFormatOptions":"./lib/transloco-locale.types","NumberTypes":"./lib/transloco-locale.types","DateFormatStyles":"./lib/transloco-locale.types","TimezoneNameFormats":"./lib/transloco-locale.types","DateStringFormats":"./lib/transloco-locale.types","DateNumberFormats":"./lib/transloco-locale.types","DateFormatOptions":"./lib/transloco-locale.types","Locale":"./lib/transloco-locale.types","Currency":"./lib/transloco-locale.types","pipes":"./lib/transloco-locale.module","TranslocoLocaleModule":"./lib/transloco-locale.module","TranslocoDatePipe":"./lib/pipes/transloco-date.pipe","TranslocoCurrencyPipe":"./lib/pipes/transloco-currency.pipe","TranslocoPercentPipe":"./lib/pipes/transloco-percent.pipe","TranslocoDecimalPipe":"./lib/pipes/transloco-decimal.pipe","TRANSLOCO_DATE_TRANSFORMER":"./lib/transloco-locale.transformers","TRANSLOCO_NUMBER_TRANSFORMER":"./lib/transloco-locale.transformers","TranslocoDateTransformer":"./lib/transloco-locale.transformers","TranslocoNumberTransformer":"./lib/transloco-locale.transformers","DefaultDateTransformer":"./lib/transloco-locale.transformers","DefaultNumberTransformer":"./lib/transloco-locale.transformers","ɵa":"./lib/pipes/transloco-locale.pipe"},"importAs":"@ngneat/transloco-locale"} |
{ | ||
"name": "@ngneat/transloco-locale", | ||
"version": "1.0.1", | ||
"version": "1.1.1", | ||
"description": "The localization (l10n) library plugin for Angular and Transloco", | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
@@ -9,1 +9,2 @@ export * from './lib/transloco-locale.service'; | ||
export * from './lib/pipes/transloco-decimal.pipe'; | ||
export * from './lib/transloco-locale.transformers'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
764343
56
8969