UNPKG

ng-rating-pro

Version:

A powerful and customizable Angular rating component that allows full and half ratings with support for read-only mode, dynamic scaling, and SVG customization.<br/>Perfect for use in reviews, feedback forms, and rating-based applications.

37 lines (36 loc) 1.7 kB
import { EventEmitter, OnInit, QueryList, ViewContainerRef } from '@angular/core'; import { CustomRatingDirective } from './rating-icon/custom-rating.directive'; import * as i0 from "@angular/core"; export declare enum State { Empty = "empty", Half = "half", Full = "full" } export declare class NgRatingProComponent implements OnInit { scale: number; rating: number; allowHalf: boolean; size: number; spacing: number; readonly: boolean; iconName: string; ratingDirectives: QueryList<CustomRatingDirective>; dynamicContainer: ViewContainerRef; ratingChange: EventEmitter<number>; states: State[]; starWidth: number; starHeight: number; containerWidth: number; totalWidth: number; ngOnInit(): void; ngAfterContentInit(): void; private loadDynamicComponent; private getComponent; updateDimensions(): void; getStarPosition(index: number): number; onClick(event: MouseEvent): void; private toggleRating; updateStates(allowHalf: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgRatingProComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgRatingProComponent, "ngRatingPro", never, { "scale": { "alias": "scale"; "required": false; }; "rating": { "alias": "rating"; "required": false; }; "allowHalf": { "alias": "allowHalf"; "required": false; }; "size": { "alias": "size"; "required": false; }; "spacing": { "alias": "spacing"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; }, { "ratingChange": "ratingChange"; }, ["ratingDirectives"], ["half", "full", "empty"], false, never>; }