@d3plus/locales 3.0.15 → 3.1.0
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/LICENSE +21 -0
- package/README.md +141 -12
- package/es/src/dictionaries/formatLocale.js +40 -39
- package/es/src/dictionaries/timeLocale.js +107 -106
- package/es/src/dictionaries/translateLocale.js +55 -54
- package/es/src/findLocale.js +3 -5
- package/es/src/utils/iso-codes.js +1540 -1539
- package/es/src/utils/lookup.js +3584 -3583
- package/package.json +13 -5
- package/types/index.d.ts +7 -0
- package/types/src/dictionaries/formatLocale.d.ts +16 -0
- package/types/src/dictionaries/timeLocale.d.ts +39 -0
- package/types/src/dictionaries/translateLocale.d.ts +21 -0
- package/types/src/findLocale.d.ts +5 -0
- package/types/src/utils/iso-codes.d.ts +8 -0
- package/types/src/utils/lookup.d.ts +9 -0
- package/umd/d3plus-locales.full.js +5330 -5436
- package/umd/d3plus-locales.full.js.map +1 -1
- package/umd/d3plus-locales.full.min.js +7 -9
- package/umd/d3plus-locales.js +5330 -5436
- package/umd/d3plus-locales.js.map +1 -1
- package/umd/d3plus-locales.min.js +7 -9
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3plus/locales",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "International localizations for number, date, and UI labels.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"
|
|
7
|
+
"types": "./types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./types/index.d.ts",
|
|
11
|
+
"default": "./es/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
"browser": "./umd/d3plus-locales.full.js",
|
|
9
15
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
16
|
+
"node": ">=20"
|
|
11
17
|
},
|
|
12
18
|
"sideEffects": false,
|
|
13
19
|
"files": [
|
|
14
20
|
"umd",
|
|
15
|
-
"es"
|
|
21
|
+
"es",
|
|
22
|
+
"types"
|
|
16
23
|
],
|
|
17
24
|
"homepage": "https://d3plus.org",
|
|
18
25
|
"repository": {
|
|
@@ -29,8 +36,9 @@
|
|
|
29
36
|
],
|
|
30
37
|
"scripts": {
|
|
31
38
|
"build:esm": "node ../../scripts/build-esm.js",
|
|
39
|
+
"build:types": "tsc",
|
|
32
40
|
"build:umd": "node ../../scripts/build-umd.js",
|
|
33
41
|
"dev": "node ../../scripts/dev.js",
|
|
34
|
-
"test": "eslint index.
|
|
42
|
+
"test": "eslint index.ts src/**/*.ts && eslint --global=it test && mocha 'test/**/*-test.js'"
|
|
35
43
|
}
|
|
36
44
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as translateLocale } from "./src/dictionaries/translateLocale.js";
|
|
2
|
+
export { default as formatLocale } from "./src/dictionaries/formatLocale.js";
|
|
3
|
+
export { default as locale } from "./src/dictionaries/timeLocale.js";
|
|
4
|
+
export { default as findLocale } from "./src/findLocale.js";
|
|
5
|
+
export type { TranslationStrings } from "./src/dictionaries/translateLocale.js";
|
|
6
|
+
export type { FormatLocaleDefinition } from "./src/dictionaries/formatLocale.js";
|
|
7
|
+
export type { TimeLocaleDefinition } from "./src/dictionaries/timeLocale.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@namespace {Object} formatLocale
|
|
3
|
+
A set of default locale formatters used when assigning suffixes and currency in numbers.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormatLocaleDefinition {
|
|
6
|
+
separator?: string;
|
|
7
|
+
suffixes: string[];
|
|
8
|
+
grouping: number[];
|
|
9
|
+
delimiters: {
|
|
10
|
+
thousands: string;
|
|
11
|
+
decimal: string;
|
|
12
|
+
};
|
|
13
|
+
currency: [string, string];
|
|
14
|
+
}
|
|
15
|
+
declare const formatLocale: Record<string, FormatLocaleDefinition>;
|
|
16
|
+
export default formatLocale;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface TimeLocaleDefinition {
|
|
2
|
+
dateTime: string;
|
|
3
|
+
date: string;
|
|
4
|
+
time: string;
|
|
5
|
+
quarter: string;
|
|
6
|
+
periods: [string, string];
|
|
7
|
+
days: [string, string, string, string, string, string, string];
|
|
8
|
+
shortDays: [string, string, string, string, string, string, string];
|
|
9
|
+
months: [
|
|
10
|
+
string,
|
|
11
|
+
string,
|
|
12
|
+
string,
|
|
13
|
+
string,
|
|
14
|
+
string,
|
|
15
|
+
string,
|
|
16
|
+
string,
|
|
17
|
+
string,
|
|
18
|
+
string,
|
|
19
|
+
string,
|
|
20
|
+
string,
|
|
21
|
+
string
|
|
22
|
+
];
|
|
23
|
+
shortMonths: [
|
|
24
|
+
string,
|
|
25
|
+
string,
|
|
26
|
+
string,
|
|
27
|
+
string,
|
|
28
|
+
string,
|
|
29
|
+
string,
|
|
30
|
+
string,
|
|
31
|
+
string,
|
|
32
|
+
string,
|
|
33
|
+
string,
|
|
34
|
+
string,
|
|
35
|
+
string
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
declare const locale: Record<string, TimeLocaleDefinition>;
|
|
39
|
+
export default locale;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface TranslationStrings {
|
|
2
|
+
and: string;
|
|
3
|
+
Back: string;
|
|
4
|
+
"Click to Expand": string;
|
|
5
|
+
"Click to Hide": string;
|
|
6
|
+
"Click to Highlight": string;
|
|
7
|
+
"Click to Show": string;
|
|
8
|
+
"Click to Show All": string;
|
|
9
|
+
Download: string;
|
|
10
|
+
"Loading Visualization": string;
|
|
11
|
+
more: string;
|
|
12
|
+
"No Data Available": string;
|
|
13
|
+
"Powered by D3plus": string;
|
|
14
|
+
Share: string;
|
|
15
|
+
"Shift+Click to Hide": string;
|
|
16
|
+
"Shift+Click to Highlight": string;
|
|
17
|
+
Total: string;
|
|
18
|
+
Values: string;
|
|
19
|
+
}
|
|
20
|
+
declare const translateLocale: Record<string, TranslationStrings>;
|
|
21
|
+
export default translateLocale;
|