@formatjs/intl-displaynames 6.6.3 → 6.6.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/LICENSE.md +1 -1
- package/lib/abstract/CanonicalCodeForDisplayNames.js +7 -11
- package/lib/abstract/IsValidDateTimeFieldCode.js +1 -5
- package/lib/index.js +29 -32
- package/lib/polyfill-force.js +2 -4
- package/lib/polyfill.js +4 -6
- package/lib/should-polyfill.js +5 -10
- package/lib/supported-locales.generated.js +1 -4
- package/package.json +4 -4
- package/polyfill.iife.js +4717 -7904
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2023 FormatJS
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.CanonicalCodeForDisplayNames = void 0;
|
|
4
|
-
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
|
-
var IsValidDateTimeFieldCode_1 = require("./IsValidDateTimeFieldCode");
|
|
1
|
+
import { CanonicalizeLocaleList, invariant, IsWellFormedCurrencyCode, } from '@formatjs/ecma402-abstract';
|
|
2
|
+
import { IsValidDateTimeFieldCode } from './IsValidDateTimeFieldCode';
|
|
6
3
|
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
7
4
|
var ALPHA_4 = /^[a-z]{4}$/i;
|
|
8
5
|
var UNICODE_TYPE_REGEX = /^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i;
|
|
@@ -15,9 +12,9 @@ function isUnicodeScriptSubtag(script) {
|
|
|
15
12
|
function isUnicodeLocaleIdentifierType(code) {
|
|
16
13
|
return UNICODE_TYPE_REGEX.test(code);
|
|
17
14
|
}
|
|
18
|
-
function CanonicalCodeForDisplayNames(type, code) {
|
|
15
|
+
export function CanonicalCodeForDisplayNames(type, code) {
|
|
19
16
|
if (type === 'language') {
|
|
20
|
-
return
|
|
17
|
+
return CanonicalizeLocaleList([code])[0];
|
|
21
18
|
}
|
|
22
19
|
if (type === 'region') {
|
|
23
20
|
if (!isUnicodeRegionSubtag(code)) {
|
|
@@ -38,15 +35,14 @@ function CanonicalCodeForDisplayNames(type, code) {
|
|
|
38
35
|
return code.toLowerCase();
|
|
39
36
|
}
|
|
40
37
|
if (type === 'dateTimeField') {
|
|
41
|
-
if (!
|
|
38
|
+
if (!IsValidDateTimeFieldCode(code)) {
|
|
42
39
|
throw RangeError('invalid dateTimeField');
|
|
43
40
|
}
|
|
44
41
|
return code;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
if (!
|
|
43
|
+
invariant(type === 'currency', 'invalid type');
|
|
44
|
+
if (!IsWellFormedCurrencyCode(code)) {
|
|
48
45
|
throw RangeError('invalid currency');
|
|
49
46
|
}
|
|
50
47
|
return code.toUpperCase();
|
|
51
48
|
}
|
|
52
|
-
exports.CanonicalCodeForDisplayNames = CanonicalCodeForDisplayNames;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsValidDateTimeFieldCode = void 0;
|
|
4
1
|
var CODES_FOR_DATE_TIME_FIELD = [
|
|
5
2
|
'era',
|
|
6
3
|
'year',
|
|
@@ -15,7 +12,6 @@ var CODES_FOR_DATE_TIME_FIELD = [
|
|
|
15
12
|
'second',
|
|
16
13
|
'timeZoneName',
|
|
17
14
|
];
|
|
18
|
-
function IsValidDateTimeFieldCode(field) {
|
|
15
|
+
export function IsValidDateTimeFieldCode(field) {
|
|
19
16
|
return CODES_FOR_DATE_TIME_FIELD.indexOf(field) >= 0;
|
|
20
17
|
}
|
|
21
|
-
exports.IsValidDateTimeFieldCode = IsValidDateTimeFieldCode;
|
package/lib/index.js
CHANGED
|
@@ -1,60 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var CanonicalCodeForDisplayNames_1 = require("./abstract/CanonicalCodeForDisplayNames");
|
|
7
|
-
var IsValidDateTimeFieldCode_1 = require("./abstract/IsValidDateTimeFieldCode");
|
|
8
|
-
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { CanonicalizeLocaleList, GetOption, GetOptionsObject, IsWellFormedCurrencyCode, SupportedLocales, ToString, getInternalSlot, getMultiInternalSlots, invariant, setInternalSlot, } from '@formatjs/ecma402-abstract';
|
|
3
|
+
import { CanonicalCodeForDisplayNames } from './abstract/CanonicalCodeForDisplayNames';
|
|
4
|
+
import { IsValidDateTimeFieldCode } from './abstract/IsValidDateTimeFieldCode';
|
|
5
|
+
import { ResolveLocale } from '@formatjs/intl-localematcher';
|
|
9
6
|
var DisplayNames = /** @class */ (function () {
|
|
10
7
|
function DisplayNames(locales, options) {
|
|
11
8
|
var _newTarget = this.constructor;
|
|
12
9
|
if (_newTarget === undefined) {
|
|
13
10
|
throw TypeError("Constructor Intl.DisplayNames requires 'new'");
|
|
14
11
|
}
|
|
15
|
-
var requestedLocales =
|
|
16
|
-
options =
|
|
12
|
+
var requestedLocales = CanonicalizeLocaleList(locales);
|
|
13
|
+
options = GetOptionsObject(options);
|
|
17
14
|
var opt = Object.create(null);
|
|
18
15
|
var localeData = DisplayNames.localeData;
|
|
19
|
-
var matcher =
|
|
16
|
+
var matcher = GetOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');
|
|
20
17
|
opt.localeMatcher = matcher;
|
|
21
|
-
var r =
|
|
18
|
+
var r = ResolveLocale(Array.from(DisplayNames.availableLocales), requestedLocales, opt, [], // there is no relevantExtensionKeys
|
|
22
19
|
DisplayNames.localeData, DisplayNames.getDefaultLocale);
|
|
23
|
-
var style =
|
|
20
|
+
var style = GetOption(options, 'style', 'string', ['narrow', 'short', 'long'], 'long');
|
|
24
21
|
setSlot(this, 'style', style);
|
|
25
|
-
var type =
|
|
22
|
+
var type = GetOption(options, 'type', 'string', ['language', 'region', 'script', 'currency', 'calendar', 'dateTimeField'], undefined);
|
|
26
23
|
if (type === undefined) {
|
|
27
24
|
throw TypeError("Intl.DisplayNames constructor requires \"type\" option");
|
|
28
25
|
}
|
|
29
26
|
setSlot(this, 'type', type);
|
|
30
|
-
var fallback =
|
|
27
|
+
var fallback = GetOption(options, 'fallback', 'string', ['code', 'none'], 'code');
|
|
31
28
|
setSlot(this, 'fallback', fallback);
|
|
32
29
|
setSlot(this, 'locale', r.locale);
|
|
33
30
|
var dataLocale = r.dataLocale;
|
|
34
31
|
var dataLocaleData = localeData[dataLocale];
|
|
35
|
-
|
|
32
|
+
invariant(!!dataLocaleData, "Missing locale data for ".concat(dataLocale));
|
|
36
33
|
setSlot(this, 'localeData', dataLocaleData);
|
|
37
|
-
|
|
34
|
+
invariant(dataLocaleData !== undefined, "locale data for ".concat(r.locale, " does not exist."));
|
|
38
35
|
var types = dataLocaleData.types;
|
|
39
|
-
|
|
36
|
+
invariant(typeof types === 'object' && types != null, 'invalid types data');
|
|
40
37
|
var typeFields = types[type];
|
|
41
|
-
|
|
42
|
-
var languageDisplay =
|
|
38
|
+
invariant(typeof typeFields === 'object' && typeFields != null, 'invalid typeFields data');
|
|
39
|
+
var languageDisplay = GetOption(options, 'languageDisplay', 'string', ['dialect', 'standard'], 'dialect');
|
|
43
40
|
if (type === 'language') {
|
|
44
41
|
setSlot(this, 'languageDisplay', languageDisplay);
|
|
45
42
|
// Using types[type] instead of typeFields because TypeScript cannot infer the correct type
|
|
46
43
|
var typeFields_1 = types[type][languageDisplay];
|
|
47
|
-
|
|
44
|
+
invariant(typeof typeFields_1 === 'object' && typeFields_1 != null, 'invalid language typeFields data');
|
|
48
45
|
}
|
|
49
46
|
// Using types[type] instead of typeFields because TypeScript cannot infer the correct type
|
|
50
47
|
var styleFields = type === 'language'
|
|
51
48
|
? types[type][languageDisplay][style]
|
|
52
49
|
: types[type][style];
|
|
53
|
-
|
|
50
|
+
invariant(typeof styleFields === 'object' && styleFields != null, 'invalid styleFields data');
|
|
54
51
|
setSlot(this, 'fields', styleFields);
|
|
55
52
|
}
|
|
56
53
|
DisplayNames.supportedLocalesOf = function (locales, options) {
|
|
57
|
-
return
|
|
54
|
+
return SupportedLocales(DisplayNames.availableLocales, CanonicalizeLocaleList(locales), options);
|
|
58
55
|
};
|
|
59
56
|
DisplayNames.__addLocaleData = function () {
|
|
60
57
|
var data = [];
|
|
@@ -77,13 +74,13 @@ var DisplayNames = /** @class */ (function () {
|
|
|
77
74
|
DisplayNames.prototype.of = function (code) {
|
|
78
75
|
checkReceiver(this, 'of');
|
|
79
76
|
var type = getSlot(this, 'type');
|
|
80
|
-
var codeAsString =
|
|
77
|
+
var codeAsString = ToString(code);
|
|
81
78
|
if (!isValidCodeForDisplayNames(type, codeAsString)) {
|
|
82
79
|
throw RangeError('invalid code for Intl.DisplayNames.prototype.of');
|
|
83
80
|
}
|
|
84
|
-
var _a =
|
|
81
|
+
var _a = getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, 'localeData', 'style', 'fallback'), localeData = _a.localeData, style = _a.style, fallback = _a.fallback;
|
|
85
82
|
// Canonicalize the case.
|
|
86
|
-
var canonicalCode =
|
|
83
|
+
var canonicalCode = CanonicalCodeForDisplayNames(type, codeAsString);
|
|
87
84
|
var name;
|
|
88
85
|
if (type === 'language') {
|
|
89
86
|
var languageDisplay = getSlot(this, 'languageDisplay');
|
|
@@ -103,7 +100,7 @@ var DisplayNames = /** @class */ (function () {
|
|
|
103
100
|
};
|
|
104
101
|
DisplayNames.prototype.resolvedOptions = function () {
|
|
105
102
|
checkReceiver(this, 'resolvedOptions');
|
|
106
|
-
return
|
|
103
|
+
return __assign({}, getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, 'locale', 'style', 'type', 'fallback', 'languageDisplay'));
|
|
107
104
|
};
|
|
108
105
|
DisplayNames.getDefaultLocale = function () {
|
|
109
106
|
return DisplayNames.__defaultLocale;
|
|
@@ -114,7 +111,7 @@ var DisplayNames = /** @class */ (function () {
|
|
|
114
111
|
DisplayNames.polyfilled = true;
|
|
115
112
|
return DisplayNames;
|
|
116
113
|
}());
|
|
117
|
-
|
|
114
|
+
export { DisplayNames };
|
|
118
115
|
// https://tc39.es/proposal-intl-displaynames/#sec-isvalidcodefordisplaynames
|
|
119
116
|
function isValidCodeForDisplayNames(type, code) {
|
|
120
117
|
switch (type) {
|
|
@@ -133,12 +130,12 @@ function isValidCodeForDisplayNames(type, code) {
|
|
|
133
130
|
// unicode_script_subtag
|
|
134
131
|
return /^[a-z]{4}$/i.test(code);
|
|
135
132
|
case 'currency':
|
|
136
|
-
return
|
|
133
|
+
return IsWellFormedCurrencyCode(code);
|
|
137
134
|
case 'calendar':
|
|
138
135
|
// unicode locale identifier type
|
|
139
136
|
return /^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i.test(code);
|
|
140
137
|
case 'dateTimeField':
|
|
141
|
-
return
|
|
138
|
+
return IsValidDateTimeFieldCode(code);
|
|
142
139
|
}
|
|
143
140
|
}
|
|
144
141
|
try {
|
|
@@ -163,10 +160,10 @@ catch (e) {
|
|
|
163
160
|
}
|
|
164
161
|
var __INTERNAL_SLOT_MAP__ = new WeakMap();
|
|
165
162
|
function getSlot(instance, key) {
|
|
166
|
-
return
|
|
163
|
+
return getInternalSlot(__INTERNAL_SLOT_MAP__, instance, key);
|
|
167
164
|
}
|
|
168
165
|
function setSlot(instance, key, value) {
|
|
169
|
-
|
|
166
|
+
setInternalSlot(__INTERNAL_SLOT_MAP__, instance, key, value);
|
|
170
167
|
}
|
|
171
168
|
function checkReceiver(receiver, methodName) {
|
|
172
169
|
if (!(receiver instanceof DisplayNames)) {
|
package/lib/polyfill-force.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var _1 = require("./");
|
|
1
|
+
import { DisplayNames } from './';
|
|
4
2
|
Object.defineProperty(Intl, 'DisplayNames', {
|
|
5
|
-
value:
|
|
3
|
+
value: DisplayNames,
|
|
6
4
|
enumerable: false,
|
|
7
5
|
writable: true,
|
|
8
6
|
configurable: true,
|
package/lib/polyfill.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var should_polyfill_1 = require("./should-polyfill");
|
|
5
|
-
if ((0, should_polyfill_1.shouldPolyfill)()) {
|
|
1
|
+
import { DisplayNames } from './';
|
|
2
|
+
import { shouldPolyfill } from './should-polyfill';
|
|
3
|
+
if (shouldPolyfill()) {
|
|
6
4
|
Object.defineProperty(Intl, 'DisplayNames', {
|
|
7
|
-
value:
|
|
5
|
+
value: DisplayNames,
|
|
8
6
|
enumerable: false,
|
|
9
7
|
writable: true,
|
|
10
8
|
configurable: true,
|
package/lib/should-polyfill.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.shouldPolyfill = exports._shouldPolyfillWithoutLocale = void 0;
|
|
4
|
-
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
5
|
-
var supported_locales_generated_1 = require("./supported-locales.generated");
|
|
1
|
+
import { match } from '@formatjs/intl-localematcher';
|
|
2
|
+
import { supportedLocales } from './supported-locales.generated';
|
|
6
3
|
/**
|
|
7
4
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=1097432
|
|
8
5
|
*/
|
|
@@ -35,19 +32,17 @@ function supportedLocalesOf(locale) {
|
|
|
35
32
|
return (Intl.DisplayNames.supportedLocalesOf(locales).length ===
|
|
36
33
|
locales.length);
|
|
37
34
|
}
|
|
38
|
-
function _shouldPolyfillWithoutLocale() {
|
|
35
|
+
export function _shouldPolyfillWithoutLocale() {
|
|
39
36
|
return !Intl.DisplayNames || hasMissingICUBug() || hasScriptBug();
|
|
40
37
|
}
|
|
41
|
-
|
|
42
|
-
function shouldPolyfill(locale) {
|
|
38
|
+
export function shouldPolyfill(locale) {
|
|
43
39
|
if (locale === void 0) { locale = 'en'; }
|
|
44
40
|
try {
|
|
45
41
|
if (_shouldPolyfillWithoutLocale() || !supportedLocalesOf(locale)) {
|
|
46
|
-
return
|
|
42
|
+
return match([locale], supportedLocales, 'en');
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
45
|
catch (e) {
|
|
50
46
|
return true;
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
|
-
exports.shouldPolyfill = shouldPolyfill;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.supportedLocales = void 0;
|
|
4
|
-
exports.supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
|
1
|
+
export var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-displaynames",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.4",
|
|
4
4
|
"description": "Polyfill for: https://tc39.es/proposal-intl-displaynames",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"tslib": "^2.4.0",
|
|
25
|
-
"@formatjs/ecma402-abstract": "1.
|
|
26
|
-
"@formatjs/intl-localematcher": "0.5.
|
|
25
|
+
"@formatjs/ecma402-abstract": "1.18.0",
|
|
26
|
+
"@formatjs/intl-localematcher": "0.5.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@formatjs/intl-locale": "3.4.
|
|
29
|
+
"@formatjs/intl-locale": "3.4.3",
|
|
30
30
|
"@formatjs/intl-getcanonicallocales": "2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|