react-intl 8.0.11 → 8.1.0
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 -6
- package/package.json +7 -7
- package/react-intl.iife.js +1 -2
- package/src/components/createIntl.d.ts +0 -5
- package/src/components/injectIntl.d.ts +0 -3
- package/src/components/message.d.ts +0 -5
- package/src/components/plural.d.ts +0 -5
- package/src/components/provider.d.ts +0 -5
- package/src/components/relative.d.ts +0 -5
- package/src/types.d.ts +0 -5
package/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import { type NumberFormatOptions } from "@formatjs/ecma402-abstract";
|
|
7
2
|
import { type CustomFormatConfig, type FormatDateOptions, type FormatTimeOptions, type MessageDescriptor } from "@formatjs/intl";
|
|
8
3
|
import * as React from "react";
|
|
@@ -24,7 +19,6 @@ export declare function defineMessages<
|
|
|
24
19
|
U extends Record<K, T> = Record<K, T>
|
|
25
20
|
>(msgs: U): U;
|
|
26
21
|
export declare function defineMessage<T extends MessageDescriptor>(msg: T): T;
|
|
27
|
-
// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
|
|
28
22
|
export declare const FormattedDate: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig<"date"> & {
|
|
29
23
|
value: string | number | Date | undefined;
|
|
30
24
|
children?(formattedDate: string): React.ReactElement | null;
|
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": "8.0
|
|
4
|
+
"version": "8.1.0",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"author": "Eric Ferraiuolo <edf@ericf.me>",
|
|
7
7
|
"type": "module",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
15
15
|
"hoist-non-react-statics": "^3.3.2",
|
|
16
|
-
"tslib": "^2.8.
|
|
17
|
-
"@formatjs/
|
|
18
|
-
"@formatjs/
|
|
19
|
-
"intl
|
|
20
|
-
"
|
|
16
|
+
"tslib": "^2.8.1",
|
|
17
|
+
"@formatjs/icu-messageformat-parser": "3.4.0",
|
|
18
|
+
"@formatjs/ecma402-abstract": "3.1.0",
|
|
19
|
+
"@formatjs/intl": "4.1.0",
|
|
20
|
+
"intl-messageformat": "11.1.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@types/react": "19",
|
|
23
|
+
"@types/react": "^19.2.8",
|
|
24
24
|
"react": "16 || 17 || 18 || 19",
|
|
25
25
|
"typescript": "^5.6.0"
|
|
26
26
|
},
|
package/react-intl.iife.js
CHANGED
|
@@ -5342,7 +5342,6 @@ var ReactIntl = (() => {
|
|
|
5342
5342
|
|
|
5343
5343
|
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/utils.js
|
|
5344
5344
|
var createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
|
|
5345
|
-
var createMemoizedDateTimeFormat = memoize((...args) => new Intl.DateTimeFormat(...args), { strategy: strategies.variadic });
|
|
5346
5345
|
var createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
|
|
5347
5346
|
var createMemoizedLocale = memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });
|
|
5348
5347
|
var createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
|
|
@@ -5417,7 +5416,7 @@ var ReactIntl = (() => {
|
|
|
5417
5416
|
Decimal.set({ toExpPos: 100 });
|
|
5418
5417
|
|
|
5419
5418
|
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/regex.generated.js
|
|
5420
|
-
var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\
|
|
5419
|
+
var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/;
|
|
5421
5420
|
|
|
5422
5421
|
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/format_to_parts.js
|
|
5423
5422
|
var CARET_S_UNICODE_REGEX = new RegExp(`^${S_UNICODE_REGEX.source}`);
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import { type CreateIntlFn } from "@formatjs/intl";
|
|
7
2
|
import * as React from "react";
|
|
8
3
|
import type { IntlConfig, IntlShape } from "../types.js";
|
|
@@ -35,15 +35,12 @@ export type DistributedOmit<
|
|
|
35
35
|
export type WithIntlProps<P> = DistributedOmit<P, keyof WrappedComponentProps> & {
|
|
36
36
|
forwardedRef?: React.Ref<any>;
|
|
37
37
|
};
|
|
38
|
-
// TODO: type hoisted static methods.
|
|
39
|
-
// Non ref forwarding overload
|
|
40
38
|
export default function injectIntl<
|
|
41
39
|
IntlPropName extends string = "intl",
|
|
42
40
|
P extends WrappedComponentProps<IntlPropName> = WrappedComponentProps<any>
|
|
43
41
|
>(WrappedComponent: React.ComponentType<P>, options?: Opts<IntlPropName, false>): React.FC<WithIntlProps<P>> & {
|
|
44
42
|
WrappedComponent: React.ComponentType<P>;
|
|
45
43
|
};
|
|
46
|
-
// Ref forwarding overload.
|
|
47
44
|
export default function injectIntl<
|
|
48
45
|
IntlPropName extends string = "intl",
|
|
49
46
|
P extends WrappedComponentProps<IntlPropName> = WrappedComponentProps<any>,
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import type { FormatXMLElementFn, Options as IntlMessageFormatOptions, PrimitiveType } from "intl-messageformat";
|
|
7
2
|
import * as React from "react";
|
|
8
3
|
import { type MessageDescriptor } from "@formatjs/intl";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import * as React from "react";
|
|
7
2
|
import { type FormatPluralOptions } from "@formatjs/intl";
|
|
8
3
|
interface Props extends FormatPluralOptions {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import { type IntlCache } from "@formatjs/intl";
|
|
7
2
|
import * as React from "react";
|
|
8
3
|
import type { IntlConfig, IntlShape } from "../types.js";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import * as React from "react";
|
|
7
2
|
import { type FormatRelativeTimeOptions } from "@formatjs/intl";
|
|
8
3
|
export interface Props extends FormatRelativeTimeOptions {
|
package/src/types.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015, Yahoo Inc.
|
|
3
|
-
* Copyrights licensed under the New BSD License.
|
|
4
|
-
* See the accompanying LICENSE file for terms.
|
|
5
|
-
*/
|
|
6
1
|
import { type ResolvedIntlConfig as CoreResolvedIntlConfig, type Formatters, type IntlFormatters, type MessageDescriptor } from "@formatjs/intl";
|
|
7
2
|
import { type FormatXMLElementFn, type Options as IntlMessageFormatOptions, type PrimitiveType } from "intl-messageformat";
|
|
8
3
|
import * as React from "react";
|