@formatjs/intl-enumerator 1.1.2 → 1.1.4
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/index.d.ts +9 -0
- package/index.d.ts.map +1 -0
- package/index.js +7 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/polyfill-force.d.ts +2 -0
- package/lib/polyfill-force.d.ts.map +1 -0
- package/lib/polyfill-force.js +7 -0
- package/lib/polyfill.d.ts +2 -0
- package/lib/polyfill.d.ts.map +1 -0
- package/lib/polyfill.js +10 -0
- package/lib/should-polyfill.d.ts +2 -0
- package/lib/should-polyfill.d.ts.map +1 -0
- package/lib/should-polyfill.js +3 -0
- package/lib/src/calendars.generated.d.ts +3 -0
- package/lib/src/calendars.generated.d.ts.map +1 -0
- package/lib/src/calendars.generated.js +3 -0
- package/lib/src/collations.generated.d.ts +3 -0
- package/lib/src/collations.generated.d.ts.map +1 -0
- package/lib/src/collations.generated.js +3 -0
- package/lib/src/currencies.generated.d.ts +3 -0
- package/lib/src/currencies.generated.d.ts.map +1 -0
- package/lib/src/currencies.generated.js +3 -0
- package/lib/src/get-supported-calendars.d.ts +3 -0
- package/lib/src/get-supported-calendars.d.ts.map +1 -0
- package/lib/src/get-supported-calendars.js +14 -0
- package/lib/src/get-supported-collations.d.ts +3 -0
- package/lib/src/get-supported-collations.d.ts.map +1 -0
- package/lib/src/get-supported-collations.js +11 -0
- package/lib/src/get-supported-currencies.d.ts +3 -0
- package/lib/src/get-supported-currencies.d.ts.map +1 -0
- package/lib/src/get-supported-currencies.js +40 -0
- package/lib/src/get-supported-numbering-systems.d.ts +2 -0
- package/lib/src/get-supported-numbering-systems.d.ts.map +1 -0
- package/lib/src/get-supported-numbering-systems.js +16 -0
- package/lib/src/get-supported-timezones.d.ts +3 -0
- package/lib/src/get-supported-timezones.d.ts.map +1 -0
- package/lib/src/get-supported-timezones.js +12 -0
- package/lib/src/get-supported-units.d.ts +2 -0
- package/lib/src/get-supported-units.d.ts.map +1 -0
- package/lib/src/get-supported-units.js +12 -0
- package/lib/src/index.d.ts +3 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/index.js +24 -0
- package/lib/src/numbering-systems.generated.d.ts +2 -0
- package/lib/src/numbering-systems.generated.d.ts.map +1 -0
- package/lib/src/numbering-systems.generated.js +1 -0
- package/lib/src/timezones.generated.d.ts +3 -0
- package/lib/src/timezones.generated.d.ts.map +1 -0
- package/lib/src/timezones.generated.js +3 -0
- package/lib/src/units.generated.d.ts +3 -0
- package/lib/src/units.generated.d.ts.map +1 -0
- package/lib/src/units.generated.js +3 -0
- package/package.json +2 -2
- package/polyfill-force.d.ts +2 -0
- package/polyfill-force.d.ts.map +1 -0
- package/polyfill-force.js +9 -0
- package/polyfill.d.ts +2 -0
- package/polyfill.d.ts.map +1 -0
- package/polyfill.js +12 -0
- package/should-polyfill.d.ts +2 -0
- package/should-polyfill.d.ts.map +1 -0
- package/should-polyfill.js +7 -0
- package/src/calendars.generated.d.ts +3 -0
- package/src/calendars.generated.d.ts.map +1 -0
- package/src/calendars.generated.js +6 -0
- package/src/collations.generated.d.ts +3 -0
- package/src/collations.generated.d.ts.map +1 -0
- package/src/collations.generated.js +6 -0
- package/src/currencies.generated.d.ts +3 -0
- package/src/currencies.generated.d.ts.map +1 -0
- package/src/currencies.generated.js +6 -0
- package/src/get-supported-calendars.d.ts +3 -0
- package/src/get-supported-calendars.d.ts.map +1 -0
- package/src/get-supported-calendars.js +18 -0
- package/src/get-supported-collations.d.ts +3 -0
- package/src/get-supported-collations.d.ts.map +1 -0
- package/src/get-supported-collations.js +15 -0
- package/src/get-supported-currencies.d.ts +3 -0
- package/src/get-supported-currencies.d.ts.map +1 -0
- package/src/get-supported-currencies.js +44 -0
- package/src/get-supported-numbering-systems.d.ts +2 -0
- package/src/get-supported-numbering-systems.d.ts.map +1 -0
- package/src/get-supported-numbering-systems.js +20 -0
- package/src/get-supported-timezones.d.ts +3 -0
- package/src/get-supported-timezones.d.ts.map +1 -0
- package/src/get-supported-timezones.js +16 -0
- package/src/get-supported-units.d.ts +2 -0
- package/src/get-supported-units.d.ts.map +1 -0
- package/src/get-supported-units.js +16 -0
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +28 -0
- package/src/numbering-systems.generated.d.ts +2 -0
- package/src/numbering-systems.generated.d.ts.map +1 -0
- package/src/numbering-systems.generated.js +4 -0
- package/src/timezones.generated.d.ts +3 -0
- package/src/timezones.generated.d.ts.map +1 -0
- package/src/timezones.generated.js +6 -0
- package/src/units.generated.d.ts +3 -0
- package/src/units.generated.d.ts.map +1 -0
- package/src/units.generated.js +6 -0
- package/BUILD +0 -136
- package/CHANGELOG.md +0 -25
- package/index.ts +0 -9
- package/polyfill-force.ts +0 -8
- package/polyfill.ts +0 -11
- package/scripts/calendars.ts +0 -21
- package/scripts/collations.ts +0 -21
- package/scripts/currencies.ts +0 -21
- package/scripts/timezones.ts +0 -22
- package/scripts/units.ts +0 -23
- package/should-polyfill.ts +0 -3
- package/src/calendars.generated.ts +0 -5
- package/src/collations.generated.ts +0 -5
- package/src/currencies.generated.ts +0 -5
- package/src/get-supported-calendars.ts +0 -17
- package/src/get-supported-collations.ts +0 -16
- package/src/get-supported-currencies.ts +0 -48
- package/src/get-supported-numbering-systems.ts +0 -21
- package/src/get-supported-timezones.ts +0 -15
- package/src/get-supported-units.ts +0 -15
- package/src/index.ts +0 -33
- package/src/numbering-systems.generated.ts +0 -1
- package/src/timezones.generated.ts +0 -5
- package/src/units.generated.ts +0 -4
- package/tests/index.test.ts +0 -47
- package/tsconfig.json +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencies.generated.d.ts","sourceRoot":"","sources":["currencies.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,olEAAuyD,CAAA;AAC9zD,oBAAY,QAAQ,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.currencies = void 0;
|
|
4
|
+
/* @generated */
|
|
5
|
+
// prettier-ignore
|
|
6
|
+
exports.currencies = ["ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNH", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MRU", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "STN", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UYW", "UZS", "VEB", "VEF", "VES", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-supported-calendars.d.ts","sourceRoot":"","sources":["get-supported-calendars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAcnD,wBAAgB,qBAAqB,IAAI,QAAQ,EAAE,CAElD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedCalendars = void 0;
|
|
4
|
+
var calendars_generated_1 = require("./calendars.generated");
|
|
5
|
+
function isSupportedCalendar(item) {
|
|
6
|
+
try {
|
|
7
|
+
var dateTimeFormat = new Intl.DateTimeFormat('en-u-ca' + item);
|
|
8
|
+
var options = dateTimeFormat.resolvedOptions().calendar;
|
|
9
|
+
if (item !== 'gregory' || options !== 'gregory')
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
catch (_err) { }
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
function getSupportedCalendars() {
|
|
16
|
+
return calendars_generated_1.calendars.filter(isSupportedCalendar);
|
|
17
|
+
}
|
|
18
|
+
exports.getSupportedCalendars = getSupportedCalendars;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-supported-collations.d.ts","sourceRoot":"","sources":["get-supported-collations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAarD,wBAAgB,sBAAsB,IAAI,SAAS,EAAE,CAEpD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedCollations = void 0;
|
|
4
|
+
var collations_generated_1 = require("./collations.generated");
|
|
5
|
+
function isSupported(collation) {
|
|
6
|
+
try {
|
|
7
|
+
return (Intl.Collator('en-u-co-' + collation).resolvedOptions().locale === 'en');
|
|
8
|
+
}
|
|
9
|
+
catch (_err) { }
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
function getSupportedCollations() {
|
|
13
|
+
return collations_generated_1.collations.filter(isSupported);
|
|
14
|
+
}
|
|
15
|
+
exports.getSupportedCollations = getSupportedCollations;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-supported-currencies.d.ts","sourceRoot":"","sources":["get-supported-currencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAA;AAwBpD,wBAAgB,sBAAsB,IAAI,QAAQ,EAAE,CAuBnD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedCurrencies = void 0;
|
|
4
|
+
var currencies_generated_1 = require("./currencies.generated");
|
|
5
|
+
function isSupportedCurrency(currency) {
|
|
6
|
+
try {
|
|
7
|
+
var numberFormat = new Intl.NumberFormat('en', {
|
|
8
|
+
style: 'currency',
|
|
9
|
+
currencyDisplay: 'name',
|
|
10
|
+
currency: currency,
|
|
11
|
+
});
|
|
12
|
+
var format = numberFormat.format(123);
|
|
13
|
+
if (format.substring(0, 3) !== currency &&
|
|
14
|
+
format.substring(format.length - 3) !== currency) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch (_err) { }
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
function getSupportedCurrencies() {
|
|
22
|
+
var ATOZ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
23
|
+
var supportedCurrencies = [];
|
|
24
|
+
for (var _i = 0, currencies_1 = currencies_generated_1.currencies; _i < currencies_1.length; _i++) {
|
|
25
|
+
var currency = currencies_1[_i];
|
|
26
|
+
if (currency.length === 3) {
|
|
27
|
+
if (isSupportedCurrency(currency)) {
|
|
28
|
+
supportedCurrencies.push(currency);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else if (currency.length === 5 && currency[3] === '~') {
|
|
32
|
+
var start = ATOZ.indexOf(currency[2]);
|
|
33
|
+
var end = ATOZ.indexOf(currency[4]);
|
|
34
|
+
for (var i = start; i <= end; i++) {
|
|
35
|
+
var currentCurrency = (currency.substring(0, 2) + ATOZ[i]);
|
|
36
|
+
if (isSupportedCurrency(currentCurrency)) {
|
|
37
|
+
supportedCurrencies.push(currentCurrency);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return supportedCurrencies;
|
|
43
|
+
}
|
|
44
|
+
exports.getSupportedCurrencies = getSupportedCurrencies;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-supported-numbering-systems.d.ts","sourceRoot":"","sources":["get-supported-numbering-systems.ts"],"names":[],"mappings":"AAkBA,wBAAgB,4BAA4B,IAAI,MAAM,EAAE,CAEvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedNumberingSystems = void 0;
|
|
4
|
+
var numbering_systems_generated_1 = require("./numbering-systems.generated");
|
|
5
|
+
function isSupportedNumberingSystem(system) {
|
|
6
|
+
try {
|
|
7
|
+
var numberFormat = new Intl.NumberFormat('en-u-nu-' + system);
|
|
8
|
+
var options = numberFormat.resolvedOptions().numberingSystem;
|
|
9
|
+
if ((options === system && system === 'latn') ||
|
|
10
|
+
numberFormat.format(123) !== '123') {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
catch (_err) { }
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
function getSupportedNumberingSystems() {
|
|
18
|
+
return numbering_systems_generated_1.numberingSystemNames.filter(isSupportedNumberingSystem);
|
|
19
|
+
}
|
|
20
|
+
exports.getSupportedNumberingSystems = getSupportedNumberingSystems;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-supported-timezones.d.ts","sourceRoot":"","sources":["get-supported-timezones.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAYnD,wBAAgB,qBAAqB,IAAI,QAAQ,EAAE,CAElD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedTimeZones = void 0;
|
|
4
|
+
var timezones_generated_1 = require("./timezones.generated");
|
|
5
|
+
function isSupported(timeZone) {
|
|
6
|
+
try {
|
|
7
|
+
var formatter = new Intl.DateTimeFormat('en', { timeZone: timeZone });
|
|
8
|
+
return formatter.resolvedOptions().timeZone === timeZone;
|
|
9
|
+
}
|
|
10
|
+
catch (_err) { }
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
function getSupportedTimeZones() {
|
|
14
|
+
return timezones_generated_1.timezones.filter(isSupported);
|
|
15
|
+
}
|
|
16
|
+
exports.getSupportedTimeZones = getSupportedTimeZones;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function getSupportedUnits(): ("degree" | "acre" | "hectare" | "percent" | "bit" | "byte" | "gigabit" | "gigabyte" | "kilobit" | "kilobyte" | "megabit" | "megabyte" | "petabyte" | "terabit" | "terabyte" | "day" | "hour" | "millisecond" | "minute" | "month" | "second" | "week" | "year" | "centimeter" | "foot" | "inch" | "kilometer" | "meter" | "mile-scandinavian" | "mile" | "millimeter" | "yard" | "gram" | "kilogram" | "ounce" | "pound" | "stone" | "celsius" | "fahrenheit" | "fluid-ounce" | "gallon" | "liter" | "milliliter")[];
|
|
2
|
+
//# sourceMappingURL=get-supported-units.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-supported-units.d.ts","sourceRoot":"","sources":["get-supported-units.ts"],"names":[],"mappings":"AAYA,wBAAgB,iBAAiB,0fAEhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedUnits = void 0;
|
|
4
|
+
var units_generated_1 = require("./units.generated");
|
|
5
|
+
function isSupported(unit) {
|
|
6
|
+
try {
|
|
7
|
+
var formatter = new Intl.NumberFormat('en', { style: 'unit', unit: unit });
|
|
8
|
+
return formatter.resolvedOptions().unit === unit;
|
|
9
|
+
}
|
|
10
|
+
catch (_err) { }
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
function getSupportedUnits() {
|
|
14
|
+
return units_generated_1.units.filter(isSupported);
|
|
15
|
+
}
|
|
16
|
+
exports.getSupportedUnits = getSupportedUnits;
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAOA,oBAAY,iBAAiB,GACzB,UAAU,GACV,WAAW,GACX,UAAU,GACV,iBAAiB,GACjB,UAAU,GACV,MAAM,CAAA;AAEV,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAiBlE"}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.supportedValuesOf = void 0;
|
|
4
|
+
var get_supported_calendars_1 = require("./get-supported-calendars");
|
|
5
|
+
var get_supported_collations_1 = require("./get-supported-collations");
|
|
6
|
+
var get_supported_currencies_1 = require("./get-supported-currencies");
|
|
7
|
+
var get_supported_numbering_systems_1 = require("./get-supported-numbering-systems");
|
|
8
|
+
var get_supported_timezones_1 = require("./get-supported-timezones");
|
|
9
|
+
var get_supported_units_1 = require("./get-supported-units");
|
|
10
|
+
function supportedValuesOf(key) {
|
|
11
|
+
switch (key) {
|
|
12
|
+
case 'calendar':
|
|
13
|
+
return (0, get_supported_calendars_1.getSupportedCalendars)();
|
|
14
|
+
case 'collation':
|
|
15
|
+
return (0, get_supported_collations_1.getSupportedCollations)();
|
|
16
|
+
case 'currency':
|
|
17
|
+
return (0, get_supported_currencies_1.getSupportedCurrencies)();
|
|
18
|
+
case 'numberingSystem':
|
|
19
|
+
return (0, get_supported_numbering_systems_1.getSupportedNumberingSystems)();
|
|
20
|
+
case 'timeZone':
|
|
21
|
+
return (0, get_supported_timezones_1.getSupportedTimeZones)();
|
|
22
|
+
case 'unit':
|
|
23
|
+
return (0, get_supported_units_1.getSupportedUnits)();
|
|
24
|
+
default:
|
|
25
|
+
throw RangeError('Invalid key: ' + key);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.supportedValuesOf = supportedValuesOf;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-systems.generated.d.ts","sourceRoot":"","sources":["numbering-systems.generated.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAA0qB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.numberingSystemNames = void 0;
|
|
4
|
+
exports.numberingSystemNames = ["adlm", "ahom", "arab", "arabext", "armn", "armnlow", "bali", "beng", "bhks", "brah", "cakm", "cham", "cyrl", "deva", "diak", "ethi", "fullwide", "geor", "gong", "gonm", "grek", "greklow", "gujr", "guru", "hanidays", "hanidec", "hans", "hansfin", "hant", "hantfin", "hebr", "hmng", "hmnp", "java", "jpan", "jpanfin", "jpanyear", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "roman", "romanlow", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "taml", "tamldec", "telu", "thai", "tibt", "tirh", "tnsa", "vaii", "wara", "wcho"];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const timezones: readonly ["Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Bahia_Banderas", "America/Bahia", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson_Creek", "America/Dawson", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Fort_Nelson", "America/Fortaleza", "America/Glace_Bay", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port_of_Spain", "America/Port-au-Prince", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Chita", "Asia/Choibalsan", "Asia/Colombo", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kathmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Riyadh", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ulaanbaatar", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faroe", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Wake", "Pacific/Wallis"];
|
|
2
|
+
export declare type Timezone = typeof timezones[number];
|
|
3
|
+
//# sourceMappingURL=timezones.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timezones.generated.d.ts","sourceRoot":"","sources":["timezones.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,2mQAAosP,CAAA;AAC1tP,oBAAY,QAAQ,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.timezones = void 0;
|
|
4
|
+
/* @generated */
|
|
5
|
+
// prettier-ignore
|
|
6
|
+
exports.timezones = ["Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Bahia_Banderas", "America/Bahia", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson_Creek", "America/Dawson", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Fort_Nelson", "America/Fortaleza", "America/Glace_Bay", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port_of_Spain", "America/Port-au-Prince", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Chita", "Asia/Choibalsan", "Asia/Colombo", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kathmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Riyadh", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ulaanbaatar", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faroe", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Wake", "Pacific/Wallis"];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const units: readonly ["degree", "acre", "hectare", "percent", "bit", "byte", "gigabit", "gigabyte", "kilobit", "kilobyte", "megabit", "megabyte", "petabyte", "terabit", "terabyte", "day", "hour", "millisecond", "minute", "month", "second", "week", "year", "centimeter", "foot", "inch", "kilometer", "meter", "mile-scandinavian", "mile", "millimeter", "yard", "gram", "kilogram", "ounce", "pound", "stone", "celsius", "fahrenheit", "fluid-ounce", "gallon", "liter", "milliliter"];
|
|
2
|
+
export declare type Unit = typeof units[number];
|
|
3
|
+
//# sourceMappingURL=units.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"units.generated.d.ts","sourceRoot":"","sources":["units.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,odAA2a,CAAA;AAC7b,oBAAY,IAAI,GAAG,OAAO,KAAK,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.units = void 0;
|
|
4
|
+
/* @generated */
|
|
5
|
+
// prettier-ignore
|
|
6
|
+
exports.units = ["degree", "acre", "hectare", "percent", "bit", "byte", "gigabit", "gigabyte", "kilobit", "kilobyte", "megabit", "megabyte", "petabyte", "terabit", "terabyte", "day", "hour", "millisecond", "minute", "month", "second", "week", "year", "centimeter", "foot", "inch", "kilometer", "meter", "mile-scandinavian", "mile", "millimeter", "yard", "gram", "kilogram", "ounce", "pound", "stone", "celsius", "fahrenheit", "fluid-ounce", "gallon", "liter", "milliliter"];
|
package/BUILD
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
|
|
2
|
-
load("@aspect_rules_js//npm/private:npm_package.bzl", "npm_package")
|
|
3
|
-
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
|
|
4
|
-
load("@npm//:defs.bzl", "npm_link_all_packages")
|
|
5
|
-
load("//:index.bzl", "ZONES")
|
|
6
|
-
load("//tools:index.bzl", "check_format", "generate_src_file", "ts_compile")
|
|
7
|
-
load("//tools:jest.bzl", "jest_test")
|
|
8
|
-
|
|
9
|
-
npm_link_all_packages(name = "node_modules")
|
|
10
|
-
|
|
11
|
-
PACKAGE_NAME = "intl-enumerator"
|
|
12
|
-
|
|
13
|
-
npm_package(
|
|
14
|
-
name = PACKAGE_NAME,
|
|
15
|
-
srcs = [
|
|
16
|
-
"LICENSE.md",
|
|
17
|
-
"README.md",
|
|
18
|
-
"package.json",
|
|
19
|
-
":dist",
|
|
20
|
-
],
|
|
21
|
-
package = "@formatjs/%s" % PACKAGE_NAME,
|
|
22
|
-
visibility = ["//visibility:public"],
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
SRCS = glob([
|
|
26
|
-
"src/**/*.ts",
|
|
27
|
-
"*.ts",
|
|
28
|
-
])
|
|
29
|
-
|
|
30
|
-
TESTS = glob([
|
|
31
|
-
"tests/*.test.ts",
|
|
32
|
-
])
|
|
33
|
-
|
|
34
|
-
ts_compile(
|
|
35
|
-
name = "dist",
|
|
36
|
-
srcs = SRCS,
|
|
37
|
-
package = "@formatjs/%s" % PACKAGE_NAME,
|
|
38
|
-
skip_esm = False,
|
|
39
|
-
deps = [],
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
jest_test(
|
|
43
|
-
name = "unit",
|
|
44
|
-
srcs = SRCS + TESTS,
|
|
45
|
-
deps = [],
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
# Test262
|
|
49
|
-
ts_project(
|
|
50
|
-
name = "test262-main-bundle",
|
|
51
|
-
srcs = SRCS,
|
|
52
|
-
declaration = True,
|
|
53
|
-
declaration_map = True,
|
|
54
|
-
extends = "//:tsconfig",
|
|
55
|
-
out_dir = "test262",
|
|
56
|
-
resolve_json_module = True,
|
|
57
|
-
tsconfig = "//:tsconfig.es6",
|
|
58
|
-
deps = [],
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
write_source_files(
|
|
62
|
-
name = "tsconfig_json",
|
|
63
|
-
files = {"tsconfig.json": "//tools:tsconfig.golden.json"},
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
check_format(
|
|
67
|
-
name = "prettier",
|
|
68
|
-
srcs = glob(
|
|
69
|
-
[
|
|
70
|
-
"**/*",
|
|
71
|
-
],
|
|
72
|
-
exclude = [
|
|
73
|
-
"CHANGELOG.md",
|
|
74
|
-
"src/*.generated.*",
|
|
75
|
-
],
|
|
76
|
-
),
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
# calendars
|
|
80
|
-
generate_src_file(
|
|
81
|
-
name = "calendars",
|
|
82
|
-
src = "src/calendars.generated.ts",
|
|
83
|
-
data = [
|
|
84
|
-
"//:node_modules/cldr-bcp47",
|
|
85
|
-
],
|
|
86
|
-
entry_point = "scripts/calendars.ts",
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
# timezones
|
|
90
|
-
generate_src_file(
|
|
91
|
-
name = "timezones",
|
|
92
|
-
src = "src/timezones.generated.ts",
|
|
93
|
-
args = ["--zone %s" % z for z in ZONES],
|
|
94
|
-
data = [
|
|
95
|
-
],
|
|
96
|
-
entry_point = "scripts/timezones.ts",
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
# numbering-systems
|
|
100
|
-
write_source_files(
|
|
101
|
-
name = "numbering-systems",
|
|
102
|
-
files = {
|
|
103
|
-
"src/numbering-systems.generated.ts": "//packages/intl-numberformat:src/numbering-systems.generated.ts",
|
|
104
|
-
},
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
# currencies
|
|
108
|
-
generate_src_file(
|
|
109
|
-
name = "currencies",
|
|
110
|
-
src = "src/currencies.generated.ts",
|
|
111
|
-
data = [
|
|
112
|
-
"//:node_modules/cldr-numbers-full",
|
|
113
|
-
],
|
|
114
|
-
entry_point = "scripts/currencies.ts",
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
# collations
|
|
118
|
-
generate_src_file(
|
|
119
|
-
name = "collations",
|
|
120
|
-
src = "src/collations.generated.ts",
|
|
121
|
-
data = [
|
|
122
|
-
"//:node_modules/cldr-bcp47",
|
|
123
|
-
],
|
|
124
|
-
entry_point = "scripts/collations.ts",
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
# units
|
|
128
|
-
generate_src_file(
|
|
129
|
-
name = "units",
|
|
130
|
-
src = "src/units.generated.ts",
|
|
131
|
-
data = [
|
|
132
|
-
":node_modules/@formatjs/ecma402-abstract",
|
|
133
|
-
"//:node_modules/cldr-bcp47",
|
|
134
|
-
],
|
|
135
|
-
entry_point = "scripts/units.ts",
|
|
136
|
-
)
|
package/CHANGELOG.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [1.1.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-enumerator@1.1.1...@formatjs/intl-enumerator@1.1.2) (2022-08-18)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @formatjs/intl-enumerator
|
|
9
|
-
|
|
10
|
-
## [1.1.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-enumerator@1.1.0...@formatjs/intl-enumerator@1.1.1) (2022-07-16)
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
* **@formatjs/cli-lib:** introduce @formatjs/cli-lib as @formatjs/cli Node API ([7c4ebef](https://github.com/formatjs/formatjs/commit/7c4ebef00a6ac2a197b5007e328306bc8e00b445)), closes [#3625](https://github.com/formatjs/formatjs/issues/3625)
|
|
15
|
-
|
|
16
|
-
# 1.1.0 (2022-07-11)
|
|
17
|
-
|
|
18
|
-
### Bug Fixes
|
|
19
|
-
|
|
20
|
-
* **@formatjs/intl-enumerator:** fix intl-enumerator build ([a1d95e1](https://github.com/formatjs/formatjs/commit/a1d95e13e21fddf8f13475254daf13d86dd34b6a))
|
|
21
|
-
* **@formatjs/intl-enumerator:** fixes intl.supportedValuesOf units ([#3699](https://github.com/formatjs/formatjs/issues/3699)) ([23c642c](https://github.com/formatjs/formatjs/commit/23c642c31996f6cbad59b374d59b5bb54d5dc6a2))
|
|
22
|
-
|
|
23
|
-
### Features
|
|
24
|
-
|
|
25
|
-
* **@formatjs/intl-enumerator:** porting of proposal-intl-enumeration to typescript ([#3694](https://github.com/formatjs/formatjs/issues/3694)) ([8c95643](https://github.com/formatjs/formatjs/commit/8c95643ca3128f4e0d0c4cd196dd8773467f7db8))
|
package/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type {SupportedValuesOf} from './src'
|
|
2
|
-
export type {Calendar} from './src/calendars.generated'
|
|
3
|
-
export type {Collation} from './src/collations.generated'
|
|
4
|
-
export type {Currency} from './src/currencies.generated'
|
|
5
|
-
export type {Timezone} from './src/timezones.generated'
|
|
6
|
-
export type {Unit} from './src/units.generated'
|
|
7
|
-
|
|
8
|
-
export {shouldPolyfill} from './should-polyfill'
|
|
9
|
-
export {supportedValuesOf} from './src'
|
package/polyfill-force.ts
DELETED
package/polyfill.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {shouldPolyfill} from './should-polyfill'
|
|
2
|
-
import {supportedValuesOf} from './src'
|
|
3
|
-
|
|
4
|
-
if (shouldPolyfill()) {
|
|
5
|
-
Object.defineProperty(Intl, 'supportedValuesOf', {
|
|
6
|
-
value: supportedValuesOf,
|
|
7
|
-
enumerable: true,
|
|
8
|
-
writable: false,
|
|
9
|
-
configurable: false,
|
|
10
|
-
})
|
|
11
|
-
}
|
package/scripts/calendars.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra'
|
|
3
|
-
import {keyword} from 'cldr-bcp47/bcp47/calendar.json'
|
|
4
|
-
function main(args: minimist.ParsedArgs) {
|
|
5
|
-
const {out} = args
|
|
6
|
-
const calendars = Object.keys(keyword.u.ca).filter(k => !k.startsWith('_'))
|
|
7
|
-
|
|
8
|
-
// Output numbering systems file
|
|
9
|
-
outputFileSync(
|
|
10
|
-
out,
|
|
11
|
-
`/* @generated */
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
export const calendars = ${JSON.stringify(calendars)} as const
|
|
14
|
-
export type Calendar = typeof calendars[number]
|
|
15
|
-
`
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (require.main === module) {
|
|
20
|
-
main(minimist(process.argv))
|
|
21
|
-
}
|
package/scripts/collations.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra'
|
|
3
|
-
import {keyword} from 'cldr-bcp47/bcp47/collation.json'
|
|
4
|
-
function main(args: minimist.ParsedArgs) {
|
|
5
|
-
const {out} = args
|
|
6
|
-
const collations = Object.keys(keyword.u.co).filter(k => !k.startsWith('_'))
|
|
7
|
-
|
|
8
|
-
// Output numbering systems file
|
|
9
|
-
outputFileSync(
|
|
10
|
-
out,
|
|
11
|
-
`/* @generated */
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
export const collations = ${JSON.stringify(collations)} as const
|
|
14
|
-
export type Collation = typeof collations[number]
|
|
15
|
-
`
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (require.main === module) {
|
|
20
|
-
main(minimist(process.argv))
|
|
21
|
-
}
|
package/scripts/currencies.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra'
|
|
3
|
-
import {main as data} from 'cldr-numbers-full/main/en/currencies.json'
|
|
4
|
-
function main(args: minimist.ParsedArgs) {
|
|
5
|
-
const {out} = args
|
|
6
|
-
const currencies = Object.keys(data.en.numbers.currencies)
|
|
7
|
-
|
|
8
|
-
// Output numbering systems file
|
|
9
|
-
outputFileSync(
|
|
10
|
-
out,
|
|
11
|
-
`/* @generated */
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
export const currencies = ${JSON.stringify(currencies)} as const
|
|
14
|
-
export type Currency = typeof currencies[number]
|
|
15
|
-
`
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (require.main === module) {
|
|
20
|
-
main(minimist(process.argv))
|
|
21
|
-
}
|