1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { InjectionToken } from '@angular/core';
|
---|
9 | import { DragRefConfig, Point, DragRef } from '../drag-ref';
|
---|
10 | /** Possible values that can be used to configure the drag start delay. */
|
---|
11 | export declare type DragStartDelay = number | {
|
---|
12 | touch: number;
|
---|
13 | mouse: number;
|
---|
14 | };
|
---|
15 | /** Possible axis along which dragging can be locked. */
|
---|
16 | export declare type DragAxis = 'x' | 'y';
|
---|
17 | /** Function that can be used to constrain the position of a dragged element. */
|
---|
18 | export declare type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;
|
---|
19 | /** Possible orientations for a drop list. */
|
---|
20 | export declare type DropListOrientation = 'horizontal' | 'vertical';
|
---|
21 | /**
|
---|
22 | * Injection token that can be used to configure the
|
---|
23 | * behavior of the drag&drop-related components.
|
---|
24 | */
|
---|
25 | export declare const CDK_DRAG_CONFIG: InjectionToken<DragDropConfig>;
|
---|
26 | /**
|
---|
27 | * Object that can be used to configure the drag
|
---|
28 | * items and drop lists within a module or a component.
|
---|
29 | */
|
---|
30 | export interface DragDropConfig extends Partial<DragRefConfig> {
|
---|
31 | lockAxis?: DragAxis;
|
---|
32 | dragStartDelay?: DragStartDelay;
|
---|
33 | constrainPosition?: DragConstrainPosition;
|
---|
34 | previewClass?: string | string[];
|
---|
35 | boundaryElement?: string;
|
---|
36 | rootElementSelector?: string;
|
---|
37 | draggingDisabled?: boolean;
|
---|
38 | sortingDisabled?: boolean;
|
---|
39 | listAutoScrollDisabled?: boolean;
|
---|
40 | listOrientation?: DropListOrientation;
|
---|
41 | zIndex?: number;
|
---|
42 | previewContainer?: 'global' | 'parent';
|
---|
43 | }
|
---|