UNPKG

alife-rating-star

Version:

Angular simple yet powerful library to show rating star which uses Google Material Icons

43 lines (42 loc) 1.3 kB
import { OnInit, OnChanges, DoCheck, EventEmitter, SimpleChanges } from '@angular/core'; import RatingOption from './rating.options'; export declare class AlifeRatingStarComponent implements OnInit, OnChanges, DoCheck { options: RatingOption; rating: number; oldOption: RatingOption; onRatingChanged: EventEmitter<{}>; ratingChange: EventEmitter<number>; ratingOption: RatingOption; ratings: any[]; constructor(); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * It will check if any update in the options value and update the view accordingly */ ngDoCheck(): void; /** * To draw the stars */ drawStars(): void; /** * Prepare the options. * It will override the default value if value is provided */ prepareOption(): void; /** * To validate the starts, It will mark the start if it is on or off based on rating * @param rating */ validateStars(rating: any): void; /** * To set temporary rating * @param rating */ setMouseOverRating(rating: any): void; /** * It will change the rating and emit onRatingChanged event also * @param rating */ setRating(rating: any): void; }