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
|
@@ -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
|
|
@@ -10,7 +10,7 @@ function getDisplayName(Component) {
|
|
|
10
10
|
}
|
|
11
11
|
// This is primarily dealing with packaging systems where multiple copies of react-intl
|
|
12
12
|
// might exist
|
|
13
|
-
var IntlContext = typeof window !== 'undefined'
|
|
13
|
+
var IntlContext = typeof window !== 'undefined' && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__
|
|
14
14
|
? window.__REACT_INTL_CONTEXT__ ||
|
|
15
15
|
(window.__REACT_INTL_CONTEXT__ = React.createContext(null))
|
|
16
16
|
: 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/src/types.d.ts
CHANGED
package/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
|