UNPKG

jqwidgets-scripts-custom

Version:

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

19 lines (18 loc) 5.83 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/globalization/globalize'); require('../../jqwidgets/jqxdata'); require('../../jqwidgets/jqxinput'); require('../../jqwidgets/jqxpasswordinput'); require('../../jqwidgets/jqxnumberinput'); require('../../jqwidgets/jqxradiobutton'); require('../../jqwidgets/jqxcheckbox'); require('../../jqwidgets/jqxbuttons'); require('../../jqwidgets/jqxscrollbar'); require('../../jqwidgets/jqxlistbox'); require('../../jqwidgets/jqxdropdownlist'); require('../../jqwidgets/jqxcombobox'); require('../../jqwidgets/jqxmaskedinput'); require('../../jqwidgets/jqxcalendar'); require('../../jqwidgets/jqxdatetimeinput'); require('../../jqwidgets/jqxform'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxform",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxform={}),t.ng.core)}(this,function(t,o){"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(h){n={error:h}}finally{try{r&&!r.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}return s}var e=function(){function t(t){var e=this;this.autoCreate=!0,this.properties=["padding","backgroundColor","borderColor","value","template"],this.onFormDataChange=new o.EventEmitter,this.onButtonClick=new o.EventEmitter,this.elementRef=t,JQXLite(window).resize(function(){e.__updateRect__()})}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.jqxForm(this.properties[e]))),r)return!1;this.host.jqxForm(this.properties[e],this[o]);continue}this[o]!==this.host.jqxForm(this.properties[e])&&this.host.jqxForm(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,"jqxForm",t),this.__updateRect__())},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight}),this.refresh()},t.prototype.setOptions=function(t){this.host.jqxForm("setOptions",t)},t.prototype.padding=function(t){if(t===undefined)return this.host.jqxForm("padding");this.host.jqxForm("padding",t)},t.prototype.backgroundColor=function(t){if(t===undefined)return this.host.jqxForm("backgroundColor");this.host.jqxForm("backgroundColor",t)},t.prototype.borderColor=function(t){if(t===undefined)return this.host.jqxForm("borderColor");this.host.jqxForm("borderColor",t)},t.prototype.value=function(t){if(t===undefined)return this.host.jqxForm("value");this.host.jqxForm("value",t)},t.prototype.template=function(t){if(t===undefined)return this.host.jqxForm("template");this.host.jqxForm("template",t)},t.prototype.getInstance=function(){return this.host.jqxForm("getInstance")},t.prototype.refresh=function(){this.host.jqxForm("refresh")},t.prototype.destroy=function(){this.host.jqxForm("destroy")},t.prototype.hideComponent=function(t){this.host.jqxForm("hideComponent",t)},t.prototype.showComponent=function(t){this.host.jqxForm("showComponent",t)},t.prototype.val=function(t){return t!==undefined?this.host.jqxForm("val",t):this.host.jqxForm("val")},t.prototype.submit=function(t,e,o){this.host.jqxForm("submit",t,e,o)},t.prototype.getComponentByName=function(t){return this.host.jqxForm("getComponentByName",t)},t.prototype.__wireEvents__=function(){var e=this;this.host.on("formDataChange",function(t){e.onFormDataChange.emit(t)}),this.host.on("buttonClick",function(t){e.onButtonClick.emit(t)})},t.decorators=[{type:o.Component,args:[{selector:"jqxForm",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:o.ElementRef}]},t.propDecorators={attrPadding:[{type:o.Input,args:["padding"]}],attrBackgroundColor:[{type:o.Input,args:["backgroundColor"]}],attrBorderColor:[{type:o.Input,args:["borderColor"]}],attrValue:[{type:o.Input,args:["value"]}],attrTemplate:[{type:o.Input,args:["template"]}],attrWidth:[{type:o.Input,args:["width"]}],attrHeight:[{type:o.Input,args:["height"]}],autoCreate:[{type:o.Input,args:["auto-create"]}],onFormDataChange:[{type:o.Output}],onButtonClick:[{type:o.Output}]},t}(),r=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{imports:[],declarations:[e],exports:[e]}]}],t}();t.jqxFormComponent=e,t.jqxFormModule=r,Object.defineProperty(t,"__esModule",{value:!0})});