jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
14 lines (13 loc) • 7.07 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxdata');
require('../../jqwidgets/jqxbuttons');
require('../../jqwidgets/jqxscrollbar');
require('../../jqwidgets/jqxlistbox');
require('../../jqwidgets/jqxdropdownlist');
require('../../jqwidgets/jqxdropdownbutton');
require('../../jqwidgets/jqxwindow');
require('../../jqwidgets/jqxeditor');
require('../../jqwidgets/jqxcheckbox');
require('../../jqwidgets/jqxtooltip');
require('../../jqwidgets/jqxcolorpicker');
!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/jqxeditor",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxeditor={}),t.ng.core,t.ng.forms)}(this,function(t,e,o){"use strict";function s(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,r,s=o.call(t),n=[];try{for(;(void 0===e||0<e--)&&!(i=s.next()).done;)n.push(i.value)}catch(h){r={error:h}}finally{try{i&&!i.done&&(o=s["return"])&&o.call(s)}finally{if(r)throw r.error}}return n}var i=function(){},r={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return n}),multi:!0},n=function(){function t(t){this.autoCreate=!0,this.properties=["createCommand","disabled","editable","height","lineBreak","localization","pasteMode","rtl","stylesheets","theme","toolbarPosition","tools","width"],this.onTouchedCallback=i,this.onChangeCallback=i,this.onChange=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),i=!1;if(this[o]!==undefined){if("object"==typeof this[o]){if(this[o]instanceof Array&&(i=this.arraysEqual(this[o],this.host.jqxEditor(this.properties[e]))),i)return!1;this.host.jqxEditor(this.properties[e],this[o]);continue}this[o]!==this.host.jqxEditor(this.properties[e])&&this.host.jqxEditor(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,i=t.classList;0<i.length&&(o=e.classList).add.apply(o,function r(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(i)),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.widgetObject=jqwidgets.createInstance(this.host,"jqxEditor",t),this.host=this.widgetObject.host,this.__wireEvents__())},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.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.jqxEditor("setOptions",t)},t.prototype.createCommand=function(t){if(t===undefined)return this.host.jqxEditor("createCommand");this.host.jqxEditor("createCommand",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxEditor("disabled");this.host.jqxEditor("disabled",t)},t.prototype.editable=function(t){if(t===undefined)return this.host.jqxEditor("editable");this.host.jqxEditor("editable",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxEditor("height");this.host.jqxEditor("height",t)},t.prototype.lineBreak=function(t){if(t===undefined)return this.host.jqxEditor("lineBreak");this.host.jqxEditor("lineBreak",t)},t.prototype.localization=function(t){if(t===undefined)return this.host.jqxEditor("localization");this.host.jqxEditor("localization",t)},t.prototype.pasteMode=function(t){if(t===undefined)return this.host.jqxEditor("pasteMode");this.host.jqxEditor("pasteMode",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxEditor("rtl");this.host.jqxEditor("rtl",t)},t.prototype.stylesheets=function(t){if(t===undefined)return this.host.jqxEditor("stylesheets");this.host.jqxEditor("stylesheets",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxEditor("theme");this.host.jqxEditor("theme",t)},t.prototype.toolbarPosition=function(t){if(t===undefined)return this.host.jqxEditor("toolbarPosition");this.host.jqxEditor("toolbarPosition",t)},t.prototype.tools=function(t){if(t===undefined)return this.host.jqxEditor("tools");this.host.jqxEditor("tools",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxEditor("width");this.host.jqxEditor("width",t)},t.prototype.destroy=function(){this.host.jqxEditor("destroy")},t.prototype.focus=function(){this.host.jqxEditor("focus")},t.prototype.print=function(){this.host.jqxEditor("print")},t.prototype.setMode=function(t){this.host.jqxEditor("setMode",t)},t.prototype.val=function(t){return t!==undefined?this.host.jqxEditor("val",t):this.host.jqxEditor("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("change",function(t){e.onChange.emit(t),e.onChangeCallback(e.host.val())})},t.decorators=[{type:e.Component,args:[{selector:"jqxEditor",template:"<div><ng-content></ng-content></div>",providers:[r],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrCreateCommand:[{type:e.Input,args:["createCommand"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrEditable:[{type:e.Input,args:["editable"]}],attrLineBreak:[{type:e.Input,args:["lineBreak"]}],attrLocalization:[{type:e.Input,args:["localization"]}],attrPasteMode:[{type:e.Input,args:["pasteMode"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrStylesheets:[{type:e.Input,args:["stylesheets"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrToolbarPosition:[{type:e.Input,args:["toolbarPosition"]}],attrTools:[{type:e.Input,args:["tools"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onChange:[{type:e.Output}]},t}(),h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.FormsModule],declarations:[n],exports:[n]}]}],t}();t.jqxEditorComponent=n,t.jqxEditorModule=h,Object.defineProperty(t,"__esModule",{value:!0})});