UNPKG

1.77 kBTypeScriptView Raw
1import * as React from 'react';
2import { ValidateMessages } from 'rc-field-form/lib/interface';
3import { ModalLocale } from '../modal/locale';
4import { TransferLocale as TransferLocaleForEmpty } from '../empty';
5import { PaginationLocale } from '../pagination/Pagination';
6import { TableLocale } from '../table/interface';
7import { PopconfirmLocale } from '../popconfirm';
8import { UploadLocale } from '../upload/interface';
9import { TransferLocale } from '../transfer';
10import { PickerLocale as DatePickerLocale } from '../date-picker/generatePicker';
11export declare const ANT_MARK = "internalMark";
12export interface Locale {
13 locale: string;
14 Pagination?: PaginationLocale;
15 DatePicker?: DatePickerLocale;
16 TimePicker?: Record<string, any>;
17 Calendar?: Record<string, any>;
18 Table?: TableLocale;
19 Modal?: ModalLocale;
20 Popconfirm?: PopconfirmLocale;
21 Transfer?: Partial<TransferLocale>;
22 Select?: Record<string, any>;
23 Upload?: UploadLocale;
24 Empty?: TransferLocaleForEmpty;
25 global?: Record<string, any>;
26 PageHeader?: {
27 back: string;
28 };
29 Icon?: Record<string, any>;
30 Text?: Record<string, any>;
31 Form?: {
32 optional?: string;
33 defaultValidateMessages: ValidateMessages;
34 };
35 Image?: {
36 preview: string;
37 };
38}
39export interface LocaleProviderProps {
40 locale: Locale;
41 children?: React.ReactNode;
42 _ANT_MARK__?: string;
43}
44export default class LocaleProvider extends React.Component<LocaleProviderProps, any> {
45 static defaultProps: {
46 locale: {};
47 };
48 constructor(props: LocaleProviderProps);
49 componentDidMount(): void;
50 componentDidUpdate(prevProps: LocaleProviderProps): void;
51 componentWillUnmount(): void;
52 render(): JSX.Element;
53}