@progress/kendo-angular-utils 13.0.0-develop.20 → 13.0.0-develop.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/drag-and-drop/draghandle.directive.d.ts +1 -1
- package/drag-and-drop/models/functions.d.ts +32 -2
- package/esm2020/drag-and-drop/draghandle.directive.mjs +4 -4
- package/esm2020/drag-and-drop/dragtarget-container.directive.mjs +10 -6
- package/esm2020/drag-and-drop/dragtarget.directive.mjs +3 -3
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-utils.mjs +19 -15
- package/fesm2020/progress-kendo-angular-utils.mjs +19 -15
- package/package.json +3 -3
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export declare class DragHandleDirective {
|
|
12
12
|
element: ElementRef;
|
|
13
13
|
constructor(element: ElementRef);
|
|
14
|
-
|
|
14
|
+
cursorStyle: string;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragHandleDirective, never>;
|
|
16
16
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DragHandleDirective, "[kendoDragHandle]", ["kendoDragHandle"], {}, {}, never>;
|
|
17
17
|
}
|
|
@@ -8,10 +8,40 @@
|
|
|
8
8
|
* It returns the custom data that will be available in the events of the respective [`DropTarget`]({% slug api_utils_droptargetdirective %}) or [`DropTargetContainer`]({% slug api_utils_droptargetcontainerdirective %}) directives upon interaction.
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
export declare type DragTargetDataFn = (
|
|
11
|
+
export declare type DragTargetDataFn = (args: DragTargetDataArgs) => any;
|
|
12
12
|
/**
|
|
13
13
|
* Represents the callback that is used by the `dragTargetId` property of the [`DragTargetContainer`]({% slug api_utils_dragtargetcontainerdirective %}) directive.
|
|
14
14
|
*
|
|
15
15
|
* It returns a custom identifier that will be available in the events of the respective directive upon its interaction with a valid DropTarget.
|
|
16
16
|
*/
|
|
17
|
-
export declare type DragTargetIdFn = (
|
|
17
|
+
export declare type DragTargetIdFn = (args: DragTargetIdArgs) => any;
|
|
18
|
+
/**
|
|
19
|
+
* Represents the callback arguments used by the `dragData` property.
|
|
20
|
+
*/
|
|
21
|
+
export interface DragTargetDataArgs {
|
|
22
|
+
/**
|
|
23
|
+
* The drag target HTML element.
|
|
24
|
+
*/
|
|
25
|
+
dragTarget: HTMLElement;
|
|
26
|
+
/**
|
|
27
|
+
* The drag target unique identifier, result from executing the callback used by the `dragTargetId` property. Applicable for the `DragTargetContainerDirective`.
|
|
28
|
+
*/
|
|
29
|
+
dragTargetId: any;
|
|
30
|
+
/**
|
|
31
|
+
* The index of the current drag target in the collection of drag targets. Applicable for the `DragTargetContainerDirective`.
|
|
32
|
+
*/
|
|
33
|
+
dragTargetIndex: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Represents the callback arguments used by the `dragTargetId` property.
|
|
37
|
+
*/
|
|
38
|
+
export interface DragTargetIdArgs {
|
|
39
|
+
/**
|
|
40
|
+
* The drag target HTML element.
|
|
41
|
+
*/
|
|
42
|
+
dragTarget: HTMLElement;
|
|
43
|
+
/**
|
|
44
|
+
* The index of the current drag target in the collection of drag targets. Applicable for the `DragTargetContainerDirective`.
|
|
45
|
+
*/
|
|
46
|
+
dragTargetIndex: number;
|
|
47
|
+
}
|
|
@@ -11,18 +11,18 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class DragHandleDirective {
|
|
12
12
|
constructor(element) {
|
|
13
13
|
this.element = element;
|
|
14
|
-
this.
|
|
14
|
+
this.cursorStyle = 'move';
|
|
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: { "
|
|
18
|
+
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragHandleDirective, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, 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: [{
|
|
22
22
|
selector: '[kendoDragHandle]',
|
|
23
23
|
exportAs: 'kendoDragHandle'
|
|
24
24
|
}]
|
|
25
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: {
|
|
25
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { cursorStyle: [{
|
|
26
26
|
type: HostBinding,
|
|
27
|
-
args: ['
|
|
27
|
+
args: ['style.cursor']
|
|
28
28
|
}] } });
|
|
@@ -251,8 +251,10 @@ export class DragTargetContainerDirective {
|
|
|
251
251
|
}
|
|
252
252
|
this.dragStarted = this.threshold === 0;
|
|
253
253
|
this.service.dragTarget = this.currentDragTarget;
|
|
254
|
-
|
|
255
|
-
this.service.
|
|
254
|
+
const targetIdArgs = { dragTarget: this.currentDragTargetElement, dragTargetIndex: this.service.dragIndex };
|
|
255
|
+
this.service.dragTargetId = this.dragTargetId(targetIdArgs);
|
|
256
|
+
const targetDataArgs = Object.assign({ dragTargetId: this.service.dragTargetId }, targetIdArgs);
|
|
257
|
+
this.service.dragData = this.dragData(targetDataArgs);
|
|
256
258
|
}
|
|
257
259
|
handleDrag(event) {
|
|
258
260
|
if (!this.pressed || isDragStartPrevented) {
|
|
@@ -364,11 +366,12 @@ export class DragTargetContainerDirective {
|
|
|
364
366
|
});
|
|
365
367
|
}
|
|
366
368
|
emitZoneAwareEvent(event, normalizedEvent) {
|
|
369
|
+
const targetIdArgs = { dragTarget: this.currentDragTargetElement, dragTargetIndex: this.service.dragIndex };
|
|
367
370
|
const eventProps = {
|
|
368
371
|
dragTarget: this.currentDragTargetElement,
|
|
369
372
|
dragEvent: normalizedEvent,
|
|
370
373
|
dragTargetIndex: this.service.dragIndex,
|
|
371
|
-
dragTargetId: this.dragTargetId(
|
|
374
|
+
dragTargetId: this.dragTargetId(targetIdArgs)
|
|
372
375
|
};
|
|
373
376
|
if (this.hint && isPresent(this.hintElem)) {
|
|
374
377
|
eventProps.hintElement = this.hintElem;
|
|
@@ -443,7 +446,8 @@ export class DragTargetContainerDirective {
|
|
|
443
446
|
this.hintComponent.instance.template = this.hintTemplate;
|
|
444
447
|
this.hintComponent.instance.directive = this;
|
|
445
448
|
this.hintComponent.instance.targetIndex = this.service.dragIndex;
|
|
446
|
-
|
|
449
|
+
const targetDataArgs = { dragTarget: this.currentDragTargetElement, dragTargetId: this.service.dragTargetId, dragTargetIndex: this.service.dragIndex };
|
|
450
|
+
this.hintComponent.instance.contextData = this.dragData(targetDataArgs);
|
|
447
451
|
this.hintComponent.changeDetectorRef.detectChanges();
|
|
448
452
|
}
|
|
449
453
|
destroyHint() {
|
|
@@ -515,12 +519,12 @@ export class DragTargetContainerDirective {
|
|
|
515
519
|
}
|
|
516
520
|
if (isPresent(this.dragHandles) && this.dragHandles.length > 0) {
|
|
517
521
|
this.dragHandles.forEach(handle => {
|
|
518
|
-
this.renderer.
|
|
522
|
+
this.renderer.setStyle(handle, 'cursor', 'move');
|
|
519
523
|
});
|
|
520
524
|
}
|
|
521
525
|
else {
|
|
522
526
|
this.allDragTargets.forEach(target => {
|
|
523
|
-
this.renderer.
|
|
527
|
+
this.renderer.setStyle(target, 'cursor', 'move');
|
|
524
528
|
});
|
|
525
529
|
}
|
|
526
530
|
}
|
|
@@ -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.
|
|
151
|
+
this.renderer.setStyle(this.nativeElement, 'cursor', 'move');
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
this.service.dragTargets.push(this.dragTarget);
|
|
@@ -194,7 +194,7 @@ export class DragTargetDirective {
|
|
|
194
194
|
this.dragStarted = this.threshold === 0;
|
|
195
195
|
this.service.dragTarget = this.dragTarget;
|
|
196
196
|
this.service.dragTargetDirective = this;
|
|
197
|
-
this.service.dragData = this.dragData(this.dragTarget.element, this.dragTargetIdResult);
|
|
197
|
+
this.service.dragData = this.dragData({ dragTarget: this.dragTarget.element, dragTargetId: this.dragTargetIdResult, dragTargetIndex: null });
|
|
198
198
|
}
|
|
199
199
|
handleDrag(event) {
|
|
200
200
|
if (!this.pressed || isDragStartPrevented) {
|
|
@@ -406,7 +406,7 @@ export class DragTargetDirective {
|
|
|
406
406
|
}
|
|
407
407
|
get dragTargetIdResult() {
|
|
408
408
|
if (this.dragTargetId && this.dragTargetId !== '') {
|
|
409
|
-
return typeof this.dragTargetId === 'string' ? this.dragTargetId : this.dragTargetId(this.dragTarget.element);
|
|
409
|
+
return typeof this.dragTargetId === 'string' ? this.dragTargetId : this.dragTargetId({ dragTarget: this.dragTarget.element, dragTargetIndex: null });
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
performDrag(event) {
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-utils',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '13.0.0-develop.
|
|
12
|
+
publishDate: 1685996848,
|
|
13
|
+
version: '13.0.0-develop.22',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -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: 1685996848,
|
|
23
|
+
version: '13.0.0-develop.22',
|
|
24
24
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -31,20 +31,20 @@ const packageMetadata = {
|
|
|
31
31
|
class DragHandleDirective {
|
|
32
32
|
constructor(element) {
|
|
33
33
|
this.element = element;
|
|
34
|
-
this.
|
|
34
|
+
this.cursorStyle = 'move';
|
|
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: { "
|
|
38
|
+
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragHandleDirective, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, 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: [{
|
|
42
42
|
selector: '[kendoDragHandle]',
|
|
43
43
|
exportAs: 'kendoDragHandle'
|
|
44
44
|
}]
|
|
45
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: {
|
|
45
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { cursorStyle: [{
|
|
46
46
|
type: HostBinding,
|
|
47
|
-
args: ['
|
|
47
|
+
args: ['style.cursor']
|
|
48
48
|
}] } });
|
|
49
49
|
|
|
50
50
|
function isDocumentNode(container) {
|
|
@@ -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.
|
|
579
|
+
this.renderer.setStyle(this.nativeElement, 'cursor', 'move');
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
this.service.dragTargets.push(this.dragTarget);
|
|
@@ -622,7 +622,7 @@ class DragTargetDirective {
|
|
|
622
622
|
this.dragStarted = this.threshold === 0;
|
|
623
623
|
this.service.dragTarget = this.dragTarget;
|
|
624
624
|
this.service.dragTargetDirective = this;
|
|
625
|
-
this.service.dragData = this.dragData(this.dragTarget.element, this.dragTargetIdResult);
|
|
625
|
+
this.service.dragData = this.dragData({ dragTarget: this.dragTarget.element, dragTargetId: this.dragTargetIdResult, dragTargetIndex: null });
|
|
626
626
|
}
|
|
627
627
|
handleDrag(event) {
|
|
628
628
|
if (!this.pressed || isDragStartPrevented$1) {
|
|
@@ -835,7 +835,7 @@ class DragTargetDirective {
|
|
|
835
835
|
}
|
|
836
836
|
get dragTargetIdResult() {
|
|
837
837
|
if (this.dragTargetId && this.dragTargetId !== '') {
|
|
838
|
-
return typeof this.dragTargetId === 'string' ? this.dragTargetId : this.dragTargetId(this.dragTarget.element);
|
|
838
|
+
return typeof this.dragTargetId === 'string' ? this.dragTargetId : this.dragTargetId({ dragTarget: this.dragTarget.element, dragTargetIndex: null });
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
performDrag(event) {
|
|
@@ -1301,8 +1301,10 @@ class DragTargetContainerDirective {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
this.dragStarted = this.threshold === 0;
|
|
1303
1303
|
this.service.dragTarget = this.currentDragTarget;
|
|
1304
|
-
|
|
1305
|
-
this.service.
|
|
1304
|
+
const targetIdArgs = { dragTarget: this.currentDragTargetElement, dragTargetIndex: this.service.dragIndex };
|
|
1305
|
+
this.service.dragTargetId = this.dragTargetId(targetIdArgs);
|
|
1306
|
+
const targetDataArgs = Object.assign({ dragTargetId: this.service.dragTargetId }, targetIdArgs);
|
|
1307
|
+
this.service.dragData = this.dragData(targetDataArgs);
|
|
1306
1308
|
}
|
|
1307
1309
|
handleDrag(event) {
|
|
1308
1310
|
if (!this.pressed || isDragStartPrevented) {
|
|
@@ -1415,11 +1417,12 @@ class DragTargetContainerDirective {
|
|
|
1415
1417
|
});
|
|
1416
1418
|
}
|
|
1417
1419
|
emitZoneAwareEvent(event, normalizedEvent) {
|
|
1420
|
+
const targetIdArgs = { dragTarget: this.currentDragTargetElement, dragTargetIndex: this.service.dragIndex };
|
|
1418
1421
|
const eventProps = {
|
|
1419
1422
|
dragTarget: this.currentDragTargetElement,
|
|
1420
1423
|
dragEvent: normalizedEvent,
|
|
1421
1424
|
dragTargetIndex: this.service.dragIndex,
|
|
1422
|
-
dragTargetId: this.dragTargetId(
|
|
1425
|
+
dragTargetId: this.dragTargetId(targetIdArgs)
|
|
1423
1426
|
};
|
|
1424
1427
|
if (this.hint && isPresent(this.hintElem)) {
|
|
1425
1428
|
eventProps.hintElement = this.hintElem;
|
|
@@ -1494,7 +1497,8 @@ class DragTargetContainerDirective {
|
|
|
1494
1497
|
this.hintComponent.instance.template = this.hintTemplate;
|
|
1495
1498
|
this.hintComponent.instance.directive = this;
|
|
1496
1499
|
this.hintComponent.instance.targetIndex = this.service.dragIndex;
|
|
1497
|
-
|
|
1500
|
+
const targetDataArgs = { dragTarget: this.currentDragTargetElement, dragTargetId: this.service.dragTargetId, dragTargetIndex: this.service.dragIndex };
|
|
1501
|
+
this.hintComponent.instance.contextData = this.dragData(targetDataArgs);
|
|
1498
1502
|
this.hintComponent.changeDetectorRef.detectChanges();
|
|
1499
1503
|
}
|
|
1500
1504
|
destroyHint() {
|
|
@@ -1566,12 +1570,12 @@ class DragTargetContainerDirective {
|
|
|
1566
1570
|
}
|
|
1567
1571
|
if (isPresent(this.dragHandles) && this.dragHandles.length > 0) {
|
|
1568
1572
|
this.dragHandles.forEach(handle => {
|
|
1569
|
-
this.renderer.
|
|
1573
|
+
this.renderer.setStyle(handle, 'cursor', 'move');
|
|
1570
1574
|
});
|
|
1571
1575
|
}
|
|
1572
1576
|
else {
|
|
1573
1577
|
this.allDragTargets.forEach(target => {
|
|
1574
|
-
this.renderer.
|
|
1578
|
+
this.renderer.setStyle(target, 'cursor', 'move');
|
|
1575
1579
|
});
|
|
1576
1580
|
}
|
|
1577
1581
|
}
|
|
@@ -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: 1685996848,
|
|
23
|
+
version: '13.0.0-develop.22',
|
|
24
24
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -31,20 +31,20 @@ const packageMetadata = {
|
|
|
31
31
|
class DragHandleDirective {
|
|
32
32
|
constructor(element) {
|
|
33
33
|
this.element = element;
|
|
34
|
-
this.
|
|
34
|
+
this.cursorStyle = 'move';
|
|
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: { "
|
|
38
|
+
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: DragHandleDirective, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, 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: [{
|
|
42
42
|
selector: '[kendoDragHandle]',
|
|
43
43
|
exportAs: 'kendoDragHandle'
|
|
44
44
|
}]
|
|
45
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: {
|
|
45
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { cursorStyle: [{
|
|
46
46
|
type: HostBinding,
|
|
47
|
-
args: ['
|
|
47
|
+
args: ['style.cursor']
|
|
48
48
|
}] } });
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -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.
|
|
579
|
+
this.renderer.setStyle(this.nativeElement, 'cursor', 'move');
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
this.service.dragTargets.push(this.dragTarget);
|
|
@@ -622,7 +622,7 @@ class DragTargetDirective {
|
|
|
622
622
|
this.dragStarted = this.threshold === 0;
|
|
623
623
|
this.service.dragTarget = this.dragTarget;
|
|
624
624
|
this.service.dragTargetDirective = this;
|
|
625
|
-
this.service.dragData = this.dragData(this.dragTarget.element, this.dragTargetIdResult);
|
|
625
|
+
this.service.dragData = this.dragData({ dragTarget: this.dragTarget.element, dragTargetId: this.dragTargetIdResult, dragTargetIndex: null });
|
|
626
626
|
}
|
|
627
627
|
handleDrag(event) {
|
|
628
628
|
if (!this.pressed || isDragStartPrevented$1) {
|
|
@@ -834,7 +834,7 @@ class DragTargetDirective {
|
|
|
834
834
|
}
|
|
835
835
|
get dragTargetIdResult() {
|
|
836
836
|
if (this.dragTargetId && this.dragTargetId !== '') {
|
|
837
|
-
return typeof this.dragTargetId === 'string' ? this.dragTargetId : this.dragTargetId(this.dragTarget.element);
|
|
837
|
+
return typeof this.dragTargetId === 'string' ? this.dragTargetId : this.dragTargetId({ dragTarget: this.dragTarget.element, dragTargetIndex: null });
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
performDrag(event) {
|
|
@@ -1299,8 +1299,10 @@ class DragTargetContainerDirective {
|
|
|
1299
1299
|
}
|
|
1300
1300
|
this.dragStarted = this.threshold === 0;
|
|
1301
1301
|
this.service.dragTarget = this.currentDragTarget;
|
|
1302
|
-
|
|
1303
|
-
this.service.
|
|
1302
|
+
const targetIdArgs = { dragTarget: this.currentDragTargetElement, dragTargetIndex: this.service.dragIndex };
|
|
1303
|
+
this.service.dragTargetId = this.dragTargetId(targetIdArgs);
|
|
1304
|
+
const targetDataArgs = Object.assign({ dragTargetId: this.service.dragTargetId }, targetIdArgs);
|
|
1305
|
+
this.service.dragData = this.dragData(targetDataArgs);
|
|
1304
1306
|
}
|
|
1305
1307
|
handleDrag(event) {
|
|
1306
1308
|
if (!this.pressed || isDragStartPrevented) {
|
|
@@ -1412,11 +1414,12 @@ class DragTargetContainerDirective {
|
|
|
1412
1414
|
});
|
|
1413
1415
|
}
|
|
1414
1416
|
emitZoneAwareEvent(event, normalizedEvent) {
|
|
1417
|
+
const targetIdArgs = { dragTarget: this.currentDragTargetElement, dragTargetIndex: this.service.dragIndex };
|
|
1415
1418
|
const eventProps = {
|
|
1416
1419
|
dragTarget: this.currentDragTargetElement,
|
|
1417
1420
|
dragEvent: normalizedEvent,
|
|
1418
1421
|
dragTargetIndex: this.service.dragIndex,
|
|
1419
|
-
dragTargetId: this.dragTargetId(
|
|
1422
|
+
dragTargetId: this.dragTargetId(targetIdArgs)
|
|
1420
1423
|
};
|
|
1421
1424
|
if (this.hint && isPresent(this.hintElem)) {
|
|
1422
1425
|
eventProps.hintElement = this.hintElem;
|
|
@@ -1491,7 +1494,8 @@ class DragTargetContainerDirective {
|
|
|
1491
1494
|
this.hintComponent.instance.template = this.hintTemplate;
|
|
1492
1495
|
this.hintComponent.instance.directive = this;
|
|
1493
1496
|
this.hintComponent.instance.targetIndex = this.service.dragIndex;
|
|
1494
|
-
|
|
1497
|
+
const targetDataArgs = { dragTarget: this.currentDragTargetElement, dragTargetId: this.service.dragTargetId, dragTargetIndex: this.service.dragIndex };
|
|
1498
|
+
this.hintComponent.instance.contextData = this.dragData(targetDataArgs);
|
|
1495
1499
|
this.hintComponent.changeDetectorRef.detectChanges();
|
|
1496
1500
|
}
|
|
1497
1501
|
destroyHint() {
|
|
@@ -1563,12 +1567,12 @@ class DragTargetContainerDirective {
|
|
|
1563
1567
|
}
|
|
1564
1568
|
if (isPresent(this.dragHandles) && this.dragHandles.length > 0) {
|
|
1565
1569
|
this.dragHandles.forEach(handle => {
|
|
1566
|
-
this.renderer.
|
|
1570
|
+
this.renderer.setStyle(handle, 'cursor', 'move');
|
|
1567
1571
|
});
|
|
1568
1572
|
}
|
|
1569
1573
|
else {
|
|
1570
1574
|
this.allDragTargets.forEach(target => {
|
|
1571
|
-
this.renderer.
|
|
1575
|
+
this.renderer.setStyle(target, 'cursor', 'move');
|
|
1572
1576
|
});
|
|
1573
1577
|
}
|
|
1574
1578
|
}
|
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.22",
|
|
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.22",
|
|
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.22",
|
|
32
32
|
"@progress/kendo-draggable-common": "^0.2.3"
|
|
33
33
|
},
|
|
34
34
|
"schematics": "./schematics/collection.json",
|