1 | import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
2 | import { ControlValueAccessor } from '@angular/forms';
|
3 | import * as i0 from "@angular/core";
|
4 |
|
5 |
|
6 |
|
7 | export interface StarTemplateContext {
|
8 | |
9 |
|
10 |
|
11 | fill: number;
|
12 | |
13 |
|
14 |
|
15 | index: number;
|
16 | }
|
17 |
|
18 |
|
19 |
|
20 | export declare class NgbRating implements ControlValueAccessor, OnInit, OnChanges {
|
21 | contexts: StarTemplateContext[];
|
22 | nextRate: number;
|
23 | private _config;
|
24 | private _changeDetectorRef;
|
25 | |
26 |
|
27 |
|
28 | disabled: boolean;
|
29 | |
30 |
|
31 |
|
32 | max: number;
|
33 | |
34 |
|
35 |
|
36 | rate: number;
|
37 | |
38 |
|
39 |
|
40 | readonly: boolean;
|
41 | |
42 |
|
43 |
|
44 | resettable: boolean;
|
45 | |
46 |
|
47 |
|
48 |
|
49 |
|
50 | starTemplate: TemplateRef<StarTemplateContext>;
|
51 | starTemplateFromContent: TemplateRef<StarTemplateContext>;
|
52 | |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | tabindex: string | number;
|
59 | |
60 |
|
61 |
|
62 |
|
63 |
|
64 | ariaValueText(current: number, max: number): string;
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 | hover: EventEmitter<number>;
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | leave: EventEmitter<number>;
|
77 | |
78 |
|
79 |
|
80 |
|
81 |
|
82 | rateChange: EventEmitter<number>;
|
83 | onChange: (_: any) => void;
|
84 | onTouched: () => void;
|
85 | isInteractive(): boolean;
|
86 | enter(value: number): void;
|
87 | handleBlur(): void;
|
88 | handleClick(value: number): void;
|
89 | handleKeyDown(event: KeyboardEvent): void;
|
90 | ngOnChanges(changes: SimpleChanges): void;
|
91 | ngOnInit(): void;
|
92 | registerOnChange(fn: (value: any) => any): void;
|
93 | registerOnTouched(fn: () => any): void;
|
94 | reset(): void;
|
95 | setDisabledState(isDisabled: boolean): void;
|
96 | update(value: number, internalChange?: boolean): void;
|
97 | writeValue(value: any): void;
|
98 | private _updateState;
|
99 | private _updateMax;
|
100 | private _setupContexts;
|
101 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbRating, never>;
|
102 | static ɵcmp: i0.ɵɵComponentDeclaration<NgbRating, "ngb-rating", never, { "disabled": { "alias": "disabled"; "required": false; }; "max": { "alias": "max"; "required": false; }; "rate": { "alias": "rate"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "resettable": { "alias": "resettable"; "required": false; }; "starTemplate": { "alias": "starTemplate"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "ariaValueText": { "alias": "ariaValueText"; "required": false; }; }, { "hover": "hover"; "leave": "leave"; "rateChange": "rateChange"; }, ["starTemplateFromContent"], never, true, never>;
|
103 | }
|