1 | import { NumberFormatOptions } from '@formatjs/ecma402-abstract';
|
2 | import { CustomFormatConfig, FormatDateOptions, MessageDescriptor } from '@formatjs/intl';
|
3 | import * as React from 'react';
|
4 | import { createIntl } from './src/components/createIntl';
|
5 | import FormattedDateTimeRange from './src/components/dateTimeRange';
|
6 | import injectIntl, { Context as IntlContext, Provider as RawIntlProvider, WithIntlProps, WrappedComponentProps } from './src/components/injectIntl';
|
7 | import FormattedMessage from './src/components/message';
|
8 | import FormattedPlural from './src/components/plural';
|
9 | import IntlProvider from './src/components/provider';
|
10 | import FormattedRelativeTime from './src/components/relative';
|
11 | import useIntl from './src/components/useIntl';
|
12 | export { createIntlCache, CustomFormatConfig, CustomFormats, FormatDateOptions, FormatDisplayNameOptions, FormatListOptions, FormatNumberOptions, FormatPluralOptions, FormatRelativeTimeOptions, Formatters, IntlCache, IntlFormatters, InvalidConfigError, MessageDescriptor, MessageFormatError, MissingDataError, MissingTranslationError, IntlError as ReactIntlError, IntlErrorCode as ReactIntlErrorCode, UnsupportedFormatterError, } from '@formatjs/intl';
|
13 | export { IntlConfig, IntlShape, ResolvedIntlConfig } from './src/types';
|
14 | export { createIntl, FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, injectIntl, IntlContext, IntlProvider, RawIntlProvider, useIntl, WithIntlProps, WrappedComponentProps, };
|
15 | export declare function defineMessages<K extends keyof any, T = MessageDescriptor, U extends Record<K, T> = Record<K, T>>(msgs: U): U;
|
16 | export declare function defineMessage<T extends MessageDescriptor>(msg: T): T;
|
17 | export declare const FormattedDate: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig & {
|
18 | value: string | number | Date | undefined;
|
19 | children?(formattedDate: string): React.ReactElement | null;
|
20 | }>;
|
21 | export declare const FormattedTime: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig & {
|
22 | value: string | number | Date | undefined;
|
23 | children?(formattedTime: string): React.ReactElement | null;
|
24 | }>;
|
25 | export declare const FormattedNumber: React.FC<Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'> & {
|
26 | value: number;
|
27 | children?(formattedNumber: string): React.ReactElement | null;
|
28 | }>;
|
29 | export declare const FormattedList: React.FC<Intl.ListFormatOptions & {
|
30 | value: readonly React.ReactNode[];
|
31 | }>;
|
32 | export declare const FormattedDisplayName: React.FC<Intl.DisplayNamesOptions & {
|
33 | value: string;
|
34 | }>;
|
35 | export declare const FormattedDateParts: React.FC<FormatDateOptions & {
|
36 | value: Parameters<Intl.DateTimeFormat['format']>[0] | string;
|
37 | children(val: Intl.DateTimeFormatPart[]): React.ReactElement | null;
|
38 | }>;
|
39 | export declare const FormattedTimeParts: React.FC<FormatDateOptions & {
|
40 | value: Parameters<Intl.DateTimeFormat['format']>[0] | string;
|
41 | children(val: Intl.DateTimeFormatPart[]): React.ReactElement | null;
|
42 | }>;
|
43 | export type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
44 | export type { PrimitiveType } from 'intl-messageformat';
|
45 | export { FormattedListParts, FormattedNumberParts, } from './src/components/createFormattedComponent';
|