devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
270 lines (202 loc) • 10.2 kB
TypeScript
import { TransferState } from '@angular/platform-browser';
import { ElementRef, NgZone, OnDestroy, EventEmitter } from '@angular/core';
import { UserDefinedElement } from 'devextreme/core/element';
import DxDraggable from 'devextreme/ui/draggable';
import { DxComponent, DxTemplateHost, NestedOptionHost, WatcherHelper } from 'devextreme-angular/core';
import * as i0 from "@angular/core";
import * as i1 from "devextreme-angular/ui/nested";
import * as i2 from "devextreme-angular/core";
import * as i3 from "@angular/platform-browser";
/**
* Draggable is a user interface utility that allows UI component elements to be dragged and dropped.
*/
export declare class DxDraggableComponent extends DxComponent implements OnDestroy {
instance: DxDraggable;
/**
* Enables automatic scrolling while dragging an item beyond the viewport.
*/
get autoScroll(): boolean;
set autoScroll(value: boolean);
/**
* Specifies a DOM element that limits the dragging area.
*/
get boundary(): string | UserDefinedElement | undefined;
set boundary(value: string | UserDefinedElement | undefined);
/**
* Allows a user to drag clones of items instead of actual items.
*/
get clone(): boolean;
set clone(value: boolean);
/**
* Specifies a custom container in which the draggable item should be rendered.
*/
get container(): string | UserDefinedElement | undefined;
set container(value: string | UserDefinedElement | undefined);
/**
* Specifies the cursor offset from the dragged item.
*/
get cursorOffset(): string | {
x?: number;
y?: number;
};
set cursorOffset(value: string | {
x?: number;
y?: number;
});
/**
* A container for custom data.
*/
get data(): any | undefined;
set data(value: any | undefined);
/**
* Specifies the directions in which an item can be dragged.
*/
get dragDirection(): string;
set dragDirection(value: string);
/**
* Specifies custom markup to be shown instead of the item being dragged.
*/
get dragTemplate(): any | undefined;
set dragTemplate(value: any | undefined);
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
get elementAttr(): any;
set elementAttr(value: any);
/**
* Allows you to group several UI components, so that users can drag and drop items between them.
*/
get group(): string | undefined;
set group(value: string | undefined);
/**
* Specifies a CSS selector (ID or class) that should act as the drag handle(s) for the item(s).
*/
get handle(): string;
set handle(value: string);
/**
* Specifies the UI component's height.
*/
get height(): number | Function | string | undefined;
set height(value: number | Function | string | undefined);
/**
* Switches the UI component to a right-to-left representation.
*/
get rtlEnabled(): boolean;
set rtlEnabled(value: boolean);
/**
* Specifies the distance in pixels from the edge of viewport at which scrolling should start. Applies only if autoScroll is true.
*/
get scrollSensitivity(): number;
set scrollSensitivity(value: number);
/**
* Specifies the scrolling speed when dragging an item beyond the viewport. Applies only if autoScroll is true.
*/
get scrollSpeed(): number;
set scrollSpeed(value: number);
/**
* Specifies the UI component's width.
*/
get width(): number | Function | string | undefined;
set width(value: number | Function | string | undefined);
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing: EventEmitter<any>;
/**
* A function that is called when drag gesture is finished.
*/
onDragEnd: EventEmitter<any>;
/**
* A function that is called every time a draggable item is moved.
*/
onDragMove: EventEmitter<any>;
/**
* A function that is called when the drag gesture is initialized.
*/
onDragStart: EventEmitter<any>;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized: EventEmitter<any>;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
autoScrollChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
boundaryChange: EventEmitter<string | UserDefinedElement | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
cloneChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
containerChange: EventEmitter<string | UserDefinedElement | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
cursorOffsetChange: EventEmitter<string | {
x?: number;
y?: number;
}>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dataChange: EventEmitter<any | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dragDirectionChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dragTemplateChange: EventEmitter<any | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
elementAttrChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
groupChange: EventEmitter<string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
handleChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
heightChange: EventEmitter<number | Function | string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
rtlEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
scrollSensitivityChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
scrollSpeedChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
widthChange: EventEmitter<number | Function | string | undefined>;
constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
protected _createInstance(element: any, options: any): DxDraggable;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DxDraggableComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DxDraggableComponent, "dx-draggable", never, { "autoScroll": "autoScroll"; "boundary": "boundary"; "clone": "clone"; "container": "container"; "cursorOffset": "cursorOffset"; "data": "data"; "dragDirection": "dragDirection"; "dragTemplate": "dragTemplate"; "elementAttr": "elementAttr"; "group": "group"; "handle": "handle"; "height": "height"; "rtlEnabled": "rtlEnabled"; "scrollSensitivity": "scrollSensitivity"; "scrollSpeed": "scrollSpeed"; "width": "width"; }, { "onDisposing": "onDisposing"; "onDragEnd": "onDragEnd"; "onDragMove": "onDragMove"; "onDragStart": "onDragStart"; "onInitialized": "onInitialized"; "onOptionChanged": "onOptionChanged"; "autoScrollChange": "autoScrollChange"; "boundaryChange": "boundaryChange"; "cloneChange": "cloneChange"; "containerChange": "containerChange"; "cursorOffsetChange": "cursorOffsetChange"; "dataChange": "dataChange"; "dragDirectionChange": "dragDirectionChange"; "dragTemplateChange": "dragTemplateChange"; "elementAttrChange": "elementAttrChange"; "groupChange": "groupChange"; "handleChange": "handleChange"; "heightChange": "heightChange"; "rtlEnabledChange": "rtlEnabledChange"; "scrollSensitivityChange": "scrollSensitivityChange"; "scrollSpeedChange": "scrollSpeedChange"; "widthChange": "widthChange"; }, never, ["*"]>;
}
export declare class DxDraggableModule {
static ɵfac: i0.ɵɵFactoryDeclaration<DxDraggableModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<DxDraggableModule, [typeof DxDraggableComponent], [typeof i1.DxoCursorOffsetModule, typeof i2.DxIntegrationModule, typeof i2.DxTemplateModule, typeof i3.BrowserTransferStateModule], [typeof DxDraggableComponent, typeof i1.DxoCursorOffsetModule, typeof i2.DxTemplateModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<DxDraggableModule>;
}