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) 5.97 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxbuttons'); require('../../jqwidgets/jqxscrollbar'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxscrollbar",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxscrollbar={}),t.ng.core)}(this,function(t,e){"use strict";function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,i,s=r.call(t),n=[];try{for(;(void 0===e||0<e--)&&!(o=s.next()).done;)n.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=s["return"])&&r.call(s)}finally{if(i)throw i.error}}return n}var r=function(){function t(t){this.autoCreate=!0,this.properties=["disabled","height","largestep","min","max","rtl","step","showButtons","thumbMinSize","theme","vertical","value","width"],this.onValueChanged=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 r="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),o=!1;if(this[r]!==undefined){if("object"==typeof this[r]){if(this[r]instanceof Array&&(o=this.arraysEqual(this[r],this.host.jqxScrollBar(this.properties[e]))),o)return!1;this.host.jqxScrollBar(this.properties[e],this[r]);continue}this[r]!==this.host.jqxScrollBar(this.properties[e])&&this.host.jqxScrollBar(this.properties[e],this[r])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var r="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[r]!==undefined&&(t[this.properties[e]]=this[r])}return t},t.prototype.moveClasses=function(t,e){var r,o=t.classList;0<o.length&&(r=e.classList).add.apply(r,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(o)),t.className=""},t.prototype.moveStyles=function(t,e){var r=t.style.cssText;e.style.cssText=r,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,"jqxScrollBar",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.jqxScrollBar("setOptions",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxScrollBar("disabled");this.host.jqxScrollBar("disabled",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxScrollBar("height");this.host.jqxScrollBar("height",t)},t.prototype.largestep=function(t){if(t===undefined)return this.host.jqxScrollBar("largestep");this.host.jqxScrollBar("largestep",t)},t.prototype.min=function(t){if(t===undefined)return this.host.jqxScrollBar("min");this.host.jqxScrollBar("min",t)},t.prototype.max=function(t){if(t===undefined)return this.host.jqxScrollBar("max");this.host.jqxScrollBar("max",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxScrollBar("rtl");this.host.jqxScrollBar("rtl",t)},t.prototype.step=function(t){if(t===undefined)return this.host.jqxScrollBar("step");this.host.jqxScrollBar("step",t)},t.prototype.showButtons=function(t){if(t===undefined)return this.host.jqxScrollBar("showButtons");this.host.jqxScrollBar("showButtons",t)},t.prototype.thumbMinSize=function(t){if(t===undefined)return this.host.jqxScrollBar("thumbMinSize");this.host.jqxScrollBar("thumbMinSize",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxScrollBar("theme");this.host.jqxScrollBar("theme",t)},t.prototype.vertical=function(t){if(t===undefined)return this.host.jqxScrollBar("vertical");this.host.jqxScrollBar("vertical",t)},t.prototype.value=function(t){if(t===undefined)return this.host.jqxScrollBar("value");this.host.jqxScrollBar("value",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxScrollBar("width");this.host.jqxScrollBar("width",t)},t.prototype.destroy=function(){this.host.jqxScrollBar("destroy")},t.prototype.isScrolling=function(){return this.host.jqxScrollBar("isScrolling")},t.prototype.setPosition=function(t){this.host.jqxScrollBar("setPosition",t)},t.prototype.__wireEvents__=function(){var e=this;this.host.on("valueChanged",function(t){e.onValueChanged.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxScrollBar",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrDisabled:[{type:e.Input,args:["disabled"]}],attrLargestep:[{type:e.Input,args:["largestep"]}],attrMin:[{type:e.Input,args:["min"]}],attrMax:[{type:e.Input,args:["max"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrStep:[{type:e.Input,args:["step"]}],attrShowButtons:[{type:e.Input,args:["showButtons"]}],attrThumbMinSize:[{type:e.Input,args:["thumbMinSize"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrVertical:[{type:e.Input,args:["vertical"]}],attrValue:[{type:e.Input,args:["value"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onValueChanged:[{type:e.Output}]},t}(),o=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[r],exports:[r]}]}],t}();t.jqxScrollBarComponent=r,t.jqxScrollBarModule=o,Object.defineProperty(t,"__esModule",{value:!0})});