Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-inplace-editor

Package Overview
Dependencies
Maintainers
2
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-inplace-editor - npm Package Compare versions

Comparing version 16.4.40-beta to 16.4.42

styles/inplace-editor/icons/_bootstrap-dark.scss

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## 16.4.40-beta (2018-12-10)
### In-place Editor

@@ -7,0 +9,0 @@

4

dist/ej2-inplace-editor.umd.min.js
/*!
* filename: ej2-inplace-editor.umd.min.js
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!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-inputs"),require("@syncfusion/ej2-popups"),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-inputs","@syncfusion/ej2-popups","@syncfusion/ej2-dropdowns","@syncfusion/ej2-richtexteditor"],t):t(e.ej={},e.ej2Base,e.ej2Data,e.ej2Buttons,e.ej2Calendars,e.ej2Inputs,e.ej2Popups,e.ej2Dropdowns,e.ej2Richtexteditor)}(this,function(e,t,i,o,n,s,r,a,l){"use strict";function p(e,i){var o;if(t.isNullOrUndefined(i)||""===i)return"";switch("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof i||(i=new Date(i)),"DateRange"===e&&"object"==typeof i&&"string"==typeof i[0]&&(i=[new Date(i[0]),new Date(i[1])]),e){case"Color":var n=i;o=n.length>7?n.slice(0,-2):n;break;case"Date":o=i.toLocaleDateString();break;case"DateRange":o=i[0].toLocaleDateString()+" - "+i[1].toLocaleDateString();break;case"DateTime":o=i.toLocaleString().replace(/(.*)\D\d+/,"$1");break;case"Time":o=i.toLocaleTimeString().replace(/(.*)\D\d+/,"$1");break;default:o=i.toString()}return o}var d="render",h="update",c="destroy",u="set-focus",m="destroy-modules",y=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),f=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},v=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return y(i,e),f([t.Property("")],i.prototype,"title",void 0),f([t.Property(null)],i.prototype,"model",void 0),i}(t.ChildProperty),b={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},E="e-inplaceeditor",O="e-inplaceeditor-tip",g="e-editable-value-wrapper",C="e-editable-value",j="e-editable-overlay-icon",w="e-editable-title",k="e-editable-inline",P="e-editable-popup",B="e-editable-wrapper",T="e-editable-loading",R="e-editable-form",N="e-component-group",M="e-editable-component",H="e-editable-action-buttons",S="e-editable-error",D="e-editable-elements",V="e-editable-open",x="e-btn-save",L="e-btn-cancel",A="e-overlay",W="e-show",I="e-hide",U="e-rtl",_="e-error",K=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),q=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},F=function(e){function l(t,i){var o=e.call(this,t,i)||this;return o.initRender=!0,o.isTemplate=!1,o.isExtModule=!1,o.submitBtn=void 0,o.cancelBtn=void 0,o.isClearTarget=!1,o.btnElements=void 0,o.dataManager=void 0,o.divComponents=["RTE","Slider"],o.clearComponents=["AutoComplete","Mask","Text"],o.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"],o.needsID=!0,o}return K(l,e),l.prototype.preRender=function(){t.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:w})},l.prototype.render=function(){this.element.setAttribute("tabindex","0"),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.renderValue(this.checkValue(p(this.type,this.value))),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(),this.setClass("add",this.cssClass)},l.prototype.setClass=function(e,i){this.isEmpty(i)||("add"===e?t.addClass([this.element],[i]):t.removeClass([this.element],[i]))},l.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:g}),this.element.innerHTML="",this.valueEle=this.createElement("span",{className:C}),this.editIcon=this.createElement("span",{className:j+" e-icons",attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},l.prototype.renderValue=function(e){this.valueEle.innerHTML=e,"Color"===this.type&&t.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&t.removeClass([this.valueWrap],[I])},l.prototype.renderEditor=function(){var e=void 0,i=t.select("."+g,this.element);if(!this.valueWrap.classList.contains(V)){if("Inline"===this.mode)this.loaderWidth=this.valueWrap.offsetWidth,t.addClass([this.valueWrap],[I]),this.inlineWrapper=this.createElement("div",{className:k}),this.element.appendChild(this.inlineWrapper),this.renderControl(this.inlineWrapper),this.afterOpenHandler();else{var o=this.createElement("div",{className:P});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),e={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:O,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),t.extend(e,this.popupSettings.model,e,!0),this.tipObj=new r.Tooltip(e),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),this.initRender=!1,t.addClass([this.valueWrap],[V])}},l.prototype.setAttribute=function(e,t){var i=this.name&&0!==this.name.length?this.name:this.element.id;t.forEach(function(t){e.setAttribute(t,i)})},l.prototype.renderControl=function(e){var t;this.containerEle=this.createElement("div",{className:B}),this.loader=this.createElement("div",{className:T}),this.formEle=this.createElement("form",{className:R});var i=this.createElement("div",{className:N}),o=this.createElement("div",{className:M});return e.appendChild(this.containerEle),this.containerEle.appendChild(this.loader),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(Array.prototype.indexOf.call(this.divComponents,this.type)>-1?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t)),i.appendChild(o),i.appendChild(this.createElement("div",{className:S})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},l.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},l.prototype.renderButtons=function(){var e=this.createElement("div",{className:H}),i=t.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" e-primary";return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:x+i}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:L}),e},l.prototype.createButtons=function(e){var t=void 0;if(Object.keys(e.model).length>0){var i=this.createElement("button",{className:e.className,attrs:{type:e.type,title:this.getLocale(e.title,e.constant)}});e.container.appendChild(i),t=new o.Button(e.model,i)}return t},l.prototype.renderComponent=function(e){if(this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1,t.extend(this.model,this.model,{cssClass:D}),this.model.value=this.value,this.isExtModule)this.notify(d,{module:b[this.type],target:e,type:this.type});else switch(this.model.showClearButton=!0,this.type){case"Date":this.componentObj=new n.DatePicker(this.model,e);break;case"DateTime":this.componentObj=new n.DateTimePicker(this.model,e);break;case"DropDownList":this.componentObj=new a.DropDownList(this.model,e);break;case"Mask":this.componentObj=new s.MaskedTextBox(this.model,e);break;case"Numeric":if(this.model.value){var i=this.model.value.toString().replace(/[`~!@#$%^&*()_|+\-=?;:'",<>\{\}\[\]\\\/]/gi,"");this.model.value=parseInt(i,10)}this.componentObj=new s.NumericTextBox(this.model,e);break;case"Text":this.componentObj=new s.TextBox(this.model,e)}},l.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new i.UrlAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new i.ODataV4Adaptor}},l.prototype.loadSpinner=function(){t.addClass([this.loader],[W]),t.setStyleAttribute(this.loader,{width:this.loaderWidth+"px"}),this.spinObj={target:this.loader},r.createSpinner(this.spinObj),r.showSpinner(this.spinObj.target),this.formEle&&t.addClass([this.formEle],[I])},l.prototype.removeSpinner=function(){this.loader.removeAttribute("style"),r.hideSpinner(this.spinObj.target),t.detach(this.spinObj.target.firstChild),this.formEle&&t.removeClass([this.formEle],[I]),t.removeClass([this.loader],[W])},l.prototype.getLocale=function(e,i){return new t.L10n("inplace-editor",e,this.locale).getConstant(i)},l.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},l.prototype.setValue=function(){this.isExtModule?this.notify(h,{type:this.type}):this.componentObj&&this.setProperties({value:this.componentObj.value},!0)},l.prototype.getSendValue=function(){return"Mask"===this.type||"Numeric"===this.type?this.value:this.checkValue(p(this.type,this.value))},l.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():"Numeric"===this.type?this.componentRoot.value:p(this.type,this.value)},l.prototype.setRtl=function(e){e?t.addClass([this.element],[U]):t.removeClass([this.element],[U])},l.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify(u,{}):this.componentObj.element.focus())},l.prototype.removeEditor=function(){this.tipObj&&this.formEle&&t.closest(this.formEle,"."+O).classList.add(I),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,t.isNullOrUndefined(t.select("."+k,this.element))?this.tipObj&&(this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(t.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,t.removeClass([this.valueWrap],[V,I])},l.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify(m,{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),t.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},l.prototype.destroyButtons=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),this.submitBtn.destroy(),this.submitBtn=void 0),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},l.prototype.getQuery=function(e){var t=new i.Query;return Object.keys(e).forEach(function(i){t.addParams(i,e[i])}),t},l.prototype.sendValue=function(){var e={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};if(this.trigger("actionBegin",e),this.isEmpty(this.url)||this.isEmpty(this.primaryKey)){var t={data:{},value:this.getSendValue()};this.triggerSuccess(t)}else this.dataManager=new i.DataManager({url:this.url,adaptor:this.dataAdaptor}),this.dataManager.executeQuery(this.getQuery(e.data),this.successHandler.bind(this),this.failureHandler.bind(this));this.dataManager=void 0},l.prototype.isEmpty=function(e){return!(!t.isNullOrUndefined(e)&&0!==e.length)},l.prototype.checkIsTemplate=function(){this.isTemplate=!t.isNullOrUndefined(this.template)&&""!==this.template},l.prototype.templateCompile=function(e,i){var o;"string"==typeof i&&(i=i.trim());var n=t.compile(i);t.isNullOrUndefined(n)||(o=n({},this,"template")),!t.isNullOrUndefined(n)&&o.length>0&&[].slice.call(o).forEach(function(t){e.appendChild(t)})},l.prototype.appendTemplate=function(e,i){"string"==typeof i||t.isNullOrUndefined(i.innerHTML)?("."===i[0]||"#"===i[0])&&document.querySelectorAll(i).length?(this.templateEle=document.querySelector(i),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,i):(this.templateEle=i,e.appendChild(this.templateEle))},l.prototype.disable=function(e){e?t.addClass([this.element],[A]):t.removeClass([this.element],[A])},l.prototype.enableEditor=function(){this.enableEditMode&&this.renderEditor()},l.prototype.checkValidation=function(){var e,i=this;this.validationRules?(this.formValidate=new s.FormValidator(this.formEle,{rules:this.validationRules,validationComplete:function(t){e={errorMessage:t.message,data:{name:i.name,primaryKey:i.primaryKey,value:i.checkValue(i.getSendValue())}},i.trigger("validating",e),"failure"===t.status?(t.errorElement.innerText=e.errorMessage,i.toggleErrorClass(!0)):i.toggleErrorClass(!1)},customPlacement:function(e,o){t.select("."+S,i.formEle).appendChild(o)}}),this.formValidate.validate()):(e={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",e),e.errorMessage&&"Empty"===e.data.value?(t.select("."+S,this.formEle).innerHTML=e.errorMessage,this.toggleErrorClass(!0)):this.toggleErrorClass(!1))},l.prototype.toggleErrorClass=function(e){if(!t.isNullOrUndefined(this.formEle)){var i=t.select(".e-input-group",this.formEle);!function(e,i,o){[].slice.call(e).forEach(function(e){e&&("add"===o?t.addClass([e],[i]):t.removeClass([e],[i]))})}([this.formEle,i],_,e?"add":"remove")}},l.prototype.hideForm=function(e){t.isNullOrUndefined(this.formEle)||(e?t.addClass([this.formEle],[I]):t.removeClass([this.formEle],[I]))},l.prototype.triggerSuccess=function(e){var t=e.value;this.trigger("actionSuccess",e),this.removeSpinner(),this.hideForm(!1),this.renderValue(this.checkValue(e.value!==t?e.value:this.getRenderValue())),this.removeEditor()},l.prototype.wireEvents=function(){this.wireEditEvent(this.editableOn),t.EventHandler.add(this.editIcon,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),t.EventHandler.add(document,"scroll",this.scrollResizeHandler,this),window.addEventListener("resize",this.scrollResizeHandler.bind(this)),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},l.prototype.wireDocEvent=function(){t.EventHandler.add(document,"mousedown",this.docClickHandler,this)},l.prototype.wireEditEvent=function(e){t.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this)},l.prototype.wireEditorKeyDownEvent=function(e){t.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},l.prototype.wireBtnEvents=function(){t.isNullOrUndefined(this.submitBtn)||t.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),t.isNullOrUndefined(this.cancelBtn)||t.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelHandler,this)},l.prototype.unWireEvents=function(){this.unWireEditEvent(this.editableOn),t.EventHandler.remove(this.editIcon,"click",this.clickHandler),t.EventHandler.remove(document,"scroll",this.scrollResizeHandler),window.removeEventListener("resize",this.scrollResizeHandler.bind(this)),t.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},l.prototype.unWireDocEvent=function(){t.EventHandler.remove(document,"mousedown",this.docClickHandler)},l.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&t.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler)},l.prototype.unWireEditorKeyDownEvent=function(e){t.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},l.prototype.afterOpenHandler=function(){"RTE"===this.type?this.rteModule.refresh():"Slider"===this.type&&this.sliderModule.refresh(),this.setFocus()},l.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},l.prototype.submitHandler=function(e){e.preventDefault(),this.save()},l.prototype.cancelHandler=function(){this.removeEditor()},l.prototype.successHandler=function(e){var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},l.prototype.failureHandler=function(e){var t={data:e,value:this.getSendValue()};this.trigger("actionFailure",t),this.removeSpinner(),this.hideForm(!1)},l.prototype.enterKeyDownHandler=function(e){(13===e.keyCode&&13===e.which||27===e.keyCode&&27===e.which)&&this.save()},l.prototype.valueKeyDownHandler=function(e){13===e.keyCode&&13===e.which&&e.target.classList.contains(E)&&!this.valueWrap.classList.contains(V)&&(e.preventDefault(),this.renderEditor())},l.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},l.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&this.removeEditor()},l.prototype.docClickHandler=function(e){var i=e.target;if(this.isClearTarget)this.isClearTarget=!1;else{var o=t.closest(i,"."+E),n=t.closest(i,"."+O),s=t.closest(i,"."+D),r=t.closest(i,".e-rte-elements");!t.isNullOrUndefined(o)&&o.isEqualNode(this.element)||!t.isNullOrUndefined(n)&&this.tipObj&&n.id.indexOf(this.valueWrap.id)>-1||!t.isNullOrUndefined(s)||!t.isNullOrUndefined(r)||i.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler())}},l.prototype.validate=function(){this.checkValidation()},l.prototype.save=function(){this.element.focus(),this.isTemplate||this.setValue(),this.checkValidation(),this.formEle.classList.contains(_)||(this.loadSpinner(),this.hideForm(!0),this.sendValue())},l.prototype.destroy=function(){var i=this;this.removeEditor(),this.isExtModule&&this.notify(c,{}),this.unWireEvents();for([E,A,U].forEach(function(e){t.removeClass([i.element],[e])});this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.prototype.destroy.call(this)},l.prototype.getPersistData=function(){return this.addOnPersist(["value"])},l.prototype.requiredModules=function(){var e=[];return e.push({member:b[this.type],args:[this]}),e},l.prototype.getModuleName=function(){return"inplaceeditor"},l.prototype.onPropertyChanged=function(e,t){this.removeEditor();for(var i=0,o=Object.keys(e);i<o.length;i++){switch(o[i]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":case"emptyText":this.renderValue(this.checkValue(p(this.type,this.value)));break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled);break;case"enableRtl":this.setRtl(e.enableRtl);break;case"cssClass":this.setClass("remove",t.cssClass),this.setClass("add",e.cssClass);break;case"mode":case"enableEditMode":this.enableEditor();break;case"editableOn":this.unWireEditEvent(t.editableOn),"EditIconClick"!==e.editableOn&&this.wireEditEvent(e.editableOn)}}},q([t.Property("")],l.prototype,"name",void 0),q([t.Property(null)],l.prototype,"value",void 0),q([t.Property("")],l.prototype,"template",void 0),q([t.Property("")],l.prototype,"cssClass",void 0),q([t.Property("")],l.prototype,"primaryKey",void 0),q([t.Property("Empty")],l.prototype,"emptyText",void 0),q([t.Property("")],l.prototype,"url",void 0),q([t.Property("Popup")],l.prototype,"mode",void 0),q([t.Property("UrlAdaptor")],l.prototype,"adaptor",void 0),q([t.Property("Text")],l.prototype,"type",void 0),q([t.Property("Click")],l.prototype,"editableOn",void 0),q([t.Property("Submit")],l.prototype,"actionOnBlur",void 0),q([t.Property(!1)],l.prototype,"enableRtl",void 0),q([t.Property(!1)],l.prototype,"enablePersistence",void 0),q([t.Property(!1)],l.prototype,"disabled",void 0),q([t.Property(!0)],l.prototype,"showButtons",void 0),q([t.Property(!1)],l.prototype,"enableEditMode",void 0),q([t.Property(!0)],l.prototype,"submitOnEnter",void 0),q([t.Complex({},v)],l.prototype,"popupSettings",void 0),q([t.Property(null)],l.prototype,"model",void 0),q([t.Property({iconCss:"e-icons e-save-icon"})],l.prototype,"saveButton",void 0),q([t.Property({iconCss:"e-icons e-cancel-icon"})],l.prototype,"cancelButton",void 0),q([t.Property(null)],l.prototype,"validationRules",void 0),q([t.Event()],l.prototype,"created",void 0),q([t.Event()],l.prototype,"actionBegin",void 0),q([t.Event()],l.prototype,"actionSuccess",void 0),q([t.Event()],l.prototype,"actionFailure",void 0),q([t.Event()],l.prototype,"validating",void 0),q([t.Event()],l.prototype,"destroyed",void 0),l=q([t.NotifyPropertyChanges],l)}(t.Component),z=function(){function e(e,t){this.parent=e,this.module=t,this.addEventListener()}return e.prototype.render=function(e){this.module.render(e)},e.prototype.focus=function(){this.module.focus()},e.prototype.update=function(e){this.module.updateValue(e)},e.prototype.destroyComponent=function(){t.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},e.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on(d,this.render,this),this.parent.on(u,this.focus,this),this.parent.on(h,this.update,this),this.parent.on(m,this.destroyComponent,this),this.parent.on(c,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(d,this.render),this.parent.off(u,this.focus),this.parent.off(h,this.update),this.parent.off(m,this.destroyComponent),this.parent.off(c,this.destroy))},e}(),Q=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.AutoComplete(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),Y=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.ColorPicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),$=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.ComboBox(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"combo-box"},e}(),G=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"date-range-picker"},e}(),J=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.MultiSelect(this.parent.model,e.target)},e.prototype.focus=function(){t.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(new MouseEvent("mousedown"))},e.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"multi-select"},e}();l.RichTextEditor.Inject(l.HtmlEditor,l.MarkdownEditor,l.Toolbar,l.Link,l.Image,l.QuickToolbar,l.Table);var X=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.rteModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.compObj=new l.RichTextEditor(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),Z=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.Slider(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&this.parent.setProperties({value:this.compObj.value.toString()},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),ee=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new z(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.TimePicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"time-picker"},e}();e.parseValue=p,e.render=d,e.update=h,e.destroy=c,e.setFocus=u,e.destroyModules=m,e.PopupSettings=v,e.modulesList=b,e.ROOT=E,e.ROOT_TIP=O,e.VALUE_WRAPPER=g,e.VALUE=C,e.OVERLAY_ICON=j,e.TITLE=w,e.INLINE=k,e.POPUP=P,e.WRAPPER=B,e.LOADING=T,e.FORM=R,e.CTRL_GROUP=N,e.INPUT=M,e.BUTTONS=H,e.EDITABLE_ERROR=S,e.ELEMENTS=D,e.OPEN=V,e.BTN_SAVE=x,e.BTN_CANCEL=L,e.OVERLAY=A,e.ICONS="e-icons",e.PRIMARY="e-primary",e.SHOW=W,e.HIDE=I,e.RTL=U,e.ERROR=_,e.InPlaceEditor=F,e.Base=z,e.AutoComplete=Q,e.ColorPicker=Y,e.ComboBox=$,e.DateRangePicker=G,e.MultiSelect=J,e.Rte=X,e.Slider=Z,e.TimePicker=ee,Object.defineProperty(e,"__esModule",{value:!0})});
!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-inputs"),require("@syncfusion/ej2-popups"),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-inputs","@syncfusion/ej2-popups","@syncfusion/ej2-dropdowns","@syncfusion/ej2-richtexteditor"],t):t(e.ej={},e.ej2Base,e.ej2Data,e.ej2Buttons,e.ej2Calendars,e.ej2Inputs,e.ej2Popups,e.ej2Dropdowns,e.ej2Richtexteditor)}(this,function(e,t,i,o,n,s,r,a,l){"use strict";function p(e,i){var o;if(t.isNullOrUndefined(i)||""===i)return"";switch("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof i||(i=new Date(i)),"DateRange"===e&&"object"==typeof i&&"string"==typeof i[0]&&(i=[new Date(i[0]),new Date(i[1])]),e){case"Color":var n=i;o=n.length>7?n.slice(0,-2):n;break;case"Date":o=i.toLocaleDateString();break;case"DateRange":o=i[0].toLocaleDateString()+" - "+i[1].toLocaleDateString();break;case"DateTime":o=i.toLocaleString().replace(/(.*)\D\d+/,"$1");break;case"Time":o=i.toLocaleTimeString().replace(/(.*)\D\d+/,"$1");break;default:o=i.toString()}return o}var d="render",h="update",c="destroy",u="set-focus",m="destroy-modules",y=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),f=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},v=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return y(i,e),f([t.Property("")],i.prototype,"title",void 0),f([t.Property(null)],i.prototype,"model",void 0),i}(t.ChildProperty),b={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},E={Click:{editAreaClick:"Click to edit"},DblClick:{editAreaDoubleClick:"Double click to edit"}},O="e-inplaceeditor",C="e-inplaceeditor-tip",g="e-editable-value-wrapper",w="e-editable-value",j="e-editable-overlay-icon",k="e-editable-tip-title",P="e-editable-title",M="e-editable-inline",B="e-editable-popup",H="e-editable-wrapper",T="e-editable-loading",D="e-editable-form",R="e-component-group",N="e-editable-component",S="e-editable-action-buttons",L="e-editable-error",A="e-editable-elements",V="e-editable-open",x="e-btn-save",I="e-btn-cancel",W="e-disable",U="e-show",_="e-hide",K="e-rtl",q="e-error",F=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Q=function(e){function l(t,i){var o=e.call(this,t,i)||this;return o.initRender=!0,o.isTemplate=!1,o.isExtModule=!1,o.submitBtn=void 0,o.cancelBtn=void 0,o.isClearTarget=!1,o.btnElements=void 0,o.dataManager=void 0,o.divComponents=["RTE","Slider"],o.clearComponents=["AutoComplete","Mask","Text"],o.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"],o.needsID=!0,o}return F(l,e),l.prototype.preRender=function(){t.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:P})},l.prototype.render=function(){this.element.setAttribute("tabindex","0"),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.renderValue(this.checkValue(p(this.type,this.value))),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode),this.setClass("add",this.cssClass)},l.prototype.setClass=function(e,i){this.isEmpty(i)||("add"===e?t.addClass([this.element],[i]):t.removeClass([this.element],[i]))},l.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:g}),this.element.innerHTML="",this.valueEle=this.createElement("span",{className:w}),this.editIcon=this.createElement("span",{className:j+" e-icons",attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},l.prototype.renderValue=function(e){this.valueEle.innerHTML=e,"Color"===this.type&&t.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&t.removeClass([this.valueWrap],[_])},l.prototype.renderEditor=function(){var e=void 0,i=t.select("."+g,this.element);if(!this.valueWrap.classList.contains(V)){if("Inline"===this.mode)this.loaderWidth=this.valueWrap.offsetWidth,t.addClass([this.valueWrap],[_]),this.inlineWrapper=this.createElement("div",{className:M}),this.element.appendChild(this.inlineWrapper),this.renderControl(this.inlineWrapper),this.afterOpenHandler(null);else{var o=this.createElement("div",{className:B});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),e={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:C,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),t.extend(e,this.popupSettings.model,e,!0),this.tipObj=new r.Tooltip(e),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),this.initRender=!1,t.addClass([this.valueWrap],[V]),this.setProperties({enableEditMode:!0},!0)}},l.prototype.setAttribute=function(e,t){var i=this.name&&0!==this.name.length?this.name:this.element.id;t.forEach(function(t){e.setAttribute(t,i)})},l.prototype.renderControl=function(e){var t;this.containerEle=this.createElement("div",{className:H}),this.loader=this.createElement("div",{className:T}),this.formEle=this.createElement("form",{className:D});var i=this.createElement("div",{className:R}),o=this.createElement("div",{className:N});return e.appendChild(this.containerEle),this.containerEle.appendChild(this.loader),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(Array.prototype.indexOf.call(this.divComponents,this.type)>-1?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t)),i.appendChild(o),i.appendChild(this.createElement("div",{className:L})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},l.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},l.prototype.renderButtons=function(){var e=this.createElement("div",{className:S}),i=t.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" e-primary";return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:x+i}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:I}),e},l.prototype.createButtons=function(e){var t=void 0;if(Object.keys(e.model).length>0){var i=this.createElement("button",{className:e.className,attrs:{type:e.type,title:this.getLocale(e.title,e.constant)}});e.container.appendChild(i),t=new o.Button(e.model,i)}return t},l.prototype.renderComponent=function(e){if(this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1,t.extend(this.model,this.model,{cssClass:A}),this.model.value=this.value,this.isExtModule)this.notify(d,{module:b[this.type],target:e,type:this.type});else switch(this.model.showClearButton=!0,this.type){case"Date":this.componentObj=new n.DatePicker(this.model,e);break;case"DateTime":this.componentObj=new n.DateTimePicker(this.model,e);break;case"DropDownList":this.componentObj=new a.DropDownList(this.model,e);break;case"Mask":this.componentObj=new s.MaskedTextBox(this.model,e);break;case"Numeric":this.model.value&&(this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"")),this.componentObj=new s.NumericTextBox(this.model,e);break;case"Text":this.componentObj=new s.TextBox(this.model,e)}},l.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new i.UrlAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new i.ODataV4Adaptor}},l.prototype.loadSpinner=function(){t.addClass([this.loader],[U]),t.setStyleAttribute(this.loader,{width:this.loaderWidth+"px"}),this.spinObj={target:this.loader},r.createSpinner(this.spinObj),r.showSpinner(this.spinObj.target),this.formEle&&t.addClass([this.formEle],[_])},l.prototype.removeSpinner=function(){this.loader.removeAttribute("style"),r.hideSpinner(this.spinObj.target),t.detach(this.spinObj.target.firstChild),this.formEle&&t.removeClass([this.formEle],[_]),t.removeClass([this.loader],[U])},l.prototype.getLocale=function(e,i){return new t.L10n("inplace-editor",e,this.locale).getConstant(i)},l.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},l.prototype.setValue=function(){this.isExtModule?this.notify(h,{type:this.type}):this.componentObj&&this.setProperties({value:this.componentObj.value},!0)},l.prototype.getSendValue=function(){return"Mask"===this.type||"Numeric"===this.type?this.value:this.checkValue(p(this.type,this.value))},l.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():"Numeric"===this.type?this.componentRoot.value:p(this.type,this.value)},l.prototype.setRtl=function(e){e?t.addClass([this.element],[K]):t.removeClass([this.element],[K])},l.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify(u,{}):this.componentObj.element.focus())},l.prototype.removeEditor=function(){this.tipObj&&this.formEle&&t.closest(this.formEle,"."+C).classList.add(_),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,t.isNullOrUndefined(t.select("."+M,this.element))?this.tipObj&&("MultiSelect"===this.type&&(t.EventHandler.remove(this.containerEle,"mousedown",this.popMouseDown),t.EventHandler.remove(this.containerEle,"click",this.popClickHandler)),this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(t.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,t.removeClass([this.valueWrap],[V,_]),this.setProperties({enableEditMode:!1},!0)},l.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify(m,{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),t.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},l.prototype.destroyButtons=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),t.EventHandler.remove(this.submitBtn.element,"click",this.submitPrevent),this.submitBtn.destroy(),this.submitBtn=void 0),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},l.prototype.getQuery=function(e){var t=new i.Query;return Object.keys(e).forEach(function(i){t.addParams(i,e[i])}),t},l.prototype.sendValue=function(){var e={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};if(this.trigger("actionBegin",e),this.isEmpty(this.url)||this.isEmpty(this.primaryKey)){var t={data:{},value:this.getSendValue()};this.triggerSuccess(t)}else this.dataManager=new i.DataManager({url:this.url,adaptor:this.dataAdaptor}),this.dataManager.executeQuery(this.getQuery(e.data),this.successHandler.bind(this),this.failureHandler.bind(this));this.dataManager=void 0},l.prototype.isEmpty=function(e){return!(!t.isNullOrUndefined(e)&&0!==e.length)},l.prototype.checkIsTemplate=function(){this.isTemplate=!t.isNullOrUndefined(this.template)&&""!==this.template},l.prototype.templateCompile=function(e,i){var o;"string"==typeof i&&(i=i.trim());var n=t.compile(i);t.isNullOrUndefined(n)||(o=n({},this,"template")),!t.isNullOrUndefined(n)&&o.length>0&&[].slice.call(o).forEach(function(t){e.appendChild(t)})},l.prototype.appendTemplate=function(e,i){"string"==typeof i||t.isNullOrUndefined(i.innerHTML)?("."===i[0]||"#"===i[0])&&document.querySelectorAll(i).length?(this.templateEle=document.querySelector(i),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,i):(this.templateEle=i,e.appendChild(this.templateEle))},l.prototype.disable=function(e){e?t.addClass([this.element],[W]):t.removeClass([this.element],[W])},l.prototype.enableEditor=function(e){e?this.renderEditor():this.cancelHandler()},l.prototype.checkValidation=function(){var e,i=this;this.validationRules?(this.formValidate=new s.FormValidator(this.formEle,{rules:this.validationRules,validationComplete:function(t){e={errorMessage:t.message,data:{name:i.name,primaryKey:i.primaryKey,value:i.checkValue(i.getSendValue())}},i.trigger("validating",e),"failure"===t.status?(t.errorElement.innerText=e.errorMessage,i.toggleErrorClass(!0)):i.toggleErrorClass(!1)},customPlacement:function(e,o){t.select("."+L,i.formEle).appendChild(o)}}),this.formValidate.validate()):(e={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",e),e.errorMessage&&"Empty"===e.data.value?(t.select("."+L,this.formEle).innerHTML=e.errorMessage,this.toggleErrorClass(!0)):this.toggleErrorClass(!1))},l.prototype.toggleErrorClass=function(e){if(!t.isNullOrUndefined(this.formEle)){var i=t.select(".e-input-group",this.formEle);!function(e,i,o){[].slice.call(e).forEach(function(e){e&&("add"===o?t.addClass([e],[i]):t.removeClass([e],[i]))})}([this.formEle,i],q,e?"add":"remove")}},l.prototype.hideForm=function(e){t.isNullOrUndefined(this.formEle)||(e?t.addClass([this.formEle],[_]):t.removeClass([this.formEle],[_]))},l.prototype.updateArrow=function(){var e=this.tipObj.tipPointerPosition;this.tipObj.tipPointerPosition="Middle"===e?"Auto":"Middle",this.tipObj.tipPointerPosition=e,this.tipObj.dataBind()},l.prototype.triggerSuccess=function(e){var t=e.value;this.trigger("actionSuccess",e),this.removeSpinner(),this.hideForm(!1),this.renderValue(this.checkValue(e.value!==t?e.value:this.getRenderValue())),this.removeEditor()},l.prototype.wireEvents=function(){this.wireEditEvent(this.editableOn),t.EventHandler.add(this.editIcon,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),t.EventHandler.add(document,"scroll",this.scrollResizeHandler,this),window.addEventListener("resize",this.scrollResizeHandler.bind(this)),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},l.prototype.wireDocEvent=function(){t.EventHandler.add(document,"mousedown",this.docClickHandler,this)},l.prototype.wireEditEvent=function(e){if("EditIconClick"!==e){var i="Click"===e?"editAreaClick":"editAreaDoubleClick";this.element.setAttribute("title",this.getLocale(E[e],i)),t.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this)}},l.prototype.wireEditorKeyDownEvent=function(e){t.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},l.prototype.wireBtnEvents=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),t.EventHandler.add(this.submitBtn.element,"click",this.submitPrevent,this)),t.isNullOrUndefined(this.cancelBtn)||t.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelHandler,this)},l.prototype.submitPrevent=function(e){e.preventDefault()},l.prototype.unWireEvents=function(){this.unWireEditEvent(this.editableOn),t.EventHandler.remove(this.editIcon,"click",this.clickHandler),t.EventHandler.remove(document,"scroll",this.scrollResizeHandler),window.removeEventListener("resize",this.scrollResizeHandler.bind(this)),t.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},l.prototype.unWireDocEvent=function(){t.EventHandler.remove(document,"mousedown",this.docClickHandler)},l.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&(this.element.removeAttribute("title"),t.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler))},l.prototype.unWireEditorKeyDownEvent=function(e){t.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},l.prototype.afterOpenHandler=function(e){"Popup"===this.mode&&"MultiSelect"===this.type&&(t.EventHandler.add(this.containerEle,"mousedown",this.popMouseDown,this),t.EventHandler.add(this.containerEle,"click",this.popClickHandler,this)),"Popup"!==this.mode||this.isEmpty(this.titleEle.innerHTML)||e.element.classList.add(k),"RTE"===this.type?this.rteModule.refresh():"Slider"===this.type&&this.sliderModule.refresh(),this.setFocus()},l.prototype.popMouseDown=function(e){var t=e.target.classList;t.contains("e-chips-close")&&!t.contains("e-close-hooker")&&this.updateArrow()},l.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},l.prototype.submitHandler=function(e){e.preventDefault(),this.save()},l.prototype.cancelHandler=function(){this.removeEditor()},l.prototype.popClickHandler=function(e){var i=t.select("."+g,this.element);e.target.classList.contains("e-chips-close")&&this.tipObj.refresh(i)},l.prototype.successHandler=function(e){var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},l.prototype.failureHandler=function(e){var t={data:e,value:this.getSendValue()};this.trigger("actionFailure",t),this.removeSpinner(),this.hideForm(!1),"Popup"===this.mode&&this.updateArrow()},l.prototype.enterKeyDownHandler=function(e){(13===e.keyCode&&13===e.which||27===e.keyCode&&27===e.which)&&this.save()},l.prototype.valueKeyDownHandler=function(e){13!==e.keyCode||13!==e.which||!e.target.classList.contains(O)||this.valueWrap.classList.contains(V)||this.element.classList.contains(W)||(e.preventDefault(),this.renderEditor())},l.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},l.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&this.removeEditor()},l.prototype.docClickHandler=function(e){var i=e.target;if(this.isClearTarget)this.isClearTarget=!1;else{var o=t.closest(i,"."+O),n=t.closest(i,"."+C),s=t.closest(i,"."+A),r=t.closest(i,".e-rte-elements");!t.isNullOrUndefined(o)&&o.isEqualNode(this.element)||!t.isNullOrUndefined(n)&&this.tipObj&&n.id.indexOf(this.valueWrap.id)>-1||!t.isNullOrUndefined(s)||!t.isNullOrUndefined(r)||i.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler())}},l.prototype.validate=function(){this.checkValidation()},l.prototype.save=function(){this.element.focus(),this.editEle=t.select("."+N,this.formEle),t.select("."+q,this.editEle)&&t.isNullOrUndefined(this.validationRules)||(this.isTemplate||this.setValue(),this.checkValidation(),this.formEle.classList.contains(q)||(this.loadSpinner(),this.hideForm(!0),"Popup"===this.mode&&this.updateArrow(),this.sendValue()))},l.prototype.destroy=function(){var i=this;this.removeEditor(),this.isExtModule&&this.notify(c,{}),this.unWireEvents();for([O,W,K].forEach(function(e){t.removeClass([i.element],[e])});this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.prototype.destroy.call(this)},l.prototype.getPersistData=function(){return this.addOnPersist(["value"])},l.prototype.requiredModules=function(){var e=[];return e.push({member:b[this.type],args:[this]}),e},l.prototype.getModuleName=function(){return"inplaceeditor"},l.prototype.onPropertyChanged=function(e,t){this.removeEditor();for(var i=0,o=Object.keys(e);i<o.length;i++){switch(o[i]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":case"emptyText":this.renderValue(this.checkValue(p(this.type,this.value)));break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled);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)}}},z([t.Property("")],l.prototype,"name",void 0),z([t.Property(null)],l.prototype,"value",void 0),z([t.Property("")],l.prototype,"template",void 0),z([t.Property("")],l.prototype,"cssClass",void 0),z([t.Property("")],l.prototype,"primaryKey",void 0),z([t.Property("Empty")],l.prototype,"emptyText",void 0),z([t.Property("")],l.prototype,"url",void 0),z([t.Property("Popup")],l.prototype,"mode",void 0),z([t.Property("UrlAdaptor")],l.prototype,"adaptor",void 0),z([t.Property("Text")],l.prototype,"type",void 0),z([t.Property("Click")],l.prototype,"editableOn",void 0),z([t.Property("Submit")],l.prototype,"actionOnBlur",void 0),z([t.Property(!1)],l.prototype,"enableRtl",void 0),z([t.Property(!1)],l.prototype,"enablePersistence",void 0),z([t.Property(!1)],l.prototype,"disabled",void 0),z([t.Property(!0)],l.prototype,"showButtons",void 0),z([t.Property(!1)],l.prototype,"enableEditMode",void 0),z([t.Property(!0)],l.prototype,"submitOnEnter",void 0),z([t.Complex({},v)],l.prototype,"popupSettings",void 0),z([t.Property(null)],l.prototype,"model",void 0),z([t.Property({iconCss:"e-icons e-save-icon"})],l.prototype,"saveButton",void 0),z([t.Property({iconCss:"e-icons e-cancel-icon"})],l.prototype,"cancelButton",void 0),z([t.Property(null)],l.prototype,"validationRules",void 0),z([t.Event()],l.prototype,"created",void 0),z([t.Event()],l.prototype,"actionBegin",void 0),z([t.Event()],l.prototype,"actionSuccess",void 0),z([t.Event()],l.prototype,"actionFailure",void 0),z([t.Event()],l.prototype,"validating",void 0),z([t.Event()],l.prototype,"destroyed",void 0),l=z([t.NotifyPropertyChanges],l)}(t.Component),$=function(){function e(e,t){this.parent=e,this.module=t,this.addEventListener()}return e.prototype.render=function(e){this.module.render(e)},e.prototype.focus=function(){this.module.focus()},e.prototype.update=function(e){this.module.updateValue(e)},e.prototype.destroyComponent=function(){t.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},e.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on(d,this.render,this),this.parent.on(u,this.focus,this),this.parent.on(h,this.update,this),this.parent.on(m,this.destroyComponent,this),this.parent.on(c,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(d,this.render),this.parent.off(u,this.focus),this.parent.off(h,this.update),this.parent.off(m,this.destroyComponent),this.parent.off(c,this.destroy))},e}(),G=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.AutoComplete(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),Y=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.ColorPicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),J=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.ComboBox(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"combo-box"},e}(),X=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"date-range-picker"},e}(),Z=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.MultiSelect(this.parent.model,e.target)},e.prototype.focus=function(){t.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(new MouseEvent("mousedown"))},e.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"multi-select"},e}();l.RichTextEditor.Inject(l.HtmlEditor,l.MarkdownEditor,l.Toolbar,l.Link,l.Image,l.QuickToolbar,l.Table);var ee=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.rteModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.compObj=new l.RichTextEditor(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),te=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.Slider(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&this.parent.setProperties({value:this.compObj.value.toString()},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),ie=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new $(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.TimePicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"time-picker"},e}();e.parseValue=p,e.render=d,e.update=h,e.destroy=c,e.setFocus=u,e.destroyModules=m,e.PopupSettings=v,e.modulesList=b,e.localeConstant=E,e.ROOT=O,e.ROOT_TIP=C,e.VALUE_WRAPPER=g,e.VALUE=w,e.OVERLAY_ICON=j,e.TIP_TITLE=k,e.TITLE=P,e.INLINE=M,e.POPUP=B,e.WRAPPER=H,e.LOADING=T,e.FORM=D,e.CTRL_GROUP=R,e.INPUT=N,e.BUTTONS=S,e.EDITABLE_ERROR=L,e.ELEMENTS=A,e.OPEN=V,e.BTN_SAVE=x,e.BTN_CANCEL=I,e.DISABLE=W,e.ICONS="e-icons",e.PRIMARY="e-primary",e.SHOW=U,e.HIDE=_,e.RTL=K,e.ERROR=q,e.InPlaceEditor=Q,e.Base=$,e.AutoComplete=G,e.ColorPicker=Y,e.ComboBox=J,e.DateRangePicker=X,e.MultiSelect=Z,e.Rte=ee,e.Slider=te,e.TimePicker=ie,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-inplace-editor.umd.min.js.map

@@ -95,2 +95,9 @@ import { ChildProperty, Complex, Component, Event, EventHandler, L10n, NotifyPropertyChanges, Property, addClass, closest, compile, detach, extend, isNullOrUndefined, removeClass, select, setStyleAttribute } from '@syncfusion/ej2-base';

};
/**
* @hidden
*/
let localeConstant = {
'Click': { 'editAreaClick': 'Click to edit' },
'DblClick': { 'editAreaDoubleClick': 'Double click to edit' }
};

