@progress/kendo-angular-utils 17.0.0-develop.20 → 17.0.0-develop.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/drag-and-drop/dragtarget-container.directive.d.ts +1 -1
- package/drag-and-drop/dragtarget.directive.d.ts +1 -1
- package/drag-and-drop/droptarget-container.directive.d.ts +1 -1
- package/drag-and-drop/hint.component.d.ts +1 -1
- package/drag-and-drop/models/drag-axis.d.ts +1 -1
- package/drag-and-drop/models/drag-mode.d.ts +1 -1
- package/drag-and-drop/models/functions.d.ts +2 -2
- package/{esm2020 → esm2022}/drag-and-drop/drag-state.service.mjs +28 -24
- package/{esm2020 → esm2022}/drag-and-drop/draghandle.directive.mjs +5 -4
- package/{esm2020 → esm2022}/drag-and-drop/dragtarget-container.directive.mjs +90 -76
- package/{esm2020 → esm2022}/drag-and-drop/dragtarget.directive.mjs +90 -76
- package/{esm2020 → esm2022}/drag-and-drop/droptarget-container.directive.mjs +34 -30
- package/{esm2020 → esm2022}/drag-and-drop/droptarget.directive.mjs +23 -19
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/drag-event.mjs +25 -5
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/dragready-event.mjs +16 -0
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/end-event.mjs +20 -4
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/press-event.mjs +20 -4
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/release-event.mjs +20 -4
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/start-event.mjs +21 -5
- package/{esm2020 → esm2022}/drag-and-drop/events/drop-target-event.mjs +28 -4
- package/{esm2020 → esm2022}/drag-and-drop/hint.component.mjs +10 -5
- package/{esm2020 → esm2022}/drag-and-drop.module.mjs +4 -4
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/utils.module.mjs +4 -4
- package/{fesm2020 → fesm2022}/progress-kendo-angular-utils.mjs +441 -271
- package/package.json +11 -17
- package/fesm2015/progress-kendo-angular-utils.mjs +0 -2036
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/index.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/events/index.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/autoscroll-options.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/coordinates.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drag-axis.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drag-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/functions.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/hint-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/util.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-utils.mjs +0 -0
|
@@ -161,5 +161,5 @@ export declare class DragTargetContainerDirective implements AfterViewInit {
|
|
|
161
161
|
private calculatePosition;
|
|
162
162
|
private getStylesPerElement;
|
|
163
163
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragTargetContainerDirective, never>;
|
|
164
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragTargetContainerDirective, "[kendoDragTargetContainer]", ["kendoDragTargetContainer"], { "hint": "hint"; "dragTargetFilter": "dragTargetFilter"; "dragHandle": "dragHandle"; "dragDelay": "dragDelay"; "threshold": "threshold"; "dragTargetId": "dragTargetId"; "dragData": "dragData"; "dragDisabled": "dragDisabled"; "mode": "mode"; }, { "onDragReady": "onDragReady"; "onPress": "onPress"; "onDragStart": "onDragStart"; "onDrag": "onDrag"; "onRelease": "onRelease"; "onDragEnd": "onDragEnd"; }, never, never, true, never>;
|
|
164
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragTargetContainerDirective, "[kendoDragTargetContainer]", ["kendoDragTargetContainer"], { "hint": { "alias": "hint"; "required": false; }; "dragTargetFilter": { "alias": "dragTargetFilter"; "required": false; }; "dragHandle": { "alias": "dragHandle"; "required": false; }; "dragDelay": { "alias": "dragDelay"; "required": false; }; "threshold": { "alias": "threshold"; "required": false; }; "dragTargetId": { "alias": "dragTargetId"; "required": false; }; "dragData": { "alias": "dragData"; "required": false; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; }, { "onDragReady": "onDragReady"; "onPress": "onPress"; "onDragStart": "onDragStart"; "onDrag": "onDrag"; "onRelease": "onRelease"; "onDragEnd": "onDragEnd"; }, never, never, true, never>;
|
|
165
165
|
}
|
|
@@ -130,5 +130,5 @@ export declare class DragTargetDirective implements OnInit, AfterContentInit, On
|
|
|
130
130
|
private calculatePosition;
|
|
131
131
|
private getStylesPerElement;
|
|
132
132
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragTargetDirective, never>;
|
|
133
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragTargetDirective, "[kendoDragTarget]", ["kendoDragTarget"], { "hint": "hint"; "threshold": "threshold"; "autoScroll": "autoScroll"; "dragTargetId": "dragTargetId"; "dragDelay": "dragDelay"; "restrictByAxis": "restrictByAxis"; "mode": "mode"; "dragData": "dragData"; }, { "onPress": "onPress"; "onDragStart": "onDragStart"; "onDrag": "onDrag"; "onDragReady": "onDragReady"; "onRelease": "onRelease"; "onDragEnd": "onDragEnd"; }, ["dragHandles"], never, true, never>;
|
|
133
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragTargetDirective, "[kendoDragTarget]", ["kendoDragTarget"], { "hint": { "alias": "hint"; "required": false; }; "threshold": { "alias": "threshold"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "dragTargetId": { "alias": "dragTargetId"; "required": false; }; "dragDelay": { "alias": "dragDelay"; "required": false; }; "restrictByAxis": { "alias": "restrictByAxis"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "dragData": { "alias": "dragData"; "required": false; }; }, { "onPress": "onPress"; "onDragStart": "onDragStart"; "onDrag": "onDrag"; "onDragReady": "onDragReady"; "onRelease": "onRelease"; "onDragEnd": "onDragEnd"; }, ["dragHandles"], never, true, never>;
|
|
134
134
|
}
|
|
@@ -84,5 +84,5 @@ export declare class DropTargetContainerDirective implements AfterViewInit {
|
|
|
84
84
|
private getDropIndex;
|
|
85
85
|
private clearPreviousTargets;
|
|
86
86
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropTargetContainerDirective, never>;
|
|
87
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetContainerDirective, "[kendoDropTargetContainer]", ["kendoDropTargetContainer"], { "dropTargetFilter": "dropTargetFilter"; "dropDisabled": "dropDisabled"; }, { "onDragEnter": "onDragEnter"; "onDragOver": "onDragOver"; "onDragLeave": "onDragLeave"; "onDrop": "onDrop"; }, never, never, true, never>;
|
|
87
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetContainerDirective, "[kendoDropTargetContainer]", ["kendoDropTargetContainer"], { "dropTargetFilter": { "alias": "dropTargetFilter"; "required": false; }; "dropDisabled": { "alias": "dropDisabled"; "required": false; }; }, { "onDragEnter": "onDragEnter"; "onDragOver": "onDragOver"; "onDragLeave": "onDragLeave"; "onDrop": "onDrop"; }, never, never, true, never>;
|
|
88
88
|
}
|
|
@@ -16,5 +16,5 @@ export declare class HintComponent {
|
|
|
16
16
|
pointerEvents: string;
|
|
17
17
|
constructor(element: ElementRef);
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<HintComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "kendo-draghint", never, { "template": "template"; "directive": "directive"; "targetIndex": "targetIndex"; "contextData": "contextData"; }, {}, never, never, true, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "kendo-draghint", never, { "template": { "alias": "template"; "required": false; }; "directive": { "alias": "directive"; "required": false; }; "targetIndex": { "alias": "targetIndex"; "required": false; }; "contextData": { "alias": "contextData"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
20
|
}
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
* It returns the custom data that will be available in the events of the respective [`DropTarget`]({% slug api_utils_droptargetdirective %}) or [`DropTargetContainer`]({% slug api_utils_droptargetcontainerdirective %}) directives upon interaction.
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type DragTargetDataFn = (args: DragTargetDataArgs) => any;
|
|
12
12
|
/**
|
|
13
13
|
* Represents the callback that is used by the `dragTargetId` property of the [`DragTargetContainer`]({% slug api_utils_dragtargetcontainerdirective %}) directive.
|
|
14
14
|
*
|
|
15
15
|
* It returns a custom identifier that will be available in the events of the respective directive upon its interaction with a valid DropTarget.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type DragTargetIdFn = (args: DragTargetIdArgs) => any;
|
|
18
18
|
/**
|
|
19
19
|
* Represents the callback arguments used by the `dragData` property.
|
|
20
20
|
*/
|
|
@@ -11,29 +11,33 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export class DragStateService {
|
|
13
13
|
constructor() {
|
|
14
|
-
this.dragTarget = null;
|
|
15
|
-
this.dropTarget = null;
|
|
16
|
-
this.dragTargets = [];
|
|
17
|
-
this.dropTargets = [];
|
|
18
|
-
this.pressed = false;
|
|
19
|
-
this.ignoreMouse = false;
|
|
20
|
-
this.autoScroll = true;
|
|
21
|
-
this.isScrolling = false;
|
|
22
|
-
this.scrollableParent = null;
|
|
23
|
-
this.autoScrollDirection = { horizontal: true, vertical: true };
|
|
24
|
-
this.initialClientOffset = { x: 0, y: 0 };
|
|
25
|
-
this.clientOffset = { x: 0, y: 0 };
|
|
26
|
-
this.initialScrollOffset = { x: 0, y: 0 };
|
|
27
|
-
this.scrollOffset = { x: 0, y: 0 };
|
|
28
|
-
this.offset = { x: 0, y: 0 };
|
|
29
|
-
this.pageOffset = { x: 0, y: 0 };
|
|
30
|
-
this.velocity = { x: 0, y: 0 };
|
|
31
|
-
this.dragIndex = null;
|
|
32
|
-
this.dropIndex = null;
|
|
33
|
-
this.callbacks = {};
|
|
34
|
-
this.scrollInterval = null;
|
|
35
14
|
this.setCallbacks();
|
|
36
15
|
}
|
|
16
|
+
dragTarget = null;
|
|
17
|
+
dropTarget = null;
|
|
18
|
+
dragTargets = [];
|
|
19
|
+
dropTargets = [];
|
|
20
|
+
pressed = false;
|
|
21
|
+
ignoreMouse = false;
|
|
22
|
+
autoScroll = true;
|
|
23
|
+
isScrolling = false;
|
|
24
|
+
scrollableParent = null;
|
|
25
|
+
autoScrollDirection = { horizontal: true, vertical: true };
|
|
26
|
+
initialClientOffset = { x: 0, y: 0 };
|
|
27
|
+
clientOffset = { x: 0, y: 0 };
|
|
28
|
+
initialScrollOffset = { x: 0, y: 0 };
|
|
29
|
+
scrollOffset = { x: 0, y: 0 };
|
|
30
|
+
offset = { x: 0, y: 0 };
|
|
31
|
+
pageOffset = { x: 0, y: 0 };
|
|
32
|
+
velocity = { x: 0, y: 0 };
|
|
33
|
+
dragTargetDirective;
|
|
34
|
+
state;
|
|
35
|
+
dragIndex = null;
|
|
36
|
+
dropIndex = null;
|
|
37
|
+
dragData;
|
|
38
|
+
dragTargetId;
|
|
39
|
+
callbacks = {};
|
|
40
|
+
scrollInterval = null;
|
|
37
41
|
handleDragAndDrop(action) {
|
|
38
42
|
this.updateState();
|
|
39
43
|
dispatchDragAndDrop(this.state, action, this.callbacks);
|
|
@@ -124,10 +128,10 @@ export class DragStateService {
|
|
|
124
128
|
this.scrollInterval = null;
|
|
125
129
|
}
|
|
126
130
|
}
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
132
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragStateService, providedIn: 'root' });
|
|
127
133
|
}
|
|
128
|
-
|
|
129
|
-
DragStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragStateService, providedIn: 'root' });
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragStateService, decorators: [{
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragStateService, decorators: [{
|
|
131
135
|
type: Injectable,
|
|
132
136
|
args: [{
|
|
133
137
|
providedIn: 'root'
|
|
@@ -9,14 +9,15 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
* It is used to specify a concrete element within a drag target as a handle for dragging, instead the drag target itself.
|
|
10
10
|
*/
|
|
11
11
|
export class DragHandleDirective {
|
|
12
|
+
element;
|
|
12
13
|
constructor(element) {
|
|
13
14
|
this.element = element;
|
|
14
|
-
this.cursorStyle = 'move';
|
|
15
15
|
}
|
|
16
|
+
cursorStyle = 'move';
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragHandleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragHandleDirective, isStandalone: true, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, exportAs: ["kendoDragHandle"], ngImport: i0 });
|
|
16
19
|
}
|
|
17
|
-
|
|
18
|
-
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragHandleDirective, isStandalone: true, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, exportAs: ["kendoDragHandle"], ngImport: i0 });
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragHandleDirective, decorators: [{
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragHandleDirective, decorators: [{
|
|
20
21
|
type: Directive,
|
|
21
22
|
args: [{
|
|
22
23
|
selector: '[kendoDragHandle]',
|
|
@@ -29,79 +29,18 @@ let isDragPrevented = false;
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
export class DragTargetContainerDirective {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.hint = false;
|
|
45
|
-
/**
|
|
46
|
-
* Defines the delay in milliseconds after which the drag will begin ([see example](slug:drag_target_container#toc-events)).
|
|
47
|
-
*
|
|
48
|
-
* @default 0
|
|
49
|
-
*/
|
|
50
|
-
this.dragDelay = 0;
|
|
51
|
-
/**
|
|
52
|
-
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})).
|
|
53
|
-
*
|
|
54
|
-
* @default 0
|
|
55
|
-
*/
|
|
56
|
-
this.threshold = 0;
|
|
57
|
-
/**
|
|
58
|
-
* Specifies whether the default dragging behavior will be performed or the developer will manually handle the drag action.
|
|
59
|
-
*
|
|
60
|
-
* @default 'auto'
|
|
61
|
-
*/
|
|
62
|
-
this.mode = 'auto';
|
|
63
|
-
/**
|
|
64
|
-
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
65
|
-
*/
|
|
66
|
-
this.onDragReady = new EventEmitter();
|
|
67
|
-
/**
|
|
68
|
-
* Fires when the user presses a DragTarget element.
|
|
69
|
-
*/
|
|
70
|
-
this.onPress = new EventEmitter();
|
|
71
|
-
/**
|
|
72
|
-
* Fires when the dragging of a DragTarget element begins.
|
|
73
|
-
*/
|
|
74
|
-
this.onDragStart = new EventEmitter();
|
|
75
|
-
/**
|
|
76
|
-
* Fires while the user drags a DragTarget element.
|
|
77
|
-
*/
|
|
78
|
-
this.onDrag = new EventEmitter();
|
|
79
|
-
/**
|
|
80
|
-
* Fires when the user releases a DragTarget element after being pressed.
|
|
81
|
-
*/
|
|
82
|
-
this.onRelease = new EventEmitter();
|
|
83
|
-
/**
|
|
84
|
-
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
85
|
-
*/
|
|
86
|
-
this.onDragEnd = new EventEmitter();
|
|
87
|
-
this.currentDragTarget = null;
|
|
88
|
-
this.dragTimeout = null;
|
|
89
|
-
this.pressed = false;
|
|
90
|
-
this.dragStarted = false;
|
|
91
|
-
this.hintComponent = null;
|
|
92
|
-
this.defaultHint = null;
|
|
93
|
-
this.currentDragTargetElement = null;
|
|
94
|
-
this.scrollableParent = null;
|
|
95
|
-
this.previousDragTargets = [];
|
|
96
|
-
this.initialPosition = { x: 0, y: 0 };
|
|
97
|
-
this.position = { x: 0, y: 0 };
|
|
98
|
-
this.positionsMap = new Map();
|
|
99
|
-
this._dragTargetFilter = null;
|
|
100
|
-
this._dragDisabled = false;
|
|
101
|
-
this._dragData = () => null;
|
|
102
|
-
this._dragTargetId = () => null;
|
|
103
|
-
validatePackage(packageMetadata);
|
|
104
|
-
}
|
|
32
|
+
wrapper;
|
|
33
|
+
ngZone;
|
|
34
|
+
renderer;
|
|
35
|
+
service;
|
|
36
|
+
viewContainer;
|
|
37
|
+
cdr;
|
|
38
|
+
/**
|
|
39
|
+
* Defines whether a hint will be used for dragging. By default, the hint is a copy of the current drag target. ([see example]({% slug drag_hint %})).
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
hint = false;
|
|
105
44
|
/**
|
|
106
45
|
* Specifies a selector for elements within a container which will be configured as draggable
|
|
107
46
|
* ([see example]({% slug drag_target_container %})). The possible values include any
|
|
@@ -116,6 +55,22 @@ export class DragTargetContainerDirective {
|
|
|
116
55
|
get dragTargetFilter() {
|
|
117
56
|
return this._dragTargetFilter;
|
|
118
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Specifies a selector for elements within each DragTarget which will be configured as drag handles.
|
|
60
|
+
*/
|
|
61
|
+
dragHandle;
|
|
62
|
+
/**
|
|
63
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example](slug:drag_target_container#toc-events)).
|
|
64
|
+
*
|
|
65
|
+
* @default 0
|
|
66
|
+
*/
|
|
67
|
+
dragDelay = 0;
|
|
68
|
+
/**
|
|
69
|
+
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})).
|
|
70
|
+
*
|
|
71
|
+
* @default 0
|
|
72
|
+
*/
|
|
73
|
+
threshold = 0;
|
|
119
74
|
/**
|
|
120
75
|
* Defines a unique identifier for each drag target.
|
|
121
76
|
* It exposes the current DragTarget HTML element and its index in the collection of drag targets as arguments.
|
|
@@ -166,6 +121,36 @@ export class DragTargetContainerDirective {
|
|
|
166
121
|
get dragDisabled() {
|
|
167
122
|
return this._dragDisabled;
|
|
168
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Specifies whether the default dragging behavior will be performed or the developer will manually handle the drag action.
|
|
126
|
+
*
|
|
127
|
+
* @default 'auto'
|
|
128
|
+
*/
|
|
129
|
+
mode = 'auto';
|
|
130
|
+
/**
|
|
131
|
+
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
132
|
+
*/
|
|
133
|
+
onDragReady = new EventEmitter();
|
|
134
|
+
/**
|
|
135
|
+
* Fires when the user presses a DragTarget element.
|
|
136
|
+
*/
|
|
137
|
+
onPress = new EventEmitter();
|
|
138
|
+
/**
|
|
139
|
+
* Fires when the dragging of a DragTarget element begins.
|
|
140
|
+
*/
|
|
141
|
+
onDragStart = new EventEmitter();
|
|
142
|
+
/**
|
|
143
|
+
* Fires while the user drags a DragTarget element.
|
|
144
|
+
*/
|
|
145
|
+
onDrag = new EventEmitter();
|
|
146
|
+
/**
|
|
147
|
+
* Fires when the user releases a DragTarget element after being pressed.
|
|
148
|
+
*/
|
|
149
|
+
onRelease = new EventEmitter();
|
|
150
|
+
/**
|
|
151
|
+
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
152
|
+
*/
|
|
153
|
+
onDragEnd = new EventEmitter();
|
|
169
154
|
/**
|
|
170
155
|
* Used for notifying the DragTargetContainer that its content has changed.
|
|
171
156
|
*/
|
|
@@ -173,6 +158,26 @@ export class DragTargetContainerDirective {
|
|
|
173
158
|
this.cdr.detectChanges();
|
|
174
159
|
this.initializeDragTargets();
|
|
175
160
|
}
|
|
161
|
+
pointerDownSubscription;
|
|
162
|
+
pointerMoveSubscription;
|
|
163
|
+
pointerUpSubscription;
|
|
164
|
+
scrollSubscription;
|
|
165
|
+
currentDragTarget = null;
|
|
166
|
+
dragTimeout = null;
|
|
167
|
+
pressed = false;
|
|
168
|
+
dragStarted = false;
|
|
169
|
+
hintComponent = null;
|
|
170
|
+
defaultHint = null;
|
|
171
|
+
currentDragTargetElement = null;
|
|
172
|
+
scrollableParent = null;
|
|
173
|
+
previousDragTargets = [];
|
|
174
|
+
initialPosition = { x: 0, y: 0 };
|
|
175
|
+
position = { x: 0, y: 0 };
|
|
176
|
+
positionsMap = new Map();
|
|
177
|
+
_dragTargetFilter = null;
|
|
178
|
+
_dragDisabled = false;
|
|
179
|
+
_dragData = () => null;
|
|
180
|
+
_dragTargetId = () => null;
|
|
176
181
|
get allDragTargets() {
|
|
177
182
|
return this.queryHost(this.dragTargetFilter);
|
|
178
183
|
}
|
|
@@ -182,6 +187,15 @@ export class DragTargetContainerDirective {
|
|
|
182
187
|
get hintTemplate() {
|
|
183
188
|
return isPresent(this.hint) && typeof this.hint === 'object' ? this.hint.hintTemplate : null;
|
|
184
189
|
}
|
|
190
|
+
constructor(wrapper, ngZone, renderer, service, viewContainer, cdr) {
|
|
191
|
+
this.wrapper = wrapper;
|
|
192
|
+
this.ngZone = ngZone;
|
|
193
|
+
this.renderer = renderer;
|
|
194
|
+
this.service = service;
|
|
195
|
+
this.viewContainer = viewContainer;
|
|
196
|
+
this.cdr = cdr;
|
|
197
|
+
validatePackage(packageMetadata);
|
|
198
|
+
}
|
|
185
199
|
ngAfterViewInit() {
|
|
186
200
|
const isTargetPresent = isPresent(this.wrapper) || isPresent(this.currentDragTarget);
|
|
187
201
|
if (!this.dragDisabled && isTargetPresent) {
|
|
@@ -590,10 +604,10 @@ export class DragTargetContainerDirective {
|
|
|
590
604
|
};
|
|
591
605
|
}
|
|
592
606
|
}
|
|
607
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetContainerDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.DragStateService }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
608
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragTargetContainerDirective, isStandalone: true, selector: "[kendoDragTargetContainer]", inputs: { hint: "hint", dragTargetFilter: "dragTargetFilter", dragHandle: "dragHandle", dragDelay: "dragDelay", threshold: "threshold", dragTargetId: "dragTargetId", dragData: "dragData", dragDisabled: "dragDisabled", mode: "mode" }, outputs: { onDragReady: "onDragReady", onPress: "onPress", onDragStart: "onDragStart", onDrag: "onDrag", onRelease: "onRelease", onDragEnd: "onDragEnd" }, exportAs: ["kendoDragTargetContainer"], ngImport: i0 });
|
|
593
609
|
}
|
|
594
|
-
|
|
595
|
-
DragTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragTargetContainerDirective, isStandalone: true, selector: "[kendoDragTargetContainer]", inputs: { hint: "hint", dragTargetFilter: "dragTargetFilter", dragHandle: "dragHandle", dragDelay: "dragDelay", threshold: "threshold", dragTargetId: "dragTargetId", dragData: "dragData", dragDisabled: "dragDisabled", mode: "mode" }, outputs: { onDragReady: "onDragReady", onPress: "onPress", onDragStart: "onDragStart", onDrag: "onDrag", onRelease: "onRelease", onDragEnd: "onDragEnd" }, exportAs: ["kendoDragTargetContainer"], ngImport: i0 });
|
|
596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
597
611
|
type: Directive,
|
|
598
612
|
args: [{
|
|
599
613
|
selector: '[kendoDragTargetContainer]',
|
|
@@ -22,79 +22,49 @@ let isDragPrevented = false;
|
|
|
22
22
|
* Represents the Kendo UI DragTarget directive for Angular.
|
|
23
23
|
*/
|
|
24
24
|
export class DragTargetDirective {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.onDragStart = new EventEmitter();
|
|
69
|
-
/**
|
|
70
|
-
* Fires while the user drags the DragTarget element.
|
|
71
|
-
*/
|
|
72
|
-
this.onDrag = new EventEmitter();
|
|
73
|
-
/**
|
|
74
|
-
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
75
|
-
*/
|
|
76
|
-
this.onDragReady = new EventEmitter();
|
|
77
|
-
/**
|
|
78
|
-
* Fires when the user releases the DragTarget element after being pressed.
|
|
79
|
-
*/
|
|
80
|
-
this.onRelease = new EventEmitter();
|
|
81
|
-
/**
|
|
82
|
-
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
83
|
-
*/
|
|
84
|
-
this.onDragEnd = new EventEmitter();
|
|
85
|
-
this.dragTarget = null;
|
|
86
|
-
this.domSubscriptions = [];
|
|
87
|
-
this.hintComponent = null;
|
|
88
|
-
this.dragStarted = false;
|
|
89
|
-
this.pressed = false;
|
|
90
|
-
this.dragTimeout = null;
|
|
91
|
-
this.initialPosition = { x: 0, y: 0 };
|
|
92
|
-
this.position = { x: 0, y: 0 };
|
|
93
|
-
this.scrollableParent = null;
|
|
94
|
-
this.defaultHint = null;
|
|
95
|
-
this._dragData = () => null;
|
|
96
|
-
validatePackage(packageMetadata);
|
|
97
|
-
}
|
|
25
|
+
element;
|
|
26
|
+
renderer;
|
|
27
|
+
ngZone;
|
|
28
|
+
service;
|
|
29
|
+
viewContainer;
|
|
30
|
+
/**
|
|
31
|
+
* Defines whether a hint will be used for dragging. By default, the hint is a copy of the drag target. ([see example]({% slug drag_hint %})).
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
hint = false;
|
|
36
|
+
/**
|
|
37
|
+
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})). Applicable when `manualDrag` is set to `false`.
|
|
38
|
+
*
|
|
39
|
+
* @default 0
|
|
40
|
+
*/
|
|
41
|
+
threshold = 0;
|
|
42
|
+
/**
|
|
43
|
+
* Defines the automatic container scrolling behavior when close to the edge ([see example]({% slug auto_scroll %})).
|
|
44
|
+
*
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
autoScroll = true;
|
|
48
|
+
/**
|
|
49
|
+
* Defines a unique identifier for the dragTarget.
|
|
50
|
+
*/
|
|
51
|
+
dragTargetId;
|
|
52
|
+
/**
|
|
53
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example]({% slug drag_delay %})).
|
|
54
|
+
*
|
|
55
|
+
* @default 0
|
|
56
|
+
*/
|
|
57
|
+
dragDelay = 0;
|
|
58
|
+
/**
|
|
59
|
+
* Restricts the element to be dragged horizontally or vertically only ([see example]({% slug axis_lock %})). Applicable when `mode` is set to `auto`.
|
|
60
|
+
*/
|
|
61
|
+
restrictByAxis;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies whether the default dragging behavior will be performed or the developer will manually handle the drag action.
|
|
64
|
+
*
|
|
65
|
+
* @default 'auto'
|
|
66
|
+
*/
|
|
67
|
+
mode = 'auto';
|
|
98
68
|
/**
|
|
99
69
|
* Defines a callback function used for attaching custom data to the dragTarget.
|
|
100
70
|
* The data will be available in the events of the respective [`DropTarget`]({% slug api_utils_droptargetdirective %}) or [`DropTargetContainer`]({% slug api_utils_droptargetcontainerdirective %}) directives.
|
|
@@ -109,6 +79,41 @@ export class DragTargetDirective {
|
|
|
109
79
|
get dragData() {
|
|
110
80
|
return this._dragData;
|
|
111
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Fires when the user presses the DragTarget element.
|
|
84
|
+
*/
|
|
85
|
+
onPress = new EventEmitter();
|
|
86
|
+
/**
|
|
87
|
+
* Fires when the dragging of the DragTarget element begins.
|
|
88
|
+
*/
|
|
89
|
+
onDragStart = new EventEmitter();
|
|
90
|
+
/**
|
|
91
|
+
* Fires while the user drags the DragTarget element.
|
|
92
|
+
*/
|
|
93
|
+
onDrag = new EventEmitter();
|
|
94
|
+
/**
|
|
95
|
+
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
96
|
+
*/
|
|
97
|
+
onDragReady = new EventEmitter();
|
|
98
|
+
/**
|
|
99
|
+
* Fires when the user releases the DragTarget element after being pressed.
|
|
100
|
+
*/
|
|
101
|
+
onRelease = new EventEmitter();
|
|
102
|
+
/**
|
|
103
|
+
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
104
|
+
*/
|
|
105
|
+
onDragEnd = new EventEmitter();
|
|
106
|
+
dragTarget = null;
|
|
107
|
+
domSubscriptions = [];
|
|
108
|
+
hintComponent = null;
|
|
109
|
+
dragStarted = false;
|
|
110
|
+
pressed = false;
|
|
111
|
+
dragTimeout = null;
|
|
112
|
+
initialPosition = { x: 0, y: 0 };
|
|
113
|
+
position = { x: 0, y: 0 };
|
|
114
|
+
scrollableParent = null;
|
|
115
|
+
defaultHint = null;
|
|
116
|
+
_dragData = () => null;
|
|
112
117
|
get hintTemplate() {
|
|
113
118
|
return isPresent(this.hint) && typeof this.hint === 'object' ? this.hint.hintTemplate : null;
|
|
114
119
|
}
|
|
@@ -141,6 +146,15 @@ export class DragTargetDirective {
|
|
|
141
146
|
this.service.handleDragAndDrop(action);
|
|
142
147
|
this.attachDomHandlers();
|
|
143
148
|
}
|
|
149
|
+
dragHandles;
|
|
150
|
+
constructor(element, renderer, ngZone, service, viewContainer) {
|
|
151
|
+
this.element = element;
|
|
152
|
+
this.renderer = renderer;
|
|
153
|
+
this.ngZone = ngZone;
|
|
154
|
+
this.service = service;
|
|
155
|
+
this.viewContainer = viewContainer;
|
|
156
|
+
validatePackage(packageMetadata);
|
|
157
|
+
}
|
|
144
158
|
ngOnInit() {
|
|
145
159
|
this.initializeDragTarget();
|
|
146
160
|
}
|
|
@@ -462,10 +476,10 @@ export class DragTargetDirective {
|
|
|
462
476
|
};
|
|
463
477
|
}
|
|
464
478
|
}
|
|
479
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.DragStateService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
480
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragTargetDirective, isStandalone: true, selector: "[kendoDragTarget]", inputs: { hint: "hint", threshold: "threshold", autoScroll: "autoScroll", dragTargetId: "dragTargetId", dragDelay: "dragDelay", restrictByAxis: "restrictByAxis", mode: "mode", dragData: "dragData" }, outputs: { onPress: "onPress", onDragStart: "onDragStart", onDrag: "onDrag", onDragReady: "onDragReady", onRelease: "onRelease", onDragEnd: "onDragEnd" }, queries: [{ propertyName: "dragHandles", predicate: DragHandleDirective }], exportAs: ["kendoDragTarget"], ngImport: i0 });
|
|
465
481
|
}
|
|
466
|
-
|
|
467
|
-
DragTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragTargetDirective, isStandalone: true, selector: "[kendoDragTarget]", inputs: { hint: "hint", threshold: "threshold", autoScroll: "autoScroll", dragTargetId: "dragTargetId", dragDelay: "dragDelay", restrictByAxis: "restrictByAxis", mode: "mode", dragData: "dragData" }, outputs: { onPress: "onPress", onDragStart: "onDragStart", onDrag: "onDrag", onDragReady: "onDragReady", onRelease: "onRelease", onDragEnd: "onDragEnd" }, queries: [{ propertyName: "dragHandles", predicate: DragHandleDirective }], exportAs: ["kendoDragTarget"], ngImport: i0 });
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
469
483
|
type: Directive,
|
|
470
484
|
args: [{
|
|
471
485
|
selector: '[kendoDragTarget]',
|