smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
97 lines (96 loc) • 7.35 kB
TypeScript
import { Rating } from './../index';
import { Animation } from './../index';
import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core';
import { BaseElement } from './smart.element';
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
export { Animation, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { Rating } from './../index';
export declare class RatingComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {
constructor(ref: ElementRef<Rating>);
private eventHandlers;
nativeElement: Rating;
/** @description Creates the component on demand.
* @param properties An optional object of properties, which will be added to the template binded ones.
*/
createComponent(properties?: {}): any;
/**
* @description
* The registered callback function called when a change event occurs on the form elements.
*/
_onChange: (value: any) => void;
/**
* @description
* The registered callback function called when a blur event occurs on the form elements.
*/
_onTouched: () => any;
/** @description Gets or sets the animation mode for the component. When this property is set to 'none', all animations are disabled, and transitions will occur instantly without any animated effects. Use this property to enable, disable, or modify the animation behavior as needed. */
get animation(): Animation | string;
set animation(value: Animation | string);
/** @description Prevents any user interaction with the element, making it unresponsive to mouse, keyboard, and touch events such as clicks, focus, or input. The element will appear visually inactive and will not trigger any associated event handlers. */
get disabled(): boolean;
set disabled(value: boolean);
/** @description Gets or sets the unlockKey property, which serves as the credential required to unlock and activate the product’s full functionality. */
get unlockKey(): string;
set unlockKey(value: string);
/** @description Specifies or retrieves the current language setting. This property determines which localized set of messages (defined in the messages property) will be used for display and communication. Use this property to dynamically change the language of the interface by updating it in conjunction with the messages object. */
get locale(): string;
set locale(value: string);
/** @description A function that allows you to customize how messages are formatted before they are returned by the Localization Module. This callback receives the original message and any associated variables, enabling you to adjust the output format, apply additional logic, or support advanced localization requirements. */
get localizeFormatFunction(): any;
set localizeFormatFunction(value: any);
/** @description Specifies the total number of stars to display in the rating component. This value controls how many individual star icons are shown, allowing users to select a rating between 1 and the specified number. */
get max(): number;
set max(value: number);
/** @description Specifies or retrieves an object containing the localized strings used by the element. This property allows you to define text labels, messages, or other UI strings that can be translated based on the user's language or region. It is typically used together with the locale property to display the appropriate translations for different locales. */
get messages(): any;
set messages(value: any);
/** @description Specifies the name attribute of the element, which is used as the key when the form data is submitted. This allows the value of the element to be identified and processed on the server side. */
get name(): string;
set name(value: string);
/** @description Sets or retrieves a value that specifies whether the element's text direction and alignment are configured for right-to-left (RTL) languages, such as Arabic or Hebrew. Enabling this option ensures that the element properly supports locales that use RTL scripts. */
get rightToLeft(): boolean;
set rightToLeft(value: boolean);
/** @description Specifies the theme to be applied. The selected theme controls the visual appearance, including colors, fonts, and styling, of the element. */
get theme(): string;
set theme(value: string);
/** @description When set to true, this property prevents the element from receiving keyboard focus, making it impossible for users to navigate to the element using the Tab key or similar methods. */
get unfocusable(): boolean;
set unfocusable(value: boolean);
/** @description Specifies how many stars should be visually highlighted to indicate the current rating value. This number determines which stars appear filled or active in the rating component. */
get value(): number;
set value(value: number);
/** @description This event is triggered whenever the user adjusts the slider to a new value, either by dragging the handle or using keyboard controls. It fires each time the slider's value is updated, allowing you to respond dynamically to user input and capture the current value in real time.
* @param event. The custom event. Custom event was created with: event.detail( value, oldValue)
* value - A numeric value indicating the scroll position.
* oldValue - A numeric value indicating the previous scroll position.
*/
onChange: EventEmitter<CustomEvent>;
/** @description Retrieve the current value assigned to the rating property, indicating the user's selected rating or the rating score for the item.
* @returns {number}
*/
getValue(): Promise<any>;
getValueSync(): number;
/** @description Assigns or updates the current rating value. This property determines the selected rating level, typically represented by a numeric value (e.g., 1 to 5), and can be used to display the user’s chosen rating or set a default rating programmatically.
* @param {number} value. Sets the value of the rating
*/
setValue(value: number): void;
get isRendered(): boolean;
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
_initialChange: boolean;
get ngValue(): any;
set ngValue(value: any);
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
ngOnChanges(changes: SimpleChanges): void;
/** @description Add event listeners. */
private listen;
/** @description Remove event listeners. */
private unlisten;
static ɵfac: i0.ɵɵFactoryDeclaration<RatingComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RatingComponent, "smart-rating, [smart-rating]", ["smart-rating"], { "animation": "animation"; "disabled": "disabled"; "unlockKey": "unlockKey"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "max": "max"; "messages": "messages"; "name": "name"; "rightToLeft": "rightToLeft"; "theme": "theme"; "unfocusable": "unfocusable"; "value": "value"; }, { "onChange": "onChange"; }, never>;
}