///
import moment from 'moment';
import React from 'react';
import { LocaleProps } from 'amis-core';
interface CustomYearsViewProps extends LocaleProps {
viewDate: moment.Moment;
selectedDate: moment.Moment;
subtractTime: (amount: number, type: string, toSelected?: moment.Moment) => () => void;
addTime: (amount: number, type: string, toSelected?: moment.Moment) => () => void;
showView: (view: string) => () => void;
minDate?: moment.Moment;
maxDate?: moment.Moment;
onChange?: () => void;
onClose?: () => void;
onConfirm?: (value: number[], types: string[]) => void;
mobileUI: boolean;
updateOn?: string;
setDate?: (date: string) => void;
renderYear?: (props: any, year: number) => JSX.Element;
updateSelectedDate: (event: React.MouseEvent, close?: boolean) => void;
isValidDate?: (currentDate: moment.Moment, selected?: moment.Moment) => boolean;
}
export declare class CustomYearsView extends React.Component {
state: {
pickerValue: number[];
};
constructor(props: any);
renderYears(year: number): React.DetailedReactHTMLElement, HTMLElement>[];
updateSelectedYear(event: any): void;
renderYear: (props: any, year: number, date?: moment.Moment) => React.JSX.Element;
onConfirm: (value: number[]) => void;
onPickerChange: (value: number[]) => void;
renderYearPicker: () => React.JSX.Element;
alwaysValidDate(): boolean;
render(): React.JSX.Element;
}
declare const _default: {
new (props: Omit & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType;
} & import("hoist-non-react-statics").NonReactStatics & {
ComposedComponent: any;
};
export default _default;