react-intl 7.1.8 → 7.1.10
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.
|
@@ -29,7 +29,10 @@ var formatMessage = function (config, formatters, descriptor, rawValues) {
|
|
|
29
29
|
formatters,
|
|
30
30
|
descriptor,
|
|
31
31
|
values], rest, false));
|
|
32
|
-
|
|
32
|
+
if (Array.isArray(chunks)) {
|
|
33
|
+
return toKeyedReactNodeArray(chunks);
|
|
34
|
+
}
|
|
35
|
+
return chunks;
|
|
33
36
|
};
|
|
34
37
|
/**
|
|
35
38
|
* Create intl object
|
|
@@ -22,7 +22,7 @@ function FormattedMessage(props) {
|
|
|
22
22
|
ignoreTag: ignoreTag,
|
|
23
23
|
});
|
|
24
24
|
if (typeof children === 'function') {
|
|
25
|
-
return children(nodes);
|
|
25
|
+
return children(Array.isArray(nodes) ? nodes : [nodes]);
|
|
26
26
|
}
|
|
27
27
|
if (Component) {
|
|
28
28
|
return React.createElement(Component, null, nodes);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
3
|
"description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",
|
|
4
|
-
"version": "7.1.
|
|
4
|
+
"version": "7.1.10",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"author": "Eric Ferraiuolo <edf@ericf.me>",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"intl-messageformat": "10.7.16",
|
|
15
15
|
"@formatjs/ecma402-abstract": "2.3.4",
|
|
16
16
|
"@formatjs/icu-messageformat-parser": "2.11.2",
|
|
17
|
-
"@formatjs/intl": "3.1.
|
|
17
|
+
"@formatjs/intl": "3.1.6"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "16 || 17 || 18 || 19",
|
|
21
|
-
"typescript": "5.
|
|
21
|
+
"typescript": "^5.6.0"
|
|
22
22
|
},
|
|
23
23
|
"browserslist": [
|
|
24
24
|
"ie 11"
|
package/react-intl.iife.js
CHANGED
|
@@ -4557,7 +4557,10 @@ var ReactIntl = (() => {
|
|
|
4557
4557
|
values,
|
|
4558
4558
|
...rest
|
|
4559
4559
|
);
|
|
4560
|
-
|
|
4560
|
+
if (Array.isArray(chunks)) {
|
|
4561
|
+
return toKeyedReactNodeArray(chunks);
|
|
4562
|
+
}
|
|
4563
|
+
return chunks;
|
|
4561
4564
|
};
|
|
4562
4565
|
var createIntl2 = (_a2, cache) => {
|
|
4563
4566
|
var _b = _a2, { defaultRichTextElements: rawDefaultRichTextElements } = _b, config = __objRest(_b, ["defaultRichTextElements"]);
|
|
@@ -4630,7 +4633,7 @@ var ReactIntl = (() => {
|
|
|
4630
4633
|
ignoreTag
|
|
4631
4634
|
});
|
|
4632
4635
|
if (typeof children === "function") {
|
|
4633
|
-
return children(nodes);
|
|
4636
|
+
return children(Array.isArray(nodes) ? nodes : [nodes]);
|
|
4634
4637
|
}
|
|
4635
4638
|
if (Component) {
|
|
4636
4639
|
return React6.createElement(Component, null, nodes);
|
|
@@ -32,7 +32,10 @@ var formatMessage = function (config, formatters, descriptor, rawValues) {
|
|
|
32
32
|
formatters,
|
|
33
33
|
descriptor,
|
|
34
34
|
values], rest, false));
|
|
35
|
-
|
|
35
|
+
if (Array.isArray(chunks)) {
|
|
36
|
+
return (0, utils_1.toKeyedReactNodeArray)(chunks);
|
|
37
|
+
}
|
|
38
|
+
return chunks;
|
|
36
39
|
};
|
|
37
40
|
/**
|
|
38
41
|
* Create intl object
|
|
@@ -24,7 +24,7 @@ function FormattedMessage(props) {
|
|
|
24
24
|
ignoreTag: ignoreTag,
|
|
25
25
|
});
|
|
26
26
|
if (typeof children === 'function') {
|
|
27
|
-
return children(nodes);
|
|
27
|
+
return children(Array.isArray(nodes) ? nodes : [nodes]);
|
|
28
28
|
}
|
|
29
29
|
if (Component) {
|
|
30
30
|
return React.createElement(Component, null, nodes);
|