UNPKG

jqwidgets-scripts-custom

Version:

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

5 lines (4 loc) 10.1 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxbuttons'); require('../../jqwidgets/jqxsortable'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxsortable",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxsortable={}),t.ng.core)}(this,function(t,e){"use strict";function i(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,n,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)s.push(r.value)}catch(a){n={error:a}}finally{try{r&&!r.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}return s}var o=function(){function t(t){this.autoCreate=!0,this.properties=["appendTo","axis","cancel","connectWith","containment","cursor","cursorAt","delay","disabled","distance","dropOnEmpty","forceHelperSize","forcePlaceholderSize","grid","handle","helper","items","opacity","placeholderShow","revert","scroll","scrollSensitivity","scrollSpeed","tolerance","zIndex"],this.onActivate=new e.EventEmitter,this.onBeforeStop=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onDeactivate=new e.EventEmitter,this.onOut=new e.EventEmitter,this.onOver=new e.EventEmitter,this.onReceive=new e.EventEmitter,this.onRemove=new e.EventEmitter,this.onSort=new e.EventEmitter,this.onStart=new e.EventEmitter,this.onStop=new e.EventEmitter,this.onUpdate=new e.EventEmitter,this.elementRef=t}return t.prototype.ngOnInit=function(){this.autoCreate&&this.createComponent()},t.prototype.ngOnChanges=function(t){if(this.host)for(var e=0;e<this.properties.length;e++){var o="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),r=!1;if(this[o]!==undefined){if("object"==typeof this[o]){if(this[o]instanceof Array&&(r=this.arraysEqual(this[o],this.host.jqxSortable(this.properties[e]))),r)return!1;this.host.jqxSortable(this.properties[e],this[o]);continue}this[o]!==this.host.jqxSortable(this.properties[e])&&this.host.jqxSortable(this.properties[e],this[o])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var o="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[o]!==undefined&&(t[this.properties[e]]=this[o])}return t},t.prototype.moveClasses=function(t,e){var o,r=t.classList;0<r.length&&(o=e.classList).add.apply(o,function n(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}(r)),t.className=""},t.prototype.moveStyles=function(t,e){var o=t.style.cssText;e.style.cssText=o,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,"jqxSortable",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.jqxSortable("setOptions",t)},t.prototype.appendTo=function(t){if(t===undefined)return this.host.jqxSortable("appendTo");this.host.jqxSortable("appendTo",t)},t.prototype.axis=function(t){if(t===undefined)return this.host.jqxSortable("axis");this.host.jqxSortable("axis",t)},t.prototype.cancel=function(t){if(t===undefined)return this.host.jqxSortable("cancel");this.host.jqxSortable("cancel",t)},t.prototype.connectWith=function(t){if(t===undefined)return this.host.jqxSortable("connectWith");this.host.jqxSortable("connectWith",t)},t.prototype.containment=function(t){if(t===undefined)return this.host.jqxSortable("containment");this.host.jqxSortable("containment",t)},t.prototype.cursor=function(t){if(t===undefined)return this.host.jqxSortable("cursor");this.host.jqxSortable("cursor",t)},t.prototype.cursorAt=function(t){if(t===undefined)return this.host.jqxSortable("cursorAt");this.host.jqxSortable("cursorAt",t)},t.prototype.delay=function(t){if(t===undefined)return this.host.jqxSortable("delay");this.host.jqxSortable("delay",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxSortable("disabled");this.host.jqxSortable("disabled",t)},t.prototype.distance=function(t){if(t===undefined)return this.host.jqxSortable("distance");this.host.jqxSortable("distance",t)},t.prototype.dropOnEmpty=function(t){if(t===undefined)return this.host.jqxSortable("dropOnEmpty");this.host.jqxSortable("dropOnEmpty",t)},t.prototype.forceHelperSize=function(t){if(t===undefined)return this.host.jqxSortable("forceHelperSize");this.host.jqxSortable("forceHelperSize",t)},t.prototype.forcePlaceholderSize=function(t){if(t===undefined)return this.host.jqxSortable("forcePlaceholderSize");this.host.jqxSortable("forcePlaceholderSize",t)},t.prototype.grid=function(t){if(t===undefined)return this.host.jqxSortable("grid");this.host.jqxSortable("grid",t)},t.prototype.handle=function(t){if(t===undefined)return this.host.jqxSortable("handle");this.host.jqxSortable("handle",t)},t.prototype.helper=function(t){if(t===undefined)return this.host.jqxSortable("helper");this.host.jqxSortable("helper",t)},t.prototype.items=function(t){if(t===undefined)return this.host.jqxSortable("items");this.host.jqxSortable("items",t)},t.prototype.opacity=function(t){if(t===undefined)return this.host.jqxSortable("opacity");this.host.jqxSortable("opacity",t)},t.prototype.placeholderShow=function(t){if(t===undefined)return this.host.jqxSortable("placeholderShow");this.host.jqxSortable("placeholderShow",t)},t.prototype.revert=function(t){if(t===undefined)return this.host.jqxSortable("revert");this.host.jqxSortable("revert",t)},t.prototype.scroll=function(t){if(t===undefined)return this.host.jqxSortable("scroll");this.host.jqxSortable("scroll",t)},t.prototype.scrollSensitivity=function(t){if(t===undefined)return this.host.jqxSortable("scrollSensitivity");this.host.jqxSortable("scrollSensitivity",t)},t.prototype.scrollSpeed=function(t){if(t===undefined)return this.host.jqxSortable("scrollSpeed");this.host.jqxSortable("scrollSpeed",t)},t.prototype.tolerance=function(t){if(t===undefined)return this.host.jqxSortable("tolerance");this.host.jqxSortable("tolerance",t)},t.prototype.zIndex=function(t){if(t===undefined)return this.host.jqxSortable("zIndex");this.host.jqxSortable("zIndex",t)},t.prototype.cancelMethod=function(){this.host.jqxSortable("cancelMethod")},t.prototype.destroy=function(){this.host.jqxSortable("destroy")},t.prototype.disable=function(){this.host.jqxSortable("disable")},t.prototype.enable=function(){this.host.jqxSortable("enable")},t.prototype.refresh=function(){this.host.jqxSortable("refresh")},t.prototype.refreshPositions=function(){this.host.jqxSortable("refreshPositions")},t.prototype.serialize=function(t){return this.host.jqxSortable("serialize",t)},t.prototype.toArray=function(){return this.host.jqxSortable("toArray")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("activate",function(t){e.onActivate.emit(t)}),this.host.on("beforeStop",function(t){e.onBeforeStop.emit(t)}),this.host.on("change",function(t){e.onChange.emit(t)}),this.host.on("deactivate",function(t){e.onDeactivate.emit(t)}),this.host.on("out",function(t){e.onOut.emit(t)}),this.host.on("over",function(t){e.onOver.emit(t)}),this.host.on("receive",function(t){e.onReceive.emit(t)}),this.host.on("remove",function(t){e.onRemove.emit(t)}),this.host.on("sort",function(t){e.onSort.emit(t)}),this.host.on("start",function(t){e.onStart.emit(t)}),this.host.on("stop",function(t){e.onStop.emit(t)}),this.host.on("update",function(t){e.onUpdate.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxSortable",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrAppendTo:[{type:e.Input,args:["appendTo"]}],attrAxis:[{type:e.Input,args:["axis"]}],attrCancel:[{type:e.Input,args:["cancel"]}],attrConnectWith:[{type:e.Input,args:["connectWith"]}],attrContainment:[{type:e.Input,args:["containment"]}],attrCursor:[{type:e.Input,args:["cursor"]}],attrCursorAt:[{type:e.Input,args:["cursorAt"]}],attrDelay:[{type:e.Input,args:["delay"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrDistance:[{type:e.Input,args:["distance"]}],attrDropOnEmpty:[{type:e.Input,args:["dropOnEmpty"]}],attrForceHelperSize:[{type:e.Input,args:["forceHelperSize"]}],attrForcePlaceholderSize:[{type:e.Input,args:["forcePlaceholderSize"]}],attrGrid:[{type:e.Input,args:["grid"]}],attrHandle:[{type:e.Input,args:["handle"]}],attrHelper:[{type:e.Input,args:["helper"]}],attrItems:[{type:e.Input,args:["items"]}],attrOpacity:[{type:e.Input,args:["opacity"]}],attrPlaceholderShow:[{type:e.Input,args:["placeholderShow"]}],attrRevert:[{type:e.Input,args:["revert"]}],attrScroll:[{type:e.Input,args:["scroll"]}],attrScrollSensitivity:[{type:e.Input,args:["scrollSensitivity"]}],attrScrollSpeed:[{type:e.Input,args:["scrollSpeed"]}],attrTolerance:[{type:e.Input,args:["tolerance"]}],attrZIndex:[{type:e.Input,args:["zIndex"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onActivate:[{type:e.Output}],onBeforeStop:[{type:e.Output}],onChange:[{type:e.Output}],onDeactivate:[{type:e.Output}],onOut:[{type:e.Output}],onOver:[{type:e.Output}],onReceive:[{type:e.Output}],onRemove:[{type:e.Output}],onSort:[{type:e.Output}],onStart:[{type:e.Output}],onStop:[{type:e.Output}],onUpdate:[{type:e.Output}]},t}(),r=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[o],exports:[o]}]}],t}();t.jqxSortableComponent=o,t.jqxSortableModule=r,Object.defineProperty(t,"__esModule",{value:!0})});