@progress/kendo-angular-utils 0.1.0 → 0.1.1-dev.202209131028
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/bundles/kendo-angular-utils.umd.js +1 -1
- package/drag-and-drop/drag-state.service.d.ts +1 -1
- package/drag-and-drop/dragtarget.directive.d.ts +17 -41
- package/drag-and-drop/droptarget.directive.d.ts +5 -5
- package/drag-and-drop/events/drag-target/drag-event.d.ts +7 -3
- package/drag-and-drop/events/drag-target/end-event.d.ts +3 -4
- package/drag-and-drop/events/drag-target/index.d.ts +4 -5
- package/drag-and-drop/events/drag-target/press-event.d.ts +3 -3
- package/drag-and-drop/events/drag-target/start-event.d.ts +3 -3
- package/drag-and-drop/events/drop-target/drop-event.d.ts +3 -4
- package/drag-and-drop/events/drop-target/enter-event.d.ts +3 -4
- package/drag-and-drop/events/drop-target/index.d.ts +4 -4
- package/drag-and-drop/events/drop-target/leave-event.d.ts +3 -4
- package/drag-and-drop/events/drop-target/over-event.d.ts +3 -4
- package/drag-and-drop/models/allowed-target.d.ts +1 -1
- package/{esm2015/drag-and-drop/events/drag-target/release-event.js → drag-and-drop/models/coordinates.d.ts} +4 -8
- package/drag-and-drop/models/index.d.ts +1 -0
- package/drag-and-drop/util.d.ts +0 -7
- package/drag-and-drop.module.d.ts +31 -0
- package/esm2015/drag-and-drop/dragtarget.directive.js +77 -65
- package/esm2015/drag-and-drop/droptarget.directive.js +14 -6
- package/esm2015/drag-and-drop/events/drag-target/drag-event.js +1 -1
- package/esm2015/drag-and-drop/events/drag-target/end-event.js +1 -3
- package/esm2015/drag-and-drop/events/drag-target/index.js +4 -5
- package/esm2015/drag-and-drop/events/drag-target/press-event.js +1 -1
- package/esm2015/drag-and-drop/events/drag-target/start-event.js +1 -1
- package/esm2015/drag-and-drop/events/drop-target/drop-event.js +1 -3
- package/esm2015/drag-and-drop/events/drop-target/enter-event.js +1 -3
- package/esm2015/drag-and-drop/events/drop-target/index.js +4 -4
- package/esm2015/drag-and-drop/events/drop-target/leave-event.js +1 -3
- package/esm2015/drag-and-drop/events/drop-target/over-event.js +1 -3
- package/esm2015/drag-and-drop/models/coordinates.js +5 -0
- package/esm2015/drag-and-drop.module.js +33 -1
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-utils.js +133 -98
- package/main.d.ts +2 -1
- package/package.json +2 -2
- package/drag-and-drop/events/drag-target/release-event.d.ts +0 -22
|
@@ -7,12 +7,14 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
|
7
7
|
import { packageMetadata } from '../package-metadata';
|
|
8
8
|
import { DragHandleDirective } from "./draghandle.directive";
|
|
9
9
|
import { getScrollableParent } from "@progress/kendo-draggable-common";
|
|
10
|
-
import {
|
|
10
|
+
import { DragTargetDragStartEvent, DragTargetDragEndEvent, DragTargetPressEvent, DragTargetDragEvent } from "./events/drag-target";
|
|
11
11
|
import { getAction, isPresent, setElementStyles, dragTargetTransition } from './util';
|
|
12
12
|
import { contains, isDocumentAvailable } from "@progress/kendo-angular-common";
|
|
13
13
|
import { HintComponent } from "./hint.component";
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
import * as i1 from "./drag-state.service";
|
|
16
|
+
let isDragStartPrevented = false;
|
|
17
|
+
let isDragPrevented = false;
|
|
16
18
|
/**
|
|
17
19
|
* Represents the Kendo UI DragTarget directive for Angular.
|
|
18
20
|
*/
|
|
@@ -44,27 +46,28 @@ export class DragTargetDirective {
|
|
|
44
46
|
this.dragDelay = 0;
|
|
45
47
|
/**
|
|
46
48
|
* Fires when the user presses the DragTarget element.
|
|
47
|
-
* This event is preventable. Preventing it allows full logic customization.
|
|
48
49
|
*/
|
|
49
50
|
this.press = new EventEmitter();
|
|
50
51
|
/**
|
|
51
52
|
* Fires when the dragging of the DragTarget element begins.
|
|
52
|
-
* This event is preventable.
|
|
53
|
+
* This event is preventable.
|
|
53
54
|
*/
|
|
54
55
|
this.dragStart = new EventEmitter();
|
|
55
56
|
/**
|
|
56
57
|
* Fires while the user drags the DragTarget element.
|
|
57
|
-
* This event is preventable.
|
|
58
|
+
* This event is preventable.
|
|
58
59
|
*/
|
|
59
60
|
this.drag = new EventEmitter();
|
|
60
61
|
/**
|
|
61
|
-
* Fires when the user
|
|
62
|
-
|
|
62
|
+
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
63
|
+
*/
|
|
64
|
+
this.dragReady = new EventEmitter();
|
|
65
|
+
/**
|
|
66
|
+
* Fires when the user releases the DragTarget element after being pressed.
|
|
63
67
|
*/
|
|
64
68
|
this.release = new EventEmitter();
|
|
65
69
|
/**
|
|
66
|
-
* Fires when the dragging of the DragTarget element
|
|
67
|
-
* This event is preventable. Preventing it allows full logic customization.
|
|
70
|
+
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
68
71
|
*/
|
|
69
72
|
this.dragEnd = new EventEmitter();
|
|
70
73
|
this.touchAction = 'none';
|
|
@@ -75,6 +78,7 @@ export class DragTargetDirective {
|
|
|
75
78
|
this.dragStarted = false;
|
|
76
79
|
this.pressed = false;
|
|
77
80
|
this.dragTimeout = null;
|
|
81
|
+
this.position = { x: 0, y: 0 };
|
|
78
82
|
validatePackage(packageMetadata);
|
|
79
83
|
}
|
|
80
84
|
/**
|
|
@@ -149,13 +153,16 @@ export class DragTargetDirective {
|
|
|
149
153
|
if (this.dragDelay > 0) {
|
|
150
154
|
this.dragTimeout = setTimeout(() => {
|
|
151
155
|
this.pressed = true;
|
|
156
|
+
this.ngZone.run(() => {
|
|
157
|
+
this.dragReady.emit();
|
|
158
|
+
});
|
|
152
159
|
}, this.dragDelay);
|
|
153
160
|
}
|
|
154
161
|
else {
|
|
155
162
|
this.pressed = true;
|
|
156
163
|
}
|
|
157
164
|
this.ngZone.run(() => {
|
|
158
|
-
const eventArgs = new
|
|
165
|
+
const eventArgs = new DragTargetPressEvent({ normalizedEvent: event, hostElement: this.nativeElement });
|
|
159
166
|
this.press.emit(eventArgs);
|
|
160
167
|
});
|
|
161
168
|
}
|
|
@@ -170,6 +177,12 @@ export class DragTargetDirective {
|
|
|
170
177
|
}
|
|
171
178
|
return;
|
|
172
179
|
}
|
|
180
|
+
this.ngZone.run(() => {
|
|
181
|
+
isDragStartPrevented = this.emitEvent('dragStart', { normalizedEvent: event, hostElement: this.nativeElement }).isDefaultPrevented();
|
|
182
|
+
});
|
|
183
|
+
if (isDragStartPrevented) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
173
186
|
if (isPresent(this.hintTemplate)) {
|
|
174
187
|
this.createHint();
|
|
175
188
|
if (isPresent(this.hint)) {
|
|
@@ -179,50 +192,42 @@ export class DragTargetDirective {
|
|
|
179
192
|
this.dragStarted = this.threshold === 0;
|
|
180
193
|
this.service.dragTarget = this.dragTarget;
|
|
181
194
|
this.service.dragTargetDirective = this;
|
|
182
|
-
this.initialPosition = { x: event.clientX, y: event.clientY };
|
|
183
|
-
this.ngZone.run(() => {
|
|
184
|
-
const eventArgs = new DragStartEvent({ event, element: this.nativeElement });
|
|
185
|
-
this.dragStart.emit(eventArgs);
|
|
186
|
-
});
|
|
195
|
+
this.initialPosition = { x: event.clientX - this.position.x, y: event.clientY - this.position.y };
|
|
187
196
|
}
|
|
188
|
-
/**
|
|
189
|
-
* @hidden
|
|
190
|
-
*/
|
|
191
197
|
handleDrag(event) {
|
|
192
|
-
if (!this.pressed) {
|
|
198
|
+
if (!this.pressed || isDragStartPrevented) {
|
|
193
199
|
return;
|
|
194
200
|
}
|
|
195
201
|
const elem = this.hint ? this.hintElem : this.nativeElement;
|
|
196
|
-
|
|
202
|
+
const eventArgsProps = elem === this.nativeElement ? { normalizedEvent: event, hostElement: this.nativeElement } : { normalizedEvent: event, hostElement: this.nativeElement, hintElement: elem };
|
|
203
|
+
this.ngZone.run(() => {
|
|
204
|
+
isDragPrevented = this.emitEvent('drag', eventArgsProps).isDefaultPrevented();
|
|
205
|
+
});
|
|
206
|
+
if (isDragPrevented) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
197
209
|
if (this.restrictByAxis === 'horizontal') {
|
|
198
|
-
|
|
210
|
+
this.position = { x: event.clientX - this.initialPosition.x + event.scrollX, y: 0 };
|
|
199
211
|
}
|
|
200
212
|
else if (this.restrictByAxis === 'vertical') {
|
|
201
|
-
|
|
213
|
+
this.position = { x: 0, y: event.clientY - this.initialPosition.y + event.scrollY };
|
|
202
214
|
}
|
|
203
215
|
else {
|
|
204
|
-
|
|
216
|
+
this.position = { x: event.clientX - this.initialPosition.x + event.scrollX, y: event.clientY - this.initialPosition.y + event.scrollY };
|
|
205
217
|
}
|
|
206
|
-
const thresholdNotReached = Math.abs(
|
|
218
|
+
const thresholdNotReached = Math.abs(this.position.x) < this.threshold && Math.abs(this.position.y) < this.threshold;
|
|
207
219
|
if (!this.dragStarted && thresholdNotReached) {
|
|
208
220
|
return;
|
|
209
221
|
}
|
|
210
|
-
const transform = `translate(${coordinates.x}px, ${coordinates.y}px)`;
|
|
211
|
-
setElementStyles(this.renderer, elem, {
|
|
212
|
-
transform: transform,
|
|
213
|
-
transition: 'none'
|
|
214
|
-
});
|
|
215
222
|
if (!this.dragStarted && this.threshold > 0) {
|
|
216
223
|
this.dragStarted = true;
|
|
217
224
|
}
|
|
218
|
-
this.
|
|
219
|
-
|
|
220
|
-
|
|
225
|
+
const transform = `translate(${this.position.x}px, ${this.position.y}px)`;
|
|
226
|
+
setElementStyles(this.renderer, elem, {
|
|
227
|
+
transform: transform,
|
|
228
|
+
transition: 'none'
|
|
221
229
|
});
|
|
222
230
|
}
|
|
223
|
-
/**
|
|
224
|
-
* @hidden
|
|
225
|
-
*/
|
|
226
231
|
handleRelease(event) {
|
|
227
232
|
if (this.dragTimeout) {
|
|
228
233
|
clearTimeout(this.dragTimeout);
|
|
@@ -232,35 +237,40 @@ export class DragTargetDirective {
|
|
|
232
237
|
this.service.dragTarget = null;
|
|
233
238
|
this.service.dragTargetDirective = null;
|
|
234
239
|
this.ngZone.run(() => {
|
|
235
|
-
const eventArgs = new
|
|
240
|
+
const eventArgs = new DragTargetPressEvent({ normalizedEvent: event, hostElement: this.nativeElement });
|
|
236
241
|
this.release.emit(eventArgs);
|
|
237
242
|
});
|
|
238
243
|
}
|
|
239
|
-
/**
|
|
240
|
-
* @hidden
|
|
241
|
-
*/
|
|
242
244
|
handleDragEnd(event) {
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
+
if (this.dragTimeout) {
|
|
246
|
+
clearTimeout(this.dragTimeout);
|
|
247
|
+
this.dragTimeout = null;
|
|
248
|
+
this.pressed = false;
|
|
245
249
|
}
|
|
246
|
-
this.
|
|
250
|
+
const isDroppedOverParentTarget = isPresent(this.service.dropTarget) && !contains(this.service.dropTarget, this.service.dragTarget, true);
|
|
247
251
|
const elem = this.hint ? this.hintElem : this.nativeElement;
|
|
252
|
+
if (isDroppedOverParentTarget || this.service.dropTargets.length > 0) {
|
|
253
|
+
this.renderer.removeStyle(elem, 'transform');
|
|
254
|
+
setElementStyles(this.renderer, elem, {
|
|
255
|
+
transition: dragTargetTransition
|
|
256
|
+
});
|
|
257
|
+
this.position = { x: 0, y: 0 };
|
|
258
|
+
}
|
|
248
259
|
if (isPresent(this.hint)) {
|
|
249
260
|
this.renderer.removeStyle(this.nativeElement, 'opacity');
|
|
250
261
|
this.destroyHint();
|
|
251
262
|
}
|
|
252
|
-
this.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
263
|
+
this.service.dragTarget = null;
|
|
264
|
+
this.service.dragTargetDirective = null;
|
|
265
|
+
if (!this.dragStarted || isDragStartPrevented || isDragPrevented) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
256
268
|
this.ngZone.run(() => {
|
|
257
|
-
const eventArgs = new
|
|
269
|
+
const eventArgs = new DragTargetDragEndEvent({ normalizedEvent: event, hostElement: this.nativeElement });
|
|
258
270
|
this.dragEnd.emit(eventArgs);
|
|
259
271
|
});
|
|
272
|
+
this.dragStarted = false;
|
|
260
273
|
}
|
|
261
|
-
/**
|
|
262
|
-
* @hidden
|
|
263
|
-
*/
|
|
264
274
|
initializeDraggable() {
|
|
265
275
|
this.dragTarget = {
|
|
266
276
|
element: this.nativeElement,
|
|
@@ -272,9 +282,6 @@ export class DragTargetDirective {
|
|
|
272
282
|
onDragEnd: this.handleDragEnd.bind(this)
|
|
273
283
|
};
|
|
274
284
|
}
|
|
275
|
-
/**
|
|
276
|
-
* @hidden
|
|
277
|
-
*/
|
|
278
285
|
attachDomHandlers() {
|
|
279
286
|
if (this.domSubscriptions.length > 0) {
|
|
280
287
|
this.domSubscriptions.forEach(subscription => subscription());
|
|
@@ -314,24 +321,15 @@ export class DragTargetDirective {
|
|
|
314
321
|
];
|
|
315
322
|
}
|
|
316
323
|
}
|
|
317
|
-
/**
|
|
318
|
-
* @hidden
|
|
319
|
-
*/
|
|
320
324
|
isDragHandle(el) {
|
|
321
325
|
return this.dragHandles.toArray().some(dh => contains(dh.element.nativeElement, el, true));
|
|
322
326
|
}
|
|
323
|
-
/**
|
|
324
|
-
* @hidden
|
|
325
|
-
*/
|
|
326
327
|
getAutoScrollContainer() {
|
|
327
328
|
return typeof this.autoScroll === 'object' &&
|
|
328
329
|
this.autoScroll.boundaryElementRef &&
|
|
329
330
|
this.autoScroll.boundaryElementRef.nativeElement ?
|
|
330
331
|
this.autoScroll.boundaryElementRef.nativeElement : null;
|
|
331
332
|
}
|
|
332
|
-
/**
|
|
333
|
-
* @hidden
|
|
334
|
-
*/
|
|
335
333
|
createHint() {
|
|
336
334
|
const hintComponent = this.resolver.resolveComponentFactory(HintComponent);
|
|
337
335
|
this.hint = this.viewContainer.createComponent(hintComponent);
|
|
@@ -340,18 +338,30 @@ export class DragTargetDirective {
|
|
|
340
338
|
this.hint.changeDetectorRef.detectChanges();
|
|
341
339
|
this.dragTarget.hint = this.hint.instance.element.nativeElement;
|
|
342
340
|
}
|
|
343
|
-
/**
|
|
344
|
-
* @hidden
|
|
345
|
-
*/
|
|
346
341
|
destroyHint() {
|
|
347
342
|
this.hint.destroy();
|
|
348
343
|
this.hint.changeDetectorRef.detectChanges();
|
|
349
344
|
this.hint = null;
|
|
350
345
|
this.dragTarget.hint = null;
|
|
351
346
|
}
|
|
347
|
+
emitEvent(event, args) {
|
|
348
|
+
let eventArgs;
|
|
349
|
+
switch (event) {
|
|
350
|
+
case 'dragStart':
|
|
351
|
+
eventArgs = new DragTargetDragStartEvent(args);
|
|
352
|
+
break;
|
|
353
|
+
case 'drag':
|
|
354
|
+
eventArgs = new DragTargetDragEvent(args);
|
|
355
|
+
break;
|
|
356
|
+
default:
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
this[event].emit(eventArgs);
|
|
360
|
+
return eventArgs;
|
|
361
|
+
}
|
|
352
362
|
}
|
|
353
363
|
DragTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragTargetDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.DragStateService }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Directive });
|
|
354
|
-
DragTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DragTargetDirective, selector: "[kendoDragTarget]", inputs: { hintTemplate: "hintTemplate", threshold: "threshold", autoScroll: "autoScroll", link: "link", dragDelay: "dragDelay", restrictByAxis: "restrictByAxis" }, outputs: { press: "press", dragStart: "dragStart", drag: "drag", release: "release", dragEnd: "dragEnd" }, host: { properties: { "style.touch-action": "this.touchAction" } }, queries: [{ propertyName: "dragHandles", predicate: DragHandleDirective }], exportAs: ["kendoDragTarget"], ngImport: i0 });
|
|
364
|
+
DragTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DragTargetDirective, selector: "[kendoDragTarget]", inputs: { hintTemplate: "hintTemplate", threshold: "threshold", autoScroll: "autoScroll", link: "link", dragDelay: "dragDelay", restrictByAxis: "restrictByAxis" }, outputs: { press: "press", dragStart: "dragStart", drag: "drag", dragReady: "dragReady", release: "release", dragEnd: "dragEnd" }, host: { properties: { "style.touch-action": "this.touchAction" } }, queries: [{ propertyName: "dragHandles", predicate: DragHandleDirective }], exportAs: ["kendoDragTarget"], ngImport: i0 });
|
|
355
365
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
356
366
|
type: Directive,
|
|
357
367
|
args: [{
|
|
@@ -376,6 +386,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
376
386
|
type: Output
|
|
377
387
|
}], drag: [{
|
|
378
388
|
type: Output
|
|
389
|
+
}], dragReady: [{
|
|
390
|
+
type: Output
|
|
379
391
|
}], release: [{
|
|
380
392
|
type: Output
|
|
381
393
|
}], dragEnd: [{
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Directive, EventEmitter, Input, Output } from "@angular/core";
|
|
6
6
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
7
7
|
import { packageMetadata } from '../package-metadata';
|
|
8
|
-
import {
|
|
8
|
+
import { DropTargetDragEnterEvent, DropTargetDragOverEvent, DropTargetDragLeaveEvent, DropTargetDropEvent } from './events/drop-target';
|
|
9
9
|
import { isPresent } from './util';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
import * as i1 from "./drag-state.service";
|
|
@@ -47,6 +47,9 @@ export class DropTargetDirective {
|
|
|
47
47
|
* @hidden
|
|
48
48
|
*/
|
|
49
49
|
handleDragEnter(event) {
|
|
50
|
+
if (!this.service.dragTarget) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
50
53
|
let allowed = true;
|
|
51
54
|
if (isPresent(this.allowedDragTargets)) {
|
|
52
55
|
switch (typeof this.allowedDragTargets) {
|
|
@@ -66,7 +69,7 @@ export class DropTargetDirective {
|
|
|
66
69
|
if (allowed) {
|
|
67
70
|
this.service.dropTarget = this.dropTarget;
|
|
68
71
|
this.ngZone.run(() => {
|
|
69
|
-
const eventArgs = new
|
|
72
|
+
const eventArgs = new DropTargetDragEnterEvent({ normalizedEvent: event, hostElement: this.element.nativeElement });
|
|
70
73
|
this.dragEnter.emit(eventArgs);
|
|
71
74
|
});
|
|
72
75
|
}
|
|
@@ -76,8 +79,11 @@ export class DropTargetDirective {
|
|
|
76
79
|
*/
|
|
77
80
|
handleDragLeave(event) {
|
|
78
81
|
this.service.dropTarget = null;
|
|
82
|
+
if (!this.service.dragTarget) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
79
85
|
this.ngZone.run(() => {
|
|
80
|
-
const eventArgs = new
|
|
86
|
+
const eventArgs = new DropTargetDragLeaveEvent({ normalizedEvent: event, hostElement: this.element.nativeElement });
|
|
81
87
|
this.dragLeave.emit(eventArgs);
|
|
82
88
|
});
|
|
83
89
|
}
|
|
@@ -85,8 +91,11 @@ export class DropTargetDirective {
|
|
|
85
91
|
* @hidden
|
|
86
92
|
*/
|
|
87
93
|
handleDragOver(event) {
|
|
94
|
+
if (!this.service.dragTarget) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
88
97
|
this.ngZone.run(() => {
|
|
89
|
-
const eventArgs = new
|
|
98
|
+
const eventArgs = new DropTargetDragOverEvent({ normalizedEvent: event, hostElement: this.element.nativeElement });
|
|
90
99
|
this.dragOver.emit(eventArgs);
|
|
91
100
|
});
|
|
92
101
|
}
|
|
@@ -95,10 +104,9 @@ export class DropTargetDirective {
|
|
|
95
104
|
*/
|
|
96
105
|
handleDrop(event) {
|
|
97
106
|
this.ngZone.run(() => {
|
|
98
|
-
const eventArgs = new
|
|
107
|
+
const eventArgs = new DropTargetDropEvent({ normalizedEvent: event, hostElement: this.element.nativeElement });
|
|
99
108
|
this.drop.emit(eventArgs);
|
|
100
109
|
});
|
|
101
|
-
this.service.setScrollOffset({ x: 0, y: 0 });
|
|
102
110
|
}
|
|
103
111
|
/**
|
|
104
112
|
* @hidden
|
|
@@ -6,7 +6,7 @@ import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
|
6
6
|
/**
|
|
7
7
|
* Arguments for the drag event of the DragTarget.
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class DragTargetDragEvent extends PreventableEvent {
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
5
|
/**
|
|
7
6
|
* Arguments for the dragEnd event of the DragTarget.
|
|
8
7
|
*/
|
|
9
|
-
export class
|
|
8
|
+
export class DragTargetDragEndEvent {
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
13
12
|
constructor(args) {
|
|
14
|
-
super();
|
|
15
13
|
Object.assign(this, args);
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export { DragEvent } from './drag-event';
|
|
5
|
+
export { DragTargetPressEvent } from './press-event';
|
|
6
|
+
export { DragTargetDragStartEvent } from './start-event';
|
|
7
|
+
export { DragTargetDragEndEvent } from './end-event';
|
|
8
|
+
export { DragTargetDragEvent } from './drag-event';
|
|
@@ -6,7 +6,7 @@ import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
|
6
6
|
/**
|
|
7
7
|
* Arguments for the dragStart event of the DragTarget.
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class DragTargetDragStartEvent extends PreventableEvent {
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
5
|
/**
|
|
7
6
|
* Arguments for the drop event of the DropTarget.
|
|
8
7
|
*/
|
|
9
|
-
export class
|
|
8
|
+
export class DropTargetDropEvent {
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
13
12
|
constructor(args) {
|
|
14
|
-
super();
|
|
15
13
|
Object.assign(this, args);
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
5
|
/**
|
|
7
6
|
* Arguments for the dragEnter event of the DropTarget.
|
|
8
7
|
*/
|
|
9
|
-
export class
|
|
8
|
+
export class DropTargetDragEnterEvent {
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
13
12
|
constructor(args) {
|
|
14
|
-
super();
|
|
15
13
|
Object.assign(this, args);
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
5
|
+
export { DropTargetDragEnterEvent } from './enter-event';
|
|
6
|
+
export { DropTargetDragOverEvent } from './over-event';
|
|
7
|
+
export { DropTargetDragLeaveEvent } from './leave-event';
|
|
8
|
+
export { DropTargetDropEvent } from './drop-event';
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
5
|
/**
|
|
7
6
|
* Arguments for the dragLeave event of the DropTarget.
|
|
8
7
|
*/
|
|
9
|
-
export class
|
|
8
|
+
export class DropTargetDragLeaveEvent {
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
13
12
|
constructor(args) {
|
|
14
|
-
super();
|
|
15
13
|
Object.assign(this, args);
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
5
|
/**
|
|
7
6
|
* Arguments for the dragOver event of the DropTarget.
|
|
8
7
|
*/
|
|
9
|
-
export class
|
|
8
|
+
export class DropTargetDragOverEvent {
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
13
12
|
constructor(args) {
|
|
14
|
-
super();
|
|
15
13
|
Object.assign(this, args);
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -15,6 +15,37 @@ const EXPORTS = [
|
|
|
15
15
|
DropTargetDirective,
|
|
16
16
|
HintComponent
|
|
17
17
|
];
|
|
18
|
+
/**
|
|
19
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
20
|
+
* definition for the Drag and Drop directives.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
*
|
|
24
|
+
* ```ts-no-run
|
|
25
|
+
* // Import the DragAndDrop module
|
|
26
|
+
* import { DragAndDropModule } from '@progress/kendo-angular-utils';
|
|
27
|
+
*
|
|
28
|
+
* // The browser platform with a compiler
|
|
29
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
30
|
+
*
|
|
31
|
+
* import { NgModule } from '@angular/core';
|
|
32
|
+
*
|
|
33
|
+
* // Import the app component
|
|
34
|
+
* import { AppComponent } from './app.component';
|
|
35
|
+
*
|
|
36
|
+
* // Define the app module
|
|
37
|
+
* _@NgModule({
|
|
38
|
+
* declarations: [AppComponent], // declare app component
|
|
39
|
+
* imports: [BrowserModule, DragAndDropModule], // import DragAndDropModule module
|
|
40
|
+
* bootstrap: [AppComponent]
|
|
41
|
+
* })
|
|
42
|
+
* export class AppModule {}
|
|
43
|
+
*
|
|
44
|
+
* // Compile and launch the module
|
|
45
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
46
|
+
*
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
18
49
|
export class DragAndDropModule {
|
|
19
50
|
}
|
|
20
51
|
DragAndDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragAndDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -31,6 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
31
62
|
args: [{
|
|
32
63
|
declarations: [...EXPORTS],
|
|
33
64
|
exports: [...EXPORTS],
|
|
34
|
-
imports: [CommonModule]
|
|
65
|
+
imports: [CommonModule],
|
|
66
|
+
entryComponents: [HintComponent]
|
|
35
67
|
}]
|
|
36
68
|
}] });
|
|
@@ -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:
|
|
12
|
+
publishDate: 1663064885,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|