devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
284 lines (216 loc) • 11.2 kB
TypeScript
/*!
* devextreme-angular
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
import { TransferState, ElementRef, NgZone, OnDestroy, EventEmitter } from '@angular/core';
import { DragDirection } from 'devextreme/common';
import { DisposingEvent, DragEndEvent, DragMoveEvent, DragStartEvent, InitializedEvent, OptionChangedEvent } from 'devextreme/ui/draggable';
import DxDraggable from 'devextreme/ui/draggable';
import { DxComponent, DxTemplateHost, NestedOptionHost, WatcherHelper } from 'devextreme-angular/core';
import type * as DxDraggableTypes from "devextreme/ui/draggable_types";
import * as i0 from "@angular/core";
import * as i1 from "devextreme-angular/ui/nested";
import * as i2 from "devextreme-angular/ui/draggable/nested";
import * as i3 from "devextreme-angular/core";
/**
* 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(): any | string | undefined;
set boundary(value: any | string | 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(): any | string | undefined;
set container(value: any | string | 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(): DragDirection;
set dragDirection(value: DragDirection);
/**
* Specifies custom markup to be shown instead of the item being dragged.
*/
get dragTemplate(): any;
set dragTemplate(value: any);
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
get elementAttr(): Record<string, any>;
set elementAttr(value: Record<string, 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 | string) | number | string | undefined;
set height(value: (() => number | string) | number | 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 | string) | number | string | undefined;
set width(value: (() => number | string) | number | string | undefined);
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing: EventEmitter<DisposingEvent>;
/**
* A function that is called when a drag gesture is finished.
*/
onDragEnd: EventEmitter<DragEndEvent>;
/**
* A function that is called every time a draggable item is moved.
*/
onDragMove: EventEmitter<DragMoveEvent>;
/**
* A function that is called when a drag gesture is initialized.
*/
onDragStart: EventEmitter<DragStartEvent>;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized: EventEmitter<InitializedEvent>;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged: EventEmitter<OptionChangedEvent>;
/**
* 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<any | string | 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<any | string | 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<DragDirection>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dragTemplateChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
elementAttrChange: EventEmitter<Record<string, 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 | string) | number | 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 | string) | number | 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": { "alias": "autoScroll"; "required": false; }; "boundary": { "alias": "boundary"; "required": false; }; "clone": { "alias": "clone"; "required": false; }; "container": { "alias": "container"; "required": false; }; "cursorOffset": { "alias": "cursorOffset"; "required": false; }; "data": { "alias": "data"; "required": false; }; "dragDirection": { "alias": "dragDirection"; "required": false; }; "dragTemplate": { "alias": "dragTemplate"; "required": false; }; "elementAttr": { "alias": "elementAttr"; "required": false; }; "group": { "alias": "group"; "required": false; }; "handle": { "alias": "handle"; "required": false; }; "height": { "alias": "height"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "scrollSensitivity": { "alias": "scrollSensitivity"; "required": false; }; "scrollSpeed": { "alias": "scrollSpeed"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "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, ["*"], false, never>;
}
export declare class DxDraggableModule {
static ɵfac: i0.ɵɵFactoryDeclaration<DxDraggableModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<DxDraggableModule, [typeof DxDraggableComponent], [typeof i1.DxoCursorOffsetModule, typeof i2.DxoDraggableCursorOffsetModule, typeof i3.DxIntegrationModule, typeof i3.DxTemplateModule], [typeof DxDraggableComponent, typeof i1.DxoCursorOffsetModule, typeof i2.DxoDraggableCursorOffsetModule, typeof i3.DxTemplateModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<DxDraggableModule>;
}
export { DxDraggableTypes };