@depup/react-intl 10.1.0-depup.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/LICENSE.md +27 -0
- package/README.md +25 -0
- package/changes.json +5 -0
- package/index.d.ts +50 -0
- package/index.js +36 -0
- package/package.json +160 -0
- package/react-intl.iife.js +8132 -0
- package/server.d.ts +10 -0
- package/server.js +10 -0
- package/src/components/context.d.ts +5 -0
- package/src/components/context.js +5 -0
- package/src/components/createFormattedComponent.d.ts +27 -0
- package/src/components/createFormattedComponent.js +60 -0
- package/src/components/createIntl.d.ts +9 -0
- package/src/components/createIntl.js +56 -0
- package/src/components/dateTimeRange.d.ts +9 -0
- package/src/components/dateTimeRange.js +16 -0
- package/src/components/message.d.ts +11 -0
- package/src/components/message.js +32 -0
- package/src/components/plural.d.ts +14 -0
- package/src/components/plural.js +25 -0
- package/src/components/provider.d.ts +4 -0
- package/src/components/provider.js +57 -0
- package/src/components/relative.d.ts +10 -0
- package/src/components/relative.js +120 -0
- package/src/components/useIntl.d.ts +2 -0
- package/src/components/useIntl.js +9 -0
- package/src/types.d.ts +14 -0
- package/src/types.js +8 -0
- package/src/utils.d.ts +26 -0
- package/src/utils.js +71 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright 2019 Oath Inc.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
|
12
|
+
documentation and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
* Neither the name of the Oath Inc. nor the
|
|
15
|
+
names of its contributors may be used to endorse or promote products
|
|
16
|
+
derived from this software without specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
19
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL Oath INC. BE LIABLE FOR ANY
|
|
22
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
24
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
25
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
27
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @depup/react-intl
|
|
2
|
+
|
|
3
|
+
> Dependency-bumped version of [react-intl](https://www.npmjs.com/package/react-intl)
|
|
4
|
+
|
|
5
|
+
Generated by [DepUp](https://github.com/depup/npm) -- all production
|
|
6
|
+
dependencies bumped to latest versions.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @depup/react-intl
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Field | Value |
|
|
15
|
+
|-------|-------|
|
|
16
|
+
| Original | [react-intl](https://www.npmjs.com/package/react-intl) @ 10.1.0 |
|
|
17
|
+
| Processed | 2026-03-22 |
|
|
18
|
+
| Smoke test | passed |
|
|
19
|
+
| Deps updated | 0 |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/react-intl
|
|
24
|
+
|
|
25
|
+
License inherited from the original package.
|
package/changes.json
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type NumberFormatOptions } from "@formatjs/ecma402-abstract";
|
|
2
|
+
import { type CustomFormatConfig, type FormatDateOptions, type FormatTimeOptions, type MessageDescriptor } from "@formatjs/intl";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { createIntl } from "./src/components/createIntl.js";
|
|
5
|
+
import { Context as IntlContext, Provider as RawIntlProvider } from "./src/components/context.js";
|
|
6
|
+
import FormattedDateTimeRange from "./src/components/dateTimeRange.js";
|
|
7
|
+
import FormattedMessage from "./src/components/message.js";
|
|
8
|
+
import FormattedPlural from "./src/components/plural.js";
|
|
9
|
+
import IntlProvider from "./src/components/provider.js";
|
|
10
|
+
import FormattedRelativeTime from "./src/components/relative.js";
|
|
11
|
+
import useIntl from "./src/components/useIntl.js";
|
|
12
|
+
import { type IntlShape } from "./src/types.js";
|
|
13
|
+
export { createIntlCache, type CustomFormatConfig, type CustomFormats, type FormatDateOptions, type FormatDisplayNameOptions, type FormatListOptions, type FormatNumberOptions, type FormatPluralOptions, type FormatRelativeTimeOptions, type Formatters, type IntlCache, type IntlFormatters, InvalidConfigError, type MessageDescriptor, MessageFormatError, MissingDataError, MissingTranslationError, IntlError as ReactIntlError, IntlErrorCode as ReactIntlErrorCode, UnsupportedFormatterError } from "@formatjs/intl";
|
|
14
|
+
export { type IntlConfig, type IntlShape, type ResolvedIntlConfig } from "./src/types.js";
|
|
15
|
+
export { createIntl, FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, IntlContext, IntlProvider, RawIntlProvider, useIntl };
|
|
16
|
+
export declare function defineMessages<
|
|
17
|
+
K extends keyof any,
|
|
18
|
+
T = MessageDescriptor,
|
|
19
|
+
U extends Record<K, T> = Record<K, T>
|
|
20
|
+
>(msgs: U): U;
|
|
21
|
+
export declare function defineMessage<T extends MessageDescriptor>(msg: T): T;
|
|
22
|
+
export declare const FormattedDate: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig<"date"> & {
|
|
23
|
+
value: string | number | Date | undefined;
|
|
24
|
+
children?(formattedDate: string): React.ReactElement | null;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const FormattedTime: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig<"time"> & {
|
|
27
|
+
value: string | number | Date | undefined;
|
|
28
|
+
children?(formattedTime: string): React.ReactElement | null;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const FormattedNumber: React.FC<Omit<NumberFormatOptions, "localeMatcher"> & CustomFormatConfig<"number"> & {
|
|
31
|
+
value: Parameters<IntlShape["formatNumber"]>[0];
|
|
32
|
+
children?(formattedNumber: string): React.ReactElement | null;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const FormattedList: React.FC<Intl.ListFormatOptions & {
|
|
35
|
+
value: readonly React.ReactNode[];
|
|
36
|
+
}>;
|
|
37
|
+
export declare const FormattedDisplayName: React.FC<Intl.DisplayNamesOptions & {
|
|
38
|
+
value: string;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const FormattedDateParts: React.FC<FormatDateOptions & {
|
|
41
|
+
value: Parameters<Intl.DateTimeFormat["format"]>[0] | string;
|
|
42
|
+
children(val: Intl.DateTimeFormatPart[]): React.ReactElement | null;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const FormattedTimeParts: React.FC<FormatTimeOptions & {
|
|
45
|
+
value: Parameters<Intl.DateTimeFormat["format"]>[0] | string;
|
|
46
|
+
children(val: Intl.DateTimeFormatPart[]): React.ReactElement | null;
|
|
47
|
+
}>;
|
|
48
|
+
export type { MessageFormatElement } from "@formatjs/icu-messageformat-parser";
|
|
49
|
+
export type { PrimitiveType } from "intl-messageformat";
|
|
50
|
+
export { FormattedListParts, FormattedNumberParts } from "./src/components/createFormattedComponent.js";
|
package/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2015, Yahoo Inc.
|
|
4
|
+
* Copyrights licensed under the New BSD License.
|
|
5
|
+
* See the accompanying LICENSE file for terms.
|
|
6
|
+
*/
|
|
7
|
+
import "@formatjs/ecma402-abstract";
|
|
8
|
+
import "@formatjs/intl";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { createFormattedComponent, createFormattedDateTimePartsComponent } from "./src/components/createFormattedComponent.js";
|
|
11
|
+
import { createIntl } from "./src/components/createIntl.js";
|
|
12
|
+
import { Context as IntlContext, Provider as RawIntlProvider } from "./src/components/context.js";
|
|
13
|
+
import FormattedDateTimeRange from "./src/components/dateTimeRange.js";
|
|
14
|
+
import FormattedMessage from "./src/components/message.js";
|
|
15
|
+
import FormattedPlural from "./src/components/plural.js";
|
|
16
|
+
import IntlProvider from "./src/components/provider.js";
|
|
17
|
+
import FormattedRelativeTime from "./src/components/relative.js";
|
|
18
|
+
import useIntl from "./src/components/useIntl.js";
|
|
19
|
+
import "./src/types.js";
|
|
20
|
+
export { createIntlCache, InvalidConfigError, MessageFormatError, MissingDataError, MissingTranslationError, IntlError as ReactIntlError, IntlErrorCode as ReactIntlErrorCode, UnsupportedFormatterError } from "@formatjs/intl";
|
|
21
|
+
export { createIntl, FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, IntlContext, IntlProvider, RawIntlProvider, useIntl };
|
|
22
|
+
export function defineMessages(msgs) {
|
|
23
|
+
return msgs;
|
|
24
|
+
}
|
|
25
|
+
export function defineMessage(msg) {
|
|
26
|
+
return msg;
|
|
27
|
+
}
|
|
28
|
+
// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
|
|
29
|
+
export const FormattedDate = createFormattedComponent("formatDate");
|
|
30
|
+
export const FormattedTime = createFormattedComponent("formatTime");
|
|
31
|
+
export const FormattedNumber = createFormattedComponent("formatNumber");
|
|
32
|
+
export const FormattedList = createFormattedComponent("formatList");
|
|
33
|
+
export const FormattedDisplayName = createFormattedComponent("formatDisplayName");
|
|
34
|
+
export const FormattedDateParts = createFormattedDateTimePartsComponent("formatDate");
|
|
35
|
+
export const FormattedTimeParts = createFormattedDateTimePartsComponent("formatTime");
|
|
36
|
+
export { FormattedListParts, FormattedNumberParts } from "./src/components/createFormattedComponent.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@depup/react-intl",
|
|
3
|
+
"description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations. (with updated dependencies)",
|
|
4
|
+
"version": "10.1.0-depup.0",
|
|
5
|
+
"license": "BSD-3-Clause",
|
|
6
|
+
"author": "Eric Ferraiuolo <edf@ericf.me>",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"types": "index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./index.js",
|
|
12
|
+
"./server": "./server.js"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@formatjs/ecma402-abstract": "3.2.0",
|
|
16
|
+
"intl-messageformat": "11.2.0",
|
|
17
|
+
"@formatjs/icu-messageformat-parser": "3.5.3",
|
|
18
|
+
"@formatjs/intl": "4.1.4"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@types/react": "19",
|
|
22
|
+
"react": "19",
|
|
23
|
+
"typescript": "^5.6.0"
|
|
24
|
+
},
|
|
25
|
+
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
26
|
+
"contributors": [
|
|
27
|
+
"Aarni Koskela <akx@iki.fi>",
|
|
28
|
+
"Alexis Deveria <adeveria@gmail.com>",
|
|
29
|
+
"Andrew McCloud <andrew.mccloud@formsdirect.net>",
|
|
30
|
+
"Antoine <Ivraie@users.noreply.github.com>",
|
|
31
|
+
"Arnaud-Ceccaldi <arnaud.ceccaldi@schibsted.com>",
|
|
32
|
+
"Bryan Richards <brichardssa@gmail.com>",
|
|
33
|
+
"Caridy Patino <caridy@gmail.com>",
|
|
34
|
+
"Charles King <bringking@gmail.com>",
|
|
35
|
+
"Charlie Robbins <charlie.robbins@gmail.com>",
|
|
36
|
+
"Christian Budde Christensen <budde377@gmail.com>",
|
|
37
|
+
"Christian Fredh <christian.fredh@gmail.com>",
|
|
38
|
+
"Christopher Deutsch <cd@cdeutsch.com>",
|
|
39
|
+
"Daniel Kita <t.trax0@gmail.com>",
|
|
40
|
+
"David Christensen <OracPrime@users.noreply.github.com>",
|
|
41
|
+
"David Marland <djmarland@users.noreply.github.com>",
|
|
42
|
+
"Denis Sikuler <progwork@yandex.com>",
|
|
43
|
+
"Dominik Schmidt <evolveeee@gmail.com>",
|
|
44
|
+
"DragonRaider5 <marces.engel@googlemail.com>",
|
|
45
|
+
"dropfen <boris.kotov@gmail.com>",
|
|
46
|
+
"Dylan Kirby <djkirby@users.noreply.github.com>",
|
|
47
|
+
"Elvin Dzhavadov <web.botan@gmail.com>",
|
|
48
|
+
"Eric Baer <me@ericbaer.com>",
|
|
49
|
+
"Eric Ferraiuolo <edf@ericf.me>",
|
|
50
|
+
"Erik J. Sturcke <esturcke@users.noreply.github.com>",
|
|
51
|
+
"Eugie Limpin <eugiellimpin@users.noreply.github.com>",
|
|
52
|
+
"Giovanni Gonzaga <giovanni@buildo.io>",
|
|
53
|
+
"Henry Zhu <hi@henryzoo.com>",
|
|
54
|
+
"Ilya Panasenko <hottdogg2008@gmail.com>",
|
|
55
|
+
"Iswan Jumat <iswan@thinkcube.com>",
|
|
56
|
+
"James Kyle <me@thejameskyle.com>",
|
|
57
|
+
"Jan Dvorak <storyteller@freedombase.net>",
|
|
58
|
+
"Janic Duplessis <janicduplessis@gmail.com>",
|
|
59
|
+
"Jason Mitchell <jason.mitchell.w@gmail.com>",
|
|
60
|
+
"Jeremy Yap <dcsyjlj@nus.edu.sg>",
|
|
61
|
+
"Jeremy Yap <jeremy.yapjl@gmail.com>",
|
|
62
|
+
"Jiayi Hu <steph.jiayi@gmail.com>",
|
|
63
|
+
"Jimmy Jia <tesrin@gmail.com>",
|
|
64
|
+
"Joe Lencioni <joe.lencioni@gmail.com>",
|
|
65
|
+
"Johannes Wüller <johanneswueller@gmail.com>",
|
|
66
|
+
"Jonas Antonelli <jonas.antonelli@gmail.com>",
|
|
67
|
+
"Jose G <josegranafdez@gmail.com>",
|
|
68
|
+
"Juan Ignacio Dopazo <juan@dopazo.me>",
|
|
69
|
+
"Julien Lecomte <julien.lecomte@gmail.com>",
|
|
70
|
+
"Kazuki <dsbnatut@gmail.com>",
|
|
71
|
+
"Kerem Sevencan <ciukerem@gmail.com>",
|
|
72
|
+
"Kipras Melnikovas <sarpixo@gmail.com>",
|
|
73
|
+
"Leo Y. Li <leo@leoyli.com>",
|
|
74
|
+
"Li Zhuoran John <zhuoran666@gmail.com>",
|
|
75
|
+
"Linjie Ding <pyrocat101@users.noreply.github.com>",
|
|
76
|
+
"Long Ho <holevietlong@gmail.com>",
|
|
77
|
+
"Maarten Rijke <maartenrijke@gmail.com>",
|
|
78
|
+
"Marc d'Entremont <cramhead@gmail.com>",
|
|
79
|
+
"Marc Schipperheyn <m.schipperheyn@gmail.com>",
|
|
80
|
+
"Mårten Pettersson <mtnptrsn@gmail.com>",
|
|
81
|
+
"Matt Parrilla <matthew.parrilla@gmail.com>",
|
|
82
|
+
"Matthew Kime <matt@mattki.me>",
|
|
83
|
+
"Matti Korttila <matti.korttila@gmail.com>",
|
|
84
|
+
"Michael Liang <mliang@opentable.com>",
|
|
85
|
+
"Moshe Brevda <mbrevda@gmail.com>",
|
|
86
|
+
"Nicola Molinari <nicola.molinari@commercetools.de>",
|
|
87
|
+
"Osipov Vladimir <zoux.me@gmail.com>",
|
|
88
|
+
"p10ns11y <sathyam.peram@gmail.com>",
|
|
89
|
+
"papasmile <ismail@azizahsolutions.biz>",
|
|
90
|
+
"Patrick Kempff <patrickkempff@gmail.com>",
|
|
91
|
+
"Pieter Joost van de Sande <pj@born2code.net>",
|
|
92
|
+
"PutziSan <putzisan@putzisan.de>",
|
|
93
|
+
"Rifat Nabi <to.rifat@gmail.com>",
|
|
94
|
+
"Rob Richard <robrichard87@gmail.com>",
|
|
95
|
+
"Rob Walker <rob@papertrail.io>",
|
|
96
|
+
"Roderick Hsiao <roderickhsiao@gmail.com>",
|
|
97
|
+
"Rodrigo Silveira <rodrigo@oddshot.tv>",
|
|
98
|
+
"rsamec <roman.samec2@gmail.com>",
|
|
99
|
+
"Rusya44 <rustamkudyashov@gmail.com>",
|
|
100
|
+
"Ryan Meyer <ryan1234@gmail.com>",
|
|
101
|
+
"Ryuichi Okumura <okuryu@okuryu.com>",
|
|
102
|
+
"salagadoola <salagadoola@ymail.com>",
|
|
103
|
+
"Samuel Reed <samuel.trace.reed@gmail.com>",
|
|
104
|
+
"sbertal <sbertal@yahoo-inc.com>",
|
|
105
|
+
"Scott Dickerson <scottsd@us.ibm.com>",
|
|
106
|
+
"Seth Bertalotto <seth@bertalotto.net>",
|
|
107
|
+
"sourabh2k15 <sourab.reddy2k14@gmail.com>",
|
|
108
|
+
"Stefan Maric <me@stefanmaric.com>",
|
|
109
|
+
"Stephen Doyle <32746416+stephendoyle1992@users.noreply.github.com>",
|
|
110
|
+
"swiftfoot <swiftfoot@hotmail.com>",
|
|
111
|
+
"Sylvester Keil <sylvester@keil.or.at>",
|
|
112
|
+
"telaoumatenyanis <telaoumatenyanis@outlook.fr>",
|
|
113
|
+
"Thibaud <thibaud@jnuine.com>",
|
|
114
|
+
"Timothy Blumberg <tblumberg39@gmail.com>",
|
|
115
|
+
"Tomas Roos <ptomasroos@gmail.com>",
|
|
116
|
+
"Tuan Iswan (TIJ) <info@iswanjumat.com>",
|
|
117
|
+
"Tyler Benziger <tabenziger@gmail.com>",
|
|
118
|
+
"Ville Immonen <ville.immonen@iki.fi>",
|
|
119
|
+
"Vincent Ricard <ghostd@users.noreply.github.com>",
|
|
120
|
+
"Yamagishi Kazutoshi <ykzts@desire.sh>",
|
|
121
|
+
"Yang Su <yang@quip.com>",
|
|
122
|
+
"zouxuoz <zouxuoz@gmail.com>"
|
|
123
|
+
],
|
|
124
|
+
"gitHead": "773d6ebf881357f6e4c2dd7e8984b1bd0f69b4ca",
|
|
125
|
+
"homepage": "https://formatjs.github.io/docs/react-intl",
|
|
126
|
+
"keywords": [
|
|
127
|
+
"react-intl",
|
|
128
|
+
"depup",
|
|
129
|
+
"updated-dependencies",
|
|
130
|
+
"security",
|
|
131
|
+
"latest",
|
|
132
|
+
"patched",
|
|
133
|
+
"format",
|
|
134
|
+
"formatting",
|
|
135
|
+
"globalization",
|
|
136
|
+
"i18n",
|
|
137
|
+
"internationalization",
|
|
138
|
+
"intl",
|
|
139
|
+
"locale",
|
|
140
|
+
"localization",
|
|
141
|
+
"react",
|
|
142
|
+
"reactjs",
|
|
143
|
+
"translate",
|
|
144
|
+
"translation"
|
|
145
|
+
],
|
|
146
|
+
"peerDependenciesMeta": {
|
|
147
|
+
"typescript": {
|
|
148
|
+
"optional": true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"repository": "git@github.com:formatjs/formatjs.git",
|
|
152
|
+
"depup": {
|
|
153
|
+
"changes": {},
|
|
154
|
+
"depsUpdated": 0,
|
|
155
|
+
"originalPackage": "react-intl",
|
|
156
|
+
"originalVersion": "10.1.0",
|
|
157
|
+
"processedAt": "2026-03-22T00:39:12.277Z",
|
|
158
|
+
"smokeTest": "passed"
|
|
159
|
+
}
|
|
160
|
+
}
|