react-intl 5.20.11 → 5.20.12
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.map +1 -1
- package/index.js +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/src/components/relative.js +1 -1
- package/package.json +8 -8
- package/react-intl.iife.js +73 -69
- package/src/components/relative.js +1 -1
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;AACrE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,IAAI,kBAAkB,EACnC,SAAS,IAAI,cAAc,GAC5B,MAAM,gBAAgB,CAAA;AAEvB,wBAAgB,cAAc,CAC5B,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,GAAG,iBAAiB,EACrB,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,C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BAA2B,CAAA;AAC1E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,gCAAgC,CAAA;AAChF,YAAY,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA"}
|
package/index.js
CHANGED
|
@@ -34,6 +34,7 @@ Object.defineProperty(exports, "createIntl", { enumerable: true, get: function (
|
|
|
34
34
|
// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
|
|
35
35
|
exports.FormattedDate = createFormattedComponent_1.createFormattedComponent('formatDate');
|
|
36
36
|
exports.FormattedTime = createFormattedComponent_1.createFormattedComponent('formatTime');
|
|
37
|
+
// @ts-ignore issue w/ TS Intl types
|
|
37
38
|
exports.FormattedNumber = createFormattedComponent_1.createFormattedComponent('formatNumber');
|
|
38
39
|
exports.FormattedList = createFormattedComponent_1.createFormattedComponent('formatList');
|
|
39
40
|
exports.FormattedDisplayName = createFormattedComponent_1.createFormattedComponent('formatDisplayName');
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;AACrE,OAAO,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,SAAS,CAAA;CAC1C,CACqC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;AACrE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,IAAI,kBAAkB,EACnC,SAAS,IAAI,cAAc,GAC5B,MAAM,gBAAgB,CAAA;AAEvB,wBAAgB,cAAc,CAC5B,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,GAAG,iBAAiB,EACrB,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACrC,IAAI,EAAE,CAAC,GAAG,CAAC,CAEZ;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,iBAAiB,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAEpE;AACD,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,QAAQ,IAAI,eAAe,EAC3B,OAAO,IAAI,WAAW,EACtB,aAAa,EACb,qBAAqB,GACt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KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CACpE,CACoD,CAAA;AACvD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,iBAAiB,GAAG;IAClB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAA;IAC5D,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CACpE,CACoD,CAAA;AAEvD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,gCAAgC,CAAA;AAChF,YAAY,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { default as IntlProvider, createIntl } from './src/components/provider';
|
|
|
12
12
|
// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
|
|
13
13
|
export var FormattedDate = createFormattedComponent('formatDate');
|
|
14
14
|
export var FormattedTime = createFormattedComponent('formatTime');
|
|
15
|
+
// @ts-ignore issue w/ TS Intl types
|
|
15
16
|
export var FormattedNumber = createFormattedComponent('formatNumber');
|
|
16
17
|
export var FormattedList = createFormattedComponent('formatList');
|
|
17
18
|
export var FormattedDisplayName = createFormattedComponent('formatDisplayName');
|
|
@@ -55,7 +55,7 @@ var INCREMENTABLE_UNITS = [
|
|
|
55
55
|
];
|
|
56
56
|
function canIncrement(unit) {
|
|
57
57
|
if (unit === void 0) { unit = 'second'; }
|
|
58
|
-
return INCREMENTABLE_UNITS.
|
|
58
|
+
return INCREMENTABLE_UNITS.indexOf(unit) > -1;
|
|
59
59
|
}
|
|
60
60
|
var SimpleFormattedRelativeTime = function (props) {
|
|
61
61
|
var _a = useIntl(), formatRelativeTime = _a.formatRelativeTime, Text = _a.textComponent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
|
-
"version": "5.20.
|
|
3
|
+
"version": "5.20.12",
|
|
4
4
|
"description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -128,20 +128,20 @@
|
|
|
128
128
|
"types": "index.d.ts",
|
|
129
129
|
"sideEffects": false,
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@formatjs/ecma402-abstract": "1.9.
|
|
132
|
-
"@formatjs/icu-messageformat-parser": "2.0.
|
|
133
|
-
"@formatjs/intl": "1.14.
|
|
134
|
-
"@formatjs/intl-displaynames": "5.2.
|
|
135
|
-
"@formatjs/intl-listformat": "6.3.
|
|
131
|
+
"@formatjs/ecma402-abstract": "1.9.9",
|
|
132
|
+
"@formatjs/icu-messageformat-parser": "2.0.12",
|
|
133
|
+
"@formatjs/intl": "1.14.2",
|
|
134
|
+
"@formatjs/intl-displaynames": "5.2.4",
|
|
135
|
+
"@formatjs/intl-listformat": "6.3.4",
|
|
136
136
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
137
137
|
"@types/react": "16 || 17",
|
|
138
138
|
"hoist-non-react-statics": "^3.3.2",
|
|
139
|
-
"intl-messageformat": "9.9.
|
|
139
|
+
"intl-messageformat": "9.9.2",
|
|
140
140
|
"tslib": "^2.1.0"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
|
143
143
|
"react": "^16.3.0 || 17",
|
|
144
|
-
"typescript": "^4.
|
|
144
|
+
"typescript": "^4.3"
|
|
145
145
|
},
|
|
146
146
|
"peerDependenciesMeta": {
|
|
147
147
|
"typescript": {
|
package/react-intl.iife.js
CHANGED
|
@@ -6,32 +6,36 @@ var ReactIntl = (function() {
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __markAsModule = function(target) {
|
|
9
|
-
return __defProp(target, "__esModule", {value: true});
|
|
9
|
+
return __defProp(target, "__esModule", { value: true });
|
|
10
|
+
};
|
|
11
|
+
var __require = typeof require !== "undefined" ? require : function(x) {
|
|
12
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
10
13
|
};
|
|
11
14
|
var __commonJS = function(cb, mod) {
|
|
12
|
-
return function
|
|
13
|
-
return mod || (0, cb[Object.keys(cb)[0]])((mod = {exports: {}}).exports, mod), mod.exports;
|
|
15
|
+
return function __require2() {
|
|
16
|
+
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
17
|
};
|
|
15
18
|
};
|
|
16
19
|
var __export = function(target, all) {
|
|
20
|
+
__markAsModule(target);
|
|
17
21
|
for (var name in all)
|
|
18
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
23
|
};
|
|
20
24
|
var __reExport = function(target, module, desc) {
|
|
21
25
|
if (module && typeof module === "object" || typeof module === "function")
|
|
22
26
|
for (var keys = __getOwnPropNames(module), i = 0, n = keys.length, key; i < n; i++) {
|
|
23
27
|
key = keys[i];
|
|
24
28
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
25
|
-
__defProp(target, key, {get: function(k) {
|
|
29
|
+
__defProp(target, key, { get: function(k) {
|
|
26
30
|
return module[k];
|
|
27
|
-
}.bind(null, key), enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable});
|
|
31
|
+
}.bind(null, key), enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
|
|
28
32
|
}
|
|
29
33
|
return target;
|
|
30
34
|
};
|
|
31
35
|
var __toModule = function(module) {
|
|
32
|
-
return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? {get: function() {
|
|
36
|
+
return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: function() {
|
|
33
37
|
return module.default;
|
|
34
|
-
}, enumerable: true} : {value: module, enumerable: true})), module);
|
|
38
|
+
}, enumerable: true } : { value: module, enumerable: true })), module);
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
// node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js
|
|
@@ -292,7 +296,7 @@ var ReactIntl = (function() {
|
|
|
292
296
|
var require_utils = __commonJS({
|
|
293
297
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/utils.js": function(exports) {
|
|
294
298
|
"use strict";
|
|
295
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
299
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
296
300
|
exports.invariant = exports.UNICODE_EXTENSION_SEQUENCE_REGEX = void 0;
|
|
297
301
|
exports.UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
298
302
|
function invariant2(condition, message, Err) {
|
|
@@ -311,7 +315,7 @@ var ReactIntl = (function() {
|
|
|
311
315
|
var require_BestAvailableLocale = __commonJS({
|
|
312
316
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/BestAvailableLocale.js": function(exports) {
|
|
313
317
|
"use strict";
|
|
314
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
318
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
315
319
|
exports.BestAvailableLocale = void 0;
|
|
316
320
|
function BestAvailableLocale(availableLocales, locale) {
|
|
317
321
|
var candidate = locale;
|
|
@@ -337,12 +341,12 @@ var ReactIntl = (function() {
|
|
|
337
341
|
var require_LookupMatcher = __commonJS({
|
|
338
342
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/LookupMatcher.js": function(exports) {
|
|
339
343
|
"use strict";
|
|
340
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
344
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
341
345
|
exports.LookupMatcher = void 0;
|
|
342
346
|
var utils_1 = require_utils();
|
|
343
347
|
var BestAvailableLocale_1 = require_BestAvailableLocale();
|
|
344
348
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
345
|
-
var result = {locale: ""};
|
|
349
|
+
var result = { locale: "" };
|
|
346
350
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
347
351
|
var locale = requestedLocales_1[_i];
|
|
348
352
|
var noExtensionLocale = locale.replace(utils_1.UNICODE_EXTENSION_SEQUENCE_REGEX, "");
|
|
@@ -366,7 +370,7 @@ var ReactIntl = (function() {
|
|
|
366
370
|
var require_BestFitMatcher = __commonJS({
|
|
367
371
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/BestFitMatcher.js": function(exports) {
|
|
368
372
|
"use strict";
|
|
369
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
373
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
370
374
|
exports.BestFitMatcher = void 0;
|
|
371
375
|
var BestAvailableLocale_1 = require_BestAvailableLocale();
|
|
372
376
|
var utils_1 = require_utils();
|
|
@@ -417,7 +421,7 @@ var ReactIntl = (function() {
|
|
|
417
421
|
var require_UnicodeExtensionValue = __commonJS({
|
|
418
422
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/UnicodeExtensionValue.js": function(exports) {
|
|
419
423
|
"use strict";
|
|
420
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
424
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
421
425
|
exports.UnicodeExtensionValue = void 0;
|
|
422
426
|
var utils_1 = require_utils();
|
|
423
427
|
function UnicodeExtensionValue(extension, key) {
|
|
@@ -465,7 +469,7 @@ var ReactIntl = (function() {
|
|
|
465
469
|
var require_ResolveLocale = __commonJS({
|
|
466
470
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/ResolveLocale.js": function(exports) {
|
|
467
471
|
"use strict";
|
|
468
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
472
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
469
473
|
exports.ResolveLocale = void 0;
|
|
470
474
|
var LookupMatcher_1 = require_LookupMatcher();
|
|
471
475
|
var BestFitMatcher_1 = require_BestFitMatcher();
|
|
@@ -480,7 +484,7 @@ var ReactIntl = (function() {
|
|
|
480
484
|
r = BestFitMatcher_1.BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale);
|
|
481
485
|
}
|
|
482
486
|
var foundLocale = r.locale;
|
|
483
|
-
var result = {locale: "", dataLocale: foundLocale};
|
|
487
|
+
var result = { locale: "", dataLocale: foundLocale };
|
|
484
488
|
var supportedExtension = "-u";
|
|
485
489
|
for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
|
|
486
490
|
var key = relevantExtensionKeys_1[_i];
|
|
@@ -541,7 +545,7 @@ var ReactIntl = (function() {
|
|
|
541
545
|
var require_LookupSupportedLocales = __commonJS({
|
|
542
546
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/LookupSupportedLocales.js": function(exports) {
|
|
543
547
|
"use strict";
|
|
544
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
548
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
545
549
|
exports.LookupSupportedLocales = void 0;
|
|
546
550
|
var utils_1 = require_utils();
|
|
547
551
|
var BestAvailableLocale_1 = require_BestAvailableLocale();
|
|
@@ -565,7 +569,7 @@ var ReactIntl = (function() {
|
|
|
565
569
|
var require_intl_localematcher = __commonJS({
|
|
566
570
|
"bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/index.js": function(exports) {
|
|
567
571
|
"use strict";
|
|
568
|
-
Object.defineProperty(exports, "__esModule", {value: true});
|
|
572
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
569
573
|
exports.ResolveLocale = exports.LookupSupportedLocales = exports.match = void 0;
|
|
570
574
|
var ResolveLocale_1 = require_ResolveLocale();
|
|
571
575
|
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
@@ -581,13 +585,13 @@ var ReactIntl = (function() {
|
|
|
581
585
|
}
|
|
582
586
|
exports.match = match;
|
|
583
587
|
var LookupSupportedLocales_1 = require_LookupSupportedLocales();
|
|
584
|
-
Object.defineProperty(exports, "LookupSupportedLocales", {enumerable: true, get: function() {
|
|
588
|
+
Object.defineProperty(exports, "LookupSupportedLocales", { enumerable: true, get: function() {
|
|
585
589
|
return LookupSupportedLocales_1.LookupSupportedLocales;
|
|
586
|
-
}});
|
|
590
|
+
} });
|
|
587
591
|
var ResolveLocale_2 = require_ResolveLocale();
|
|
588
|
-
Object.defineProperty(exports, "ResolveLocale", {enumerable: true, get: function() {
|
|
592
|
+
Object.defineProperty(exports, "ResolveLocale", { enumerable: true, get: function() {
|
|
589
593
|
return ResolveLocale_2.ResolveLocale;
|
|
590
|
-
}});
|
|
594
|
+
} });
|
|
591
595
|
}
|
|
592
596
|
});
|
|
593
597
|
|
|
@@ -685,7 +689,7 @@ var ReactIntl = (function() {
|
|
|
685
689
|
|
|
686
690
|
// node_modules/tslib/tslib.es6.js
|
|
687
691
|
var extendStatics = function(d, b) {
|
|
688
|
-
extendStatics = Object.setPrototypeOf || {__proto__: []} instanceof Array && function(d2, b2) {
|
|
692
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
689
693
|
d2.__proto__ = b2;
|
|
690
694
|
} || function(d2, b2) {
|
|
691
695
|
for (var p in b2)
|
|
@@ -740,17 +744,17 @@ var ReactIntl = (function() {
|
|
|
740
744
|
}
|
|
741
745
|
|
|
742
746
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/createFormattedComponent.js
|
|
743
|
-
var React4 = __toModule(
|
|
747
|
+
var React4 = __toModule(__window.React);
|
|
744
748
|
|
|
745
749
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/useIntl.js
|
|
746
|
-
var React3 = __toModule(
|
|
750
|
+
var React3 = __toModule(__window.React);
|
|
747
751
|
|
|
748
752
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/injectIntl.js
|
|
749
|
-
var React2 = __toModule(
|
|
753
|
+
var React2 = __toModule(__window.React);
|
|
750
754
|
var import_hoist_non_react_statics = __toModule(require_hoist_non_react_statics_cjs());
|
|
751
755
|
|
|
752
756
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/utils.js
|
|
753
|
-
var React = __toModule(
|
|
757
|
+
var React = __toModule(__window.React);
|
|
754
758
|
|
|
755
759
|
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/262.js
|
|
756
760
|
var MINUTES_PER_HOUR = 60;
|
|
@@ -1064,7 +1068,7 @@ var ReactIntl = (function() {
|
|
|
1064
1068
|
throw new Error("Invalid number skeleton");
|
|
1065
1069
|
}
|
|
1066
1070
|
}
|
|
1067
|
-
tokens.push({stem: stem, options: options});
|
|
1071
|
+
tokens.push({ stem: stem, options: options });
|
|
1068
1072
|
}
|
|
1069
1073
|
return tokens;
|
|
1070
1074
|
}
|
|
@@ -1211,12 +1215,12 @@ var ReactIntl = (function() {
|
|
|
1211
1215
|
result.compactDisplay = "long";
|
|
1212
1216
|
continue;
|
|
1213
1217
|
case "scientific":
|
|
1214
|
-
result = __assign(__assign(__assign({}, result), {notation: "scientific"}), token.options.reduce(function(all, opt) {
|
|
1218
|
+
result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt) {
|
|
1215
1219
|
return __assign(__assign({}, all), parseNotationOptions(opt));
|
|
1216
1220
|
}, {}));
|
|
1217
1221
|
continue;
|
|
1218
1222
|
case "engineering":
|
|
1219
|
-
result = __assign(__assign(__assign({}, result), {notation: "engineering"}), token.options.reduce(function(all, opt) {
|
|
1223
|
+
result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt) {
|
|
1220
1224
|
return __assign(__assign({}, all), parseNotationOptions(opt));
|
|
1221
1225
|
}, {}));
|
|
1222
1226
|
continue;
|
|
@@ -1305,7 +1309,7 @@ var ReactIntl = (function() {
|
|
|
1305
1309
|
var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
|
|
1306
1310
|
var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
|
|
1307
1311
|
function createLocation(start, end) {
|
|
1308
|
-
return {start: start, end: end};
|
|
1312
|
+
return { start: start, end: end };
|
|
1309
1313
|
}
|
|
1310
1314
|
var hasNativeStartsWith = !!String.prototype.startsWith;
|
|
1311
1315
|
var hasNativeFromCodePoint = !!String.fromCodePoint;
|
|
@@ -1409,7 +1413,7 @@ var ReactIntl = (function() {
|
|
|
1409
1413
|
options = {};
|
|
1410
1414
|
}
|
|
1411
1415
|
this.message = message;
|
|
1412
|
-
this.position = {offset: 0, line: 1, column: 1};
|
|
1416
|
+
this.position = { offset: 0, line: 1, column: 1 };
|
|
1413
1417
|
this.ignoreTag = !!options.ignoreTag;
|
|
1414
1418
|
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
1415
1419
|
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
@@ -1459,7 +1463,7 @@ var ReactIntl = (function() {
|
|
|
1459
1463
|
elements.push(result.val);
|
|
1460
1464
|
}
|
|
1461
1465
|
}
|
|
1462
|
-
return {val: elements, err: null};
|
|
1466
|
+
return { val: elements, err: null };
|
|
1463
1467
|
};
|
|
1464
1468
|
Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
|
|
1465
1469
|
var startPosition = this.clonePosition();
|
|
@@ -1542,7 +1546,7 @@ var ReactIntl = (function() {
|
|
|
1542
1546
|
}
|
|
1543
1547
|
var location = createLocation(start, this.clonePosition());
|
|
1544
1548
|
return {
|
|
1545
|
-
val: {type: TYPE.literal, value: value, location: location},
|
|
1549
|
+
val: { type: TYPE.literal, value: value, location: location },
|
|
1546
1550
|
err: null
|
|
1547
1551
|
};
|
|
1548
1552
|
};
|
|
@@ -1658,7 +1662,7 @@ var ReactIntl = (function() {
|
|
|
1658
1662
|
this.bumpTo(endOffset);
|
|
1659
1663
|
var endPosition = this.clonePosition();
|
|
1660
1664
|
var location = createLocation(startingPosition, endPosition);
|
|
1661
|
-
return {value: value, location: location};
|
|
1665
|
+
return { value: value, location: location };
|
|
1662
1666
|
};
|
|
1663
1667
|
Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
|
|
1664
1668
|
var _a2;
|
|
@@ -1685,7 +1689,7 @@ var ReactIntl = (function() {
|
|
|
1685
1689
|
return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
1686
1690
|
}
|
|
1687
1691
|
var styleLocation = createLocation(styleStartPosition, this.clonePosition());
|
|
1688
|
-
styleAndLocation = {style: style, styleLocation: styleLocation};
|
|
1692
|
+
styleAndLocation = { style: style, styleLocation: styleLocation };
|
|
1689
1693
|
}
|
|
1690
1694
|
var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
|
|
1691
1695
|
if (argCloseResult.err) {
|
|
@@ -1700,7 +1704,7 @@ var ReactIntl = (function() {
|
|
|
1700
1704
|
return result;
|
|
1701
1705
|
}
|
|
1702
1706
|
return {
|
|
1703
|
-
val: {type: TYPE.number, value: value, location: location_1, style: result.val},
|
|
1707
|
+
val: { type: TYPE.number, value: value, location: location_1, style: result.val },
|
|
1704
1708
|
err: null
|
|
1705
1709
|
};
|
|
1706
1710
|
} else {
|
|
@@ -1715,7 +1719,7 @@ var ReactIntl = (function() {
|
|
|
1715
1719
|
};
|
|
1716
1720
|
var type = argType === "date" ? TYPE.date : TYPE.time;
|
|
1717
1721
|
return {
|
|
1718
|
-
val: {type: type, value: value, location: location_1, style: style},
|
|
1722
|
+
val: { type: type, value: value, location: location_1, style: style },
|
|
1719
1723
|
err: null
|
|
1720
1724
|
};
|
|
1721
1725
|
}
|
|
@@ -1796,7 +1800,7 @@ var ReactIntl = (function() {
|
|
|
1796
1800
|
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
1797
1801
|
}
|
|
1798
1802
|
this.bump();
|
|
1799
|
-
return {val: true, err: null};
|
|
1803
|
+
return { val: true, err: null };
|
|
1800
1804
|
};
|
|
1801
1805
|
Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
1802
1806
|
var nestedBraces = 0;
|
|
@@ -1912,7 +1916,7 @@ var ReactIntl = (function() {
|
|
|
1912
1916
|
if (this.requiresOtherClause && !hasOtherClause) {
|
|
1913
1917
|
return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
|
|
1914
1918
|
}
|
|
1915
|
-
return {val: options, err: null};
|
|
1919
|
+
return { val: options, err: null };
|
|
1916
1920
|
};
|
|
1917
1921
|
Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
|
|
1918
1922
|
var sign = 1;
|
|
@@ -1941,7 +1945,7 @@ var ReactIntl = (function() {
|
|
|
1941
1945
|
if (!isSafeInteger(decimal)) {
|
|
1942
1946
|
return this.error(invalidNumberError, location);
|
|
1943
1947
|
}
|
|
1944
|
-
return {val: decimal, err: null};
|
|
1948
|
+
return { val: decimal, err: null };
|
|
1945
1949
|
};
|
|
1946
1950
|
Parser2.prototype.offset = function() {
|
|
1947
1951
|
return this.position.offset;
|
|
@@ -2084,7 +2088,7 @@ var ReactIntl = (function() {
|
|
|
2084
2088
|
if (opts === void 0) {
|
|
2085
2089
|
opts = {};
|
|
2086
2090
|
}
|
|
2087
|
-
opts = __assign({shouldParseSkeletons: true, requiresOtherClause: true}, opts);
|
|
2091
|
+
opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
|
|
2088
2092
|
var result = new Parser(message, opts).parse();
|
|
2089
2093
|
if (result.err) {
|
|
2090
2094
|
var error = SyntaxError(ErrorKind[result.err.kind]);
|
|
@@ -2334,7 +2338,7 @@ var ReactIntl = (function() {
|
|
|
2334
2338
|
if (!Intl.PluralRules) {
|
|
2335
2339
|
throw new FormatError('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', ErrorCode.MISSING_INTL_API, originalMessage);
|
|
2336
2340
|
}
|
|
2337
|
-
var rule = formatters.getPluralRules(locales, {type: el.pluralType}).select(value - (el.offset || 0));
|
|
2341
|
+
var rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(value - (el.offset || 0));
|
|
2338
2342
|
opt = el.options[rule] || el.options.other;
|
|
2339
2343
|
}
|
|
2340
2344
|
if (!opt) {
|
|
@@ -2713,11 +2717,11 @@ var ReactIntl = (function() {
|
|
|
2713
2717
|
getDateTimeFormat: getDateTimeFormat,
|
|
2714
2718
|
getNumberFormat: getNumberFormat,
|
|
2715
2719
|
getMessageFormat: memoize(function(message, locales, overrideFormats, opts) {
|
|
2716
|
-
return new IntlMessageFormat(message, locales, overrideFormats, __assign({formatters: {
|
|
2720
|
+
return new IntlMessageFormat(message, locales, overrideFormats, __assign({ formatters: {
|
|
2717
2721
|
getNumberFormat: getNumberFormat,
|
|
2718
2722
|
getDateTimeFormat: getDateTimeFormat,
|
|
2719
2723
|
getPluralRules: getPluralRules
|
|
2720
|
-
}}, opts || {}));
|
|
2724
|
+
} }, opts || {}));
|
|
2721
2725
|
}, {
|
|
2722
2726
|
cache: createFastMemoizeCache2(cache.message),
|
|
2723
2727
|
strategy: strategies.variadic
|
|
@@ -2770,7 +2774,7 @@ var ReactIntl = (function() {
|
|
|
2770
2774
|
// bazel-out/darwin-fastbuild/bin/packages/intl/lib/src/message.js
|
|
2771
2775
|
function setTimeZoneInOptions(opts, timeZone) {
|
|
2772
2776
|
return Object.keys(opts).reduce(function(all, k) {
|
|
2773
|
-
all[k] = __assign({timeZone: timeZone}, opts[k]);
|
|
2777
|
+
all[k] = __assign({ timeZone: timeZone }, opts[k]);
|
|
2774
2778
|
return all;
|
|
2775
2779
|
}, {});
|
|
2776
2780
|
}
|
|
@@ -2786,12 +2790,12 @@ var ReactIntl = (function() {
|
|
|
2786
2790
|
return f1;
|
|
2787
2791
|
}
|
|
2788
2792
|
var mfFormats = IntlMessageFormat.formats;
|
|
2789
|
-
return __assign(__assign(__assign({}, mfFormats), f1), {date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone))});
|
|
2793
|
+
return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });
|
|
2790
2794
|
}
|
|
2791
2795
|
function formatMessage(_a2, state, messageDescriptor, values, opts) {
|
|
2792
2796
|
var locale = _a2.locale, formats = _a2.formats, messages = _a2.messages, defaultLocale = _a2.defaultLocale, defaultFormats = _a2.defaultFormats, onError = _a2.onError, timeZone = _a2.timeZone, defaultRichTextElements = _a2.defaultRichTextElements;
|
|
2793
2797
|
if (messageDescriptor === void 0) {
|
|
2794
|
-
messageDescriptor = {id: ""};
|
|
2798
|
+
messageDescriptor = { id: "" };
|
|
2795
2799
|
}
|
|
2796
2800
|
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
2797
2801
|
invariant(!!msgId, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
@@ -2822,7 +2826,7 @@ var ReactIntl = (function() {
|
|
|
2822
2826
|
return id;
|
|
2823
2827
|
}
|
|
2824
2828
|
try {
|
|
2825
|
-
var formatter = state.getMessageFormat(message, locale, formats, __assign({formatters: state}, opts || {}));
|
|
2829
|
+
var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, opts || {}));
|
|
2826
2830
|
return formatter.format(values);
|
|
2827
2831
|
} catch (e) {
|
|
2828
2832
|
onError(new MessageFormatError('Error formatting message: "' + id + '", using ' + (defaultMessage ? "default message" : "id") + " as fallback.", locale, messageDescriptor, e));
|
|
@@ -2871,10 +2875,10 @@ var ReactIntl = (function() {
|
|
|
2871
2875
|
options = {};
|
|
2872
2876
|
}
|
|
2873
2877
|
var format = options.format;
|
|
2874
|
-
var defaults = __assign(__assign({}, timeZone && {timeZone: timeZone}), format && getNamedFormat(formats, type, format, onError));
|
|
2878
|
+
var defaults = __assign(__assign({}, timeZone && { timeZone: timeZone }), format && getNamedFormat(formats, type, format, onError));
|
|
2875
2879
|
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
|
|
2876
2880
|
if (type === "time" && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second && !filteredOptions.timeStyle && !filteredOptions.dateStyle) {
|
|
2877
|
-
filteredOptions = __assign(__assign({}, filteredOptions), {hour: "numeric", minute: "numeric"});
|
|
2881
|
+
filteredOptions = __assign(__assign({}, filteredOptions), { hour: "numeric", minute: "numeric" });
|
|
2878
2882
|
}
|
|
2879
2883
|
return getDateTimeFormat(locale, filteredOptions);
|
|
2880
2884
|
}
|
|
@@ -2913,7 +2917,7 @@ var ReactIntl = (function() {
|
|
|
2913
2917
|
}
|
|
2914
2918
|
var from = _a2[0], to = _a2[1], _b = _a2[2], options = _b === void 0 ? {} : _b;
|
|
2915
2919
|
var timeZone = config.timeZone, locale = config.locale, onError = config.onError;
|
|
2916
|
-
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? {timeZone: timeZone} : {});
|
|
2920
|
+
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? { timeZone: timeZone } : {});
|
|
2917
2921
|
try {
|
|
2918
2922
|
return getDateTimeFormat(locale, filteredOptions).formatRange(from, to);
|
|
2919
2923
|
} catch (e) {
|
|
@@ -3019,7 +3023,7 @@ var ReactIntl = (function() {
|
|
|
3019
3023
|
return String(v);
|
|
3020
3024
|
});
|
|
3021
3025
|
return getListFormat(locale, filteredOptions).formatToParts(serializedValues).map(function(part) {
|
|
3022
|
-
return part.type === "literal" ? part : __assign(__assign({}, part), {value: richValues_1[part.value] || part.value});
|
|
3026
|
+
return part.type === "literal" ? part : __assign(__assign({}, part), { value: richValues_1[part.value] || part.value });
|
|
3023
3027
|
});
|
|
3024
3028
|
} catch (e) {
|
|
3025
3029
|
onError(new IntlError(IntlErrorCode.FORMAT_ERROR, "Error formatting list.", e));
|
|
@@ -3161,14 +3165,14 @@ var ReactIntl = (function() {
|
|
|
3161
3165
|
onError(new MissingDataError('Missing locale data for locale: "' + locale + '" in Intl.DateTimeFormat. Using default locale: "' + defaultLocale + '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'));
|
|
3162
3166
|
}
|
|
3163
3167
|
verifyConfigMessages(resolvedConfig);
|
|
3164
|
-
return __assign(__assign({}, resolvedConfig), {formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames)});
|
|
3168
|
+
return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
|
|
3165
3169
|
}
|
|
3166
3170
|
|
|
3167
3171
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/utils.js
|
|
3168
3172
|
function invariantIntlContext(intl) {
|
|
3169
3173
|
invariant(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
|
|
3170
3174
|
}
|
|
3171
|
-
var DEFAULT_INTL_CONFIG2 = __assign(__assign({}, DEFAULT_INTL_CONFIG), {textComponent: React.Fragment});
|
|
3175
|
+
var DEFAULT_INTL_CONFIG2 = __assign(__assign({}, DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });
|
|
3172
3176
|
function assignUniqueKeysToParts(formatXMLElementFn) {
|
|
3173
3177
|
return function(parts) {
|
|
3174
3178
|
return formatXMLElementFn(React.Children.toArray(parts));
|
|
@@ -3214,14 +3218,14 @@ var ReactIntl = (function() {
|
|
|
3214
3218
|
invariantIntlContext(intl);
|
|
3215
3219
|
}
|
|
3216
3220
|
var intlProp = (_a3 = {}, _a3[intlPropName] = intl, _a3);
|
|
3217
|
-
return React2.createElement(WrappedComponent, __assign({}, props, intlProp, {ref: forwardRef2 ? props.forwardedRef : null}));
|
|
3221
|
+
return React2.createElement(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef2 ? props.forwardedRef : null }));
|
|
3218
3222
|
});
|
|
3219
3223
|
};
|
|
3220
3224
|
WithIntl.displayName = "injectIntl(" + getDisplayName(WrappedComponent) + ")";
|
|
3221
3225
|
WithIntl.WrappedComponent = WrappedComponent;
|
|
3222
3226
|
if (forwardRef2) {
|
|
3223
3227
|
return (0, import_hoist_non_react_statics.default)(React2.forwardRef(function(props, ref) {
|
|
3224
|
-
return React2.createElement(WithIntl, __assign({}, props, {forwardedRef: ref}));
|
|
3228
|
+
return React2.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }));
|
|
3225
3229
|
}), WrappedComponent);
|
|
3226
3230
|
}
|
|
3227
3231
|
return (0, import_hoist_non_react_statics.default)(WithIntl, WrappedComponent);
|
|
@@ -3289,7 +3293,7 @@ var ReactIntl = (function() {
|
|
|
3289
3293
|
}
|
|
3290
3294
|
|
|
3291
3295
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/provider.js
|
|
3292
|
-
var React5 = __toModule(
|
|
3296
|
+
var React5 = __toModule(__window.React);
|
|
3293
3297
|
function processIntlConfig(config) {
|
|
3294
3298
|
return {
|
|
3295
3299
|
locale: config.locale,
|
|
@@ -3334,8 +3338,8 @@ var ReactIntl = (function() {
|
|
|
3334
3338
|
var createIntl2 = function(_a2, cache) {
|
|
3335
3339
|
var rawDefaultRichTextElements = _a2.defaultRichTextElements, config = __rest(_a2, ["defaultRichTextElements"]);
|
|
3336
3340
|
var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);
|
|
3337
|
-
var coreIntl = createIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG2), config), {defaultRichTextElements: defaultRichTextElements}), cache);
|
|
3338
|
-
return __assign(__assign({}, coreIntl), {formatMessage: formatMessage2.bind(null, {
|
|
3341
|
+
var coreIntl = createIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG2), config), { defaultRichTextElements: defaultRichTextElements }), cache);
|
|
3342
|
+
return __assign(__assign({}, coreIntl), { formatMessage: formatMessage2.bind(null, {
|
|
3339
3343
|
locale: coreIntl.locale,
|
|
3340
3344
|
timeZone: coreIntl.timeZone,
|
|
3341
3345
|
formats: coreIntl.formats,
|
|
@@ -3344,7 +3348,7 @@ var ReactIntl = (function() {
|
|
|
3344
3348
|
messages: coreIntl.messages,
|
|
3345
3349
|
onError: coreIntl.onError,
|
|
3346
3350
|
defaultRichTextElements: defaultRichTextElements
|
|
3347
|
-
}, coreIntl.formatters)});
|
|
3351
|
+
}, coreIntl.formatters) });
|
|
3348
3352
|
};
|
|
3349
3353
|
var IntlProvider2 = function(_super) {
|
|
3350
3354
|
__extends(IntlProvider3, _super);
|
|
@@ -3371,7 +3375,7 @@ var ReactIntl = (function() {
|
|
|
3371
3375
|
};
|
|
3372
3376
|
IntlProvider3.prototype.render = function() {
|
|
3373
3377
|
invariantIntlContext(this.state.intl);
|
|
3374
|
-
return React5.createElement(Provider, {value: this.state.intl}, this.props.children);
|
|
3378
|
+
return React5.createElement(Provider, { value: this.state.intl }, this.props.children);
|
|
3375
3379
|
};
|
|
3376
3380
|
IntlProvider3.displayName = "IntlProvider";
|
|
3377
3381
|
IntlProvider3.defaultProps = DEFAULT_INTL_CONFIG2;
|
|
@@ -3380,7 +3384,7 @@ var ReactIntl = (function() {
|
|
|
3380
3384
|
var provider_default = IntlProvider2;
|
|
3381
3385
|
|
|
3382
3386
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/relative.js
|
|
3383
|
-
var React6 = __toModule(
|
|
3387
|
+
var React6 = __toModule(__window.React);
|
|
3384
3388
|
var MINUTE = 60;
|
|
3385
3389
|
var HOUR = 60 * 60;
|
|
3386
3390
|
var DAY = 60 * 60 * 24;
|
|
@@ -3431,7 +3435,7 @@ var ReactIntl = (function() {
|
|
|
3431
3435
|
if (unit === void 0) {
|
|
3432
3436
|
unit = "second";
|
|
3433
3437
|
}
|
|
3434
|
-
return INCREMENTABLE_UNITS.
|
|
3438
|
+
return INCREMENTABLE_UNITS.indexOf(unit) > -1;
|
|
3435
3439
|
}
|
|
3436
3440
|
var SimpleFormattedRelativeTime = function(props) {
|
|
3437
3441
|
var _a2 = useIntl(), formatRelativeTime2 = _a2.formatRelativeTime, Text = _a2.textComponent;
|
|
@@ -3489,7 +3493,7 @@ var ReactIntl = (function() {
|
|
|
3489
3493
|
var unitDuration = getDurationInSeconds(currentUnit);
|
|
3490
3494
|
currentValue = Math.round(currentValueInSeconds / unitDuration);
|
|
3491
3495
|
}
|
|
3492
|
-
return React6.createElement(SimpleFormattedRelativeTime, __assign({value: currentValue, unit: currentUnit}, otherProps));
|
|
3496
|
+
return React6.createElement(SimpleFormattedRelativeTime, __assign({ value: currentValue, unit: currentUnit }, otherProps));
|
|
3493
3497
|
};
|
|
3494
3498
|
FormattedRelativeTime.displayName = "FormattedRelativeTime";
|
|
3495
3499
|
FormattedRelativeTime.defaultProps = {
|
|
@@ -3499,7 +3503,7 @@ var ReactIntl = (function() {
|
|
|
3499
3503
|
var relative_default = FormattedRelativeTime;
|
|
3500
3504
|
|
|
3501
3505
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/plural.js
|
|
3502
|
-
var React7 = __toModule(
|
|
3506
|
+
var React7 = __toModule(__window.React);
|
|
3503
3507
|
var FormattedPlural = function(props) {
|
|
3504
3508
|
var _a2 = useIntl(), formatPlural2 = _a2.formatPlural, Text = _a2.textComponent;
|
|
3505
3509
|
var value = props.value, other = props.other, children = props.children;
|
|
@@ -3520,7 +3524,7 @@ var ReactIntl = (function() {
|
|
|
3520
3524
|
var plural_default = FormattedPlural;
|
|
3521
3525
|
|
|
3522
3526
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/message.js
|
|
3523
|
-
var React8 = __toModule(
|
|
3527
|
+
var React8 = __toModule(__window.React);
|
|
3524
3528
|
function areEqual(prevProps, nextProps) {
|
|
3525
3529
|
var values = prevProps.values, otherProps = __rest(prevProps, ["values"]);
|
|
3526
3530
|
var nextValues = nextProps.values, nextOtherProps = __rest(nextProps, ["values"]);
|
|
@@ -3530,7 +3534,7 @@ var ReactIntl = (function() {
|
|
|
3530
3534
|
var intl = useIntl();
|
|
3531
3535
|
var formatMessage3 = intl.formatMessage, _a2 = intl.textComponent, Text = _a2 === void 0 ? React8.Fragment : _a2;
|
|
3532
3536
|
var id = props.id, description = props.description, defaultMessage = props.defaultMessage, values = props.values, children = props.children, _b = props.tagName, Component = _b === void 0 ? Text : _b, ignoreTag = props.ignoreTag;
|
|
3533
|
-
var descriptor = {id: id, description: description, defaultMessage: defaultMessage};
|
|
3537
|
+
var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
|
|
3534
3538
|
var nodes = formatMessage3(descriptor, values, {
|
|
3535
3539
|
ignoreTag: ignoreTag
|
|
3536
3540
|
});
|
|
@@ -3548,7 +3552,7 @@ var ReactIntl = (function() {
|
|
|
3548
3552
|
var message_default = MemoizedFormattedMessage;
|
|
3549
3553
|
|
|
3550
3554
|
// bazel-out/darwin-fastbuild/bin/packages/react-intl/lib/src/components/dateTimeRange.js
|
|
3551
|
-
var React9 = __toModule(
|
|
3555
|
+
var React9 = __toModule(__window.React);
|
|
3552
3556
|
var FormattedDateTimeRange = function(props) {
|
|
3553
3557
|
var intl = useIntl();
|
|
3554
3558
|
var from = props.from, to = props.to, children = props.children, formatProps = __rest(props, ["from", "to", "children"]);
|
|
@@ -57,7 +57,7 @@ var INCREMENTABLE_UNITS = [
|
|
|
57
57
|
];
|
|
58
58
|
function canIncrement(unit) {
|
|
59
59
|
if (unit === void 0) { unit = 'second'; }
|
|
60
|
-
return INCREMENTABLE_UNITS.
|
|
60
|
+
return INCREMENTABLE_UNITS.indexOf(unit) > -1;
|
|
61
61
|
}
|
|
62
62
|
var SimpleFormattedRelativeTime = function (props) {
|
|
63
63
|
var _a = useIntl_1.default(), formatRelativeTime = _a.formatRelativeTime, Text = _a.textComponent;
|