@syncfusion/ej2-inplace-editor
Version:
A package of Essential JS 2 Inplace editor components, which is used to edit and update the value dynamically in server.
12 lines (11 loc) • 45.7 kB
JavaScript
/*!
* filename: ej2-inplace-editor.umd.min.js
* version : 30.2.4
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-calendars"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-dropdowns"),require("@syncfusion/ej2-richtexteditor")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-data","@syncfusion/ej2-buttons","@syncfusion/ej2-calendars","@syncfusion/ej2-popups","@syncfusion/ej2-inputs","@syncfusion/ej2-dropdowns","@syncfusion/ej2-richtexteditor"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Data,e.ej2Buttons,e.ej2Calendars,e.ej2Popups,e.ej2Inputs,e.ej2Dropdowns,e.ej2Richtexteditor)}(this,function(e,a,l,R,i,p,d,o,t){"use strict";var r=new a.Internationalization;function s(e,t,i){if(a.isNullOrUndefined(t)||""===t)return"";switch(e){case"Color":var o=t,n=7<o.length?o.slice(0,-2):o;break;case"Date":s=i.format,n=r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"});break;case"DateRange":var s=i.format,o=t;n=r.formatDate(o[0],{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"})+" - "+r.formatDate(o[1],{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"});break;case"DateTime":s=i.format,n=a.isNullOrUndefined(s)||""===s?r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"})+" "+r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"t":"hm"}):r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"});break;case"Time":s=i.format,n=r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"t":"hm"});break;case"Numeric":s=a.isNullOrUndefined(i.format)?"n2":i.format;o=a.isNullOrUndefined(t)?null:"number"==typeof t?t:r.parseNumber(t);n=r.formatNumber(o,{format:s});break;default:n=t.toString()}return n}function A(e,t){return a.isNullOrUndefined(t)||""===t||("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof t?"DateRange"===e&&("object"==typeof t&&"string"==typeof t[0]?t=[new Date(t[0]),new Date(t[1])]:"string"==typeof t&&(e=t.split("-"),t=[new Date(e[0]),new Date(e[1])])):t=new Date(t)),t}function L(e){for(var t=[],i=e.length-1;0<=i;i--)t.unshift(["&#",e[i].charCodeAt(0),";"].join(""));return t.join("")}var I,n,h="render",c="update",u="destroy",m="set-focus",y="access-value",f="destroy-modules",U="show-popup",W=(I=function(e,t){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}I(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),z=function(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(s<3?n(r):3<s?n(t,i,r):n(t,i))||r);return 3<s&&r&&Object.defineProperty(t,i,r),r},W=(n=a.ChildProperty,W(_,n),z([a.Property("")],_.prototype,"title",void 0),z([a.Property(null)],_.prototype,"model",void 0),_);function _(){return null!==n&&n.apply(this,arguments)||this}var K,q,F={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},Q={Click:{editAreaClick:"Click to edit"},DblClick:{editAreaDoubleClick:"Double click to edit"},EditIconClick:{editAreaClick:"Click to edit"}},Y="e-inplaceeditor",G="e-inplaceeditor-tip",$="e-editable-value-wrapper",J="e-editable-value",X="e-editable-overlay-icon",Z="e-editable-tip-title",ee="e-editable-title",te="e-editable-inline",ie="e-editable-popup",oe="e-editable-wrapper",ne="e-editable-loading",se="e-editable-form",re="e-component-group",v="e-editable-component",ae="e-editable-action-buttons",le="e-editable-error",b="e-editable-elements",E="e-editable-open",pe="e-btn-save",de="e-btn-cancel",he="e-rte-spin-wrap",ce="e-control-overlay",O="e-disable",ue="e-icons",me="e-primary",ye="e-show",g="e-hide",fe="e-rtl",C="e-error",w="e-loading",z=(K=function(e,t){return(K=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}K(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),j=function(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(s<3?n(r):3<s?n(t,i,r):n(t,i))||r);return 3<s&&r&&Object.defineProperty(t,i,r),r},z=(q=a.Component,z(k,q),k.prototype.initializeValue=function(){this.initRender=!0,this.isTemplate=!1,this.isVue=!1,this.isExtModule=!1,this.submitBtn=void 0,this.cancelBtn=void 0,this.isClearTarget=!1,this.btnElements=void 0,this.dataManager=void 0,this.oldValue=void 0,this.divComponents=["RTE","Slider"],this.clearComponents=["AutoComplete","Mask","Text"],this.dateType=["Date","DateTime","Time"],this.inputDataEle=["Date","DateTime","DateRange","Time","Numeric"],this.dropDownEle=["AutoComplete","ComboBox","DropDownList","MultiSelect"],this.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"]},k.prototype.preRender=function(){this.initializeValue(),this.onScrollResizeHandler=this.scrollResizeHandler.bind(this),a.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:ee}),!a.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.afterOpenEvent=this.popupSettings.model.afterOpen)},k.prototype.render=function(){a.isNullOrUndefined(this.element.getAttribute("tabindex"))&&(this.disabled?this.element.setAttribute("tabindex","-1"):this.element.setAttribute("tabindex","0")),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):this.renderInitialValue(),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode,!0),this.setClass("add",this.cssClass),this.renderComplete()},k.prototype.setClass=function(e,t){if(!this.isEmpty(t))for(var i=t.split(" "),o=0;o<i.length;o++)""!==i[o].trim()&&("add"===e?a.addClass([this.element],[i[o]]):a.removeClass([this.element],[i[o]]))},k.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:$}),a.isBlazor()||(this.element.innerHTML=""),this.valueEle=this.createElement("span",{className:J}),this.editIcon=this.createElement("span",{className:X+" "+ue,attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},k.prototype.renderInitialValue=function(){!(-1<["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type))||a.isNullOrUndefined(this.value)||this.isEmpty(this.value.toString())||a.isNullOrUndefined(this.model.fields)||a.isNullOrUndefined(this.model.dataSource)?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):(this.renderValue(this.getLocale({loadingText:"Loading..."},"loadingText")),this.valueWrap.classList.add(w),p.createSpinner({target:this.valueWrap,width:10}),p.showSpinner(this.valueWrap),this.getInitFieldMapValue())},k.prototype.getInitFieldMapValue=function(){var t=this,e=this.model,i=e.fields.text,o=e.fields.value,n=a.isNullOrUndefined(e.query)?new l.Query:e.query;e.dataSource instanceof l.DataManager?e.dataSource.executeQuery(this.getInitQuery(e,n)).then(function(e){t.updateInitValue(i,o,e.result)}):this.updateInitValue(i,o,new l.DataManager(e.dataSource).executeLocal(this.getInitQuery(e,n)))},k.prototype.getInitQuery=function(e,t){var i=e.fields.value,e=this.value;if("MultiSelect"!==this.type||"object"!=typeof this.value)a=new l.Predicate(i,"equal",this.value);else for(var o=0,n=0,s=e;n<s.length;n++){var r=s[n],a=0===o?new l.Predicate(i,"equal",r):a.or(i,"equal",r);o++}return t.where(a)},k.prototype.updateInitValue=function(e,t,i){if(!(i.length<=0)){if(1===i.length)this.valueEle.innerHTML=this.checkValue(a.getValue(a.isNullOrUndefined(e)?t:e,i[0]));else{for(var o=[],n=0,s=i;n<s.length;n++){var r=s[n];o.push(a.getValue(a.isNullOrUndefined(e)?t:e,r))}this.valueEle.innerHTML=this.checkValue(o.toString())}p.hideSpinner(this.valueWrap),this.valueWrap.classList.remove(w)}},k.prototype.renderValue=function(e){this.enableHtmlSanitizer&&"RTE"!==this.type&&"MultiSelect"!==this.type?this.valueEle.innerText=e:this.valueEle.innerHTML=this.enableHtmlParse?e:L(e),"Color"===this.type&&a.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&this.isEditorOpen()&&a.removeClass([this.valueWrap],[g])},k.prototype.isEditorOpen=function(){return!(this.isVue&&(this.enableEditMode||!(a.isNullOrUndefined(this.valueWrap)||this.valueWrap.classList.contains(g)||this.valueWrap.classList.contains("e-tooltip"))))},k.prototype.renderEditor=function(){var e,t,i;this.prevValue=this.value,this.beginEditArgs={mode:this.mode,cancelFocus:!1,cancel:!1},this.trigger("beginEdit",this.beginEditArgs),this.beginEditArgs.cancel||(e=void 0,t=a.select("."+$,this.element),"EditIconClick"!==this.editableOn&&t.parentElement.removeAttribute("title"),this.valueWrap.classList.contains(E))||("Inline"===this.mode?(a.addClass([this.valueWrap],[g]),this.inlineWrapper=this.createElement("div",{className:te}),this.element.appendChild(this.inlineWrapper),-1<["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)?this.checkRemoteData(this.model):this.renderAndOpen()):(!a.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.popupSettings.model.afterOpen=this.afterOpenHandler.bind(this)),i=this.createElement("div",{className:ie}),this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,i.appendChild(this.titleEle)),e={content:i,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:G,afterOpen:this.afterOpenHandler.bind(this)},i.appendChild(this.renderControl(document.body)),a.extend(e,this.popupSettings.model,e,!0),this.tipObj=new p.Tooltip(e),this.tipObj.appendTo(t),this.tipObj.open(t)),"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),a.addClass([this.valueWrap],[E]),this.setProperties({enableEditMode:!0},!0),this.isReact&&this.renderReactTemplates())},k.prototype.renderAndOpen=function(){this.renderControl(this.inlineWrapper),this.afterOpenHandler(null)},k.prototype.checkRemoteData=function(e){var t=this;e.dataSource instanceof l.DataManager?(e.dataBound=function(){t.afterOpenHandler(null)},this.renderControl(this.inlineWrapper),(a.isNullOrUndefined(e.value)&&a.isNullOrUndefined(this.value)||e.value===this.value&&!a.isNullOrUndefined(e.value)&&0===e.value.length)&&this.showDropDownPopup()):this.renderAndOpen()},k.prototype.showDropDownPopup=function(){"DropDownList"===this.type?(this.model.allowFiltering||this.componentObj.focusIn(),this.componentObj.showPopup()):this.isExtModule&&this.notify("MultiSelect"===this.type?m:U,{})},k.prototype.setAttribute=function(t,e){var i=this.name&&0!==this.name.length?this.name:this.element.id;e.forEach(function(e){t.setAttribute(e,"id"===e?i+"_editor":i)})},k.prototype.renderControl=function(e){this.containerEle=this.createElement("div",{className:oe}),this.loader=this.createElement("div",{className:ne}),this.formEle=this.createElement("form",{className:se});var t,i=this.createElement("div",{className:re}),o=this.createElement("div",{className:v});return e.appendChild(this.containerEle),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(-1<Array.prototype.indexOf.call(this.divComponents,this.type)?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t),o.appendChild(this.loader)),i.appendChild(o),i.appendChild(this.createElement("div",{className:le})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},k.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},k.prototype.renderButtons=function(){var e=this.createElement("div",{className:ae}),t=a.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" "+me;return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:pe+t}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:de}),e},k.prototype.createButtons=function(e){var t,i=void 0;return 0<Object.keys(e.model).length&&(t=this.createElement("button",{className:e.className,attrs:{type:e.type,title:"save"==e.constant?a.isNullOrUndefined(this.saveButton.content)?this.getLocale(e.title,e.constant):this.saveButton.content:a.isNullOrUndefined(this.cancelButton.content)?this.getLocale(e.title,e.constant):this.cancelButton.content}}),e.container.appendChild(t),i=new R.Button(e.model,t)),i},k.prototype.renderComponent=function(e){var t;if(this.isExtModule=-1<Array.prototype.indexOf.call(this.moduleList,this.type),t=a.isNullOrUndefined(this.model.cssClass)?b:this.model.cssClass.indexOf(b)<0?""===this.model.cssClass?b:this.model.cssClass+" "+b:this.model.cssClass,a.extend(this.model,this.model,{cssClass:t,enableRtl:this.enableRtl,locale:this.locale,change:this.changeHandler.bind(this)}),a.isNullOrUndefined(this.value)||this.updateModelValue(!1),this.isExtModule)this.notify(h,{module:F[this.type],target:e,type:this.type});else{switch(a.isNullOrUndefined(this.model.showClearButton)&&!a.isBlazor()&&(this.model.showClearButton=!0),this.type){case"Date":this.componentObj=new i.DatePicker(this.model);break;case"DateTime":this.componentObj=new i.DateTimePicker(this.model);break;case"DropDownList":this.componentObj=new o.DropDownList(this.model);break;case"Mask":this.componentObj=new d.MaskedTextBox(this.model);break;case"Numeric":this.model.value&&(new RegExp("[eE][-+]?([0-9]+)").test(this.model.value)?this.model.value=this.model.value:this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"")),this.componentObj=new d.NumericTextBox(this.model);break;case"Text":this.componentObj=new d.TextBox(this.model)}this.componentObj.appendTo(e)}},k.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new l.UrlAdaptor;break;case"WebApiAdaptor":this.dataAdaptor=new l.WebApiAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new l.ODataV4Adaptor}},k.prototype.loadSpinner=function(e){a.addClass([this.loader],[ye]),"validate"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type?this.spinObj={target:this.loader,width:a.Browser.isDevice?"16px":"14px"}:(a.addClass([this.loader],[he]),a.addClass([this.getEditElement()],[ce]),this.spinObj={target:this.loader}),this.formEle&&a.addClass([this.formEle],[w]),this.btnElements&&a.addClass([this.btnElements],[g]),a.setStyleAttribute(this.loader,{width:"100%"}),p.createSpinner(this.spinObj),p.showSpinner(this.spinObj.target)},k.prototype.removeSpinner=function(e){this.loader.removeAttribute("style"),p.hideSpinner(this.spinObj.target),a.detach(this.spinObj.target.firstChild),"submit"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type||(a.removeClass([this.loader],[he]),a.removeClass([this.getEditElement()],[ce])),this.formEle&&a.removeClass([this.formEle],[w]),this.btnElements&&a.removeClass([this.btnElements],[g]),a.removeClass([this.loader],[ye])},k.prototype.getEditElement=function(){return a.select("."+b,this.formEle)},k.prototype.getLocale=function(e,t){return new a.L10n("inplace-editor",e,this.locale).getConstant(t)},k.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},k.prototype.extendModelValue=function(e){var t=this.model;a.extend(t,{value:e}),this.setProperties({model:t},!0)},k.prototype.updateValue=function(){this.oldValue=this.value,this.enableHtmlSanitizer&&"string"==typeof this.value&&(this.oldValue=this.sanitizeHelper(this.value)),a.isNullOrUndefined(this.value)||(this.setProperties({value:A(this.type,this.oldValue)},!0),this.extendModelValue(A(this.type,this.oldValue)))},k.prototype.updateModelValue=function(e){"MultiSelect"!==this.type||this.isEmpty(this.value)?this.model.value=e?this.oldValue:this.value:this.model.value=(e?this.oldValue:this.value).slice()},k.prototype.setValue=function(){this.isExtModule?this.notify(c,{type:this.type}):this.componentObj&&("Numeric"===this.type&&null===this.componentObj.value&&this.componentObj.setProperties({value:null},!0),this.setProperties({value:this.componentObj.value},!0),this.extendModelValue(this.componentObj.value))},k.prototype.getDropDownsValue=function(e){var t;return-1<Array.prototype.indexOf.call(this.dropDownEle,this.type)&&"MultiSelect"!==this.type?t=e?a.select(".e-"+this.type.toLocaleLowerCase(),this.containerEle).value:this.value.toString():"MultiSelect"===this.type&&(this.notify(y,{type:this.type}),t=e?this.printValue:this.value.join()),t},k.prototype.getSendValue=function(){return this.isEmpty(this.value)?"":-1<Array.prototype.indexOf.call(this.dropDownEle,this.type)?this.getDropDownsValue(!1):-1<Array.prototype.indexOf.call(this.dateType,this.type)?this.value.toISOString():"DateRange"===this.type?this.value[0].toISOString()+" - "+this.value[1].toISOString():this.value.toString()},k.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():-1<Array.prototype.indexOf.call(this.inputDataEle,this.type)?this.componentRoot.value:-1<Array.prototype.indexOf.call(this.dropDownEle,this.type)?this.getDropDownsValue(!0):s(this.type,this.value,this.model)},k.prototype.setRtl=function(e){e?a.addClass([this.element],[fe]):a.removeClass([this.element],[fe])},k.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify(m,{}):"dropdownlist"===this.componentObj.getModuleName()?this.componentObj.focusIn():this.componentObj.element.focus())},k.prototype.removeEditor=function(e){a.isBlazor()&&!this.isStringTemplate&&a.resetBlazorTemplate(this.element.id+"template","Template"),this.tipObj&&this.formEle&&a.closest(this.formEle,"."+G).classList.add(g),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,a.isNullOrUndefined(a.select("."+te,this.element))?this.tipObj&&("MultiSelect"===this.type&&(a.EventHandler.remove(this.containerEle,"mousedown",this.popMouseDown),a.EventHandler.remove(this.containerEle,"click",this.popClickHandler)),this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(a.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,a.removeClass([this.valueWrap],[E,g]),e||this.setProperties({enableEditMode:!1},!0),a.isNullOrUndefined(this.editableOn)||"EditIconClick"===this.editableOn||(e="DblClick"===this.editableOn?"editAreaDoubleClick":"editAreaClick",a.isNullOrUndefined(this.valueWrap.parentElement))||this.valueWrap.parentElement.setAttribute("title",this.getLocale(Q[this.editableOn],e)),this.isReact&&this.clearTemplate()},k.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify(f,{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),a.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},k.prototype.destroyButtons=function(){a.isNullOrUndefined(this.submitBtn)||(a.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),a.EventHandler.remove(this.submitBtn.element,"click",this.submitPrevent),a.EventHandler.remove(this.submitBtn.element,"keydown",this.btnKeyDownHandler),this.submitBtn.destroy(),this.submitBtn=void 0),a.isNullOrUndefined(this.cancelBtn)||(a.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelBtnClick),a.EventHandler.remove(this.cancelBtn.element,"keydown",this.btnKeyDownHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},k.prototype.getQuery=function(t){var i=new l.Query;return Object.keys(t).forEach(function(e){i.addParams(e,t[e])}),i},k.prototype.sendValue=function(){var i=this,e={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};this.trigger("actionBegin",e,function(e){var t;e.cancel?(i.removeSpinner("submit"),"Popup"===i.mode&&i.updateArrow()):(i.isEmpty(i.url)||i.isEmpty(i.primaryKey)||!i.initRender&&(i.initRender||i.prevValue===i.value)?(t={data:{},value:e.data.value},i.triggerSuccess(t)):(i.dataManager=new l.DataManager({url:i.url,adaptor:i.dataAdaptor}),"UrlAdaptor"===i.adaptor?i.dataManager.executeQuery(i.getQuery(e.data),i.successHandler.bind(i),i.failureHandler.bind(i)):i.dataManager.insert(e.data).then(function(e){return i.successHandler(e)}).catch(function(e){return i.failureHandler(e)})),i.dataManager=void 0)})},k.prototype.isEmpty=function(e){return!(!a.isNullOrUndefined(e)&&0!==e.length)},k.prototype.checkIsTemplate=function(){this.isTemplate=!a.isNullOrUndefined(this.template)&&""!==this.template},k.prototype.templateCompile=function(t,e){"string"==typeof e&&(e=e.trim());var i,o=a.compile(e);a.isNullOrUndefined(o)||(i=!(a.isBlazor()&&"function"!=typeof e&&!this.isStringTemplate&&0===e.indexOf("<div>Blazor"))||this.isStringTemplate,i=o({},this,"template",this.element.id+"template",i)),!a.isNullOrUndefined(o)&&0<i.length&&([].slice.call(i).forEach(function(e){t.appendChild(e)}),a.isBlazor())&&!this.isStringTemplate&&"function"!=typeof e&&0===e.indexOf("<div>Blazor")&&a.updateBlazorTemplate(this.element.id+"template","Template",this)},k.prototype.sanitizeHelper=function(t){var i;return this.enableHtmlSanitizer&&(i=a.SanitizeHtmlHelper.beforeSanitize(),a.extend(i,i,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",i,function(e){i.cancel&&!a.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=a.SanitizeHtmlHelper.serializeValue(i,t))})),t},k.prototype.appendTemplate=function(e,t){t="string"==typeof t?this.sanitizeHelper(t):t,this.setProperties({template:t},!0),"function"==typeof t?this.templateCompile(e,t):"string"==typeof t||a.isNullOrUndefined(t.innerHTML)?("."===t[0]||"#"===t[0])&&document.querySelectorAll(t).length?(this.templateEle=document.querySelector(t),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,t):(this.templateEle=t,e.appendChild(this.templateEle))},k.prototype.disable=function(e){e?a.addClass([this.element],[O]):a.removeClass([this.element],[O])},k.prototype.enableEditor=function(e,t){t&&!e||(e?this.renderEditor():this.cancelHandler("cancel"))},k.prototype.checkValidation=function(i,o){var e,t,n,s,r=this;this.validationRules?(t=Object.keys(this.validationRules),n=Object.keys(this.validationRules[t[0]]).length,n="validateHidden"in this.validationRules[t[0]]?n-1:n,s=0,this.formValidate=new d.FormValidator(this.formEle,{rules:this.validationRules,validationBegin:function(e){var t;"RTE"===r.type&&((t=document.createElement("div")).innerHTML=e.value,e.value=t.innerText)},validationComplete:function(t){s+=1,e={errorMessage:t.message,data:{name:r.name,primaryKey:r.primaryKey,value:r.checkValue(r.getSendValue())}},r.trigger("validating",e,function(e){"failure"===t.status?(t.errorElement.innerText=e.errorMessage,r.toggleErrorClass(!0)):r.toggleErrorClass(!1),a.isNullOrUndefined(i)||!i||n!==s&&"failure"!==t.status||(i=!1,r.afterValidation(o),s=0)})},customPlacement:function(e,t){r.formEle&&a.select("."+le,r.formEle).appendChild(t)}}),s=0,this.formValidate.validate()):""!==this.template?(e={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",e,function(e){e.errorMessage?(a.select("."+le,r.formEle).innerHTML=e.errorMessage,r.toggleErrorClass(!0)):r.toggleErrorClass(!1),r.afterValidation(o)})):this.afterValidation(o)},k.prototype.afterValidation=function(e){!this.formEle.classList.contains(C)&&e&&(this.loadSpinner("validate"),"Popup"===this.mode&&this.updateArrow(),this.sendValue())},k.prototype.toggleErrorClass=function(e){var t,i,o;a.isNullOrUndefined(this.formEle)||(t=a.select(".e-input-group",this.formEle),t=[this.formEle,t],i=C,o=e?"add":"remove",[].slice.call(t).forEach(function(e){e&&("add"===o?a.addClass([e],[i]):a.removeClass([e],[i]))}))},k.prototype.updateArrow=function(){var e=this.tipObj.tipPointerPosition;this.tipObj.tipPointerPosition="Middle"===e?"Auto":"Middle",this.tipObj.tipPointerPosition=e,this.tipObj.dataBind()},k.prototype.triggerSuccess=function(e){var t=this,i=e.value;this.trigger("actionSuccess",e,function(e){t.oldValue=i,t.removeSpinner("submit"),e.cancel||t.renderValue(t.checkValue(e.value!==i?e.value:t.getRenderValue())),e.cancel&&"Inline"===t.mode&&a.removeClass([t.valueWrap],[g]),t.removeEditor()})},k.prototype.triggerEndEdit=function(e){var t=this,e={cancel:!1,mode:this.mode,action:e};this.trigger("endEdit",e,function(e){e.cancel||(t.formEle&&t.formEle.classList.contains(C)&&(t.updateModelValue(!0),t.setProperties({value:t.oldValue},!0)),t.removeEditor())})},k.prototype.wireEvents=function(){a.isNullOrUndefined(this.editableOn)||this.wireEditEvent(this.editableOn),a.EventHandler.add(this.editIcon,"click",this.clickHandler,this),a.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),document.addEventListener("scroll",this.onScrollResizeHandler),window.addEventListener("resize",this.onScrollResizeHandler),-1<Array.prototype.indexOf.call(this.clearComponents,this.type)&&a.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},k.prototype.wireDocEvent=function(){a.EventHandler.add(document,"mousedown",this.docClickHandler,this)},k.prototype.wireEditEvent=function(e){"EditIconClick"!==e&&(this.element.setAttribute("title",this.getLocale(Q[e],"Click"===e?"editAreaClick":"editAreaDoubleClick")),a.Browser.isDevice&&a.Browser.isIos&&"DblClick"===e?this.touchModule=new a.Touch(this.valueWrap,{tap:this.doubleTapHandler.bind(this)}):a.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this))},k.prototype.wireEditorKeyDownEvent=function(e){a.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},k.prototype.wireBtnEvents=function(){a.isNullOrUndefined(this.submitBtn)||(a.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),a.EventHandler.add(this.submitBtn.element,"click",this.submitPrevent,this),a.EventHandler.add(this.submitBtn.element,"keydown",this.btnKeyDownHandler,this)),a.isNullOrUndefined(this.cancelBtn)||(a.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelBtnClick,this),a.EventHandler.add(this.cancelBtn.element,"keydown",this.btnKeyDownHandler,this))},k.prototype.cancelBtnClick=function(e){this.cancelHandler("cancel"),this.trigger("cancelClick",e)},k.prototype.unWireEvents=function(){a.isNullOrUndefined(this.editableOn)||this.unWireEditEvent(this.editableOn),a.EventHandler.remove(this.editIcon,"click",this.clickHandler),document.removeEventListener("scroll",this.onScrollResizeHandler),window.removeEventListener("resize",this.onScrollResizeHandler),a.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),-1<Array.prototype.indexOf.call(this.clearComponents,this.type)&&a.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},k.prototype.unWireDocEvent=function(){a.EventHandler.remove(document,"mousedown",this.docClickHandler)},k.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&(this.element.removeAttribute("title"),a.Browser.isDevice&&a.Browser.isIos&&"DblClick"===e?(this.touchModule.destroy(),this.touchModule=void 0):a.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler))},k.prototype.unWireEditorKeyDownEvent=function(e){a.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},k.prototype.submitPrevent=function(e){e.preventDefault()},k.prototype.btnKeyDownHandler=function(e){var t=e.target;(13===e.keyCode&&13===e.which||32===e.keyCode&&32===e.which)&&(t.classList.contains(pe)?this.save():t.classList.contains(de)&&this.cancelHandler("cancel")),9!==e.keyCode||!1!==e.shiftKey||!a.isNullOrUndefined(e.target.nextElementSibling)&&"BUTTON"===e.target.nextElementSibling.tagName||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))},k.prototype.afterOpenHandler=function(e){"Popup"===this.mode&&"MultiSelect"===this.type&&(a.EventHandler.add(this.containerEle,"mousedown",this.popMouseDown,this),a.EventHandler.add(this.containerEle,"click",this.popClickHandler,this)),"Popup"!==this.mode||this.isEmpty(this.titleEle.innerHTML)||e.element.classList.add(Z),"RTE"===this.type?(this.rteModule.refresh(),this.setAttribute(a.select(".e-richtexteditor textarea",this.containerEle),["name"])):"Slider"===this.type&&(this.sliderModule.refresh(),this.setAttribute(a.select(".e-slider-input",this.containerEle),["name"])),this.beginEditArgs.cancelFocus||("Inline"===this.mode&&-1<["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)&&this.model.dataSource instanceof l.DataManager?this.showDropDownPopup():this.setFocus()),this.afterOpenEvent&&(this.tipObj.setProperties({afterOpen:this.afterOpenEvent},!0),this.tipObj.trigger("afterOpen",e))},k.prototype.popMouseDown=function(e){e=e.target.classList;e.contains("e-chips-close")&&!e.contains("e-close-hooker")&&this.updateArrow()},k.prototype.doubleTapHandler=function(e){1<e.tapCount&&this.clickHandler(e.originalEvent)},k.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},k.prototype.submitHandler=function(e){e.preventDefault(),this.save(),this.trigger("submitClick",e)},k.prototype.cancelHandler=function(e){this.triggerEndEdit(e)},k.prototype.popClickHandler=function(e){var t=a.select("."+$,this.element);e.target.classList.contains("e-chips-close")&&this.tipObj.refresh(t)},k.prototype.successHandler=function(e){this.initRender=!1;e={data:e,value:this.getSendValue()};this.triggerSuccess(e)},k.prototype.failureHandler=function(e){var t=this,e={data:e,value:this.getSendValue()};this.trigger("actionFailure",e,function(e){t.removeSpinner("submit"),"Popup"===t.mode&&t.updateArrow()})},k.prototype.enterKeyDownHandler=function(e){a.closest(e.target,"."+v+" .e-richtexteditor")||e.currentTarget.getElementsByTagName("textarea")[0]||(13===e.keyCode&&13===e.which&&a.closest(e.target,"."+v)?(this.save(),this.trigger("submitClick",e)):27===e.keyCode&&27===e.which&&this.cancelHandler("cancel"))},k.prototype.valueKeyDownHandler=function(e){9===e.keyCode&&!0===e.shiftKey&&"BUTTON"!==e.target.tagName&&("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")),13!==e.keyCode||13!==e.which||!e.target.classList.contains(Y)||this.valueWrap.classList.contains(E)||this.element.classList.contains(O)||(e.preventDefault(),this.renderEditor())},k.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},k.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&!a.Browser.isDevice&&this.triggerEndEdit("cancel")},k.prototype.docClickHandler=function(e){var t,i,o,n,e=e.target;this.isClearTarget?this.isClearTarget=!1:(t=a.closest(e,"."+Y),i=a.closest(e,"."+G),o=a.closest(e,"."+b),n=a.closest(e,".e-rte-elements"),!a.isNullOrUndefined(t)&&t.isEqualNode(this.element)||!a.isNullOrUndefined(i)&&this.tipObj&&-1<i.id.indexOf(this.valueWrap.id)||!a.isNullOrUndefined(o)||!a.isNullOrUndefined(n)||e.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")))},k.prototype.changeHandler=function(e){var t={previousValue:void 0===this.compPrevValue?this.value:this.compPrevValue,value:e.value};"AutoComplete"!==this.type&&"ComboBox"!==this.type&&"DropDownList"!==this.type||(t.itemData=e.itemData,t.previousItemData=e.previousItemData),this.compPrevValue=t.value,this.trigger("change",t)},k.prototype.validate=function(){this.checkValidation(!0,!1)},k.prototype.save=function(){var e,t=this;this.formEle&&(this.element.focus(),this.editEle=a.select("."+v,this.formEle),a.select("."+C,this.editEle),this.isTemplate||this.setValue(),e={cancel:!1,mode:this.mode,action:"submit"},this.trigger("endEdit",e,function(e){e.cancel||t.checkValidation(!0,!0)}))},k.prototype.destroy=function(){var t=this;for(this.removeEditor(a.isBlazor()),this.isExtModule&&this.notify(u,{}),this.unWireEvents(),[O,fe].forEach(function(e){a.removeClass([t.element],[e])});this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild);a.isBlazor()&&this.isServerRendered||q.prototype.destroy.call(this),this.isReact&&this.clearTemplate()},k.prototype.getPersistData=function(){return this.addOnPersist(["value"])},k.prototype.requiredModules=function(){var e=[];return-1<Array.prototype.indexOf.call(this.moduleList,this.type)&&e.push({member:F[this.type],args:[this]}),e},k.prototype.getModuleName=function(){return"inplaceeditor"},k.prototype.onPropertyChanged=function(e,t){var i;if(!this.validationRules||!(!a.isNullOrUndefined(this.element.querySelectorAll("."+C))&&0<this.element.querySelectorAll("."+C).length)){this.isEditorOpen()&&((i="enableEditMode"in e)&&t.enableEditMode&&!e.enableEditMode||!i&&this.enableEditMode?this.triggerEndEdit("cancel"):this.removeEditor());for(var o=0,n=Object.keys(e);o<n.length;o++)switch(n[o]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):this.renderInitialValue();break;case"emptyText":"Never"===this.textOption?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):this.renderInitialValue();break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled),e.disabled?this.element.tabIndex=-1:this.element.tabIndex=0;break;case"enableRtl":this.setRtl(e.enableRtl);break;case"cssClass":this.setClass("remove",t.cssClass),this.setClass("add",e.cssClass);break;case"mode":this.enableEditor(this.enableEditMode);break;case"enableEditMode":this.enableEditor(e.enableEditMode);break;case"editableOn":this.unWireEditEvent(t.editableOn),"EditIconClick"!==e.editableOn&&this.wireEditEvent(e.editableOn)}}},j([a.Property("")],k.prototype,"name",void 0),j([a.Property(null)],k.prototype,"value",void 0),j([a.Property("")],k.prototype,"template",void 0),j([a.Property(!0)],k.prototype,"enableHtmlSanitizer",void 0),j([a.Property(!0)],k.prototype,"enableHtmlParse",void 0),j([a.Property("")],k.prototype,"cssClass",void 0),j([a.Property("")],k.prototype,"primaryKey",void 0),j([a.Property("Empty")],k.prototype,"emptyText",void 0),j([a.Property("")],k.prototype,"url",void 0),j([a.Property("Popup")],k.prototype,"mode",void 0),j([a.Property("UrlAdaptor")],k.prototype,"adaptor",void 0),j([a.Property("Text")],k.prototype,"type",void 0),j([a.Property("Click")],k.prototype,"editableOn",void 0),j([a.Property("Never")],k.prototype,"textOption",void 0),j([a.Property("Submit")],k.prototype,"actionOnBlur",void 0),j([a.Property(!1)],k.prototype,"enablePersistence",void 0),j([a.Property(!1)],k.prototype,"disabled",void 0),j([a.Property(!0)],k.prototype,"showButtons",void 0),j([a.Property(!1)],k.prototype,"enableEditMode",void 0),j([a.Property(!0)],k.prototype,"submitOnEnter",void 0),j([a.Complex({},W)],k.prototype,"popupSettings",void 0),j([a.Property(null)],k.prototype,"model",void 0),j([a.Property({iconCss:"e-icons e-save-icon"})],k.prototype,"saveButton",void 0),j([a.Property({iconCss:"e-icons e-cancel-icon"})],k.prototype,"cancelButton",void 0),j([a.Property(null)],k.prototype,"validationRules",void 0),j([a.Event()],k.prototype,"created",void 0),j([a.Event()],k.prototype,"beforeSanitizeHtml",void 0),j([a.Event()],k.prototype,"actionBegin",void 0),j([a.Event()],k.prototype,"actionSuccess",void 0),j([a.Event()],k.prototype,"actionFailure",void 0),j([a.Event()],k.prototype,"validating",void 0),j([a.Event()],k.prototype,"beginEdit",void 0),j([a.Event()],k.prototype,"endEdit",void 0),j([a.Event()],k.prototype,"change",void 0),j([a.Event()],k.prototype,"submitClick",void 0),j([a.Event()],k.prototype,"cancelClick",void 0),j([a.Event()],k.prototype,"destroyed",void 0),j([a.NotifyPropertyChanges],k));function k(e,t){e=q.call(this,e,t)||this;return e.needsID=!0,e}D.prototype.render=function(e){this.module.render(e)},D.prototype.showPopup=function(){this.module.showPopup()},D.prototype.focus=function(){this.module.focus()},D.prototype.update=function(e){this.module.updateValue(e)},D.prototype.getValue=function(){this.module.getRenderValue()},D.prototype.destroyComponent=function(){a.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},D.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},D.prototype.addEventListener=function(){this.parent.on(h,this.render,this),this.parent.on(m,this.focus,this),this.parent.on(U,this.showPopup,this),this.parent.on(c,this.update,this),this.parent.on(y,this.getValue,this),this.parent.on(f,this.destroyComponent,this),this.parent.on(u,this.destroy,this)},D.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(h,this.render),this.parent.off(m,this.focus),this.parent.off(U,this.showPopup),this.parent.off(c,this.update),this.parent.off(y,this.getValue),this.parent.off(f,this.destroyComponent),this.parent.off(u,this.destroy))};var P=D;function D(e,t){this.parent=e,this.module=t,this.addEventListener()}M.prototype.render=function(e){this.compObj=new o.AutoComplete(this.parent.model),this.compObj.appendTo(e.target)},M.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},M.prototype.focus=function(){this.compObj.element.focus()},M.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},M.prototype.destroy=function(){this.base.destroy()},M.prototype.getModuleName=function(){return"auto-complete"};j=M;function M(e){this.compObj=void 0,this.parent=e,(this.parent.atcModule=this).base=new P(this.parent,this)}V.prototype.render=function(e){this.compObj=new d.ColorPicker(this.parent.model),this.compObj.appendTo(e.target)},V.prototype.focus=function(){this.compObj.element.focus()},V.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},V.prototype.destroy=function(){this.base.destroy()},V.prototype.getModuleName=function(){return"color-picker"};var ve=V;function V(e){this.compObj=void 0,this.parent=e,(this.parent.colorModule=this).base=new P(this.parent,this)}S.prototype.render=function(e){this.compObj=new o.ComboBox(this.parent.model),this.compObj.appendTo(e.target)},S.prototype.focus=function(){this.compObj.element.focus()},S.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},S.prototype.destroy=function(){this.base.destroy()},S.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},S.prototype.getModuleName=function(){return"combo-box"};var be=S;function S(e){this.compObj=void 0,this.parent=e,(this.parent.comboBoxModule=this).base=new P(this.parent,this)}T.prototype.render=function(e){this.compObj=new i.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},T.prototype.focus=function(){this.compObj.element.focus()},T.prototype.getModuleName=function(){return"date-range-picker"},T.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},T.prototype.destroy=function(){this.base.destroy()};var Ee=T;function T(e){this.compObj=void 0,this.parent=e,(this.parent.dateRangeModule=this).base=new P(this.parent,this)}var Oe=function(){return(Oe=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},ge=(B.prototype.render=function(e){var t=Oe({},this.parent.model);this.openEvent=t.open,this.closeEvent=t.close,t.open=this.openHandler.bind(this),t.close=this.closeHandler.bind(this),this.compObj=new o.MultiSelect(t),this.compObj.appendTo(e.target)},B.prototype.openHandler=function(e){this.isPopOpen=!0,this.openEvent&&(this.compObj.setProperties({open:this.openEvent},!0),this.compObj.trigger("open",e))},B.prototype.closeHandler=function(e){this.isPopOpen=!1,this.closeEvent&&(this.compObj.setProperties({close:this.closeEvent},!0),this.compObj.trigger("close",e))},B.prototype.focus=function(){var e;this.isPopOpen||((e=document.createEvent("MouseEvent")).initEvent("mousedown",!0,!0),a.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(e))},B.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},B.prototype.getRenderValue=function(){this.parent.printValue=this.compObj.text},B.prototype.destroy=function(){this.base.destroy()},B.prototype.getModuleName=function(){return"multi-select"},B);function B(e){this.isPopOpen=!1,this.compObj=void 0,this.parent=e,(this.parent.multiSelectModule=this).base=new P(this.parent,this)}H.prototype.render=function(e){this.compObj=new t.RichTextEditor(this.parent.model),this.compObj.appendTo(e.target)},H.prototype.focus=function(){this.compObj.focusIn()},H.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&(this.parent.setProperties({value:this.getRteValue()},!0),this.parent.extendModelValue(this.compObj.value))},H.prototype.getRteValue=function(){var e;return"Markdown"===this.compObj.editorMode?""===(e=this.compObj.contentModule.getEditPanel().value)?"":e:"<p><br></p>"===(e=this.compObj.contentModule.getEditPanel().innerHTML)||"<p><br></p>"===e||""===e?"":e},H.prototype.refresh=function(){this.compObj.refresh()},H.prototype.destroy=function(){this.base.destroy()},H.prototype.getModuleName=function(){return"rte"};var Ce=H;function H(e){this.compObj=void 0,t.RichTextEditor.Inject(t.HtmlEditor,t.MarkdownEditor,t.Toolbar,t.Link,t.Image,t.QuickToolbar,t.Table,t.FileManager,t.PasteCleanup,t.EmojiPicker,t.Audio,t.Video,t.FormatPainter,t.Count),this.parent=e,(this.parent.rteModule=this).base=new P(this.parent,this)}N.prototype.render=function(e){this.compObj=new d.Slider(this.parent.model),this.compObj.appendTo(e.target)},N.prototype.focus=function(){this.compObj.element.focus()},N.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},N.prototype.refresh=function(){this.compObj.refresh()},N.prototype.destroy=function(){this.base.destroy()},N.prototype.getModuleName=function(){return"slider"};var we=N;function N(e){this.compObj=void 0,this.parent=e,(this.parent.sliderModule=this).base=new P(this.parent,this)}x.prototype.render=function(e){this.compObj=new i.TimePicker(this.parent.model),this.compObj.appendTo(e.target)},x.prototype.focus=function(){this.compObj.focusIn()},x.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},x.prototype.getModuleName=function(){return"time-picker"},x.prototype.destroy=function(){this.base.destroy()};var je=x;function x(e){this.compObj=void 0,this.parent=e,(this.parent.timeModule=this).base=new P(this.parent,this)}e.AutoComplete=j,e.BTN_CANCEL=de,e.BTN_SAVE=pe,e.BUTTONS=ae,e.Base=P,e.CTRL_GROUP=re,e.CTRL_OVERLAY=ce,e.ColorPicker=ve,e.ComboBox=be,e.DISABLE=O,e.DateRangePicker=Ee,e.EDITABLE_ERROR=le,e.ELEMENTS=b,e.ERROR=C,e.FORM=se,e.HIDE=g,e.ICONS=ue,e.INLINE=te,e.INPUT=v,e.InPlaceEditor=z,e.LOAD=w,e.LOADING=ne,e.MultiSelect=ge,e.OPEN=E,e.OVERLAY_ICON=X,e.POPUP=ie,e.PRIMARY=me,e.PopupSettings=W,e.ROOT=Y,e.ROOT_TIP=G,e.RTE_SPIN_WRAP=he,e.RTL=fe,e.Rte=Ce,e.SHOW=ye,e.Slider=we,e.TIP_TITLE=Z,e.TITLE=ee,e.TimePicker=je,e.VALUE=J,e.VALUE_WRAPPER=$,e.WRAPPER=oe,e.accessValue=y,e.destroy=u,e.destroyModules=f,e.encode=L,e.getCompValue=A,e.localeConstant=Q,e.modulesList=F,e.parseValue=s,e.render=h,e.setFocus=m,e.showPopup=U,e.update=c,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-inplace-editor.umd.min.js.map