@@ -111,2 +118,4 @@ /**

/** @hidden */
const TIP_TITLE = 'e-editable-tip-title';
/** @hidden */
const TITLE = 'e-editable-title';

@@ -140,3 +149,3 @@ /** @hidden */

/** @hidden */
const OVERLAY = 'e-overlay';
const DISABLE = 'e-disable';
/** @hidden */

@@ -221,3 +230,3 @@ const ICONS = 'e-icons';

this.setRtl(this.enableRtl);
this.enableEditor();
this.enableEditor(this.enableEditMode);
this.setClass('add', this.cssClass);

@@ -263,3 +272,3 @@ }

this.renderControl(this.inlineWrapper);
this.afterOpenHandler();
this.afterOpenHandler(null);
}

@@ -288,2 +297,3 @@ else {

addClass([this.valueWrap], [OPEN]);
this.setProperties({ enableEditMode: true }, true);
}

@@ -393,4 +403,3 @@ setAttribute(ele, attr) {

if (this.model.value) {
let val = this.model.value.toString().replace(/[`~!@#$%^&*()_|+\-=?;:'",<>\{\}\[\]\\\/]/gi, '');
this.model.value = parseInt(val, 10);
this.model.value = this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi, '');
}

@@ -485,2 +494,6 @@ this.componentObj = new NumericTextBox(this.model, ele);

else if (this.tipObj) {
if (this.type === 'MultiSelect') {
EventHandler.remove(this.containerEle, 'mousedown', this.popMouseDown);
EventHandler.remove(this.containerEle, 'click', this.popClickHandler);
}
this.tipObj.close();

@@ -492,2 +505,3 @@ this.tipObj.destroy();

removeClass([this.valueWrap], [OPEN, HIDE]);
this.setProperties({ enableEditMode: false }, true);
}

@@ -522,2 +536,3 @@ destroyComponents() {

EventHandler.remove(this.submitBtn.element, 'mousedown', this.submitHandler);
EventHandler.remove(this.submitBtn.element, 'click', this.submitPrevent);
this.submitBtn.destroy();

@@ -596,8 +611,6 @@ this.submitBtn = undefined;

disable(value) {
value ? addClass([this.element], [OVERLAY]) : removeClass([this.element], [OVERLAY]);
value ? addClass([this.element], [DISABLE]) : removeClass([this.element], [DISABLE]);
}
enableEditor() {
if (this.enableEditMode) {
this.renderEditor();
}
enableEditor(val) {
(val) ? this.renderEditor() : this.cancelHandler();
}

@@ -664,2 +677,8 @@ checkValidation() {

}
updateArrow() {
let pos = this.tipObj.tipPointerPosition;
this.tipObj.tipPointerPosition = (pos === 'Middle') ? 'Auto' : 'Middle';
this.tipObj.tipPointerPosition = pos;
this.tipObj.dataBind();
}
triggerSuccess(args) {

@@ -687,2 +706,7 @@ let val = args.value;

wireEditEvent(event) {
if (event === 'EditIconClick') {
return;
}
let titleConstant = (event === 'Click') ? 'editAreaClick' : 'editAreaDoubleClick';
this.element.setAttribute('title', this.getLocale(localeConstant[event], titleConstant));
EventHandler.add(this.valueWrap, event.toLowerCase(), this.clickHandler, this);

@@ -696,2 +720,3 @@ }

EventHandler.add(this.submitBtn.element, 'mousedown', this.submitHandler, this);
EventHandler.add(this.submitBtn.element, 'click', this.submitPrevent, this);
}

@@ -702,2 +727,5 @@ if (!isNullOrUndefined(this.cancelBtn)) {

}
submitPrevent(e) {
e.preventDefault();
}
unWireEvents() {

@@ -720,2 +748,3 @@ this.unWireEditEvent(this.editableOn);

}
this.element.removeAttribute('title');
EventHandler.remove(this.valueWrap, event.toLowerCase(), this.clickHandler);

@@ -726,3 +755,10 @@ }

}
afterOpenHandler() {
afterOpenHandler(e) {
if (this.mode === 'Popup' && this.type === 'MultiSelect') {
EventHandler.add(this.containerEle, 'mousedown', this.popMouseDown, this);
EventHandler.add(this.containerEle, 'click', this.popClickHandler, this);
}
if (this.mode === 'Popup' && !this.isEmpty(this.titleEle.innerHTML)) {
e.element.classList.add(TIP_TITLE);
}
if (this.type === 'RTE') {

@@ -736,2 +772,8 @@ this.rteModule.refresh();

}
popMouseDown(e) {
let trgClass = e.target.classList;
if (trgClass.contains('e-chips-close') && !trgClass.contains('e-close-hooker')) {
this.updateArrow();
}
}
clickHandler(e) {

@@ -750,2 +792,8 @@ if (this.editableOn !== 'EditIconClick') {

}
popClickHandler(e) {
let tipTarget = select('.' + VALUE_WRAPPER, this.element);
if (e.target.classList.contains('e-chips-close')) {
this.tipObj.refresh(tipTarget);
}
}
successHandler(e) {

@@ -760,2 +808,5 @@ let eventArgs = { data: e, value: this.getSendValue() };

this.hideForm(false);
if (this.mode === 'Popup') {
this.updateArrow();
}
}

@@ -769,3 +820,3 @@ enterKeyDownHandler(e) {

if ((e.keyCode === 13 && e.which === 13) && e.target.classList.contains(ROOT) &&
!this.valueWrap.classList.contains(OPEN)) {
!this.valueWrap.classList.contains(OPEN) && !this.element.classList.contains(DISABLE)) {
e.preventDefault();

@@ -822,2 +873,6 @@ this.renderEditor();

this.element.focus();
this.editEle = select('.' + INPUT, this.formEle);
if (select('.' + ERROR, this.editEle) && isNullOrUndefined(this.validationRules)) {
return;
}
if (!this.isTemplate) {

@@ -830,2 +885,5 @@ this.setValue();

this.hideForm(true);
if (this.mode === 'Popup') {
this.updateArrow();
}
this.sendValue();

@@ -844,3 +902,3 @@ }

this.unWireEvents();
let classList = [ROOT, OVERLAY, RTL];
let classList = [ROOT, DISABLE, RTL];
classList.forEach((val) => {

@@ -911,4 +969,6 @@ removeClass([this.element], [val]);

case 'mode':
this.enableEditor(this.enableEditMode);
break;
case 'enableEditMode':
this.enableEditor();
this.enableEditor(newProp.enableEditMode);
break;

@@ -1389,3 +1449,3 @@ case 'editableOn':

export { parseValue, render, update, destroy, setFocus, destroyModules, PopupSettings, modulesList, ROOT, ROOT_TIP, VALUE_WRAPPER, VALUE, OVERLAY_ICON, TITLE, INLINE, POPUP, WRAPPER, LOADING, FORM, CTRL_GROUP, INPUT, BUTTONS, EDITABLE_ERROR, ELEMENTS, OPEN, BTN_SAVE, BTN_CANCEL, OVERLAY, ICONS, PRIMARY, SHOW, HIDE, RTL, ERROR, InPlaceEditor, Base, AutoComplete$1 as AutoComplete, ColorPicker$1 as ColorPicker, ComboBox$1 as ComboBox, DateRangePicker$1 as DateRangePicker, MultiSelect$1 as MultiSelect, Rte, Slider$1 as Slider, TimePicker$1 as TimePicker };
export { parseValue, render, update, destroy, setFocus, destroyModules, PopupSettings, modulesList, localeConstant, ROOT, ROOT_TIP, VALUE_WRAPPER, VALUE, OVERLAY_ICON, TIP_TITLE, TITLE, INLINE, POPUP, WRAPPER, LOADING, FORM, CTRL_GROUP, INPUT, BUTTONS, EDITABLE_ERROR, ELEMENTS, OPEN, BTN_SAVE, BTN_CANCEL, DISABLE, ICONS, PRIMARY, SHOW, HIDE, RTL, ERROR, InPlaceEditor, Base, AutoComplete$1 as AutoComplete, ColorPicker$1 as ColorPicker, ComboBox$1 as ComboBox, DateRangePicker$1 as DateRangePicker, MultiSelect$1 as MultiSelect, Rte, Slider$1 as Slider, TimePicker$1 as TimePicker };
//# sourceMappingURL=ej2-inplace-editor.es2015.js.map

@@ -113,2 +113,9 @@ import { ChildProperty, Complex, Component, Event, EventHandler, L10n, NotifyPropertyChanges, Property, addClass, closest, compile, detach, extend, isNullOrUndefined, removeClass, select, setStyleAttribute } from '@syncfusion/ej2-base';

};
/**
* @hidden
*/
var localeConstant = {
'Click': { 'editAreaClick': 'Click to edit' },
'DblClick': { 'editAreaDoubleClick': 'Double click to edit' }
};

@@ -129,2 +136,4 @@ /**

/** @hidden */
var TIP_TITLE = 'e-editable-tip-title';
/** @hidden */
var TITLE = 'e-editable-title';

@@ -158,3 +167,3 @@ /** @hidden */

/** @hidden */
var OVERLAY = 'e-overlay';
var DISABLE = 'e-disable';
/** @hidden */

@@ -254,3 +263,3 @@ var ICONS = 'e-icons';

this.setRtl(this.enableRtl);
this.enableEditor();
this.enableEditor(this.enableEditMode);
this.setClass('add', this.cssClass);

@@ -296,3 +305,3 @@ };

this.renderControl(this.inlineWrapper);
this.afterOpenHandler();
this.afterOpenHandler(null);
}

@@ -321,2 +330,3 @@ else {

addClass([this.valueWrap], [OPEN]);
this.setProperties({ enableEditMode: true }, true);
};

@@ -426,4 +436,3 @@ InPlaceEditor.prototype.setAttribute = function (ele, attr) {

if (this.model.value) {
var val = this.model.value.toString().replace(/[`~!@#$%^&*()_|+\-=?;:'",<>\{\}\[\]\\\/]/gi, '');
this.model.value = parseInt(val, 10);
this.model.value = this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi, '');
}

@@ -518,2 +527,6 @@ this.componentObj = new NumericTextBox(this.model, ele);

else if (this.tipObj) {
if (this.type === 'MultiSelect') {
EventHandler.remove(this.containerEle, 'mousedown', this.popMouseDown);
EventHandler.remove(this.containerEle, 'click', this.popClickHandler);
}
this.tipObj.close();

@@ -525,2 +538,3 @@ this.tipObj.destroy();

removeClass([this.valueWrap], [OPEN, HIDE]);
this.setProperties({ enableEditMode: false }, true);
};

@@ -555,2 +569,3 @@ InPlaceEditor.prototype.destroyComponents = function () {

EventHandler.remove(this.submitBtn.element, 'mousedown', this.submitHandler);
EventHandler.remove(this.submitBtn.element, 'click', this.submitPrevent);
this.submitBtn.destroy();

@@ -629,8 +644,6 @@ this.submitBtn = undefined;

InPlaceEditor.prototype.disable = function (value) {
value ? addClass([this.element], [OVERLAY]) : removeClass([this.element], [OVERLAY]);
value ? addClass([this.element], [DISABLE]) : removeClass([this.element], [DISABLE]);
};
InPlaceEditor.prototype.enableEditor = function () {
if (this.enableEditMode) {
this.renderEditor();
}
InPlaceEditor.prototype.enableEditor = function (val) {
(val) ? this.renderEditor() : this.cancelHandler();
};

@@ -698,2 +711,8 @@ InPlaceEditor.prototype.checkValidation = function () {

};
InPlaceEditor.prototype.updateArrow = function () {
var pos = this.tipObj.tipPointerPosition;
this.tipObj.tipPointerPosition = (pos === 'Middle') ? 'Auto' : 'Middle';
this.tipObj.tipPointerPosition = pos;
this.tipObj.dataBind();
};
InPlaceEditor.prototype.triggerSuccess = function (args) {

@@ -721,2 +740,7 @@ var val = args.value;

InPlaceEditor.prototype.wireEditEvent = function (event) {
if (event === 'EditIconClick') {
return;
}
var titleConstant = (event === 'Click') ? 'editAreaClick' : 'editAreaDoubleClick';
this.element.setAttribute('title', this.getLocale(localeConstant[event], titleConstant));
EventHandler.add(this.valueWrap, event.toLowerCase(), this.clickHandler, this);

@@ -730,2 +754,3 @@ };

EventHandler.add(this.submitBtn.element, 'mousedown', this.submitHandler, this);
EventHandler.add(this.submitBtn.element, 'click', this.submitPrevent, this);
}

@@ -736,2 +761,5 @@ if (!isNullOrUndefined(this.cancelBtn)) {

};
InPlaceEditor.prototype.submitPrevent = function (e) {
e.preventDefault();
};
InPlaceEditor.prototype.unWireEvents = function () {

@@ -754,2 +782,3 @@ this.unWireEditEvent(this.editableOn);

}
this.element.removeAttribute('title');
EventHandler.remove(this.valueWrap, event.toLowerCase(), this.clickHandler);

@@ -760,3 +789,10 @@ };

};
InPlaceEditor.prototype.afterOpenHandler = function () {
InPlaceEditor.prototype.afterOpenHandler = function (e) {
if (this.mode === 'Popup' && this.type === 'MultiSelect') {
EventHandler.add(this.containerEle, 'mousedown', this.popMouseDown, this);
EventHandler.add(this.containerEle, 'click', this.popClickHandler, this);
}
if (this.mode === 'Popup' && !this.isEmpty(this.titleEle.innerHTML)) {
e.element.classList.add(TIP_TITLE);
}
if (this.type === 'RTE') {

@@ -770,2 +806,8 @@ this.rteModule.refresh();

};
InPlaceEditor.prototype.popMouseDown = function (e) {
var trgClass = e.target.classList;
if (trgClass.contains('e-chips-close') && !trgClass.contains('e-close-hooker')) {
this.updateArrow();
}
};
InPlaceEditor.prototype.clickHandler = function (e) {

@@ -784,2 +826,8 @@ if (this.editableOn !== 'EditIconClick') {

};
InPlaceEditor.prototype.popClickHandler = function (e) {
var tipTarget = select('.' + VALUE_WRAPPER, this.element);
if (e.target.classList.contains('e-chips-close')) {
this.tipObj.refresh(tipTarget);
}
};
InPlaceEditor.prototype.successHandler = function (e) {

@@ -794,2 +842,5 @@ var eventArgs = { data: e, value: this.getSendValue() };

this.hideForm(false);
if (this.mode === 'Popup') {
this.updateArrow();
}
};

@@ -803,3 +854,3 @@ InPlaceEditor.prototype.enterKeyDownHandler = function (e) {

if ((e.keyCode === 13 && e.which === 13) && e.target.classList.contains(ROOT) &&
!this.valueWrap.classList.contains(OPEN)) {
!this.valueWrap.classList.contains(OPEN) && !this.element.classList.contains(DISABLE)) {
e.preventDefault();

@@ -856,2 +907,6 @@ this.renderEditor();

this.element.focus();
this.editEle = select('.' + INPUT, this.formEle);
if (select('.' + ERROR, this.editEle) && isNullOrUndefined(this.validationRules)) {
return;
}
if (!this.isTemplate) {

@@ -864,2 +919,5 @@ this.setValue();

this.hideForm(true);
if (this.mode === 'Popup') {
this.updateArrow();
}
this.sendValue();

@@ -879,3 +937,3 @@ }

this.unWireEvents();
var classList = [ROOT, OVERLAY, RTL];
var classList = [ROOT, DISABLE, RTL];
classList.forEach(function (val) {

@@ -947,4 +1005,6 @@ removeClass([_this.element], [val]);

case 'mode':
this.enableEditor(this.enableEditMode);
break;
case 'enableEditMode':
this.enableEditor();
this.enableEditor(newProp.enableEditMode);
break;

@@ -1435,3 +1495,3 @@ case 'editableOn':

export { parseValue, render, update, destroy, setFocus, destroyModules, PopupSettings, modulesList, ROOT, ROOT_TIP, VALUE_WRAPPER, VALUE, OVERLAY_ICON, TITLE, INLINE, POPUP, WRAPPER, LOADING, FORM, CTRL_GROUP, INPUT, BUTTONS, EDITABLE_ERROR, ELEMENTS, OPEN, BTN_SAVE, BTN_CANCEL, OVERLAY, ICONS, PRIMARY, SHOW, HIDE, RTL, ERROR, InPlaceEditor, Base, AutoComplete$1 as AutoComplete, ColorPicker$1 as ColorPicker, ComboBox$1 as ComboBox, DateRangePicker$1 as DateRangePicker, MultiSelect$1 as MultiSelect, Rte, Slider$1 as Slider, TimePicker$1 as TimePicker };
export { parseValue, render, update, destroy, setFocus, destroyModules, PopupSettings, modulesList, localeConstant, ROOT, ROOT_TIP, VALUE_WRAPPER, VALUE, OVERLAY_ICON, TIP_TITLE, TITLE, INLINE, POPUP, WRAPPER, LOADING, FORM, CTRL_GROUP, INPUT, BUTTONS, EDITABLE_ERROR, ELEMENTS, OPEN, BTN_SAVE, BTN_CANCEL, DISABLE, ICONS, PRIMARY, SHOW, HIDE, RTL, ERROR, InPlaceEditor, Base, AutoComplete$1 as AutoComplete, ColorPicker$1 as ColorPicker, ComboBox$1 as ComboBox, DateRangePicker$1 as DateRangePicker, MultiSelect$1 as MultiSelect, Rte, Slider$1 as Slider, TimePicker$1 as TimePicker };
//# sourceMappingURL=ej2-inplace-editor.es5.js.map
/*!
* filename: ej2-inplace-editor.min.js
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.inplaceeditor=function(e,t,i,o,n,s,r,a,l){"use strict";function p(e,i){var o;if(t.isNullOrUndefined(i)||""===i)return"";switch("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof i||(i=new Date(i)),"DateRange"===e&&"object"==typeof i&&"string"==typeof i[0]&&(i=[new Date(i[0]),new Date(i[1])]),e){case"Color":var n=i;o=n.length>7?n.slice(0,-2):n;break;case"Date":o=i.toLocaleDateString();break;case"DateRange":o=i[0].toLocaleDateString()+" - "+i[1].toLocaleDateString();break;case"DateTime":o=i.toLocaleString().replace(/(.*)\D\d+/,"$1");break;case"Time":o=i.toLocaleTimeString().replace(/(.*)\D\d+/,"$1");break;default:o=i.toString()}return o}var d=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),h=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},c=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return d(i,e),h([t.Property("")],i.prototype,"title",void 0),h([t.Property(null)],i.prototype,"model",void 0),i}(t.ChildProperty),u={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},m="e-inplaceeditor",y="e-inplaceeditor-tip",f="e-editable-value",v="e-editable-title",b="e-editable-inline",E="e-editable-popup",O="e-editable-form",g="e-editable-component",C="e-editable-action-buttons",w="e-editable-elements",j="e-editable-open",k="e-hide",P="e-rtl",B=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),T=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e){function l(t,i){var o=e.call(this,t,i)||this;return o.initRender=!0,o.isTemplate=!1,o.isExtModule=!1,o.submitBtn=void 0,o.cancelBtn=void 0,o.isClearTarget=!1,o.btnElements=void 0,o.dataManager=void 0,o.divComponents=["RTE","Slider"],o.clearComponents=["AutoComplete","Mask","Text"],o.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"],o.needsID=!0,o}return B(l,e),l.prototype.preRender=function(){t.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:v})},l.prototype.render=function(){this.element.setAttribute("tabindex","0"),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.renderValue(this.checkValue(p(this.type,this.value))),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(),this.setClass("add",this.cssClass)},l.prototype.setClass=function(e,i){this.isEmpty(i)||("add"===e?t.addClass([this.element],[i]):t.removeClass([this.element],[i]))},l.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:"e-editable-value-wrapper"}),this.element.innerHTML="",this.valueEle=this.createElement("span",{className:f}),this.editIcon=this.createElement("span",{className:"e-editable-overlay-icon e-icons",attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},l.prototype.renderValue=function(e){this.valueEle.innerHTML=e,"Color"===this.type&&t.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&t.removeClass([this.valueWrap],[k])},l.prototype.renderEditor=function(){var e=void 0,i=t.select(".e-editable-value-wrapper",this.element);if(!this.valueWrap.classList.contains(j)){if("Inline"===this.mode)this.loaderWidth=this.valueWrap.offsetWidth,t.addClass([this.valueWrap],[k]),this.inlineWrapper=this.createElement("div",{className:b}),this.element.appendChild(this.inlineWrapper),this.renderControl(this.inlineWrapper),this.afterOpenHandler();else{var o=this.createElement("div",{className:E});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),e={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:y,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),t.extend(e,this.popupSettings.model,e,!0),this.tipObj=new r.Tooltip(e),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),this.initRender=!1,t.addClass([this.valueWrap],[j])}},l.prototype.setAttribute=function(e,t){var i=this.name&&0!==this.name.length?this.name:this.element.id;t.forEach(function(t){e.setAttribute(t,i)})},l.prototype.renderControl=function(e){var t;this.containerEle=this.createElement("div",{className:"e-editable-wrapper"}),this.loader=this.createElement("div",{className:"e-editable-loading"}),this.formEle=this.createElement("form",{className:O});var i=this.createElement("div",{className:"e-component-group"}),o=this.createElement("div",{className:g});return e.appendChild(this.containerEle),this.containerEle.appendChild(this.loader),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(Array.prototype.indexOf.call(this.divComponents,this.type)>-1?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t)),i.appendChild(o),i.appendChild(this.createElement("div",{className:"e-editable-error"})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},l.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},l.prototype.renderButtons=function(){var e=this.createElement("div",{className:C}),i=t.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" e-primary";return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:"e-btn-save"+i}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:"e-btn-cancel"}),e},l.prototype.createButtons=function(e){var t=void 0;if(Object.keys(e.model).length>0){var i=this.createElement("button",{className:e.className,attrs:{type:e.type,title:this.getLocale(e.title,e.constant)}});e.container.appendChild(i),t=new o.Button(e.model,i)}return t},l.prototype.renderComponent=function(e){if(this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1,t.extend(this.model,this.model,{cssClass:w}),this.model.value=this.value,this.isExtModule)this.notify("render",{module:u[this.type],target:e,type:this.type});else switch(this.model.showClearButton=!0,this.type){case"Date":this.componentObj=new n.DatePicker(this.model,e);break;case"DateTime":this.componentObj=new n.DateTimePicker(this.model,e);break;case"DropDownList":this.componentObj=new a.DropDownList(this.model,e);break;case"Mask":this.componentObj=new s.MaskedTextBox(this.model,e);break;case"Numeric":if(this.model.value){var i=this.model.value.toString().replace(/[`~!@#$%^&*()_|+\-=?;:'",<>\{\}\[\]\\\/]/gi,"");this.model.value=parseInt(i,10)}this.componentObj=new s.NumericTextBox(this.model,e);break;case"Text":this.componentObj=new s.TextBox(this.model,e)}},l.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new i.UrlAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new i.ODataV4Adaptor}},l.prototype.loadSpinner=function(){t.addClass([this.loader],["e-show"]),t.setStyleAttribute(this.loader,{width:this.loaderWidth+"px"}),this.spinObj={target:this.loader},r.createSpinner(this.spinObj),r.showSpinner(this.spinObj.target),this.formEle&&t.addClass([this.formEle],[k])},l.prototype.removeSpinner=function(){this.loader.removeAttribute("style"),r.hideSpinner(this.spinObj.target),t.detach(this.spinObj.target.firstChild),this.formEle&&t.removeClass([this.formEle],[k]),t.removeClass([this.loader],["e-show"])},l.prototype.getLocale=function(e,i){return new t.L10n("inplace-editor",e,this.locale).getConstant(i)},l.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},l.prototype.setValue=function(){this.isExtModule?this.notify("update",{type:this.type}):this.componentObj&&this.setProperties({value:this.componentObj.value},!0)},l.prototype.getSendValue=function(){return"Mask"===this.type||"Numeric"===this.type?this.value:this.checkValue(p(this.type,this.value))},l.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():"Numeric"===this.type?this.componentRoot.value:p(this.type,this.value)},l.prototype.setRtl=function(e){e?t.addClass([this.element],[P]):t.removeClass([this.element],[P])},l.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify("set-focus",{}):this.componentObj.element.focus())},l.prototype.removeEditor=function(){this.tipObj&&this.formEle&&t.closest(this.formEle,"."+y).classList.add(k),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,t.isNullOrUndefined(t.select("."+b,this.element))?this.tipObj&&(this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(t.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,t.removeClass([this.valueWrap],[j,k])},l.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify("destroy-modules",{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),t.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},l.prototype.destroyButtons=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),this.submitBtn.destroy(),this.submitBtn=void 0),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},l.prototype.getQuery=function(e){var t=new i.Query;return Object.keys(e).forEach(function(i){t.addParams(i,e[i])}),t},l.prototype.sendValue=function(){var e={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};if(this.trigger("actionBegin",e),this.isEmpty(this.url)||this.isEmpty(this.primaryKey)){var t={data:{},value:this.getSendValue()};this.triggerSuccess(t)}else this.dataManager=new i.DataManager({url:this.url,adaptor:this.dataAdaptor}),this.dataManager.executeQuery(this.getQuery(e.data),this.successHandler.bind(this),this.failureHandler.bind(this));this.dataManager=void 0},l.prototype.isEmpty=function(e){return!(!t.isNullOrUndefined(e)&&0!==e.length)},l.prototype.checkIsTemplate=function(){this.isTemplate=!t.isNullOrUndefined(this.template)&&""!==this.template},l.prototype.templateCompile=function(e,i){var o;"string"==typeof i&&(i=i.trim());var n=t.compile(i);t.isNullOrUndefined(n)||(o=n({},this,"template")),!t.isNullOrUndefined(n)&&o.length>0&&[].slice.call(o).forEach(function(t){e.appendChild(t)})},l.prototype.appendTemplate=function(e,i){"string"==typeof i||t.isNullOrUndefined(i.innerHTML)?("."===i[0]||"#"===i[0])&&document.querySelectorAll(i).length?(this.templateEle=document.querySelector(i),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,i):(this.templateEle=i,e.appendChild(this.templateEle))},l.prototype.disable=function(e){e?t.addClass([this.element],["e-overlay"]):t.removeClass([this.element],["e-overlay"])},l.prototype.enableEditor=function(){this.enableEditMode&&this.renderEditor()},l.prototype.checkValidation=function(){var e,i=this;this.validationRules?(this.formValidate=new s.FormValidator(this.formEle,{rules:this.validationRules,validationComplete:function(t){e={errorMessage:t.message,data:{name:i.name,primaryKey:i.primaryKey,value:i.checkValue(i.getSendValue())}},i.trigger("validating",e),"failure"===t.status?(t.errorElement.innerText=e.errorMessage,i.toggleErrorClass(!0)):i.toggleErrorClass(!1)},customPlacement:function(e,o){t.select(".e-editable-error",i.formEle).appendChild(o)}}),this.formValidate.validate()):(e={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",e),e.errorMessage&&"Empty"===e.data.value?(t.select(".e-editable-error",this.formEle).innerHTML=e.errorMessage,this.toggleErrorClass(!0)):this.toggleErrorClass(!1))},l.prototype.toggleErrorClass=function(e){if(!t.isNullOrUndefined(this.formEle)){var i=t.select(".e-input-group",this.formEle);!function(e,i,o){[].slice.call(e).forEach(function(e){e&&("add"===o?t.addClass([e],[i]):t.removeClass([e],[i]))})}([this.formEle,i],"e-error",e?"add":"remove")}},l.prototype.hideForm=function(e){t.isNullOrUndefined(this.formEle)||(e?t.addClass([this.formEle],[k]):t.removeClass([this.formEle],[k]))},l.prototype.triggerSuccess=function(e){var t=e.value;this.trigger("actionSuccess",e),this.removeSpinner(),this.hideForm(!1),this.renderValue(this.checkValue(e.value!==t?e.value:this.getRenderValue())),this.removeEditor()},l.prototype.wireEvents=function(){this.wireEditEvent(this.editableOn),t.EventHandler.add(this.editIcon,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),t.EventHandler.add(document,"scroll",this.scrollResizeHandler,this),window.addEventListener("resize",this.scrollResizeHandler.bind(this)),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},l.prototype.wireDocEvent=function(){t.EventHandler.add(document,"mousedown",this.docClickHandler,this)},l.prototype.wireEditEvent=function(e){t.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this)},l.prototype.wireEditorKeyDownEvent=function(e){t.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},l.prototype.wireBtnEvents=function(){t.isNullOrUndefined(this.submitBtn)||t.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),t.isNullOrUndefined(this.cancelBtn)||t.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelHandler,this)},l.prototype.unWireEvents=function(){this.unWireEditEvent(this.editableOn),t.EventHandler.remove(this.editIcon,"click",this.clickHandler),t.EventHandler.remove(document,"scroll",this.scrollResizeHandler),window.removeEventListener("resize",this.scrollResizeHandler.bind(this)),t.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},l.prototype.unWireDocEvent=function(){t.EventHandler.remove(document,"mousedown",this.docClickHandler)},l.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&t.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler)},l.prototype.unWireEditorKeyDownEvent=function(e){t.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},l.prototype.afterOpenHandler=function(){"RTE"===this.type?this.rteModule.refresh():"Slider"===this.type&&this.sliderModule.refresh(),this.setFocus()},l.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},l.prototype.submitHandler=function(e){e.preventDefault(),this.save()},l.prototype.cancelHandler=function(){this.removeEditor()},l.prototype.successHandler=function(e){var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},l.prototype.failureHandler=function(e){var t={data:e,value:this.getSendValue()};this.trigger("actionFailure",t),this.removeSpinner(),this.hideForm(!1)},l.prototype.enterKeyDownHandler=function(e){(13===e.keyCode&&13===e.which||27===e.keyCode&&27===e.which)&&this.save()},l.prototype.valueKeyDownHandler=function(e){13===e.keyCode&&13===e.which&&e.target.classList.contains(m)&&!this.valueWrap.classList.contains(j)&&(e.preventDefault(),this.renderEditor())},l.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},l.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&this.removeEditor()},l.prototype.docClickHandler=function(e){var i=e.target;if(this.isClearTarget)return void(this.isClearTarget=!1);var o=t.closest(i,"."+m),n=t.closest(i,"."+y),s=t.closest(i,"."+w),r=t.closest(i,".e-rte-elements");!t.isNullOrUndefined(o)&&o.isEqualNode(this.element)||!t.isNullOrUndefined(n)&&this.tipObj&&n.id.indexOf(this.valueWrap.id)>-1||!t.isNullOrUndefined(s)||!t.isNullOrUndefined(r)||i.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler())},l.prototype.validate=function(){this.checkValidation()},l.prototype.save=function(){this.element.focus(),this.isTemplate||this.setValue(),this.checkValidation(),this.formEle.classList.contains("e-error")||(this.loadSpinner(),this.hideForm(!0),this.sendValue())},l.prototype.destroy=function(){var i=this;for(this.removeEditor(),this.isExtModule&&this.notify("destroy",{}),this.unWireEvents(),[m,"e-overlay",P].forEach(function(e){t.removeClass([i.element],[e])});this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.prototype.destroy.call(this)},l.prototype.getPersistData=function(){return this.addOnPersist(["value"])},l.prototype.requiredModules=function(){var e=[];return e.push({member:u[this.type],args:[this]}),e},l.prototype.getModuleName=function(){return"inplaceeditor"},l.prototype.onPropertyChanged=function(e,t){this.removeEditor();for(var i=0,o=Object.keys(e);i<o.length;i++)switch(o[i]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":case"emptyText":this.renderValue(this.checkValue(p(this.type,this.value)));break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled);break;case"enableRtl":this.setRtl(e.enableRtl);break;case"cssClass":this.setClass("remove",t.cssClass),this.setClass("add",e.cssClass);break;case"mode":case"enableEditMode":this.enableEditor();break;case"editableOn":this.unWireEditEvent(t.editableOn),"EditIconClick"!==e.editableOn&&this.wireEditEvent(e.editableOn)}},T([t.Property("")],l.prototype,"name",void 0),T([t.Property(null)],l.prototype,"value",void 0),T([t.Property("")],l.prototype,"template",void 0),T([t.Property("")],l.prototype,"cssClass",void 0),T([t.Property("")],l.prototype,"primaryKey",void 0),T([t.Property("Empty")],l.prototype,"emptyText",void 0),T([t.Property("")],l.prototype,"url",void 0),T([t.Property("Popup")],l.prototype,"mode",void 0),T([t.Property("UrlAdaptor")],l.prototype,"adaptor",void 0),T([t.Property("Text")],l.prototype,"type",void 0),T([t.Property("Click")],l.prototype,"editableOn",void 0),T([t.Property("Submit")],l.prototype,"actionOnBlur",void 0),T([t.Property(!1)],l.prototype,"enableRtl",void 0),T([t.Property(!1)],l.prototype,"enablePersistence",void 0),T([t.Property(!1)],l.prototype,"disabled",void 0),T([t.Property(!0)],l.prototype,"showButtons",void 0),T([t.Property(!1)],l.prototype,"enableEditMode",void 0),T([t.Property(!0)],l.prototype,"submitOnEnter",void 0),T([t.Complex({},c)],l.prototype,"popupSettings",void 0),T([t.Property(null)],l.prototype,"model",void 0),T([t.Property({iconCss:"e-icons e-save-icon"})],l.prototype,"saveButton",void 0),T([t.Property({iconCss:"e-icons e-cancel-icon"})],l.prototype,"cancelButton",void 0),T([t.Property(null)],l.prototype,"validationRules",void 0),T([t.Event()],l.prototype,"created",void 0),T([t.Event()],l.prototype,"actionBegin",void 0),T([t.Event()],l.prototype,"actionSuccess",void 0),T([t.Event()],l.prototype,"actionFailure",void 0),T([t.Event()],l.prototype,"validating",void 0),T([t.Event()],l.prototype,"destroyed",void 0),l=T([t.NotifyPropertyChanges],l)}(t.Component),N=function(){function e(e,t){this.parent=e,this.module=t,this.addEventListener()}return e.prototype.render=function(e){this.module.render(e)},e.prototype.focus=function(){this.module.focus()},e.prototype.update=function(e){this.module.updateValue(e)},e.prototype.destroyComponent=function(){t.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},e.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on("render",this.render,this),this.parent.on("set-focus",this.focus,this),this.parent.on("update",this.update,this),this.parent.on("destroy-modules",this.destroyComponent,this),this.parent.on("destroy",this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("render",this.render),this.parent.off("set-focus",this.focus),this.parent.off("update",this.update),this.parent.off("destroy-modules",this.destroyComponent),this.parent.off("destroy",this.destroy))},e}(),H=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.AutoComplete(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),M=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.ColorPicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),S=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.ComboBox(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"combo-box"},e}(),D=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"date-range-picker"},e}(),V=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.MultiSelect(this.parent.model,e.target)},e.prototype.focus=function(){t.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(new MouseEvent("mousedown"))},e.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"multi-select"},e}();l.RichTextEditor.Inject(l.HtmlEditor,l.MarkdownEditor,l.Toolbar,l.Link,l.Image,l.QuickToolbar,l.Table);var L=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.rteModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.compObj=new l.RichTextEditor(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),x=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.Slider(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&this.parent.setProperties({value:this.compObj.value.toString()},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),A=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new N(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.TimePicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"time-picker"},e}();return e.parseValue=p,e.render="render",e.update="update",e.destroy="destroy",e.setFocus="set-focus",e.destroyModules="destroy-modules",e.PopupSettings=c,e.modulesList=u,e.ROOT=m,e.ROOT_TIP=y,e.VALUE_WRAPPER="e-editable-value-wrapper",e.VALUE=f,e.OVERLAY_ICON="e-editable-overlay-icon",e.TITLE=v,e.INLINE=b,e.POPUP=E,e.WRAPPER="e-editable-wrapper",e.LOADING="e-editable-loading",e.FORM=O,e.CTRL_GROUP="e-component-group",e.INPUT=g,e.BUTTONS=C,e.EDITABLE_ERROR="e-editable-error",e.ELEMENTS=w,e.OPEN=j,e.BTN_SAVE="e-btn-save",e.BTN_CANCEL="e-btn-cancel",e.OVERLAY="e-overlay",e.ICONS="e-icons",e.PRIMARY="e-primary",e.SHOW="e-show",e.HIDE=k,e.RTL=P,e.ERROR="e-error",e.InPlaceEditor=R,e.Base=N,e.AutoComplete=H,e.ColorPicker=M,e.ComboBox=S,e.DateRangePicker=D,e.MultiSelect=V,e.Rte=L,e.Slider=x,e.TimePicker=A,e}({},ej.base,ej.data,ej.buttons,ej.calendars,ej.inputs,ej.popups,ej.dropdowns,ej.richtexteditor),this.ejs=ej;
this.ej=this.ej||{},this.ej.inplaceeditor=function(e,t,i,o,n,s,r,a,l){"use strict";function p(e,i){var o;if(t.isNullOrUndefined(i)||""===i)return"";switch("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof i||(i=new Date(i)),"DateRange"===e&&"object"==typeof i&&"string"==typeof i[0]&&(i=[new Date(i[0]),new Date(i[1])]),e){case"Color":var n=i;o=n.length>7?n.slice(0,-2):n;break;case"Date":o=i.toLocaleDateString();break;case"DateRange":o=i[0].toLocaleDateString()+" - "+i[1].toLocaleDateString();break;case"DateTime":o=i.toLocaleString().replace(/(.*)\D\d+/,"$1");break;case"Time":o=i.toLocaleTimeString().replace(/(.*)\D\d+/,"$1");break;default:o=i.toString()}return o}var d=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),h=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},c=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return d(i,e),h([t.Property("")],i.prototype,"title",void 0),h([t.Property(null)],i.prototype,"model",void 0),i}(t.ChildProperty),u={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},m={Click:{editAreaClick:"Click to edit"},DblClick:{editAreaDoubleClick:"Double click to edit"}},y="e-inplaceeditor",f="e-inplaceeditor-tip",v="e-editable-value-wrapper",b="e-editable-value",E="e-editable-title",O="e-editable-inline",C="e-editable-popup",g="e-editable-form",w="e-editable-component",j="e-editable-action-buttons",k="e-editable-elements",P="e-editable-open",M="e-hide",B="e-rtl",H=function(){var e=function(t,i){return(e=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])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),T=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;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e){function l(t,i){var o=e.call(this,t,i)||this;return o.initRender=!0,o.isTemplate=!1,o.isExtModule=!1,o.submitBtn=void 0,o.cancelBtn=void 0,o.isClearTarget=!1,o.btnElements=void 0,o.dataManager=void 0,o.divComponents=["RTE","Slider"],o.clearComponents=["AutoComplete","Mask","Text"],o.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"],o.needsID=!0,o}return H(l,e),l.prototype.preRender=function(){t.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:E})},l.prototype.render=function(){this.element.setAttribute("tabindex","0"),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.renderValue(this.checkValue(p(this.type,this.value))),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode),this.setClass("add",this.cssClass)},l.prototype.setClass=function(e,i){this.isEmpty(i)||("add"===e?t.addClass([this.element],[i]):t.removeClass([this.element],[i]))},l.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:v}),this.element.innerHTML="",this.valueEle=this.createElement("span",{className:b}),this.editIcon=this.createElement("span",{className:"e-editable-overlay-icon e-icons",attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},l.prototype.renderValue=function(e){this.valueEle.innerHTML=e,"Color"===this.type&&t.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&t.removeClass([this.valueWrap],[M])},l.prototype.renderEditor=function(){var e=void 0,i=t.select("."+v,this.element);if(!this.valueWrap.classList.contains(P)){if("Inline"===this.mode)this.loaderWidth=this.valueWrap.offsetWidth,t.addClass([this.valueWrap],[M]),this.inlineWrapper=this.createElement("div",{className:O}),this.element.appendChild(this.inlineWrapper),this.renderControl(this.inlineWrapper),this.afterOpenHandler(null);else{var o=this.createElement("div",{className:C});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),e={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:f,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),t.extend(e,this.popupSettings.model,e,!0),this.tipObj=new r.Tooltip(e),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),this.initRender=!1,t.addClass([this.valueWrap],[P]),this.setProperties({enableEditMode:!0},!0)}},l.prototype.setAttribute=function(e,t){var i=this.name&&0!==this.name.length?this.name:this.element.id;t.forEach(function(t){e.setAttribute(t,i)})},l.prototype.renderControl=function(e){var t;this.containerEle=this.createElement("div",{className:"e-editable-wrapper"}),this.loader=this.createElement("div",{className:"e-editable-loading"}),this.formEle=this.createElement("form",{className:g});var i=this.createElement("div",{className:"e-component-group"}),o=this.createElement("div",{className:w});return e.appendChild(this.containerEle),this.containerEle.appendChild(this.loader),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(Array.prototype.indexOf.call(this.divComponents,this.type)>-1?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t)),i.appendChild(o),i.appendChild(this.createElement("div",{className:"e-editable-error"})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},l.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},l.prototype.renderButtons=function(){var e=this.createElement("div",{className:j}),i=t.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" e-primary";return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:"e-btn-save"+i}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:"e-btn-cancel"}),e},l.prototype.createButtons=function(e){var t=void 0;if(Object.keys(e.model).length>0){var i=this.createElement("button",{className:e.className,attrs:{type:e.type,title:this.getLocale(e.title,e.constant)}});e.container.appendChild(i),t=new o.Button(e.model,i)}return t},l.prototype.renderComponent=function(e){if(this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1,t.extend(this.model,this.model,{cssClass:k}),this.model.value=this.value,this.isExtModule)this.notify("render",{module:u[this.type],target:e,type:this.type});else switch(this.model.showClearButton=!0,this.type){case"Date":this.componentObj=new n.DatePicker(this.model,e);break;case"DateTime":this.componentObj=new n.DateTimePicker(this.model,e);break;case"DropDownList":this.componentObj=new a.DropDownList(this.model,e);break;case"Mask":this.componentObj=new s.MaskedTextBox(this.model,e);break;case"Numeric":this.model.value&&(this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"")),this.componentObj=new s.NumericTextBox(this.model,e);break;case"Text":this.componentObj=new s.TextBox(this.model,e)}},l.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new i.UrlAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new i.ODataV4Adaptor}},l.prototype.loadSpinner=function(){t.addClass([this.loader],["e-show"]),t.setStyleAttribute(this.loader,{width:this.loaderWidth+"px"}),this.spinObj={target:this.loader},r.createSpinner(this.spinObj),r.showSpinner(this.spinObj.target),this.formEle&&t.addClass([this.formEle],[M])},l.prototype.removeSpinner=function(){this.loader.removeAttribute("style"),r.hideSpinner(this.spinObj.target),t.detach(this.spinObj.target.firstChild),this.formEle&&t.removeClass([this.formEle],[M]),t.removeClass([this.loader],["e-show"])},l.prototype.getLocale=function(e,i){return new t.L10n("inplace-editor",e,this.locale).getConstant(i)},l.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},l.prototype.setValue=function(){this.isExtModule?this.notify("update",{type:this.type}):this.componentObj&&this.setProperties({value:this.componentObj.value},!0)},l.prototype.getSendValue=function(){return"Mask"===this.type||"Numeric"===this.type?this.value:this.checkValue(p(this.type,this.value))},l.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():"Numeric"===this.type?this.componentRoot.value:p(this.type,this.value)},l.prototype.setRtl=function(e){e?t.addClass([this.element],[B]):t.removeClass([this.element],[B])},l.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify("set-focus",{}):this.componentObj.element.focus())},l.prototype.removeEditor=function(){this.tipObj&&this.formEle&&t.closest(this.formEle,"."+f).classList.add(M),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,t.isNullOrUndefined(t.select("."+O,this.element))?this.tipObj&&("MultiSelect"===this.type&&(t.EventHandler.remove(this.containerEle,"mousedown",this.popMouseDown),t.EventHandler.remove(this.containerEle,"click",this.popClickHandler)),this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(t.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,t.removeClass([this.valueWrap],[P,M]),this.setProperties({enableEditMode:!1},!0)},l.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify("destroy-modules",{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),t.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},l.prototype.destroyButtons=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),t.EventHandler.remove(this.submitBtn.element,"click",this.submitPrevent),this.submitBtn.destroy(),this.submitBtn=void 0),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},l.prototype.getQuery=function(e){var t=new i.Query;return Object.keys(e).forEach(function(i){t.addParams(i,e[i])}),t},l.prototype.sendValue=function(){var e={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};if(this.trigger("actionBegin",e),this.isEmpty(this.url)||this.isEmpty(this.primaryKey)){var t={data:{},value:this.getSendValue()};this.triggerSuccess(t)}else this.dataManager=new i.DataManager({url:this.url,adaptor:this.dataAdaptor}),this.dataManager.executeQuery(this.getQuery(e.data),this.successHandler.bind(this),this.failureHandler.bind(this));this.dataManager=void 0},l.prototype.isEmpty=function(e){return!(!t.isNullOrUndefined(e)&&0!==e.length)},l.prototype.checkIsTemplate=function(){this.isTemplate=!t.isNullOrUndefined(this.template)&&""!==this.template},l.prototype.templateCompile=function(e,i){var o;"string"==typeof i&&(i=i.trim());var n=t.compile(i);t.isNullOrUndefined(n)||(o=n({},this,"template")),!t.isNullOrUndefined(n)&&o.length>0&&[].slice.call(o).forEach(function(t){e.appendChild(t)})},l.prototype.appendTemplate=function(e,i){"string"==typeof i||t.isNullOrUndefined(i.innerHTML)?("."===i[0]||"#"===i[0])&&document.querySelectorAll(i).length?(this.templateEle=document.querySelector(i),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,i):(this.templateEle=i,e.appendChild(this.templateEle))},l.prototype.disable=function(e){e?t.addClass([this.element],["e-disable"]):t.removeClass([this.element],["e-disable"])},l.prototype.enableEditor=function(e){e?this.renderEditor():this.cancelHandler()},l.prototype.checkValidation=function(){var e,i=this;this.validationRules?(this.formValidate=new s.FormValidator(this.formEle,{rules:this.validationRules,validationComplete:function(t){e={errorMessage:t.message,data:{name:i.name,primaryKey:i.primaryKey,value:i.checkValue(i.getSendValue())}},i.trigger("validating",e),"failure"===t.status?(t.errorElement.innerText=e.errorMessage,i.toggleErrorClass(!0)):i.toggleErrorClass(!1)},customPlacement:function(e,o){t.select(".e-editable-error",i.formEle).appendChild(o)}}),this.formValidate.validate()):(e={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",e),e.errorMessage&&"Empty"===e.data.value?(t.select(".e-editable-error",this.formEle).innerHTML=e.errorMessage,this.toggleErrorClass(!0)):this.toggleErrorClass(!1))},l.prototype.toggleErrorClass=function(e){if(!t.isNullOrUndefined(this.formEle)){var i=t.select(".e-input-group",this.formEle);!function(e,i,o){[].slice.call(e).forEach(function(e){e&&("add"===o?t.addClass([e],[i]):t.removeClass([e],[i]))})}([this.formEle,i],"e-error",e?"add":"remove")}},l.prototype.hideForm=function(e){t.isNullOrUndefined(this.formEle)||(e?t.addClass([this.formEle],[M]):t.removeClass([this.formEle],[M]))},l.prototype.updateArrow=function(){var e=this.tipObj.tipPointerPosition;this.tipObj.tipPointerPosition="Middle"===e?"Auto":"Middle",this.tipObj.tipPointerPosition=e,this.tipObj.dataBind()},l.prototype.triggerSuccess=function(e){var t=e.value;this.trigger("actionSuccess",e),this.removeSpinner(),this.hideForm(!1),this.renderValue(this.checkValue(e.value!==t?e.value:this.getRenderValue())),this.removeEditor()},l.prototype.wireEvents=function(){this.wireEditEvent(this.editableOn),t.EventHandler.add(this.editIcon,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),t.EventHandler.add(document,"scroll",this.scrollResizeHandler,this),window.addEventListener("resize",this.scrollResizeHandler.bind(this)),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},l.prototype.wireDocEvent=function(){t.EventHandler.add(document,"mousedown",this.docClickHandler,this)},l.prototype.wireEditEvent=function(e){if("EditIconClick"!==e){var i="Click"===e?"editAreaClick":"editAreaDoubleClick";this.element.setAttribute("title",this.getLocale(m[e],i)),t.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this)}},l.prototype.wireEditorKeyDownEvent=function(e){t.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},l.prototype.wireBtnEvents=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),t.EventHandler.add(this.submitBtn.element,"click",this.submitPrevent,this)),t.isNullOrUndefined(this.cancelBtn)||t.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelHandler,this)},l.prototype.submitPrevent=function(e){e.preventDefault()},l.prototype.unWireEvents=function(){this.unWireEditEvent(this.editableOn),t.EventHandler.remove(this.editIcon,"click",this.clickHandler),t.EventHandler.remove(document,"scroll",this.scrollResizeHandler),window.removeEventListener("resize",this.scrollResizeHandler.bind(this)),t.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},l.prototype.unWireDocEvent=function(){t.EventHandler.remove(document,"mousedown",this.docClickHandler)},l.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&(this.element.removeAttribute("title"),t.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler))},l.prototype.unWireEditorKeyDownEvent=function(e){t.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},l.prototype.afterOpenHandler=function(e){"Popup"===this.mode&&"MultiSelect"===this.type&&(t.EventHandler.add(this.containerEle,"mousedown",this.popMouseDown,this),t.EventHandler.add(this.containerEle,"click",this.popClickHandler,this)),"Popup"!==this.mode||this.isEmpty(this.titleEle.innerHTML)||e.element.classList.add("e-editable-tip-title"),"RTE"===this.type?this.rteModule.refresh():"Slider"===this.type&&this.sliderModule.refresh(),this.setFocus()},l.prototype.popMouseDown=function(e){var t=e.target.classList;t.contains("e-chips-close")&&!t.contains("e-close-hooker")&&this.updateArrow()},l.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},l.prototype.submitHandler=function(e){e.preventDefault(),this.save()},l.prototype.cancelHandler=function(){this.removeEditor()},l.prototype.popClickHandler=function(e){var i=t.select("."+v,this.element);e.target.classList.contains("e-chips-close")&&this.tipObj.refresh(i)},l.prototype.successHandler=function(e){var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},l.prototype.failureHandler=function(e){var t={data:e,value:this.getSendValue()};this.trigger("actionFailure",t),this.removeSpinner(),this.hideForm(!1),"Popup"===this.mode&&this.updateArrow()},l.prototype.enterKeyDownHandler=function(e){(13===e.keyCode&&13===e.which||27===e.keyCode&&27===e.which)&&this.save()},l.prototype.valueKeyDownHandler=function(e){13!==e.keyCode||13!==e.which||!e.target.classList.contains(y)||this.valueWrap.classList.contains(P)||this.element.classList.contains("e-disable")||(e.preventDefault(),this.renderEditor())},l.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},l.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&this.removeEditor()},l.prototype.docClickHandler=function(e){var i=e.target;if(this.isClearTarget)return void(this.isClearTarget=!1);var o=t.closest(i,"."+y),n=t.closest(i,"."+f),s=t.closest(i,"."+k),r=t.closest(i,".e-rte-elements");!t.isNullOrUndefined(o)&&o.isEqualNode(this.element)||!t.isNullOrUndefined(n)&&this.tipObj&&n.id.indexOf(this.valueWrap.id)>-1||!t.isNullOrUndefined(s)||!t.isNullOrUndefined(r)||i.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler())},l.prototype.validate=function(){this.checkValidation()},l.prototype.save=function(){this.element.focus(),this.editEle=t.select("."+w,this.formEle),t.select(".e-error",this.editEle)&&t.isNullOrUndefined(this.validationRules)||(this.isTemplate||this.setValue(),this.checkValidation(),this.formEle.classList.contains("e-error")||(this.loadSpinner(),this.hideForm(!0),"Popup"===this.mode&&this.updateArrow(),this.sendValue()))},l.prototype.destroy=function(){var i=this;for(this.removeEditor(),this.isExtModule&&this.notify("destroy",{}),this.unWireEvents(),[y,"e-disable",B].forEach(function(e){t.removeClass([i.element],[e])});this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.prototype.destroy.call(this)},l.prototype.getPersistData=function(){return this.addOnPersist(["value"])},l.prototype.requiredModules=function(){var e=[];return e.push({member:u[this.type],args:[this]}),e},l.prototype.getModuleName=function(){return"inplaceeditor"},l.prototype.onPropertyChanged=function(e,t){this.removeEditor();for(var i=0,o=Object.keys(e);i<o.length;i++)switch(o[i]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":case"emptyText":this.renderValue(this.checkValue(p(this.type,this.value)));break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled);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)}},T([t.Property("")],l.prototype,"name",void 0),T([t.Property(null)],l.prototype,"value",void 0),T([t.Property("")],l.prototype,"template",void 0),T([t.Property("")],l.prototype,"cssClass",void 0),T([t.Property("")],l.prototype,"primaryKey",void 0),T([t.Property("Empty")],l.prototype,"emptyText",void 0),T([t.Property("")],l.prototype,"url",void 0),T([t.Property("Popup")],l.prototype,"mode",void 0),T([t.Property("UrlAdaptor")],l.prototype,"adaptor",void 0),T([t.Property("Text")],l.prototype,"type",void 0),T([t.Property("Click")],l.prototype,"editableOn",void 0),T([t.Property("Submit")],l.prototype,"actionOnBlur",void 0),T([t.Property(!1)],l.prototype,"enableRtl",void 0),T([t.Property(!1)],l.prototype,"enablePersistence",void 0),T([t.Property(!1)],l.prototype,"disabled",void 0),T([t.Property(!0)],l.prototype,"showButtons",void 0),T([t.Property(!1)],l.prototype,"enableEditMode",void 0),T([t.Property(!0)],l.prototype,"submitOnEnter",void 0),T([t.Complex({},c)],l.prototype,"popupSettings",void 0),T([t.Property(null)],l.prototype,"model",void 0),T([t.Property({iconCss:"e-icons e-save-icon"})],l.prototype,"saveButton",void 0),T([t.Property({iconCss:"e-icons e-cancel-icon"})],l.prototype,"cancelButton",void 0),T([t.Property(null)],l.prototype,"validationRules",void 0),T([t.Event()],l.prototype,"created",void 0),T([t.Event()],l.prototype,"actionBegin",void 0),T([t.Event()],l.prototype,"actionSuccess",void 0),T([t.Event()],l.prototype,"actionFailure",void 0),T([t.Event()],l.prototype,"validating",void 0),T([t.Event()],l.prototype,"destroyed",void 0),l=T([t.NotifyPropertyChanges],l)}(t.Component),R=function(){function e(e,t){this.parent=e,this.module=t,this.addEventListener()}return e.prototype.render=function(e){this.module.render(e)},e.prototype.focus=function(){this.module.focus()},e.prototype.update=function(e){this.module.updateValue(e)},e.prototype.destroyComponent=function(){t.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},e.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on("render",this.render,this),this.parent.on("set-focus",this.focus,this),this.parent.on("update",this.update,this),this.parent.on("destroy-modules",this.destroyComponent,this),this.parent.on("destroy",this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("render",this.render),this.parent.off("set-focus",this.focus),this.parent.off("update",this.update),this.parent.off("destroy-modules",this.destroyComponent),this.parent.off("destroy",this.destroy))},e}(),N=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.AutoComplete(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),S=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.ColorPicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),L=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.ComboBox(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"combo-box"},e}(),A=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"date-range-picker"},e}(),V=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new a.MultiSelect(this.parent.model,e.target)},e.prototype.focus=function(){t.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(new MouseEvent("mousedown"))},e.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"multi-select"},e}();l.RichTextEditor.Inject(l.HtmlEditor,l.MarkdownEditor,l.Toolbar,l.Link,l.Image,l.QuickToolbar,l.Table);var x=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.rteModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.compObj=new l.RichTextEditor(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),I=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.compObj=new s.Slider(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&this.parent.setProperties({value:this.compObj.value.toString()},!0)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),W=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new R(this.parent,this)}return e.prototype.render=function(e){this.parent.model.showClearButton=!0,this.compObj=new n.TimePicker(this.parent.model,e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&this.parent.setProperties({value:this.compObj.value},!0)},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"time-picker"},e}();return e.parseValue=p,e.render="render",e.update="update",e.destroy="destroy",e.setFocus="set-focus",e.destroyModules="destroy-modules",e.PopupSettings=c,e.modulesList=u,e.localeConstant=m,e.ROOT=y,e.ROOT_TIP=f,e.VALUE_WRAPPER=v,e.VALUE=b,e.OVERLAY_ICON="e-editable-overlay-icon",e.TIP_TITLE="e-editable-tip-title",e.TITLE=E,e.INLINE=O,e.POPUP=C,e.WRAPPER="e-editable-wrapper",e.LOADING="e-editable-loading",e.FORM=g,e.CTRL_GROUP="e-component-group",e.INPUT=w,e.BUTTONS=j,e.EDITABLE_ERROR="e-editable-error",e.ELEMENTS=k,e.OPEN=P,e.BTN_SAVE="e-btn-save",e.BTN_CANCEL="e-btn-cancel",e.DISABLE="e-disable",e.ICONS="e-icons",e.PRIMARY="e-primary",e.SHOW="e-show",e.HIDE=M,e.RTL=B,e.ERROR="e-error",e.InPlaceEditor=D,e.Base=R,e.AutoComplete=N,e.ColorPicker=S,e.ComboBox=L,e.DateRangePicker=A,e.MultiSelect=V,e.Rte=x,e.Slider=I,e.TimePicker=W,e}({},ej.base,ej.data,ej.buttons,ej.calendars,ej.inputs,ej.popups,ej.dropdowns,ej.richtexteditor),this.ejs=ej;
//# sourceMappingURL=ej2-inplace-editor.min.js.map
/*!
* filename: index.d.ts
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-inplace-editor",
"version": "16.4.40-beta",
"version": "16.4.42",
"description": "A package of Essential JS 2 Inplace editor components, which is used to edit and update the value dynamically in server.",

@@ -11,13 +11,13 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~16.4.40-beta",
"@syncfusion/ej2-data": "~16.4.40-beta",
"@syncfusion/ej2-lists": "~16.4.40-beta",
"@syncfusion/ej2-inputs": "~16.4.40-beta",
"@syncfusion/ej2-popups": "~16.4.40-beta",
"@syncfusion/ej2-buttons": "~16.4.40-beta",
"@syncfusion/ej2-dropdowns": "~16.4.40-beta",
"@syncfusion/ej2-calendars": "~16.4.40-beta",
"@syncfusion/ej2-navigations": "~16.4.40-beta",
"@syncfusion/ej2-splitbuttons": "~16.4.40-beta",
"@syncfusion/ej2-richtexteditor": "~16.4.40-beta"
"@syncfusion/ej2-base": "~16.4.42",
"@syncfusion/ej2-data": "~16.4.42",
"@syncfusion/ej2-lists": "~16.4.42",
"@syncfusion/ej2-inputs": "~16.4.42",
"@syncfusion/ej2-popups": "~16.4.42",
"@syncfusion/ej2-buttons": "~16.4.42",
"@syncfusion/ej2-dropdowns": "~16.4.42",
"@syncfusion/ej2-calendars": "~16.4.42",
"@syncfusion/ej2-navigations": "~16.4.42",
"@syncfusion/ej2-splitbuttons": "~16.4.42",
"@syncfusion/ej2-richtexteditor": "~16.4.42"
},

@@ -24,0 +24,0 @@ "devDependencies": {

@@ -15,2 +15,4 @@ /**

/** @hidden */
export declare const TIP_TITLE: string;
/** @hidden */
export declare const TITLE: string;

@@ -44,3 +46,3 @@ /** @hidden */

/** @hidden */
export declare const OVERLAY: string;
export declare const DISABLE: string;
/** @hidden */

@@ -47,0 +49,0 @@ export declare const ICONS: string;

@@ -15,2 +15,4 @@ /**

/** @hidden */
export var TIP_TITLE = 'e-editable-tip-title';
/** @hidden */
export var TITLE = 'e-editable-title';

@@ -44,3 +46,3 @@ /** @hidden */

/** @hidden */
export var OVERLAY = 'e-overlay';
export var DISABLE = 'e-disable';
/** @hidden */

@@ -47,0 +49,0 @@ export var ICONS = 'e-icons';

@@ -1,2 +0,2 @@

import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, Event, EmitType, select } from '@syncfusion/ej2-base';import { detach, addClass, removeClass, EventHandler, setStyleAttribute, Complex, ModuleDeclaration } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, closest, extend, L10n, compile } from '@syncfusion/ej2-base';import { DataManager, UrlAdaptor, Query, WebApiAdaptor, ODataV4Adaptor } from '@syncfusion/ej2-data';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';import { RichTextEditorModel } from '@syncfusion/ej2-richtexteditor';import { DatePicker, DatePickerModel, DateTimePicker } from '@syncfusion/ej2-calendars';import { DateTimePickerModel, DateRangePickerModel, TimePickerModel } from '@syncfusion/ej2-calendars';import { NumericTextBox, NumericTextBoxModel, TextBox, TextBoxModel } from '@syncfusion/ej2-inputs';import { createSpinner, hideSpinner, SpinnerArgs, showSpinner, Tooltip } from '@syncfusion/ej2-popups';import { ColorPickerModel, FormValidator, MaskedTextBox, MaskedTextBoxModel, SliderModel } from '@syncfusion/ej2-inputs';import { AutoCompleteModel, ComboBoxModel, DropDownList, DropDownListModel, MultiSelectModel } from '@syncfusion/ej2-dropdowns';import { Rte } from '../modules/rte';import { Slider } from '../modules/slider';import { ComboBox } from '../modules/combo-box';import { TimePicker } from '../modules/time-picker';import { MultiSelect } from '../modules/multi-select';import { ColorPicker } from '../modules/color-picker';import { AutoComplete } from '../modules/auto-complete';import { DateRangePicker } from '../modules/date-range-picker';import * as events from './events';import * as classes from './classes';import { PopupSettings, modulesList } from './models';import { PopupSettingsModel } from './models-model';import { ActionBeginEventArgs, ActionEventArgs, FormEventArgs, ValidateEventArgs, IButton } from './interface';import { parseValue } from './util';
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, Event, EmitType, select } from '@syncfusion/ej2-base';import { detach, addClass, removeClass, EventHandler, setStyleAttribute, Complex, ModuleDeclaration } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, closest, extend, L10n, compile } from '@syncfusion/ej2-base';import { DataManager, UrlAdaptor, Query, WebApiAdaptor, ODataV4Adaptor } from '@syncfusion/ej2-data';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';import { RichTextEditorModel } from '@syncfusion/ej2-richtexteditor';import { DatePicker, DatePickerModel, DateTimePicker } from '@syncfusion/ej2-calendars';import { DateTimePickerModel, DateRangePickerModel, TimePickerModel } from '@syncfusion/ej2-calendars';import { NumericTextBox, NumericTextBoxModel, TextBox, TextBoxModel } from '@syncfusion/ej2-inputs';import { createSpinner, hideSpinner, SpinnerArgs, showSpinner } from '@syncfusion/ej2-popups';import { Tooltip, TooltipEventArgs, TipPointerPosition } from '@syncfusion/ej2-popups';import { ColorPickerModel, FormValidator, MaskedTextBox, MaskedTextBoxModel, SliderModel } from '@syncfusion/ej2-inputs';import { AutoCompleteModel, ComboBoxModel, DropDownList, DropDownListModel, MultiSelectModel } from '@syncfusion/ej2-dropdowns';import { Rte } from '../modules/rte';import { Slider } from '../modules/slider';import { ComboBox } from '../modules/combo-box';import { TimePicker } from '../modules/time-picker';import { MultiSelect } from '../modules/multi-select';import { ColorPicker } from '../modules/color-picker';import { AutoComplete } from '../modules/auto-complete';import { DateRangePicker } from '../modules/date-range-picker';import * as events from './events';import * as classes from './classes';import { PopupSettings, modulesList, localeConstant } from './models';import { PopupSettingsModel } from './models-model';import { ActionBeginEventArgs, ActionEventArgs, FormEventArgs, ValidateEventArgs, IButton } from './interface';import { parseValue } from './util';
import {RenderMode,AdaptorType,InputType,EditableType,ActionBlur} from "./inplace-editor";

@@ -3,0 +3,0 @@ import {ComponentModel} from '@syncfusion/ej2-base';

@@ -79,2 +79,3 @@ import { Component, INotifyPropertyChanged, EmitType } from '@syncfusion/ej2-base';

private moduleList;
private editEle;
/**

@@ -329,2 +330,3 @@ * @hidden

private hideForm;
private updateArrow;
private triggerSuccess;

@@ -336,2 +338,3 @@ private wireEvents;

private wireBtnEvents;
private submitPrevent;
private unWireEvents;

@@ -342,5 +345,7 @@ private unWireDocEvent;

private afterOpenHandler;
private popMouseDown;
private clickHandler;
private submitHandler;
private cancelHandler;
private popClickHandler;
private successHandler;

@@ -347,0 +352,0 @@ private failureHandler;

@@ -27,3 +27,4 @@ var __extends = (this && this.__extends) || (function () {

import { NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
import { createSpinner, hideSpinner, showSpinner, Tooltip } from '@syncfusion/ej2-popups';
import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
import { Tooltip } from '@syncfusion/ej2-popups';
import { FormValidator, MaskedTextBox } from '@syncfusion/ej2-inputs';

@@ -35,3 +36,3 @@ import { DropDownList } from '@syncfusion/ej2-dropdowns';

/* Models */
import { PopupSettings, modulesList } from './models';
import { PopupSettings, modulesList, localeConstant } from './models';
/* Interface */

@@ -98,3 +99,3 @@ import { parseValue } from './util';

this.setRtl(this.enableRtl);
this.enableEditor();
this.enableEditor(this.enableEditMode);
this.setClass('add', this.cssClass);

@@ -140,3 +141,3 @@ };

this.renderControl(this.inlineWrapper);
this.afterOpenHandler();
this.afterOpenHandler(null);
}

@@ -165,2 +166,3 @@ else {

addClass([this.valueWrap], [classes.OPEN]);
this.setProperties({ enableEditMode: true }, true);
};

@@ -270,4 +272,3 @@ InPlaceEditor.prototype.setAttribute = function (ele, attr) {

if (this.model.value) {
var val = this.model.value.toString().replace(/[`~!@#$%^&*()_|+\-=?;:'",<>\{\}\[\]\\\/]/gi, '');
this.model.value = parseInt(val, 10);
this.model.value = this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi, '');
}

@@ -362,2 +363,6 @@ this.componentObj = new NumericTextBox(this.model, ele);

else if (this.tipObj) {
if (this.type === 'MultiSelect') {
EventHandler.remove(this.containerEle, 'mousedown', this.popMouseDown);
EventHandler.remove(this.containerEle, 'click', this.popClickHandler);
}
this.tipObj.close();

@@ -369,2 +374,3 @@ this.tipObj.destroy();

removeClass([this.valueWrap], [classes.OPEN, classes.HIDE]);
this.setProperties({ enableEditMode: false }, true);
};

@@ -399,2 +405,3 @@ InPlaceEditor.prototype.destroyComponents = function () {

EventHandler.remove(this.submitBtn.element, 'mousedown', this.submitHandler);
EventHandler.remove(this.submitBtn.element, 'click', this.submitPrevent);
this.submitBtn.destroy();

@@ -473,8 +480,6 @@ this.submitBtn = undefined;

InPlaceEditor.prototype.disable = function (value) {
value ? addClass([this.element], [classes.OVERLAY]) : removeClass([this.element], [classes.OVERLAY]);
value ? addClass([this.element], [classes.DISABLE]) : removeClass([this.element], [classes.DISABLE]);
};
InPlaceEditor.prototype.enableEditor = function () {
if (this.enableEditMode) {
this.renderEditor();
}
InPlaceEditor.prototype.enableEditor = function (val) {
(val) ? this.renderEditor() : this.cancelHandler();
};

@@ -542,2 +547,8 @@ InPlaceEditor.prototype.checkValidation = function () {

};
InPlaceEditor.prototype.updateArrow = function () {
var pos = this.tipObj.tipPointerPosition;
this.tipObj.tipPointerPosition = (pos === 'Middle') ? 'Auto' : 'Middle';
this.tipObj.tipPointerPosition = pos;
this.tipObj.dataBind();
};
InPlaceEditor.prototype.triggerSuccess = function (args) {

@@ -565,2 +576,7 @@ var val = args.value;

InPlaceEditor.prototype.wireEditEvent = function (event) {
if (event === 'EditIconClick') {
return;
}
var titleConstant = (event === 'Click') ? 'editAreaClick' : 'editAreaDoubleClick';
this.element.setAttribute('title', this.getLocale(localeConstant[event], titleConstant));
EventHandler.add(this.valueWrap, event.toLowerCase(), this.clickHandler, this);

@@ -574,2 +590,3 @@ };

EventHandler.add(this.submitBtn.element, 'mousedown', this.submitHandler, this);
EventHandler.add(this.submitBtn.element, 'click', this.submitPrevent, this);
}

@@ -580,2 +597,5 @@ if (!isNOU(this.cancelBtn)) {

};
InPlaceEditor.prototype.submitPrevent = function (e) {
e.preventDefault();
};
InPlaceEditor.prototype.unWireEvents = function () {

@@ -598,2 +618,3 @@ this.unWireEditEvent(this.editableOn);

}
this.element.removeAttribute('title');
EventHandler.remove(this.valueWrap, event.toLowerCase(), this.clickHandler);

@@ -604,3 +625,10 @@ };

};
InPlaceEditor.prototype.afterOpenHandler = function () {
InPlaceEditor.prototype.afterOpenHandler = function (e) {
if (this.mode === 'Popup' && this.type === 'MultiSelect') {
EventHandler.add(this.containerEle, 'mousedown', this.popMouseDown, this);
EventHandler.add(this.containerEle, 'click', this.popClickHandler, this);
}
if (this.mode === 'Popup' && !this.isEmpty(this.titleEle.innerHTML)) {
e.element.classList.add(classes.TIP_TITLE);
}
if (this.type === 'RTE') {

@@ -614,2 +642,8 @@ this.rteModule.refresh();

};
InPlaceEditor.prototype.popMouseDown = function (e) {
var trgClass = e.target.classList;
if (trgClass.contains('e-chips-close') && !trgClass.contains('e-close-hooker')) {
this.updateArrow();
}
};
InPlaceEditor.prototype.clickHandler = function (e) {

@@ -628,2 +662,8 @@ if (this.editableOn !== 'EditIconClick') {

};
InPlaceEditor.prototype.popClickHandler = function (e) {
var tipTarget = select('.' + classes.VALUE_WRAPPER, this.element);
if (e.target.classList.contains('e-chips-close')) {
this.tipObj.refresh(tipTarget);
}
};
InPlaceEditor.prototype.successHandler = function (e) {

@@ -638,2 +678,5 @@ var eventArgs = { data: e, value: this.getSendValue() };

this.hideForm(false);
if (this.mode === 'Popup') {
this.updateArrow();
}
};

@@ -647,3 +690,3 @@ InPlaceEditor.prototype.enterKeyDownHandler = function (e) {

if ((e.keyCode === 13 && e.which === 13) && e.target.classList.contains(classes.ROOT) &&
!this.valueWrap.classList.contains(classes.OPEN)) {
!this.valueWrap.classList.contains(classes.OPEN) && !this.element.classList.contains(classes.DISABLE)) {
e.preventDefault();

@@ -700,2 +743,6 @@ this.renderEditor();

this.element.focus();
this.editEle = select('.' + classes.INPUT, this.formEle);
if (select('.' + classes.ERROR, this.editEle) && isNOU(this.validationRules)) {
return;
}
if (!this.isTemplate) {

@@ -708,2 +755,5 @@ this.setValue();

this.hideForm(true);
if (this.mode === 'Popup') {
this.updateArrow();
}
this.sendValue();

@@ -723,3 +773,3 @@ }

this.unWireEvents();
var classList = [classes.ROOT, classes.OVERLAY, classes.RTL];
var classList = [classes.ROOT, classes.DISABLE, classes.RTL];
classList.forEach(function (val) {

@@ -791,4 +841,6 @@ removeClass([_this.element], [val]);

case 'mode':
this.enableEditor(this.enableEditMode);
break;
case 'enableEditMode':
this.enableEditor();
this.enableEditor(newProp.enableEditMode);
break;

@@ -795,0 +847,0 @@ case 'editableOn':

@@ -40,3 +40,3 @@ import { ButtonModel } from '@syncfusion/ej2-buttons';

/** Defines the data manager action result. */
data: object;
data: Object;
/** Defines the current editor value */

@@ -43,0 +43,0 @@ value: string;

@@ -24,1 +24,7 @@ import { ChildProperty } from '@syncfusion/ej2-base';

};
/**
* @hidden
*/
export declare let localeConstant: {
[key: string]: object;
};

@@ -51,1 +51,8 @@ var __extends = (this && this.__extends) || (function () {

};
/**
* @hidden
*/
export var localeConstant = {
'Click': { 'editAreaClick': 'Click to edit' },
'DblClick': { 'editAreaDoubleClick': 'Double click to edit' }
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc