/** * @file Rating * @description * @author fex */ /// import React from 'react'; import { ClassNamesFn } from '../theme'; interface RatingProps { id?: string; key?: string | number; style?: React.CSSProperties; count: number; half: boolean; char: string; size: number; className?: string; onChange?: (value: any) => void; value: number; containerClass: string; readOnly: boolean; classPrefix: string; disabled?: boolean; allowClear?: boolean; classnames: ClassNamesFn; } export declare class Rating extends React.Component { static defaultProps: { containerClass: string; readOnly: boolean; half: boolean; allowClear: boolean; value: number; count: number; char: string; size: number; }; constructor(props: RatingProps); componentDidMount(): void; componentWillReceiveProps(props: RatingProps): void; getRate(): number; getStars(activeCount?: number): { active: boolean; }[]; mouseOver(event: React.ChangeEvent): void; moreThanHalf(event: any, size: number): boolean; mouseLeave(): void; handleClick(event: React.ChangeEvent): void; renderStars(): any; render(): JSX.Element; } declare const _default: { new (props: (Pick, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps) | Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; new (props: Pick, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps, context: any): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "style" | "key" | "id" | "disabled" | "onChange"> & Partial, "value" | "char" | "size" | "readOnly" | "count" | "half" | "containerClass" | "allowClear">> & Partial> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: typeof Rating; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof Rating; }; export default _default;