fastlion-amis
Version:
一种MIS页面生成工具
181 lines (180 loc) • 8.71 kB
TypeScript
/// <reference types="hoist-non-react-statics" />
import TimeView from 'react-datetime/src/TimeView';
import moment from 'moment';
import React from 'react';
import { LocaleProps } from '../../locale';
import { ClassNamesFn } from '../../theme';
interface State {
daypart: any;
counters: Array<string>;
[propName: string]: any;
}
interface CustomTimeViewProps {
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;
timeFormat: string;
classnames: ClassNamesFn;
setTime: (type: string, value: any) => void;
onClose?: () => void;
onConfirm?: (value: number[], types: string[]) => void;
useMobileUI: boolean;
showToolbar?: boolean;
onChange?: (value: any) => void;
}
export declare class CustomTimeView extends TimeView {
props: CustomTimeViewProps & LocaleProps;
onStartClicking: any;
disableContextMenu: any;
updateMilli: any;
renderHeader: any;
pad: any;
state: State;
timeConstraints: any;
padValues: {
hours: number;
minutes: number;
seconds: number;
milliseconds: number;
};
setState: (arg0: any) => () => any;
calculateState: (props: CustomTimeViewProps) => () => any;
static defaultProps: {
showToolbar: boolean;
};
componentWillReceiveProps(nextProps: CustomTimeViewProps): void;
renderDayPart: () => JSX.Element;
getCounterValue: (type: string) => number;
renderCounter: (type: string) => JSX.Element | null;
onConfirm: (value: (number | string)[]) => void;
getDayPartOptions: () => {
text: any;
value: string;
}[];
onPickerChange: (value: (number | string)[], index: number) => void;
renderTimeViewPicker: () => JSX.Element;
render(): JSX.Element;
}
declare const _default: {
new (props: (Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}) | Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>): {
render(): JSX.Element;
context: any;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, keyof LocaleProps> & {
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<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}> & Readonly<{
children?: React.ReactNode;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
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<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, context: any): {
render(): JSX.Element;
context: any;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, keyof LocaleProps> & {
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<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}> & Readonly<{
children?: React.ReactNode;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
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<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, keyof LocaleProps> & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context<string>;
ComposedComponent: React.ComponentType<any>;
} & import("hoist-non-react-statics").NonReactStatics<any, {}> & {
ComposedComponent: any;
};
export default _default;