@leyyo/localization 1.1.1 → 1.1.3
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/README.md +3 -3
- package/dist/base/base-localization.handler.d.ts +1 -1
- package/dist/base/base-localization.handler.js +18 -12
- package/dist/base/index.d.ts +2 -2
- package/dist/base/index.js +2 -19
- package/dist/base/index.types.js +1 -3
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -19
- package/dist/config/index.types.d.ts +3 -5
- package/dist/config/index.types.js +1 -3
- package/dist/config/localization.config.d.ts +1 -1
- package/dist/config/localization.config.js +33 -21
- package/dist/country/country.handler.d.ts +1 -1
- package/dist/country/country.handler.js +13 -23
- package/dist/country/country.map.d.ts +2 -2
- package/dist/country/country.map.js +252 -256
- package/dist/country/index.d.ts +2 -3
- package/dist/country/index.js +2 -20
- package/dist/country/index.types.d.ts +2 -3
- package/dist/country/index.types.js +1 -3
- package/dist/exchange/exchange.handler.d.ts +1 -1
- package/dist/exchange/exchange.handler.js +14 -25
- package/dist/exchange/exchange.map.d.ts +2 -2
- package/dist/exchange/exchange.map.js +36 -9
- package/dist/exchange/index.d.ts +2 -3
- package/dist/exchange/index.js +2 -20
- package/dist/exchange/index.types.d.ts +2 -3
- package/dist/exchange/index.types.js +1 -3
- package/dist/index.d.ts +11 -7
- package/dist/index.foretell.d.ts +1 -0
- package/dist/index.foretell.js +19 -0
- package/dist/index.js +11 -24
- package/dist/index.loader.d.ts +1 -0
- package/dist/index.loader.js +13 -0
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +2 -5
- package/dist/language/index.d.ts +2 -3
- package/dist/language/index.js +2 -20
- package/dist/language/index.types.d.ts +2 -2
- package/dist/language/index.types.js +1 -3
- package/dist/language/language.handler.d.ts +1 -11
- package/dist/language/language.handler.js +13 -21
- package/dist/language/language.map.d.ts +2 -2
- package/dist/language/language.map.js +185 -189
- package/dist/literal/browser-type.d.ts +7 -0
- package/dist/literal/browser-type.js +2 -0
- package/dist/{country → literal}/country-code.d.ts +1 -1
- package/dist/literal/country-code.js +257 -0
- package/dist/literal/cpu-architecture.d.ts +7 -0
- package/dist/literal/cpu-architecture.js +20 -0
- package/dist/literal/device-type.d.ts +7 -0
- package/dist/literal/device-type.js +11 -0
- package/dist/literal/engine-type.d.ts +7 -0
- package/dist/literal/engine-type.js +23 -0
- package/dist/{exchange → literal}/exchange-code.d.ts +1 -1
- package/dist/literal/exchange-code.js +157 -0
- package/dist/literal/index.d.ts +9 -0
- package/dist/literal/index.js +9 -0
- package/dist/{language → literal}/language-code.d.ts +1 -1
- package/dist/literal/language-code.js +187 -0
- package/dist/{locale → literal}/locale-code.d.ts +1 -1
- package/dist/literal/locale-code.js +199 -0
- package/dist/{timezone → literal}/timezone-code.d.ts +1 -1
- package/dist/literal/timezone-code.js +605 -0
- package/dist/locale/index.d.ts +2 -3
- package/dist/locale/index.js +2 -20
- package/dist/locale/index.types.d.ts +2 -4
- package/dist/locale/index.types.js +1 -3
- package/dist/locale/locale.handler.d.ts +1 -17
- package/dist/locale/locale.handler.js +17 -28
- package/dist/locale/locale.map.d.ts +2 -2
- package/dist/locale/locale.map.js +84 -88
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/index.js +2 -19
- package/dist/parser/index.types.d.ts +4 -24
- package/dist/parser/index.types.js +1 -3
- package/dist/parser/localization.parser.d.ts +1 -1
- package/dist/parser/localization.parser.js +112 -111
- package/dist/timezone/index.d.ts +2 -3
- package/dist/timezone/index.js +2 -20
- package/dist/timezone/index.types.d.ts +2 -3
- package/dist/timezone/index.types.js +1 -3
- package/dist/timezone/timezone.handler.d.ts +1 -1
- package/dist/timezone/timezone.handler.js +21 -24
- package/dist/timezone/timezone.map.d.ts +2 -2
- package/dist/timezone/timezone.map.js +603 -607
- package/package.json +23 -23
- package/dist/base/base-localization.handler.js.map +0 -1
- package/dist/base/index.js.map +0 -1
- package/dist/base/index.types.js.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/index.types.js.map +0 -1
- package/dist/config/localization.config.js.map +0 -1
- package/dist/country/country-code.js +0 -19
- package/dist/country/country-code.js.map +0 -1
- package/dist/country/country.handler.js.map +0 -1
- package/dist/country/country.map.js.map +0 -1
- package/dist/country/index.js.map +0 -1
- package/dist/country/index.types.js.map +0 -1
- package/dist/exchange/exchange-code.js +0 -23
- package/dist/exchange/exchange-code.js.map +0 -1
- package/dist/exchange/exchange.handler.js.map +0 -1
- package/dist/exchange/exchange.map.js.map +0 -1
- package/dist/exchange/index.js.map +0 -1
- package/dist/exchange/index.types.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal.js.map +0 -1
- package/dist/language/index.js.map +0 -1
- package/dist/language/index.types.js.map +0 -1
- package/dist/language/language-code.js +0 -33
- package/dist/language/language-code.js.map +0 -1
- package/dist/language/language.handler.js.map +0 -1
- package/dist/language/language.map.js.map +0 -1
- package/dist/locale/index.js.map +0 -1
- package/dist/locale/index.types.js.map +0 -1
- package/dist/locale/locale-code.js +0 -25
- package/dist/locale/locale-code.js.map +0 -1
- package/dist/locale/locale.handler.js.map +0 -1
- package/dist/locale/locale.map.js.map +0 -1
- package/dist/parser/index.js.map +0 -1
- package/dist/parser/index.types.js.map +0 -1
- package/dist/parser/localization.parser.js.map +0 -1
- package/dist/timezone/index.js.map +0 -1
- package/dist/timezone/index.types.js.map +0 -1
- package/dist/timezone/timezone-code.js +0 -109
- package/dist/timezone/timezone-code.js.map +0 -1
- package/dist/timezone/timezone.handler.js.map +0 -1
- package/dist/timezone/timezone.map.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type { BaseLocalizationHandlerLike, BaseLocalizationHandlerRaw, BaseLocalizationHandlerView } from "../base";
|
|
1
|
+
import { CountryCode, LanguageCode } from "../literal/index.js";
|
|
2
|
+
import { BaseLocalizationHandlerLike, BaseLocalizationHandlerRaw, BaseLocalizationHandlerView } from "../base/index.js";
|
|
4
3
|
/**
|
|
5
4
|
* Country raw format
|
|
6
5
|
* @interface
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ExchangeHandlerLike } from "./index.types.js";
|
|
2
2
|
export declare const exchangeHandler: ExchangeHandlerLike;
|
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const exchange_code_1 = require("./exchange-code");
|
|
5
|
-
const exchange_map_1 = require("./exchange.map");
|
|
6
|
-
const base_1 = require("../base");
|
|
1
|
+
import { ExchangeCodeItems } from "../literal/index.js";
|
|
2
|
+
import { exchangeMap } from "./exchange.map.js";
|
|
3
|
+
import { BaseLocalizationHandler } from "../base/index.js";
|
|
7
4
|
/** @inheritDoc */
|
|
8
|
-
class ExchangeHandler extends
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/** @inheritDoc */
|
|
14
|
-
this.codes = exchange_code_1.ExchangeCodeItems;
|
|
15
|
-
}
|
|
5
|
+
class ExchangeHandler extends BaseLocalizationHandler {
|
|
6
|
+
/** @inheritDoc */
|
|
7
|
+
_raw = exchangeMap;
|
|
8
|
+
/** @inheritDoc */
|
|
9
|
+
codes = ExchangeCodeItems;
|
|
16
10
|
/** @inheritDoc */
|
|
17
11
|
getSymbol(code) {
|
|
18
|
-
|
|
19
|
-
return (_a = this.getRaw(code)) === null || _a === void 0 ? void 0 : _a.s;
|
|
12
|
+
return this.getRaw(code)?.s;
|
|
20
13
|
}
|
|
21
14
|
/** @inheritDoc */
|
|
22
15
|
getNumber(code) {
|
|
23
|
-
|
|
24
|
-
return (_a = this.getRaw(code)) === null || _a === void 0 ? void 0 : _a.u;
|
|
16
|
+
return this.getRaw(code)?.u;
|
|
25
17
|
}
|
|
26
18
|
/** @inheritDoc */
|
|
27
19
|
getCountries(code) {
|
|
28
|
-
|
|
29
|
-
return (_b = (_a = this.getRaw(code)) === null || _a === void 0 ? void 0 : _a.c) !== null && _b !== void 0 ? _b : [];
|
|
20
|
+
return this.getRaw(code)?.c ?? [];
|
|
30
21
|
}
|
|
31
22
|
/** @inheritDoc */
|
|
32
23
|
findByCountry(countryCode) {
|
|
33
|
-
if (typeof countryCode !==
|
|
24
|
+
if (typeof countryCode !== "string") {
|
|
34
25
|
return [];
|
|
35
26
|
}
|
|
36
27
|
const result = [];
|
|
@@ -42,14 +33,12 @@ class ExchangeHandler extends base_1.BaseLocalizationHandler {
|
|
|
42
33
|
return result;
|
|
43
34
|
}
|
|
44
35
|
get(code) {
|
|
45
|
-
var _a;
|
|
46
36
|
const item = this.getRaw(code);
|
|
47
37
|
if (!item) {
|
|
48
38
|
return { code, name: code, symbol: undefined, number: undefined, countries: [] };
|
|
49
39
|
}
|
|
50
|
-
return { code, name: item.n, symbol: item.s, number: item.u, countries:
|
|
40
|
+
return { code, name: item.n, symbol: item.s, number: item.u, countries: item.c ?? [] };
|
|
51
41
|
}
|
|
52
42
|
}
|
|
53
43
|
// noinspection JSUnusedGlobalSymbols
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=exchange.handler.js.map
|
|
44
|
+
export const exchangeHandler = new ExchangeHandler();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ExchangeCode } from "../literal/index.js";
|
|
2
|
+
import { ExchangeRaw } from "./index.types.js";
|
|
3
3
|
export declare const exchangeMap: Record<ExchangeCode, ExchangeRaw>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exchangeMap = void 0;
|
|
4
|
-
exports.exchangeMap = {
|
|
1
|
+
export const exchangeMap = {
|
|
5
2
|
AED: { n: "UAE Dirham", s: "د.إ", u: 784, c: ["AE"] },
|
|
6
3
|
AFN: { n: "Afghani", s: "Af", u: 971, c: ["AF"] },
|
|
7
4
|
ALL: { n: "Lek", s: "L", u: 8, c: ["AL"] },
|
|
@@ -149,24 +146,54 @@ exports.exchangeMap = {
|
|
|
149
146
|
ZAR: { n: "Rand", s: "R", u: 710, c: ["LS", "NA", "ZA"] },
|
|
150
147
|
NZD: { n: "New Zealand Dollar", s: "$", u: 554, c: ["CK", "NZ", "NU", "PN"] },
|
|
151
148
|
AUD: { n: "Australian Dollar", s: "$", u: 36, c: ["AU", "KI", "CC", "NR", "TV"] },
|
|
152
|
-
XCD: {
|
|
149
|
+
XCD: {
|
|
150
|
+
n: "East Caribbean Dollar",
|
|
151
|
+
s: "$",
|
|
152
|
+
u: 951,
|
|
153
|
+
c: ["AI", "AG", "DM", "GD", "MS", "KN", "LC", "VC"],
|
|
154
|
+
},
|
|
153
155
|
USD: {
|
|
154
156
|
n: "US Dollar",
|
|
155
157
|
s: "$",
|
|
156
158
|
u: 840,
|
|
157
|
-
c: ["AS", "IO", "VG", "GU", "HT", "MH", "FM", "MP", "US", "PW", "PA", "PR", "TC", "VI"]
|
|
159
|
+
c: ["AS", "IO", "VG", "GU", "HT", "MH", "FM", "MP", "US", "PW", "PA", "PR", "TC", "VI"],
|
|
158
160
|
},
|
|
159
161
|
XAF: {
|
|
160
162
|
n: "CFA Franc BCEAO",
|
|
161
163
|
s: "₣",
|
|
162
164
|
u: 950,
|
|
163
|
-
c: ["BJ", "BF", "CM", "CF", "TD", "CG", "CI", "GQ", "GA", "GW", "ML", "NE", "SN", "TG"]
|
|
165
|
+
c: ["BJ", "BF", "CM", "CF", "TD", "CG", "CI", "GQ", "GA", "GW", "ML", "NE", "SN", "TG"],
|
|
164
166
|
},
|
|
165
167
|
EUR: {
|
|
166
168
|
n: "Euro",
|
|
167
169
|
s: "€",
|
|
168
170
|
u: 978,
|
|
169
|
-
c: [
|
|
171
|
+
c: [
|
|
172
|
+
"GB",
|
|
173
|
+
"AD",
|
|
174
|
+
"AT",
|
|
175
|
+
"BE",
|
|
176
|
+
"CY",
|
|
177
|
+
"EE",
|
|
178
|
+
"FI",
|
|
179
|
+
"FR",
|
|
180
|
+
"DE",
|
|
181
|
+
"GR",
|
|
182
|
+
"IE",
|
|
183
|
+
"IT",
|
|
184
|
+
"LV",
|
|
185
|
+
"LT",
|
|
186
|
+
"LU",
|
|
187
|
+
"MT",
|
|
188
|
+
"MC",
|
|
189
|
+
"ME",
|
|
190
|
+
"NL",
|
|
191
|
+
"PT",
|
|
192
|
+
"SM",
|
|
193
|
+
"SK",
|
|
194
|
+
"SI",
|
|
195
|
+
"ES",
|
|
196
|
+
"VA",
|
|
197
|
+
],
|
|
170
198
|
},
|
|
171
199
|
};
|
|
172
|
-
//# sourceMappingURL=exchange.map.js.map
|
package/dist/exchange/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from './exchange.handler';
|
|
1
|
+
export * from "./index.types.js";
|
|
2
|
+
export * from "./exchange.handler.js";
|
package/dist/exchange/index.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./exchange-code"), exports);
|
|
18
|
-
__exportStar(require("./index.types"), exports);
|
|
19
|
-
__exportStar(require("./exchange.handler"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./index.types.js";
|
|
2
|
+
export * from "./exchange.handler.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type { BaseLocalizationHandlerLike, BaseLocalizationHandlerRaw, BaseLocalizationHandlerView } from "../base";
|
|
1
|
+
import { CountryCode, ExchangeCode } from "../literal/index.js";
|
|
2
|
+
import { BaseLocalizationHandlerLike, BaseLocalizationHandlerRaw, BaseLocalizationHandlerView } from "../base/index.js";
|
|
4
3
|
/**
|
|
5
4
|
* Exchange raw format
|
|
6
5
|
* @interface
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
1
|
+
export * from "./base/index.js";
|
|
2
|
+
export * from "./config/index.js";
|
|
3
|
+
export * from "./country/index.js";
|
|
4
|
+
export * from "./exchange/index.js";
|
|
5
|
+
export * from "./language/index.js";
|
|
6
|
+
export * from "./literal/index.js";
|
|
7
|
+
export * from "./locale/index.js";
|
|
8
|
+
export * from "./parser/index.js";
|
|
9
|
+
export * from "./timezone/index.js";
|
|
10
|
+
export * from "./index.foretell.js";
|
|
11
|
+
export * from "./index.loader.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const foretell_leyyoLocalization: (() => void)[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { foretell_leyyoCommon, literalPool } from "@leyyo/common";
|
|
2
|
+
import { FQN } from "./internal.js";
|
|
3
|
+
import { foretell_leyyoBuilder } from "@leyyo/builder";
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
export const foretell_leyyoLocalization = [
|
|
6
|
+
// dependencies
|
|
7
|
+
...foretell_leyyoCommon,
|
|
8
|
+
...foretell_leyyoBuilder,
|
|
9
|
+
// literals
|
|
10
|
+
() => literalPool.lazy(FQN, "BrowserType", import("./literal/browser-type.js").then((m) => m.BrowserTypeItems), { i18n: true }),
|
|
11
|
+
() => literalPool.lazy(FQN, "CountryCode", import("./literal/country-code.js").then((m) => m.CountryCodeItems), { i18n: true }),
|
|
12
|
+
() => literalPool.lazy(FQN, "CpuArchitecture", import("./literal/cpu-architecture.js").then((m) => m.CpuArchitectureItems), { i18n: true }),
|
|
13
|
+
() => literalPool.lazy(FQN, "DeviceType", import("./literal/device-type.js").then((m) => m.DeviceTypeItems), { i18n: true }),
|
|
14
|
+
() => literalPool.lazy(FQN, "EngineType", import("./literal/engine-type.js").then((m) => m.EngineTypeItems), { i18n: true }),
|
|
15
|
+
() => literalPool.lazy(FQN, "ExchangeCode", import("./literal/exchange-code.js").then((m) => m.ExchangeCodeItems), { i18n: true }),
|
|
16
|
+
() => literalPool.lazy(FQN, "LanguageCode", import("./literal/language-code.js").then((m) => m.LanguageCodeItems), { i18n: true }),
|
|
17
|
+
() => literalPool.lazy(FQN, "LocaleCode", import("./literal/locale-code.js").then((m) => m.LocaleCodeItems), { i18n: true }),
|
|
18
|
+
() => literalPool.lazy(FQN, "TimezoneCode", import("./literal/timezone-code.js").then((m) => m.TimezoneCodeItems), { i18n: true }),
|
|
19
|
+
];
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./base"), exports);
|
|
18
|
-
__exportStar(require("./config"), exports);
|
|
19
|
-
__exportStar(require("./country"), exports);
|
|
20
|
-
__exportStar(require("./exchange"), exports);
|
|
21
|
-
__exportStar(require("./language"), exports);
|
|
22
|
-
__exportStar(require("./locale"), exports);
|
|
23
|
-
__exportStar(require("./timezone"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./base/index.js";
|
|
2
|
+
export * from "./config/index.js";
|
|
3
|
+
export * from "./country/index.js";
|
|
4
|
+
export * from "./exchange/index.js";
|
|
5
|
+
export * from "./language/index.js";
|
|
6
|
+
export * from "./literal/index.js";
|
|
7
|
+
export * from "./locale/index.js";
|
|
8
|
+
export * from "./parser/index.js";
|
|
9
|
+
export * from "./timezone/index.js";
|
|
10
|
+
export * from "./index.foretell.js";
|
|
11
|
+
export * from "./index.loader.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const loader_leyyoLocalization: import("@leyyo/common").LoaderLike;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineLoader, loader_leyyoCommon } from "@leyyo/common";
|
|
2
|
+
import { FQN } from "./internal.js";
|
|
3
|
+
import { loader_leyyoBuilder } from "@leyyo/builder";
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
export const loader_leyyoLocalization = defineLoader(FQN,
|
|
6
|
+
// dependencies
|
|
7
|
+
...loader_leyyoCommon, ...loader_leyyoBuilder,
|
|
8
|
+
// literals
|
|
9
|
+
() => import("./literal/browser-type.js").then((m) => m.BrowserTypeItems), () => import("./literal/country-code.js").then((m) => m.CountryCodeItems), () => import("./literal/cpu-architecture.js").then((m) => m.CpuArchitectureItems), () => import("./literal/device-type.js").then((m) => m.DeviceTypeItems), () => import("./literal/engine-type.js").then((m) => m.EngineTypeItems), () => import("./literal/exchange-code.js").then((m) => m.ExchangeCodeItems), () => import("./literal/language-code.js").then((m) => m.LanguageCodeItems), () => import("./literal/locale-code.js").then((m) => m.LocaleCodeItems), () => import("./literal/timezone-code.js").then((m) => m.TimezoneCodeItems),
|
|
10
|
+
// classes
|
|
11
|
+
() => import("./base/base-localization.handler.js").then((m) => m.BaseLocalizationHandler),
|
|
12
|
+
// instances
|
|
13
|
+
() => import("./config/localization.config.js").then((m) => m.localizationConfig), () => import("./country/country.handler.js").then((m) => m.countryHandler), () => import("./exchange/exchange.handler.js").then((m) => m.exchangeHandler), () => import("./language/language.handler.js").then((m) => m.languageHandler), () => import("./locale/locale.handler.js").then((m) => m.localeHandler), () => import("./parser/localization.parser.js").then((m) => m.localizationParser), () => import("./timezone/timezone.handler.js").then((m) => m.timezoneHandler));
|
package/dist/internal.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FQN
|
|
1
|
+
export declare const NME: string, FQN: string, VER: string;
|
package/dist/internal.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FQN = void 0;
|
|
1
|
+
import { packageJson } from "@leyyo/common";
|
|
4
2
|
// noinspection JSUnusedGlobalSymbols
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=internal.js.map
|
|
3
|
+
export const { name: NME, fqn: FQN, version: VER } = packageJson(import.meta.url);
|
package/dist/language/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from './language.handler';
|
|
1
|
+
export * from "./index.types.js";
|
|
2
|
+
export * from "./language.handler.js";
|
package/dist/language/index.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./language-code"), exports);
|
|
18
|
-
__exportStar(require("./index.types"), exports);
|
|
19
|
-
__exportStar(require("./language.handler"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./index.types.js";
|
|
2
|
+
export * from "./language.handler.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { LanguageCode } from "../literal/index.js";
|
|
2
|
+
import { BaseLocalizationHandlerLike, BaseLocalizationHandlerRaw, BaseLocalizationHandlerView } from "../base/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Language raw format
|
|
5
5
|
* @interface
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { LanguageHandlerLike, LanguageRaw, LanguageView } from "./index.types";
|
|
3
|
-
import { BaseLocalizationHandler } from "../base";
|
|
4
|
-
/** @inheritDoc */
|
|
5
|
-
export declare class LanguageHandler extends BaseLocalizationHandler<LanguageCode, LanguageView, LanguageRaw> implements LanguageHandlerLike {
|
|
6
|
-
/** @inheritDoc */
|
|
7
|
-
protected _raw: Record<"id" | "cy" | "br" | "hr" | "li" | "th" | "tr" | "tt" | "mi" | "mn" | "ms" | "so" | "af" | "sq" | "an" | "ar" | "hy" | "as" | "az" | "eu" | "be" | "bn" | "bs" | "bg" | "my" | "ca" | "ch" | "ce" | "zh" | "cv" | "co" | "cr" | "cs" | "da" | "nl" | "en" | "eo" | "et" | "fo" | "fj" | "fi" | "fr" | "fy" | "gd" | "gl" | "ka" | "de" | "el" | "gu" | "ht" | "he" | "hi" | "hu" | "is" | "iu" | "ga" | "it" | "ja" | "kn" | "ks" | "kk" | "km" | "ky" | "ko" | "la" | "lv" | "lt" | "lb" | "mk" | "ml" | "mt" | "mr" | "nv" | "ng" | "ne" | "no" | "nb" | "nn" | "oc" | "or" | "om" | "fa" | "pl" | "pt" | "pa" | "qu" | "rm" | "ro" | "ru" | "sg" | "sa" | "sc" | "sd" | "si" | "sr" | "sk" | "sl" | "es" | "sw" | "sv" | "ta" | "te" | "ts" | "tn" | "tk" | "uk" | "ur" | "ve" | "vi" | "vo" | "wa" | "xh" | "zu" | "aa" | "ab" | "ae" | "ak" | "am" | "av" | "ay" | "ba" | "bh" | "bi" | "bm" | "bo" | "cu" | "dv" | "dz" | "ee" | "ff" | "gn" | "gv" | "ha" | "ho" | "hz" | "ia" | "ie" | "ig" | "ii" | "ik" | "io" | "jv" | "kg" | "ki" | "kj" | "kl" | "kr" | "ku" | "kv" | "kw" | "lg" | "ln" | "lo" | "lu" | "mg" | "mh" | "na" | "nd" | "nr" | "ny" | "oj" | "os" | "pi" | "ps" | "rn" | "rw" | "se" | "sm" | "sn" | "ss" | "st" | "su" | "tg" | "ti" | "tl" | "to" | "tw" | "ty" | "ug" | "uz" | "wo" | "yi" | "yo" | "za", import("../base").BaseLocalizationHandlerRaw>;
|
|
8
|
-
/** @inheritDoc */
|
|
9
|
-
readonly codes: readonly ("id" | "cy" | "br" | "hr" | "li" | "th" | "tr" | "tt" | "mi" | "mn" | "ms" | "so" | "af" | "sq" | "an" | "ar" | "hy" | "as" | "az" | "eu" | "be" | "bn" | "bs" | "bg" | "my" | "ca" | "ch" | "ce" | "zh" | "cv" | "co" | "cr" | "cs" | "da" | "nl" | "en" | "eo" | "et" | "fo" | "fj" | "fi" | "fr" | "fy" | "gd" | "gl" | "ka" | "de" | "el" | "gu" | "ht" | "he" | "hi" | "hu" | "is" | "iu" | "ga" | "it" | "ja" | "kn" | "ks" | "kk" | "km" | "ky" | "ko" | "la" | "lv" | "lt" | "lb" | "mk" | "ml" | "mt" | "mr" | "nv" | "ng" | "ne" | "no" | "nb" | "nn" | "oc" | "or" | "om" | "fa" | "pl" | "pt" | "pa" | "qu" | "rm" | "ro" | "ru" | "sg" | "sa" | "sc" | "sd" | "si" | "sr" | "sk" | "sl" | "es" | "sw" | "sv" | "ta" | "te" | "ts" | "tn" | "tk" | "uk" | "ur" | "ve" | "vi" | "vo" | "wa" | "xh" | "zu" | "aa" | "ab" | "ae" | "ak" | "am" | "av" | "ay" | "ba" | "bh" | "bi" | "bm" | "bo" | "cu" | "dv" | "dz" | "ee" | "ff" | "gn" | "gv" | "ha" | "ho" | "hz" | "ia" | "ie" | "ig" | "ii" | "ik" | "io" | "jv" | "kg" | "ki" | "kj" | "kl" | "kr" | "ku" | "kv" | "kw" | "lg" | "ln" | "lo" | "lu" | "mg" | "mh" | "na" | "nd" | "nr" | "ny" | "oj" | "os" | "pi" | "ps" | "rn" | "rw" | "se" | "sm" | "sn" | "ss" | "st" | "su" | "tg" | "ti" | "tl" | "to" | "tw" | "ty" | "ug" | "uz" | "wo" | "yi" | "yo" | "za")[];
|
|
10
|
-
get(code: LanguageCode): LanguageView;
|
|
11
|
-
}
|
|
1
|
+
import { LanguageHandlerLike } from "./index.types.js";
|
|
12
2
|
export declare const languageHandler: LanguageHandlerLike;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const language_code_1 = require("./language-code");
|
|
5
|
-
const language_map_1 = require("./language.map");
|
|
6
|
-
const base_1 = require("../base");
|
|
1
|
+
import { LanguageCodeItems } from "../literal/index.js";
|
|
2
|
+
import { languageMap } from "./language.map.js";
|
|
3
|
+
import { BaseLocalizationHandler } from "../base/index.js";
|
|
7
4
|
/** @inheritDoc */
|
|
8
|
-
class LanguageHandler extends
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/** @inheritDoc */
|
|
14
|
-
this.codes = language_code_1.LanguageCodeItems;
|
|
15
|
-
}
|
|
5
|
+
class LanguageHandler extends BaseLocalizationHandler {
|
|
6
|
+
/** @inheritDoc */
|
|
7
|
+
_raw = languageMap;
|
|
8
|
+
/** @inheritDoc */
|
|
9
|
+
codes = LanguageCodeItems;
|
|
16
10
|
get(code) {
|
|
17
11
|
const item = this.getRaw(code);
|
|
18
12
|
if (!item) {
|
|
@@ -21,12 +15,10 @@ class LanguageHandler extends base_1.BaseLocalizationHandler {
|
|
|
21
15
|
return { code, name: item.n };
|
|
22
16
|
}
|
|
23
17
|
}
|
|
24
|
-
exports.LanguageHandler = LanguageHandler;
|
|
25
18
|
// noinspection JSUnusedGlobalSymbols
|
|
26
|
-
|
|
19
|
+
export const languageHandler = new LanguageHandler();
|
|
27
20
|
/*
|
|
28
|
-
* @todo
|
|
29
|
-
* - https://www.loc.gov/standards/iso639-2/php/code_list.php
|
|
30
|
-
* - https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes (set2, set3)
|
|
31
|
-
* */
|
|
32
|
-
//# sourceMappingURL=language.handler.js.map
|
|
21
|
+
* @todo
|
|
22
|
+
* - https://www.loc.gov/standards/iso639-2/php/code_list.php
|
|
23
|
+
* - https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes (set2, set3)
|
|
24
|
+
* */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { LanguageCode } from "../literal/index.js";
|
|
2
|
+
import { LanguageRaw } from "./index.types.js";
|
|
3
3
|
export declare const languageMap: Record<LanguageCode, LanguageRaw>;
|