@uxf/localize 10.0.0-beta.30 → 10.0.0-beta.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/format-datetime.d.ts +2 -0
- package/src/components/format-datetime.js +17 -0
- package/src/components/format-money.d.ts +2 -0
- package/src/components/format-money.js +17 -0
- package/src/components/format-number.d.ts +2 -0
- package/src/components/format-number.js +17 -0
- package/src/components/format-percentage.d.ts +2 -0
- package/src/components/format-percentage.js +17 -0
- package/src/format-money/format-money.d.ts +1 -1
- package/src/format-money/format-money.js +3 -3
- package/src/format-money/format-money.test.js +16 -16
- package/src/index.js +8 -0
- package/src/types.d.ts +15 -3
- package/src/utils/data.d.ts +206 -2
- package/src/utils/data.js +70 -2
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createFormatDatetimeComponent = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const context_1 = require("../context/context");
|
|
9
|
+
const format_datetime_1 = require("../format-datetime/format-datetime");
|
|
10
|
+
function createFormatDatetimeComponent(localizeConfigs) {
|
|
11
|
+
const Component = (value, format) => {
|
|
12
|
+
const locale = (0, context_1._useLocalizeContext)();
|
|
13
|
+
return react_1.default.createElement(react_1.default.Fragment, null, (0, format_datetime_1.createFormatDatetime)(localizeConfigs)(locale, value, format));
|
|
14
|
+
};
|
|
15
|
+
return Component;
|
|
16
|
+
}
|
|
17
|
+
exports.createFormatDatetimeComponent = createFormatDatetimeComponent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createFormatMoneyComponent = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const context_1 = require("../context/context");
|
|
9
|
+
const format_money_1 = require("../format-money/format-money");
|
|
10
|
+
function createFormatMoneyComponent(localizeConfigs) {
|
|
11
|
+
const Component = (money, options) => {
|
|
12
|
+
const locale = (0, context_1._useLocalizeContext)();
|
|
13
|
+
return react_1.default.createElement(react_1.default.Fragment, null, (0, format_money_1.createFormatMoney)(localizeConfigs)(locale, money, options));
|
|
14
|
+
};
|
|
15
|
+
return Component;
|
|
16
|
+
}
|
|
17
|
+
exports.createFormatMoneyComponent = createFormatMoneyComponent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createFormatNumberComponent = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const context_1 = require("../context/context");
|
|
9
|
+
const format_number_1 = require("../format-number/format-number");
|
|
10
|
+
function createFormatNumberComponent(localizeConfigs) {
|
|
11
|
+
const Component = (value, options) => {
|
|
12
|
+
const locale = (0, context_1._useLocalizeContext)();
|
|
13
|
+
return react_1.default.createElement(react_1.default.Fragment, null, (0, format_number_1.createFormatNumber)(localizeConfigs)(locale, value, options));
|
|
14
|
+
};
|
|
15
|
+
return Component;
|
|
16
|
+
}
|
|
17
|
+
exports.createFormatNumberComponent = createFormatNumberComponent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createFormatPercentageComponent = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const context_1 = require("../context/context");
|
|
9
|
+
const format_percentage_1 = require("../format-percentage/format-percentage");
|
|
10
|
+
function createFormatPercentageComponent(localizeConfigs) {
|
|
11
|
+
const Component = (value, roundingType, options) => {
|
|
12
|
+
const locale = (0, context_1._useLocalizeContext)();
|
|
13
|
+
return react_1.default.createElement(react_1.default.Fragment, null, (0, format_percentage_1.createFormatPercentage)(localizeConfigs)(locale, value, roundingType, options));
|
|
14
|
+
};
|
|
15
|
+
return Component;
|
|
16
|
+
}
|
|
17
|
+
exports.createFormatPercentageComponent = createFormatPercentageComponent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DateTimes, FormatMoneyFunction, LocalizeConfigMap } from "../types";
|
|
2
2
|
export declare function createFormatMoney<DT extends DateTimes, Locales extends string>(localizeConfigs: LocalizeConfigMap<DT, Locales>): FormatMoneyFunction<Locales>;
|
|
3
|
-
export declare function createUseFormatMoney<DT extends DateTimes, Locales extends string>(localizeConfigs: LocalizeConfigMap<DT, Locales>): () => (
|
|
3
|
+
export declare function createUseFormatMoney<DT extends DateTimes, Locales extends string>(localizeConfigs: LocalizeConfigMap<DT, Locales>): () => (money: import("../types").Money, options?: import("../types").FormatMoneyOptions | undefined) => string;
|
|
@@ -11,16 +11,16 @@ const map_options_1 = require("../utils/map-options");
|
|
|
11
11
|
const data_1 = require("../utils/data");
|
|
12
12
|
const react_1 = require("react");
|
|
13
13
|
function createFormatMoney(localizeConfigs) {
|
|
14
|
-
return (locale,
|
|
14
|
+
return (locale, money, options) => {
|
|
15
15
|
var _a, _b, _c;
|
|
16
16
|
const precision = (_a = options === null || options === void 0 ? void 0 : options.precision) !== null && _a !== void 0 ? _a : 0;
|
|
17
|
-
const symbol = (options === null || options === void 0 ? void 0 : options.preferIsoCode) ? currency : data_1.CURRENCIES[currency].symbol;
|
|
17
|
+
const symbol = (options === null || options === void 0 ? void 0 : options.preferIsoCode) ? money.currency : data_1.CURRENCIES[money.currency].symbol;
|
|
18
18
|
const formatOptions = { ...(0, map_options_1._mapOptions)(localizeConfigs[locale].currency), precision, symbol };
|
|
19
19
|
if (options === null || options === void 0 ? void 0 : options.hideSymbol) {
|
|
20
20
|
formatOptions.pattern = (_b = formatOptions.pattern) === null || _b === void 0 ? void 0 : _b.replace("!", "").trim();
|
|
21
21
|
formatOptions.negativePattern = (_c = formatOptions.negativePattern) === null || _c === void 0 ? void 0 : _c.replace("!", "").trim();
|
|
22
22
|
}
|
|
23
|
-
return (0, currency_js_1.default)(
|
|
23
|
+
return (0, currency_js_1.default)(money.amount, { precision }).format(formatOptions);
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
exports.createFormatMoney = createFormatMoney;
|
|
@@ -9,23 +9,23 @@ const en_1 = __importDefault(require("../../locale/en"));
|
|
|
9
9
|
describe("money formatter", function () {
|
|
10
10
|
const formatMoneyWithLocales = (0, format_money_1.createFormatMoney)({ cs: cs_1.default, en: en_1.default });
|
|
11
11
|
it("format money with 'cs' locale", function () {
|
|
12
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "CZK")).toBe("2\xa0001\xa0Kč");
|
|
13
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "CZK", { precision: 1 })).toBe("2\xa0000,8\xa0Kč");
|
|
14
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "CZK", { precision: 1, preferIsoCode: true })).toBe("2\xa0000,8\xa0CZK");
|
|
15
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "CZK", { precision: 1, hideSymbol: true })).toBe("2\xa0000,8");
|
|
16
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "USD")).toBe("2\xa0001\xa0$");
|
|
17
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "USD", { precision: 1 })).toBe("2\xa0000,8\xa0$");
|
|
18
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "USD", { precision: 1, preferIsoCode: true })).toBe("2\xa0000,8\xa0USD");
|
|
19
|
-
expect(formatMoneyWithLocales("cs", 2000.78, "USD", { precision: 1, hideSymbol: true })).toBe("2\xa0000,8");
|
|
12
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "CZK" })).toBe("2\xa0001\xa0Kč");
|
|
13
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "CZK" }, { precision: 1 })).toBe("2\xa0000,8\xa0Kč");
|
|
14
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "CZK" }, { precision: 1, preferIsoCode: true })).toBe("2\xa0000,8\xa0CZK");
|
|
15
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "CZK" }, { precision: 1, hideSymbol: true })).toBe("2\xa0000,8");
|
|
16
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "USD" })).toBe("2\xa0001\xa0$");
|
|
17
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "USD" }, { precision: 1 })).toBe("2\xa0000,8\xa0$");
|
|
18
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "USD" }, { precision: 1, preferIsoCode: true })).toBe("2\xa0000,8\xa0USD");
|
|
19
|
+
expect(formatMoneyWithLocales("cs", { amount: "2000.78", currency: "USD" }, { precision: 1, hideSymbol: true })).toBe("2\xa0000,8");
|
|
20
20
|
});
|
|
21
21
|
it("format money with 'en' locale", function () {
|
|
22
|
-
expect(formatMoneyWithLocales("en", 2000.78, "CZK")).toBe("Kč2,001");
|
|
23
|
-
expect(formatMoneyWithLocales("en", 2000.78, "CZK", { precision: 1 })).toBe("Kč2,000.8");
|
|
24
|
-
expect(formatMoneyWithLocales("en", 2000.78, "CZK", { precision: 1, preferIsoCode: true })).toBe("CZK2,000.8");
|
|
25
|
-
expect(formatMoneyWithLocales("en", 2000.78, "CZK", { precision: 1, hideSymbol: true })).toBe("2,000.8");
|
|
26
|
-
expect(formatMoneyWithLocales("en", 2000.78, "USD")).toBe("$2,001");
|
|
27
|
-
expect(formatMoneyWithLocales("en", 2000.78, "USD", { precision: 1 })).toBe("$2,000.8");
|
|
28
|
-
expect(formatMoneyWithLocales("en", 2000.78, "USD", { precision: 1, preferIsoCode: true })).toBe("USD2,000.8");
|
|
29
|
-
expect(formatMoneyWithLocales("en", 2000.78, "USD", { precision: 1, hideSymbol: true })).toBe("2,000.8");
|
|
22
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "CZK" })).toBe("Kč2,001");
|
|
23
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "CZK" }, { precision: 1 })).toBe("Kč2,000.8");
|
|
24
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "CZK" }, { precision: 1, preferIsoCode: true })).toBe("CZK2,000.8");
|
|
25
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "CZK" }, { precision: 1, hideSymbol: true })).toBe("2,000.8");
|
|
26
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "USD" })).toBe("$2,001");
|
|
27
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "USD" }, { precision: 1 })).toBe("$2,000.8");
|
|
28
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "USD" }, { precision: 1, preferIsoCode: true })).toBe("USD2,000.8");
|
|
29
|
+
expect(formatMoneyWithLocales("en", { amount: "2000.78", currency: "USD" }, { precision: 1, hideSymbol: true })).toBe("2,000.8");
|
|
30
30
|
});
|
|
31
31
|
});
|
package/src/index.js
CHANGED
|
@@ -20,6 +20,10 @@ const format_number_1 = require("./format-number/format-number");
|
|
|
20
20
|
const format_percentage_1 = require("./format-percentage/format-percentage");
|
|
21
21
|
const format_datetime_1 = require("./format-datetime/format-datetime");
|
|
22
22
|
const format_money_1 = require("./format-money/format-money");
|
|
23
|
+
const format_money_2 = require("./components/format-money");
|
|
24
|
+
const format_percentage_2 = require("./components/format-percentage");
|
|
25
|
+
const format_number_2 = require("./components/format-number");
|
|
26
|
+
const format_datetime_2 = require("./components/format-datetime");
|
|
23
27
|
__exportStar(require("./get-currency-symbol/get-currency-symbol"), exports);
|
|
24
28
|
function createLocalize(config) {
|
|
25
29
|
return {
|
|
@@ -28,6 +32,10 @@ function createLocalize(config) {
|
|
|
28
32
|
formatNumber: (0, format_number_1.createFormatNumber)(config),
|
|
29
33
|
formatPercentage: (0, format_percentage_1.createFormatPercentage)(config),
|
|
30
34
|
formatMoney: (0, format_money_1.createFormatMoney)(config),
|
|
35
|
+
FormatDateTime: (0, format_datetime_2.createFormatDatetimeComponent)(config),
|
|
36
|
+
FormatNumber: (0, format_number_2.createFormatNumberComponent)(config),
|
|
37
|
+
FormatPercentage: (0, format_percentage_2.createFormatPercentageComponent)(config),
|
|
38
|
+
FormatMoney: (0, format_money_2.createFormatMoneyComponent)(config),
|
|
31
39
|
useFormatDateTime: (0, format_datetime_1.createUseFormatDatetime)(config),
|
|
32
40
|
useFormatNumber: (0, format_number_1.createUseFormatNumber)(config),
|
|
33
41
|
useFormatPercentage: (0, format_percentage_1.createUseFormatPercentage)(config),
|
package/src/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CURRENCIES } from "./utils/data";
|
|
2
|
-
import { Provider } from "react";
|
|
2
|
+
import { Provider, ReactElement } from "react";
|
|
3
3
|
export type DateTimes = "timeShort" | "timeFull" | "dateShort" | "dateMedium" | "dateLong" | "dateShortNoYear" | "dateLongNoYear" | "dateTimeShort" | "dateTimeMedium" | "dateTimeLong";
|
|
4
4
|
export type LocalizeConfig<DT extends DateTimes> = {
|
|
5
5
|
number: {
|
|
@@ -17,25 +17,37 @@ export type LocalizeConfig<DT extends DateTimes> = {
|
|
|
17
17
|
export type LocalizeConfigMap<DT extends DateTimes, Locales extends string> = Record<Locales, LocalizeConfig<DT>>;
|
|
18
18
|
export type LocalizeProviderType = Provider<string>;
|
|
19
19
|
export type UseLocaleConfigType<DT extends DateTimes> = () => LocalizeConfig<DT>;
|
|
20
|
+
export type Money = {
|
|
21
|
+
amount: string;
|
|
22
|
+
currency: Currency;
|
|
23
|
+
};
|
|
20
24
|
export type FormatNumberFunction<Locales extends string> = (locale: Locales, value: number, options?: FormatNumberOptions) => string;
|
|
21
25
|
export type UseFormatNumberFunction = () => (value: number, options?: FormatNumberOptions) => string;
|
|
22
|
-
export type
|
|
23
|
-
export type
|
|
26
|
+
export type FormatNumberComponent = (value: number, options?: FormatNumberOptions) => ReactElement;
|
|
27
|
+
export type FormatMoneyFunction<Locales extends string> = (locale: Locales, money: Money, options?: FormatMoneyOptions) => string;
|
|
28
|
+
export type UseFormatMoneyFunction = () => (money: Money, options?: FormatMoneyOptions) => string;
|
|
29
|
+
export type FormatMoneyComponent = (money: Money, options?: FormatMoneyOptions) => ReactElement;
|
|
24
30
|
export type FormatPercentageFunction<Locales extends string> = (locale: Locales, value: number, roundingType?: RoundingType | null, options?: FormatPercentageOptions) => string;
|
|
25
31
|
export type UseFormatPercentageFunction = () => (value: number, roundingType?: RoundingType | null, options?: FormatPercentageOptions) => string;
|
|
32
|
+
export type FormatPercentageComponent = (value: number, roundingType?: RoundingType | null, options?: FormatPercentageOptions) => ReactElement;
|
|
26
33
|
export type FormatDatetimeFunction<DT extends DateTimes, Locales extends string> = (locale: Locales, value: Date, format: DT) => string;
|
|
27
34
|
export type UseFormatDatetimeFunction<DT extends DateTimes> = () => (value: Date, format: DT) => string;
|
|
35
|
+
export type FormatDatetimeComponent<DT extends DateTimes> = (value: Date, format: DT) => ReactElement;
|
|
28
36
|
export type CreateLocalizeReturn<DT extends DateTimes, Locales extends string> = {
|
|
29
37
|
LocalizeProvider: LocalizeProviderType;
|
|
30
38
|
useLocaleConfig: UseLocaleConfigType<DT>;
|
|
31
39
|
formatNumber: FormatNumberFunction<Locales>;
|
|
32
40
|
useFormatNumber: UseFormatNumberFunction;
|
|
41
|
+
FormatNumber: FormatNumberComponent;
|
|
33
42
|
formatMoney: FormatMoneyFunction<Locales>;
|
|
34
43
|
useFormatMoney: UseFormatMoneyFunction;
|
|
44
|
+
FormatMoney: FormatMoneyComponent;
|
|
35
45
|
formatPercentage: FormatPercentageFunction<Locales>;
|
|
36
46
|
useFormatPercentage: UseFormatPercentageFunction;
|
|
47
|
+
FormatPercentage: FormatPercentageComponent;
|
|
37
48
|
formatDateTime: FormatDatetimeFunction<DT, Locales>;
|
|
38
49
|
useFormatDateTime: UseFormatDatetimeFunction<DT>;
|
|
50
|
+
FormatDateTime: FormatDatetimeComponent<DT>;
|
|
39
51
|
};
|
|
40
52
|
export type Currency = keyof typeof CURRENCIES;
|
|
41
53
|
export type FormatMoneyOptions = {
|
package/src/utils/data.d.ts
CHANGED
|
@@ -5,12 +5,18 @@ export declare const CURRENCIES: {
|
|
|
5
5
|
AFN: {
|
|
6
6
|
symbol: string;
|
|
7
7
|
};
|
|
8
|
+
ALL: {
|
|
9
|
+
symbol: string;
|
|
10
|
+
};
|
|
8
11
|
AMD: {
|
|
9
12
|
symbol: string;
|
|
10
13
|
};
|
|
11
14
|
ANG: {
|
|
12
15
|
symbol: string;
|
|
13
16
|
};
|
|
17
|
+
AOA: {
|
|
18
|
+
symbol: string;
|
|
19
|
+
};
|
|
14
20
|
ARS: {
|
|
15
21
|
symbol: string;
|
|
16
22
|
};
|
|
@@ -23,6 +29,12 @@ export declare const CURRENCIES: {
|
|
|
23
29
|
AZN: {
|
|
24
30
|
symbol: string;
|
|
25
31
|
};
|
|
32
|
+
BAM: {
|
|
33
|
+
symbol: string;
|
|
34
|
+
};
|
|
35
|
+
BBD: {
|
|
36
|
+
symbol: string;
|
|
37
|
+
};
|
|
26
38
|
BDT: {
|
|
27
39
|
symbol: string;
|
|
28
40
|
};
|
|
@@ -35,21 +47,54 @@ export declare const CURRENCIES: {
|
|
|
35
47
|
BIF: {
|
|
36
48
|
symbol: string;
|
|
37
49
|
};
|
|
50
|
+
BMD: {
|
|
51
|
+
symbol: string;
|
|
52
|
+
};
|
|
53
|
+
BND: {
|
|
54
|
+
symbol: string;
|
|
55
|
+
};
|
|
56
|
+
BOB: {
|
|
57
|
+
symbol: string;
|
|
58
|
+
};
|
|
59
|
+
BOV: {
|
|
60
|
+
symbol: string;
|
|
61
|
+
};
|
|
38
62
|
BRL: {
|
|
39
63
|
symbol: string;
|
|
40
64
|
};
|
|
65
|
+
BSD: {
|
|
66
|
+
symbol: string;
|
|
67
|
+
};
|
|
41
68
|
BTN: {
|
|
42
69
|
symbol: string;
|
|
43
70
|
};
|
|
71
|
+
BWP: {
|
|
72
|
+
symbol: string;
|
|
73
|
+
};
|
|
44
74
|
BYN: {
|
|
45
75
|
symbol: string;
|
|
46
76
|
};
|
|
77
|
+
BZD: {
|
|
78
|
+
symbol: string;
|
|
79
|
+
};
|
|
47
80
|
CAD: {
|
|
48
81
|
symbol: string;
|
|
49
82
|
};
|
|
83
|
+
CDF: {
|
|
84
|
+
symbol: string;
|
|
85
|
+
};
|
|
86
|
+
CHE: {
|
|
87
|
+
symbol: string;
|
|
88
|
+
};
|
|
50
89
|
CHF: {
|
|
51
90
|
symbol: string;
|
|
52
91
|
};
|
|
92
|
+
CHW: {
|
|
93
|
+
symbol: string;
|
|
94
|
+
};
|
|
95
|
+
CLF: {
|
|
96
|
+
symbol: string;
|
|
97
|
+
};
|
|
53
98
|
CLP: {
|
|
54
99
|
symbol: string;
|
|
55
100
|
};
|
|
@@ -59,9 +104,15 @@ export declare const CURRENCIES: {
|
|
|
59
104
|
COP: {
|
|
60
105
|
symbol: string;
|
|
61
106
|
};
|
|
107
|
+
COU: {
|
|
108
|
+
symbol: string;
|
|
109
|
+
};
|
|
62
110
|
CRC: {
|
|
63
111
|
symbol: string;
|
|
64
112
|
};
|
|
113
|
+
CUC: {
|
|
114
|
+
symbol: string;
|
|
115
|
+
};
|
|
65
116
|
CUP: {
|
|
66
117
|
symbol: string;
|
|
67
118
|
};
|
|
@@ -77,34 +128,58 @@ export declare const CURRENCIES: {
|
|
|
77
128
|
DKK: {
|
|
78
129
|
symbol: string;
|
|
79
130
|
};
|
|
131
|
+
DOP: {
|
|
132
|
+
symbol: string;
|
|
133
|
+
};
|
|
134
|
+
DZD: {
|
|
135
|
+
symbol: string;
|
|
136
|
+
};
|
|
80
137
|
EGP: {
|
|
81
138
|
symbol: string;
|
|
82
139
|
};
|
|
83
140
|
ERN: {
|
|
84
141
|
symbol: string;
|
|
85
142
|
};
|
|
143
|
+
ETB: {
|
|
144
|
+
symbol: string;
|
|
145
|
+
};
|
|
86
146
|
EUR: {
|
|
87
147
|
symbol: string;
|
|
88
148
|
};
|
|
89
149
|
FJD: {
|
|
90
150
|
symbol: string;
|
|
91
151
|
};
|
|
152
|
+
FKP: {
|
|
153
|
+
symbol: string;
|
|
154
|
+
};
|
|
92
155
|
GBP: {
|
|
93
156
|
symbol: string;
|
|
94
157
|
};
|
|
95
158
|
GEL: {
|
|
96
159
|
symbol: string;
|
|
97
160
|
};
|
|
161
|
+
GHS: {
|
|
162
|
+
symbol: string;
|
|
163
|
+
};
|
|
164
|
+
GIP: {
|
|
165
|
+
symbol: string;
|
|
166
|
+
};
|
|
98
167
|
GMD: {
|
|
99
168
|
symbol: string;
|
|
100
169
|
};
|
|
101
170
|
GNF: {
|
|
102
171
|
symbol: string;
|
|
103
172
|
};
|
|
173
|
+
GTQ: {
|
|
174
|
+
symbol: string;
|
|
175
|
+
};
|
|
176
|
+
GYD: {
|
|
177
|
+
symbol: string;
|
|
178
|
+
};
|
|
104
179
|
HKD: {
|
|
105
180
|
symbol: string;
|
|
106
181
|
};
|
|
107
|
-
|
|
182
|
+
HNL: {
|
|
108
183
|
symbol: string;
|
|
109
184
|
};
|
|
110
185
|
HTG: {
|
|
@@ -116,18 +191,33 @@ export declare const CURRENCIES: {
|
|
|
116
191
|
IDR: {
|
|
117
192
|
symbol: string;
|
|
118
193
|
};
|
|
194
|
+
ILS: {
|
|
195
|
+
symbol: string;
|
|
196
|
+
};
|
|
119
197
|
INR: {
|
|
120
198
|
symbol: string;
|
|
121
199
|
};
|
|
122
200
|
IQD: {
|
|
123
201
|
symbol: string;
|
|
124
202
|
};
|
|
203
|
+
IRR: {
|
|
204
|
+
symbol: string;
|
|
205
|
+
};
|
|
125
206
|
ISK: {
|
|
126
207
|
symbol: string;
|
|
127
208
|
};
|
|
209
|
+
JMD: {
|
|
210
|
+
symbol: string;
|
|
211
|
+
};
|
|
212
|
+
JOD: {
|
|
213
|
+
symbol: string;
|
|
214
|
+
};
|
|
128
215
|
JPY: {
|
|
129
216
|
symbol: string;
|
|
130
217
|
};
|
|
218
|
+
KES: {
|
|
219
|
+
symbol: string;
|
|
220
|
+
};
|
|
131
221
|
KGS: {
|
|
132
222
|
symbol: string;
|
|
133
223
|
};
|
|
@@ -137,15 +227,27 @@ export declare const CURRENCIES: {
|
|
|
137
227
|
KMF: {
|
|
138
228
|
symbol: string;
|
|
139
229
|
};
|
|
230
|
+
KPW: {
|
|
231
|
+
symbol: string;
|
|
232
|
+
};
|
|
140
233
|
KRW: {
|
|
141
234
|
symbol: string;
|
|
142
235
|
};
|
|
143
236
|
KWD: {
|
|
144
237
|
symbol: string;
|
|
145
238
|
};
|
|
239
|
+
KYD: {
|
|
240
|
+
symbol: string;
|
|
241
|
+
};
|
|
146
242
|
KZT: {
|
|
147
243
|
symbol: string;
|
|
148
244
|
};
|
|
245
|
+
LAK: {
|
|
246
|
+
symbol: string;
|
|
247
|
+
};
|
|
248
|
+
LBP: {
|
|
249
|
+
symbol: string;
|
|
250
|
+
};
|
|
149
251
|
LKR: {
|
|
150
252
|
symbol: string;
|
|
151
253
|
};
|
|
@@ -155,16 +257,37 @@ export declare const CURRENCIES: {
|
|
|
155
257
|
LSL: {
|
|
156
258
|
symbol: string;
|
|
157
259
|
};
|
|
260
|
+
LYD: {
|
|
261
|
+
symbol: string;
|
|
262
|
+
};
|
|
263
|
+
MAD: {
|
|
264
|
+
symbol: string;
|
|
265
|
+
};
|
|
158
266
|
MDL: {
|
|
159
267
|
symbol: string;
|
|
160
268
|
};
|
|
269
|
+
MGA: {
|
|
270
|
+
symbol: string;
|
|
271
|
+
};
|
|
272
|
+
MKD: {
|
|
273
|
+
symbol: string;
|
|
274
|
+
};
|
|
161
275
|
MMK: {
|
|
162
276
|
symbol: string;
|
|
163
277
|
};
|
|
164
278
|
MNT: {
|
|
165
279
|
symbol: string;
|
|
166
280
|
};
|
|
167
|
-
|
|
281
|
+
MOP: {
|
|
282
|
+
symbol: string;
|
|
283
|
+
};
|
|
284
|
+
MRU: {
|
|
285
|
+
symbol: string;
|
|
286
|
+
};
|
|
287
|
+
MUR: {
|
|
288
|
+
symbol: string;
|
|
289
|
+
};
|
|
290
|
+
MVR: {
|
|
168
291
|
symbol: string;
|
|
169
292
|
};
|
|
170
293
|
MWK: {
|
|
@@ -173,15 +296,24 @@ export declare const CURRENCIES: {
|
|
|
173
296
|
MXN: {
|
|
174
297
|
symbol: string;
|
|
175
298
|
};
|
|
299
|
+
MXV: {
|
|
300
|
+
symbol: string;
|
|
301
|
+
};
|
|
176
302
|
MYR: {
|
|
177
303
|
symbol: string;
|
|
178
304
|
};
|
|
179
305
|
MZN: {
|
|
180
306
|
symbol: string;
|
|
181
307
|
};
|
|
308
|
+
NAD: {
|
|
309
|
+
symbol: string;
|
|
310
|
+
};
|
|
182
311
|
NGN: {
|
|
183
312
|
symbol: string;
|
|
184
313
|
};
|
|
314
|
+
NIO: {
|
|
315
|
+
symbol: string;
|
|
316
|
+
};
|
|
185
317
|
NOK: {
|
|
186
318
|
symbol: string;
|
|
187
319
|
};
|
|
@@ -191,6 +323,12 @@ export declare const CURRENCIES: {
|
|
|
191
323
|
NZD: {
|
|
192
324
|
symbol: string;
|
|
193
325
|
};
|
|
326
|
+
OMR: {
|
|
327
|
+
symbol: string;
|
|
328
|
+
};
|
|
329
|
+
PAB: {
|
|
330
|
+
symbol: string;
|
|
331
|
+
};
|
|
194
332
|
PEN: {
|
|
195
333
|
symbol: string;
|
|
196
334
|
};
|
|
@@ -209,6 +347,9 @@ export declare const CURRENCIES: {
|
|
|
209
347
|
PYG: {
|
|
210
348
|
symbol: string;
|
|
211
349
|
};
|
|
350
|
+
QAR: {
|
|
351
|
+
symbol: string;
|
|
352
|
+
};
|
|
212
353
|
RON: {
|
|
213
354
|
symbol: string;
|
|
214
355
|
};
|
|
@@ -218,9 +359,18 @@ export declare const CURRENCIES: {
|
|
|
218
359
|
RUB: {
|
|
219
360
|
symbol: string;
|
|
220
361
|
};
|
|
362
|
+
RWF: {
|
|
363
|
+
symbol: string;
|
|
364
|
+
};
|
|
365
|
+
SAR: {
|
|
366
|
+
symbol: string;
|
|
367
|
+
};
|
|
221
368
|
SBD: {
|
|
222
369
|
symbol: string;
|
|
223
370
|
};
|
|
371
|
+
SCR: {
|
|
372
|
+
symbol: string;
|
|
373
|
+
};
|
|
224
374
|
SDG: {
|
|
225
375
|
symbol: string;
|
|
226
376
|
};
|
|
@@ -230,12 +380,30 @@ export declare const CURRENCIES: {
|
|
|
230
380
|
SGD: {
|
|
231
381
|
symbol: string;
|
|
232
382
|
};
|
|
383
|
+
SHP: {
|
|
384
|
+
symbol: string;
|
|
385
|
+
};
|
|
386
|
+
SLE: {
|
|
387
|
+
symbol: string;
|
|
388
|
+
};
|
|
233
389
|
SLL: {
|
|
234
390
|
symbol: string;
|
|
235
391
|
};
|
|
392
|
+
SOS: {
|
|
393
|
+
symbol: string;
|
|
394
|
+
};
|
|
236
395
|
SRD: {
|
|
237
396
|
symbol: string;
|
|
238
397
|
};
|
|
398
|
+
SSP: {
|
|
399
|
+
symbol: string;
|
|
400
|
+
};
|
|
401
|
+
STN: {
|
|
402
|
+
symbol: string;
|
|
403
|
+
};
|
|
404
|
+
SVC: {
|
|
405
|
+
symbol: string;
|
|
406
|
+
};
|
|
239
407
|
SYP: {
|
|
240
408
|
symbol: string;
|
|
241
409
|
};
|
|
@@ -251,24 +419,51 @@ export declare const CURRENCIES: {
|
|
|
251
419
|
TMT: {
|
|
252
420
|
symbol: string;
|
|
253
421
|
};
|
|
422
|
+
TND: {
|
|
423
|
+
symbol: string;
|
|
424
|
+
};
|
|
425
|
+
TOP: {
|
|
426
|
+
symbol: string;
|
|
427
|
+
};
|
|
254
428
|
TRY: {
|
|
255
429
|
symbol: string;
|
|
256
430
|
};
|
|
431
|
+
TTD: {
|
|
432
|
+
symbol: string;
|
|
433
|
+
};
|
|
434
|
+
TWD: {
|
|
435
|
+
symbol: string;
|
|
436
|
+
};
|
|
257
437
|
TZS: {
|
|
258
438
|
symbol: string;
|
|
259
439
|
};
|
|
440
|
+
UAH: {
|
|
441
|
+
symbol: string;
|
|
442
|
+
};
|
|
260
443
|
UGX: {
|
|
261
444
|
symbol: string;
|
|
262
445
|
};
|
|
263
446
|
USD: {
|
|
264
447
|
symbol: string;
|
|
265
448
|
};
|
|
449
|
+
USN: {
|
|
450
|
+
symbol: string;
|
|
451
|
+
};
|
|
452
|
+
UYI: {
|
|
453
|
+
symbol: string;
|
|
454
|
+
};
|
|
266
455
|
UYU: {
|
|
267
456
|
symbol: string;
|
|
268
457
|
};
|
|
458
|
+
UYW: {
|
|
459
|
+
symbol: string;
|
|
460
|
+
};
|
|
269
461
|
UZS: {
|
|
270
462
|
symbol: string;
|
|
271
463
|
};
|
|
464
|
+
VED: {
|
|
465
|
+
symbol: string;
|
|
466
|
+
};
|
|
272
467
|
VES: {
|
|
273
468
|
symbol: string;
|
|
274
469
|
};
|
|
@@ -281,6 +476,12 @@ export declare const CURRENCIES: {
|
|
|
281
476
|
WST: {
|
|
282
477
|
symbol: string;
|
|
283
478
|
};
|
|
479
|
+
XAF: {
|
|
480
|
+
symbol: string;
|
|
481
|
+
};
|
|
482
|
+
XCD: {
|
|
483
|
+
symbol: string;
|
|
484
|
+
};
|
|
284
485
|
XOF: {
|
|
285
486
|
symbol: string;
|
|
286
487
|
};
|
|
@@ -296,4 +497,7 @@ export declare const CURRENCIES: {
|
|
|
296
497
|
ZMW: {
|
|
297
498
|
symbol: string;
|
|
298
499
|
};
|
|
500
|
+
ZWL: {
|
|
501
|
+
symbol: string;
|
|
502
|
+
};
|
|
299
503
|
};
|
package/src/utils/data.js
CHANGED
|
@@ -4,101 +4,169 @@ exports.CURRENCIES = void 0;
|
|
|
4
4
|
exports.CURRENCIES = {
|
|
5
5
|
AED: { symbol: "د.إ" },
|
|
6
6
|
AFN: { symbol: "؋" },
|
|
7
|
+
ALL: { symbol: "" },
|
|
7
8
|
AMD: { symbol: "֏" },
|
|
8
9
|
ANG: { symbol: "ƒ" },
|
|
10
|
+
AOA: { symbol: "" },
|
|
9
11
|
ARS: { symbol: "$" },
|
|
10
12
|
AUD: { symbol: "$" },
|
|
11
13
|
AWG: { symbol: "ƒ" },
|
|
12
14
|
AZN: { symbol: "₼" },
|
|
15
|
+
BAM: { symbol: "" },
|
|
16
|
+
BBD: { symbol: "" },
|
|
13
17
|
BDT: { symbol: "৳" },
|
|
14
18
|
BGN: { symbol: "лв" },
|
|
15
19
|
BHD: { symbol: ".د.ب" },
|
|
16
20
|
BIF: { symbol: "FBu" },
|
|
21
|
+
BMD: { symbol: "" },
|
|
22
|
+
BND: { symbol: "" },
|
|
23
|
+
BOB: { symbol: "" },
|
|
24
|
+
BOV: { symbol: "" },
|
|
17
25
|
BRL: { symbol: "R$" },
|
|
26
|
+
BSD: { symbol: "" },
|
|
18
27
|
BTN: { symbol: "Nu." },
|
|
28
|
+
BWP: { symbol: "" },
|
|
19
29
|
BYN: { symbol: "Br" },
|
|
30
|
+
BZD: { symbol: "" },
|
|
20
31
|
CAD: { symbol: "$" },
|
|
32
|
+
CDF: { symbol: "" },
|
|
33
|
+
CHE: { symbol: "" },
|
|
21
34
|
CHF: { symbol: "CHF" },
|
|
35
|
+
CHW: { symbol: "" },
|
|
36
|
+
CLF: { symbol: "" },
|
|
22
37
|
CLP: { symbol: "$" },
|
|
23
38
|
CNY: { symbol: "¥" },
|
|
24
39
|
COP: { symbol: "$" },
|
|
40
|
+
COU: { symbol: "" },
|
|
25
41
|
CRC: { symbol: "₡" },
|
|
42
|
+
CUC: { symbol: "" },
|
|
26
43
|
CUP: { symbol: "₱" },
|
|
27
44
|
CVE: { symbol: "$" },
|
|
28
45
|
CZK: { symbol: "Kč" },
|
|
29
46
|
DJF: { symbol: "Fdj" },
|
|
30
47
|
DKK: { symbol: "kr" },
|
|
48
|
+
DOP: { symbol: "" },
|
|
49
|
+
DZD: { symbol: "" },
|
|
31
50
|
EGP: { symbol: "£" },
|
|
32
51
|
ERN: { symbol: "Nfk" },
|
|
52
|
+
ETB: { symbol: "" },
|
|
33
53
|
EUR: { symbol: "€" },
|
|
34
54
|
FJD: { symbol: "$" },
|
|
55
|
+
FKP: { symbol: "" },
|
|
35
56
|
GBP: { symbol: "£" },
|
|
36
57
|
GEL: { symbol: "₾" },
|
|
58
|
+
GHS: { symbol: "" },
|
|
59
|
+
GIP: { symbol: "" },
|
|
37
60
|
GMD: { symbol: "D" },
|
|
38
61
|
GNF: { symbol: "FG" },
|
|
62
|
+
GTQ: { symbol: "" },
|
|
63
|
+
GYD: { symbol: "" },
|
|
39
64
|
HKD: { symbol: "$" },
|
|
40
|
-
|
|
65
|
+
HNL: { symbol: "" },
|
|
41
66
|
HTG: { symbol: "G" },
|
|
42
67
|
HUF: { symbol: "Ft" },
|
|
43
68
|
IDR: { symbol: "Rp" },
|
|
69
|
+
ILS: { symbol: "" },
|
|
44
70
|
INR: { symbol: "₹" },
|
|
45
71
|
IQD: { symbol: "ع.د" },
|
|
72
|
+
IRR: { symbol: "" },
|
|
46
73
|
ISK: { symbol: "kr" },
|
|
74
|
+
JMD: { symbol: "" },
|
|
75
|
+
JOD: { symbol: "" },
|
|
47
76
|
JPY: { symbol: "¥" },
|
|
77
|
+
KES: { symbol: "" },
|
|
48
78
|
KGS: { symbol: "с" },
|
|
49
79
|
KHR: { symbol: "៛" },
|
|
50
80
|
KMF: { symbol: "CF" },
|
|
81
|
+
KPW: { symbol: "" },
|
|
51
82
|
KRW: { symbol: "₩" },
|
|
52
83
|
KWD: { symbol: "د.ك" },
|
|
84
|
+
KYD: { symbol: "" },
|
|
53
85
|
KZT: { symbol: "₸" },
|
|
86
|
+
LAK: { symbol: "" },
|
|
87
|
+
LBP: { symbol: "" },
|
|
54
88
|
LKR: { symbol: "₨" },
|
|
55
89
|
LRD: { symbol: "$" },
|
|
56
90
|
LSL: { symbol: "L" },
|
|
91
|
+
LYD: { symbol: "" },
|
|
92
|
+
MAD: { symbol: "" },
|
|
57
93
|
MDL: { symbol: "L" },
|
|
94
|
+
MGA: { symbol: "" },
|
|
95
|
+
MKD: { symbol: "" },
|
|
58
96
|
MMK: { symbol: "K" },
|
|
59
97
|
MNT: { symbol: "₮" },
|
|
60
|
-
|
|
98
|
+
MOP: { symbol: "" },
|
|
99
|
+
MRU: { symbol: "" },
|
|
100
|
+
MUR: { symbol: "" },
|
|
101
|
+
MVR: { symbol: "" },
|
|
61
102
|
MWK: { symbol: "MK" },
|
|
62
103
|
MXN: { symbol: "$" },
|
|
104
|
+
MXV: { symbol: "" },
|
|
63
105
|
MYR: { symbol: "RM" },
|
|
64
106
|
MZN: { symbol: "MT" },
|
|
107
|
+
NAD: { symbol: "" },
|
|
65
108
|
NGN: { symbol: "₦" },
|
|
109
|
+
NIO: { symbol: "" },
|
|
66
110
|
NOK: { symbol: "kr" },
|
|
67
111
|
NPR: { symbol: "₨" },
|
|
68
112
|
NZD: { symbol: "$" },
|
|
113
|
+
OMR: { symbol: "" },
|
|
114
|
+
PAB: { symbol: "" },
|
|
69
115
|
PEN: { symbol: "S/" },
|
|
70
116
|
PGK: { symbol: "K" },
|
|
71
117
|
PHP: { symbol: "₱" },
|
|
72
118
|
PKR: { symbol: "₨" },
|
|
73
119
|
PLN: { symbol: "zł" },
|
|
74
120
|
PYG: { symbol: "₲" },
|
|
121
|
+
QAR: { symbol: "" },
|
|
75
122
|
RON: { symbol: "lei" },
|
|
76
123
|
RSD: { symbol: "дин." },
|
|
77
124
|
RUB: { symbol: "₽" },
|
|
125
|
+
RWF: { symbol: "" },
|
|
126
|
+
SAR: { symbol: "" },
|
|
78
127
|
SBD: { symbol: "$" },
|
|
128
|
+
SCR: { symbol: "" },
|
|
79
129
|
SDG: { symbol: "ج.س." },
|
|
80
130
|
SEK: { symbol: "kr" },
|
|
81
131
|
SGD: { symbol: "$" },
|
|
132
|
+
SHP: { symbol: "" },
|
|
133
|
+
SLE: { symbol: "" },
|
|
82
134
|
SLL: { symbol: "Le" },
|
|
135
|
+
SOS: { symbol: "" },
|
|
83
136
|
SRD: { symbol: "$" },
|
|
137
|
+
SSP: { symbol: "" },
|
|
138
|
+
STN: { symbol: "" },
|
|
139
|
+
SVC: { symbol: "" },
|
|
84
140
|
SYP: { symbol: "£" },
|
|
85
141
|
SZL: { symbol: "E" },
|
|
86
142
|
THB: { symbol: "฿" },
|
|
87
143
|
TJS: { symbol: "ЅМ" },
|
|
88
144
|
TMT: { symbol: "m" },
|
|
145
|
+
TND: { symbol: "" },
|
|
146
|
+
TOP: { symbol: "" },
|
|
89
147
|
TRY: { symbol: "₺" },
|
|
148
|
+
TTD: { symbol: "" },
|
|
149
|
+
TWD: { symbol: "" },
|
|
90
150
|
TZS: { symbol: "Sh" },
|
|
151
|
+
UAH: { symbol: "" },
|
|
91
152
|
UGX: { symbol: "USh" },
|
|
92
153
|
USD: { symbol: "$" },
|
|
154
|
+
USN: { symbol: "" },
|
|
155
|
+
UYI: { symbol: "" },
|
|
93
156
|
UYU: { symbol: "$" },
|
|
157
|
+
UYW: { symbol: "" },
|
|
94
158
|
UZS: { symbol: "soʻm" },
|
|
159
|
+
VED: { symbol: "" },
|
|
95
160
|
VES: { symbol: "Bs" },
|
|
96
161
|
VND: { symbol: "₫" },
|
|
97
162
|
VUV: { symbol: "VT" },
|
|
98
163
|
WST: { symbol: "T" },
|
|
164
|
+
XAF: { symbol: "" },
|
|
165
|
+
XCD: { symbol: "" },
|
|
99
166
|
XOF: { symbol: "CFA" },
|
|
100
167
|
XPF: { symbol: "₣" },
|
|
101
168
|
YER: { symbol: "﷼" },
|
|
102
169
|
ZAR: { symbol: "R" },
|
|
103
170
|
ZMW: { symbol: "ZK" },
|
|
171
|
+
ZWL: { symbol: "" },
|
|
104
172
|
};
|