react-intl 5.15.8 → 5.16.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 +1 -1
- package/index.d.ts.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/src/components/provider.d.ts +5 -7
- package/lib/src/components/provider.d.ts.map +1 -1
- package/lib/src/types.d.ts +5 -3
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/utils.d.ts +2 -2
- package/lib/src/utils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/provider.d.ts +5 -7
- package/src/components/provider.d.ts.map +1 -1
- package/src/types.d.ts +5 -3
- package/src/types.d.ts.map +1 -1
- package/src/utils.d.ts +2 -2
- package/src/utils.d.ts.map +1 -1
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { MessageDescriptor, CustomFormatConfig, FormatDateOptions } from '@forma
|
|
|
3
3
|
import { IntlListFormatOptions } from '@formatjs/intl-listformat';
|
|
4
4
|
import { DisplayNamesOptions } from '@formatjs/intl-displaynames';
|
|
5
5
|
import { DateTimeFormatOptions, NumberFormatOptions } from '@formatjs/ecma402-abstract';
|
|
6
|
-
export { IntlConfig, IntlShape } from './src/types';
|
|
6
|
+
export { IntlConfig, ResolvedIntlConfig, IntlShape } from './src/types';
|
|
7
7
|
export { createIntlCache, MessageDescriptor, IntlCache, Formatters, IntlFormatters, FormatDisplayNameOptions, FormatListOptions, FormatPluralOptions, FormatRelativeTimeOptions, FormatNumberOptions, FormatDateOptions, CustomFormatConfig, CustomFormats, UnsupportedFormatterError, InvalidConfigError, MissingDataError, MessageFormatError, MissingTranslationError, IntlErrorCode as ReactIntlErrorCode, IntlError as ReactIntlError, } from '@formatjs/intl';
|
|
8
8
|
export declare function defineMessages<K extends keyof any, T = MessageDescriptor, U extends Record<K, T> = Record<K, T>>(msgs: U): U;
|
|
9
9
|
export declare function defineMessage<T>(msg: T): T;
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;AACrE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,IAAI,kBAAkB,EACnC,SAAS,IAAI,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3
|
import { IntlListFormatOptions } from '@formatjs/intl-listformat';
|
|
4
4
|
import { DisplayNamesOptions } from '@formatjs/intl-displaynames';
|
|
5
5
|
import { DateTimeFormatOptions, NumberFormatOptions } from '@formatjs/ecma402-abstract';
|
|
6
|
-
export { IntlConfig, IntlShape } from './src/types';
|
|
6
|
+
export { IntlConfig, ResolvedIntlConfig, IntlShape } from './src/types';
|
|
7
7
|
export { createIntlCache, MessageDescriptor, IntlCache, Formatters, IntlFormatters, FormatDisplayNameOptions, FormatListOptions, FormatPluralOptions, FormatRelativeTimeOptions, FormatNumberOptions, FormatDateOptions, CustomFormatConfig, CustomFormats, UnsupportedFormatterError, InvalidConfigError, MissingDataError, MessageFormatError, MissingTranslationError, IntlErrorCode as ReactIntlErrorCode, IntlError as ReactIntlError, } from '@formatjs/intl';
|
|
8
8
|
export declare function defineMessages<K extends keyof any, T = MessageDescriptor, U extends Record<K, T> = Record<K, T>>(msgs: U): U;
|
|
9
9
|
export declare function defineMessage<T>(msg: T): T;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,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AQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAA;IAC5D,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CACpE,CACoD,CAAA;AAEvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAA;AAC9E,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,gCAAgC,CAAA;AAChF,YAAY,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DEFAULT_INTL_CONFIG } from '../utils';
|
|
3
2
|
import { IntlConfig, IntlShape } from '../types';
|
|
4
3
|
import { IntlCache, CreateIntlFn } from '@formatjs/intl';
|
|
5
4
|
interface State {
|
|
@@ -16,21 +15,20 @@ interface State {
|
|
|
16
15
|
* This is important since creating intl is
|
|
17
16
|
* very expensive
|
|
18
17
|
*/
|
|
19
|
-
prevConfig:
|
|
18
|
+
prevConfig: IntlConfig;
|
|
20
19
|
}
|
|
21
|
-
export declare type OptionalIntlConfig = Omit<IntlConfig, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
|
|
22
20
|
/**
|
|
23
21
|
* Create intl object
|
|
24
22
|
* @param config intl config
|
|
25
23
|
* @param cache cache for formatter instances to prevent memory leak
|
|
26
24
|
*/
|
|
27
|
-
export declare const createIntl: CreateIntlFn<React.ReactNode,
|
|
28
|
-
export default class IntlProvider extends React.PureComponent<React.PropsWithChildren<
|
|
25
|
+
export declare const createIntl: CreateIntlFn<React.ReactNode, IntlConfig, IntlShape>;
|
|
26
|
+
export default class IntlProvider extends React.PureComponent<React.PropsWithChildren<IntlConfig>, State> {
|
|
29
27
|
static displayName: string;
|
|
30
|
-
static defaultProps: Pick<
|
|
28
|
+
static defaultProps: Pick<import("../types").ResolvedIntlConfig, "timeZone" | "formats" | "messages" | "defaultLocale" | "defaultFormats" | "onError" | "textComponent">;
|
|
31
29
|
private cache;
|
|
32
30
|
state: State;
|
|
33
|
-
static getDerivedStateFromProps(props:
|
|
31
|
+
static getDerivedStateFromProps(props: IntlConfig, { prevConfig, cache }: State): Partial<State> | null;
|
|
34
32
|
render(): JSX.Element;
|
|
35
33
|
}
|
|
36
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAA;AAC9C,OAAO,EAEL,SAAS,EAET,YAAY,EAEb,MAAM,gBAAgB,CAAA;AAQvB,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;OAIG;IACH,UAAU,EAAE,UAAU,CAAA;CACvB;AAiED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CACnC,KAAK,CAAC,SAAS,EACf,UAAU,EACV,SAAS,CAkCV,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAG3D,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,EACnC,KAAK,CACN;IACC,MAAM,CAAC,WAAW,SAAiB;IACnC,MAAM,CAAC,YAAY,sJAAsB;IACzC,OAAO,CAAC,KAAK,CAA+B;IAC5C,KAAK,EAAE,KAAK,CAIX;IAED,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,UAAU,EACjB,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,KAAK,GACzB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAWxB,MAAM,IAAI,GAAG,CAAC,OAAO;CAItB"}
|
package/lib/src/types.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { ResolvedIntlConfig as CoreResolvedIntlConfig, IntlFormatters, Formatters } from '@formatjs/intl';
|
|
3
|
+
import { DEFAULT_INTL_CONFIG } from './utils';
|
|
4
|
+
export declare type IntlConfig = Omit<ResolvedIntlConfig, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
|
|
5
|
+
export interface ResolvedIntlConfig extends CoreResolvedIntlConfig<React.ReactNode> {
|
|
4
6
|
textComponent?: React.ComponentType | keyof React.ReactHTML;
|
|
5
7
|
wrapRichTextChunksInFragment?: boolean;
|
|
6
8
|
}
|
|
7
|
-
export interface IntlShape extends
|
|
9
|
+
export interface IntlShape extends ResolvedIntlConfig, IntlFormatters<React.ReactNode> {
|
|
8
10
|
formatters: Formatters;
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,kBAAkB,IAAI,sBAAsB,EAC5C,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAC3C,oBAAY,UAAU,GAAG,IAAI,CAC3B,kBAAkB,EAClB,MAAM,OAAO,mBAAmB,CACjC,GACC,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErC,MAAM,WAAW,kBACf,SAAQ,sBAAsB,CAAC,KAAK,CAAC,SAAS,CAAC;IAC/C,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,MAAM,KAAK,CAAC,SAAS,CAAA;IAC3D,4BAA4B,CAAC,EAAE,OAAO,CAAA;CACvC;AAED,MAAM,WAAW,SACf,SAAQ,kBAAkB,EACxB,cAAc,CAAC,KAAK,CAAC,SAAS,CAAC;IACjC,UAAU,EAAE,UAAU,CAAA;CACvB"}
|
package/lib/src/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResolvedIntlConfig } from './types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { FormatXMLElementFn } from 'intl-messageformat';
|
|
4
4
|
export declare function invariantIntlContext(intl?: any): asserts intl;
|
|
5
|
-
export declare const DEFAULT_INTL_CONFIG: Pick<
|
|
5
|
+
export declare const DEFAULT_INTL_CONFIG: Pick<ResolvedIntlConfig, 'formats' | 'messages' | 'timeZone' | 'textComponent' | 'defaultLocale' | 'defaultFormats' | 'onError'>;
|
|
6
6
|
/**
|
|
7
7
|
* Takes a `formatXMLElementFn`, and composes it in function, which passes
|
|
8
8
|
* argument `parts` through, assigning unique key to each part, to prevent
|
package/lib/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAA;AAKrD,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAM7D;AAED,eAAO,MAAM,mBAAmB,EAAE,IAAI,CACpC,kBAAkB,EAChB,SAAS,GACT,UAAU,GACV,UAAU,GACV,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,SAAS,CAIZ,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,kBAAkB,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,GACtD,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,CAKrC;AAED,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,WA6BnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.0",
|
|
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",
|
|
@@ -129,13 +129,13 @@
|
|
|
129
129
|
"sideEffects": false,
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@formatjs/ecma402-abstract": "1.6.5",
|
|
132
|
-
"@formatjs/icu-messageformat-parser": "1.1.
|
|
133
|
-
"@formatjs/intl": "1.
|
|
132
|
+
"@formatjs/icu-messageformat-parser": "1.1.6",
|
|
133
|
+
"@formatjs/intl": "1.10.0",
|
|
134
134
|
"@formatjs/intl-displaynames": "4.0.13",
|
|
135
135
|
"@formatjs/intl-listformat": "5.0.14",
|
|
136
136
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
137
137
|
"hoist-non-react-statics": "^3.3.2",
|
|
138
|
-
"intl-messageformat": "9.6.
|
|
138
|
+
"intl-messageformat": "9.6.8",
|
|
139
139
|
"tslib": "^2.1.0"
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DEFAULT_INTL_CONFIG } from '../utils';
|
|
3
2
|
import { IntlConfig, IntlShape } from '../types';
|
|
4
3
|
import { IntlCache, CreateIntlFn } from '@formatjs/intl';
|
|
5
4
|
interface State {
|
|
@@ -16,21 +15,20 @@ interface State {
|
|
|
16
15
|
* This is important since creating intl is
|
|
17
16
|
* very expensive
|
|
18
17
|
*/
|
|
19
|
-
prevConfig:
|
|
18
|
+
prevConfig: IntlConfig;
|
|
20
19
|
}
|
|
21
|
-
export declare type OptionalIntlConfig = Omit<IntlConfig, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
|
|
22
20
|
/**
|
|
23
21
|
* Create intl object
|
|
24
22
|
* @param config intl config
|
|
25
23
|
* @param cache cache for formatter instances to prevent memory leak
|
|
26
24
|
*/
|
|
27
|
-
export declare const createIntl: CreateIntlFn<React.ReactNode,
|
|
28
|
-
export default class IntlProvider extends React.PureComponent<React.PropsWithChildren<
|
|
25
|
+
export declare const createIntl: CreateIntlFn<React.ReactNode, IntlConfig, IntlShape>;
|
|
26
|
+
export default class IntlProvider extends React.PureComponent<React.PropsWithChildren<IntlConfig>, State> {
|
|
29
27
|
static displayName: string;
|
|
30
|
-
static defaultProps: Pick<
|
|
28
|
+
static defaultProps: Pick<import("../types").ResolvedIntlConfig, "timeZone" | "formats" | "messages" | "defaultLocale" | "defaultFormats" | "onError" | "textComponent">;
|
|
31
29
|
private cache;
|
|
32
30
|
state: State;
|
|
33
|
-
static getDerivedStateFromProps(props:
|
|
31
|
+
static getDerivedStateFromProps(props: IntlConfig, { prevConfig, cache }: State): Partial<State> | null;
|
|
34
32
|
render(): JSX.Element;
|
|
35
33
|
}
|
|
36
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-intl/src/components/provider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAA;AAC9C,OAAO,EAEL,SAAS,EAET,YAAY,EAEb,MAAM,gBAAgB,CAAA;AAQvB,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;OAIG;IACH,UAAU,EAAE,UAAU,CAAA;CACvB;AAiED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CACnC,KAAK,CAAC,SAAS,EACf,UAAU,EACV,SAAS,CAkCV,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAG3D,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,EACnC,KAAK,CACN;IACC,MAAM,CAAC,WAAW,SAAiB;IACnC,MAAM,CAAC,YAAY,sJAAsB;IACzC,OAAO,CAAC,KAAK,CAA+B;IAC5C,KAAK,EAAE,KAAK,CAIX;IAED,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,UAAU,EACjB,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,KAAK,GACzB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI;IAWxB,MAAM,IAAI,GAAG,CAAC,OAAO;CAItB"}
|
package/src/types.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { ResolvedIntlConfig as CoreResolvedIntlConfig, IntlFormatters, Formatters } from '@formatjs/intl';
|
|
3
|
+
import { DEFAULT_INTL_CONFIG } from './utils';
|
|
4
|
+
export declare type IntlConfig = Omit<ResolvedIntlConfig, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
|
|
5
|
+
export interface ResolvedIntlConfig extends CoreResolvedIntlConfig<React.ReactNode> {
|
|
4
6
|
textComponent?: React.ComponentType | keyof React.ReactHTML;
|
|
5
7
|
wrapRichTextChunksInFragment?: boolean;
|
|
6
8
|
}
|
|
7
|
-
export interface IntlShape extends
|
|
9
|
+
export interface IntlShape extends ResolvedIntlConfig, IntlFormatters<React.ReactNode> {
|
|
8
10
|
formatters: Formatters;
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=types.d.ts.map
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/src/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/src/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,kBAAkB,IAAI,sBAAsB,EAC5C,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAC3C,oBAAY,UAAU,GAAG,IAAI,CAC3B,kBAAkB,EAClB,MAAM,OAAO,mBAAmB,CACjC,GACC,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErC,MAAM,WAAW,kBACf,SAAQ,sBAAsB,CAAC,KAAK,CAAC,SAAS,CAAC;IAC/C,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,MAAM,KAAK,CAAC,SAAS,CAAA;IAC3D,4BAA4B,CAAC,EAAE,OAAO,CAAA;CACvC;AAED,MAAM,WAAW,SACf,SAAQ,kBAAkB,EACxB,cAAc,CAAC,KAAK,CAAC,SAAS,CAAC;IACjC,UAAU,EAAE,UAAU,CAAA;CACvB"}
|
package/src/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResolvedIntlConfig } from './types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { FormatXMLElementFn } from 'intl-messageformat';
|
|
4
4
|
export declare function invariantIntlContext(intl?: any): asserts intl;
|
|
5
|
-
export declare const DEFAULT_INTL_CONFIG: Pick<
|
|
5
|
+
export declare const DEFAULT_INTL_CONFIG: Pick<ResolvedIntlConfig, 'formats' | 'messages' | 'timeZone' | 'textComponent' | 'defaultLocale' | 'defaultFormats' | 'onError'>;
|
|
6
6
|
/**
|
|
7
7
|
* Takes a `formatXMLElementFn`, and composes it in function, which passes
|
|
8
8
|
* argument `parts` through, assigning unique key to each part, to prevent
|
package/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAA;AAKrD,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAM7D;AAED,eAAO,MAAM,mBAAmB,EAAE,IAAI,CACpC,kBAAkB,EAChB,SAAS,GACT,UAAU,GACV,UAAU,GACV,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,SAAS,CAIZ,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,kBAAkB,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,GACtD,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,CAKrC;AAED,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,WA6BnB"}
|