diff --git a/projects/addon-commerce/enums/currency-code.ts b/projects/addon-commerce/enums/currency-code.ts index 8cc345e1a381..63957d4682af 100644 --- a/projects/addon-commerce/enums/currency-code.ts +++ b/projects/addon-commerce/enums/currency-code.ts @@ -50,7 +50,16 @@ export enum TuiCurrencyCode { Baht = '764', /** + * Bahraini Dinar * + * @description Numeric code: 048 + * @description Alphabetic code: BHD + * @description Countries and territories: Bahrain + * @description Currency symbol: BD + */ + BahrainiDinar = '048', + + /** * Belarusian ruble * * @description Numeric code: 933 @@ -80,6 +89,16 @@ export enum TuiCurrencyCode { */ CanadianDollar = '124', + /** + * Czech Koruna + * + * @description Numeric code: 203 + * @description Alphabetic code: CZK + * @description Countries and territories: Czech Republic + * @description Currency symbol: Kč + */ + CzechKoruna = '203', + /** * United Arab Emirates dirham * @@ -100,6 +119,16 @@ export enum TuiCurrencyCode { */ Dollar = '840', + /** + * East Caribbean Dollar + * + * @description Numeric code: 951 + * @description Alphabetic code: XCD + * @description Countries and territories: Anguilla, Antigua and Barbuda, Dominica, Grenada, Montserrat, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines + * @description Currency symbol: EC$ + */ + EastCaribbeanDollar = '951', + /** * Euro * @@ -110,6 +139,16 @@ export enum TuiCurrencyCode { */ Euro = '978', + /** + * Forint + * + * @description Numeric code: 348 + * @description Alphabetic code: HUF + * @description Countries and territories: Hungray + * @description Currency symbol: Ft + */ + Forint = '348', + /** * Georgian lari * @@ -210,6 +249,16 @@ export enum TuiCurrencyCode { */ MexicanPeso = '484', + /** + * Moldovan Leu + * + * @description Numeric code: 498 + * @description Alphabetic code: MDL + * @description Countries and territories: Moldova + * @description Currency symbol: L + */ + MoldovanLeu = '498', + /** * Mongolian tugrik * @@ -230,6 +279,16 @@ export enum TuiCurrencyCode { */ NewTurkmenManat = '934', + /** + * Poland Zloty + * + * @description Numeric code: 985 + * @description Alphabetic code: PLN + * @description Countries and territories: Poland + * @description Currency symbol: zł + */ + PolandZloty = '985', + /** * Pound sterling * diff --git a/projects/addon-commerce/enums/currency.ts b/projects/addon-commerce/enums/currency.ts index 9c1daa11df74..1baae36b5192 100644 --- a/projects/addon-commerce/enums/currency.ts +++ b/projects/addon-commerce/enums/currency.ts @@ -42,6 +42,24 @@ export enum TuiCurrency { */ Baht = 'THB', + /** + * Bahraini Dinar + * + * @description Numeric code: 048 + * @description Alphabetic code: BHD + * @description Countries and territories: Bahrain + * @description Currency symbol: BD + */ + BahrainiDinar = 'BHD', + + /** + * Belarusian ruble + * + * @description Numeric code: 933 + * @description Alphabetic code: BYN + * @description Countries and territories: Belarus + * @description Currency symbol: Br + */ BelarusianRuble = 'BYN', /** @@ -64,6 +82,16 @@ export enum TuiCurrency { */ CanadianDollar = 'CAD', + /** + * Czech Koruna + * + * @description Numeric code: 203 + * @description Alphabetic code: СZK + * @description Countries and territories: Czech Republic + * @description Currency symbol: Kč + */ + CzechKoruna = 'CZK', + /** * United Arab Emirates dirham * @@ -84,6 +112,16 @@ export enum TuiCurrency { */ Dollar = 'USD', + /** + * East Caribbean Dollar + * + * @description Numeric code: 951 + * @description Alphabetic code: XCD + * @description Countries and territories: Anguilla, Antigua and Barbuda, Dominica, Grenada, Montserrat, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines + * @description Currency symbol: EC$ + */ + EastCaribbeanDollar = 'XCD', + /** * Euro * @@ -94,6 +132,16 @@ export enum TuiCurrency { */ Euro = 'EUR', + /** + * Forint + * + * @description Numeric code: 348 + * @description Alphabetic code: HUF + * @description Countries and territories: Hungray + * @description Currency symbol: Ft + */ + Forint = 'HUF', + GeorgianLari = 'GEL', /** @@ -162,10 +210,30 @@ export enum TuiCurrency { */ MexicanPeso = 'MXN', + /** + * Moldovan Leu + * + * @description Numeric code: 498 + * @description Alphabetic code: MDL + * @description Countries and territories: Moldova + * @description Currency symbol: L + */ + MoldovanLeu = 'MDL', + MongolianTugrik = 'MNT', NewTurkmenManat = 'TMT', + /** + * Poland Zloty + * + * @description Numeric code: 985 + * @description Alphabetic code: PLN + * @description Countries and territories: Poland + * @description Currency symbol: zł + */ + PolandZloty = 'PLN', + /** * Pound sterling * diff --git a/projects/addon-commerce/utils/get-code-by-currency.ts b/projects/addon-commerce/utils/get-code-by-currency.ts index d46942e14244..3a9e345e7f69 100644 --- a/projects/addon-commerce/utils/get-code-by-currency.ts +++ b/projects/addon-commerce/utils/get-code-by-currency.ts @@ -5,13 +5,19 @@ export const TUI_CODE_DICTIONARY: Record = { [TuiCurrency.Ruble]: TuiCurrencyCode.Ruble, [TuiCurrency.Dollar]: TuiCurrencyCode.Dollar, [TuiCurrency.MexicanPeso]: TuiCurrencyCode.MexicanPeso, + [TuiCurrency.MoldovanLeu]: TuiCurrencyCode.MoldovanLeu, + [TuiCurrency.PolandZloty]: TuiCurrencyCode.PolandZloty, [TuiCurrency.SingaporeDollar]: TuiCurrencyCode.SingaporeDollar, [TuiCurrency.AustralianDollar]: TuiCurrencyCode.AustralianDollar, [TuiCurrency.HongKongDollar]: TuiCurrencyCode.HongKongDollar, [TuiCurrency.CanadianDollar]: TuiCurrencyCode.CanadianDollar, + [TuiCurrency.CzechKoruna]: TuiCurrencyCode.CzechKoruna, + [TuiCurrency.EastCaribbeanDollar]: TuiCurrencyCode.EastCaribbeanDollar, [TuiCurrency.Euro]: TuiCurrencyCode.Euro, + [TuiCurrency.Forint]: TuiCurrencyCode.Forint, [TuiCurrency.Pound]: TuiCurrencyCode.Pound, [TuiCurrency.Baht]: TuiCurrencyCode.Baht, + [TuiCurrency.BahrainiDinar]: TuiCurrencyCode.BahrainiDinar, [TuiCurrency.TurkishLira]: TuiCurrencyCode.TurkishLira, [TuiCurrency.YuanRenminbi]: TuiCurrencyCode.YuanRenminbi, [TuiCurrency.Yen]: TuiCurrencyCode.Yen, diff --git a/projects/addon-commerce/utils/get-currency-by-code.ts b/projects/addon-commerce/utils/get-currency-by-code.ts index 63992154c8de..ca458bbc969a 100644 --- a/projects/addon-commerce/utils/get-currency-by-code.ts +++ b/projects/addon-commerce/utils/get-currency-by-code.ts @@ -5,19 +5,23 @@ export const TUI_CURRENCY_DICTIONARY: Record = { [TuiCurrencyCode.Ruble]: TuiCurrency.Ruble, [TuiCurrencyCode.Dollar]: TuiCurrency.Dollar, [TuiCurrencyCode.MexicanPeso]: TuiCurrency.MexicanPeso, - [TuiCurrencyCode.SingaporeDollar]: TuiCurrency.SingaporeDollar, + [TuiCurrencyCode.MoldovanLeu]: TuiCurrency.MoldovanLeu, + [TuiCurrencyCode.PolandZloty]: TuiCurrency.PolandZloty, [TuiCurrencyCode.SingaporeDollar]: TuiCurrency.SingaporeDollar, [TuiCurrencyCode.AustralianDollar]: TuiCurrency.AustralianDollar, [TuiCurrencyCode.HongKongDollar]: TuiCurrency.HongKongDollar, [TuiCurrencyCode.CanadianDollar]: TuiCurrency.CanadianDollar, + [TuiCurrencyCode.CzechKoruna]: TuiCurrency.CzechKoruna, + [TuiCurrencyCode.EastCaribbeanDollar]: TuiCurrency.EastCaribbeanDollar, [TuiCurrencyCode.Euro]: TuiCurrency.Euro, + [TuiCurrencyCode.Forint]: TuiCurrency.Forint, [TuiCurrencyCode.Pound]: TuiCurrency.Pound, [TuiCurrencyCode.Baht]: TuiCurrency.Baht, + [TuiCurrencyCode.BahrainiDinar]: TuiCurrency.BahrainiDinar, [TuiCurrencyCode.TurkishLira]: TuiCurrency.TurkishLira, [TuiCurrencyCode.YuanRenminbi]: TuiCurrency.YuanRenminbi, [TuiCurrencyCode.Yen]: TuiCurrency.Yen, [TuiCurrencyCode.IsraeliShekel]: TuiCurrency.IsraeliShekel, - [TuiCurrencyCode.IsraeliShekel]: TuiCurrency.IsraeliShekel, [TuiCurrencyCode.IndianRupee]: TuiCurrency.IndianRupee, [TuiCurrencyCode.SwissFranc]: TuiCurrency.SwissFranc, [TuiCurrencyCode.ArmenianDram]: TuiCurrency.ArmenianDram, diff --git a/projects/addon-commerce/utils/get-currency-symbol.ts b/projects/addon-commerce/utils/get-currency-symbol.ts index 60606a643d52..e83a41894427 100644 --- a/projects/addon-commerce/utils/get-currency-symbol.ts +++ b/projects/addon-commerce/utils/get-currency-symbol.ts @@ -17,15 +17,27 @@ export function tuiGetCurrencySymbol(currency: TuiCurrencyVariants): string | nu case TuiCurrency.AustralianDollar: case TuiCurrencyCode.AustralianDollar: return 'A$'; + case TuiCurrency.BahrainiDinar: + case TuiCurrencyCode.BahrainiDinar: + return 'BD'; + case TuiCurrency.CzechKoruna: + case TuiCurrencyCode.CzechKoruna: + return 'Kč'; case TuiCurrency.HongKongDollar: case TuiCurrencyCode.HongKongDollar: return 'HK$'; case TuiCurrency.CanadianDollar: case TuiCurrencyCode.CanadianDollar: return 'C$'; + case TuiCurrency.EastCaribbeanDollar: + case TuiCurrencyCode.EastCaribbeanDollar: + return 'EC$'; case TuiCurrency.Euro: case TuiCurrencyCode.Euro: return '€'; + case TuiCurrency.Forint: + case TuiCurrencyCode.Forint: + return 'Ft'; case TuiCurrency.Pound: case TuiCurrencyCode.Pound: return '£'; @@ -95,9 +107,15 @@ export function tuiGetCurrencySymbol(currency: TuiCurrencyVariants): string | nu case TuiCurrency.SaudiRiyal: case TuiCurrencyCode.SaudiRiyal: return 'SR'; + case TuiCurrency.MoldovanLeu: + case TuiCurrencyCode.MoldovanLeu: + return 'L'; case TuiCurrency.MongolianTugrik: case TuiCurrencyCode.MongolianTugrik: return '₮'; + case TuiCurrency.PolandZloty: + case TuiCurrencyCode.PolandZloty: + return 'zł'; case TuiCurrency.SouthAfricanRand: case TuiCurrencyCode.SouthAfricanRand: return 'R';