@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
|
@@ -19,8 +19,8 @@ const packageMetadata = {
|
|
|
19
19
|
name: '@progress/kendo-angular-utils',
|
|
20
20
|
productName: 'Kendo UI for Angular',
|
|
21
21
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
22
|
-
publishDate:
|
|
23
|
-
version: '13.0.0-develop.
|
|
22
|
+
publishDate: 1685960940,
|
|
23
|
+
version: '13.0.0-develop.20',
|
|
24
24
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ class DragHandleDirective {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
DragHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragHandleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
38
|
-
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragHandleDirective, selector: "[kendoDragHandle]", host: { properties: { "class.k-cursor-
|
|
38
|
+
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 });
|
|
39
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragHandleDirective, decorators: [{
|
|
40
40
|
type: Directive,
|
|
41
41
|
args: [{
|
|
@@ -44,7 +44,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
44
44
|
}]
|
|
45
45
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
|
|
46
46
|
type: HostBinding,
|
|
47
|
-
args: ['class.k-cursor-
|
|
47
|
+
args: ['class.k-cursor-move']
|
|
48
48
|
}] } });
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -489,27 +489,27 @@ class DragTargetDirective {
|
|
|
489
489
|
/**
|
|
490
490
|
* Fires when the user presses the DragTarget element.
|
|
491
491
|
*/
|
|
492
|
-
this.
|
|
492
|
+
this.onPress = new EventEmitter();
|
|
493
493
|
/**
|
|
494
494
|
* Fires when the dragging of the DragTarget element begins.
|
|
495
495
|
*/
|
|
496
|
-
this.
|
|
496
|
+
this.onDragStart = new EventEmitter();
|
|
497
497
|
/**
|
|
498
498
|
* Fires while the user drags the DragTarget element.
|
|
499
499
|
*/
|
|
500
|
-
this.
|
|
500
|
+
this.onDrag = new EventEmitter();
|
|
501
501
|
/**
|
|
502
502
|
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
503
503
|
*/
|
|
504
|
-
this.
|
|
504
|
+
this.onDragReady = new EventEmitter();
|
|
505
505
|
/**
|
|
506
506
|
* Fires when the user releases the DragTarget element after being pressed.
|
|
507
507
|
*/
|
|
508
|
-
this.
|
|
508
|
+
this.onRelease = new EventEmitter();
|
|
509
509
|
/**
|
|
510
510
|
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
511
511
|
*/
|
|
512
|
-
this.
|
|
512
|
+
this.onDragEnd = new EventEmitter();
|
|
513
513
|
this.dragTarget = null;
|
|
514
514
|
this.domSubscriptions = [];
|
|
515
515
|
this.hintComponent = null;
|
|
@@ -576,7 +576,7 @@ class DragTargetDirective {
|
|
|
576
576
|
if (isPresent(this.element) || isPresent(this.dragTarget)) {
|
|
577
577
|
this.attachDomHandlers();
|
|
578
578
|
if (!this.dragHandles.length) {
|
|
579
|
-
this.renderer.addClass(this.nativeElement, 'k-cursor-
|
|
579
|
+
this.renderer.addClass(this.nativeElement, 'k-cursor-move');
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
this.service.dragTargets.push(this.dragTarget);
|
|
@@ -588,14 +588,14 @@ class DragTargetDirective {
|
|
|
588
588
|
if (this.dragDelay > 0) {
|
|
589
589
|
this.dragTimeout = window.setTimeout(() => {
|
|
590
590
|
this.pressed = true;
|
|
591
|
-
this.emitZoneAwareEvent('
|
|
591
|
+
this.emitZoneAwareEvent('onDragReady', event);
|
|
592
592
|
}, this.dragDelay);
|
|
593
593
|
}
|
|
594
594
|
else {
|
|
595
595
|
this.pressed = true;
|
|
596
596
|
}
|
|
597
597
|
this.scrollableParent = this.dragTarget.element ? getScrollableParent(this.dragTarget.element) : null;
|
|
598
|
-
this.emitZoneAwareEvent('
|
|
598
|
+
this.emitZoneAwareEvent('onPress', event);
|
|
599
599
|
}
|
|
600
600
|
handleDragStart(event) {
|
|
601
601
|
if (!this.pressed) {
|
|
@@ -605,7 +605,7 @@ class DragTargetDirective {
|
|
|
605
605
|
}
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
|
-
isDragStartPrevented$1 = this.emitZoneAwareEvent('
|
|
608
|
+
isDragStartPrevented$1 = this.emitZoneAwareEvent('onDragStart', event).isDefaultPrevented();
|
|
609
609
|
if (isDragStartPrevented$1) {
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
@@ -628,7 +628,7 @@ class DragTargetDirective {
|
|
|
628
628
|
if (!this.pressed || isDragStartPrevented$1) {
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
|
-
isDragPrevented$1 = this.emitZoneAwareEvent('
|
|
631
|
+
isDragPrevented$1 = this.emitZoneAwareEvent('onDrag', event).isDefaultPrevented();
|
|
632
632
|
if (isDragPrevented$1) {
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
@@ -645,7 +645,7 @@ class DragTargetDirective {
|
|
|
645
645
|
this.dragTimeout = null;
|
|
646
646
|
this.pressed = false;
|
|
647
647
|
}
|
|
648
|
-
this.emitZoneAwareEvent('
|
|
648
|
+
this.emitZoneAwareEvent('onRelease', event);
|
|
649
649
|
}
|
|
650
650
|
handleDragEnd(event) {
|
|
651
651
|
if (this.mode === 'auto') {
|
|
@@ -670,7 +670,7 @@ class DragTargetDirective {
|
|
|
670
670
|
if (!this.dragStarted || isDragStartPrevented$1 || isDragPrevented$1) {
|
|
671
671
|
return;
|
|
672
672
|
}
|
|
673
|
-
this.emitZoneAwareEvent('
|
|
673
|
+
this.emitZoneAwareEvent('onDragEnd', event);
|
|
674
674
|
this.dragStarted = false;
|
|
675
675
|
}
|
|
676
676
|
initializeDragTarget() {
|
|
@@ -806,22 +806,22 @@ class DragTargetDirective {
|
|
|
806
806
|
}
|
|
807
807
|
let eventArgs;
|
|
808
808
|
switch (event) {
|
|
809
|
-
case '
|
|
809
|
+
case 'onDragReady':
|
|
810
810
|
eventArgs = new DragTargetDragReadyEvent(eventProps);
|
|
811
811
|
break;
|
|
812
|
-
case '
|
|
812
|
+
case 'onPress':
|
|
813
813
|
eventArgs = new DragTargetPressEvent(eventProps);
|
|
814
814
|
break;
|
|
815
|
-
case '
|
|
815
|
+
case 'onDragStart':
|
|
816
816
|
eventArgs = new DragTargetDragStartEvent(eventProps);
|
|
817
817
|
break;
|
|
818
|
-
case '
|
|
818
|
+
case 'onDrag':
|
|
819
819
|
eventArgs = new DragTargetDragEvent(eventProps);
|
|
820
820
|
break;
|
|
821
|
-
case '
|
|
821
|
+
case 'onRelease':
|
|
822
822
|
eventArgs = new DragTargetReleaseEvent(eventProps);
|
|
823
823
|
break;
|
|
824
|
-
case '
|
|
824
|
+
case 'onDragEnd':
|
|
825
825
|
eventArgs = new DragTargetDragEndEvent(eventProps);
|
|
826
826
|
break;
|
|
827
827
|
default:
|
|
@@ -847,8 +847,10 @@ class DragTargetDirective {
|
|
|
847
847
|
if (!this.dragStarted && this.threshold > 0) {
|
|
848
848
|
this.dragStarted = true;
|
|
849
849
|
}
|
|
850
|
-
|
|
851
|
-
|
|
850
|
+
if (elem) {
|
|
851
|
+
const styles = this.getStylesPerElement(elem);
|
|
852
|
+
setElementStyles(this.renderer, elem, styles);
|
|
853
|
+
}
|
|
852
854
|
}
|
|
853
855
|
calculatePosition(element, event) {
|
|
854
856
|
let position = null;
|
|
@@ -887,7 +889,7 @@ class DragTargetDirective {
|
|
|
887
889
|
}
|
|
888
890
|
}
|
|
889
891
|
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: DragStateService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
890
|
-
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: {
|
|
892
|
+
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 });
|
|
891
893
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
892
894
|
type: Directive,
|
|
893
895
|
args: [{
|
|
@@ -910,17 +912,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
910
912
|
type: Input
|
|
911
913
|
}], dragData: [{
|
|
912
914
|
type: Input
|
|
913
|
-
}],
|
|
915
|
+
}], onPress: [{
|
|
914
916
|
type: Output
|
|
915
|
-
}],
|
|
917
|
+
}], onDragStart: [{
|
|
916
918
|
type: Output
|
|
917
|
-
}],
|
|
919
|
+
}], onDrag: [{
|
|
918
920
|
type: Output
|
|
919
|
-
}],
|
|
921
|
+
}], onDragReady: [{
|
|
920
922
|
type: Output
|
|
921
|
-
}],
|
|
923
|
+
}], onRelease: [{
|
|
922
924
|
type: Output
|
|
923
|
-
}],
|
|
925
|
+
}], onDragEnd: [{
|
|
924
926
|
type: Output
|
|
925
927
|
}], dragHandles: [{
|
|
926
928
|
type: ContentChildren,
|
|
@@ -964,19 +966,19 @@ class DropTargetDirective {
|
|
|
964
966
|
/**
|
|
965
967
|
* Fires when a DragTarget element enters the DropTarget.
|
|
966
968
|
*/
|
|
967
|
-
this.
|
|
969
|
+
this.onDragEnter = new EventEmitter();
|
|
968
970
|
/**
|
|
969
971
|
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
970
972
|
*/
|
|
971
|
-
this.
|
|
973
|
+
this.onDragOver = new EventEmitter();
|
|
972
974
|
/**
|
|
973
975
|
* Fires when a DragTarget element leaves the DropTarget.
|
|
974
976
|
*/
|
|
975
|
-
this.
|
|
977
|
+
this.onDragLeave = new EventEmitter();
|
|
976
978
|
/**
|
|
977
979
|
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
978
980
|
*/
|
|
979
|
-
this.
|
|
981
|
+
this.onDrop = new EventEmitter();
|
|
980
982
|
validatePackage(packageMetadata);
|
|
981
983
|
}
|
|
982
984
|
ngOnInit() {
|
|
@@ -991,9 +993,7 @@ class DropTargetDirective {
|
|
|
991
993
|
return;
|
|
992
994
|
}
|
|
993
995
|
this.service.dropTarget = this.dropTarget;
|
|
994
|
-
this.
|
|
995
|
-
this.emitEvent('dragEnter', event);
|
|
996
|
-
});
|
|
996
|
+
this.emitZoneAwareEvent('onDragEnter', event);
|
|
997
997
|
}
|
|
998
998
|
/**
|
|
999
999
|
* @hidden
|
|
@@ -1003,9 +1003,7 @@ class DropTargetDirective {
|
|
|
1003
1003
|
if (!this.service.dragTarget) {
|
|
1004
1004
|
return;
|
|
1005
1005
|
}
|
|
1006
|
-
this.
|
|
1007
|
-
this.emitEvent('dragLeave', event);
|
|
1008
|
-
});
|
|
1006
|
+
this.emitZoneAwareEvent('onDragLeave', event);
|
|
1009
1007
|
}
|
|
1010
1008
|
/**
|
|
1011
1009
|
* @hidden
|
|
@@ -1014,17 +1012,13 @@ class DropTargetDirective {
|
|
|
1014
1012
|
if (!this.service.dragTarget) {
|
|
1015
1013
|
return;
|
|
1016
1014
|
}
|
|
1017
|
-
this.
|
|
1018
|
-
this.emitEvent('dragOver', event);
|
|
1019
|
-
});
|
|
1015
|
+
this.emitZoneAwareEvent('onDragOver', event);
|
|
1020
1016
|
}
|
|
1021
1017
|
/**
|
|
1022
1018
|
* @hidden
|
|
1023
1019
|
*/
|
|
1024
1020
|
handleDrop(event) {
|
|
1025
|
-
this.
|
|
1026
|
-
this.emitEvent('drop', event);
|
|
1027
|
-
});
|
|
1021
|
+
this.emitZoneAwareEvent('onDrop', event);
|
|
1028
1022
|
}
|
|
1029
1023
|
initializeDropTarget() {
|
|
1030
1024
|
this.dropTarget = {
|
|
@@ -1035,7 +1029,7 @@ class DropTargetDirective {
|
|
|
1035
1029
|
onDrop: this.handleDrop.bind(this)
|
|
1036
1030
|
};
|
|
1037
1031
|
}
|
|
1038
|
-
|
|
1032
|
+
emitZoneAwareEvent(event, normalizedEvent) {
|
|
1039
1033
|
const eventProps = {
|
|
1040
1034
|
dropTarget: this.element.nativeElement,
|
|
1041
1035
|
dragTarget: this.service.dragTarget?.element,
|
|
@@ -1046,24 +1040,26 @@ class DropTargetDirective {
|
|
|
1046
1040
|
eventProps.hintElement = this.service.dragTarget.element;
|
|
1047
1041
|
}
|
|
1048
1042
|
const eventArgs = new DropTargetEvent(eventProps);
|
|
1049
|
-
this
|
|
1043
|
+
this.ngZone.run(() => {
|
|
1044
|
+
this[event].emit(eventArgs);
|
|
1045
|
+
});
|
|
1050
1046
|
}
|
|
1051
1047
|
}
|
|
1052
1048
|
DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetDirective, deps: [{ token: DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1053
|
-
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DropTargetDirective, selector: "[kendoDropTarget]", outputs: {
|
|
1049
|
+
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 });
|
|
1054
1050
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
1055
1051
|
type: Directive,
|
|
1056
1052
|
args: [{
|
|
1057
1053
|
selector: '[kendoDropTarget]',
|
|
1058
1054
|
exportAs: 'kendoDropTarget'
|
|
1059
1055
|
}]
|
|
1060
|
-
}], ctorParameters: function () { return [{ type: DragStateService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: {
|
|
1056
|
+
}], ctorParameters: function () { return [{ type: DragStateService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { onDragEnter: [{
|
|
1061
1057
|
type: Output
|
|
1062
|
-
}],
|
|
1058
|
+
}], onDragOver: [{
|
|
1063
1059
|
type: Output
|
|
1064
|
-
}],
|
|
1060
|
+
}], onDragLeave: [{
|
|
1065
1061
|
type: Output
|
|
1066
|
-
}],
|
|
1062
|
+
}], onDrop: [{
|
|
1067
1063
|
type: Output
|
|
1068
1064
|
}] } });
|
|
1069
1065
|
|
|
@@ -1089,13 +1085,13 @@ class DragTargetContainerDirective {
|
|
|
1089
1085
|
this.viewContainer = viewContainer;
|
|
1090
1086
|
this.cdr = cdr;
|
|
1091
1087
|
/**
|
|
1092
|
-
* Defines whether a hint will be used for dragging. By default, the hint is a copy of the current drag target. ([see example]({% slug
|
|
1088
|
+
* 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 %})).
|
|
1093
1089
|
*
|
|
1094
1090
|
* @default false
|
|
1095
1091
|
*/
|
|
1096
1092
|
this.hint = false;
|
|
1097
1093
|
/**
|
|
1098
|
-
* Defines the delay in milliseconds after which the drag will begin ([see example](
|
|
1094
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example](slug drag_target_container#toc-events)).
|
|
1099
1095
|
*
|
|
1100
1096
|
* @default 0
|
|
1101
1097
|
*/
|
|
@@ -1115,27 +1111,27 @@ class DragTargetContainerDirective {
|
|
|
1115
1111
|
/**
|
|
1116
1112
|
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
1117
1113
|
*/
|
|
1118
|
-
this.
|
|
1114
|
+
this.onDragReady = new EventEmitter();
|
|
1119
1115
|
/**
|
|
1120
1116
|
* Fires when the user presses a DragTarget element.
|
|
1121
1117
|
*/
|
|
1122
|
-
this.
|
|
1118
|
+
this.onPress = new EventEmitter();
|
|
1123
1119
|
/**
|
|
1124
1120
|
* Fires when the dragging of a DragTarget element begins.
|
|
1125
1121
|
*/
|
|
1126
|
-
this.
|
|
1122
|
+
this.onDragStart = new EventEmitter();
|
|
1127
1123
|
/**
|
|
1128
1124
|
* Fires while the user drags a DragTarget element.
|
|
1129
1125
|
*/
|
|
1130
|
-
this.
|
|
1126
|
+
this.onDrag = new EventEmitter();
|
|
1131
1127
|
/**
|
|
1132
1128
|
* Fires when the user releases a DragTarget element after being pressed.
|
|
1133
1129
|
*/
|
|
1134
|
-
this.
|
|
1130
|
+
this.onRelease = new EventEmitter();
|
|
1135
1131
|
/**
|
|
1136
1132
|
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
1137
1133
|
*/
|
|
1138
|
-
this.
|
|
1134
|
+
this.onDragEnd = new EventEmitter();
|
|
1139
1135
|
this.currentDragTarget = null;
|
|
1140
1136
|
this.dragTimeout = null;
|
|
1141
1137
|
this.pressed = false;
|
|
@@ -1266,7 +1262,7 @@ class DragTargetContainerDirective {
|
|
|
1266
1262
|
if (this.dragDelay > 0) {
|
|
1267
1263
|
this.dragTimeout = window.setTimeout(() => {
|
|
1268
1264
|
this.pressed = true;
|
|
1269
|
-
this.emitZoneAwareEvent('
|
|
1265
|
+
this.emitZoneAwareEvent('onDragReady', event);
|
|
1270
1266
|
}, this.dragDelay);
|
|
1271
1267
|
}
|
|
1272
1268
|
else {
|
|
@@ -1277,7 +1273,7 @@ class DragTargetContainerDirective {
|
|
|
1277
1273
|
this.currentDragTarget.element = this.currentDragTargetElement;
|
|
1278
1274
|
this.service.dragIndex = this.getDragIndex();
|
|
1279
1275
|
this.scrollableParent = this.hintTemplate ? document.body : this.currentDragTargetElement ? getScrollableParent(this.currentDragTargetElement) : null;
|
|
1280
|
-
this.emitZoneAwareEvent('
|
|
1276
|
+
this.emitZoneAwareEvent('onPress', event);
|
|
1281
1277
|
}
|
|
1282
1278
|
handleDragStart(event) {
|
|
1283
1279
|
if (!this.pressed) {
|
|
@@ -1287,7 +1283,7 @@ class DragTargetContainerDirective {
|
|
|
1287
1283
|
}
|
|
1288
1284
|
return;
|
|
1289
1285
|
}
|
|
1290
|
-
isDragStartPrevented = this.emitZoneAwareEvent('
|
|
1286
|
+
isDragStartPrevented = this.emitZoneAwareEvent('onDragStart', event).isDefaultPrevented();
|
|
1291
1287
|
if (isDragStartPrevented) {
|
|
1292
1288
|
return;
|
|
1293
1289
|
}
|
|
@@ -1310,7 +1306,7 @@ class DragTargetContainerDirective {
|
|
|
1310
1306
|
if (!this.pressed || isDragStartPrevented) {
|
|
1311
1307
|
return;
|
|
1312
1308
|
}
|
|
1313
|
-
isDragPrevented = this.emitZoneAwareEvent('
|
|
1309
|
+
isDragPrevented = this.emitZoneAwareEvent('onDrag', event).isDefaultPrevented();
|
|
1314
1310
|
if (isDragPrevented) {
|
|
1315
1311
|
return;
|
|
1316
1312
|
}
|
|
@@ -1320,7 +1316,6 @@ class DragTargetContainerDirective {
|
|
|
1320
1316
|
else {
|
|
1321
1317
|
this.dragStarted = true;
|
|
1322
1318
|
}
|
|
1323
|
-
this.dragStarted && this.emitZoneAwareEvent('drag', event);
|
|
1324
1319
|
}
|
|
1325
1320
|
handleRelease(event) {
|
|
1326
1321
|
if (this.dragStarted) {
|
|
@@ -1331,7 +1326,7 @@ class DragTargetContainerDirective {
|
|
|
1331
1326
|
this.dragTimeout = null;
|
|
1332
1327
|
this.pressed = false;
|
|
1333
1328
|
}
|
|
1334
|
-
this.emitZoneAwareEvent('
|
|
1329
|
+
this.emitZoneAwareEvent('onRelease', event);
|
|
1335
1330
|
}
|
|
1336
1331
|
handleDragEnd(event) {
|
|
1337
1332
|
if (!this.dragStarted) {
|
|
@@ -1357,7 +1352,7 @@ class DragTargetContainerDirective {
|
|
|
1357
1352
|
this.service.dragTarget = null;
|
|
1358
1353
|
this.service.dragIndex = null;
|
|
1359
1354
|
this.currentDragTarget.element = null;
|
|
1360
|
-
this.emitZoneAwareEvent('
|
|
1355
|
+
this.emitZoneAwareEvent('onDragEnd', event);
|
|
1361
1356
|
if (isDragStartPrevented || isDragPrevented) {
|
|
1362
1357
|
return;
|
|
1363
1358
|
}
|
|
@@ -1428,22 +1423,22 @@ class DragTargetContainerDirective {
|
|
|
1428
1423
|
}
|
|
1429
1424
|
let eventArgs;
|
|
1430
1425
|
switch (event) {
|
|
1431
|
-
case '
|
|
1426
|
+
case 'onDragReady':
|
|
1432
1427
|
eventArgs = new DragTargetDragReadyEvent(eventProps);
|
|
1433
1428
|
break;
|
|
1434
|
-
case '
|
|
1429
|
+
case 'onPress':
|
|
1435
1430
|
eventArgs = new DragTargetPressEvent(eventProps);
|
|
1436
1431
|
break;
|
|
1437
|
-
case '
|
|
1432
|
+
case 'onDragStart':
|
|
1438
1433
|
eventArgs = new DragTargetDragStartEvent(eventProps);
|
|
1439
1434
|
break;
|
|
1440
|
-
case '
|
|
1435
|
+
case 'onDrag':
|
|
1441
1436
|
eventArgs = new DragTargetDragEvent(eventProps);
|
|
1442
1437
|
break;
|
|
1443
|
-
case '
|
|
1438
|
+
case 'onRelease':
|
|
1444
1439
|
eventArgs = new DragTargetReleaseEvent(eventProps);
|
|
1445
1440
|
break;
|
|
1446
|
-
case '
|
|
1441
|
+
case 'onDragEnd':
|
|
1447
1442
|
eventArgs = new DragTargetDragEndEvent(eventProps);
|
|
1448
1443
|
break;
|
|
1449
1444
|
default:
|
|
@@ -1568,12 +1563,12 @@ class DragTargetContainerDirective {
|
|
|
1568
1563
|
}
|
|
1569
1564
|
if (isPresent(this.dragHandles) && this.dragHandles.length > 0) {
|
|
1570
1565
|
this.dragHandles.forEach(handle => {
|
|
1571
|
-
this.renderer.addClass(handle, 'k-cursor-
|
|
1566
|
+
this.renderer.addClass(handle, 'k-cursor-move');
|
|
1572
1567
|
});
|
|
1573
1568
|
}
|
|
1574
1569
|
else {
|
|
1575
1570
|
this.allDragTargets.forEach(target => {
|
|
1576
|
-
this.renderer.addClass(target, 'k-cursor-
|
|
1571
|
+
this.renderer.addClass(target, 'k-cursor-move');
|
|
1577
1572
|
});
|
|
1578
1573
|
}
|
|
1579
1574
|
}
|
|
@@ -1601,8 +1596,10 @@ class DragTargetContainerDirective {
|
|
|
1601
1596
|
if (!this.dragStarted && this.threshold > 0) {
|
|
1602
1597
|
this.dragStarted = true;
|
|
1603
1598
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1599
|
+
if (elem) {
|
|
1600
|
+
const styles = this.getStylesPerElement(elem);
|
|
1601
|
+
setElementStyles(this.renderer, elem, styles);
|
|
1602
|
+
}
|
|
1606
1603
|
}
|
|
1607
1604
|
calculatePosition(element, event) {
|
|
1608
1605
|
let position = null;
|
|
@@ -1635,7 +1632,7 @@ class DragTargetContainerDirective {
|
|
|
1635
1632
|
}
|
|
1636
1633
|
}
|
|
1637
1634
|
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: DragStateService }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1638
|
-
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: {
|
|
1635
|
+
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 });
|
|
1639
1636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
1640
1637
|
type: Directive,
|
|
1641
1638
|
args: [{
|
|
@@ -1660,17 +1657,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1660
1657
|
type: Input
|
|
1661
1658
|
}], mode: [{
|
|
1662
1659
|
type: Input
|
|
1663
|
-
}],
|
|
1660
|
+
}], onDragReady: [{
|
|
1664
1661
|
type: Output
|
|
1665
|
-
}],
|
|
1662
|
+
}], onPress: [{
|
|
1666
1663
|
type: Output
|
|
1667
|
-
}],
|
|
1664
|
+
}], onDragStart: [{
|
|
1668
1665
|
type: Output
|
|
1669
|
-
}],
|
|
1666
|
+
}], onDrag: [{
|
|
1670
1667
|
type: Output
|
|
1671
|
-
}],
|
|
1668
|
+
}], onRelease: [{
|
|
1672
1669
|
type: Output
|
|
1673
|
-
}],
|
|
1670
|
+
}], onDragEnd: [{
|
|
1674
1671
|
type: Output
|
|
1675
1672
|
}] } });
|
|
1676
1673
|
|
|
@@ -1694,19 +1691,19 @@ class DropTargetContainerDirective {
|
|
|
1694
1691
|
/**
|
|
1695
1692
|
* Fires when a DragTarget element enters the DropTarget.
|
|
1696
1693
|
*/
|
|
1697
|
-
this.
|
|
1694
|
+
this.onDragEnter = new EventEmitter();
|
|
1698
1695
|
/**
|
|
1699
1696
|
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
1700
1697
|
*/
|
|
1701
|
-
this.
|
|
1698
|
+
this.onDragOver = new EventEmitter();
|
|
1702
1699
|
/**
|
|
1703
1700
|
* Fires when a DragTarget element leaves the DropTarget.
|
|
1704
1701
|
*/
|
|
1705
|
-
this.
|
|
1702
|
+
this.onDragLeave = new EventEmitter();
|
|
1706
1703
|
/**
|
|
1707
1704
|
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
1708
1705
|
*/
|
|
1709
|
-
this.
|
|
1706
|
+
this.onDrop = new EventEmitter();
|
|
1710
1707
|
this.currentDropTarget = null;
|
|
1711
1708
|
this.currentDropTargetElement = null;
|
|
1712
1709
|
this.previousDropTargets = [];
|
|
@@ -1773,7 +1770,7 @@ class DropTargetContainerDirective {
|
|
|
1773
1770
|
this.currentDropTarget = this.service.dropTargets.find(dt => dt.element === this.currentDropTargetElement);
|
|
1774
1771
|
this.service.dropTarget = this.currentDropTarget;
|
|
1775
1772
|
this.service.dropIndex = this.getDropIndex();
|
|
1776
|
-
this.emitZoneAwareEvent('
|
|
1773
|
+
this.emitZoneAwareEvent('onDragEnter', event);
|
|
1777
1774
|
}
|
|
1778
1775
|
/**
|
|
1779
1776
|
* @hidden
|
|
@@ -1783,7 +1780,7 @@ class DropTargetContainerDirective {
|
|
|
1783
1780
|
if (!this.service.dragTarget) {
|
|
1784
1781
|
return;
|
|
1785
1782
|
}
|
|
1786
|
-
this.emitZoneAwareEvent('
|
|
1783
|
+
this.emitZoneAwareEvent('onDragLeave', event);
|
|
1787
1784
|
}
|
|
1788
1785
|
/**
|
|
1789
1786
|
* @hidden
|
|
@@ -1792,7 +1789,7 @@ class DropTargetContainerDirective {
|
|
|
1792
1789
|
if (!this.service.dragTarget) {
|
|
1793
1790
|
return;
|
|
1794
1791
|
}
|
|
1795
|
-
this.emitZoneAwareEvent('
|
|
1792
|
+
this.emitZoneAwareEvent('onDragOver', event);
|
|
1796
1793
|
}
|
|
1797
1794
|
/**
|
|
1798
1795
|
* @hidden
|
|
@@ -1801,7 +1798,7 @@ class DropTargetContainerDirective {
|
|
|
1801
1798
|
if (!this.service.dragTarget) {
|
|
1802
1799
|
return;
|
|
1803
1800
|
}
|
|
1804
|
-
this.emitZoneAwareEvent('
|
|
1801
|
+
this.emitZoneAwareEvent('onDrop', event);
|
|
1805
1802
|
this.currentDropTarget = null;
|
|
1806
1803
|
this.currentDropTargetElement = null;
|
|
1807
1804
|
this.service.dropIndex = null;
|
|
@@ -1838,7 +1835,7 @@ class DropTargetContainerDirective {
|
|
|
1838
1835
|
}
|
|
1839
1836
|
emitZoneAwareEvent(event, normalizedEvent) {
|
|
1840
1837
|
const eventProps = {
|
|
1841
|
-
dragTarget: this.service.dragTarget,
|
|
1838
|
+
dragTarget: this.service.dragTarget?.element,
|
|
1842
1839
|
dropTarget: this.currentDropTargetElement,
|
|
1843
1840
|
dragData: this.service.dragData,
|
|
1844
1841
|
dragEvent: normalizedEvent,
|
|
@@ -1867,7 +1864,7 @@ class DropTargetContainerDirective {
|
|
|
1867
1864
|
}
|
|
1868
1865
|
}
|
|
1869
1866
|
DropTargetContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetContainerDirective, deps: [{ token: DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1870
|
-
DropTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DropTargetContainerDirective, selector: "[kendoDropTargetContainer]", inputs: { dropTargetFilter: "dropTargetFilter", dropDisabled: "dropDisabled" }, outputs: {
|
|
1867
|
+
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 });
|
|
1871
1868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropTargetContainerDirective, decorators: [{
|
|
1872
1869
|
type: Directive,
|
|
1873
1870
|
args: [{
|
|
@@ -1878,13 +1875,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1878
1875
|
type: Input
|
|
1879
1876
|
}], dropDisabled: [{
|
|
1880
1877
|
type: Input
|
|
1881
|
-
}],
|
|
1878
|
+
}], onDragEnter: [{
|
|
1882
1879
|
type: Output
|
|
1883
|
-
}],
|
|
1880
|
+
}], onDragOver: [{
|
|
1884
1881
|
type: Output
|
|
1885
|
-
}],
|
|
1882
|
+
}], onDragLeave: [{
|
|
1886
1883
|
type: Output
|
|
1887
|
-
}],
|
|
1884
|
+
}], onDrop: [{
|
|
1888
1885
|
type: Output
|
|
1889
1886
|
}] } });
|
|
1890
1887
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-utils",
|
|
3
|
-
"version": "13.0.0-develop.
|
|
3
|
+
"version": "13.0.0-develop.20",
|
|
4
4
|
"description": "Kendo UI Angular utils component",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"@angular/core": "13 - 16",
|
|
24
24
|
"@angular/platform-browser": "13 - 16",
|
|
25
25
|
"@progress/kendo-licensing": "^1.0.2",
|
|
26
|
-
"@progress/kendo-angular-common": "13.0.0-develop.
|
|
26
|
+
"@progress/kendo-angular-common": "13.0.0-develop.20",
|
|
27
27
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.3.1",
|
|
31
|
-
"@progress/kendo-angular-schematics": "13.0.0-develop.
|
|
31
|
+
"@progress/kendo-angular-schematics": "13.0.0-develop.20",
|
|
32
32
|
"@progress/kendo-draggable-common": "^0.2.3"
|
|
33
33
|
},
|
|
34
34
|
"schematics": "./schematics/collection.json",
|