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) 11.2 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxbuttons'); require('../../jqwidgets/jqxslider'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxslider",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxslider={}),t.ng.core,t.ng.forms)}(this,function(t,e,i){"use strict";function r(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var o,n,r=i.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=r.next()).done;)s.push(o.value)}catch(h){n={error:h}}finally{try{o&&!o.done&&(i=r["return"])&&i.call(r)}finally{if(n)throw n.error}}return s}var o=function(){},n={provide:i.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return s}),multi:!0},s=function(){function t(t){this.autoCreate=!0,this.properties=["buttonsPosition","disabled","height","layout","mode","minorTicksFrequency","minorTickSize","max","min","orientation","rangeSlider","rtl","step","showTicks","showMinorTicks","showTickLabels","showButtons","showRange","template","theme","ticksPosition","ticksFrequency","tickSize","tickLabelFormatFunction","tooltip","tooltipHideDelay","tooltipPosition","tooltipFormatFunction","value","values","width"],this.onTouchedCallback=o,this.onChangeCallback=o,this.onChange=new e.EventEmitter,this.onSlide=new e.EventEmitter,this.onSlideStart=new e.EventEmitter,this.onSlideEnd=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 i="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),o=!1;if(this[i]!==undefined){if("object"==typeof this[i]){if(this[i]instanceof Array&&(o=this.arraysEqual(this[i],this.host.jqxSlider(this.properties[e]))),o)return!1;this.host.jqxSlider(this.properties[e],this[i]);continue}this[i]!==this.host.jqxSlider(this.properties[e])&&this.host.jqxSlider(this.properties[e],this[i])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var i="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[i]!==undefined&&(t[this.properties[e]]=this[i])}return t},t.prototype.moveClasses=function(t,e){var i,o=t.classList;0<o.length&&(i=e.classList).add.apply(i,function n(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t}(o)),t.className=""},t.prototype.moveStyles=function(t,e){var i=t.style.cssText;e.style.cssText=i,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,"jqxSlider",t))},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight})},Object.defineProperty(t.prototype,"ngValue",{get:function(){return this.widgetObject?this.host.val():""},set:function(t){this.widgetObject&&this.onChangeCallback(t)},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.widgetObject&&this.onChangeCallback(this.host.val())},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setOptions=function(t){this.host.jqxSlider("setOptions",t)},t.prototype.buttonsPosition=function(t){if(t===undefined)return this.host.jqxSlider("buttonsPosition");this.host.jqxSlider("buttonsPosition",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxSlider("disabled");this.host.jqxSlider("disabled",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxSlider("height");this.host.jqxSlider("height",t)},t.prototype.layout=function(t){if(t===undefined)return this.host.jqxSlider("layout");this.host.jqxSlider("layout",t)},t.prototype.mode=function(t){if(t===undefined)return this.host.jqxSlider("mode");this.host.jqxSlider("mode",t)},t.prototype.minorTicksFrequency=function(t){if(t===undefined)return this.host.jqxSlider("minorTicksFrequency");this.host.jqxSlider("minorTicksFrequency",t)},t.prototype.minorTickSize=function(t){if(t===undefined)return this.host.jqxSlider("minorTickSize");this.host.jqxSlider("minorTickSize",t)},t.prototype.max=function(t){if(t===undefined)return this.host.jqxSlider("max");this.host.jqxSlider("max",t)},t.prototype.min=function(t){if(t===undefined)return this.host.jqxSlider("min");this.host.jqxSlider("min",t)},t.prototype.orientation=function(t){if(t===undefined)return this.host.jqxSlider("orientation");this.host.jqxSlider("orientation",t)},t.prototype.rangeSlider=function(t){if(t===undefined)return this.host.jqxSlider("rangeSlider");this.host.jqxSlider("rangeSlider",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxSlider("rtl");this.host.jqxSlider("rtl",t)},t.prototype.step=function(t){if(t===undefined)return this.host.jqxSlider("step");this.host.jqxSlider("step",t)},t.prototype.showTicks=function(t){if(t===undefined)return this.host.jqxSlider("showTicks");this.host.jqxSlider("showTicks",t)},t.prototype.showMinorTicks=function(t){if(t===undefined)return this.host.jqxSlider("showMinorTicks");this.host.jqxSlider("showMinorTicks",t)},t.prototype.showTickLabels=function(t){if(t===undefined)return this.host.jqxSlider("showTickLabels");this.host.jqxSlider("showTickLabels",t)},t.prototype.showButtons=function(t){if(t===undefined)return this.host.jqxSlider("showButtons");this.host.jqxSlider("showButtons",t)},t.prototype.showRange=function(t){if(t===undefined)return this.host.jqxSlider("showRange");this.host.jqxSlider("showRange",t)},t.prototype.template=function(t){if(t===undefined)return this.host.jqxSlider("template");this.host.jqxSlider("template",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxSlider("theme");this.host.jqxSlider("theme",t)},t.prototype.ticksPosition=function(t){if(t===undefined)return this.host.jqxSlider("ticksPosition");this.host.jqxSlider("ticksPosition",t)},t.prototype.ticksFrequency=function(t){if(t===undefined)return this.host.jqxSlider("ticksFrequency");this.host.jqxSlider("ticksFrequency",t)},t.prototype.tickSize=function(t){if(t===undefined)return this.host.jqxSlider("tickSize");this.host.jqxSlider("tickSize",t)},t.prototype.tickLabelFormatFunction=function(t){if(t===undefined)return this.host.jqxSlider("tickLabelFormatFunction");this.host.jqxSlider("tickLabelFormatFunction",t)},t.prototype.tooltip=function(t){if(t===undefined)return this.host.jqxSlider("tooltip");this.host.jqxSlider("tooltip",t)},t.prototype.tooltipHideDelay=function(t){if(t===undefined)return this.host.jqxSlider("tooltipHideDelay");this.host.jqxSlider("tooltipHideDelay",t)},t.prototype.tooltipPosition=function(t){if(t===undefined)return this.host.jqxSlider("tooltipPosition");this.host.jqxSlider("tooltipPosition",t)},t.prototype.tooltipFormatFunction=function(t){if(t===undefined)return this.host.jqxSlider("tooltipFormatFunction");this.host.jqxSlider("tooltipFormatFunction",t)},t.prototype.value=function(t){if(t===undefined)return this.host.jqxSlider("value");this.host.jqxSlider("value",t)},t.prototype.values=function(t){if(t===undefined)return this.host.jqxSlider("values");this.host.jqxSlider("values",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxSlider("width");this.host.jqxSlider("width",t)},t.prototype.destroy=function(){this.host.jqxSlider("destroy")},t.prototype.decrementValue=function(){this.host.jqxSlider("decrementValue")},t.prototype.disable=function(){this.host.jqxSlider("disable")},t.prototype.enable=function(){this.host.jqxSlider("enable")},t.prototype.focus=function(){this.host.jqxSlider("focus")},t.prototype.getValue=function(){return this.host.jqxSlider("getValue")},t.prototype.incrementValue=function(){this.host.jqxSlider("incrementValue")},t.prototype.setValue=function(t){this.host.jqxSlider("setValue",t)},t.prototype.val=function(t){return t!==undefined?this.host.jqxSlider("val",t):this.host.jqxSlider("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("change",function(t){e.onChange.emit(t),e.onChangeCallback(e.host.val())}),this.host.on("slide",function(t){e.onSlide.emit(t)}),this.host.on("slideStart",function(t){e.onSlideStart.emit(t)}),this.host.on("slideEnd",function(t){e.onSlideEnd.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxSlider",template:"<div><ng-content></ng-content></div>",providers:[n],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrButtonsPosition:[{type:e.Input,args:["buttonsPosition"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrLayout:[{type:e.Input,args:["layout"]}],attrMode:[{type:e.Input,args:["mode"]}],attrMinorTicksFrequency:[{type:e.Input,args:["minorTicksFrequency"]}],attrMinorTickSize:[{type:e.Input,args:["minorTickSize"]}],attrMax:[{type:e.Input,args:["max"]}],attrMin:[{type:e.Input,args:["min"]}],attrOrientation:[{type:e.Input,args:["orientation"]}],attrRangeSlider:[{type:e.Input,args:["rangeSlider"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrStep:[{type:e.Input,args:["step"]}],attrShowTicks:[{type:e.Input,args:["showTicks"]}],attrShowMinorTicks:[{type:e.Input,args:["showMinorTicks"]}],attrShowTickLabels:[{type:e.Input,args:["showTickLabels"]}],attrShowButtons:[{type:e.Input,args:["showButtons"]}],attrShowRange:[{type:e.Input,args:["showRange"]}],attrTemplate:[{type:e.Input,args:["template"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrTicksPosition:[{type:e.Input,args:["ticksPosition"]}],attrTicksFrequency:[{type:e.Input,args:["ticksFrequency"]}],attrTickSize:[{type:e.Input,args:["tickSize"]}],attrTickLabelFormatFunction:[{type:e.Input,args:["tickLabelFormatFunction"]}],attrTooltip:[{type:e.Input,args:["tooltip"]}],attrTooltipHideDelay:[{type:e.Input,args:["tooltipHideDelay"]}],attrTooltipPosition:[{type:e.Input,args:["tooltipPosition"]}],attrTooltipFormatFunction:[{type:e.Input,args:["tooltipFormatFunction"]}],attrValue:[{type:e.Input,args:["value"]}],attrValues:[{type:e.Input,args:["values"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onChange:[{type:e.Output}],onSlide:[{type:e.Output}],onSlideStart:[{type:e.Output}],onSlideEnd:[{type:e.Output}]},t}(),h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[i.FormsModule],declarations:[s],exports:[s]}]}],t}();t.jqxSliderComponent=s,t.jqxSliderModule=h,Object.defineProperty(t,"__esModule",{value:!0})});