@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
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<a href="https://www.telerik.com/kendo-angular-ui/" target="_blank">
|
|
2
|
+
<img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg">
|
|
3
|
+
</a>
|
|
4
|
+
|
|
5
|
+
## Native UI and Data Visualization Components for Angular
|
|
6
|
+
|
|
7
|
+
Kendo UI for Angular is a commercial UI library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
|
|
8
|
+
|
|
9
|
+
> **Important**
|
|
10
|
+
> * This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)—a commercial UI library.
|
|
11
|
+
> * You will need to install a license key when adding the package to your project. For more information, please refer to the [My License page](https://www.telerik.com/kendo-angular-ui/my-license/).
|
|
12
|
+
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui/) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui). Doing so indicates that you [Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui).
|
|
13
|
+
> * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI dev team!
|
|
14
|
+
|
|
15
|
+
## Resources
|
|
16
|
+
|
|
17
|
+
* [Get Started with Kendo UI for Angular (requires trial registration)](https://www.telerik.com/kendo-angular-ui/getting-started)
|
|
18
|
+
* [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
|
|
19
|
+
* [Blogs](http://www.telerik.com/blogs/kendo-ui)
|
|
20
|
+
* [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
|
|
21
|
+
|
|
22
|
+
## Questions and Feedback
|
|
23
|
+
|
|
24
|
+
* [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
|
|
25
|
+
* [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
|
|
26
|
+
* [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
|
|
27
|
+
* [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
|
|
28
|
+
|
|
29
|
+
*Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
|
|
30
|
+
|
|
31
|
+
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
|
|
@@ -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
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@progress/kendo-licensing"),require("@progress/kendo-draggable-common"),require("@progress/kendo-angular-common")):"function"==typeof define&&define.amd?define("KendoAngularUtils",["exports","@angular/core","@angular/common","@progress/kendo-licensing","@progress/kendo-draggable-common","@progress/kendo-angular-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoAngularUtils={},t.ng.core,t.ng.common,t.KendoLicensing,t.KendoDraggableCommon,t.KendoAngularCommon)}(this,function(t,s,e,a,r,n){"use strict";function i(n){if(n&&n.__esModule)return n;var r=Object.create(null);return n&&Object.keys(n).forEach(function(t){var e;"default"!==t&&(e=Object.getOwnPropertyDescriptor(n,t),Object.defineProperty(r,t,e.get?e:{enumerable:!0,get:function(){return n[t]}}))}),r.default=n,Object.freeze(r)}var o=i(s),l=i(e),c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function p(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;var d,u={name:"@progress/kendo-angular-utils",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1658922268,version:"",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"},m=function(t){this.element=t,this.hostClass=!0},f=(m.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:m,deps:[{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Directive}),m.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:m,selector:"[kendoDragHandle]",host:{properties:{"class.k-cursor-pointer":"this.hostClass"}},exportAs:["kendoDragHandle"],ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:m,decorators:[{type:s.Directive,args:[{selector:"[kendoDragHandle]",exportAs:"kendoDragHandle"}]}],ctorParameters:function(){return[{type:o.ElementRef}]},propDecorators:{hostClass:[{type:s.HostBinding,args:["class.k-cursor-pointer"]}]}}),function(t){Object.assign(this,t)}),v=(h(y,d=n.PreventableEvent),y);function y(t){var e=d.call(this)||this;return Object.assign(e,t),e}var D,b=function(t){Object.assign(this,t)},E=(h(O,D=n.PreventableEvent),O);function O(t){var e=D.call(this)||this;return Object.assign(e,t),e}h(I,T=n.PreventableEvent);var T,S=I;function I(t){var e=T.call(this)||this;return Object.assign(e,t),e}function P(t,e){return{event:t,payload:e}}function R(e,n,r){Object.keys(r).forEach(function(t){e.setStyle(n,t,r[t])})}function C(t){return null!=t}var k=function(t){this.element=t,this.hostClasses=!0,this.zIndex=10,this.touchAction="none"},w=(k.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,deps:[{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),k.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:k,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:o,template:'\n <ng-container *ngTemplateOutlet="template; context: { $implicit: directive }">\n </ng-container>\n ',isInline:!0,directives:[{type:l.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,decorators:[{type:s.Component,args:[{template:'\n <ng-container *ngTemplateOutlet="template; context: { $implicit: directive }">\n </ng-container>\n '}]}],ctorParameters:function(){return[{type:o.ElementRef}]},propDecorators:{template:[{type:s.Input}],directive:[{type:s.Input}],hostClasses:[{type:s.HostBinding,args:["class.k-pos-absolute"]},{type:s.HostBinding,args:["class.k-cursor-grab"]}],zIndex:[{type:s.HostBinding,args:["style.zIndex"]}],touchAction:[{type:s.HostBinding,args:["style.touch-action"]}]}}),x.prototype.handleDragAndDrop=function(t){this.updateState(),r.dispatchDragAndDrop(this.state,t,this.callbacks)},x.prototype.setPressed=function(t){this.pressed=t},x.prototype.setScrolling=function(t){var e,n=this;(this.isScrolling=t)?(e=r.getScrollableParent(document.elementFromPoint(this.clientOffset.x,this.clientOffset.y)),window.clearInterval(this.scrollInterval),this.scrollInterval=window.setInterval(function(){r.autoScroll(e,{x:n.velocity.x,y:n.velocity.y})},50)):this.scrollInterval&&(window.clearInterval(this.scrollInterval),this.scrollInterval=null)},x.prototype.setVelocity=function(t){this.velocity=t},x.prototype.setOffset=function(t){this.offset=t},x.prototype.setClientOffset=function(t){this.clientOffset=t},x.prototype.setPageOffset=function(t){this.pageOffset=t},x.prototype.setInitialClientOffset=function(t){this.initialClientOffset=t},x.prototype.setScrollOffset=function(t){this.scrollOffset=t},x.prototype.setInitialScrollOffset=function(t){this.initialScrollOffset=t},x.prototype.updateState=function(){this.state={drag:this.dragTarget,drop:this.dropTarget,drags:this.dragTargets,drops:this.dropTargets,pressed:this.pressed,ignoreMouse:this.ignoreMouse,autoScroll:this.autoScroll,isScrolling:this.isScrolling,scrollableParent:this.scrollableParent,autoScrollDirection:this.autoScrollDirection,initialClientOffset:this.initialClientOffset,clientOffset:this.clientOffset,initialScrollOffset:this.initialScrollOffset,scrollOffset:this.scrollOffset,offset:this.offset,pageOffset:this.pageOffset,velocity:this.velocity}},x.prototype.setCallbacks=function(){this.callbacks={onVelocityChange:this.setVelocity.bind(this),onOffsetChange:this.setOffset.bind(this),onClientOffsetChange:this.setClientOffset.bind(this),onPageOffsetChange:this.setPageOffset.bind(this),onInitialClientOffsetChange:this.setInitialClientOffset.bind(this),onScrollOffsetChange:this.setScrollOffset.bind(this),onInitialScrollOffsetChange:this.setInitialScrollOffset.bind(this),onIsPressedChange:this.setPressed.bind(this),onIsScrollingChange:this.setScrolling.bind(this)}},x.prototype.ngOnDestroy=function(){this.scrollInterval&&(window.clearInterval(this.scrollInterval),this.scrollInterval=null)},x);function x(){this.dragTarget=null,this.dropTarget=null,this.dragTargets=[],this.dropTargets=[],this.pressed=!1,this.ignoreMouse=!1,this.autoScroll=!0,this.isScrolling=!1,this.scrollableParent=null,this.autoScrollDirection={horizontal:!0,vertical:!0},this.initialClientOffset={x:0,y:0},this.clientOffset={x:0,y:0},this.initialScrollOffset={x:0,y:0},this.scrollOffset={x:0,y:0},this.offset={x:0,y:0},this.pageOffset={x:0,y:0},this.velocity={x:0,y:0},this.callbacks={},this.scrollInterval=null,this.setCallbacks()}w.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,deps:[],target:o.ɵɵFactoryTarget.Injectable}),w.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,providedIn:"root"}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,decorators:[{type:s.Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[]}});Object.defineProperty(A.prototype,"nativeElement",{get:function(){return this.element.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hintElem",{get:function(){return this.hint.instance.element.nativeElement},enumerable:!1,configurable:!0}),A.prototype.onPointerDown=function(t){var e=this;this.dragHandles.length&&!this.isDragHandle(t.target)||(t.preventDefault(),t=P(t,this.dragTarget),this.service.handleDragAndDrop(t),this.service.autoScroll="object"==typeof this.autoScroll?!1!==this.autoScroll.enabled:this.autoScroll,this.service.scrollableParent=this.getAutoScrollContainer(),this.service.autoScrollDirection="object"==typeof this.autoScroll?this.autoScroll.direction:{horizontal:!0,vertical:!0},this.ngZone.runOutsideAngular(function(){e.attachDomHandlers()}))},A.prototype.onPointerMove=function(t){t.preventDefault();t=P(t,this.dragTarget);this.service.handleDragAndDrop(t)},A.prototype.onPointerUp=function(t){var e=this,t=(t.preventDefault(),P(t,this.dragTarget));this.service.handleDragAndDrop(t),this.ngZone.runOutsideAngular(function(){e.attachDomHandlers()})},A.prototype.ngOnInit=function(){this.initializeDraggable()},A.prototype.ngAfterContentInit=function(){var t=this;(C(this.element)||C(this.dragTarget))&&this.ngZone.runOutsideAngular(function(){t.attachDomHandlers(),t.dragHandles.length||t.renderer.addClass(t.nativeElement,"k-cursor-pointer")}),this.service.dragTargets.push(this.dragTarget)},A.prototype.ngOnDestroy=function(){this.domSubscriptions.forEach(function(t){return t()})},A.prototype.handlePress=function(e){var n=this;0<this.dragDelay?this.dragTimeout=setTimeout(function(){n.pressed=!0},this.dragDelay):this.pressed=!0,this.ngZone.run(function(){var t=new f({event:e,element:n.nativeElement});n.press.emit(t)})},A.prototype.handleDragStart=function(e){var n=this;this.pressed?(C(this.hintTemplate)&&(this.createHint(),C(this.hint)&&this.renderer.setStyle(this.nativeElement,"opacity","0.7")),this.dragStarted=0===this.threshold,this.service.dragTarget=this.dragTarget,(this.service.dragTargetDirective=this).initialPosition={x:e.clientX,y:e.clientY},this.ngZone.run(function(){var t=new v({event:e,element:n.nativeElement});n.dragStart.emit(t)})):this.dragTimeout&&(clearTimeout(this.dragTimeout),this.dragTimeout=null)},A.prototype.handleDrag=function(e){var t,n,r,i=this;this.pressed&&(t=this.hint?this.hintElem:this.nativeElement,n={x:0,y:0},n="horizontal"===this.restrictByAxis?{x:e.clientX-this.initialPosition.x+e.scrollX,y:0}:"vertical"===this.restrictByAxis?{x:0,y:e.clientY-this.initialPosition.y+e.scrollY}:{x:e.clientX-this.initialPosition.x+e.scrollX,y:e.clientY-this.initialPosition.y+e.scrollY},r=Math.abs(n.x)<this.threshold&&Math.abs(n.y)<this.threshold,!this.dragStarted&&r||(r="translate("+n.x+"px, "+n.y+"px)",R(this.renderer,t,{transform:r,transition:"none"}),!this.dragStarted&&0<this.threshold&&(this.dragStarted=!0),this.ngZone.run(function(){var t=new S({event:e,element:i.nativeElement});i.drag.emit(t)})))},A.prototype.handleRelease=function(e){var n=this;this.dragTimeout&&(clearTimeout(this.dragTimeout),this.dragTimeout=null,this.pressed=!1),this.service.dragTarget=null,this.service.dragTargetDirective=null,this.ngZone.run(function(){var t=new b({event:e,element:n.nativeElement});n.release.emit(t)})},A.prototype.handleDragEnd=function(e){var t,n=this;this.dragStarted&&(this.dragStarted=!1,t=this.hint?this.hintElem:this.nativeElement,C(this.hint)&&(this.renderer.removeStyle(this.nativeElement,"opacity"),this.destroyHint()),this.renderer.removeStyle(t,"transform"),R(this.renderer,t,{transition:"transform .3s ease-in-out"}),this.ngZone.run(function(){var t=new E({event:e,element:n.nativeElement});n.dragEnd.emit(t)}))},A.prototype.initializeDraggable=function(){this.dragTarget={element:this.nativeElement,hint:null,onPress:this.handlePress.bind(this),onRelease:this.handleRelease.bind(this),onDragStart:this.handleDragStart.bind(this),onDrag:this.handleDrag.bind(this),onDragEnd:this.handleDragEnd.bind(this)}},A.prototype.attachDomHandlers=function(){var t;0<this.domSubscriptions.length&&this.domSubscriptions.forEach(function(t){return t()}),n.isDocumentAvailable()&&C(this.element)&&(this.service.pressed?(this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),t=r.getScrollableParent(this.nativeElement),this.domSubscriptions=[this.renderer.listen(document,"pointermove",this.onPointerMove),this.renderer.listen(document,"mousemove",this.onPointerMove),this.renderer.listen(document,"touchmove",this.onPointerMove),this.renderer.listen(document,"pointerup",this.onPointerUp),this.renderer.listen(document,"pointercancel",this.onPointerUp),this.renderer.listen(document,"mouseup",this.onPointerUp),this.renderer.listen(document,"contextmenu",this.onPointerUp),this.renderer.listen(document,"touchend",this.onPointerUp),this.renderer.listen(document,"touchcancel",this.onPointerUp)],t&&(t===document.getElementsByTagName("html")[0]&&(t=document),this.domSubscriptions.push(this.renderer.listen(t,"scroll",this.onPointerMove)))):(this.onPointerDown=this.onPointerDown.bind(this),t=this.nativeElement,this.domSubscriptions=[this.renderer.listen(t,"pointerdown",this.onPointerDown),this.renderer.listen(t,"mousedown",this.onPointerDown),this.renderer.listen(t,"touchstart",this.onPointerDown)]))},A.prototype.isDragHandle=function(e){return this.dragHandles.toArray().some(function(t){return n.contains(t.element.nativeElement,e,!0)})},A.prototype.getAutoScrollContainer=function(){return"object"==typeof this.autoScroll&&this.autoScroll.boundaryElementRef&&this.autoScroll.boundaryElementRef.nativeElement?this.autoScroll.boundaryElementRef.nativeElement:null},A.prototype.createHint=function(){var t=this.resolver.resolveComponentFactory(k);this.hint=this.viewContainer.createComponent(t),this.hint.instance.template=this.hintTemplate,(this.hint.instance.directive=this).hint.changeDetectorRef.detectChanges(),this.dragTarget.hint=this.hint.instance.element.nativeElement},A.prototype.destroyHint=function(){this.hint.destroy(),this.hint.changeDetectorRef.detectChanges(),this.hint=null,this.dragTarget.hint=null};l=A;function A(t,e,n,r,i,o){this.element=t,this.renderer=e,this.ngZone=n,this.service=r,this.viewContainer=i,this.resolver=o,this.threshold=0,this.autoScroll=!0,this.dragDelay=0,this.press=new s.EventEmitter,this.dragStart=new s.EventEmitter,this.drag=new s.EventEmitter,this.release=new s.EventEmitter,this.dragEnd=new s.EventEmitter,this.touchAction="none",this.dragTarget=null,this.domSubscriptions=[],this.hint=null,this.initialPosition={x:0,y:0},this.dragStarted=!1,this.pressed=!1,this.dragTimeout=null,a.validatePackage(u)}l.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:l,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:o.NgZone},{token:w},{token:o.ViewContainerRef},{token:o.ComponentFactoryResolver}],target:o.ɵɵFactoryTarget.Directive}),l.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:l,selector:"[kendoDragTarget]",inputs:{hintTemplate:"hintTemplate",threshold:"threshold",autoScroll:"autoScroll",link:"link",dragDelay:"dragDelay",restrictByAxis:"restrictByAxis"},outputs:{press:"press",dragStart:"dragStart",drag:"drag",release:"release",dragEnd:"dragEnd"},host:{properties:{"style.touch-action":"this.touchAction"}},queries:[{propertyName:"dragHandles",predicate:m}],exportAs:["kendoDragTarget"],ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:l,decorators:[{type:s.Directive,args:[{selector:"[kendoDragTarget]",exportAs:"kendoDragTarget"}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:o.NgZone},{type:w},{type:o.ViewContainerRef},{type:o.ComponentFactoryResolver}]},propDecorators:{hintTemplate:[{type:s.Input}],threshold:[{type:s.Input}],autoScroll:[{type:s.Input}],link:[{type:s.Input}],dragDelay:[{type:s.Input}],restrictByAxis:[{type:s.Input}],press:[{type:s.Output}],dragStart:[{type:s.Output}],drag:[{type:s.Output}],release:[{type:s.Output}],dragEnd:[{type:s.Output}],touchAction:[{type:s.HostBinding,args:["style.touch-action"]}],dragHandles:[{type:s.ContentChildren,args:[m]}]}});h(N,F=n.PreventableEvent);var F,Z=N;function N(t){var e=F.call(this)||this;return Object.assign(e,t),e}h(z,U=n.PreventableEvent);var U,_=z;function z(t){var e=U.call(this)||this;return Object.assign(e,t),e}h(K,B=n.PreventableEvent);var B,L=K;function K(t){var e=B.call(this)||this;return Object.assign(e,t),e}h(Y,q=n.PreventableEvent);var q,X=Y;function Y(t){var e=q.call(this)||this;return Object.assign(e,t),e}M.prototype.ngOnInit=function(){this.initializeDropTarget(),this.service.dropTargets.push(this.dropTarget)},M.prototype.handleDragEnter=function(e){var n=this,t=!0;if(C(this.allowedDragTargets))switch(typeof this.allowedDragTargets){case"function":t=this.allowedDragTargets(this.service.dragTargetDirective);break;case"string":t=this.service.dragTargetDirective.link===this.allowedDragTargets;break;default:t=this.allowedDragTargets.some(function(t){return t===n.service.dragTargetDirective.link})}t&&(this.service.dropTarget=this.dropTarget,this.ngZone.run(function(){var t=new Z({event:e,element:n.element.nativeElement});n.dragEnter.emit(t)}))},M.prototype.handleDragLeave=function(e){var n=this;this.service.dropTarget=null,this.ngZone.run(function(){var t=new L({event:e,element:n.element.nativeElement});n.dragLeave.emit(t)})},M.prototype.handleDragOver=function(e){var n=this;this.ngZone.run(function(){var t=new _({event:e,element:n.element.nativeElement});n.dragOver.emit(t)})},M.prototype.handleDrop=function(e){var n=this;this.ngZone.run(function(){var t=new X({event:e,element:n.element.nativeElement});n.drop.emit(t)}),this.service.setScrollOffset({x:0,y:0})},M.prototype.initializeDropTarget=function(){this.dropTarget={element:this.element.nativeElement,onDragEnter:this.handleDragEnter.bind(this),onDragLeave:this.handleDragLeave.bind(this),onDragOver:this.handleDragOver.bind(this),onDrop:this.handleDrop.bind(this)}};var j=M;function M(t,e,n){this.service=t,this.element=e,this.ngZone=n,this.dragEnter=new s.EventEmitter,this.dragOver=new s.EventEmitter,this.dragLeave=new s.EventEmitter,this.drop=new s.EventEmitter,a.validatePackage(u)}j.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:j,deps:[{token:w},{token:o.ElementRef},{token:o.NgZone}],target:o.ɵɵFactoryTarget.Directive}),j.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:j,selector:"[kendoDropTarget]",inputs:{allowedDragTargets:"allowedDragTargets"},outputs:{dragEnter:"dragEnter",dragOver:"dragOver",dragLeave:"dragLeave",drop:"drop"},exportAs:["kendoDropTarget"],ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:j,decorators:[{type:s.Directive,args:[{selector:"[kendoDropTarget]",exportAs:"kendoDropTarget"}]}],ctorParameters:function(){return[{type:w},{type:o.ElementRef},{type:o.NgZone}]},propDecorators:{allowedDragTargets:[{type:s.Input}],dragEnter:[{type:s.Output}],dragOver:[{type:s.Output}],dragLeave:[{type:s.Output}],drop:[{type:s.Output}]}});var V=[l,m,j,k],H=function(){},V=(H.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:H,deps:[],target:o.ɵɵFactoryTarget.NgModule}),H.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:H,declarations:[l,m,j,k],imports:[e.CommonModule],exports:[l,m,j,k]}),H.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:H,imports:[[e.CommonModule]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:H,decorators:[{type:s.NgModule,args:[{declarations:p([],g(V)),exports:p([],g(V)),imports:[e.CommonModule]}]}]}),function(){});V.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:V,deps:[],target:o.ɵɵFactoryTarget.NgModule}),V.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:V,exports:[H]}),V.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:V,imports:[H]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:V,decorators:[{type:s.NgModule,args:[{exports:[H]}]}]}),t.DragAndDropModule=H,t.DragEndEvent=E,t.DragEnterEvent=Z,t.DragEvent=S,t.DragHandleDirective=m,t.DragLeaveEvent=L,t.DragOverEvent=_,t.DragStartEvent=v,t.DragTargetDirective=l,t.DropEvent=X,t.DropTargetDirective=j,t.HintComponent=k,t.PressEvent=f,t.ReleaseEvent=b,t.UtilsModule=V,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { OnDestroy } from '@angular/core';
|
|
6
|
+
import { DragTarget, DropTarget, DragAndDropState, DragAndDropAction } from '@progress/kendo-draggable-common';
|
|
7
|
+
import { DragTargetDirective } from './dragtarget.directive';
|
|
8
|
+
import { Coordinates } from './util';
|
|
9
|
+
import { ScrollDirection } from './models';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export declare class DragStateService implements OnDestroy {
|
|
15
|
+
constructor();
|
|
16
|
+
dragTarget: DragTarget | null;
|
|
17
|
+
dropTarget: DropTarget | null;
|
|
18
|
+
dragTargets: DragTarget[];
|
|
19
|
+
dropTargets: DropTarget[];
|
|
20
|
+
pressed: boolean;
|
|
21
|
+
ignoreMouse: boolean;
|
|
22
|
+
autoScroll: boolean;
|
|
23
|
+
isScrolling: boolean;
|
|
24
|
+
scrollableParent: HTMLElement | null;
|
|
25
|
+
autoScrollDirection: ScrollDirection;
|
|
26
|
+
initialClientOffset: Coordinates;
|
|
27
|
+
clientOffset: Coordinates;
|
|
28
|
+
initialScrollOffset: Coordinates;
|
|
29
|
+
scrollOffset: Coordinates;
|
|
30
|
+
offset: Coordinates;
|
|
31
|
+
pageOffset: Coordinates;
|
|
32
|
+
velocity: Coordinates;
|
|
33
|
+
dragTargetDirective: DragTargetDirective;
|
|
34
|
+
state: DragAndDropState;
|
|
35
|
+
private callbacks;
|
|
36
|
+
private scrollInterval;
|
|
37
|
+
handleDragAndDrop(action: DragAndDropAction): void;
|
|
38
|
+
setPressed(pressed: boolean): void;
|
|
39
|
+
setScrolling(isScrolling: boolean): void;
|
|
40
|
+
setVelocity(velocity: Coordinates): void;
|
|
41
|
+
setOffset(offset: Coordinates): void;
|
|
42
|
+
setClientOffset(clientOffset: Coordinates): void;
|
|
43
|
+
setPageOffset(pageOffset: Coordinates): void;
|
|
44
|
+
setInitialClientOffset(initialClientOffset: Coordinates): void;
|
|
45
|
+
setScrollOffset(scrollOffset: Coordinates): void;
|
|
46
|
+
setInitialScrollOffset(initialScrollOffset: Coordinates): void;
|
|
47
|
+
private updateState;
|
|
48
|
+
private setCallbacks;
|
|
49
|
+
ngOnDestroy(): void;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragStateService, never>;
|
|
51
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DragStateService>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { ElementRef } from "@angular/core";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Represents the Kendo UI DragHandle directive for Angular.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragHandleDirective {
|
|
11
|
+
element: ElementRef;
|
|
12
|
+
constructor(element: ElementRef);
|
|
13
|
+
hostClass: boolean;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragHandleDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragHandleDirective, "[kendoDragHandle]", ["kendoDragHandle"], {}, {}, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
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 { EventEmitter, AfterContentInit, ElementRef, Renderer2, NgZone, OnInit, OnDestroy, QueryList, TemplateRef, ViewContainerRef, ComponentFactoryResolver } from "@angular/core";
|
|
6
|
+
import { DragHandleDirective } from "./draghandle.directive";
|
|
7
|
+
import { DragStartEvent, DragEndEvent, PressEvent, ReleaseEvent, DragEvent } from "./events/drag-target";
|
|
8
|
+
import { DragStateService } from "./drag-state.service";
|
|
9
|
+
import { AutoScrollOptions, DragAxis } from './models';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* Represents the Kendo UI DragTarget directive for Angular.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DragTargetDirective implements OnInit, AfterContentInit, OnDestroy {
|
|
15
|
+
private element;
|
|
16
|
+
private renderer;
|
|
17
|
+
private ngZone;
|
|
18
|
+
private service;
|
|
19
|
+
private viewContainer;
|
|
20
|
+
private resolver;
|
|
21
|
+
/**
|
|
22
|
+
* Renders the passed template as a hint of the DragTarget ([see example]({% slug drag_hint %})).
|
|
23
|
+
*/
|
|
24
|
+
hintTemplate: TemplateRef<any>;
|
|
25
|
+
/**
|
|
26
|
+
* The number of pixels the pointer moves in any direction before the dragging starts ([see example]({% slug minimum_distance %})).
|
|
27
|
+
*
|
|
28
|
+
* @default 0
|
|
29
|
+
*/
|
|
30
|
+
threshold: number;
|
|
31
|
+
/**
|
|
32
|
+
* Defines the automatic container scrolling behavior when close to the edge ([see example]({% slug auto_scroll %})).
|
|
33
|
+
*
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
autoScroll: boolean | AutoScrollOptions;
|
|
37
|
+
/**
|
|
38
|
+
* The identifier that associates the drag target with a specific drop target.
|
|
39
|
+
*/
|
|
40
|
+
link: string;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the delay in milliseconds after which the drag will begin ([see example]({% slug drag_delay %})).
|
|
43
|
+
*
|
|
44
|
+
* @default 0
|
|
45
|
+
*/
|
|
46
|
+
dragDelay: number;
|
|
47
|
+
/**
|
|
48
|
+
* Restricts the element to be dragged horizontally or vertically only ([see example]({% slug axis_lock %})).
|
|
49
|
+
*/
|
|
50
|
+
restrictByAxis: DragAxis;
|
|
51
|
+
/**
|
|
52
|
+
* Fires when the user presses the DragTarget element.
|
|
53
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
54
|
+
*/
|
|
55
|
+
press: EventEmitter<PressEvent>;
|
|
56
|
+
/**
|
|
57
|
+
* Fires when the dragging of the DragTarget element begins.
|
|
58
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
59
|
+
*/
|
|
60
|
+
dragStart: EventEmitter<DragStartEvent>;
|
|
61
|
+
/**
|
|
62
|
+
* Fires while the user drags the DragTarget element.
|
|
63
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
64
|
+
*/
|
|
65
|
+
drag: EventEmitter<DragEvent>;
|
|
66
|
+
/**
|
|
67
|
+
* Fires when the user releases the DragTarget element.
|
|
68
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
69
|
+
*/
|
|
70
|
+
release: EventEmitter<ReleaseEvent>;
|
|
71
|
+
/**
|
|
72
|
+
* Fires when the dragging of the DragTarget element ends.
|
|
73
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
74
|
+
*/
|
|
75
|
+
dragEnd: EventEmitter<DragEndEvent>;
|
|
76
|
+
touchAction: string;
|
|
77
|
+
private dragTarget;
|
|
78
|
+
private domSubscriptions;
|
|
79
|
+
private hint;
|
|
80
|
+
private initialPosition;
|
|
81
|
+
private dragStarted;
|
|
82
|
+
private pressed;
|
|
83
|
+
private dragTimeout;
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
private get nativeElement();
|
|
88
|
+
/**
|
|
89
|
+
* @hidden
|
|
90
|
+
*/
|
|
91
|
+
private get hintElem();
|
|
92
|
+
/**
|
|
93
|
+
* @hidden
|
|
94
|
+
*/
|
|
95
|
+
private onPointerDown;
|
|
96
|
+
/**
|
|
97
|
+
* @hidden
|
|
98
|
+
*/
|
|
99
|
+
private onPointerMove;
|
|
100
|
+
/**
|
|
101
|
+
* @hidden
|
|
102
|
+
*/
|
|
103
|
+
private onPointerUp;
|
|
104
|
+
dragHandles: QueryList<DragHandleDirective>;
|
|
105
|
+
constructor(element: ElementRef, renderer: Renderer2, ngZone: NgZone, service: DragStateService, viewContainer: ViewContainerRef, resolver: ComponentFactoryResolver);
|
|
106
|
+
ngOnInit(): void;
|
|
107
|
+
ngAfterContentInit(): void;
|
|
108
|
+
ngOnDestroy(): void;
|
|
109
|
+
/**
|
|
110
|
+
* @hidden
|
|
111
|
+
*/
|
|
112
|
+
private handlePress;
|
|
113
|
+
/**
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
116
|
+
private handleDragStart;
|
|
117
|
+
/**
|
|
118
|
+
* @hidden
|
|
119
|
+
*/
|
|
120
|
+
private handleDrag;
|
|
121
|
+
/**
|
|
122
|
+
* @hidden
|
|
123
|
+
*/
|
|
124
|
+
private handleRelease;
|
|
125
|
+
/**
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
private handleDragEnd;
|
|
129
|
+
/**
|
|
130
|
+
* @hidden
|
|
131
|
+
*/
|
|
132
|
+
private initializeDraggable;
|
|
133
|
+
/**
|
|
134
|
+
* @hidden
|
|
135
|
+
*/
|
|
136
|
+
private attachDomHandlers;
|
|
137
|
+
/**
|
|
138
|
+
* @hidden
|
|
139
|
+
*/
|
|
140
|
+
private isDragHandle;
|
|
141
|
+
/**
|
|
142
|
+
* @hidden
|
|
143
|
+
*/
|
|
144
|
+
private getAutoScrollContainer;
|
|
145
|
+
/**
|
|
146
|
+
* @hidden
|
|
147
|
+
*/
|
|
148
|
+
private createHint;
|
|
149
|
+
/**
|
|
150
|
+
* @hidden
|
|
151
|
+
*/
|
|
152
|
+
private destroyHint;
|
|
153
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragTargetDirective, never>;
|
|
154
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragTargetDirective, "[kendoDragTarget]", ["kendoDragTarget"], { "hintTemplate": "hintTemplate"; "threshold": "threshold"; "autoScroll": "autoScroll"; "link": "link"; "dragDelay": "dragDelay"; "restrictByAxis": "restrictByAxis"; }, { "press": "press"; "dragStart": "dragStart"; "drag": "drag"; "release": "release"; "dragEnd": "dragEnd"; }, ["dragHandles"]>;
|
|
155
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { ElementRef, EventEmitter, NgZone, OnInit } from "@angular/core";
|
|
6
|
+
import { NormalizedDragEvent } from "@progress/kendo-draggable-common";
|
|
7
|
+
import { DragStateService } from "./drag-state.service";
|
|
8
|
+
import { DragEnterEvent, DragOverEvent, DragLeaveEvent, DropEvent } from './events/drop-target';
|
|
9
|
+
import { AllowedTargetFn } from "./models";
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* Represents the Kendo UI DropTarget directive for Angular.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DropTargetDirective implements OnInit {
|
|
15
|
+
private service;
|
|
16
|
+
private element;
|
|
17
|
+
private ngZone;
|
|
18
|
+
/**
|
|
19
|
+
* The allowed drag targets that can interact with the current drop target.
|
|
20
|
+
*/
|
|
21
|
+
allowedDragTargets: string | Array<string> | AllowedTargetFn;
|
|
22
|
+
/**
|
|
23
|
+
* Fires when a DragTarget element enters the DropTarget.
|
|
24
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
25
|
+
*/
|
|
26
|
+
dragEnter: EventEmitter<DragEnterEvent>;
|
|
27
|
+
/**
|
|
28
|
+
* Fires when a DragTarget element is being dragged over the DropTarget.
|
|
29
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
30
|
+
*/
|
|
31
|
+
dragOver: EventEmitter<DragOverEvent>;
|
|
32
|
+
/**
|
|
33
|
+
* Fires when a DragTarget element leaves the DropTarget.
|
|
34
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
35
|
+
*/
|
|
36
|
+
dragLeave: EventEmitter<DragLeaveEvent>;
|
|
37
|
+
/**
|
|
38
|
+
* Fires when a DragTarget element is dropped over the DropTarget.
|
|
39
|
+
* This event is preventable. Preventing it allows full logic customization.
|
|
40
|
+
*/
|
|
41
|
+
drop: EventEmitter<DropEvent>;
|
|
42
|
+
constructor(service: DragStateService, element: ElementRef, ngZone: NgZone);
|
|
43
|
+
private dropTarget;
|
|
44
|
+
ngOnInit(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @hidden
|
|
47
|
+
*/
|
|
48
|
+
handleDragEnter(event: NormalizedDragEvent): void;
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
handleDragLeave(event: NormalizedDragEvent): void;
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
handleDragOver(event: NormalizedDragEvent): void;
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
handleDrop(event: NormalizedDragEvent): void;
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
private initializeDropTarget;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropTargetDirective, never>;
|
|
66
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropTargetDirective, "[kendoDropTarget]", ["kendoDropTarget"], { "allowedDragTargets": "allowedDragTargets"; }, { "dragEnter": "dragEnter"; "dragOver": "dragOver"; "dragLeave": "dragLeave"; "drop": "drop"; }, never>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the drag event of the DragTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DOM element that is being dragged.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the dragEnd event of the DragTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragEndEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DOM element that was dragged.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -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,22 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the press event of the DragTarget.
|
|
8
|
+
*/
|
|
9
|
+
export declare class PressEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The normalized event.
|
|
12
|
+
*/
|
|
13
|
+
event: NormalizedDragEvent;
|
|
14
|
+
/**
|
|
15
|
+
* The DOM element that is pressed.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
constructor(args?: any);
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the release event of the DragTarget.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ReleaseEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The normalized event.
|
|
12
|
+
*/
|
|
13
|
+
event: NormalizedDragEvent;
|
|
14
|
+
/**
|
|
15
|
+
* The DOM element that is released.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
constructor(args?: any);
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the dragStart event of the DragTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragStartEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DOM element that will be dragged.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the drop event of the DropTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DropEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DropTarget DOM element.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the dragEnter event of the DropTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragEnterEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DropTarget DOM element.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -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,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the dragLeave event of the DropTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragLeaveEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DropTarget DOM element.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
6
|
+
import { PreventableEvent } from '@progress/kendo-angular-common';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the dragOver event of the DropTarget.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DragOverEvent extends PreventableEvent {
|
|
11
|
+
/**
|
|
12
|
+
* The normalized drag event.
|
|
13
|
+
*/
|
|
14
|
+
event: NormalizedDragEvent;
|
|
15
|
+
/**
|
|
16
|
+
* The DropTarget DOM element.
|
|
17
|
+
*/
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
constructor(args?: any);
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { ElementRef, TemplateRef } from "@angular/core";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare class HintComponent {
|
|
11
|
+
element: ElementRef;
|
|
12
|
+
template: TemplateRef<any>;
|
|
13
|
+
directive: any;
|
|
14
|
+
constructor(element: ElementRef);
|
|
15
|
+
hostClasses: boolean;
|
|
16
|
+
zIndex: number;
|
|
17
|
+
touchAction: string;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HintComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "ng-component", never, { "template": "template"; "directive": "directive"; }, {}, never, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { DragTargetDirective } from "../dragtarget.directive";
|
|
6
|
+
/**
|
|
7
|
+
* Represents the callback that is used by the
|
|
8
|
+
* [allowedDragTargets]({% slug api_utils_droptargetdirective %}#toc-alloweddragtargets) property.
|
|
9
|
+
*
|
|
10
|
+
* ```ts-no-run
|
|
11
|
+
* isTargetAllowed(dragTarget) {
|
|
12
|
+
* return dragTarget.link === 'allowed';
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare type AllowedTargetFn = (dragTarget: DragTargetDirective) => boolean;
|