UNPKG

vue-devui

Version:

DevUI components based on Vite and Vue3

112 lines (111 loc) 4.63 kB
import { DragDropService } from './drag-drop.service'; import { DirectiveBinding } from 'vue'; import { NgDirectiveBase } from './directive-base'; export type DropScrollEdgeDistancePercent = number; export type DropScrollSpeed = number; export type DropScrollSpeedFunction = (x: DropScrollEdgeDistancePercent) => DropScrollSpeed; export type DropScrollDirection = 'h' | 'v'; export declare enum DropScrollOrientation { forward = 0, backward = 1 } export interface DropScrollAreaOffset { left?: number; right?: number; top?: number; bottom?: number; widthOffset?: number; heightOffset?: number; } export type DropScrollTriggerEdge = 'left' | 'right' | 'top' | 'bottom'; export declare const DropScrollEnhanceTimingFunctionGroup: { default: (x: number) => number; }; export interface IDropScrollEnhancedBinding { minSpeed?: DropScrollSpeed; maxSpeed?: DropScrollSpeed; responseEdgeWidth?: string | ((total: number) => string); speedFn?: DropScrollSpeedFunction; direction?: DropScrollDirection; viewOffset?: { forward?: DropScrollAreaOffset; backward?: DropScrollAreaOffset; }; dropScrollScope?: string | Array<string>; backSpaceDroppable?: boolean; } export interface IDropScrollEnhancedListener { } export declare class DropScrollEnhancedDirective extends NgDirectiveBase<IDropScrollEnhancedBinding, IDropScrollEnhancedListener> { static INSTANCE_KEY: string; minSpeed: DropScrollSpeed; maxSpeed: DropScrollSpeed; responseEdgeWidth: string | ((total: number) => string); speedFn: DropScrollSpeedFunction; direction: DropScrollDirection; viewOffset?: { forward?: DropScrollAreaOffset; backward?: DropScrollAreaOffset; }; dropScrollScope?: string | Array<string>; backSpaceDroppable: boolean; private forwardScrollArea?; private backwardScrollArea?; private subscription; private forwardScrollFn?; private backwardScrollFn?; private lastScrollTime?; private animationFrameId?; document: Document; el: { nativeElement: any; }; private dragDropService; constructor(el: HTMLElement, dragDropService: DragDropService); ngAfterViewInit(): void; ngOnDestroy(): void; createScrollFn(direction: DropScrollDirection, orientation: DropScrollOrientation, speedFn: DropScrollSpeedFunction): ((event: DragEvent) => void) | undefined; delegateDropEvent(event: DragEvent): void; getCriticalEdge(direction: DropScrollDirection, orientation: DropScrollOrientation): DropScrollTriggerEdge; getSecondEdge(direction: DropScrollDirection): DropScrollTriggerEdge; createScrollArea(direction: DropScrollDirection, orientation: DropScrollOrientation): HTMLDivElement; setAreaSize(area: HTMLElement, direction: DropScrollDirection, orientation: DropScrollOrientation): void; setAreaStyleLayout(area: HTMLElement, direction: DropScrollDirection, orientation: DropScrollOrientation): void; getRelatedPosition(target: HTMLElement, relatedTarget: HTMLElement, edge: DropScrollTriggerEdge, offsetValue?: number): string; resizeArea(): void; toggleScrollToOneEnd(scrollElement: any, toggleElement: HTMLElement, direction: DropScrollDirection, orientation: DropScrollOrientation): void; cleanLastScrollTime(): void; toggleActiveClass(target: HTMLElement, active: boolean): void; allowScroll(): boolean; } declare const _default: { mounted(el: HTMLElement & { [props: string]: any; }, binding: DirectiveBinding<IDropScrollEnhancedBinding & IDropScrollEnhancedListener>, vNode: any): void; updated(el: HTMLElement & { [props: string]: any; }, binding: DirectiveBinding<IDropScrollEnhancedBinding & IDropScrollEnhancedListener>): void; beforeUnmount(el: HTMLElement & { [props: string]: any; }): void; }; export default _default; export declare class DropScrollEnhancedSideDirective extends DropScrollEnhancedDirective { inputNameMap?: { [key: string]: string; } | undefined; sideDirection: DropScrollDirection; direction: DropScrollDirection; ngOnInit(): void; } export declare const DropScrollEnhancedSide: { mounted(el: HTMLElement & { [props: string]: any; }, binding: DirectiveBinding<IDropScrollEnhancedBinding & IDropScrollEnhancedListener>, vNode: any): void; updated(el: HTMLElement & { [props: string]: any; }, binding: DirectiveBinding<IDropScrollEnhancedBinding & IDropScrollEnhancedListener>): void; beforeUnmount(el: HTMLElement & { [props: string]: any; }): void; };