@progress/kendo-angular-utils 17.0.0-develop.21 → 17.0.0-develop.23
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 +1 -1
- package/drag-and-drop/dragtarget.directive.d.ts +1 -1
- package/drag-and-drop/droptarget-container.directive.d.ts +1 -1
- package/drag-and-drop/hint.component.d.ts +1 -1
- package/drag-and-drop/models/drag-axis.d.ts +1 -1
- package/drag-and-drop/models/drag-mode.d.ts +1 -1
- package/drag-and-drop/models/functions.d.ts +2 -2
- package/{esm2020 → esm2022}/drag-and-drop/drag-state.service.mjs +28 -24
- package/{esm2020 → esm2022}/drag-and-drop/draghandle.directive.mjs +5 -4
- package/{esm2020 → esm2022}/drag-and-drop/dragtarget-container.directive.mjs +90 -76
- package/{esm2020 → esm2022}/drag-and-drop/dragtarget.directive.mjs +90 -76
- package/{esm2020 → esm2022}/drag-and-drop/droptarget-container.directive.mjs +34 -30
- package/{esm2020 → esm2022}/drag-and-drop/droptarget.directive.mjs +23 -19
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/drag-event.mjs +25 -5
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/dragready-event.mjs +16 -0
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/end-event.mjs +20 -4
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/press-event.mjs +20 -4
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/release-event.mjs +20 -4
- package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/start-event.mjs +21 -5
- package/{esm2020 → esm2022}/drag-and-drop/events/drop-target-event.mjs +28 -4
- package/{esm2020 → esm2022}/drag-and-drop/hint.component.mjs +10 -5
- package/{esm2020 → esm2022}/drag-and-drop.module.mjs +4 -4
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/utils.module.mjs +4 -4
- package/{fesm2020 → fesm2022}/progress-kendo-angular-utils.mjs +441 -271
- package/package.json +11 -17
- package/fesm2015/progress-kendo-angular-utils.mjs +0 -2036
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/events/drag-target/index.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/events/index.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/autoscroll-options.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/coordinates.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drag-axis.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drag-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/functions.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/hint-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/util.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-utils.mjs +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Directive, HostBinding, Injectable, Component, Input,
|
|
6
|
+
import { Directive, HostBinding, Injectable, Component, Input, isDevMode, EventEmitter, Output, ContentChildren, NgModule } from '@angular/core';
|
|
7
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
8
|
import { fromEvent, merge } from 'rxjs';
|
|
9
9
|
import { filter } from 'rxjs/operators';
|
|
@@ -16,14 +16,15 @@ import { NgTemplateOutlet } from '@angular/common';
|
|
|
16
16
|
* It is used to specify a concrete element within a drag target as a handle for dragging, instead the drag target itself.
|
|
17
17
|
*/
|
|
18
18
|
class DragHandleDirective {
|
|
19
|
+
element;
|
|
19
20
|
constructor(element) {
|
|
20
21
|
this.element = element;
|
|
21
|
-
this.cursorStyle = 'move';
|
|
22
22
|
}
|
|
23
|
+
cursorStyle = 'move';
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragHandleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
25
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragHandleDirective, isStandalone: true, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, exportAs: ["kendoDragHandle"], ngImport: i0 });
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
DragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragHandleDirective, isStandalone: true, selector: "[kendoDragHandle]", host: { properties: { "style.cursor": "this.cursorStyle" } }, exportAs: ["kendoDragHandle"], ngImport: i0 });
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragHandleDirective, decorators: [{
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragHandleDirective, decorators: [{
|
|
27
28
|
type: Directive,
|
|
28
29
|
args: [{
|
|
29
30
|
selector: '[kendoDragHandle]',
|
|
@@ -42,8 +43,8 @@ const packageMetadata = {
|
|
|
42
43
|
name: '@progress/kendo-angular-utils',
|
|
43
44
|
productName: 'Kendo UI for Angular',
|
|
44
45
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
45
|
-
publishDate:
|
|
46
|
-
version: '17.0.0-develop.
|
|
46
|
+
publishDate: 1730104845,
|
|
47
|
+
version: '17.0.0-develop.23',
|
|
47
48
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
48
49
|
};
|
|
49
50
|
|
|
@@ -147,29 +148,33 @@ const allPointerUpEvents = ['pointerup', 'pointercancel', 'mouseup', 'contextmen
|
|
|
147
148
|
*/
|
|
148
149
|
class DragStateService {
|
|
149
150
|
constructor() {
|
|
150
|
-
this.dragTarget = null;
|
|
151
|
-
this.dropTarget = null;
|
|
152
|
-
this.dragTargets = [];
|
|
153
|
-
this.dropTargets = [];
|
|
154
|
-
this.pressed = false;
|
|
155
|
-
this.ignoreMouse = false;
|
|
156
|
-
this.autoScroll = true;
|
|
157
|
-
this.isScrolling = false;
|
|
158
|
-
this.scrollableParent = null;
|
|
159
|
-
this.autoScrollDirection = { horizontal: true, vertical: true };
|
|
160
|
-
this.initialClientOffset = { x: 0, y: 0 };
|
|
161
|
-
this.clientOffset = { x: 0, y: 0 };
|
|
162
|
-
this.initialScrollOffset = { x: 0, y: 0 };
|
|
163
|
-
this.scrollOffset = { x: 0, y: 0 };
|
|
164
|
-
this.offset = { x: 0, y: 0 };
|
|
165
|
-
this.pageOffset = { x: 0, y: 0 };
|
|
166
|
-
this.velocity = { x: 0, y: 0 };
|
|
167
|
-
this.dragIndex = null;
|
|
168
|
-
this.dropIndex = null;
|
|
169
|
-
this.callbacks = {};
|
|
170
|
-
this.scrollInterval = null;
|
|
171
151
|
this.setCallbacks();
|
|
172
152
|
}
|
|
153
|
+
dragTarget = null;
|
|
154
|
+
dropTarget = null;
|
|
155
|
+
dragTargets = [];
|
|
156
|
+
dropTargets = [];
|
|
157
|
+
pressed = false;
|
|
158
|
+
ignoreMouse = false;
|
|
159
|
+
autoScroll = true;
|
|
160
|
+
isScrolling = false;
|
|
161
|
+
scrollableParent = null;
|
|
162
|
+
autoScrollDirection = { horizontal: true, vertical: true };
|
|
163
|
+
initialClientOffset = { x: 0, y: 0 };
|
|
164
|
+
clientOffset = { x: 0, y: 0 };
|
|
165
|
+
initialScrollOffset = { x: 0, y: 0 };
|
|
166
|
+
scrollOffset = { x: 0, y: 0 };
|
|
167
|
+
offset = { x: 0, y: 0 };
|
|
168
|
+
pageOffset = { x: 0, y: 0 };
|
|
169
|
+
velocity = { x: 0, y: 0 };
|
|
170
|
+
dragTargetDirective;
|
|
171
|
+
state;
|
|
172
|
+
dragIndex = null;
|
|
173
|
+
dropIndex = null;
|
|
174
|
+
dragData;
|
|
175
|
+
dragTargetId;
|
|
176
|
+
callbacks = {};
|
|
177
|
+
scrollInterval = null;
|
|
173
178
|
handleDragAndDrop(action) {
|
|
174
179
|
this.updateState();
|
|
175
180
|
dispatchDragAndDrop(this.state, action, this.callbacks);
|
|
@@ -260,10 +265,10 @@ class DragStateService {
|
|
|
260
265
|
this.scrollInterval = null;
|
|
261
266
|
}
|
|
262
267
|
}
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
269
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragStateService, providedIn: 'root' });
|
|
263
270
|
}
|
|
264
|
-
|
|
265
|
-
DragStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragStateService, providedIn: 'root' });
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragStateService, decorators: [{
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragStateService, decorators: [{
|
|
267
272
|
type: Injectable,
|
|
268
273
|
args: [{
|
|
269
274
|
providedIn: 'root'
|
|
@@ -274,17 +279,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
274
279
|
* @hidden
|
|
275
280
|
*/
|
|
276
281
|
class HintComponent {
|
|
282
|
+
element;
|
|
283
|
+
template;
|
|
284
|
+
directive;
|
|
285
|
+
targetIndex;
|
|
286
|
+
contextData;
|
|
287
|
+
pointerEvents = 'none';
|
|
277
288
|
constructor(element) {
|
|
278
289
|
this.element = element;
|
|
279
|
-
this.pointerEvents = 'none';
|
|
280
290
|
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
HintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HintComponent, isStandalone: true, selector: "kendo-draghint", inputs: { template: "template", directive: "directive", targetIndex: "targetIndex", contextData: "contextData" }, host: { properties: { "style.pointer-events": "this.pointerEvents" } }, ngImport: i0, template: `
|
|
291
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HintComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
292
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: HintComponent, isStandalone: true, selector: "kendo-draghint", inputs: { template: "template", directive: "directive", targetIndex: "targetIndex", contextData: "contextData" }, host: { properties: { "style.pointer-events": "this.pointerEvents" } }, ngImport: i0, template: `
|
|
284
293
|
<ng-container *ngTemplateOutlet="template; context: { $implicit: directive, index: targetIndex, data: contextData }">
|
|
285
294
|
</ng-container>
|
|
286
295
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
287
|
-
|
|
296
|
+
}
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HintComponent, decorators: [{
|
|
288
298
|
type: Component,
|
|
289
299
|
args: [{
|
|
290
300
|
selector: 'kendo-draghint',
|
|
@@ -313,11 +323,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
313
323
|
*/
|
|
314
324
|
class DragTargetPressEvent {
|
|
315
325
|
/**
|
|
316
|
-
*
|
|
326
|
+
* The normalized drag event.
|
|
317
327
|
*/
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
328
|
+
dragEvent;
|
|
329
|
+
/**
|
|
330
|
+
* The DOM element that is being dragged.
|
|
331
|
+
*/
|
|
332
|
+
dragTarget;
|
|
333
|
+
/**
|
|
334
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
335
|
+
*/
|
|
336
|
+
dragTargetId;
|
|
337
|
+
/**
|
|
338
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
339
|
+
*/
|
|
340
|
+
dragTargetIndex;
|
|
321
341
|
/**
|
|
322
342
|
* Left for backward compatibility for the DragTarget deprecated events.
|
|
323
343
|
* @hidden
|
|
@@ -332,12 +352,34 @@ class DragTargetPressEvent {
|
|
|
332
352
|
get hostElement() {
|
|
333
353
|
return this.dragTarget;
|
|
334
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* @hidden
|
|
357
|
+
*/
|
|
358
|
+
constructor(args) {
|
|
359
|
+
Object.assign(this, args);
|
|
360
|
+
}
|
|
335
361
|
}
|
|
336
362
|
|
|
337
363
|
/**
|
|
338
364
|
* Arguments for the dragReady event of the DragTarget and DragTargetContainer.
|
|
339
365
|
*/
|
|
340
366
|
class DragTargetDragReadyEvent {
|
|
367
|
+
/**
|
|
368
|
+
* The normalized drag event.
|
|
369
|
+
*/
|
|
370
|
+
dragEvent;
|
|
371
|
+
/**
|
|
372
|
+
* The DOM element that is being dragged.
|
|
373
|
+
*/
|
|
374
|
+
dragTarget;
|
|
375
|
+
/**
|
|
376
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
377
|
+
*/
|
|
378
|
+
dragTargetId;
|
|
379
|
+
/**
|
|
380
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
381
|
+
*/
|
|
382
|
+
dragTargetIndex;
|
|
341
383
|
/**
|
|
342
384
|
* @hidden
|
|
343
385
|
*/
|
|
@@ -351,12 +393,21 @@ class DragTargetDragReadyEvent {
|
|
|
351
393
|
*/
|
|
352
394
|
class DragTargetDragStartEvent extends PreventableEvent {
|
|
353
395
|
/**
|
|
354
|
-
*
|
|
396
|
+
* The normalized drag event.
|
|
355
397
|
*/
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
398
|
+
dragEvent;
|
|
399
|
+
/**
|
|
400
|
+
* The DOM element that is being dragged.
|
|
401
|
+
*/
|
|
402
|
+
dragTarget;
|
|
403
|
+
/**
|
|
404
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
405
|
+
*/
|
|
406
|
+
dragTargetId;
|
|
407
|
+
/**
|
|
408
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
409
|
+
*/
|
|
410
|
+
dragTargetIndex;
|
|
360
411
|
/**
|
|
361
412
|
* Left for backward compatibility for the DragTarget deprecated events.
|
|
362
413
|
* @hidden
|
|
@@ -371,6 +422,13 @@ class DragTargetDragStartEvent extends PreventableEvent {
|
|
|
371
422
|
get hostElement() {
|
|
372
423
|
return this.dragTarget;
|
|
373
424
|
}
|
|
425
|
+
/**
|
|
426
|
+
* @hidden
|
|
427
|
+
*/
|
|
428
|
+
constructor(args) {
|
|
429
|
+
super();
|
|
430
|
+
Object.assign(this, args);
|
|
431
|
+
}
|
|
374
432
|
}
|
|
375
433
|
|
|
376
434
|
/**
|
|
@@ -378,11 +436,21 @@ class DragTargetDragStartEvent extends PreventableEvent {
|
|
|
378
436
|
*/
|
|
379
437
|
class DragTargetDragEndEvent {
|
|
380
438
|
/**
|
|
381
|
-
*
|
|
439
|
+
* The normalized drag event.
|
|
382
440
|
*/
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
441
|
+
dragEvent;
|
|
442
|
+
/**
|
|
443
|
+
* The DOM element that is being dragged.
|
|
444
|
+
*/
|
|
445
|
+
dragTarget;
|
|
446
|
+
/**
|
|
447
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
448
|
+
*/
|
|
449
|
+
dragTargetId;
|
|
450
|
+
/**
|
|
451
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
452
|
+
*/
|
|
453
|
+
dragTargetIndex;
|
|
386
454
|
/**
|
|
387
455
|
* Left for backward compatibility for the DragTarget deprecated events.
|
|
388
456
|
* @hidden
|
|
@@ -397,6 +465,12 @@ class DragTargetDragEndEvent {
|
|
|
397
465
|
get hostElement() {
|
|
398
466
|
return this.dragTarget;
|
|
399
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* @hidden
|
|
470
|
+
*/
|
|
471
|
+
constructor(args) {
|
|
472
|
+
Object.assign(this, args);
|
|
473
|
+
}
|
|
400
474
|
}
|
|
401
475
|
|
|
402
476
|
/**
|
|
@@ -404,12 +478,25 @@ class DragTargetDragEndEvent {
|
|
|
404
478
|
*/
|
|
405
479
|
class DragTargetDragEvent extends PreventableEvent {
|
|
406
480
|
/**
|
|
407
|
-
*
|
|
481
|
+
* The normalized drag event.
|
|
408
482
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
483
|
+
dragEvent;
|
|
484
|
+
/**
|
|
485
|
+
* The DOM element that is being dragged.
|
|
486
|
+
*/
|
|
487
|
+
dragTarget;
|
|
488
|
+
/**
|
|
489
|
+
* The hint of the DragTarget.
|
|
490
|
+
*/
|
|
491
|
+
hintElement;
|
|
492
|
+
/**
|
|
493
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
494
|
+
*/
|
|
495
|
+
dragTargetId;
|
|
496
|
+
/**
|
|
497
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
498
|
+
*/
|
|
499
|
+
dragTargetIndex;
|
|
413
500
|
/**
|
|
414
501
|
* Left for backward compatibility for the DragTarget deprecated events.
|
|
415
502
|
* @hidden
|
|
@@ -424,6 +511,13 @@ class DragTargetDragEvent extends PreventableEvent {
|
|
|
424
511
|
get hostElement() {
|
|
425
512
|
return this.dragTarget;
|
|
426
513
|
}
|
|
514
|
+
/**
|
|
515
|
+
* @hidden
|
|
516
|
+
*/
|
|
517
|
+
constructor(args) {
|
|
518
|
+
super();
|
|
519
|
+
Object.assign(this, args);
|
|
520
|
+
}
|
|
427
521
|
}
|
|
428
522
|
|
|
429
523
|
/**
|
|
@@ -431,11 +525,21 @@ class DragTargetDragEvent extends PreventableEvent {
|
|
|
431
525
|
*/
|
|
432
526
|
class DragTargetReleaseEvent {
|
|
433
527
|
/**
|
|
434
|
-
*
|
|
528
|
+
* The normalized drag event.
|
|
435
529
|
*/
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
530
|
+
dragEvent;
|
|
531
|
+
/**
|
|
532
|
+
* The DOM element that is being dragged.
|
|
533
|
+
*/
|
|
534
|
+
dragTarget;
|
|
535
|
+
/**
|
|
536
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
537
|
+
*/
|
|
538
|
+
dragTargetId;
|
|
539
|
+
/**
|
|
540
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
541
|
+
*/
|
|
542
|
+
dragTargetIndex;
|
|
439
543
|
/**
|
|
440
544
|
* Left for backward compatibility for the DragTarget deprecated events.
|
|
441
545
|
* @hidden
|
|
@@ -450,6 +554,12 @@ class DragTargetReleaseEvent {
|
|
|
450
554
|
get hostElement() {
|
|
451
555
|
return this.dragTarget;
|
|
452
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* @hidden
|
|
559
|
+
*/
|
|
560
|
+
constructor(args) {
|
|
561
|
+
Object.assign(this, args);
|
|
562
|
+
}
|
|
453
563
|
}
|
|
454
564
|
|
|
455
565
|
let isDragStartPrevented$1 = false;
|
|
@@ -466,79 +576,18 @@ let isDragPrevented$1 = false;
|
|
|
466
576
|
* ```
|
|
467
577
|
*/
|
|
468
578
|
class DragTargetContainerDirective {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
this.hint = false;
|
|
482
|
-
/**
|
|
483
|
-
* Defines the delay in milliseconds after which the drag will begin ([see example](slug:drag_target_container#toc-events)).
|
|
484
|
-
*
|
|
485
|
-
* @default 0
|
|
486
|
-
*/
|
|
487
|
-
this.dragDelay = 0;
|
|
488
|
-
/**
|
|
489
|
-
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})).
|
|
490
|
-
*
|
|
491
|
-
* @default 0
|
|
492
|
-
*/
|
|
493
|
-
this.threshold = 0;
|
|
494
|
-
/**
|
|
495
|
-
* Specifies whether the default dragging behavior will be performed or the developer will manually handle the drag action.
|
|
496
|
-
*
|
|
497
|
-
* @default 'auto'
|
|
498
|
-
*/
|
|
499
|
-
this.mode = 'auto';
|
|
500
|
-
/**
|
|
501
|
-
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
502
|
-
*/
|
|
503
|
-
this.onDragReady = new EventEmitter();
|
|
504
|
-
/**
|
|
505
|
-
* Fires when the user presses a DragTarget element.
|
|
506
|
-
*/
|
|
507
|
-
this.onPress = new EventEmitter();
|
|
508
|
-
/**
|
|
509
|
-
* Fires when the dragging of a DragTarget element begins.
|
|
510
|
-
*/
|
|
511
|
-
this.onDragStart = new EventEmitter();
|
|
512
|
-
/**
|
|
513
|
-
* Fires while the user drags a DragTarget element.
|
|
514
|
-
*/
|
|
515
|
-
this.onDrag = new EventEmitter();
|
|
516
|
-
/**
|
|
517
|
-
* Fires when the user releases a DragTarget element after being pressed.
|
|
518
|
-
*/
|
|
519
|
-
this.onRelease = new EventEmitter();
|
|
520
|
-
/**
|
|
521
|
-
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
522
|
-
*/
|
|
523
|
-
this.onDragEnd = new EventEmitter();
|
|
524
|
-
this.currentDragTarget = null;
|
|
525
|
-
this.dragTimeout = null;
|
|
526
|
-
this.pressed = false;
|
|
527
|
-
this.dragStarted = false;
|
|
528
|
-
this.hintComponent = null;
|
|
529
|
-
this.defaultHint = null;
|
|
530
|
-
this.currentDragTargetElement = null;
|
|
531
|
-
this.scrollableParent = null;
|
|
532
|
-
this.previousDragTargets = [];
|
|
533
|
-
this.initialPosition = { x: 0, y: 0 };
|
|
534
|
-
this.position = { x: 0, y: 0 };
|
|
535
|
-
this.positionsMap = new Map();
|
|
536
|
-
this._dragTargetFilter = null;
|
|
537
|
-
this._dragDisabled = false;
|
|
538
|
-
this._dragData = () => null;
|
|
539
|
-
this._dragTargetId = () => null;
|
|
540
|
-
validatePackage(packageMetadata);
|
|
541
|
-
}
|
|
579
|
+
wrapper;
|
|
580
|
+
ngZone;
|
|
581
|
+
renderer;
|
|
582
|
+
service;
|
|
583
|
+
viewContainer;
|
|
584
|
+
cdr;
|
|
585
|
+
/**
|
|
586
|
+
* 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 %})).
|
|
587
|
+
*
|
|
588
|
+
* @default false
|
|
589
|
+
*/
|
|
590
|
+
hint = false;
|
|
542
591
|
/**
|
|
543
592
|
* Specifies a selector for elements within a container which will be configured as draggable
|
|
544
593
|
* ([see example]({% slug drag_target_container %})). The possible values include any
|
|
@@ -553,6 +602,22 @@ class DragTargetContainerDirective {
|
|
|
553
602
|
get dragTargetFilter() {
|
|
554
603
|
return this._dragTargetFilter;
|
|
555
604
|
}
|
|
605
|
+
/**
|
|
606
|
+
* Specifies a selector for elements within each DragTarget which will be configured as drag handles.
|
|
607
|
+
*/
|
|
608
|
+
dragHandle;
|
|
609
|
+
/**
|
|
610
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example](slug:drag_target_container#toc-events)).
|
|
611
|
+
*
|
|
612
|
+
* @default 0
|
|
613
|
+
*/
|
|
614
|
+
dragDelay = 0;
|
|
615
|
+
/**
|
|
616
|
+
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})).
|
|
617
|
+
*
|
|
618
|
+
* @default 0
|
|
619
|
+
*/
|
|
620
|
+
threshold = 0;
|
|
556
621
|
/**
|
|
557
622
|
* Defines a unique identifier for each drag target.
|
|
558
623
|
* It exposes the current DragTarget HTML element and its index in the collection of drag targets as arguments.
|
|
@@ -603,6 +668,36 @@ class DragTargetContainerDirective {
|
|
|
603
668
|
get dragDisabled() {
|
|
604
669
|
return this._dragDisabled;
|
|
605
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* Specifies whether the default dragging behavior will be performed or the developer will manually handle the drag action.
|
|
673
|
+
*
|
|
674
|
+
* @default 'auto'
|
|
675
|
+
*/
|
|
676
|
+
mode = 'auto';
|
|
677
|
+
/**
|
|
678
|
+
* Fires when a DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
679
|
+
*/
|
|
680
|
+
onDragReady = new EventEmitter();
|
|
681
|
+
/**
|
|
682
|
+
* Fires when the user presses a DragTarget element.
|
|
683
|
+
*/
|
|
684
|
+
onPress = new EventEmitter();
|
|
685
|
+
/**
|
|
686
|
+
* Fires when the dragging of a DragTarget element begins.
|
|
687
|
+
*/
|
|
688
|
+
onDragStart = new EventEmitter();
|
|
689
|
+
/**
|
|
690
|
+
* Fires while the user drags a DragTarget element.
|
|
691
|
+
*/
|
|
692
|
+
onDrag = new EventEmitter();
|
|
693
|
+
/**
|
|
694
|
+
* Fires when the user releases a DragTarget element after being pressed.
|
|
695
|
+
*/
|
|
696
|
+
onRelease = new EventEmitter();
|
|
697
|
+
/**
|
|
698
|
+
* Fires when the dragging of a DragTarget ends and the element is released.
|
|
699
|
+
*/
|
|
700
|
+
onDragEnd = new EventEmitter();
|
|
606
701
|
/**
|
|
607
702
|
* Used for notifying the DragTargetContainer that its content has changed.
|
|
608
703
|
*/
|
|
@@ -610,6 +705,26 @@ class DragTargetContainerDirective {
|
|
|
610
705
|
this.cdr.detectChanges();
|
|
611
706
|
this.initializeDragTargets();
|
|
612
707
|
}
|
|
708
|
+
pointerDownSubscription;
|
|
709
|
+
pointerMoveSubscription;
|
|
710
|
+
pointerUpSubscription;
|
|
711
|
+
scrollSubscription;
|
|
712
|
+
currentDragTarget = null;
|
|
713
|
+
dragTimeout = null;
|
|
714
|
+
pressed = false;
|
|
715
|
+
dragStarted = false;
|
|
716
|
+
hintComponent = null;
|
|
717
|
+
defaultHint = null;
|
|
718
|
+
currentDragTargetElement = null;
|
|
719
|
+
scrollableParent = null;
|
|
720
|
+
previousDragTargets = [];
|
|
721
|
+
initialPosition = { x: 0, y: 0 };
|
|
722
|
+
position = { x: 0, y: 0 };
|
|
723
|
+
positionsMap = new Map();
|
|
724
|
+
_dragTargetFilter = null;
|
|
725
|
+
_dragDisabled = false;
|
|
726
|
+
_dragData = () => null;
|
|
727
|
+
_dragTargetId = () => null;
|
|
613
728
|
get allDragTargets() {
|
|
614
729
|
return this.queryHost(this.dragTargetFilter);
|
|
615
730
|
}
|
|
@@ -619,6 +734,15 @@ class DragTargetContainerDirective {
|
|
|
619
734
|
get hintTemplate() {
|
|
620
735
|
return isPresent(this.hint) && typeof this.hint === 'object' ? this.hint.hintTemplate : null;
|
|
621
736
|
}
|
|
737
|
+
constructor(wrapper, ngZone, renderer, service, viewContainer, cdr) {
|
|
738
|
+
this.wrapper = wrapper;
|
|
739
|
+
this.ngZone = ngZone;
|
|
740
|
+
this.renderer = renderer;
|
|
741
|
+
this.service = service;
|
|
742
|
+
this.viewContainer = viewContainer;
|
|
743
|
+
this.cdr = cdr;
|
|
744
|
+
validatePackage(packageMetadata);
|
|
745
|
+
}
|
|
622
746
|
ngAfterViewInit() {
|
|
623
747
|
const isTargetPresent = isPresent(this.wrapper) || isPresent(this.currentDragTarget);
|
|
624
748
|
if (!this.dragDisabled && isTargetPresent) {
|
|
@@ -1027,10 +1151,10 @@ class DragTargetContainerDirective {
|
|
|
1027
1151
|
};
|
|
1028
1152
|
}
|
|
1029
1153
|
}
|
|
1154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.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 });
|
|
1155
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragTargetContainerDirective, isStandalone: true, 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 });
|
|
1030
1156
|
}
|
|
1031
|
-
|
|
1032
|
-
DragTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragTargetContainerDirective, isStandalone: true, 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 });
|
|
1033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
1157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetContainerDirective, decorators: [{
|
|
1034
1158
|
type: Directive,
|
|
1035
1159
|
args: [{
|
|
1036
1160
|
selector: '[kendoDragTargetContainer]',
|
|
@@ -1075,79 +1199,49 @@ let isDragPrevented = false;
|
|
|
1075
1199
|
* Represents the Kendo UI DragTarget directive for Angular.
|
|
1076
1200
|
*/
|
|
1077
1201
|
class DragTargetDirective {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
this.onDragStart = new EventEmitter();
|
|
1122
|
-
/**
|
|
1123
|
-
* Fires while the user drags the DragTarget element.
|
|
1124
|
-
*/
|
|
1125
|
-
this.onDrag = new EventEmitter();
|
|
1126
|
-
/**
|
|
1127
|
-
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
1128
|
-
*/
|
|
1129
|
-
this.onDragReady = new EventEmitter();
|
|
1130
|
-
/**
|
|
1131
|
-
* Fires when the user releases the DragTarget element after being pressed.
|
|
1132
|
-
*/
|
|
1133
|
-
this.onRelease = new EventEmitter();
|
|
1134
|
-
/**
|
|
1135
|
-
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
1136
|
-
*/
|
|
1137
|
-
this.onDragEnd = new EventEmitter();
|
|
1138
|
-
this.dragTarget = null;
|
|
1139
|
-
this.domSubscriptions = [];
|
|
1140
|
-
this.hintComponent = null;
|
|
1141
|
-
this.dragStarted = false;
|
|
1142
|
-
this.pressed = false;
|
|
1143
|
-
this.dragTimeout = null;
|
|
1144
|
-
this.initialPosition = { x: 0, y: 0 };
|
|
1145
|
-
this.position = { x: 0, y: 0 };
|
|
1146
|
-
this.scrollableParent = null;
|
|
1147
|
-
this.defaultHint = null;
|
|
1148
|
-
this._dragData = () => null;
|
|
1149
|
-
validatePackage(packageMetadata);
|
|
1150
|
-
}
|
|
1202
|
+
element;
|
|
1203
|
+
renderer;
|
|
1204
|
+
ngZone;
|
|
1205
|
+
service;
|
|
1206
|
+
viewContainer;
|
|
1207
|
+
/**
|
|
1208
|
+
* Defines whether a hint will be used for dragging. By default, the hint is a copy of the drag target. ([see example]({% slug drag_hint %})).
|
|
1209
|
+
*
|
|
1210
|
+
* @default false
|
|
1211
|
+
*/
|
|
1212
|
+
hint = false;
|
|
1213
|
+
/**
|
|
1214
|
+
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})). Applicable when `manualDrag` is set to `false`.
|
|
1215
|
+
*
|
|
1216
|
+
* @default 0
|
|
1217
|
+
*/
|
|
1218
|
+
threshold = 0;
|
|
1219
|
+
/**
|
|
1220
|
+
* Defines the automatic container scrolling behavior when close to the edge ([see example]({% slug auto_scroll %})).
|
|
1221
|
+
*
|
|
1222
|
+
* @default true
|
|
1223
|
+
*/
|
|
1224
|
+
autoScroll = true;
|
|
1225
|
+
/**
|
|
1226
|
+
* Defines a unique identifier for the dragTarget.
|
|
1227
|
+
*/
|
|
1228
|
+
dragTargetId;
|
|
1229
|
+
/**
|
|
1230
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example]({% slug drag_delay %})).
|
|
1231
|
+
*
|
|
1232
|
+
* @default 0
|
|
1233
|
+
*/
|
|
1234
|
+
dragDelay = 0;
|
|
1235
|
+
/**
|
|
1236
|
+
* Restricts the element to be dragged horizontally or vertically only ([see example]({% slug axis_lock %})). Applicable when `mode` is set to `auto`.
|
|
1237
|
+
*/
|
|
1238
|
+
restrictByAxis;
|
|
1239
|
+
/**
|
|
1240
|
+
* Specifies whether the default dragging behavior will be performed or the developer will manually handle the drag action.
|
|
1241
|
+
*
|
|
1242
|
+
* @default 'auto'
|
|
1243
|
+
*/
|
|
1244
|
+
mode = 'auto';
|
|
1151
1245
|
/**
|
|
1152
1246
|
* Defines a callback function used for attaching custom data to the dragTarget.
|
|
1153
1247
|
* The data will be available in the events of the respective [`DropTarget`]({% slug api_utils_droptargetdirective %}) or [`DropTargetContainer`]({% slug api_utils_droptargetcontainerdirective %}) directives.
|
|
@@ -1162,6 +1256,41 @@ class DragTargetDirective {
|
|
|
1162
1256
|
get dragData() {
|
|
1163
1257
|
return this._dragData;
|
|
1164
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* Fires when the user presses the DragTarget element.
|
|
1261
|
+
*/
|
|
1262
|
+
onPress = new EventEmitter();
|
|
1263
|
+
/**
|
|
1264
|
+
* Fires when the dragging of the DragTarget element begins.
|
|
1265
|
+
*/
|
|
1266
|
+
onDragStart = new EventEmitter();
|
|
1267
|
+
/**
|
|
1268
|
+
* Fires while the user drags the DragTarget element.
|
|
1269
|
+
*/
|
|
1270
|
+
onDrag = new EventEmitter();
|
|
1271
|
+
/**
|
|
1272
|
+
* Fires when the DragTarget's `dragDelay` has passed and the user is able to drag the element.
|
|
1273
|
+
*/
|
|
1274
|
+
onDragReady = new EventEmitter();
|
|
1275
|
+
/**
|
|
1276
|
+
* Fires when the user releases the DragTarget element after being pressed.
|
|
1277
|
+
*/
|
|
1278
|
+
onRelease = new EventEmitter();
|
|
1279
|
+
/**
|
|
1280
|
+
* Fires when the dragging of the DragTarget ends and the element is released.
|
|
1281
|
+
*/
|
|
1282
|
+
onDragEnd = new EventEmitter();
|
|
1283
|
+
dragTarget = null;
|
|
1284
|
+
domSubscriptions = [];
|
|
1285
|
+
hintComponent = null;
|
|
1286
|
+
dragStarted = false;
|
|
1287
|
+
pressed = false;
|
|
1288
|
+
dragTimeout = null;
|
|
1289
|
+
initialPosition = { x: 0, y: 0 };
|
|
1290
|
+
position = { x: 0, y: 0 };
|
|
1291
|
+
scrollableParent = null;
|
|
1292
|
+
defaultHint = null;
|
|
1293
|
+
_dragData = () => null;
|
|
1165
1294
|
get hintTemplate() {
|
|
1166
1295
|
return isPresent(this.hint) && typeof this.hint === 'object' ? this.hint.hintTemplate : null;
|
|
1167
1296
|
}
|
|
@@ -1194,6 +1323,15 @@ class DragTargetDirective {
|
|
|
1194
1323
|
this.service.handleDragAndDrop(action);
|
|
1195
1324
|
this.attachDomHandlers();
|
|
1196
1325
|
}
|
|
1326
|
+
dragHandles;
|
|
1327
|
+
constructor(element, renderer, ngZone, service, viewContainer) {
|
|
1328
|
+
this.element = element;
|
|
1329
|
+
this.renderer = renderer;
|
|
1330
|
+
this.ngZone = ngZone;
|
|
1331
|
+
this.service = service;
|
|
1332
|
+
this.viewContainer = viewContainer;
|
|
1333
|
+
validatePackage(packageMetadata);
|
|
1334
|
+
}
|
|
1197
1335
|
ngOnInit() {
|
|
1198
1336
|
this.initializeDragTarget();
|
|
1199
1337
|
}
|
|
@@ -1515,10 +1653,10 @@ class DragTargetDirective {
|
|
|
1515
1653
|
};
|
|
1516
1654
|
}
|
|
1517
1655
|
}
|
|
1656
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: DragStateService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1657
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragTargetDirective, isStandalone: true, 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 });
|
|
1518
1658
|
}
|
|
1519
|
-
|
|
1520
|
-
DragTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragTargetDirective, isStandalone: true, 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 });
|
|
1521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
1659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragTargetDirective, decorators: [{
|
|
1522
1660
|
type: Directive,
|
|
1523
1661
|
args: [{
|
|
1524
1662
|
selector: '[kendoDragTarget]',
|
|
@@ -1563,11 +1701,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1563
1701
|
*/
|
|
1564
1702
|
class DropTargetEvent {
|
|
1565
1703
|
/**
|
|
1566
|
-
*
|
|
1704
|
+
* The current drag target element.
|
|
1567
1705
|
*/
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1706
|
+
dragTarget;
|
|
1707
|
+
/**
|
|
1708
|
+
* The current drop target element.
|
|
1709
|
+
*/
|
|
1710
|
+
dropTarget;
|
|
1711
|
+
/**
|
|
1712
|
+
* The information related to the current drag event.
|
|
1713
|
+
*/
|
|
1714
|
+
dragEvent;
|
|
1715
|
+
/**
|
|
1716
|
+
* The data passed to the `dragData` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
1717
|
+
*/
|
|
1718
|
+
dragData;
|
|
1719
|
+
/**
|
|
1720
|
+
* The index of the current drop target in the collection of drop targets (applicable for the `DropTargetContainer` directive).
|
|
1721
|
+
*/
|
|
1722
|
+
dropTargetIndex;
|
|
1723
|
+
/**
|
|
1724
|
+
* The hint of the DragTarget.
|
|
1725
|
+
*/
|
|
1726
|
+
hintElement;
|
|
1571
1727
|
/**
|
|
1572
1728
|
* Left for backward compatibility for the DropTarget deprecated events.
|
|
1573
1729
|
* @hidden
|
|
@@ -1582,6 +1738,12 @@ class DropTargetEvent {
|
|
|
1582
1738
|
get hostElement() {
|
|
1583
1739
|
return this.dropTarget;
|
|
1584
1740
|
}
|
|
1741
|
+
/**
|
|
1742
|
+
* @hidden
|
|
1743
|
+
*/
|
|
1744
|
+
constructor(args) {
|
|
1745
|
+
Object.assign(this, args);
|
|
1746
|
+
}
|
|
1585
1747
|
}
|
|
1586
1748
|
|
|
1587
1749
|
/**
|
|
@@ -1596,33 +1758,10 @@ class DropTargetEvent {
|
|
|
1596
1758
|
* ```
|
|
1597
1759
|
*/
|
|
1598
1760
|
class DropTargetContainerDirective {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
this.cdr = cdr;
|
|
1604
|
-
/**
|
|
1605
|
-
* Fires when a DragTarget element enters the DropTarget.
|
|
1606
|
-
*/
|
|
1607
|
-
this.onDragEnter = new EventEmitter();
|
|
1608
|
-
/**
|
|
1609
|
-
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
1610
|
-
*/
|
|
1611
|
-
this.onDragOver = new EventEmitter();
|
|
1612
|
-
/**
|
|
1613
|
-
* Fires when a DragTarget element leaves the DropTarget.
|
|
1614
|
-
*/
|
|
1615
|
-
this.onDragLeave = new EventEmitter();
|
|
1616
|
-
/**
|
|
1617
|
-
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
1618
|
-
*/
|
|
1619
|
-
this.onDrop = new EventEmitter();
|
|
1620
|
-
this.currentDropTargetElement = null;
|
|
1621
|
-
this.previousDropTargets = [];
|
|
1622
|
-
this._dropTargetFilter = null;
|
|
1623
|
-
this._dropDisabled = false;
|
|
1624
|
-
validatePackage(packageMetadata);
|
|
1625
|
-
}
|
|
1761
|
+
service;
|
|
1762
|
+
element;
|
|
1763
|
+
ngZone;
|
|
1764
|
+
cdr;
|
|
1626
1765
|
/**
|
|
1627
1766
|
* Specifies a selector for elements within a container which will be configured as drop targets
|
|
1628
1767
|
* ([see example]({% slug drop_target_container %})). The possible values include any
|
|
@@ -1652,6 +1791,22 @@ class DropTargetContainerDirective {
|
|
|
1652
1791
|
get dropDisabled() {
|
|
1653
1792
|
return this._dropDisabled;
|
|
1654
1793
|
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Fires when a DragTarget element enters the DropTarget.
|
|
1796
|
+
*/
|
|
1797
|
+
onDragEnter = new EventEmitter();
|
|
1798
|
+
/**
|
|
1799
|
+
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
1800
|
+
*/
|
|
1801
|
+
onDragOver = new EventEmitter();
|
|
1802
|
+
/**
|
|
1803
|
+
* Fires when a DragTarget element leaves the DropTarget.
|
|
1804
|
+
*/
|
|
1805
|
+
onDragLeave = new EventEmitter();
|
|
1806
|
+
/**
|
|
1807
|
+
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
1808
|
+
*/
|
|
1809
|
+
onDrop = new EventEmitter();
|
|
1655
1810
|
/**
|
|
1656
1811
|
* Used for notifying the DropTargetContainer that its content has changed.
|
|
1657
1812
|
*/
|
|
@@ -1659,6 +1814,17 @@ class DropTargetContainerDirective {
|
|
|
1659
1814
|
this.cdr.detectChanges();
|
|
1660
1815
|
this.initializeDropTargets();
|
|
1661
1816
|
}
|
|
1817
|
+
constructor(service, element, ngZone, cdr) {
|
|
1818
|
+
this.service = service;
|
|
1819
|
+
this.element = element;
|
|
1820
|
+
this.ngZone = ngZone;
|
|
1821
|
+
this.cdr = cdr;
|
|
1822
|
+
validatePackage(packageMetadata);
|
|
1823
|
+
}
|
|
1824
|
+
currentDropTargetElement = null;
|
|
1825
|
+
previousDropTargets = [];
|
|
1826
|
+
_dropTargetFilter = null;
|
|
1827
|
+
_dropDisabled = false;
|
|
1662
1828
|
get nativeElement() {
|
|
1663
1829
|
return this.element.nativeElement;
|
|
1664
1830
|
}
|
|
@@ -1779,10 +1945,10 @@ class DropTargetContainerDirective {
|
|
|
1779
1945
|
});
|
|
1780
1946
|
this.previousDropTargets = [];
|
|
1781
1947
|
}
|
|
1948
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropTargetContainerDirective, deps: [{ token: DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1949
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DropTargetContainerDirective, isStandalone: true, selector: "[kendoDropTargetContainer]", inputs: { dropTargetFilter: "dropTargetFilter", dropDisabled: "dropDisabled" }, outputs: { onDragEnter: "onDragEnter", onDragOver: "onDragOver", onDragLeave: "onDragLeave", onDrop: "onDrop" }, exportAs: ["kendoDropTargetContainer"], ngImport: i0 });
|
|
1782
1950
|
}
|
|
1783
|
-
|
|
1784
|
-
DropTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropTargetContainerDirective, isStandalone: true, selector: "[kendoDropTargetContainer]", inputs: { dropTargetFilter: "dropTargetFilter", dropDisabled: "dropDisabled" }, outputs: { onDragEnter: "onDragEnter", onDragOver: "onDragOver", onDragLeave: "onDragLeave", onDrop: "onDrop" }, exportAs: ["kendoDropTargetContainer"], ngImport: i0 });
|
|
1785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropTargetContainerDirective, decorators: [{
|
|
1951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropTargetContainerDirective, decorators: [{
|
|
1786
1952
|
type: Directive,
|
|
1787
1953
|
args: [{
|
|
1788
1954
|
selector: '[kendoDropTargetContainer]',
|
|
@@ -1807,28 +1973,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1807
1973
|
* Represents the Kendo UI DropTarget directive for Angular.
|
|
1808
1974
|
*/
|
|
1809
1975
|
class DropTargetDirective {
|
|
1976
|
+
service;
|
|
1977
|
+
element;
|
|
1978
|
+
ngZone;
|
|
1979
|
+
/**
|
|
1980
|
+
* Fires when a DragTarget element enters the DropTarget.
|
|
1981
|
+
*/
|
|
1982
|
+
onDragEnter = new EventEmitter();
|
|
1983
|
+
/**
|
|
1984
|
+
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
1985
|
+
*/
|
|
1986
|
+
onDragOver = new EventEmitter();
|
|
1987
|
+
/**
|
|
1988
|
+
* Fires when a DragTarget element leaves the DropTarget.
|
|
1989
|
+
*/
|
|
1990
|
+
onDragLeave = new EventEmitter();
|
|
1991
|
+
/**
|
|
1992
|
+
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
1993
|
+
*/
|
|
1994
|
+
onDrop = new EventEmitter();
|
|
1810
1995
|
constructor(service, element, ngZone) {
|
|
1811
1996
|
this.service = service;
|
|
1812
1997
|
this.element = element;
|
|
1813
1998
|
this.ngZone = ngZone;
|
|
1814
|
-
/**
|
|
1815
|
-
* Fires when a DragTarget element enters the DropTarget.
|
|
1816
|
-
*/
|
|
1817
|
-
this.onDragEnter = new EventEmitter();
|
|
1818
|
-
/**
|
|
1819
|
-
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
1820
|
-
*/
|
|
1821
|
-
this.onDragOver = new EventEmitter();
|
|
1822
|
-
/**
|
|
1823
|
-
* Fires when a DragTarget element leaves the DropTarget.
|
|
1824
|
-
*/
|
|
1825
|
-
this.onDragLeave = new EventEmitter();
|
|
1826
|
-
/**
|
|
1827
|
-
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
1828
|
-
*/
|
|
1829
|
-
this.onDrop = new EventEmitter();
|
|
1830
1999
|
validatePackage(packageMetadata);
|
|
1831
2000
|
}
|
|
2001
|
+
dropTarget;
|
|
1832
2002
|
ngOnInit() {
|
|
1833
2003
|
this.initializeDropTarget();
|
|
1834
2004
|
this.service.dropTargets.push(this.dropTarget);
|
|
@@ -1893,10 +2063,10 @@ class DropTargetDirective {
|
|
|
1893
2063
|
this[event].emit(eventArgs);
|
|
1894
2064
|
});
|
|
1895
2065
|
}
|
|
2066
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropTargetDirective, deps: [{ token: DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2067
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DropTargetDirective, isStandalone: true, selector: "[kendoDropTarget]", outputs: { onDragEnter: "onDragEnter", onDragOver: "onDragOver", onDragLeave: "onDragLeave", onDrop: "onDrop" }, exportAs: ["kendoDropTarget"], ngImport: i0 });
|
|
1896
2068
|
}
|
|
1897
|
-
|
|
1898
|
-
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropTargetDirective, isStandalone: true, selector: "[kendoDropTarget]", outputs: { onDragEnter: "onDragEnter", onDragOver: "onDragOver", onDragLeave: "onDragLeave", onDrop: "onDrop" }, exportAs: ["kendoDropTarget"], ngImport: i0 });
|
|
1899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
2069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
1900
2070
|
type: Directive,
|
|
1901
2071
|
args: [{
|
|
1902
2072
|
selector: '[kendoDropTarget]',
|
|
@@ -1965,11 +2135,11 @@ const KENDO_UTILS = [
|
|
|
1965
2135
|
* ```
|
|
1966
2136
|
*/
|
|
1967
2137
|
class UtilsModule {
|
|
2138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2139
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: UtilsModule, imports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent], exports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent] });
|
|
2140
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UtilsModule });
|
|
1968
2141
|
}
|
|
1969
|
-
|
|
1970
|
-
UtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UtilsModule, imports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent], exports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent] });
|
|
1971
|
-
UtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsModule, imports: [HintComponent] });
|
|
1972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsModule, decorators: [{
|
|
2142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UtilsModule, decorators: [{
|
|
1973
2143
|
type: NgModule,
|
|
1974
2144
|
args: [{
|
|
1975
2145
|
exports: [...KENDO_UTILS],
|
|
@@ -2010,11 +2180,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2010
2180
|
* ```
|
|
2011
2181
|
*/
|
|
2012
2182
|
class DragAndDropModule {
|
|
2183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2184
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropModule, imports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent], exports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent] });
|
|
2185
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropModule });
|
|
2013
2186
|
}
|
|
2014
|
-
|
|
2015
|
-
DragAndDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropModule, imports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent], exports: [DragTargetDirective, DragHandleDirective, DropTargetDirective, DragTargetContainerDirective, DropTargetContainerDirective, HintComponent] });
|
|
2016
|
-
DragAndDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropModule, imports: [HintComponent] });
|
|
2017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropModule, decorators: [{
|
|
2187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropModule, decorators: [{
|
|
2018
2188
|
type: NgModule,
|
|
2019
2189
|
args: [{
|
|
2020
2190
|
exports: [...KENDO_DRAGANDDROP],
|