@progress/kendo-angular-utils 0.1.0
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/LICENSE.md +11 -0
- package/NOTICE.txt +654 -0
- package/README.md +31 -0
- package/bundles/kendo-angular-utils.umd.js +5 -0
- package/drag-and-drop/drag-state.service.d.ts +52 -0
- package/drag-and-drop/draghandle.directive.d.ts +16 -0
- package/drag-and-drop/dragtarget.directive.d.ts +155 -0
- package/drag-and-drop/droptarget.directive.d.ts +67 -0
- package/drag-and-drop/events/drag-target/drag-event.d.ts +23 -0
- package/drag-and-drop/events/drag-target/end-event.d.ts +23 -0
- package/drag-and-drop/events/drag-target/index.d.ts +9 -0
- package/drag-and-drop/events/drag-target/press-event.d.ts +22 -0
- package/drag-and-drop/events/drag-target/release-event.d.ts +22 -0
- package/drag-and-drop/events/drag-target/start-event.d.ts +23 -0
- package/drag-and-drop/events/drop-target/drop-event.d.ts +23 -0
- package/drag-and-drop/events/drop-target/enter-event.d.ts +23 -0
- package/drag-and-drop/events/drop-target/index.d.ts +8 -0
- package/drag-and-drop/events/drop-target/leave-event.d.ts +23 -0
- package/drag-and-drop/events/drop-target/over-event.d.ts +23 -0
- package/drag-and-drop/hint.component.d.ts +20 -0
- package/drag-and-drop/models/allowed-target.d.ts +16 -0
- package/drag-and-drop/models/autoscroll-options.d.ts +23 -0
- package/drag-and-drop/models/dragaxis.d.ts +8 -0
- package/drag-and-drop/models/index.d.ts +8 -0
- package/drag-and-drop/models/scroll-direction.d.ts +8 -0
- package/drag-and-drop/util.d.ts +29 -0
- package/drag-and-drop.module.d.ts +15 -0
- package/esm2015/drag-and-drop/drag-state.service.js +126 -0
- package/esm2015/drag-and-drop/draghandle.directive.js +27 -0
- package/esm2015/drag-and-drop/dragtarget.directive.js +389 -0
- package/esm2015/drag-and-drop/droptarget.directive.js +134 -0
- package/esm2015/drag-and-drop/events/drag-target/drag-event.js +17 -0
- package/esm2015/drag-and-drop/events/drag-target/end-event.js +17 -0
- package/esm2015/drag-and-drop/events/drag-target/index.js +9 -0
- package/esm2015/drag-and-drop/events/drag-target/press-event.js +15 -0
- package/esm2015/drag-and-drop/events/drag-target/release-event.js +15 -0
- package/esm2015/drag-and-drop/events/drag-target/start-event.js +17 -0
- package/esm2015/drag-and-drop/events/drop-target/drop-event.js +17 -0
- package/esm2015/drag-and-drop/events/drop-target/enter-event.js +17 -0
- package/esm2015/drag-and-drop/events/drop-target/index.js +8 -0
- package/esm2015/drag-and-drop/events/drop-target/leave-event.js +17 -0
- package/esm2015/drag-and-drop/events/drop-target/over-event.js +17 -0
- package/esm2015/drag-and-drop/hint.component.js +49 -0
- package/esm2015/drag-and-drop/models/allowed-target.js +5 -0
- package/esm2015/drag-and-drop/models/autoscroll-options.js +5 -0
- package/esm2015/drag-and-drop/models/dragaxis.js +5 -0
- package/esm2015/drag-and-drop/models/index.js +5 -0
- package/esm2015/drag-and-drop/models/scroll-direction.js +5 -0
- package/esm2015/drag-and-drop/util.js +30 -0
- package/esm2015/drag-and-drop.module.js +36 -0
- package/esm2015/kendo-angular-utils.js +8 -0
- package/esm2015/main.js +12 -0
- package/esm2015/package-metadata.js +15 -0
- package/esm2015/utils.module.js +49 -0
- package/fesm2015/kendo-angular-utils.js +925 -0
- package/kendo-angular-utils.d.ts +9 -0
- package/main.d.ts +13 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +81 -0
- package/schematics/collection.json +12 -0
- package/schematics/ngAdd/index.js +21 -0
- package/schematics/ngAdd/index.js.map +1 -0
- package/schematics/ngAdd/schema.json +28 -0
- package/utils.module.d.ts +42 -0
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
import { Directive, EventEmitter, Input, Output } from "@angular/core";
|
|
6
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
7
|
+
import { packageMetadata } from '../package-metadata';
|
|
8
|
+
import { DragEnterEvent, DragOverEvent, DragLeaveEvent, DropEvent } from './events/drop-target';
|
|
9
|
+
import { isPresent } from './util';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "./drag-state.service";
|
|
12
|
+
/**
|
|
13
|
+
* Represents the Kendo UI DropTarget directive for Angular.
|
|
14
|
+
*/
|
|
15
|
+
export class DropTargetDirective {
|
|
16
|
+
constructor(service, element, ngZone) {
|
|
17
|
+
this.service = service;
|
|
18
|
+
this.element = element;
|
|
19
|
+
this.ngZone = ngZone;
|
|
20
|
+
/**
|
|
21
|
+
* Fires when a DragTarget element enters the DropTarget.
|
|
22
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
23
|
+
*/
|
|
24
|
+
this.dragEnter = new EventEmitter();
|
|
25
|
+
/**
|
|
26
|
+
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
27
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
28
|
+
*/
|
|
29
|
+
this.dragOver = new EventEmitter();
|
|
30
|
+
/**
|
|
31
|
+
* Fires when a DragTarget element leaves the DropTarget.
|
|
32
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
33
|
+
*/
|
|
34
|
+
this.dragLeave = new EventEmitter();
|
|
35
|
+
/**
|
|
36
|
+
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
37
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
38
|
+
*/
|
|
39
|
+
this.drop = new EventEmitter();
|
|
40
|
+
validatePackage(packageMetadata);
|
|
41
|
+
}
|
|
42
|
+
ngOnInit() {
|
|
43
|
+
this.initializeDropTarget();
|
|
44
|
+
this.service.dropTargets.push(this.dropTarget);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
handleDragEnter(event) {
|
|
50
|
+
let allowed = true;
|
|
51
|
+
if (isPresent(this.allowedDragTargets)) {
|
|
52
|
+
switch (typeof this.allowedDragTargets) {
|
|
53
|
+
case 'function': {
|
|
54
|
+
allowed = this.allowedDragTargets(this.service.dragTargetDirective);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case 'string': {
|
|
58
|
+
allowed = this.service.dragTargetDirective.link === this.allowedDragTargets;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
default: {
|
|
62
|
+
allowed = this.allowedDragTargets.some(dt => dt === this.service.dragTargetDirective.link);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (allowed) {
|
|
67
|
+
this.service.dropTarget = this.dropTarget;
|
|
68
|
+
this.ngZone.run(() => {
|
|
69
|
+
const eventArgs = new DragEnterEvent({ event, element: this.element.nativeElement });
|
|
70
|
+
this.dragEnter.emit(eventArgs);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @hidden
|
|
76
|
+
*/
|
|
77
|
+
handleDragLeave(event) {
|
|
78
|
+
this.service.dropTarget = null;
|
|
79
|
+
this.ngZone.run(() => {
|
|
80
|
+
const eventArgs = new DragLeaveEvent({ event, element: this.element.nativeElement });
|
|
81
|
+
this.dragLeave.emit(eventArgs);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
handleDragOver(event) {
|
|
88
|
+
this.ngZone.run(() => {
|
|
89
|
+
const eventArgs = new DragOverEvent({ event, element: this.element.nativeElement });
|
|
90
|
+
this.dragOver.emit(eventArgs);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @hidden
|
|
95
|
+
*/
|
|
96
|
+
handleDrop(event) {
|
|
97
|
+
this.ngZone.run(() => {
|
|
98
|
+
const eventArgs = new DropEvent({ event, element: this.element.nativeElement });
|
|
99
|
+
this.drop.emit(eventArgs);
|
|
100
|
+
});
|
|
101
|
+
this.service.setScrollOffset({ x: 0, y: 0 });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @hidden
|
|
105
|
+
*/
|
|
106
|
+
initializeDropTarget() {
|
|
107
|
+
this.dropTarget = {
|
|
108
|
+
element: this.element.nativeElement,
|
|
109
|
+
onDragEnter: this.handleDragEnter.bind(this),
|
|
110
|
+
onDragLeave: this.handleDragLeave.bind(this),
|
|
111
|
+
onDragOver: this.handleDragOver.bind(this),
|
|
112
|
+
onDrop: this.handleDrop.bind(this)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropTargetDirective, deps: [{ token: i1.DragStateService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
117
|
+
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: { allowedDragTargets: "allowedDragTargets" }, outputs: { dragEnter: "dragEnter", dragOver: "dragOver", dragLeave: "dragLeave", drop: "drop" }, exportAs: ["kendoDropTarget"], ngImport: i0 });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
119
|
+
type: Directive,
|
|
120
|
+
args: [{
|
|
121
|
+
selector: '[kendoDropTarget]',
|
|
122
|
+
exportAs: 'kendoDropTarget'
|
|
123
|
+
}]
|
|
124
|
+
}], ctorParameters: function () { return [{ type: i1.DragStateService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { allowedDragTargets: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], dragEnter: [{
|
|
127
|
+
type: Output
|
|
128
|
+
}], dragOver: [{
|
|
129
|
+
type: Output
|
|
130
|
+
}], dragLeave: [{
|
|
131
|
+
type: Output
|
|
132
|
+
}], drop: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}] } });
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the drag event of the DragTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DragEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the dragEnd event of the DragTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DragEndEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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 { PressEvent } from './press-event';
|
|
6
|
+
export { DragStartEvent } from './start-event';
|
|
7
|
+
export { ReleaseEvent } from './release-event';
|
|
8
|
+
export { DragEndEvent } from './end-event';
|
|
9
|
+
export { DragEvent } from './drag-event';
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Arguments for the press event of the DragTarget.
|
|
7
|
+
*/
|
|
8
|
+
export class PressEvent {
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
constructor(args) {
|
|
13
|
+
Object.assign(this, args);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Arguments for the release event of the DragTarget.
|
|
7
|
+
*/
|
|
8
|
+
export class ReleaseEvent {
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
constructor(args) {
|
|
13
|
+
Object.assign(this, args);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the dragStart event of the DragTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DragStartEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the drop event of the DropTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DropEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the dragEnter event of the DropTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DragEnterEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
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 { DragEnterEvent } from './enter-event';
|
|
6
|
+
export { DragOverEvent } from './over-event';
|
|
7
|
+
export { DragLeaveEvent } from './leave-event';
|
|
8
|
+
export { DropEvent } from './drop-event';
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the dragLeave event of the DropTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DragLeaveEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the dragOver event of the DropTarget.
|
|
8
|
+
*/
|
|
9
|
+
export class DragOverEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
constructor(args) {
|
|
14
|
+
super();
|
|
15
|
+
Object.assign(this, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
import { Component, HostBinding, Input } from "@angular/core";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common";
|
|
8
|
+
const DEFAULT_ZINDEX = 10;
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export class HintComponent {
|
|
13
|
+
constructor(element) {
|
|
14
|
+
this.element = element;
|
|
15
|
+
this.hostClasses = true;
|
|
16
|
+
this.zIndex = DEFAULT_ZINDEX;
|
|
17
|
+
this.touchAction = 'none';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
HintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HintComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
HintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HintComponent, selector: "ng-component", inputs: { template: "template", directive: "directive" }, host: { properties: { "class.k-pos-absolute": "this.hostClasses", "class.k-cursor-grab": "this.hostClasses", "style.zIndex": "this.zIndex", "style.touch-action": "this.touchAction" } }, ngImport: i0, template: `
|
|
22
|
+
<ng-container *ngTemplateOutlet="template; context: { $implicit: directive }">
|
|
23
|
+
</ng-container>
|
|
24
|
+
`, isInline: true, directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HintComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{
|
|
28
|
+
template: `
|
|
29
|
+
<ng-container *ngTemplateOutlet="template; context: { $implicit: directive }">
|
|
30
|
+
</ng-container>
|
|
31
|
+
`
|
|
32
|
+
}]
|
|
33
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { template: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], directive: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], hostClasses: [{
|
|
38
|
+
type: HostBinding,
|
|
39
|
+
args: ['class.k-pos-absolute']
|
|
40
|
+
}, {
|
|
41
|
+
type: HostBinding,
|
|
42
|
+
args: ['class.k-cursor-grab']
|
|
43
|
+
}], zIndex: [{
|
|
44
|
+
type: HostBinding,
|
|
45
|
+
args: ['style.zIndex']
|
|
46
|
+
}], touchAction: [{
|
|
47
|
+
type: HostBinding,
|
|
48
|
+
args: ['style.touch-action']
|
|
49
|
+
}] } });
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export const dragTargetTransition = 'transform .3s ease-in-out';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export const getAction = (event, draggable) => {
|
|
13
|
+
return {
|
|
14
|
+
event: event,
|
|
15
|
+
payload: draggable
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export const setElementStyles = (renderer, elem, styles) => {
|
|
22
|
+
const props = Object.keys(styles);
|
|
23
|
+
props.forEach(p => {
|
|
24
|
+
renderer.setStyle(elem, p, styles[p]);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export const isPresent = (value) => value !== null && value !== undefined;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { NgModule } from '@angular/core';
|
|
7
|
+
import { DragTargetDirective } from './drag-and-drop/dragtarget.directive';
|
|
8
|
+
import { DragHandleDirective } from './drag-and-drop/draghandle.directive';
|
|
9
|
+
import { DropTargetDirective } from './drag-and-drop/droptarget.directive';
|
|
10
|
+
import { HintComponent } from './drag-and-drop/hint.component';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
const EXPORTS = [
|
|
13
|
+
DragTargetDirective,
|
|
14
|
+
DragHandleDirective,
|
|
15
|
+
DropTargetDirective,
|
|
16
|
+
HintComponent
|
|
17
|
+
];
|
|
18
|
+
export class DragAndDropModule {
|
|
19
|
+
}
|
|
20
|
+
DragAndDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragAndDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
21
|
+
DragAndDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragAndDropModule, declarations: [DragTargetDirective,
|
|
22
|
+
DragHandleDirective,
|
|
23
|
+
DropTargetDirective,
|
|
24
|
+
HintComponent], imports: [CommonModule], exports: [DragTargetDirective,
|
|
25
|
+
DragHandleDirective,
|
|
26
|
+
DropTargetDirective,
|
|
27
|
+
HintComponent] });
|
|
28
|
+
DragAndDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragAndDropModule, imports: [[CommonModule]] });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DragAndDropModule, decorators: [{
|
|
30
|
+
type: NgModule,
|
|
31
|
+
args: [{
|
|
32
|
+
declarations: [...EXPORTS],
|
|
33
|
+
exports: [...EXPORTS],
|
|
34
|
+
imports: [CommonModule]
|
|
35
|
+
}]
|
|
36
|
+
}] });
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Generated bundle index. Do not edit.
|
|
7
|
+
*/
|
|
8
|
+
export * from './main';
|
package/esm2015/main.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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 { UtilsModule } from './utils.module';
|
|
6
|
+
export { DragAndDropModule } from './drag-and-drop.module';
|
|
7
|
+
export { DragTargetDirective } from './drag-and-drop/dragtarget.directive';
|
|
8
|
+
export { DragHandleDirective } from './drag-and-drop/draghandle.directive';
|
|
9
|
+
export { DropTargetDirective } from './drag-and-drop/droptarget.directive';
|
|
10
|
+
export { HintComponent } from './drag-and-drop/hint.component';
|
|
11
|
+
export * from './drag-and-drop/events/drag-target';
|
|
12
|
+
export * from './drag-and-drop/events/drop-target';
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export const packageMetadata = {
|
|
9
|
+
name: '@progress/kendo-angular-utils',
|
|
10
|
+
productName: 'Kendo UI for Angular',
|
|
11
|
+
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
+
publishDate: 1658922268,
|
|
13
|
+
version: '',
|
|
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
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
import { NgModule } from '@angular/core';
|
|
6
|
+
import { DragAndDropModule } from './drag-and-drop.module';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
|
|
10
|
+
* definition for the Utils components.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* ```ts-no-run
|
|
15
|
+
* // Import the Utils module
|
|
16
|
+
* import { UtilsModule } from '@progress/kendo-angular-utils';
|
|
17
|
+
*
|
|
18
|
+
* // The browser platform with a compiler
|
|
19
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
20
|
+
*
|
|
21
|
+
* import { NgModule } from '@angular/core';
|
|
22
|
+
*
|
|
23
|
+
* // Import the app component
|
|
24
|
+
* import { AppComponent } from './app.component';
|
|
25
|
+
*
|
|
26
|
+
* // Define the app module
|
|
27
|
+
* _@NgModule({
|
|
28
|
+
* declarations: [AppComponent], // declare app component
|
|
29
|
+
* imports: [BrowserModule, UtilsModule], // import Utils module
|
|
30
|
+
* bootstrap: [AppComponent]
|
|
31
|
+
* })
|
|
32
|
+
* export class AppModule {}
|
|
33
|
+
*
|
|
34
|
+
* // Compile and launch the module
|
|
35
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
36
|
+
*
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export class UtilsModule {
|
|
40
|
+
}
|
|
41
|
+
UtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
42
|
+
UtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UtilsModule, exports: [DragAndDropModule] });
|
|
43
|
+
UtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UtilsModule, imports: [DragAndDropModule] });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UtilsModule, decorators: [{
|
|
45
|
+
type: NgModule,
|
|
46
|
+
args: [{
|
|
47
|
+
exports: [DragAndDropModule]
|
|
48
|
+
}]
|
|
49
|
+
}] });
|