@progress/kendo-angular-utils 12.2.0-develop.7 → 13.0.0-develop.10
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 +7 -7
- 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/dragtarget-container.directive.mjs +25 -26
- package/esm2020/drag-and-drop/dragtarget.directive.mjs +25 -25
- package/esm2020/drag-and-drop/droptarget-container.directive.mjs +13 -13
- package/esm2020/drag-and-drop/droptarget.directive.mjs +17 -23
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-utils.mjs +82 -89
- package/fesm2020/progress-kendo-angular-utils.mjs +82 -89
- package/package.json +3 -3
|
@@ -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
|
}
|
|
@@ -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:
|
|
@@ -583,7 +582,7 @@ export class DragTargetContainerDirective {
|
|
|
583
582
|
}
|
|
584
583
|
}
|
|
585
584
|
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: {
|
|
585
|
+
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
586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
588
587
|
type: Directive,
|
|
589
588
|
args: [{
|
|
@@ -608,16 +607,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
608
607
|
type: Input
|
|
609
608
|
}], mode: [{
|
|
610
609
|
type: Input
|
|
611
|
-
}],
|
|
610
|
+
}], onDragReady: [{
|
|
612
611
|
type: Output
|
|
613
|
-
}],
|
|
612
|
+
}], onPress: [{
|
|
614
613
|
type: Output
|
|
615
|
-
}],
|
|
614
|
+
}], onDragStart: [{
|
|
616
615
|
type: Output
|
|
617
|
-
}],
|
|
616
|
+
}], onDrag: [{
|
|
618
617
|
type: Output
|
|
619
|
-
}],
|
|
618
|
+
}], onRelease: [{
|
|
620
619
|
type: Output
|
|
621
|
-
}],
|
|
620
|
+
}], onDragEnd: [{
|
|
622
621
|
type: Output
|
|
623
622
|
}] } });
|
|
@@ -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;
|
|
@@ -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:
|
|
@@ -459,7 +459,7 @@ export class DragTargetDirective {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
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: {
|
|
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: { onPress: "onPress", onDragStart: "onDragStart", onDrag: "onDrag", onDragReady: "onDragReady", onRelease: "onRelease", onDragEnd: "onDragEnd" }, queries: [{ propertyName: "dragHandles", predicate: DragHandleDirective }], exportAs: ["kendoDragTarget"], ngImport: i0 });
|
|
463
463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
464
464
|
type: Directive,
|
|
465
465
|
args: [{
|
|
@@ -482,17 +482,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
482
482
|
type: Input
|
|
483
483
|
}], dragData: [{
|
|
484
484
|
type: Input
|
|
485
|
-
}],
|
|
485
|
+
}], onPress: [{
|
|
486
486
|
type: Output
|
|
487
|
-
}],
|
|
487
|
+
}], onDragStart: [{
|
|
488
488
|
type: Output
|
|
489
|
-
}],
|
|
489
|
+
}], onDrag: [{
|
|
490
490
|
type: Output
|
|
491
|
-
}],
|
|
491
|
+
}], onDragReady: [{
|
|
492
492
|
type: Output
|
|
493
|
-
}],
|
|
493
|
+
}], onRelease: [{
|
|
494
494
|
type: Output
|
|
495
|
-
}],
|
|
495
|
+
}], onDragEnd: [{
|
|
496
496
|
type: Output
|
|
497
497
|
}], dragHandles: [{
|
|
498
498
|
type: ContentChildren,
|
|
@@ -30,19 +30,19 @@ export class DropTargetContainerDirective {
|
|
|
30
30
|
/**
|
|
31
31
|
* Fires when a DragTarget element enters the DropTarget.
|
|
32
32
|
*/
|
|
33
|
-
this.
|
|
33
|
+
this.onDragEnter = new EventEmitter();
|
|
34
34
|
/**
|
|
35
35
|
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
36
36
|
*/
|
|
37
|
-
this.
|
|
37
|
+
this.onDragOver = new EventEmitter();
|
|
38
38
|
/**
|
|
39
39
|
* Fires when a DragTarget element leaves the DropTarget.
|
|
40
40
|
*/
|
|
41
|
-
this.
|
|
41
|
+
this.onDragLeave = new EventEmitter();
|
|
42
42
|
/**
|
|
43
43
|
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
44
44
|
*/
|
|
45
|
-
this.
|
|
45
|
+
this.onDrop = new EventEmitter();
|
|
46
46
|
this.currentDropTarget = null;
|
|
47
47
|
this.currentDropTargetElement = null;
|
|
48
48
|
this.previousDropTargets = [];
|
|
@@ -109,7 +109,7 @@ export class DropTargetContainerDirective {
|
|
|
109
109
|
this.currentDropTarget = this.service.dropTargets.find(dt => dt.element === this.currentDropTargetElement);
|
|
110
110
|
this.service.dropTarget = this.currentDropTarget;
|
|
111
111
|
this.service.dropIndex = this.getDropIndex();
|
|
112
|
-
this.emitZoneAwareEvent('
|
|
112
|
+
this.emitZoneAwareEvent('onDragEnter', event);
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
115
|
* @hidden
|
|
@@ -119,7 +119,7 @@ export class DropTargetContainerDirective {
|
|
|
119
119
|
if (!this.service.dragTarget) {
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
this.emitZoneAwareEvent('
|
|
122
|
+
this.emitZoneAwareEvent('onDragLeave', event);
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* @hidden
|
|
@@ -128,7 +128,7 @@ export class DropTargetContainerDirective {
|
|
|
128
128
|
if (!this.service.dragTarget) {
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
this.emitZoneAwareEvent('
|
|
131
|
+
this.emitZoneAwareEvent('onDragOver', event);
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* @hidden
|
|
@@ -137,7 +137,7 @@ export class DropTargetContainerDirective {
|
|
|
137
137
|
if (!this.service.dragTarget) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
-
this.emitZoneAwareEvent('
|
|
140
|
+
this.emitZoneAwareEvent('onDrop', event);
|
|
141
141
|
this.currentDropTarget = null;
|
|
142
142
|
this.currentDropTargetElement = null;
|
|
143
143
|
this.service.dropIndex = null;
|
|
@@ -203,7 +203,7 @@ export class DropTargetContainerDirective {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
DropTargetContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetContainerDirective, deps: [{ token: i1.DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
206
|
-
DropTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DropTargetContainerDirective, selector: "[kendoDropTargetContainer]", inputs: { dropTargetFilter: "dropTargetFilter", dropDisabled: "dropDisabled" }, outputs: {
|
|
206
|
+
DropTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DropTargetContainerDirective, selector: "[kendoDropTargetContainer]", inputs: { dropTargetFilter: "dropTargetFilter", dropDisabled: "dropDisabled" }, outputs: { onDragEnter: "onDragEnter", onDragOver: "onDragOver", onDragLeave: "onDragLeave", onDrop: "onDrop" }, exportAs: ["kendoDropTargetContainer"], ngImport: i0 });
|
|
207
207
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetContainerDirective, decorators: [{
|
|
208
208
|
type: Directive,
|
|
209
209
|
args: [{
|
|
@@ -214,12 +214,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
214
214
|
type: Input
|
|
215
215
|
}], dropDisabled: [{
|
|
216
216
|
type: Input
|
|
217
|
-
}],
|
|
217
|
+
}], onDragEnter: [{
|
|
218
218
|
type: Output
|
|
219
|
-
}],
|
|
219
|
+
}], onDragOver: [{
|
|
220
220
|
type: Output
|
|
221
|
-
}],
|
|
221
|
+
}], onDragLeave: [{
|
|
222
222
|
type: Output
|
|
223
|
-
}],
|
|
223
|
+
}], onDrop: [{
|
|
224
224
|
type: Output
|
|
225
225
|
}] } });
|
|
@@ -21,19 +21,19 @@ export class DropTargetDirective {
|
|
|
21
21
|
/**
|
|
22
22
|
* Fires when a DragTarget element enters the DropTarget.
|
|
23
23
|
*/
|
|
24
|
-
this.
|
|
24
|
+
this.onDragEnter = new EventEmitter();
|
|
25
25
|
/**
|
|
26
26
|
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
27
27
|
*/
|
|
28
|
-
this.
|
|
28
|
+
this.onDragOver = new EventEmitter();
|
|
29
29
|
/**
|
|
30
30
|
* Fires when a DragTarget element leaves the DropTarget.
|
|
31
31
|
*/
|
|
32
|
-
this.
|
|
32
|
+
this.onDragLeave = new EventEmitter();
|
|
33
33
|
/**
|
|
34
34
|
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
35
35
|
*/
|
|
36
|
-
this.
|
|
36
|
+
this.onDrop = new EventEmitter();
|
|
37
37
|
validatePackage(packageMetadata);
|
|
38
38
|
}
|
|
39
39
|
ngOnInit() {
|
|
@@ -48,9 +48,7 @@ export class DropTargetDirective {
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
this.service.dropTarget = this.dropTarget;
|
|
51
|
-
this.
|
|
52
|
-
this.emitEvent('dragEnter', event);
|
|
53
|
-
});
|
|
51
|
+
this.emitZoneAwareEvent('onDragEnter', event);
|
|
54
52
|
}
|
|
55
53
|
/**
|
|
56
54
|
* @hidden
|
|
@@ -60,9 +58,7 @@ export class DropTargetDirective {
|
|
|
60
58
|
if (!this.service.dragTarget) {
|
|
61
59
|
return;
|
|
62
60
|
}
|
|
63
|
-
this.
|
|
64
|
-
this.emitEvent('dragLeave', event);
|
|
65
|
-
});
|
|
61
|
+
this.emitZoneAwareEvent('onDragLeave', event);
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
68
64
|
* @hidden
|
|
@@ -71,17 +67,13 @@ export class DropTargetDirective {
|
|
|
71
67
|
if (!this.service.dragTarget) {
|
|
72
68
|
return;
|
|
73
69
|
}
|
|
74
|
-
this.
|
|
75
|
-
this.emitEvent('dragOver', event);
|
|
76
|
-
});
|
|
70
|
+
this.emitZoneAwareEvent('onDragOver', event);
|
|
77
71
|
}
|
|
78
72
|
/**
|
|
79
73
|
* @hidden
|
|
80
74
|
*/
|
|
81
75
|
handleDrop(event) {
|
|
82
|
-
this.
|
|
83
|
-
this.emitEvent('drop', event);
|
|
84
|
-
});
|
|
76
|
+
this.emitZoneAwareEvent('onDrop', event);
|
|
85
77
|
}
|
|
86
78
|
initializeDropTarget() {
|
|
87
79
|
this.dropTarget = {
|
|
@@ -92,7 +84,7 @@ export class DropTargetDirective {
|
|
|
92
84
|
onDrop: this.handleDrop.bind(this)
|
|
93
85
|
};
|
|
94
86
|
}
|
|
95
|
-
|
|
87
|
+
emitZoneAwareEvent(event, normalizedEvent) {
|
|
96
88
|
const eventProps = {
|
|
97
89
|
dropTarget: this.element.nativeElement,
|
|
98
90
|
dragTarget: this.service.dragTarget?.element,
|
|
@@ -103,23 +95,25 @@ export class DropTargetDirective {
|
|
|
103
95
|
eventProps.hintElement = this.service.dragTarget.element;
|
|
104
96
|
}
|
|
105
97
|
const eventArgs = new DropTargetEvent(eventProps);
|
|
106
|
-
this
|
|
98
|
+
this.ngZone.run(() => {
|
|
99
|
+
this[event].emit(eventArgs);
|
|
100
|
+
});
|
|
107
101
|
}
|
|
108
102
|
}
|
|
109
103
|
DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetDirective, deps: [{ token: i1.DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
110
|
-
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DropTargetDirective, selector: "[kendoDropTarget]", outputs: {
|
|
104
|
+
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DropTargetDirective, selector: "[kendoDropTarget]", outputs: { onDragEnter: "onDragEnter", onDragOver: "onDragOver", onDragLeave: "onDragLeave", onDrop: "onDrop" }, exportAs: ["kendoDropTarget"], ngImport: i0 });
|
|
111
105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
112
106
|
type: Directive,
|
|
113
107
|
args: [{
|
|
114
108
|
selector: '[kendoDropTarget]',
|
|
115
109
|
exportAs: 'kendoDropTarget'
|
|
116
110
|
}]
|
|
117
|
-
}], ctorParameters: function () { return [{ type: i1.DragStateService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: {
|
|
111
|
+
}], ctorParameters: function () { return [{ type: i1.DragStateService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { onDragEnter: [{
|
|
118
112
|
type: Output
|
|
119
|
-
}],
|
|
113
|
+
}], onDragOver: [{
|
|
120
114
|
type: Output
|
|
121
|
-
}],
|
|
115
|
+
}], onDragLeave: [{
|
|
122
116
|
type: Output
|
|
123
|
-
}],
|
|
117
|
+
}], onDrop: [{
|
|
124
118
|
type: Output
|
|
125
119
|
}] } });
|