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 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
@@ -26,4 +26,3 @@ export declare function createFormattedComponent<Name extends keyof Formatter>(n
26
26
  children?(val: string): React.ReactElement | null;
27
27
  }>;
28
28
  export {};
29
- //# sourceMappingURL=createFormattedComponent.d.ts.map
@@ -8,4 +8,3 @@ interface Props extends FormatDateOptions {
8
8
  }
9
9
  declare const FormattedDateTimeRange: React.FC<Props>;
10
10
  export default FormattedDateTimeRange;
11
- //# sourceMappingURL=dateTimeRange.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 | Date | FormatXMLElementFn<React.ReactNode, React.ReactNode> | null | undefined>>>;
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
@@ -12,4 +12,3 @@ interface Props extends FormatPluralOptions {
12
12
  }
13
13
  declare const FormattedPlural: React.FC<Props>;
14
14
  export default FormattedPlural;
15
- //# sourceMappingURL=plural.d.ts.map
@@ -32,4 +32,3 @@ export default class IntlProvider extends React.PureComponent<React.PropsWithChi
32
32
  render(): JSX.Element;
33
33
  }
34
34
  export {};
35
- //# sourceMappingURL=provider.d.ts.map
@@ -9,4 +9,3 @@ export interface Props extends FormatRelativeTimeOptions {
9
9
  }
10
10
  declare const FormattedRelativeTime: React.FC<Props>;
11
11
  export default FormattedRelativeTime;
12
- //# sourceMappingURL=relative.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { IntlShape } from '../types';
2
2
  export default function useIntl(): IntlShape;
3
- //# sourceMappingURL=useIntl.d.ts.map
@@ -9,4 +9,3 @@ export interface ResolvedIntlConfig extends CoreResolvedIntlConfig<React.ReactNo
9
9
  export interface IntlShape extends ResolvedIntlConfig, IntlFormatters<React.ReactNode> {
10
10
  formatters: Formatters;
11
11
  }
12
- //# sourceMappingURL=types.d.ts.map
@@ -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.1",
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.14.3",
132
- "@formatjs/icu-messageformat-parser": "2.3.1",
133
- "@formatjs/intl": "2.7.1",
134
- "@formatjs/intl-displaynames": "6.3.1",
135
- "@formatjs/intl-listformat": "7.2.1",
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.3.4",
139
+ "intl-messageformat": "10.4.0",
140
140
  "tslib": "^2.4.0"
141
141
  },
142
142
  "devDependencies": {
143
- "@formatjs/intl-numberformat": "8.4.1",
144
- "@formatjs/intl-relativetimeformat": "11.2.1"
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",