@progress/kendo-angular-utils 12.0.0-develop.1 → 12.0.0-develop.10
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/drag-state.service.d.ts +4 -0
- package/drag-and-drop/draghandle.directive.d.ts +1 -0
- package/drag-and-drop/dragtarget-container.directive.d.ts +164 -0
- package/drag-and-drop/dragtarget.directive.d.ts +45 -42
- package/drag-and-drop/droptarget-container.directive.d.ts +89 -0
- package/drag-and-drop/droptarget.directive.d.ts +7 -18
- package/drag-and-drop/events/drag-target/drag-event.d.ts +23 -5
- package/drag-and-drop/events/drag-target/dragready-event.d.ts +30 -0
- package/drag-and-drop/events/drag-target/end-event.d.ts +22 -4
- package/drag-and-drop/events/drag-target/index.d.ts +2 -0
- package/drag-and-drop/events/drag-target/press-event.d.ts +23 -5
- package/drag-and-drop/events/drag-target/release-event.d.ts +40 -0
- package/drag-and-drop/events/drag-target/start-event.d.ts +22 -4
- package/drag-and-drop/events/drop-target-event.d.ts +48 -0
- package/drag-and-drop/events/index.d.ts +6 -0
- package/drag-and-drop/hint.component.d.ts +3 -4
- package/{esm2020/drag-and-drop/events/drop-target/drop-event.mjs → drag-and-drop/models/drag-mode.d.ts} +2 -9
- package/drag-and-drop/models/functions.d.ts +17 -0
- package/drag-and-drop/models/hint-settings.d.ts +22 -0
- package/drag-and-drop/models/index.d.ts +4 -2
- package/drag-and-drop/util.d.ts +22 -2
- package/drag-and-drop.module.d.ts +5 -3
- package/esm2020/drag-and-drop/drag-state.service.mjs +2 -0
- package/esm2020/drag-and-drop/draghandle.directive.mjs +1 -0
- package/esm2020/drag-and-drop/dragtarget-container.directive.mjs +621 -0
- package/esm2020/drag-and-drop/dragtarget.directive.mjs +260 -162
- package/esm2020/drag-and-drop/droptarget-container.directive.mjs +224 -0
- package/esm2020/drag-and-drop/droptarget.directive.mjs +25 -43
- package/esm2020/drag-and-drop/events/drag-target/drag-event.mjs +15 -1
- package/esm2020/drag-and-drop/events/{drop-target/enter-event.mjs → drag-target/dragready-event.mjs} +2 -2
- package/esm2020/drag-and-drop/events/drag-target/end-event.mjs +15 -1
- package/esm2020/drag-and-drop/events/drag-target/index.mjs +2 -0
- package/esm2020/drag-and-drop/events/drag-target/press-event.mjs +15 -1
- package/esm2020/drag-and-drop/events/{drop-target/leave-event.mjs → drag-target/release-event.mjs} +16 -2
- package/esm2020/drag-and-drop/events/drag-target/start-event.mjs +15 -1
- package/esm2020/drag-and-drop/events/drop-target-event.mjs +29 -0
- package/esm2020/drag-and-drop/events/index.mjs +6 -0
- package/esm2020/drag-and-drop/hint.component.mjs +9 -20
- package/esm2020/drag-and-drop/models/functions.mjs +5 -0
- package/esm2020/drag-and-drop/models/hint-settings.mjs +5 -0
- package/esm2020/drag-and-drop/util.mjs +73 -5
- package/esm2020/drag-and-drop.module.mjs +8 -0
- package/esm2020/index.mjs +4 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-utils.mjs +1346 -307
- package/fesm2020/progress-kendo-angular-utils.mjs +1349 -313
- package/index.d.ts +4 -2
- package/package.json +3 -3
- package/drag-and-drop/events/drop-target/drop-event.d.ts +0 -22
- package/drag-and-drop/events/drop-target/enter-event.d.ts +0 -22
- package/drag-and-drop/events/drop-target/index.d.ts +0 -8
- package/drag-and-drop/events/drop-target/leave-event.d.ts +0 -22
- package/drag-and-drop/events/drop-target/over-event.d.ts +0 -22
- package/drag-and-drop/models/allowed-target.d.ts +0 -16
- package/esm2020/drag-and-drop/events/drop-target/index.mjs +0 -8
- package/esm2020/drag-and-drop/events/drop-target/over-event.mjs +0 -15
- /package/drag-and-drop/models/{dragaxis.d.ts → drag-axis.d.ts} +0 -0
- /package/esm2020/drag-and-drop/models/{allowed-target.mjs → drag-axis.mjs} +0 -0
- /package/esm2020/drag-and-drop/models/{dragaxis.mjs → drag-mode.mjs} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the release event of the DragTarget and DragTargetContainer.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DragTargetReleaseEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The normalized drag event.
|
|
12
|
+
*/
|
|
13
|
+
dragEvent: NormalizedDragEvent;
|
|
14
|
+
/**
|
|
15
|
+
* The DOM element that is being dragged.
|
|
16
|
+
*/
|
|
17
|
+
dragTarget: HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
20
|
+
*/
|
|
21
|
+
dragTargetId?: any;
|
|
22
|
+
/**
|
|
23
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
24
|
+
*/
|
|
25
|
+
dragTargetIndex?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Left for backward compatibility for the DragTarget deprecated events.
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
get normalizedEvent(): NormalizedDragEvent;
|
|
31
|
+
/**
|
|
32
|
+
* Left for backward compatibility for the DragTarget deprecated events.
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
get hostElement(): HTMLElement;
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
constructor(args?: any);
|
|
40
|
+
}
|
|
@@ -5,17 +5,35 @@
|
|
|
5
5
|
import { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
6
|
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
7
|
/**
|
|
8
|
-
* Arguments for the dragStart event of the DragTarget.
|
|
8
|
+
* Arguments for the dragStart event of the DragTarget and DragTargetContainer.
|
|
9
9
|
*/
|
|
10
10
|
export declare class DragTargetDragStartEvent extends PreventableEvent {
|
|
11
11
|
/**
|
|
12
12
|
* The normalized drag event.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
dragEvent: NormalizedDragEvent;
|
|
15
15
|
/**
|
|
16
|
-
* The DOM element that
|
|
16
|
+
* The DOM element that is being dragged.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
dragTarget: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* The identifier passed to the `dragTargetId` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
21
|
+
*/
|
|
22
|
+
dragTargetId?: any;
|
|
23
|
+
/**
|
|
24
|
+
* The index of the current drag target in the collection of drag targets (applicable for the `DragTargetContainer` directive).
|
|
25
|
+
*/
|
|
26
|
+
dragTargetIndex?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Left for backward compatibility for the DragTarget deprecated events.
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
get normalizedEvent(): NormalizedDragEvent;
|
|
32
|
+
/**
|
|
33
|
+
* Left for backward compatibility for the DragTarget deprecated events.
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
get hostElement(): HTMLElement;
|
|
19
37
|
/**
|
|
20
38
|
* @hidden
|
|
21
39
|
*/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { NormalizedDragEvent } from "@progress/kendo-draggable-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the drag events of the DropTarget and DropTargetContainer directives.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DropTargetEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The current drag target element.
|
|
12
|
+
*/
|
|
13
|
+
dragTarget: HTMLElement;
|
|
14
|
+
/**
|
|
15
|
+
* The current drop target element.
|
|
16
|
+
*/
|
|
17
|
+
dropTarget: HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* The information related to the current drag event.
|
|
20
|
+
*/
|
|
21
|
+
dragEvent: NormalizedDragEvent;
|
|
22
|
+
/**
|
|
23
|
+
* The data passed to the `dragData` input property of the `DragTarget` or `DragTargetContainer` directive.
|
|
24
|
+
*/
|
|
25
|
+
dragData: any;
|
|
26
|
+
/**
|
|
27
|
+
* The index of the current drop target in the collection of drop targets (applicable for the `DropTargetContainer` directive).
|
|
28
|
+
*/
|
|
29
|
+
dropTargetIndex?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The hint of the DragTarget.
|
|
32
|
+
*/
|
|
33
|
+
hintElement?: HTMLElement;
|
|
34
|
+
/**
|
|
35
|
+
* Left for backward compatibility for the DropTarget deprecated events.
|
|
36
|
+
* @hidden
|
|
37
|
+
*/
|
|
38
|
+
get normalizedEvent(): NormalizedDragEvent;
|
|
39
|
+
/**
|
|
40
|
+
* Left for backward compatibility for the DropTarget deprecated events.
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
get hostElement(): HTMLElement;
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
constructor(args?: any);
|
|
48
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export { DropTargetEvent } from './drop-target-event';
|
|
6
|
+
export * from './drag-target';
|
|
@@ -11,10 +11,9 @@ export declare class HintComponent {
|
|
|
11
11
|
element: ElementRef;
|
|
12
12
|
template: TemplateRef<any>;
|
|
13
13
|
directive: any;
|
|
14
|
+
targetIndex: number;
|
|
15
|
+
contextData: any;
|
|
14
16
|
constructor(element: ElementRef);
|
|
15
|
-
hostClasses: boolean;
|
|
16
|
-
zIndex: number;
|
|
17
|
-
touchAction: string;
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<HintComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "kendo-draghint", never, { "template": "template"; "directive": "directive"; "targetIndex": "targetIndex"; "contextData": "contextData"; }, {}, never, never>;
|
|
20
19
|
}
|
|
@@ -3,13 +3,6 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Represents the available modes for the drag action.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
constructor(args) {
|
|
13
|
-
Object.assign(this, args);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
8
|
+
export declare type DragMode = 'auto' | 'manual';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* Represents the callback that is used by the `dragData` property of the [`DragTarget`]({% slug api_utils_dragtargetdirective %}) and [`DragTargetContainer`]({% slug api_utils_dragtargetcontainerdirective %}) directives.
|
|
7
|
+
*
|
|
8
|
+
* It returns the custom data that will be available in the events of the respective [`DropTarget`]({% slug api_utils_droptargetdirective %}) or [`DropTargetContainer`]({% slug api_utils_droptargetcontainerdirective %}) directives upon interaction.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare type DragTargetDataFn = (dragTarget: HTMLElement, dragTargetId?: any, dragTargetIndex?: number) => any;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the callback that is used by the `dragTargetId` property of the [`DragTargetContainer`]({% slug api_utils_dragtargetcontainerdirective %}) directive.
|
|
14
|
+
*
|
|
15
|
+
* It returns a custom identifier that will be available in the events of the respective directive upon its interaction with a valid DropTarget.
|
|
16
|
+
*/
|
|
17
|
+
export declare type DragTargetIdFn = (dragTarget: HTMLElement, dragTargetIndex?: number) => any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { TemplateRef, ViewContainerRef } from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Represents additional configuration options for the hint element of the DragTarget and DragTargetContainer directives.
|
|
8
|
+
*/
|
|
9
|
+
export interface HintSettings {
|
|
10
|
+
/**
|
|
11
|
+
* Renders the passed template as a hint of the current DragTarget.
|
|
12
|
+
*/
|
|
13
|
+
hintTemplate?: TemplateRef<any>;
|
|
14
|
+
/**
|
|
15
|
+
* The CSS classes that will be rendered on the hint host element when the default hint is utilized. Supports the type of values that are supported by [ngClass](link:site.data.urls.angular['ngclassapi']).
|
|
16
|
+
*/
|
|
17
|
+
hintClass?: any;
|
|
18
|
+
/**
|
|
19
|
+
* Controls the hint container. By default, the hint will be appended to the document body.
|
|
20
|
+
*/
|
|
21
|
+
appendTo?: ViewContainerRef;
|
|
22
|
+
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { AutoScrollOptions } from './autoscroll-options';
|
|
6
|
-
export {
|
|
7
|
-
export { AllowedTargetFn } from './allowed-target';
|
|
6
|
+
export { DragTargetDataFn } from './functions';
|
|
8
7
|
export { ScrollDirection } from './scroll-direction';
|
|
9
8
|
export { Coordinates } from './coordinates';
|
|
9
|
+
export { HintSettings } from './hint-settings';
|
|
10
|
+
export { DragAxis } from './drag-axis';
|
|
11
|
+
export { DragMode } from './drag-mode';
|
package/drag-and-drop/util.d.ts
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Renderer2 } from "@angular/core";
|
|
6
6
|
import { DragAndDropAction, DragTarget } from "@progress/kendo-draggable-common";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare const getAction: (event: PointerEvent | MouseEvent | TouchEvent | Event, draggable: DragTarget) => DragAndDropAction;
|
|
7
11
|
/**
|
|
8
12
|
* @hidden
|
|
9
13
|
*/
|
|
@@ -11,7 +15,15 @@ export declare const dragTargetTransition = "transform .3s ease-in-out";
|
|
|
11
15
|
/**
|
|
12
16
|
* @hidden
|
|
13
17
|
*/
|
|
14
|
-
export declare const
|
|
18
|
+
export declare const isPresent: (value: any) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
export declare function closestBySelector(element: any, selector: string): any;
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
export declare const intersect: (element: HTMLElement, candidates: HTMLElement[]) => HTMLElement | null;
|
|
15
27
|
/**
|
|
16
28
|
* @hidden
|
|
17
29
|
*/
|
|
@@ -19,4 +31,12 @@ export declare const setElementStyles: (renderer: Renderer2, elem: HTMLElement,
|
|
|
19
31
|
/**
|
|
20
32
|
* @hidden
|
|
21
33
|
*/
|
|
22
|
-
export declare const
|
|
34
|
+
export declare const allPointerDownEvents: string[];
|
|
35
|
+
/**
|
|
36
|
+
* @hidden
|
|
37
|
+
*/
|
|
38
|
+
export declare const allPointerMoveEvents: string[];
|
|
39
|
+
/**
|
|
40
|
+
* @hidden
|
|
41
|
+
*/
|
|
42
|
+
export declare const allPointerUpEvents: string[];
|
|
@@ -6,8 +6,10 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
import * as i1 from "./drag-and-drop/dragtarget.directive";
|
|
7
7
|
import * as i2 from "./drag-and-drop/draghandle.directive";
|
|
8
8
|
import * as i3 from "./drag-and-drop/droptarget.directive";
|
|
9
|
-
import * as i4 from "./drag-and-drop/
|
|
10
|
-
import * as i5 from "
|
|
9
|
+
import * as i4 from "./drag-and-drop/dragtarget-container.directive";
|
|
10
|
+
import * as i5 from "./drag-and-drop/droptarget-container.directive";
|
|
11
|
+
import * as i6 from "./drag-and-drop/hint.component";
|
|
12
|
+
import * as i7 from "@angular/common";
|
|
11
13
|
/**
|
|
12
14
|
* Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
|
|
13
15
|
* definition for the Drag and Drop directives.
|
|
@@ -41,6 +43,6 @@ import * as i5 from "@angular/common";
|
|
|
41
43
|
*/
|
|
42
44
|
export declare class DragAndDropModule {
|
|
43
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropModule, never>;
|
|
44
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DragAndDropModule, [typeof i1.DragTargetDirective, typeof i2.DragHandleDirective, typeof i3.DropTargetDirective, typeof i4.HintComponent], [typeof
|
|
46
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DragAndDropModule, [typeof i1.DragTargetDirective, typeof i2.DragHandleDirective, typeof i3.DropTargetDirective, typeof i4.DragTargetContainerDirective, typeof i5.DropTargetContainerDirective, typeof i6.HintComponent], [typeof i7.CommonModule], [typeof i1.DragTargetDirective, typeof i2.DragHandleDirective, typeof i3.DropTargetDirective, typeof i4.DragTargetContainerDirective, typeof i5.DropTargetContainerDirective, typeof i6.HintComponent]>;
|
|
45
47
|
static ɵinj: i0.ɵɵInjectorDeclaration<DragAndDropModule>;
|
|
46
48
|
}
|
|
@@ -27,6 +27,8 @@ export class DragStateService {
|
|
|
27
27
|
this.offset = { x: 0, y: 0 };
|
|
28
28
|
this.pageOffset = { x: 0, y: 0 };
|
|
29
29
|
this.velocity = { x: 0, y: 0 };
|
|
30
|
+
this.dragIndex = null;
|
|
31
|
+
this.dropIndex = null;
|
|
30
32
|
this.callbacks = {};
|
|
31
33
|
this.scrollInterval = null;
|
|
32
34
|
this.setCallbacks();
|
|
@@ -6,6 +6,7 @@ import { Directive, ElementRef, HostBinding } from "@angular/core";
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Represents the Kendo UI DragHandle directive for Angular.
|
|
9
|
+
* It is used to specify a concrete element within a drag target as a handle for dragging, instead the drag target itself.
|
|
9
10
|
*/
|
|
10
11
|
export class DragHandleDirective {
|
|
11
12
|
constructor(element) {
|