smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
76 lines (75 loc) • 5 kB
TypeScript
import { Sortable } from './../index';
import { Animation, SortableDragMode, SortableHandlePosition, SortableHandleVisibility, Orientation } from './../index';
import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core';
import { BaseElement } from './smart.element';
import * as i0 from "@angular/core";
export { Animation, SortableDragMode, SortableHandlePosition, SortableHandleVisibility, Orientation, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { Sortable } from './../index';
export declare class SortableComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges {
constructor(ref: ElementRef<Sortable>);
private eventHandlers;
nativeElement: Sortable;
/** @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 Sets or gets the animation mode. Animation is disabled when the property is set to 'none' */
get animation(): Animation | string;
set animation(value: Animation | string);
/** @description Enables or disables sorting. */
get disabled(): boolean;
set disabled(value: boolean);
/** @description Sets or gets the way a sortable item can be dragged - by dragging the item itself ('item') or by dragging a handle that appears next to the item ('handle'). */
get dragMode(): SortableDragMode | string;
set dragMode(value: SortableDragMode | string);
/** @description Sets or gets the the position of the drag handle relative to its respective sortable item. Applicable only when dragMode is 'handle'. */
get handlePosition(): SortableHandlePosition | string;
set handlePosition(value: SortableHandlePosition | string);
/** @description Sets or gets whether a sortable item's drag handle is always visible or is shown when the item is hovered. Applicable only when dragMode is 'handle'. */
get handleVisibility(): SortableHandleVisibility | string;
set handleVisibility(value: SortableHandleVisibility | string);
/** @description Sets or gets a selector to determine the sortable items by. By default, sortable items are all children of the smart-sortable custom element. */
get items(): string | null;
set items(value: string | null);
/** @description Sets or gets the license which unlocks the product. */
get license(): string;
set license(value: string);
/** @description Sets or gets the language. Used in conjunction with the property messages. */
get locale(): string;
set locale(value: string);
/** @description Callback, related to localization module. */
get localizeFormatFunction(): any;
set localizeFormatFunction(value: any);
/** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */
get messages(): any;
set messages(value: any);
/** @description Sets or gets the direction sortable items are stacked and can be dragged. */
get mode(): Orientation | string;
set mode(value: Orientation | string);
/** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */
get rightToLeft(): boolean;
set rightToLeft(value: boolean);
/** @description This event is triggered when sortable items have been reordered.
* @param event. The custom event. */
onDragEnd: EventEmitter<CustomEvent>;
/** @description Moves a sortable item from one index to another.
* @param {number} fromIndex?. The original index of the item.
* @param {number} toIndex?. The index to move the item to.
*/
move(fromIndex?: number, toIndex?: number): void;
/** @description Re-evaluates the items that can be sorted. Useful after items have been added to or removed from the custom element.
*/
updateItems(): void;
get isRendered(): boolean;
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
/** @description Add event listeners. */
private listen;
/** @description Remove event listeners. */
private unlisten;
static ɵfac: i0.ɵɵFactoryDeclaration<SortableComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SortableComponent, "smart-sortable, [smart-sortable]", ["smart-sortable"], { "animation": "animation"; "disabled": "disabled"; "dragMode": "dragMode"; "handlePosition": "handlePosition"; "handleVisibility": "handleVisibility"; "items": "items"; "license": "license"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "messages": "messages"; "mode": "mode"; "rightToLeft": "rightToLeft"; }, { "onDragEnd": "onDragEnd"; }, never>;
}