react-intl 6.4.1 → 6.4.3
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 +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/src/components/createFormattedComponent.d.ts +0 -1
- package/lib/src/components/dateTimeRange.d.ts +0 -1
- package/lib/src/components/injectIntl.d.ts +4 -1
- package/lib/src/components/injectIntl.js +1 -1
- package/lib/src/components/message.d.ts +1 -2
- package/lib/src/components/plural.d.ts +0 -1
- package/lib/src/components/provider.d.ts +0 -1
- package/lib/src/components/relative.d.ts +0 -1
- package/lib/src/components/useIntl.d.ts +0 -1
- package/lib/src/types.d.ts +0 -1
- package/lib/src/utils.d.ts +0 -1
- package/package.json +9 -9
- package/react-intl.iife.js +663 -663
- package/src/components/createFormattedComponent.d.ts +0 -1
- package/src/components/dateTimeRange.d.ts +0 -1
- package/src/components/injectIntl.d.ts +4 -1
- package/src/components/injectIntl.js +1 -1
- package/src/components/message.d.ts +1 -2
- package/src/components/plural.d.ts +0 -1
- package/src/components/provider.d.ts +0 -1
- package/src/components/relative.d.ts +0 -1
- package/src/components/useIntl.d.ts +0 -1
- package/src/types.d.ts +0 -1
- package/src/utils.d.ts +0 -1
package/index.d.ts
CHANGED
|
@@ -44,4 +44,3 @@ export declare const FormattedTimeParts: React.FC<FormatDateOptions & {
|
|
|
44
44
|
export { FormattedNumberParts, FormattedListParts, } from './src/components/createFormattedComponent';
|
|
45
45
|
export type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
46
46
|
export type { PrimitiveType } from 'intl-messageformat';
|
|
47
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -44,4 +44,3 @@ export declare const FormattedTimeParts: React.FC<FormatDateOptions & {
|
|
|
44
44
|
export { FormattedNumberParts, FormattedListParts, } from './src/components/createFormattedComponent';
|
|
45
45
|
export type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
46
46
|
export type { PrimitiveType } from 'intl-messageformat';
|
|
47
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,6 +2,10 @@ import * as React from 'react';
|
|
|
2
2
|
import { IntlShape } from '../types';
|
|
3
3
|
declare global {
|
|
4
4
|
interface Window {
|
|
5
|
+
/**
|
|
6
|
+
* Set this to `true` prior to mounting to bypass using a globally-exposed context.
|
|
7
|
+
*/
|
|
8
|
+
__REACT_INTL_BYPASS_GLOBAL_CONTEXT__: boolean | undefined;
|
|
5
9
|
__REACT_INTL_CONTEXT__: React.Context<IntlShape> | undefined;
|
|
6
10
|
}
|
|
7
11
|
}
|
|
@@ -33,4 +37,3 @@ export default function injectIntl<IntlPropName extends string = 'intl', P exten
|
|
|
33
37
|
export default function injectIntl<IntlPropName extends string = 'intl', P extends WrappedComponentProps<IntlPropName> = WrappedComponentProps<any>, T extends React.ComponentType<P> = any>(WrappedComponent: React.ComponentType<P>, options?: Opts<IntlPropName, true>): React.ForwardRefExoticComponent<React.PropsWithoutRef<WithIntlProps<React.PropsWithChildren<P>>> & React.RefAttributes<T>> & {
|
|
34
38
|
WrappedComponent: React.ComponentType<P>;
|
|
35
39
|
};
|
|
36
|
-
//# sourceMappingURL=injectIntl.d.ts.map
|
|
@@ -7,7 +7,7 @@ function getDisplayName(Component) {
|
|
|
7
7
|
}
|
|
8
8
|
// This is primarily dealing with packaging systems where multiple copies of react-intl
|
|
9
9
|
// might exist
|
|
10
|
-
var IntlContext = typeof window !== 'undefined'
|
|
10
|
+
var IntlContext = typeof window !== 'undefined' && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__
|
|
11
11
|
? window.__REACT_INTL_CONTEXT__ ||
|
|
12
12
|
(window.__REACT_INTL_CONTEXT__ = React.createContext(null))
|
|
13
13
|
: React.createContext(null);
|
|
@@ -7,6 +7,5 @@ export interface Props<V extends Record<string, any> = Record<string, React.Reac
|
|
|
7
7
|
children?(nodes: React.ReactNode[]): React.ReactElement | null;
|
|
8
8
|
ignoreTag?: IntlMessageFormatOptions['ignoreTag'];
|
|
9
9
|
}
|
|
10
|
-
declare const MemoizedFormattedMessage: React.NamedExoticComponent<Props<Record<string, string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | React.ReactPortal |
|
|
10
|
+
declare const MemoizedFormattedMessage: React.NamedExoticComponent<Props<Record<string, string | number | boolean | Date | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | React.ReactPortal | FormatXMLElementFn<React.ReactNode, React.ReactNode> | null | undefined>>>;
|
|
11
11
|
export default MemoizedFormattedMessage;
|
|
12
|
-
//# sourceMappingURL=message.d.ts.map
|
package/lib/src/types.d.ts
CHANGED
package/lib/src/utils.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ export declare const DEFAULT_INTL_CONFIG: Pick<ResolvedIntlConfig, 'fallbackOnEm
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function assignUniqueKeysToParts(formatXMLElementFn: FormatXMLElementFn<React.ReactNode>): FormatXMLElementFn<React.ReactNode>;
|
|
13
13
|
export declare function shallowEqual<T extends Record<string, unknown> = Record<string, unknown>>(objA?: T, objB?: T): boolean;
|
|
14
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.3",
|
|
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.
|
|
132
|
-
"@formatjs/icu-messageformat-parser": "2.
|
|
133
|
-
"@formatjs/intl": "2.
|
|
134
|
-
"@formatjs/intl-displaynames": "6.
|
|
135
|
-
"@formatjs/intl-listformat": "7.
|
|
131
|
+
"@formatjs/ecma402-abstract": "1.16.0",
|
|
132
|
+
"@formatjs/icu-messageformat-parser": "2.5.0",
|
|
133
|
+
"@formatjs/intl": "2.8.0",
|
|
134
|
+
"@formatjs/intl-displaynames": "6.4.0",
|
|
135
|
+
"@formatjs/intl-listformat": "7.3.0",
|
|
136
136
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
137
137
|
"@types/react": "16 || 17 || 18",
|
|
138
138
|
"hoist-non-react-statics": "^3.3.2",
|
|
139
|
-
"intl-messageformat": "10.
|
|
139
|
+
"intl-messageformat": "10.4.0",
|
|
140
140
|
"tslib": "^2.4.0"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
|
-
"@formatjs/intl-numberformat": "8.
|
|
144
|
-
"@formatjs/intl-relativetimeformat": "11.2.
|
|
143
|
+
"@formatjs/intl-numberformat": "8.6.0",
|
|
144
|
+
"@formatjs/intl-relativetimeformat": "11.2.3"
|
|
145
145
|
},
|
|
146
146
|
"peerDependencies": {
|
|
147
147
|
"react": "^16.6.0 || 17 || 18",
|