react-intl 5.20.8 → 5.20.9
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/lib/src/components/message.d.ts +1 -1
- package/lib/src/components/message.d.ts.map +1 -1
- package/lib/src/components/message.js +1 -4
- package/package.json +1 -1
- package/react-intl.iife.js +1 -4
- package/src/components/message.d.ts +1 -1
- package/src/components/message.d.ts.map +1 -1
- package/src/components/message.js +1 -4
|
@@ -4,7 +4,7 @@ import { MessageDescriptor } from '@formatjs/intl';
|
|
|
4
4
|
export interface Props<V extends Record<string, any> = Record<string, React.ReactNode>> extends MessageDescriptor {
|
|
5
5
|
values?: V;
|
|
6
6
|
tagName?: React.ElementType<any>;
|
|
7
|
-
children?(
|
|
7
|
+
children?(nodes: React.ReactNodeArray): React.ReactElement | null;
|
|
8
8
|
ignoreTag?: IntlMessageFormatOptions['ignoreTag'];
|
|
9
9
|
}
|
|
10
10
|
declare const MemoizedFormattedMessage: React.NamedExoticComponent<Props<Record<string, React.ReactNode>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,oBAAoB,CAAA;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAIhD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAA;IACV,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IAChC,QAAQ,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,oBAAoB,CAAA;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAIhD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAA;IACV,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IAChC,QAAQ,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACjE,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAA;CAClD;AAwCD,QAAA,MAAM,wBAAwB,oEAAgD,CAAA;AAG9E,eAAe,wBAAwB,CAAA"}
|
|
@@ -21,11 +21,8 @@ function FormattedMessage(props) {
|
|
|
21
21
|
var nodes = formatMessage(descriptor, values, {
|
|
22
22
|
ignoreTag: ignoreTag,
|
|
23
23
|
});
|
|
24
|
-
if (!Array.isArray(nodes)) {
|
|
25
|
-
nodes = [nodes];
|
|
26
|
-
}
|
|
27
24
|
if (typeof children === 'function') {
|
|
28
|
-
return children(nodes);
|
|
25
|
+
return children(Array.isArray(nodes) ? nodes : [nodes]);
|
|
29
26
|
}
|
|
30
27
|
if (Component) {
|
|
31
28
|
return React.createElement(Component, null, React.Children.toArray(nodes));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
|
-
"version": "5.20.
|
|
3
|
+
"version": "5.20.9",
|
|
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",
|
package/react-intl.iife.js
CHANGED
|
@@ -3534,11 +3534,8 @@ var ReactIntl = (function() {
|
|
|
3534
3534
|
var nodes = formatMessage3(descriptor, values, {
|
|
3535
3535
|
ignoreTag: ignoreTag
|
|
3536
3536
|
});
|
|
3537
|
-
if (!Array.isArray(nodes)) {
|
|
3538
|
-
nodes = [nodes];
|
|
3539
|
-
}
|
|
3540
3537
|
if (typeof children === "function") {
|
|
3541
|
-
return children(nodes);
|
|
3538
|
+
return children(Array.isArray(nodes) ? nodes : [nodes]);
|
|
3542
3539
|
}
|
|
3543
3540
|
if (Component) {
|
|
3544
3541
|
return React8.createElement(Component, null, React8.Children.toArray(nodes));
|
|
@@ -4,7 +4,7 @@ import { MessageDescriptor } from '@formatjs/intl';
|
|
|
4
4
|
export interface Props<V extends Record<string, any> = Record<string, React.ReactNode>> extends MessageDescriptor {
|
|
5
5
|
values?: V;
|
|
6
6
|
tagName?: React.ElementType<any>;
|
|
7
|
-
children?(
|
|
7
|
+
children?(nodes: React.ReactNodeArray): React.ReactElement | null;
|
|
8
8
|
ignoreTag?: IntlMessageFormatOptions['ignoreTag'];
|
|
9
9
|
}
|
|
10
10
|
declare const MemoizedFormattedMessage: React.NamedExoticComponent<Props<Record<string, React.ReactNode>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,oBAAoB,CAAA;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAIhD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAA;IACV,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IAChC,QAAQ,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/message.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,oBAAoB,CAAA;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAIhD,MAAM,WAAW,KAAK,CACpB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAC/D,SAAQ,iBAAiB;IACzB,MAAM,CAAC,EAAE,CAAC,CAAA;IACV,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IAChC,QAAQ,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACjE,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAA;CAClD;AAwCD,QAAA,MAAM,wBAAwB,oEAAgD,CAAA;AAG9E,eAAe,wBAAwB,CAAA"}
|
|
@@ -23,11 +23,8 @@ function FormattedMessage(props) {
|
|
|
23
23
|
var nodes = formatMessage(descriptor, values, {
|
|
24
24
|
ignoreTag: ignoreTag,
|
|
25
25
|
});
|
|
26
|
-
if (!Array.isArray(nodes)) {
|
|
27
|
-
nodes = [nodes];
|
|
28
|
-
}
|
|
29
26
|
if (typeof children === 'function') {
|
|
30
|
-
return children(nodes);
|
|
27
|
+
return children(Array.isArray(nodes) ? nodes : [nodes]);
|
|
31
28
|
}
|
|
32
29
|
if (Component) {
|
|
33
30
|
return React.createElement(Component, null, React.Children.toArray(nodes));
|