@progress/kendo-angular-utils 13.0.0-develop.2 → 13.0.0-develop.20
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 +10 -10
- package/drag-and-drop/dragtarget.directive.d.ts +7 -7
- package/drag-and-drop/droptarget-container.directive.d.ts +5 -5
- package/drag-and-drop/droptarget.directive.d.ts +6 -6
- package/esm2020/drag-and-drop/draghandle.directive.mjs +2 -2
- package/esm2020/drag-and-drop/dragtarget-container.directive.mjs +33 -32
- package/esm2020/drag-and-drop/dragtarget.directive.mjs +30 -28
- package/esm2020/drag-and-drop/droptarget-container.directive.mjs +14 -14
- package/esm2020/drag-and-drop/droptarget.directive.mjs +17 -23
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-utils.mjs +100 -103
- package/fesm2020/progress-kendo-angular-utils.mjs +98 -101
- package/package.json +3 -3
|
@@ -27,7 +27,7 @@ export declare class DragTargetContainerDirective implements AfterViewInit {
|
|
|
27
27
|
private viewContainer;
|
|
28
28
|
private cdr;
|
|
29
29
|
/**
|
|
30
|
-
* Defines whether a hint will be used for dragging. By default, the hint is a copy of the current drag target. ([see example]({% slug
|
|
30
|
+
* 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 %})).
|
|
31
31
|
*
|
|
32
32
|
* @default false
|
|
33
33
|
*/
|
|
@@ -40,11 +40,11 @@ export declare class DragTargetContainerDirective implements AfterViewInit {
|
|
|
40
40
|
set dragTargetFilter(value: string);
|
|
41
41
|
get dragTargetFilter(): string;
|
|
42
42
|
/**
|
|
43
|
-
* Specifies a selector for elements within each DragTarget which will be configured as drag handles
|
|
43
|
+
* Specifies a selector for elements within each DragTarget which will be configured as drag handles.
|
|
44
44
|
*/
|
|
45
45
|
dragHandle: string;
|
|
46
46
|
/**
|
|
47
|
-
* Defines the delay in milliseconds after which the drag will begin ([see example](
|
|
47
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example](slug drag_target_container#toc-events)).
|
|
48
48
|
*
|
|
49
49
|
* @default 0
|
|
50
50
|
*/
|
|
@@ -83,27 +83,27 @@ export declare class DragTargetContainerDirective implements AfterViewInit {
|
|
|
83
83
|
/**
|
|
84
84
|
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
onDragReady: EventEmitter<DragTargetDragReadyEvent>;
|
|
87
87
|
/**
|
|
88
88
|
* Fires when the user presses a DragTarget element.
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
onPress: EventEmitter<DragTargetPressEvent>;
|
|
91
91
|
/**
|
|
92
92
|
* Fires when the dragging of a DragTarget element begins.
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
onDragStart: EventEmitter<DragTargetDragStartEvent>;
|
|
95
95
|
/**
|
|
96
96
|
* Fires while the user drags a DragTarget element.
|
|
97
97
|
*/
|
|
98
|
-
|
|
98
|
+
onDrag: EventEmitter<DragTargetDragEvent>;
|
|
99
99
|
/**
|
|
100
100
|
* Fires when the user releases a DragTarget element after being pressed.
|
|
101
101
|
*/
|
|
102
|
-
|
|
102
|
+
onRelease: EventEmitter<DragTargetReleaseEvent>;
|
|
103
103
|
/**
|
|
104
104
|
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
onDragEnd: EventEmitter<DragTargetDragEndEvent>;
|
|
107
107
|
/**
|
|
108
108
|
* Used for notifying the DragTargetContainer that its content has changed.
|
|
109
109
|
*/
|
|
@@ -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"; }, { "
|
|
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>;
|
|
165
165
|
}
|
|
@@ -68,27 +68,27 @@ export declare class DragTargetDirective implements OnInit, AfterContentInit, On
|
|
|
68
68
|
/**
|
|
69
69
|
* Fires when the user presses the DragTarget element.
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
onPress: EventEmitter<DragTargetPressEvent>;
|
|
72
72
|
/**
|
|
73
73
|
* Fires when the dragging of the DragTarget element begins.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
onDragStart: EventEmitter<DragTargetDragStartEvent>;
|
|
76
76
|
/**
|
|
77
77
|
* Fires while the user drags the DragTarget element.
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
onDrag: EventEmitter<DragTargetDragEvent>;
|
|
80
80
|
/**
|
|
81
81
|
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
onDragReady: EventEmitter<DragTargetDragReadyEvent>;
|
|
84
84
|
/**
|
|
85
85
|
* Fires when the user releases the DragTarget element after being pressed.
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
onRelease: EventEmitter<DragTargetReleaseEvent>;
|
|
88
88
|
/**
|
|
89
89
|
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
onDragEnd: EventEmitter<DragTargetDragEndEvent>;
|
|
92
92
|
private dragTarget;
|
|
93
93
|
private domSubscriptions;
|
|
94
94
|
private hintComponent;
|
|
@@ -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"; }, { "
|
|
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"]>;
|
|
134
134
|
}
|
|
@@ -38,19 +38,19 @@ export declare class DropTargetContainerDirective implements AfterViewInit {
|
|
|
38
38
|
/**
|
|
39
39
|
* Fires when a DragTarget element enters the DropTarget.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
onDragEnter: EventEmitter<DropTargetEvent>;
|
|
42
42
|
/**
|
|
43
43
|
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
onDragOver: EventEmitter<DropTargetEvent>;
|
|
46
46
|
/**
|
|
47
47
|
* Fires when a DragTarget element leaves the DropTarget.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
onDragLeave: EventEmitter<DropTargetEvent>;
|
|
50
50
|
/**
|
|
51
51
|
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
onDrop: EventEmitter<DropTargetEvent>;
|
|
54
54
|
/**
|
|
55
55
|
* Used for notifying the DropTargetContainer that its content has changed.
|
|
56
56
|
*/
|
|
@@ -85,5 +85,5 @@ export declare class DropTargetContainerDirective implements AfterViewInit {
|
|
|
85
85
|
private getDropIndex;
|
|
86
86
|
private clearPreviousTargets;
|
|
87
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropTargetContainerDirective, never>;
|
|
88
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetContainerDirective, "[kendoDropTargetContainer]", ["kendoDropTargetContainer"], { "dropTargetFilter": "dropTargetFilter"; "dropDisabled": "dropDisabled"; }, { "
|
|
88
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetContainerDirective, "[kendoDropTargetContainer]", ["kendoDropTargetContainer"], { "dropTargetFilter": "dropTargetFilter"; "dropDisabled": "dropDisabled"; }, { "onDragEnter": "onDragEnter"; "onDragOver": "onDragOver"; "onDragLeave": "onDragLeave"; "onDrop": "onDrop"; }, never>;
|
|
89
89
|
}
|
|
@@ -17,19 +17,19 @@ export declare class DropTargetDirective implements OnInit {
|
|
|
17
17
|
/**
|
|
18
18
|
* Fires when a DragTarget element enters the DropTarget.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
onDragEnter: EventEmitter<DropTargetEvent>;
|
|
21
21
|
/**
|
|
22
22
|
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
onDragOver: EventEmitter<DropTargetEvent>;
|
|
25
25
|
/**
|
|
26
26
|
* Fires when a DragTarget element leaves the DropTarget.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
onDragLeave: EventEmitter<DropTargetEvent>;
|
|
29
29
|
/**
|
|
30
30
|
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
onDrop: EventEmitter<DropTargetEvent>;
|
|
33
33
|
constructor(service: DragStateService, element: ElementRef, ngZone: NgZone);
|
|
34
34
|
private dropTarget;
|
|
35
35
|
ngOnInit(): void;
|
|
@@ -50,7 +50,7 @@ export declare class DropTargetDirective implements OnInit {
|
|
|
50
50
|
*/
|
|
51
51
|
handleDrop(event: NormalizedDragEvent): void;
|
|
52
52
|
private initializeDropTarget;
|
|
53
|
-
private
|
|
53
|
+
private emitZoneAwareEvent;
|
|
54
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropTargetDirective, never>;
|
|
55
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetDirective, "[kendoDropTarget]", ["kendoDropTarget"], {}, { "
|
|
55
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetDirective, "[kendoDropTarget]", ["kendoDropTarget"], {}, { "onDragEnter": "onDragEnter"; "onDragOver": "onDragOver"; "onDragLeave": "onDragLeave"; "onDrop": "onDrop"; }, never>;
|
|
56
56
|
}
|
|
@@ -15,7 +15,7 @@ export class DragHandleDirective {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
DragHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragHandleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
-
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragHandleDirective, selector: "[kendoDragHandle]", host: { properties: { "class.k-cursor-
|
|
18
|
+
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragHandleDirective, selector: "[kendoDragHandle]", host: { properties: { "class.k-cursor-move": "this.hostClass" } }, exportAs: ["kendoDragHandle"], ngImport: i0 });
|
|
19
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragHandleDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
@@ -24,5 +24,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
24
24
|
}]
|
|
25
25
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
|
|
26
26
|
type: HostBinding,
|
|
27
|
-
args: ['class.k-cursor-
|
|
27
|
+
args: ['class.k-cursor-move']
|
|
28
28
|
}] } });
|
|
@@ -37,13 +37,13 @@ export class DragTargetContainerDirective {
|
|
|
37
37
|
this.viewContainer = viewContainer;
|
|
38
38
|
this.cdr = cdr;
|
|
39
39
|
/**
|
|
40
|
-
* Defines whether a hint will be used for dragging. By default, the hint is a copy of the current drag target. ([see example]({% slug
|
|
40
|
+
* 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 %})).
|
|
41
41
|
*
|
|
42
42
|
* @default false
|
|
43
43
|
*/
|
|
44
44
|
this.hint = false;
|
|
45
45
|
/**
|
|
46
|
-
* Defines the delay in milliseconds after which the drag will begin ([see example](
|
|
46
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example](slug drag_target_container#toc-events)).
|
|
47
47
|
*
|
|
48
48
|
* @default 0
|
|
49
49
|
*/
|
|
@@ -63,27 +63,27 @@ export class DragTargetContainerDirective {
|
|
|
63
63
|
/**
|
|
64
64
|
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
65
65
|
*/
|
|
66
|
-
this.
|
|
66
|
+
this.onDragReady = new EventEmitter();
|
|
67
67
|
/**
|
|
68
68
|
* Fires when the user presses a DragTarget element.
|
|
69
69
|
*/
|
|
70
|
-
this.
|
|
70
|
+
this.onPress = new EventEmitter();
|
|
71
71
|
/**
|
|
72
72
|
* Fires when the dragging of a DragTarget element begins.
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.onDragStart = new EventEmitter();
|
|
75
75
|
/**
|
|
76
76
|
* Fires while the user drags a DragTarget element.
|
|
77
77
|
*/
|
|
78
|
-
this.
|
|
78
|
+
this.onDrag = new EventEmitter();
|
|
79
79
|
/**
|
|
80
80
|
* Fires when the user releases a DragTarget element after being pressed.
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.onRelease = new EventEmitter();
|
|
83
83
|
/**
|
|
84
84
|
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
85
85
|
*/
|
|
86
|
-
this.
|
|
86
|
+
this.onDragEnd = new EventEmitter();
|
|
87
87
|
this.currentDragTarget = null;
|
|
88
88
|
this.dragTimeout = null;
|
|
89
89
|
this.pressed = false;
|
|
@@ -214,7 +214,7 @@ export class DragTargetContainerDirective {
|
|
|
214
214
|
if (this.dragDelay > 0) {
|
|
215
215
|
this.dragTimeout = window.setTimeout(() => {
|
|
216
216
|
this.pressed = true;
|
|
217
|
-
this.emitZoneAwareEvent('
|
|
217
|
+
this.emitZoneAwareEvent('onDragReady', event);
|
|
218
218
|
}, this.dragDelay);
|
|
219
219
|
}
|
|
220
220
|
else {
|
|
@@ -225,7 +225,7 @@ export class DragTargetContainerDirective {
|
|
|
225
225
|
this.currentDragTarget.element = this.currentDragTargetElement;
|
|
226
226
|
this.service.dragIndex = this.getDragIndex();
|
|
227
227
|
this.scrollableParent = this.hintTemplate ? document.body : this.currentDragTargetElement ? getScrollableParent(this.currentDragTargetElement) : null;
|
|
228
|
-
this.emitZoneAwareEvent('
|
|
228
|
+
this.emitZoneAwareEvent('onPress', event);
|
|
229
229
|
}
|
|
230
230
|
handleDragStart(event) {
|
|
231
231
|
if (!this.pressed) {
|
|
@@ -235,7 +235,7 @@ export class DragTargetContainerDirective {
|
|
|
235
235
|
}
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
isDragStartPrevented = this.emitZoneAwareEvent('
|
|
238
|
+
isDragStartPrevented = this.emitZoneAwareEvent('onDragStart', event).isDefaultPrevented();
|
|
239
239
|
if (isDragStartPrevented) {
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
@@ -258,7 +258,7 @@ export class DragTargetContainerDirective {
|
|
|
258
258
|
if (!this.pressed || isDragStartPrevented) {
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
|
-
isDragPrevented = this.emitZoneAwareEvent('
|
|
261
|
+
isDragPrevented = this.emitZoneAwareEvent('onDrag', event).isDefaultPrevented();
|
|
262
262
|
if (isDragPrevented) {
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
@@ -268,7 +268,6 @@ export class DragTargetContainerDirective {
|
|
|
268
268
|
else {
|
|
269
269
|
this.dragStarted = true;
|
|
270
270
|
}
|
|
271
|
-
this.dragStarted && this.emitZoneAwareEvent('drag', event);
|
|
272
271
|
}
|
|
273
272
|
handleRelease(event) {
|
|
274
273
|
if (this.dragStarted) {
|
|
@@ -279,7 +278,7 @@ export class DragTargetContainerDirective {
|
|
|
279
278
|
this.dragTimeout = null;
|
|
280
279
|
this.pressed = false;
|
|
281
280
|
}
|
|
282
|
-
this.emitZoneAwareEvent('
|
|
281
|
+
this.emitZoneAwareEvent('onRelease', event);
|
|
283
282
|
}
|
|
284
283
|
handleDragEnd(event) {
|
|
285
284
|
if (!this.dragStarted) {
|
|
@@ -305,7 +304,7 @@ export class DragTargetContainerDirective {
|
|
|
305
304
|
this.service.dragTarget = null;
|
|
306
305
|
this.service.dragIndex = null;
|
|
307
306
|
this.currentDragTarget.element = null;
|
|
308
|
-
this.emitZoneAwareEvent('
|
|
307
|
+
this.emitZoneAwareEvent('onDragEnd', event);
|
|
309
308
|
if (isDragStartPrevented || isDragPrevented) {
|
|
310
309
|
return;
|
|
311
310
|
}
|
|
@@ -376,22 +375,22 @@ export class DragTargetContainerDirective {
|
|
|
376
375
|
}
|
|
377
376
|
let eventArgs;
|
|
378
377
|
switch (event) {
|
|
379
|
-
case '
|
|
378
|
+
case 'onDragReady':
|
|
380
379
|
eventArgs = new DragTargetDragReadyEvent(eventProps);
|
|
381
380
|
break;
|
|
382
|
-
case '
|
|
381
|
+
case 'onPress':
|
|
383
382
|
eventArgs = new DragTargetPressEvent(eventProps);
|
|
384
383
|
break;
|
|
385
|
-
case '
|
|
384
|
+
case 'onDragStart':
|
|
386
385
|
eventArgs = new DragTargetDragStartEvent(eventProps);
|
|
387
386
|
break;
|
|
388
|
-
case '
|
|
387
|
+
case 'onDrag':
|
|
389
388
|
eventArgs = new DragTargetDragEvent(eventProps);
|
|
390
389
|
break;
|
|
391
|
-
case '
|
|
390
|
+
case 'onRelease':
|
|
392
391
|
eventArgs = new DragTargetReleaseEvent(eventProps);
|
|
393
392
|
break;
|
|
394
|
-
case '
|
|
393
|
+
case 'onDragEnd':
|
|
395
394
|
eventArgs = new DragTargetDragEndEvent(eventProps);
|
|
396
395
|
break;
|
|
397
396
|
default:
|
|
@@ -516,12 +515,12 @@ export class DragTargetContainerDirective {
|
|
|
516
515
|
}
|
|
517
516
|
if (isPresent(this.dragHandles) && this.dragHandles.length > 0) {
|
|
518
517
|
this.dragHandles.forEach(handle => {
|
|
519
|
-
this.renderer.addClass(handle, 'k-cursor-
|
|
518
|
+
this.renderer.addClass(handle, 'k-cursor-move');
|
|
520
519
|
});
|
|
521
520
|
}
|
|
522
521
|
else {
|
|
523
522
|
this.allDragTargets.forEach(target => {
|
|
524
|
-
this.renderer.addClass(target, 'k-cursor-
|
|
523
|
+
this.renderer.addClass(target, 'k-cursor-move');
|
|
525
524
|
});
|
|
526
525
|
}
|
|
527
526
|
}
|
|
@@ -549,8 +548,10 @@ export class DragTargetContainerDirective {
|
|
|
549
548
|
if (!this.dragStarted && this.threshold > 0) {
|
|
550
549
|
this.dragStarted = true;
|
|
551
550
|
}
|
|
552
|
-
|
|
553
|
-
|
|
551
|
+
if (elem) {
|
|
552
|
+
const styles = this.getStylesPerElement(elem);
|
|
553
|
+
setElementStyles(this.renderer, elem, styles);
|
|
554
|
+
}
|
|
554
555
|
}
|
|
555
556
|
calculatePosition(element, event) {
|
|
556
557
|
let position = null;
|
|
@@ -583,7 +584,7 @@ export class DragTargetContainerDirective {
|
|
|
583
584
|
}
|
|
584
585
|
}
|
|
585
586
|
DragTargetContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.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 });
|
|
586
|
-
DragTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragTargetContainerDirective, selector: "[kendoDragTargetContainer]", inputs: { hint: "hint", dragTargetFilter: "dragTargetFilter", dragHandle: "dragHandle", dragDelay: "dragDelay", threshold: "threshold", dragTargetId: "dragTargetId", dragData: "dragData", dragDisabled: "dragDisabled", mode: "mode" }, outputs: {
|
|
587
|
+
DragTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragTargetContainerDirective, 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 });
|
|
587
588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
588
589
|
type: Directive,
|
|
589
590
|
args: [{
|
|
@@ -608,16 +609,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
608
609
|
type: Input
|
|
609
610
|
}], mode: [{
|
|
610
611
|
type: Input
|
|
611
|
-
}],
|
|
612
|
+
}], onDragReady: [{
|
|
612
613
|
type: Output
|
|
613
|
-
}],
|
|
614
|
+
}], onPress: [{
|
|
614
615
|
type: Output
|
|
615
|
-
}],
|
|
616
|
+
}], onDragStart: [{
|
|
616
617
|
type: Output
|
|
617
|
-
}],
|
|
618
|
+
}], onDrag: [{
|
|
618
619
|
type: Output
|
|
619
|
-
}],
|
|
620
|
+
}], onRelease: [{
|
|
620
621
|
type: Output
|
|
621
|
-
}],
|
|
622
|
+
}], onDragEnd: [{
|
|
622
623
|
type: Output
|
|
623
624
|
}] } });
|
|
@@ -61,27 +61,27 @@ export class DragTargetDirective {
|
|
|
61
61
|
/**
|
|
62
62
|
* Fires when the user presses the DragTarget element.
|
|
63
63
|
*/
|
|
64
|
-
this.
|
|
64
|
+
this.onPress = new EventEmitter();
|
|
65
65
|
/**
|
|
66
66
|
* Fires when the dragging of the DragTarget element begins.
|
|
67
67
|
*/
|
|
68
|
-
this.
|
|
68
|
+
this.onDragStart = new EventEmitter();
|
|
69
69
|
/**
|
|
70
70
|
* Fires while the user drags the DragTarget element.
|
|
71
71
|
*/
|
|
72
|
-
this.
|
|
72
|
+
this.onDrag = new EventEmitter();
|
|
73
73
|
/**
|
|
74
74
|
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
75
75
|
*/
|
|
76
|
-
this.
|
|
76
|
+
this.onDragReady = new EventEmitter();
|
|
77
77
|
/**
|
|
78
78
|
* Fires when the user releases the DragTarget element after being pressed.
|
|
79
79
|
*/
|
|
80
|
-
this.
|
|
80
|
+
this.onRelease = new EventEmitter();
|
|
81
81
|
/**
|
|
82
82
|
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
83
83
|
*/
|
|
84
|
-
this.
|
|
84
|
+
this.onDragEnd = new EventEmitter();
|
|
85
85
|
this.dragTarget = null;
|
|
86
86
|
this.domSubscriptions = [];
|
|
87
87
|
this.hintComponent = null;
|
|
@@ -148,7 +148,7 @@ export class DragTargetDirective {
|
|
|
148
148
|
if (isPresent(this.element) || isPresent(this.dragTarget)) {
|
|
149
149
|
this.attachDomHandlers();
|
|
150
150
|
if (!this.dragHandles.length) {
|
|
151
|
-
this.renderer.addClass(this.nativeElement, 'k-cursor-
|
|
151
|
+
this.renderer.addClass(this.nativeElement, 'k-cursor-move');
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
this.service.dragTargets.push(this.dragTarget);
|
|
@@ -160,14 +160,14 @@ export class DragTargetDirective {
|
|
|
160
160
|
if (this.dragDelay > 0) {
|
|
161
161
|
this.dragTimeout = window.setTimeout(() => {
|
|
162
162
|
this.pressed = true;
|
|
163
|
-
this.emitZoneAwareEvent('
|
|
163
|
+
this.emitZoneAwareEvent('onDragReady', event);
|
|
164
164
|
}, this.dragDelay);
|
|
165
165
|
}
|
|
166
166
|
else {
|
|
167
167
|
this.pressed = true;
|
|
168
168
|
}
|
|
169
169
|
this.scrollableParent = this.dragTarget.element ? getScrollableParent(this.dragTarget.element) : null;
|
|
170
|
-
this.emitZoneAwareEvent('
|
|
170
|
+
this.emitZoneAwareEvent('onPress', event);
|
|
171
171
|
}
|
|
172
172
|
handleDragStart(event) {
|
|
173
173
|
if (!this.pressed) {
|
|
@@ -177,7 +177,7 @@ export class DragTargetDirective {
|
|
|
177
177
|
}
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
isDragStartPrevented = this.emitZoneAwareEvent('
|
|
180
|
+
isDragStartPrevented = this.emitZoneAwareEvent('onDragStart', event).isDefaultPrevented();
|
|
181
181
|
if (isDragStartPrevented) {
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
@@ -200,7 +200,7 @@ export class DragTargetDirective {
|
|
|
200
200
|
if (!this.pressed || isDragStartPrevented) {
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
isDragPrevented = this.emitZoneAwareEvent('
|
|
203
|
+
isDragPrevented = this.emitZoneAwareEvent('onDrag', event).isDefaultPrevented();
|
|
204
204
|
if (isDragPrevented) {
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
@@ -217,7 +217,7 @@ export class DragTargetDirective {
|
|
|
217
217
|
this.dragTimeout = null;
|
|
218
218
|
this.pressed = false;
|
|
219
219
|
}
|
|
220
|
-
this.emitZoneAwareEvent('
|
|
220
|
+
this.emitZoneAwareEvent('onRelease', event);
|
|
221
221
|
}
|
|
222
222
|
handleDragEnd(event) {
|
|
223
223
|
if (this.mode === 'auto') {
|
|
@@ -242,7 +242,7 @@ export class DragTargetDirective {
|
|
|
242
242
|
if (!this.dragStarted || isDragStartPrevented || isDragPrevented) {
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
|
-
this.emitZoneAwareEvent('
|
|
245
|
+
this.emitZoneAwareEvent('onDragEnd', event);
|
|
246
246
|
this.dragStarted = false;
|
|
247
247
|
}
|
|
248
248
|
initializeDragTarget() {
|
|
@@ -378,22 +378,22 @@ export class DragTargetDirective {
|
|
|
378
378
|
}
|
|
379
379
|
let eventArgs;
|
|
380
380
|
switch (event) {
|
|
381
|
-
case '
|
|
381
|
+
case 'onDragReady':
|
|
382
382
|
eventArgs = new DragTargetDragReadyEvent(eventProps);
|
|
383
383
|
break;
|
|
384
|
-
case '
|
|
384
|
+
case 'onPress':
|
|
385
385
|
eventArgs = new DragTargetPressEvent(eventProps);
|
|
386
386
|
break;
|
|
387
|
-
case '
|
|
387
|
+
case 'onDragStart':
|
|
388
388
|
eventArgs = new DragTargetDragStartEvent(eventProps);
|
|
389
389
|
break;
|
|
390
|
-
case '
|
|
390
|
+
case 'onDrag':
|
|
391
391
|
eventArgs = new DragTargetDragEvent(eventProps);
|
|
392
392
|
break;
|
|
393
|
-
case '
|
|
393
|
+
case 'onRelease':
|
|
394
394
|
eventArgs = new DragTargetReleaseEvent(eventProps);
|
|
395
395
|
break;
|
|
396
|
-
case '
|
|
396
|
+
case 'onDragEnd':
|
|
397
397
|
eventArgs = new DragTargetDragEndEvent(eventProps);
|
|
398
398
|
break;
|
|
399
399
|
default:
|
|
@@ -419,8 +419,10 @@ export class DragTargetDirective {
|
|
|
419
419
|
if (!this.dragStarted && this.threshold > 0) {
|
|
420
420
|
this.dragStarted = true;
|
|
421
421
|
}
|
|
422
|
-
|
|
423
|
-
|
|
422
|
+
if (elem) {
|
|
423
|
+
const styles = this.getStylesPerElement(elem);
|
|
424
|
+
setElementStyles(this.renderer, elem, styles);
|
|
425
|
+
}
|
|
424
426
|
}
|
|
425
427
|
calculatePosition(element, event) {
|
|
426
428
|
let position = null;
|
|
@@ -459,7 +461,7 @@ export class DragTargetDirective {
|
|
|
459
461
|
}
|
|
460
462
|
}
|
|
461
463
|
DragTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.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 });
|
|
462
|
-
DragTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragTargetDirective, selector: "[kendoDragTarget]", inputs: { hint: "hint", threshold: "threshold", autoScroll: "autoScroll", dragTargetId: "dragTargetId", dragDelay: "dragDelay", restrictByAxis: "restrictByAxis", mode: "mode", dragData: "dragData" }, outputs: {
|
|
464
|
+
DragTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragTargetDirective, 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 });
|
|
463
465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
464
466
|
type: Directive,
|
|
465
467
|
args: [{
|
|
@@ -482,17 +484,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
482
484
|
type: Input
|
|
483
485
|
}], dragData: [{
|
|
484
486
|
type: Input
|
|
485
|
-
}],
|
|
487
|
+
}], onPress: [{
|
|
486
488
|
type: Output
|
|
487
|
-
}],
|
|
489
|
+
}], onDragStart: [{
|
|
488
490
|
type: Output
|
|
489
|
-
}],
|
|
491
|
+
}], onDrag: [{
|
|
490
492
|
type: Output
|
|
491
|
-
}],
|
|
493
|
+
}], onDragReady: [{
|
|
492
494
|
type: Output
|
|
493
|
-
}],
|
|
495
|
+
}], onRelease: [{
|
|
494
496
|
type: Output
|
|
495
|
-
}],
|
|
497
|
+
}], onDragEnd: [{
|
|
496
498
|
type: Output
|
|
497
499
|
}], dragHandles: [{
|
|
498
500
|
type: ContentChildren,
|