UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

4 lines (3 loc) 7.95 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxdragdrop'); !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxdragdrop",["exports","@angular/core"],r):r((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxdragdrop={}),t.ng.core)}(this,function(t,r){"use strict";function i(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var o,n,i=e.call(t),a=[];try{for(;(void 0===r||0<r--)&&!(o=i.next()).done;)a.push(o.value)}catch(s){n={error:s}}finally{try{o&&!o.done&&(e=i["return"])&&e.call(i)}finally{if(n)throw n.error}}return a}var e=function(){function t(t){this.autoCreate=!0,this.properties=["appendTo","disabled","distance","data","dropAction","dropTarget","dragZIndex","feedback","initFeedback","opacity","onDragEnd","onDrag","onDragStart","onTargetDrop","onDropTargetEnter","onDropTargetLeave","restricter","revert","revertDuration","tolerance"],this.ondragstart=new r.EventEmitter,this.ondragend=new r.EventEmitter,this.ondragging=new r.EventEmitter,this.ondroptargetenter=new r.EventEmitter,this.ondroptargetleave=new r.EventEmitter,this.elementRef=t}return t.prototype.ngOnInit=function(){this.autoCreate&&this.createComponent()},t.prototype.ngOnChanges=function(t){if(this.host)for(var r=0;r<this.properties.length;r++){var e="attr"+this.properties[r].substring(0,1).toUpperCase()+this.properties[r].substring(1),o=!1;if(this[e]!==undefined){if("object"==typeof this[e]){if(this[e]instanceof Array&&(o=this.arraysEqual(this[e],this.host.jqxDragDrop(this.properties[r]))),o)return!1;this.host.jqxDragDrop(this.properties[r],this[e]);continue}this[e]!==this.host.jqxDragDrop(this.properties[r])&&this.host.jqxDragDrop(this.properties[r],this[e])}}},t.prototype.arraysEqual=function(t,r){if(t&&!r||!t&&r)return!1;if(t.length!=r.length)return!1;for(var e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},r=0;r<this.properties.length;r++){var e="attr"+this.properties[r].substring(0,1).toUpperCase()+this.properties[r].substring(1);this[e]!==undefined&&(t[this.properties[r]]=this[e])}return t},t.prototype.moveClasses=function(t,r){var e,o=t.classList;0<o.length&&(e=r.classList).add.apply(e,function n(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(i(arguments[r]));return t}(o)),t.className=""},t.prototype.moveStyles=function(t,r){var e=t.style.cssText;r.style.cssText=e,t.style.cssText=""},t.prototype.createComponent=function(t){this.host||(t?JQXLite.extend(t,this.manageAttributes()):t=this.manageAttributes(),this.host=JQXLite(this.elementRef.nativeElement.firstChild),this.moveClasses(this.elementRef.nativeElement,this.host[0]),this.moveStyles(this.elementRef.nativeElement,this.host[0]),this.__wireEvents__(),this.widgetObject=jqwidgets.createInstance(this.host,"jqxDragDrop",t))},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight})},t.prototype.setOptions=function(t){this.host.jqxDragDrop("setOptions",t)},t.prototype.appendTo=function(t){if(t===undefined)return this.host.jqxDragDrop("appendTo");this.host.jqxDragDrop("appendTo",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxDragDrop("disabled");this.host.jqxDragDrop("disabled",t)},t.prototype.distance=function(t){if(t===undefined)return this.host.jqxDragDrop("distance");this.host.jqxDragDrop("distance",t)},t.prototype.data=function(t){if(t===undefined)return this.host.jqxDragDrop("data");this.host.jqxDragDrop("data",t)},t.prototype.dropAction=function(t){if(t===undefined)return this.host.jqxDragDrop("dropAction");this.host.jqxDragDrop("dropAction",t)},t.prototype.dropTarget=function(t){if(t===undefined)return this.host.jqxDragDrop("dropTarget");this.host.jqxDragDrop("dropTarget",t)},t.prototype.dragZIndex=function(t){if(t===undefined)return this.host.jqxDragDrop("dragZIndex");this.host.jqxDragDrop("dragZIndex",t)},t.prototype.feedback=function(t){if(t===undefined)return this.host.jqxDragDrop("feedback");this.host.jqxDragDrop("feedback",t)},t.prototype.initFeedback=function(t){if(t===undefined)return this.host.jqxDragDrop("initFeedback");this.host.jqxDragDrop("initFeedback",t)},t.prototype.opacity=function(t){if(t===undefined)return this.host.jqxDragDrop("opacity");this.host.jqxDragDrop("opacity",t)},t.prototype.onDragEnd=function(t){if(t===undefined)return this.host.jqxDragDrop("onDragEnd");this.host.jqxDragDrop("onDragEnd",t)},t.prototype.onDrag=function(t){if(t===undefined)return this.host.jqxDragDrop("onDrag");this.host.jqxDragDrop("onDrag",t)},t.prototype.onDragStart=function(t){if(t===undefined)return this.host.jqxDragDrop("onDragStart");this.host.jqxDragDrop("onDragStart",t)},t.prototype.onTargetDrop=function(t){if(t===undefined)return this.host.jqxDragDrop("onTargetDrop");this.host.jqxDragDrop("onTargetDrop",t)},t.prototype.onDropTargetEnter=function(t){if(t===undefined)return this.host.jqxDragDrop("onDropTargetEnter");this.host.jqxDragDrop("onDropTargetEnter",t)},t.prototype.onDropTargetLeave=function(t){if(t===undefined)return this.host.jqxDragDrop("onDropTargetLeave");this.host.jqxDragDrop("onDropTargetLeave",t)},t.prototype.restricter=function(t){if(t===undefined)return this.host.jqxDragDrop("restricter");this.host.jqxDragDrop("restricter",t)},t.prototype.revert=function(t){if(t===undefined)return this.host.jqxDragDrop("revert");this.host.jqxDragDrop("revert",t)},t.prototype.revertDuration=function(t){if(t===undefined)return this.host.jqxDragDrop("revertDuration");this.host.jqxDragDrop("revertDuration",t)},t.prototype.tolerance=function(t){if(t===undefined)return this.host.jqxDragDrop("tolerance");this.host.jqxDragDrop("tolerance",t)},t.prototype.__wireEvents__=function(){var r=this;this.host.on("dragStart",function(t){r.ondragstart.emit(t)}),this.host.on("dragEnd",function(t){r.ondragend.emit(t)}),this.host.on("dragging",function(t){r.ondragging.emit(t)}),this.host.on("dropTargetEnter",function(t){r.ondroptargetenter.emit(t)}),this.host.on("dropTargetLeave",function(t){r.ondroptargetleave.emit(t)})},t.decorators=[{type:r.Component,args:[{selector:"jqxDragDrop",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:r.ElementRef}]},t.propDecorators={attrAppendTo:[{type:r.Input,args:["appendTo"]}],attrDisabled:[{type:r.Input,args:["disabled"]}],attrDistance:[{type:r.Input,args:["distance"]}],attrData:[{type:r.Input,args:["data"]}],attrDropAction:[{type:r.Input,args:["dropAction"]}],attrDropTarget:[{type:r.Input,args:["dropTarget"]}],attrDragZIndex:[{type:r.Input,args:["dragZIndex"]}],attrFeedback:[{type:r.Input,args:["feedback"]}],attrInitFeedback:[{type:r.Input,args:["initFeedback"]}],attrOpacity:[{type:r.Input,args:["opacity"]}],attrOnDragEnd:[{type:r.Input,args:["onDragEnd"]}],attrOnDrag:[{type:r.Input,args:["onDrag"]}],attrOnDragStart:[{type:r.Input,args:["onDragStart"]}],attrOnTargetDrop:[{type:r.Input,args:["onTargetDrop"]}],attrOnDropTargetEnter:[{type:r.Input,args:["onDropTargetEnter"]}],attrOnDropTargetLeave:[{type:r.Input,args:["onDropTargetLeave"]}],attrRestricter:[{type:r.Input,args:["restricter"]}],attrRevert:[{type:r.Input,args:["revert"]}],attrRevertDuration:[{type:r.Input,args:["revertDuration"]}],attrTolerance:[{type:r.Input,args:["tolerance"]}],attrWidth:[{type:r.Input,args:["width"]}],attrHeight:[{type:r.Input,args:["height"]}],autoCreate:[{type:r.Input,args:["auto-create"]}],ondragstart:[{type:r.Output}],ondragend:[{type:r.Output}],ondragging:[{type:r.Output}],ondroptargetenter:[{type:r.Output}],ondroptargetleave:[{type:r.Output}]},t}(),o=function(){function t(){}return t.decorators=[{type:r.NgModule,args:[{imports:[],declarations:[e],exports:[e]}]}],t}();t.jqxDragDropComponent=e,t.jqxDragDropModule=o,Object.defineProperty(t,"__esModule",{value:!0})});