@syncfusion/ej2-inplace-editor 31.2.12 → 32.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +4 -31
- package/README.md +1 -2
- package/dist/ej2-inplace-editor.min.js +0 -9
- package/dist/ej2-inplace-editor.umd.min.js +0 -9
- package/dist/global/ej2-inplace-editor.min.js +0 -9
- package/dist/global/index.d.ts +0 -9
- package/package.json +13 -13
- package/styles/bds-lite.css +6 -6
- package/styles/bds-lite.scss +25 -26
- package/styles/bds.css +6 -6
- package/styles/bds.scss +26 -27
- package/styles/bootstrap-dark-lite.scss +25 -26
- package/styles/bootstrap-dark.scss +26 -27
- package/styles/bootstrap-lite.scss +25 -26
- package/styles/bootstrap.scss +26 -27
- package/styles/bootstrap4-lite.scss +25 -26
- package/styles/bootstrap4.scss +26 -27
- package/styles/bootstrap5-dark-lite.scss +25 -26
- package/styles/bootstrap5-dark.scss +26 -27
- package/styles/bootstrap5-lite.scss +26 -26
- package/styles/bootstrap5.3-lite.css +88 -8
- package/styles/bootstrap5.3-lite.scss +26 -26
- package/styles/bootstrap5.3.css +88 -8
- package/styles/bootstrap5.3.scss +27 -27
- package/styles/bootstrap5.scss +27 -27
- package/styles/fabric-dark-lite.scss +26 -26
- package/styles/fabric-dark.scss +27 -27
- package/styles/fabric-lite.scss +26 -26
- package/styles/fabric.scss +27 -27
- package/styles/fluent-dark-lite.scss +26 -26
- package/styles/fluent-dark.scss +27 -27
- package/styles/fluent-lite.scss +26 -26
- package/styles/fluent.scss +27 -27
- package/styles/fluent2-lite.css +245 -13
- package/styles/fluent2-lite.scss +26 -26
- package/styles/fluent2.css +245 -13
- package/styles/fluent2.scss +27 -27
- package/styles/highcontrast-light-lite.scss +26 -26
- package/styles/highcontrast-light.scss +27 -27
- package/styles/highcontrast-lite.scss +26 -26
- package/styles/highcontrast.scss +27 -27
- package/styles/inplace-editor/_all.scss +2 -2
- package/styles/inplace-editor/_bds-definition.scss +11 -0
- package/styles/inplace-editor/_bigger.scss +8 -6
- package/styles/inplace-editor/_bootstrap-dark-definition.scss +10 -0
- package/styles/inplace-editor/_bootstrap-definition.scss +10 -0
- package/styles/inplace-editor/_bootstrap4-definition.scss +9 -0
- package/styles/inplace-editor/_bootstrap5-dark-definition.scss +80 -1
- package/styles/inplace-editor/_bootstrap5-definition.scss +11 -0
- package/styles/inplace-editor/_bootstrap5.3-definition.scss +13 -2
- package/styles/inplace-editor/_fabric-dark-definition.scss +10 -0
- package/styles/inplace-editor/_fabric-definition.scss +10 -0
- package/styles/inplace-editor/_fluent-dark-definition.scss +80 -1
- package/styles/inplace-editor/_fluent-definition.scss +10 -0
- package/styles/inplace-editor/_fluent2-definition.scss +12 -2
- package/styles/inplace-editor/_fusionnew-definition.scss +10 -0
- package/styles/inplace-editor/_highcontrast-definition.scss +10 -0
- package/styles/inplace-editor/_highcontrast-light-definition.scss +10 -0
- package/styles/inplace-editor/_layout.scss +25 -23
- package/styles/inplace-editor/_material-dark-definition.scss +10 -0
- package/styles/inplace-editor/_material-definition.scss +10 -0
- package/styles/inplace-editor/_material3-dark-definition.scss +72 -1
- package/styles/inplace-editor/_material3-definition.scss +12 -3
- package/styles/inplace-editor/_tailwind-dark-definition.scss +81 -1
- package/styles/inplace-editor/_tailwind-definition.scss +11 -0
- package/styles/inplace-editor/_tailwind3-definition.scss +14 -2
- package/styles/inplace-editor/_theme-variables.scss +1 -0
- package/styles/inplace-editor/_theme.scss +2 -1
- package/styles/inplace-editor/bds.css +6 -6
- package/styles/inplace-editor/bds.scss +27 -27
- package/styles/inplace-editor/bootstrap-dark.scss +27 -27
- package/styles/inplace-editor/bootstrap.scss +27 -27
- package/styles/inplace-editor/bootstrap4.scss +27 -27
- package/styles/inplace-editor/bootstrap5-dark.scss +27 -27
- package/styles/inplace-editor/bootstrap5.3.css +88 -8
- package/styles/inplace-editor/bootstrap5.3.scss +27 -27
- package/styles/inplace-editor/bootstrap5.scss +27 -27
- package/styles/inplace-editor/fabric-dark.scss +27 -27
- package/styles/inplace-editor/fabric.scss +27 -27
- package/styles/inplace-editor/fluent-dark.scss +27 -27
- package/styles/inplace-editor/fluent.scss +27 -27
- package/styles/inplace-editor/fluent2.css +245 -13
- package/styles/inplace-editor/fluent2.scss +27 -27
- package/styles/inplace-editor/highcontrast-light.scss +27 -27
- package/styles/inplace-editor/highcontrast.scss +27 -27
- package/styles/inplace-editor/icons/_bds.scss +1 -0
- package/styles/inplace-editor/icons/_bootstrap-dark.scss +2 -1
- package/styles/inplace-editor/icons/_bootstrap.scss +2 -1
- package/styles/inplace-editor/icons/_bootstrap4.scss +2 -1
- package/styles/inplace-editor/icons/_bootstrap5-dark.scss +1 -1
- package/styles/inplace-editor/icons/_bootstrap5.3.scss +1 -0
- package/styles/inplace-editor/icons/_bootstrap5.scss +1 -0
- package/styles/inplace-editor/icons/_fabric-dark.scss +2 -1
- package/styles/inplace-editor/icons/_fabric.scss +2 -1
- package/styles/inplace-editor/icons/_fluent-dark.scss +1 -1
- package/styles/inplace-editor/icons/_fluent.scss +1 -0
- package/styles/inplace-editor/icons/_fluent2.scss +1 -0
- package/styles/inplace-editor/icons/_fusionnew.scss +1 -0
- package/styles/inplace-editor/icons/_highcontrast-light.scss +2 -1
- package/styles/inplace-editor/icons/_highcontrast.scss +2 -1
- package/styles/inplace-editor/icons/_material-dark.scss +2 -1
- package/styles/inplace-editor/icons/_material.scss +2 -1
- package/styles/inplace-editor/icons/_material3-dark.scss +1 -1
- package/styles/inplace-editor/icons/_material3.scss +1 -0
- package/styles/inplace-editor/icons/_tailwind-dark.scss +1 -1
- package/styles/inplace-editor/icons/_tailwind.scss +1 -0
- package/styles/inplace-editor/icons/_tailwind3.scss +1 -0
- package/styles/inplace-editor/material-dark.scss +27 -27
- package/styles/inplace-editor/material.scss +27 -27
- package/styles/inplace-editor/material3-dark.css +427 -4
- package/styles/inplace-editor/material3-dark.scss +27 -28
- package/styles/inplace-editor/material3.css +431 -8
- package/styles/inplace-editor/material3.scss +27 -28
- package/styles/inplace-editor/tailwind-dark.scss +27 -27
- package/styles/inplace-editor/tailwind.scss +27 -27
- package/styles/inplace-editor/tailwind3.css +127 -9
- package/styles/inplace-editor/tailwind3.scss +27 -27
- package/styles/material-dark-lite.scss +26 -26
- package/styles/material-dark.scss +27 -27
- package/styles/material-lite.scss +25 -26
- package/styles/material.scss +26 -27
- package/styles/material3-dark-lite.css +427 -4
- package/styles/material3-dark-lite.scss +26 -26
- package/styles/material3-dark.css +427 -4
- package/styles/material3-dark.scss +27 -29
- package/styles/material3-lite.css +431 -8
- package/styles/material3-lite.scss +26 -26
- package/styles/material3.css +431 -8
- package/styles/material3.scss +27 -29
- package/styles/tailwind-dark-lite.scss +26 -26
- package/styles/tailwind-dark.scss +27 -27
- package/styles/tailwind-lite.scss +26 -26
- package/styles/tailwind.scss +27 -27
- package/styles/tailwind3-lite.css +127 -9
- package/styles/tailwind3-lite.scss +26 -26
- package/styles/tailwind3.css +127 -9
- package/styles/tailwind3.scss +27 -27
- package/tslint.json +0 -111
package/.eslintrc.json
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
"extends": [
|
|
7
7
|
"eslint:recommended",
|
|
8
8
|
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"plugin:jsdoc/recommended"
|
|
10
|
-
"plugin:security/recommended"
|
|
9
|
+
"plugin:jsdoc/recommended"
|
|
11
10
|
],
|
|
12
11
|
"parser": "@typescript-eslint/parser",
|
|
13
12
|
"parserOptions": {
|
|
@@ -15,42 +14,16 @@
|
|
|
15
14
|
"ecmaVersion": 2018,
|
|
16
15
|
"project": "./tsconfig.json",
|
|
17
16
|
"sourceType": "module"
|
|
18
|
-
|
|
19
|
-
"ignorePatterns": ["*.d.ts", "*.js"],
|
|
17
|
+
},
|
|
20
18
|
"plugins": [
|
|
21
19
|
"@typescript-eslint",
|
|
22
20
|
"@typescript-eslint/tslint",
|
|
23
|
-
"eslint-plugin-security",
|
|
24
21
|
"jsdoc"
|
|
25
22
|
],
|
|
26
23
|
"rules": {
|
|
27
24
|
"use-isnan": "error",
|
|
28
|
-
"
|
|
29
|
-
"security/detect-buffer-noassert":"error",
|
|
30
|
-
"security/detect-child-process":"error",
|
|
31
|
-
"security/detect-disable-mustache-escape":"error",
|
|
32
|
-
"security/detect-eval-with-expression":"error",
|
|
33
|
-
"security/detect-no-csrf-before-method-override":"error",
|
|
34
|
-
"security/detect-non-literal-fs-filename":"error",
|
|
35
|
-
"security/detect-non-literal-regexp":"error",
|
|
36
|
-
"security/detect-non-literal-require":"error",
|
|
37
|
-
"security/detect-object-injection":"error",
|
|
38
|
-
"security/detect-possible-timing-attacks":"error",
|
|
39
|
-
"security/detect-pseudoRandomBytes":"error",
|
|
40
|
-
"security/detect-new-buffer":"error",
|
|
41
|
-
"security/detect-bidi-characters":"error",
|
|
42
|
-
"no-prototype-builtins": "warn",
|
|
43
|
-
"no-extend-native": ["warn"],
|
|
25
|
+
"jsdoc/check-tag-names": ["error", { "definedTags": ["hidden", "isGenericType", "isDataSource", "aspType", "blazorDefaultValue", "aspDefaultValueIgnore", "blazorDefaultValueIgnore", "aspIgnore", "isEnumeration", "blazorType", "blazorProperty"] }],
|
|
44
26
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
45
|
-
"@typescript-eslint/ban-types": ["warn", {
|
|
46
|
-
"types": {
|
|
47
|
-
"Object": false,
|
|
48
|
-
"object": false,
|
|
49
|
-
"{}": false,
|
|
50
|
-
"Function": false
|
|
51
|
-
}
|
|
52
|
-
}],
|
|
53
|
-
"jsdoc/check-tag-names": 0,
|
|
54
27
|
"@typescript-eslint/tslint/config": [
|
|
55
28
|
"error",
|
|
56
29
|
{
|
|
@@ -187,7 +160,7 @@
|
|
|
187
160
|
"error",
|
|
188
161
|
"never"
|
|
189
162
|
],
|
|
190
|
-
"@typescript-eslint/no-explicit-any": "
|
|
163
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
191
164
|
"no-cond-assign": [
|
|
192
165
|
"error",
|
|
193
166
|
"always"
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# JavaScript In-place Editor Control
|
|
2
2
|
|
|
3
3
|
The [JavaScript In-place Editor](https://www.syncfusion.com/javascript-ui-controls/inplace-editor?utm_source=npm&utm_medium=listing&utm_campaign=javascript-inplace-editor-npm) is a rich and responsive UI component that enables inline editing of text, selection, date, and more without switching to a separate edit view. It supports “Inline” and “Popup” edit modes, integrates with form components like DropDownList and DatePicker, and works seamlessly with forms and data binding to update values efficiently.
|
|
4
4
|
|
|
@@ -16,7 +16,6 @@ Trusted by the world's leading companies
|
|
|
16
16
|
</a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
## Setup
|
|
21
20
|
|
|
22
21
|
To install `In-place Editor` and its dependent packages, use the following command.
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: ej2-inplace-editor.min.js
|
|
3
|
-
* version : 31.2.12
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionButtons"),require("SyncfusionCalendars"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionDropdowns"),require("SyncfusionRichtexteditor")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionData","SyncfusionButtons","SyncfusionCalendars","SyncfusionPopups","SyncfusionInputs","SyncfusionDropdowns","SyncfusionRichtexteditor"],t):"object"==typeof exports?exports.SyncfusionInplaceEditor=t(require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionButtons"),require("SyncfusionCalendars"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionDropdowns"),require("SyncfusionRichtexteditor")):e.SyncfusionInplaceEditor=t(e.SyncfusionBase,e.SyncfusionData,e.SyncfusionButtons,e.SyncfusionCalendars,e.SyncfusionPopups,e.SyncfusionInputs,e.SyncfusionDropdowns,e.SyncfusionRichtexteditor)}(self,(e,t,i,o,n,s,r,a)=>(()=>{"use strict";var l={766:t=>{t.exports=e},741:e=>{e.exports=i},570:e=>{e.exports=o},74:e=>{e.exports=t},778:e=>{e.exports=r},323:e=>{e.exports=s},197:e=>{e.exports=n},674:e=>{e.exports=a}},p={};function d(e){var t=p[e];if(void 0!==t)return t.exports;var i=p[e]={exports:{}};return l[e](i,i.exports,d),i.exports}d.d=(e,t)=>{for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};return(()=>{d.r(h),d.d(h,{AutoComplete:()=>re,BTN_CANCEL:()=>I,BTN_SAVE:()=>L,BUTTONS:()=>x,Base:()=>se,CTRL_GROUP:()=>T,CTRL_OVERLAY:()=>W,ColorPicker:()=>ae,ComboBox:()=>le,DISABLE:()=>z,DateRangePicker:()=>pe,EDITABLE_ERROR:()=>N,ELEMENTS:()=>R,ERROR:()=>Y,FORM:()=>V,HIDE:()=>F,ICONS:()=>_,INLINE:()=>P,INPUT:()=>H,InPlaceEditor:()=>ne,LOAD:()=>G,LOADING:()=>B,MultiSelect:()=>he,OPEN:()=>A,OVERLAY_ICON:()=>S,POPUP:()=>D,PRIMARY:()=>q,PopupSettings:()=>v,ROOT:()=>O,ROOT_TIP:()=>g,RTE_SPIN_WRAP:()=>U,RTL:()=>Q,Rte:()=>ue,SHOW:()=>K,Slider:()=>me,TIP_TITLE:()=>j,TITLE:()=>k,TimePicker:()=>fe,VALUE:()=>w,VALUE_WRAPPER:()=>C,WRAPPER:()=>M,accessValue:()=>c,destroy:()=>l,destroyModules:()=>u,encode:()=>n,getCompValue:()=>o,localeConstant:()=>E,modulesList:()=>b,parseValue:()=>i,render:()=>r,setFocus:()=>p,showPopup:()=>m,update:()=>a});var e=d(766),t=new e.Internationalization;function i(i,o,n){if((0,e.isNullOrUndefined)(o)||""===o)return"";var s,r;switch(i){case"Color":var a=o;s=a.length>7?a.slice(0,-2):a;break;case"Date":r=n.format,s=t.formatDate(o,{format:r,type:i,skeleton:(0,e.isBlazor)()?"d":"yMd"});break;case"DateRange":r=n.format;var l=o;s=t.formatDate(l[0],{format:r,type:i,skeleton:(0,e.isBlazor)()?"d":"yMd"})+" - "+t.formatDate(l[1],{format:r,type:i,skeleton:(0,e.isBlazor)()?"d":"yMd"});break;case"DateTime":r=n.format,s=(0,e.isNullOrUndefined)(r)||""===r?t.formatDate(o,{format:r,type:i,skeleton:(0,e.isBlazor)()?"d":"yMd"})+" "+t.formatDate(o,{format:r,type:i,skeleton:(0,e.isBlazor)()?"t":"hm"}):t.formatDate(o,{format:r,type:i,skeleton:(0,e.isBlazor)()?"d":"yMd"});break;case"Time":r=n.format,s=t.formatDate(o,{format:r,type:i,skeleton:(0,e.isBlazor)()?"t":"hm"});break;case"Numeric":r=(0,e.isNullOrUndefined)(n.format)?"n2":n.format;var p=(0,e.isNullOrUndefined)(o)?null:"number"==typeof o?o:t.parseNumber(o);s=t.formatNumber(p,{format:r});break;default:s=o.toString()}return s}function o(t,i){if((0,e.isNullOrUndefined)(i)||""===i)return i;if("Date"!==t&&"Time"!==t&&"DateTime"!==t||"string"!=typeof i){if("DateRange"===t)if("object"==typeof i&&"string"==typeof i[0])i=[new Date(i[0]),new Date(i[1])];else if("string"==typeof i){var o=i.split("-");i=[new Date(o[0]),new Date(o[1])]}}else i=new Date(i);return i}function n(e){for(var t=[],i=e.length-1;i>=0;i--)t.unshift(["&#",e[i].charCodeAt(0),";"].join(""));return t.join("")}var s,r="render",a="update",l="destroy",p="set-focus",c="access-value",u="destroy-modules",m="show-popup",f=(s=function(e,t){return s=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])},s(e,t)},function(e,t){function i(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),y=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(t){function i(){return null!==t&&t.apply(this,arguments)||this}return f(i,t),y([(0,e.Property)("")],i.prototype,"title",void 0),y([(0,e.Property)(null)],i.prototype,"model",void 0),i}(e.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"},EditIconClick:{editAreaClick:"Click to edit"}},O="e-inplaceeditor",g="e-inplaceeditor-tip",C="e-editable-value-wrapper",w="e-editable-value",S="e-editable-overlay-icon",j="e-editable-tip-title",k="e-editable-title",P="e-editable-inline",D="e-editable-popup",M="e-editable-wrapper",B="e-editable-loading",V="e-editable-form",T="e-component-group",H="e-editable-component",x="e-editable-action-buttons",N="e-editable-error",R="e-editable-elements",A="e-editable-open",L="e-btn-save",I="e-btn-cancel",U="e-rte-spin-wrap",W="e-control-overlay",z="e-disable",_="e-icons",q="e-primary",K="e-show",F="e-hide",Q="e-rtl",Y="e-error",G="e-loading",$=d(74),J=d(741),X=d(570),Z=d(197),ee=d(323),te=d(778),ie=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])},e(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)}}(),oe=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},ne=function(t){function s(e,i){var o=t.call(this,e,i)||this;return o.needsID=!0,o}return ie(s,t),s.prototype.initializeValue=function(){this.initRender=!0,this.isTemplate=!1,this.isVue=!1,this.isExtModule=!1,this.submitBtn=void 0,this.cancelBtn=void 0,this.isClearTarget=!1,this.btnElements=void 0,this.dataManager=void 0,this.oldValue=void 0,this.divComponents=["RTE","Slider"],this.clearComponents=["AutoComplete","Mask","Text"],this.dateType=["Date","DateTime","Time"],this.inputDataEle=["Date","DateTime","DateRange","Time","Numeric"],this.dropDownEle=["AutoComplete","ComboBox","DropDownList","MultiSelect"],this.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"]},s.prototype.preRender=function(){this.initializeValue(),this.onScrollResizeHandler=this.scrollResizeHandler.bind(this),(0,e.isNullOrUndefined)(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:k}),!(0,e.isNullOrUndefined)(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.afterOpenEvent=this.popupSettings.model.afterOpen)},s.prototype.render=function(){(0,e.isNullOrUndefined)(this.element.getAttribute("tabindex"))&&(this.disabled?this.element.setAttribute("tabindex","-1"):this.element.setAttribute("tabindex","0")),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(i(this.type,this.value,this.model))):this.renderInitialValue(),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode,!0),this.setClass("add",this.cssClass),this.renderComplete()},s.prototype.setClass=function(t,i){if(!this.isEmpty(i))for(var o=i.split(" "),n=0;n<o.length;n++)""!==o[n].trim()&&("add"===t?(0,e.addClass)([this.element],[o[n]]):(0,e.removeClass)([this.element],[o[n]]))},s.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:C}),(0,e.isBlazor)()||(this.element.innerHTML=""),this.valueEle=this.createElement("span",{className:w}),this.editIcon=this.createElement("span",{className:S+" "+_,attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},s.prototype.renderInitialValue=function(){!(["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1)||(0,e.isNullOrUndefined)(this.value)||this.isEmpty(this.value.toString())||(0,e.isNullOrUndefined)(this.model.fields)||(0,e.isNullOrUndefined)(this.model.dataSource)?this.renderValue(this.checkValue(i(this.type,this.value,this.model))):(this.renderValue(this.getLocale({loadingText:"Loading..."},"loadingText")),this.valueWrap.classList.add(G),(0,Z.createSpinner)({target:this.valueWrap,width:10}),(0,Z.showSpinner)(this.valueWrap),this.getInitFieldMapValue())},s.prototype.getInitFieldMapValue=function(){var t=this,i=this.model,o=i.fields.text,n=i.fields.value,s=(0,e.isNullOrUndefined)(i.query)?new $.Query:i.query;i.dataSource instanceof $.DataManager?i.dataSource.executeQuery(this.getInitQuery(i,s)).then(function(e){t.updateInitValue(o,n,e.result)}):this.updateInitValue(o,n,new $.DataManager(i.dataSource).executeLocal(this.getInitQuery(i,s)))},s.prototype.getInitQuery=function(e,t){var i,o=e.fields.value,n=this.value;if("MultiSelect"!==this.type||"object"!=typeof this.value)i=new $.Predicate(o,"equal",this.value);else for(var s=0,r=0,a=n;r<a.length;r++){var l=a[r];i=0===s?i=new $.Predicate(o,"equal",l):i.or(o,"equal",l),s++}return t.where(i)},s.prototype.updateInitValue=function(t,i,o){if(!(o.length<=0)){if(1===o.length)this.valueEle.innerHTML=this.checkValue((0,e.getValue)((0,e.isNullOrUndefined)(t)?i:t,o[0]));else{for(var n=[],s=0,r=o;s<r.length;s++){var a=r[s];n.push((0,e.getValue)((0,e.isNullOrUndefined)(t)?i:t,a))}this.valueEle.innerHTML=this.checkValue(n.toString())}(0,Z.hideSpinner)(this.valueWrap),this.valueWrap.classList.remove(G)}},s.prototype.renderValue=function(t){this.enableHtmlSanitizer&&"RTE"!==this.type&&"MultiSelect"!==this.type?this.valueEle.innerText=t:this.valueEle.innerHTML=this.enableHtmlParse?t:n(t),"Color"===this.type&&(0,e.setStyleAttribute)(this.valueEle,{color:t}),"Inline"===this.mode&&this.isEditorOpen()&&(0,e.removeClass)([this.valueWrap],[F])},s.prototype.isEditorOpen=function(){return!(this.isVue&&(this.enableEditMode||!((0,e.isNullOrUndefined)(this.valueWrap)||this.valueWrap.classList.contains(F)||this.valueWrap.classList.contains("e-tooltip"))))},s.prototype.renderEditor=function(){if(this.prevValue=this.value,this.beginEditArgs={mode:this.mode,cancelFocus:!1,cancel:!1},this.trigger("beginEdit",this.beginEditArgs),!this.beginEditArgs.cancel){var t=void 0,i=(0,e.select)("."+C,this.element);if("EditIconClick"!==this.editableOn&&i.parentElement.removeAttribute("title"),!this.valueWrap.classList.contains(A)){if("Inline"===this.mode)(0,e.addClass)([this.valueWrap],[F]),this.inlineWrapper=this.createElement("div",{className:P}),this.element.appendChild(this.inlineWrapper),["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1?this.checkRemoteData(this.model):this.renderAndOpen();else{!(0,e.isNullOrUndefined)(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.popupSettings.model.afterOpen=this.afterOpenHandler.bind(this));var o=this.createElement("div",{className:D});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),t={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:g,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),(0,e.extend)(t,this.popupSettings.model,t,!0),this.tipObj=new Z.Tooltip(t),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),(0,e.addClass)([this.valueWrap],[A]),this.setProperties({enableEditMode:!0},!0),this.isReact&&this.renderReactTemplates()}}},s.prototype.renderAndOpen=function(){this.renderControl(this.inlineWrapper),this.afterOpenHandler(null)},s.prototype.checkRemoteData=function(t){var i=this;t.dataSource instanceof $.DataManager?(t.dataBound=function(){i.afterOpenHandler(null)},this.renderControl(this.inlineWrapper),((0,e.isNullOrUndefined)(t.value)&&(0,e.isNullOrUndefined)(this.value)||t.value===this.value&&!(0,e.isNullOrUndefined)(t.value)&&0===t.value.length)&&this.showDropDownPopup()):this.renderAndOpen()},s.prototype.showDropDownPopup=function(){"DropDownList"===this.type?(this.model.allowFiltering||this.componentObj.focusIn(),this.componentObj.showPopup()):this.isExtModule&&this.notify("MultiSelect"===this.type?p:m,{})},s.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,"id"===t?i+"_editor":i)})},s.prototype.renderControl=function(e){var t;this.containerEle=this.createElement("div",{className:M}),this.loader=this.createElement("div",{className:B}),this.formEle=this.createElement("form",{className:V});var i=this.createElement("div",{className:T}),o=this.createElement("div",{className:H});return e.appendChild(this.containerEle),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),o.appendChild(this.loader)),i.appendChild(o),i.appendChild(this.createElement("div",{className:N})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},s.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},s.prototype.renderButtons=function(){var t=this.createElement("div",{className:x}),i=(0,e.isNullOrUndefined)(this.saveButton.content)||0===this.saveButton.content.length?"":" "+q;return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:t,title:{save:"Save"},model:this.saveButton,className:L+i}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:t,model:this.cancelButton,className:I}),t},s.prototype.createButtons=function(t){var i=void 0;if(Object.keys(t.model).length>0){var o=this.createElement("button",{className:t.className,attrs:{type:t.type,title:"save"==t.constant?(0,e.isNullOrUndefined)(this.saveButton.content)?this.getLocale(t.title,t.constant):this.saveButton.content:(0,e.isNullOrUndefined)(this.cancelButton.content)?this.getLocale(t.title,t.constant):this.cancelButton.content}});t.container.appendChild(o),i=new J.Button(t.model,o)}return i},s.prototype.renderComponent=function(t){var i;if(this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1,i=(0,e.isNullOrUndefined)(this.model.cssClass)?R:this.model.cssClass.indexOf(R)<0?""===this.model.cssClass?R:this.model.cssClass+" "+R:this.model.cssClass,(0,e.extend)(this.model,this.model,{cssClass:i,enableRtl:this.enableRtl,locale:this.locale,change:this.changeHandler.bind(this)}),(0,e.isNullOrUndefined)(this.value)||this.updateModelValue(!1),this.isExtModule)this.notify(r,{module:b[this.type],target:t,type:this.type});else{switch((0,e.isNullOrUndefined)(this.model.showClearButton)&&!(0,e.isBlazor)()&&(this.model.showClearButton=!0),this.type){case"Date":this.componentObj=new X.DatePicker(this.model);break;case"DateTime":this.componentObj=new X.DateTimePicker(this.model);break;case"DropDownList":this.componentObj=new te.DropDownList(this.model);break;case"Mask":this.componentObj=new ee.MaskedTextBox(this.model);break;case"Numeric":if(this.model.value)new RegExp("[eE][-+]?([0-9]+)").test(this.model.value)?this.model.value=this.model.value:this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"");this.componentObj=new ee.NumericTextBox(this.model);break;case"Text":this.componentObj=new ee.TextBox(this.model)}this.componentObj.appendTo(t)}},s.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new $.UrlAdaptor;break;case"WebApiAdaptor":this.dataAdaptor=new $.WebApiAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new $.ODataV4Adaptor}},s.prototype.loadSpinner=function(t){(0,e.addClass)([this.loader],[K]),"validate"!==t||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type?this.spinObj={target:this.loader,width:e.Browser.isDevice?"16px":"14px"}:((0,e.addClass)([this.loader],[U]),(0,e.addClass)([this.getEditElement()],[W]),this.spinObj={target:this.loader}),this.formEle&&(0,e.addClass)([this.formEle],[G]),this.btnElements&&(0,e.addClass)([this.btnElements],[F]),(0,e.setStyleAttribute)(this.loader,{width:"100%"}),(0,Z.createSpinner)(this.spinObj),(0,Z.showSpinner)(this.spinObj.target)},s.prototype.removeSpinner=function(t){this.loader.removeAttribute("style"),(0,Z.hideSpinner)(this.spinObj.target),(0,e.detach)(this.spinObj.target.firstChild),"submit"!==t||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type||((0,e.removeClass)([this.loader],[U]),(0,e.removeClass)([this.getEditElement()],[W])),this.formEle&&(0,e.removeClass)([this.formEle],[G]),this.btnElements&&(0,e.removeClass)([this.btnElements],[F]),(0,e.removeClass)([this.loader],[K])},s.prototype.getEditElement=function(){return(0,e.select)("."+R,this.formEle)},s.prototype.getLocale=function(t,i){return new e.L10n("inplace-editor",t,this.locale).getConstant(i)},s.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},s.prototype.extendModelValue=function(t){var i=this.model;(0,e.extend)(i,{value:t}),this.setProperties({model:i},!0)},s.prototype.updateValue=function(){this.oldValue=this.value,this.enableHtmlSanitizer&&"string"==typeof this.value&&(this.oldValue=this.sanitizeHelper(this.value)),(0,e.isNullOrUndefined)(this.value)||(this.setProperties({value:o(this.type,this.oldValue)},!0),this.extendModelValue(o(this.type,this.oldValue)))},s.prototype.updateModelValue=function(e){"MultiSelect"!==this.type||this.isEmpty(this.value)?this.model.value=e?this.oldValue:this.value:this.model.value=e?this.oldValue.slice():this.value.slice()},s.prototype.setValue=function(){this.isExtModule?this.notify(a,{type:this.type}):this.componentObj&&("Numeric"===this.type&&null===this.componentObj.value&&this.componentObj.setProperties({value:null},!0),this.setProperties({value:this.componentObj.value},!0),this.extendModelValue(this.componentObj.value))},s.prototype.getDropDownsValue=function(t){var i;return Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1&&"MultiSelect"!==this.type?i=t?(0,e.select)(".e-"+this.type.toLocaleLowerCase(),this.containerEle).value:this.value.toString():"MultiSelect"===this.type&&(this.notify(c,{type:this.type}),i=t?this.printValue:this.value.join()),i},s.prototype.getSendValue=function(){return this.isEmpty(this.value)?"":Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1?this.getDropDownsValue(!1):Array.prototype.indexOf.call(this.dateType,this.type)>-1?this.value.toISOString():"DateRange"===this.type?this.value[0].toISOString()+" - "+this.value[1].toISOString():this.value.toString()},s.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():Array.prototype.indexOf.call(this.inputDataEle,this.type)>-1?this.componentRoot.value:Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1?this.getDropDownsValue(!0):i(this.type,this.value,this.model)},s.prototype.setRtl=function(t){t?(0,e.addClass)([this.element],[Q]):(0,e.removeClass)([this.element],[Q])},s.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify(p,{}):"dropdownlist"===this.componentObj.getModuleName()?this.componentObj.focusIn():this.componentObj.element.focus())},s.prototype.removeEditor=function(t){Object.keys(window);if((0,e.isBlazor)()&&!this.isStringTemplate&&(0,e.resetBlazorTemplate)(this.element.id+"template","Template"),this.tipObj&&this.formEle&&(0,e.closest)(this.formEle,"."+g).classList.add(F),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,(0,e.isNullOrUndefined)((0,e.select)("."+P,this.element))?this.tipObj&&("MultiSelect"===this.type&&(e.EventHandler.remove(this.containerEle,"mousedown",this.popMouseDown),e.EventHandler.remove(this.containerEle,"click",this.popClickHandler)),this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):((0,e.detach)(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,(0,e.removeClass)([this.valueWrap],[A,F]),t||this.setProperties({enableEditMode:!1},!0),!(0,e.isNullOrUndefined)(this.editableOn)&&"EditIconClick"!==this.editableOn){var i="DblClick"===this.editableOn?"editAreaDoubleClick":"editAreaClick";(0,e.isNullOrUndefined)(this.valueWrap.parentElement)||this.valueWrap.parentElement.setAttribute("title",this.getLocale(E[this.editableOn],i))}this.isReact&&this.clearTemplate()},s.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify(u,{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),(0,e.isNullOrUndefined)(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},s.prototype.destroyButtons=function(){(0,e.isNullOrUndefined)(this.submitBtn)||(e.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),e.EventHandler.remove(this.submitBtn.element,"click",this.submitPrevent),e.EventHandler.remove(this.submitBtn.element,"keydown",this.btnKeyDownHandler),this.submitBtn.destroy(),this.submitBtn=void 0),(0,e.isNullOrUndefined)(this.cancelBtn)||(e.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelBtnClick),e.EventHandler.remove(this.cancelBtn.element,"keydown",this.btnKeyDownHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},s.prototype.getQuery=function(e){var t=new $.Query;return Object.keys(e).forEach(function(i){t.addParams(i,e[i])}),t},s.prototype.sendValue=function(){var e=this,t={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};this.trigger("actionBegin",t,function(t){if(t.cancel)e.removeSpinner("submit"),"Popup"===e.mode&&e.updateArrow();else{if(e.isEmpty(e.url)||e.isEmpty(e.primaryKey)||!e.initRender&&(e.initRender||e.prevValue===e.value)){var i={data:{},value:t.data.value};e.triggerSuccess(i)}else{if(e.dataManager=new $.DataManager({url:e.url,adaptor:e.dataAdaptor}),"UrlAdaptor"===e.adaptor)e.dataManager.executeQuery(e.getQuery(t.data),e.successHandler.bind(e),e.failureHandler.bind(e));else e.dataManager.insert(t.data).then(function(t){return e.successHandler(t)}).catch(function(t){return e.failureHandler(t)})}e.dataManager=void 0}})},s.prototype.isEmpty=function(t){return!(!(0,e.isNullOrUndefined)(t)&&0!==t.length)},s.prototype.checkIsTemplate=function(){this.isTemplate=!(0,e.isNullOrUndefined)(this.template)&&""!==this.template},s.prototype.templateCompile=function(t,i){var o;Object.keys(window);"string"==typeof i&&(i=i.trim());var n=(0,e.compile)(i);if(!(0,e.isNullOrUndefined)(n)){var s=!((0,e.isBlazor)()&&"function"!=typeof i&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor"))||this.isStringTemplate;o=n({},this,"template",this.element.id+"template",s)}!(0,e.isNullOrUndefined)(n)&&o.length>0&&([].slice.call(o).forEach(function(e){t.appendChild(e)}),(0,e.isBlazor)()&&!this.isStringTemplate&&"function"!=typeof i&&0===i.indexOf("<div>Blazor")&&(0,e.updateBlazorTemplate)(this.element.id+"template","Template",this))},s.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize();(0,e.extend)(i,i,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",i,function(o){i.cancel&&!(0,e.isNullOrUndefined)(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))})}return t},s.prototype.appendTemplate=function(t,i){i="string"==typeof i?this.sanitizeHelper(i):i,this.setProperties({template:i},!0),"function"==typeof i?this.templateCompile(t,i):"string"==typeof i||(0,e.isNullOrUndefined)(i.innerHTML)?("."===i[0]||"#"===i[0])&&document.querySelectorAll(i).length?(this.templateEle=document.querySelector(i),t.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(t,i):(this.templateEle=i,t.appendChild(this.templateEle))},s.prototype.disable=function(t){t?(0,e.addClass)([this.element],[z]):(0,e.removeClass)([this.element],[z])},s.prototype.enableEditor=function(e,t){t&&!e||(e?this.renderEditor():this.cancelHandler("cancel"))},s.prototype.checkValidation=function(t,i){var o,n=this;if(this.validationRules){var s=Object.keys(this.validationRules),r=Object.keys(this.validationRules[s[0]]).length;r="validateHidden"in this.validationRules[s[0]]?r-1:r;var a=0;this.formValidate=new ee.FormValidator(this.formEle,{rules:this.validationRules,validationBegin:function(e){if("RTE"===n.type){var t=document.createElement("div");t.innerHTML=e.value,e.value=t.innerText}},validationComplete:function(s){a+=1,o={errorMessage:s.message,data:{name:n.name,primaryKey:n.primaryKey,value:n.checkValue(n.getSendValue())}},n.trigger("validating",o,function(o){"failure"===s.status?(s.errorElement.innerText=o.errorMessage,n.toggleErrorClass(!0)):n.toggleErrorClass(!1),(0,e.isNullOrUndefined)(t)||!t||r!==a&&"failure"!==s.status||(t=!1,n.afterValidation(i),a=0)})},customPlacement:function(t,i){n.formEle&&(0,e.select)("."+N,n.formEle).appendChild(i)}}),a=0,this.formValidate.validate()}else""!==this.template?(o={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",o,function(t){t.errorMessage?((0,e.select)("."+N,n.formEle).innerHTML=t.errorMessage,n.toggleErrorClass(!0)):n.toggleErrorClass(!1),n.afterValidation(i)})):this.afterValidation(i)},s.prototype.afterValidation=function(e){!this.formEle.classList.contains(Y)&&e&&(this.loadSpinner("validate"),"Popup"===this.mode&&this.updateArrow(),this.sendValue())},s.prototype.toggleErrorClass=function(t){if(!(0,e.isNullOrUndefined)(this.formEle)){var i,o,n,s=(0,e.select)(".e-input-group",this.formEle);i=[this.formEle,s],o=Y,n=t?"add":"remove",[].slice.call(i).forEach(function(t){t&&("add"===n?(0,e.addClass)([t],[o]):(0,e.removeClass)([t],[o]))})}},s.prototype.updateArrow=function(){var e=this.tipObj.tipPointerPosition;this.tipObj.tipPointerPosition="Middle"===e?"Auto":"Middle",this.tipObj.tipPointerPosition=e,this.tipObj.dataBind()},s.prototype.triggerSuccess=function(t){var i=this,o=t.value;this.trigger("actionSuccess",t,function(t){i.oldValue=o,i.removeSpinner("submit"),t.cancel||i.renderValue(i.checkValue(t.value!==o?t.value:i.getRenderValue())),t.cancel&&"Inline"===i.mode&&(0,e.removeClass)([i.valueWrap],[F]),i.removeEditor()})},s.prototype.triggerEndEdit=function(e){var t=this,i={cancel:!1,mode:this.mode,action:e};this.trigger("endEdit",i,function(e){e.cancel||(t.formEle&&t.formEle.classList.contains(Y)&&(t.updateModelValue(!0),t.setProperties({value:t.oldValue},!0)),t.removeEditor())})},s.prototype.wireEvents=function(){(0,e.isNullOrUndefined)(this.editableOn)||this.wireEditEvent(this.editableOn),e.EventHandler.add(this.editIcon,"click",this.clickHandler,this),e.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),document.addEventListener("scroll",this.onScrollResizeHandler),window.addEventListener("resize",this.onScrollResizeHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&e.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},s.prototype.wireDocEvent=function(){e.EventHandler.add(document,"mousedown",this.docClickHandler,this)},s.prototype.wireEditEvent=function(t){if("EditIconClick"!==t){var i="Click"===t?"editAreaClick":"editAreaDoubleClick";this.element.setAttribute("title",this.getLocale(E[t],i)),e.Browser.isDevice&&e.Browser.isIos&&"DblClick"===t?this.touchModule=new e.Touch(this.valueWrap,{tap:this.doubleTapHandler.bind(this)}):e.EventHandler.add(this.valueWrap,t.toLowerCase(),this.clickHandler,this)}},s.prototype.wireEditorKeyDownEvent=function(t){e.EventHandler.add(t,"keydown",this.enterKeyDownHandler,this)},s.prototype.wireBtnEvents=function(){(0,e.isNullOrUndefined)(this.submitBtn)||(e.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),e.EventHandler.add(this.submitBtn.element,"click",this.submitPrevent,this),e.EventHandler.add(this.submitBtn.element,"keydown",this.btnKeyDownHandler,this)),(0,e.isNullOrUndefined)(this.cancelBtn)||(e.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelBtnClick,this),e.EventHandler.add(this.cancelBtn.element,"keydown",this.btnKeyDownHandler,this))},s.prototype.cancelBtnClick=function(e){this.cancelHandler("cancel"),this.trigger("cancelClick",e)},s.prototype.unWireEvents=function(){(0,e.isNullOrUndefined)(this.editableOn)||this.unWireEditEvent(this.editableOn),e.EventHandler.remove(this.editIcon,"click",this.clickHandler),document.removeEventListener("scroll",this.onScrollResizeHandler),window.removeEventListener("resize",this.onScrollResizeHandler),e.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&e.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},s.prototype.unWireDocEvent=function(){e.EventHandler.remove(document,"mousedown",this.docClickHandler)},s.prototype.unWireEditEvent=function(t){"EditIconClick"!==t&&(this.element.removeAttribute("title"),e.Browser.isDevice&&e.Browser.isIos&&"DblClick"===t?(this.touchModule.destroy(),this.touchModule=void 0):e.EventHandler.remove(this.valueWrap,t.toLowerCase(),this.clickHandler))},s.prototype.unWireEditorKeyDownEvent=function(t){e.EventHandler.remove(t,"keydown",this.enterKeyDownHandler)},s.prototype.submitPrevent=function(e){e.preventDefault()},s.prototype.btnKeyDownHandler=function(t){var i=t.target;(13===t.keyCode&&13===t.which||32===t.keyCode&&32===t.which)&&(i.classList.contains(L)?this.save():i.classList.contains(I)&&this.cancelHandler("cancel")),9!==t.keyCode||!1!==t.shiftKey||!(0,e.isNullOrUndefined)(t.target.nextElementSibling)&&"BUTTON"===t.target.nextElementSibling.tagName||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))},s.prototype.afterOpenHandler=function(t){"Popup"===this.mode&&"MultiSelect"===this.type&&(e.EventHandler.add(this.containerEle,"mousedown",this.popMouseDown,this),e.EventHandler.add(this.containerEle,"click",this.popClickHandler,this)),"Popup"!==this.mode||this.isEmpty(this.titleEle.innerHTML)||t.element.classList.add(j),"RTE"===this.type?(this.rteModule.refresh(),this.setAttribute((0,e.select)(".e-richtexteditor textarea",this.containerEle),["name"])):"Slider"===this.type&&(this.sliderModule.refresh(),this.setAttribute((0,e.select)(".e-slider-input",this.containerEle),["name"])),this.beginEditArgs.cancelFocus||("Inline"===this.mode&&["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1&&this.model.dataSource instanceof $.DataManager?this.showDropDownPopup():this.setFocus()),this.afterOpenEvent&&(this.tipObj.setProperties({afterOpen:this.afterOpenEvent},!0),this.tipObj.trigger("afterOpen",t))},s.prototype.popMouseDown=function(e){var t=e.target.classList;t.contains("e-chips-close")&&!t.contains("e-close-hooker")&&this.updateArrow()},s.prototype.doubleTapHandler=function(e){e.tapCount>1&&this.clickHandler(e.originalEvent)},s.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},s.prototype.submitHandler=function(e){e.preventDefault(),this.save(),this.trigger("submitClick",e)},s.prototype.cancelHandler=function(e){this.triggerEndEdit(e)},s.prototype.popClickHandler=function(t){var i=(0,e.select)("."+C,this.element);t.target.classList.contains("e-chips-close")&&this.tipObj.refresh(i)},s.prototype.successHandler=function(e){this.initRender=!1;var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},s.prototype.failureHandler=function(e){var t=this,i={data:e,value:this.getSendValue()};this.trigger("actionFailure",i,function(e){t.removeSpinner("submit"),"Popup"===t.mode&&t.updateArrow()})},s.prototype.enterKeyDownHandler=function(t){(0,e.closest)(t.target,"."+H+" .e-richtexteditor")||t.currentTarget.getElementsByTagName("textarea")[0]||(13===t.keyCode&&13===t.which&&(0,e.closest)(t.target,"."+H)?(this.save(),this.trigger("submitClick",t)):27===t.keyCode&&27===t.which&&this.cancelHandler("cancel"))},s.prototype.valueKeyDownHandler=function(e){9===e.keyCode&&!0===e.shiftKey&&"BUTTON"!==e.target.tagName&&("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")),13!==e.keyCode||13!==e.which||!e.target.classList.contains(O)||this.valueWrap.classList.contains(A)||this.element.classList.contains(z)||(e.preventDefault(),this.renderEditor())},s.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},s.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&!e.Browser.isDevice&&this.triggerEndEdit("cancel")},s.prototype.docClickHandler=function(t){var i=t.target;if(this.isClearTarget)this.isClearTarget=!1;else{var o=(0,e.closest)(i,"."+O),n=(0,e.closest)(i,"."+g),s=(0,e.closest)(i,"."+R),r=(0,e.closest)(i,".e-rte-elements");!(0,e.isNullOrUndefined)(o)&&o.isEqualNode(this.element)||!(0,e.isNullOrUndefined)(n)&&this.tipObj&&n.id.indexOf(this.valueWrap.id)>-1||!(0,e.isNullOrUndefined)(s)||!(0,e.isNullOrUndefined)(r)||i.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))}},s.prototype.changeHandler=function(e){var t={previousValue:void 0===this.compPrevValue?this.value:this.compPrevValue,value:e.value};"AutoComplete"!==this.type&&"ComboBox"!==this.type&&"DropDownList"!==this.type||(t.itemData=e.itemData,t.previousItemData=e.previousItemData),this.compPrevValue=t.value,this.trigger("change",t)},s.prototype.validate=function(){this.checkValidation(!0,!1)},s.prototype.save=function(){var t=this;if(this.formEle){this.element.focus(),this.editEle=(0,e.select)("."+H,this.formEle);(0,e.select)("."+Y,this.editEle),this.isTemplate||this.setValue();var i={cancel:!1,mode:this.mode,action:"submit"};this.trigger("endEdit",i,function(e){e.cancel||t.checkValidation(!0,!0)})}},s.prototype.destroy=function(){var i=this;for(this.removeEditor((0,e.isBlazor)()),this.isExtModule&&this.notify(l,{}),this.unWireEvents(),[z,Q].forEach(function(t){(0,e.removeClass)([i.element],[t])});this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild);(0,e.isBlazor)()&&this.isServerRendered||t.prototype.destroy.call(this),this.isReact&&this.clearTemplate()},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.requiredModules=function(){var e=[];return Array.prototype.indexOf.call(this.moduleList,this.type)>-1&&e.push({member:b[this.type],args:[this]}),e},s.prototype.getModuleName=function(){return"inplaceeditor"},s.prototype.onPropertyChanged=function(t,o){if(!this.validationRules||!(!(0,e.isNullOrUndefined)(this.element.querySelectorAll("."+Y))&&this.element.querySelectorAll("."+Y).length>0)){if(this.isEditorOpen()){var n="enableEditMode"in t;n&&o.enableEditMode&&!t.enableEditMode||!n&&this.enableEditMode?this.triggerEndEdit("cancel"):this.removeEditor()}for(var s=0,r=Object.keys(t);s<r.length;s++){switch(r[s]){case"showButtons":t.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(i(this.type,this.value,this.model))):this.renderInitialValue();break;case"emptyText":"Never"===this.textOption?this.renderValue(this.checkValue(i(this.type,this.value,this.model))):this.renderInitialValue();break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(t.disabled),t.disabled?this.element.tabIndex=-1:this.element.tabIndex=0;break;case"enableRtl":this.setRtl(t.enableRtl);break;case"cssClass":this.setClass("remove",o.cssClass),this.setClass("add",t.cssClass);break;case"mode":this.enableEditor(this.enableEditMode);break;case"enableEditMode":this.enableEditor(t.enableEditMode);break;case"editableOn":this.unWireEditEvent(o.editableOn),"EditIconClick"!==t.editableOn&&this.wireEditEvent(t.editableOn)}}}},oe([(0,e.Property)("")],s.prototype,"name",void 0),oe([(0,e.Property)(null)],s.prototype,"value",void 0),oe([(0,e.Property)("")],s.prototype,"template",void 0),oe([(0,e.Property)(!0)],s.prototype,"enableHtmlSanitizer",void 0),oe([(0,e.Property)(!0)],s.prototype,"enableHtmlParse",void 0),oe([(0,e.Property)("")],s.prototype,"cssClass",void 0),oe([(0,e.Property)("")],s.prototype,"primaryKey",void 0),oe([(0,e.Property)("Empty")],s.prototype,"emptyText",void 0),oe([(0,e.Property)("")],s.prototype,"url",void 0),oe([(0,e.Property)("Popup")],s.prototype,"mode",void 0),oe([(0,e.Property)("UrlAdaptor")],s.prototype,"adaptor",void 0),oe([(0,e.Property)("Text")],s.prototype,"type",void 0),oe([(0,e.Property)("Click")],s.prototype,"editableOn",void 0),oe([(0,e.Property)("Never")],s.prototype,"textOption",void 0),oe([(0,e.Property)("Submit")],s.prototype,"actionOnBlur",void 0),oe([(0,e.Property)(!1)],s.prototype,"enablePersistence",void 0),oe([(0,e.Property)(!1)],s.prototype,"disabled",void 0),oe([(0,e.Property)(!0)],s.prototype,"showButtons",void 0),oe([(0,e.Property)(!1)],s.prototype,"enableEditMode",void 0),oe([(0,e.Property)(!0)],s.prototype,"submitOnEnter",void 0),oe([(0,e.Complex)({},v)],s.prototype,"popupSettings",void 0),oe([(0,e.Property)(null)],s.prototype,"model",void 0),oe([(0,e.Property)({iconCss:"e-icons e-save-icon"})],s.prototype,"saveButton",void 0),oe([(0,e.Property)({iconCss:"e-icons e-cancel-icon"})],s.prototype,"cancelButton",void 0),oe([(0,e.Property)(null)],s.prototype,"validationRules",void 0),oe([(0,e.Event)()],s.prototype,"created",void 0),oe([(0,e.Event)()],s.prototype,"beforeSanitizeHtml",void 0),oe([(0,e.Event)()],s.prototype,"actionBegin",void 0),oe([(0,e.Event)()],s.prototype,"actionSuccess",void 0),oe([(0,e.Event)()],s.prototype,"actionFailure",void 0),oe([(0,e.Event)()],s.prototype,"validating",void 0),oe([(0,e.Event)()],s.prototype,"beginEdit",void 0),oe([(0,e.Event)()],s.prototype,"endEdit",void 0),oe([(0,e.Event)()],s.prototype,"change",void 0),oe([(0,e.Event)()],s.prototype,"submitClick",void 0),oe([(0,e.Event)()],s.prototype,"cancelClick",void 0),oe([(0,e.Event)()],s.prototype,"destroyed",void 0),s=oe([e.NotifyPropertyChanges],s)}(e.Component),se=function(){function t(e,t){this.parent=e,this.module=t,this.addEventListener()}return t.prototype.render=function(e){this.module.render(e)},t.prototype.showPopup=function(){this.module.showPopup()},t.prototype.focus=function(){this.module.focus()},t.prototype.update=function(e){this.module.updateValue(e)},t.prototype.getValue=function(){this.module.getRenderValue()},t.prototype.destroyComponent=function(){(0,e.isNullOrUndefined)(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},t.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},t.prototype.addEventListener=function(){this.parent.on(r,this.render,this),this.parent.on(p,this.focus,this),this.parent.on(m,this.showPopup,this),this.parent.on(a,this.update,this),this.parent.on(c,this.getValue,this),this.parent.on(u,this.destroyComponent,this),this.parent.on(l,this.destroy,this)},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r,this.render),this.parent.off(p,this.focus),this.parent.off(m,this.showPopup),this.parent.off(a,this.update),this.parent.off(c,this.getValue),this.parent.off(u,this.destroyComponent),this.parent.off(l,this.destroy))},t}(),re=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new te.AutoComplete(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},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),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),ae=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new ee.ColorPicker(this.parent.model),this.compObj.appendTo(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),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),le=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new te.ComboBox(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getModuleName=function(){return"combo-box"},e}(),pe=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new X.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.getModuleName=function(){return"date-range-picker"},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e}(),de=function(){return de=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},de.apply(this,arguments)},he=function(){function t(e){this.isPopOpen=!1,this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new se(this.parent,this)}return t.prototype.render=function(e){var t=de({},this.parent.model);this.openEvent=t.open,this.closeEvent=t.close,t.open=this.openHandler.bind(this),t.close=this.closeHandler.bind(this),this.compObj=new te.MultiSelect(t),this.compObj.appendTo(e.target)},t.prototype.openHandler=function(e){this.isPopOpen=!0,this.openEvent&&(this.compObj.setProperties({open:this.openEvent},!0),this.compObj.trigger("open",e))},t.prototype.closeHandler=function(e){this.isPopOpen=!1,this.closeEvent&&(this.compObj.setProperties({close:this.closeEvent},!0),this.compObj.trigger("close",e))},t.prototype.focus=function(){if(!this.isPopOpen){var t=document.createEvent("MouseEvent");t.initEvent("mousedown",!0,!0),(0,e.closest)(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(t)}},t.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},t.prototype.getRenderValue=function(){this.parent.printValue=this.compObj.text},t.prototype.destroy=function(){this.base.destroy()},t.prototype.getModuleName=function(){return"multi-select"},t}(),ce=d(674),ue=function(){function e(e){this.compObj=void 0,ce.RichTextEditor.Inject(ce.HtmlEditor,ce.MarkdownEditor,ce.Toolbar,ce.Link,ce.Image,ce.QuickToolbar,ce.Table,ce.FileManager,ce.PasteCleanup,ce.EmojiPicker,ce.Audio,ce.Video,ce.FormatPainter,ce.Count),this.parent=e,this.parent.rteModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new ce.RichTextEditor(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&(this.parent.setProperties({value:this.getRteValue()},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getRteValue=function(){var e;return"Markdown"===this.compObj.editorMode?""===(e=this.compObj.contentModule.getEditPanel().value)?"":e:"<p><br></p>"===(e=this.compObj.contentModule.getEditPanel().innerHTML)||"<p><br></p>"===e||""===e?"":e},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),me=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new ee.Slider(this.parent.model),this.compObj.appendTo(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},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),fe=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new se(this.parent,this)}return e.prototype.render=function(e){this.compObj=new X.TimePicker(this.parent.model),this.compObj.appendTo(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),this.parent.extendModelValue(this.compObj.value))},e.prototype.getModuleName=function(){return"time-picker"},e.prototype.destroy=function(){this.base.destroy()},e}()})(),h})());
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: ej2-inplace-editor.umd.min.js
|
|
3
|
-
* version : 31.2.12
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-calendars"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-dropdowns"),require("@syncfusion/ej2-richtexteditor")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-data","@syncfusion/ej2-buttons","@syncfusion/ej2-calendars","@syncfusion/ej2-popups","@syncfusion/ej2-inputs","@syncfusion/ej2-dropdowns","@syncfusion/ej2-richtexteditor"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Data,e.ej2Buttons,e.ej2Calendars,e.ej2Popups,e.ej2Inputs,e.ej2Dropdowns,e.ej2Richtexteditor)}(this,function(e,a,l,R,i,p,d,o,t){"use strict";var r=new a.Internationalization;function s(e,t,i){if(a.isNullOrUndefined(t)||""===t)return"";switch(e){case"Color":var o=t,n=7<o.length?o.slice(0,-2):o;break;case"Date":s=i.format,n=r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"});break;case"DateRange":var s=i.format,o=t;n=r.formatDate(o[0],{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"})+" - "+r.formatDate(o[1],{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"});break;case"DateTime":s=i.format,n=a.isNullOrUndefined(s)||""===s?r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"})+" "+r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"t":"hm"}):r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"d":"yMd"});break;case"Time":s=i.format,n=r.formatDate(t,{format:s,type:e,skeleton:a.isBlazor()?"t":"hm"});break;case"Numeric":s=a.isNullOrUndefined(i.format)?"n2":i.format;o=a.isNullOrUndefined(t)?null:"number"==typeof t?t:r.parseNumber(t);n=r.formatNumber(o,{format:s});break;default:n=t.toString()}return n}function A(e,t){return a.isNullOrUndefined(t)||""===t||("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof t?"DateRange"===e&&("object"==typeof t&&"string"==typeof t[0]?t=[new Date(t[0]),new Date(t[1])]:"string"==typeof t&&(e=t.split("-"),t=[new Date(e[0]),new Date(e[1])])):t=new Date(t)),t}function L(e){for(var t=[],i=e.length-1;0<=i;i--)t.unshift(["&#",e[i].charCodeAt(0),";"].join(""));return t.join("")}var I,n,h="render",c="update",u="destroy",m="set-focus",y="access-value",f="destroy-modules",U="show-popup",W=(I=function(e,t){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}I(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),z=function(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(s<3?n(r):3<s?n(t,i,r):n(t,i))||r);return 3<s&&r&&Object.defineProperty(t,i,r),r},W=(n=a.ChildProperty,W(_,n),z([a.Property("")],_.prototype,"title",void 0),z([a.Property(null)],_.prototype,"model",void 0),_);function _(){return null!==n&&n.apply(this,arguments)||this}var K,q,F={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},Q={Click:{editAreaClick:"Click to edit"},DblClick:{editAreaDoubleClick:"Double click to edit"},EditIconClick:{editAreaClick:"Click to edit"}},Y="e-inplaceeditor",G="e-inplaceeditor-tip",$="e-editable-value-wrapper",J="e-editable-value",X="e-editable-overlay-icon",Z="e-editable-tip-title",ee="e-editable-title",te="e-editable-inline",ie="e-editable-popup",oe="e-editable-wrapper",ne="e-editable-loading",se="e-editable-form",re="e-component-group",v="e-editable-component",ae="e-editable-action-buttons",le="e-editable-error",b="e-editable-elements",E="e-editable-open",pe="e-btn-save",de="e-btn-cancel",he="e-rte-spin-wrap",ce="e-control-overlay",O="e-disable",ue="e-icons",me="e-primary",ye="e-show",g="e-hide",fe="e-rtl",C="e-error",w="e-loading",z=(K=function(e,t){return(K=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}K(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),j=function(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(s<3?n(r):3<s?n(t,i,r):n(t,i))||r);return 3<s&&r&&Object.defineProperty(t,i,r),r},z=(q=a.Component,z(k,q),k.prototype.initializeValue=function(){this.initRender=!0,this.isTemplate=!1,this.isVue=!1,this.isExtModule=!1,this.submitBtn=void 0,this.cancelBtn=void 0,this.isClearTarget=!1,this.btnElements=void 0,this.dataManager=void 0,this.oldValue=void 0,this.divComponents=["RTE","Slider"],this.clearComponents=["AutoComplete","Mask","Text"],this.dateType=["Date","DateTime","Time"],this.inputDataEle=["Date","DateTime","DateRange","Time","Numeric"],this.dropDownEle=["AutoComplete","ComboBox","DropDownList","MultiSelect"],this.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"]},k.prototype.preRender=function(){this.initializeValue(),this.onScrollResizeHandler=this.scrollResizeHandler.bind(this),a.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:ee}),!a.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.afterOpenEvent=this.popupSettings.model.afterOpen)},k.prototype.render=function(){a.isNullOrUndefined(this.element.getAttribute("tabindex"))&&(this.disabled?this.element.setAttribute("tabindex","-1"):this.element.setAttribute("tabindex","0")),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):this.renderInitialValue(),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode,!0),this.setClass("add",this.cssClass),this.renderComplete()},k.prototype.setClass=function(e,t){if(!this.isEmpty(t))for(var i=t.split(" "),o=0;o<i.length;o++)""!==i[o].trim()&&("add"===e?a.addClass([this.element],[i[o]]):a.removeClass([this.element],[i[o]]))},k.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:$}),a.isBlazor()||(this.element.innerHTML=""),this.valueEle=this.createElement("span",{className:J}),this.editIcon=this.createElement("span",{className:X+" "+ue,attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},k.prototype.renderInitialValue=function(){!(-1<["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type))||a.isNullOrUndefined(this.value)||this.isEmpty(this.value.toString())||a.isNullOrUndefined(this.model.fields)||a.isNullOrUndefined(this.model.dataSource)?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):(this.renderValue(this.getLocale({loadingText:"Loading..."},"loadingText")),this.valueWrap.classList.add(w),p.createSpinner({target:this.valueWrap,width:10}),p.showSpinner(this.valueWrap),this.getInitFieldMapValue())},k.prototype.getInitFieldMapValue=function(){var t=this,e=this.model,i=e.fields.text,o=e.fields.value,n=a.isNullOrUndefined(e.query)?new l.Query:e.query;e.dataSource instanceof l.DataManager?e.dataSource.executeQuery(this.getInitQuery(e,n)).then(function(e){t.updateInitValue(i,o,e.result)}):this.updateInitValue(i,o,new l.DataManager(e.dataSource).executeLocal(this.getInitQuery(e,n)))},k.prototype.getInitQuery=function(e,t){var i=e.fields.value,e=this.value;if("MultiSelect"!==this.type||"object"!=typeof this.value)a=new l.Predicate(i,"equal",this.value);else for(var o=0,n=0,s=e;n<s.length;n++){var r=s[n],a=0===o?new l.Predicate(i,"equal",r):a.or(i,"equal",r);o++}return t.where(a)},k.prototype.updateInitValue=function(e,t,i){if(!(i.length<=0)){if(1===i.length)this.valueEle.innerHTML=this.checkValue(a.getValue(a.isNullOrUndefined(e)?t:e,i[0]));else{for(var o=[],n=0,s=i;n<s.length;n++){var r=s[n];o.push(a.getValue(a.isNullOrUndefined(e)?t:e,r))}this.valueEle.innerHTML=this.checkValue(o.toString())}p.hideSpinner(this.valueWrap),this.valueWrap.classList.remove(w)}},k.prototype.renderValue=function(e){this.enableHtmlSanitizer&&"RTE"!==this.type&&"MultiSelect"!==this.type?this.valueEle.innerText=e:this.valueEle.innerHTML=this.enableHtmlParse?e:L(e),"Color"===this.type&&a.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&this.isEditorOpen()&&a.removeClass([this.valueWrap],[g])},k.prototype.isEditorOpen=function(){return!(this.isVue&&(this.enableEditMode||!(a.isNullOrUndefined(this.valueWrap)||this.valueWrap.classList.contains(g)||this.valueWrap.classList.contains("e-tooltip"))))},k.prototype.renderEditor=function(){var e,t,i;this.prevValue=this.value,this.beginEditArgs={mode:this.mode,cancelFocus:!1,cancel:!1},this.trigger("beginEdit",this.beginEditArgs),this.beginEditArgs.cancel||(e=void 0,t=a.select("."+$,this.element),"EditIconClick"!==this.editableOn&&t.parentElement.removeAttribute("title"),this.valueWrap.classList.contains(E))||("Inline"===this.mode?(a.addClass([this.valueWrap],[g]),this.inlineWrapper=this.createElement("div",{className:te}),this.element.appendChild(this.inlineWrapper),-1<["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)?this.checkRemoteData(this.model):this.renderAndOpen()):(!a.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.popupSettings.model.afterOpen=this.afterOpenHandler.bind(this)),i=this.createElement("div",{className:ie}),this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,i.appendChild(this.titleEle)),e={content:i,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:G,afterOpen:this.afterOpenHandler.bind(this)},i.appendChild(this.renderControl(document.body)),a.extend(e,this.popupSettings.model,e,!0),this.tipObj=new p.Tooltip(e),this.tipObj.appendTo(t),this.tipObj.open(t)),"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),a.addClass([this.valueWrap],[E]),this.setProperties({enableEditMode:!0},!0),this.isReact&&this.renderReactTemplates())},k.prototype.renderAndOpen=function(){this.renderControl(this.inlineWrapper),this.afterOpenHandler(null)},k.prototype.checkRemoteData=function(e){var t=this;e.dataSource instanceof l.DataManager?(e.dataBound=function(){t.afterOpenHandler(null)},this.renderControl(this.inlineWrapper),(a.isNullOrUndefined(e.value)&&a.isNullOrUndefined(this.value)||e.value===this.value&&!a.isNullOrUndefined(e.value)&&0===e.value.length)&&this.showDropDownPopup()):this.renderAndOpen()},k.prototype.showDropDownPopup=function(){"DropDownList"===this.type?(this.model.allowFiltering||this.componentObj.focusIn(),this.componentObj.showPopup()):this.isExtModule&&this.notify("MultiSelect"===this.type?m:U,{})},k.prototype.setAttribute=function(t,e){var i=this.name&&0!==this.name.length?this.name:this.element.id;e.forEach(function(e){t.setAttribute(e,"id"===e?i+"_editor":i)})},k.prototype.renderControl=function(e){this.containerEle=this.createElement("div",{className:oe}),this.loader=this.createElement("div",{className:ne}),this.formEle=this.createElement("form",{className:se});var t,i=this.createElement("div",{className:re}),o=this.createElement("div",{className:v});return e.appendChild(this.containerEle),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(-1<Array.prototype.indexOf.call(this.divComponents,this.type)?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t),o.appendChild(this.loader)),i.appendChild(o),i.appendChild(this.createElement("div",{className:le})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},k.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},k.prototype.renderButtons=function(){var e=this.createElement("div",{className:ae}),t=a.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" "+me;return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:pe+t}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:de}),e},k.prototype.createButtons=function(e){var t,i=void 0;return 0<Object.keys(e.model).length&&(t=this.createElement("button",{className:e.className,attrs:{type:e.type,title:"save"==e.constant?a.isNullOrUndefined(this.saveButton.content)?this.getLocale(e.title,e.constant):this.saveButton.content:a.isNullOrUndefined(this.cancelButton.content)?this.getLocale(e.title,e.constant):this.cancelButton.content}}),e.container.appendChild(t),i=new R.Button(e.model,t)),i},k.prototype.renderComponent=function(e){var t;if(this.isExtModule=-1<Array.prototype.indexOf.call(this.moduleList,this.type),t=a.isNullOrUndefined(this.model.cssClass)?b:this.model.cssClass.indexOf(b)<0?""===this.model.cssClass?b:this.model.cssClass+" "+b:this.model.cssClass,a.extend(this.model,this.model,{cssClass:t,enableRtl:this.enableRtl,locale:this.locale,change:this.changeHandler.bind(this)}),a.isNullOrUndefined(this.value)||this.updateModelValue(!1),this.isExtModule)this.notify(h,{module:F[this.type],target:e,type:this.type});else{switch(a.isNullOrUndefined(this.model.showClearButton)&&!a.isBlazor()&&(this.model.showClearButton=!0),this.type){case"Date":this.componentObj=new i.DatePicker(this.model);break;case"DateTime":this.componentObj=new i.DateTimePicker(this.model);break;case"DropDownList":this.componentObj=new o.DropDownList(this.model);break;case"Mask":this.componentObj=new d.MaskedTextBox(this.model);break;case"Numeric":this.model.value&&(new RegExp("[eE][-+]?([0-9]+)").test(this.model.value)?this.model.value=this.model.value:this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"")),this.componentObj=new d.NumericTextBox(this.model);break;case"Text":this.componentObj=new d.TextBox(this.model)}this.componentObj.appendTo(e)}},k.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new l.UrlAdaptor;break;case"WebApiAdaptor":this.dataAdaptor=new l.WebApiAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new l.ODataV4Adaptor}},k.prototype.loadSpinner=function(e){a.addClass([this.loader],[ye]),"validate"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type?this.spinObj={target:this.loader,width:a.Browser.isDevice?"16px":"14px"}:(a.addClass([this.loader],[he]),a.addClass([this.getEditElement()],[ce]),this.spinObj={target:this.loader}),this.formEle&&a.addClass([this.formEle],[w]),this.btnElements&&a.addClass([this.btnElements],[g]),a.setStyleAttribute(this.loader,{width:"100%"}),p.createSpinner(this.spinObj),p.showSpinner(this.spinObj.target)},k.prototype.removeSpinner=function(e){this.loader.removeAttribute("style"),p.hideSpinner(this.spinObj.target),a.detach(this.spinObj.target.firstChild),"submit"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type||(a.removeClass([this.loader],[he]),a.removeClass([this.getEditElement()],[ce])),this.formEle&&a.removeClass([this.formEle],[w]),this.btnElements&&a.removeClass([this.btnElements],[g]),a.removeClass([this.loader],[ye])},k.prototype.getEditElement=function(){return a.select("."+b,this.formEle)},k.prototype.getLocale=function(e,t){return new a.L10n("inplace-editor",e,this.locale).getConstant(t)},k.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},k.prototype.extendModelValue=function(e){var t=this.model;a.extend(t,{value:e}),this.setProperties({model:t},!0)},k.prototype.updateValue=function(){this.oldValue=this.value,this.enableHtmlSanitizer&&"string"==typeof this.value&&(this.oldValue=this.sanitizeHelper(this.value)),a.isNullOrUndefined(this.value)||(this.setProperties({value:A(this.type,this.oldValue)},!0),this.extendModelValue(A(this.type,this.oldValue)))},k.prototype.updateModelValue=function(e){"MultiSelect"!==this.type||this.isEmpty(this.value)?this.model.value=e?this.oldValue:this.value:this.model.value=(e?this.oldValue:this.value).slice()},k.prototype.setValue=function(){this.isExtModule?this.notify(c,{type:this.type}):this.componentObj&&("Numeric"===this.type&&null===this.componentObj.value&&this.componentObj.setProperties({value:null},!0),this.setProperties({value:this.componentObj.value},!0),this.extendModelValue(this.componentObj.value))},k.prototype.getDropDownsValue=function(e){var t;return-1<Array.prototype.indexOf.call(this.dropDownEle,this.type)&&"MultiSelect"!==this.type?t=e?a.select(".e-"+this.type.toLocaleLowerCase(),this.containerEle).value:this.value.toString():"MultiSelect"===this.type&&(this.notify(y,{type:this.type}),t=e?this.printValue:this.value.join()),t},k.prototype.getSendValue=function(){return this.isEmpty(this.value)?"":-1<Array.prototype.indexOf.call(this.dropDownEle,this.type)?this.getDropDownsValue(!1):-1<Array.prototype.indexOf.call(this.dateType,this.type)?this.value.toISOString():"DateRange"===this.type?this.value[0].toISOString()+" - "+this.value[1].toISOString():this.value.toString()},k.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():-1<Array.prototype.indexOf.call(this.inputDataEle,this.type)?this.componentRoot.value:-1<Array.prototype.indexOf.call(this.dropDownEle,this.type)?this.getDropDownsValue(!0):s(this.type,this.value,this.model)},k.prototype.setRtl=function(e){e?a.addClass([this.element],[fe]):a.removeClass([this.element],[fe])},k.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify(m,{}):"dropdownlist"===this.componentObj.getModuleName()?this.componentObj.focusIn():this.componentObj.element.focus())},k.prototype.removeEditor=function(e){a.isBlazor()&&!this.isStringTemplate&&a.resetBlazorTemplate(this.element.id+"template","Template"),this.tipObj&&this.formEle&&a.closest(this.formEle,"."+G).classList.add(g),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,a.isNullOrUndefined(a.select("."+te,this.element))?this.tipObj&&("MultiSelect"===this.type&&(a.EventHandler.remove(this.containerEle,"mousedown",this.popMouseDown),a.EventHandler.remove(this.containerEle,"click",this.popClickHandler)),this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(a.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,a.removeClass([this.valueWrap],[E,g]),e||this.setProperties({enableEditMode:!1},!0),a.isNullOrUndefined(this.editableOn)||"EditIconClick"===this.editableOn||(e="DblClick"===this.editableOn?"editAreaDoubleClick":"editAreaClick",a.isNullOrUndefined(this.valueWrap.parentElement))||this.valueWrap.parentElement.setAttribute("title",this.getLocale(Q[this.editableOn],e)),this.isReact&&this.clearTemplate()},k.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify(f,{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),a.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},k.prototype.destroyButtons=function(){a.isNullOrUndefined(this.submitBtn)||(a.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),a.EventHandler.remove(this.submitBtn.element,"click",this.submitPrevent),a.EventHandler.remove(this.submitBtn.element,"keydown",this.btnKeyDownHandler),this.submitBtn.destroy(),this.submitBtn=void 0),a.isNullOrUndefined(this.cancelBtn)||(a.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelBtnClick),a.EventHandler.remove(this.cancelBtn.element,"keydown",this.btnKeyDownHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},k.prototype.getQuery=function(t){var i=new l.Query;return Object.keys(t).forEach(function(e){i.addParams(e,t[e])}),i},k.prototype.sendValue=function(){var i=this,e={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};this.trigger("actionBegin",e,function(e){var t;e.cancel?(i.removeSpinner("submit"),"Popup"===i.mode&&i.updateArrow()):(i.isEmpty(i.url)||i.isEmpty(i.primaryKey)||!i.initRender&&(i.initRender||i.prevValue===i.value)?(t={data:{},value:e.data.value},i.triggerSuccess(t)):(i.dataManager=new l.DataManager({url:i.url,adaptor:i.dataAdaptor}),"UrlAdaptor"===i.adaptor?i.dataManager.executeQuery(i.getQuery(e.data),i.successHandler.bind(i),i.failureHandler.bind(i)):i.dataManager.insert(e.data).then(function(e){return i.successHandler(e)}).catch(function(e){return i.failureHandler(e)})),i.dataManager=void 0)})},k.prototype.isEmpty=function(e){return!(!a.isNullOrUndefined(e)&&0!==e.length)},k.prototype.checkIsTemplate=function(){this.isTemplate=!a.isNullOrUndefined(this.template)&&""!==this.template},k.prototype.templateCompile=function(t,e){"string"==typeof e&&(e=e.trim());var i,o=a.compile(e);a.isNullOrUndefined(o)||(i=!(a.isBlazor()&&"function"!=typeof e&&!this.isStringTemplate&&0===e.indexOf("<div>Blazor"))||this.isStringTemplate,i=o({},this,"template",this.element.id+"template",i)),!a.isNullOrUndefined(o)&&0<i.length&&([].slice.call(i).forEach(function(e){t.appendChild(e)}),a.isBlazor())&&!this.isStringTemplate&&"function"!=typeof e&&0===e.indexOf("<div>Blazor")&&a.updateBlazorTemplate(this.element.id+"template","Template",this)},k.prototype.sanitizeHelper=function(t){var i;return this.enableHtmlSanitizer&&(i=a.SanitizeHtmlHelper.beforeSanitize(),a.extend(i,i,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",i,function(e){i.cancel&&!a.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=a.SanitizeHtmlHelper.serializeValue(i,t))})),t},k.prototype.appendTemplate=function(e,t){t="string"==typeof t?this.sanitizeHelper(t):t,this.setProperties({template:t},!0),"function"==typeof t?this.templateCompile(e,t):"string"==typeof t||a.isNullOrUndefined(t.innerHTML)?("."===t[0]||"#"===t[0])&&document.querySelectorAll(t).length?(this.templateEle=document.querySelector(t),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,t):(this.templateEle=t,e.appendChild(this.templateEle))},k.prototype.disable=function(e){e?a.addClass([this.element],[O]):a.removeClass([this.element],[O])},k.prototype.enableEditor=function(e,t){t&&!e||(e?this.renderEditor():this.cancelHandler("cancel"))},k.prototype.checkValidation=function(i,o){var e,t,n,s,r=this;this.validationRules?(t=Object.keys(this.validationRules),n=Object.keys(this.validationRules[t[0]]).length,n="validateHidden"in this.validationRules[t[0]]?n-1:n,s=0,this.formValidate=new d.FormValidator(this.formEle,{rules:this.validationRules,validationBegin:function(e){var t;"RTE"===r.type&&((t=document.createElement("div")).innerHTML=e.value,e.value=t.innerText)},validationComplete:function(t){s+=1,e={errorMessage:t.message,data:{name:r.name,primaryKey:r.primaryKey,value:r.checkValue(r.getSendValue())}},r.trigger("validating",e,function(e){"failure"===t.status?(t.errorElement.innerText=e.errorMessage,r.toggleErrorClass(!0)):r.toggleErrorClass(!1),a.isNullOrUndefined(i)||!i||n!==s&&"failure"!==t.status||(i=!1,r.afterValidation(o),s=0)})},customPlacement:function(e,t){r.formEle&&a.select("."+le,r.formEle).appendChild(t)}}),s=0,this.formValidate.validate()):""!==this.template?(e={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",e,function(e){e.errorMessage?(a.select("."+le,r.formEle).innerHTML=e.errorMessage,r.toggleErrorClass(!0)):r.toggleErrorClass(!1),r.afterValidation(o)})):this.afterValidation(o)},k.prototype.afterValidation=function(e){!this.formEle.classList.contains(C)&&e&&(this.loadSpinner("validate"),"Popup"===this.mode&&this.updateArrow(),this.sendValue())},k.prototype.toggleErrorClass=function(e){var t,i,o;a.isNullOrUndefined(this.formEle)||(t=a.select(".e-input-group",this.formEle),t=[this.formEle,t],i=C,o=e?"add":"remove",[].slice.call(t).forEach(function(e){e&&("add"===o?a.addClass([e],[i]):a.removeClass([e],[i]))}))},k.prototype.updateArrow=function(){var e=this.tipObj.tipPointerPosition;this.tipObj.tipPointerPosition="Middle"===e?"Auto":"Middle",this.tipObj.tipPointerPosition=e,this.tipObj.dataBind()},k.prototype.triggerSuccess=function(e){var t=this,i=e.value;this.trigger("actionSuccess",e,function(e){t.oldValue=i,t.removeSpinner("submit"),e.cancel||t.renderValue(t.checkValue(e.value!==i?e.value:t.getRenderValue())),e.cancel&&"Inline"===t.mode&&a.removeClass([t.valueWrap],[g]),t.removeEditor()})},k.prototype.triggerEndEdit=function(e){var t=this,e={cancel:!1,mode:this.mode,action:e};this.trigger("endEdit",e,function(e){e.cancel||(t.formEle&&t.formEle.classList.contains(C)&&(t.updateModelValue(!0),t.setProperties({value:t.oldValue},!0)),t.removeEditor())})},k.prototype.wireEvents=function(){a.isNullOrUndefined(this.editableOn)||this.wireEditEvent(this.editableOn),a.EventHandler.add(this.editIcon,"click",this.clickHandler,this),a.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),document.addEventListener("scroll",this.onScrollResizeHandler),window.addEventListener("resize",this.onScrollResizeHandler),-1<Array.prototype.indexOf.call(this.clearComponents,this.type)&&a.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},k.prototype.wireDocEvent=function(){a.EventHandler.add(document,"mousedown",this.docClickHandler,this)},k.prototype.wireEditEvent=function(e){"EditIconClick"!==e&&(this.element.setAttribute("title",this.getLocale(Q[e],"Click"===e?"editAreaClick":"editAreaDoubleClick")),a.Browser.isDevice&&a.Browser.isIos&&"DblClick"===e?this.touchModule=new a.Touch(this.valueWrap,{tap:this.doubleTapHandler.bind(this)}):a.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this))},k.prototype.wireEditorKeyDownEvent=function(e){a.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},k.prototype.wireBtnEvents=function(){a.isNullOrUndefined(this.submitBtn)||(a.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),a.EventHandler.add(this.submitBtn.element,"click",this.submitPrevent,this),a.EventHandler.add(this.submitBtn.element,"keydown",this.btnKeyDownHandler,this)),a.isNullOrUndefined(this.cancelBtn)||(a.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelBtnClick,this),a.EventHandler.add(this.cancelBtn.element,"keydown",this.btnKeyDownHandler,this))},k.prototype.cancelBtnClick=function(e){this.cancelHandler("cancel"),this.trigger("cancelClick",e)},k.prototype.unWireEvents=function(){a.isNullOrUndefined(this.editableOn)||this.unWireEditEvent(this.editableOn),a.EventHandler.remove(this.editIcon,"click",this.clickHandler),document.removeEventListener("scroll",this.onScrollResizeHandler),window.removeEventListener("resize",this.onScrollResizeHandler),a.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),-1<Array.prototype.indexOf.call(this.clearComponents,this.type)&&a.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},k.prototype.unWireDocEvent=function(){a.EventHandler.remove(document,"mousedown",this.docClickHandler)},k.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&(this.element.removeAttribute("title"),a.Browser.isDevice&&a.Browser.isIos&&"DblClick"===e?(this.touchModule.destroy(),this.touchModule=void 0):a.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler))},k.prototype.unWireEditorKeyDownEvent=function(e){a.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},k.prototype.submitPrevent=function(e){e.preventDefault()},k.prototype.btnKeyDownHandler=function(e){var t=e.target;(13===e.keyCode&&13===e.which||32===e.keyCode&&32===e.which)&&(t.classList.contains(pe)?this.save():t.classList.contains(de)&&this.cancelHandler("cancel")),9!==e.keyCode||!1!==e.shiftKey||!a.isNullOrUndefined(e.target.nextElementSibling)&&"BUTTON"===e.target.nextElementSibling.tagName||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))},k.prototype.afterOpenHandler=function(e){"Popup"===this.mode&&"MultiSelect"===this.type&&(a.EventHandler.add(this.containerEle,"mousedown",this.popMouseDown,this),a.EventHandler.add(this.containerEle,"click",this.popClickHandler,this)),"Popup"!==this.mode||this.isEmpty(this.titleEle.innerHTML)||e.element.classList.add(Z),"RTE"===this.type?(this.rteModule.refresh(),this.setAttribute(a.select(".e-richtexteditor textarea",this.containerEle),["name"])):"Slider"===this.type&&(this.sliderModule.refresh(),this.setAttribute(a.select(".e-slider-input",this.containerEle),["name"])),this.beginEditArgs.cancelFocus||("Inline"===this.mode&&-1<["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)&&this.model.dataSource instanceof l.DataManager?this.showDropDownPopup():this.setFocus()),this.afterOpenEvent&&(this.tipObj.setProperties({afterOpen:this.afterOpenEvent},!0),this.tipObj.trigger("afterOpen",e))},k.prototype.popMouseDown=function(e){e=e.target.classList;e.contains("e-chips-close")&&!e.contains("e-close-hooker")&&this.updateArrow()},k.prototype.doubleTapHandler=function(e){1<e.tapCount&&this.clickHandler(e.originalEvent)},k.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},k.prototype.submitHandler=function(e){e.preventDefault(),this.save(),this.trigger("submitClick",e)},k.prototype.cancelHandler=function(e){this.triggerEndEdit(e)},k.prototype.popClickHandler=function(e){var t=a.select("."+$,this.element);e.target.classList.contains("e-chips-close")&&this.tipObj.refresh(t)},k.prototype.successHandler=function(e){this.initRender=!1;e={data:e,value:this.getSendValue()};this.triggerSuccess(e)},k.prototype.failureHandler=function(e){var t=this,e={data:e,value:this.getSendValue()};this.trigger("actionFailure",e,function(e){t.removeSpinner("submit"),"Popup"===t.mode&&t.updateArrow()})},k.prototype.enterKeyDownHandler=function(e){a.closest(e.target,"."+v+" .e-richtexteditor")||e.currentTarget.getElementsByTagName("textarea")[0]||(13===e.keyCode&&13===e.which&&a.closest(e.target,"."+v)?(this.save(),this.trigger("submitClick",e)):27===e.keyCode&&27===e.which&&this.cancelHandler("cancel"))},k.prototype.valueKeyDownHandler=function(e){9===e.keyCode&&!0===e.shiftKey&&"BUTTON"!==e.target.tagName&&("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")),13!==e.keyCode||13!==e.which||!e.target.classList.contains(Y)||this.valueWrap.classList.contains(E)||this.element.classList.contains(O)||(e.preventDefault(),this.renderEditor())},k.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},k.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&!a.Browser.isDevice&&this.triggerEndEdit("cancel")},k.prototype.docClickHandler=function(e){var t,i,o,n,e=e.target;this.isClearTarget?this.isClearTarget=!1:(t=a.closest(e,"."+Y),i=a.closest(e,"."+G),o=a.closest(e,"."+b),n=a.closest(e,".e-rte-elements"),!a.isNullOrUndefined(t)&&t.isEqualNode(this.element)||!a.isNullOrUndefined(i)&&this.tipObj&&-1<i.id.indexOf(this.valueWrap.id)||!a.isNullOrUndefined(o)||!a.isNullOrUndefined(n)||e.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")))},k.prototype.changeHandler=function(e){var t={previousValue:void 0===this.compPrevValue?this.value:this.compPrevValue,value:e.value};"AutoComplete"!==this.type&&"ComboBox"!==this.type&&"DropDownList"!==this.type||(t.itemData=e.itemData,t.previousItemData=e.previousItemData),this.compPrevValue=t.value,this.trigger("change",t)},k.prototype.validate=function(){this.checkValidation(!0,!1)},k.prototype.save=function(){var e,t=this;this.formEle&&(this.element.focus(),this.editEle=a.select("."+v,this.formEle),a.select("."+C,this.editEle),this.isTemplate||this.setValue(),e={cancel:!1,mode:this.mode,action:"submit"},this.trigger("endEdit",e,function(e){e.cancel||t.checkValidation(!0,!0)}))},k.prototype.destroy=function(){var t=this;for(this.removeEditor(a.isBlazor()),this.isExtModule&&this.notify(u,{}),this.unWireEvents(),[O,fe].forEach(function(e){a.removeClass([t.element],[e])});this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild);a.isBlazor()&&this.isServerRendered||q.prototype.destroy.call(this),this.isReact&&this.clearTemplate()},k.prototype.getPersistData=function(){return this.addOnPersist(["value"])},k.prototype.requiredModules=function(){var e=[];return-1<Array.prototype.indexOf.call(this.moduleList,this.type)&&e.push({member:F[this.type],args:[this]}),e},k.prototype.getModuleName=function(){return"inplaceeditor"},k.prototype.onPropertyChanged=function(e,t){var i;if(!this.validationRules||!(!a.isNullOrUndefined(this.element.querySelectorAll("."+C))&&0<this.element.querySelectorAll("."+C).length)){this.isEditorOpen()&&((i="enableEditMode"in e)&&t.enableEditMode&&!e.enableEditMode||!i&&this.enableEditMode?this.triggerEndEdit("cancel"):this.removeEditor());for(var o=0,n=Object.keys(e);o<n.length;o++)switch(n[o]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):this.renderInitialValue();break;case"emptyText":"Never"===this.textOption?this.renderValue(this.checkValue(s(this.type,this.value,this.model))):this.renderInitialValue();break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled),e.disabled?this.element.tabIndex=-1:this.element.tabIndex=0;break;case"enableRtl":this.setRtl(e.enableRtl);break;case"cssClass":this.setClass("remove",t.cssClass),this.setClass("add",e.cssClass);break;case"mode":this.enableEditor(this.enableEditMode);break;case"enableEditMode":this.enableEditor(e.enableEditMode);break;case"editableOn":this.unWireEditEvent(t.editableOn),"EditIconClick"!==e.editableOn&&this.wireEditEvent(e.editableOn)}}},j([a.Property("")],k.prototype,"name",void 0),j([a.Property(null)],k.prototype,"value",void 0),j([a.Property("")],k.prototype,"template",void 0),j([a.Property(!0)],k.prototype,"enableHtmlSanitizer",void 0),j([a.Property(!0)],k.prototype,"enableHtmlParse",void 0),j([a.Property("")],k.prototype,"cssClass",void 0),j([a.Property("")],k.prototype,"primaryKey",void 0),j([a.Property("Empty")],k.prototype,"emptyText",void 0),j([a.Property("")],k.prototype,"url",void 0),j([a.Property("Popup")],k.prototype,"mode",void 0),j([a.Property("UrlAdaptor")],k.prototype,"adaptor",void 0),j([a.Property("Text")],k.prototype,"type",void 0),j([a.Property("Click")],k.prototype,"editableOn",void 0),j([a.Property("Never")],k.prototype,"textOption",void 0),j([a.Property("Submit")],k.prototype,"actionOnBlur",void 0),j([a.Property(!1)],k.prototype,"enablePersistence",void 0),j([a.Property(!1)],k.prototype,"disabled",void 0),j([a.Property(!0)],k.prototype,"showButtons",void 0),j([a.Property(!1)],k.prototype,"enableEditMode",void 0),j([a.Property(!0)],k.prototype,"submitOnEnter",void 0),j([a.Complex({},W)],k.prototype,"popupSettings",void 0),j([a.Property(null)],k.prototype,"model",void 0),j([a.Property({iconCss:"e-icons e-save-icon"})],k.prototype,"saveButton",void 0),j([a.Property({iconCss:"e-icons e-cancel-icon"})],k.prototype,"cancelButton",void 0),j([a.Property(null)],k.prototype,"validationRules",void 0),j([a.Event()],k.prototype,"created",void 0),j([a.Event()],k.prototype,"beforeSanitizeHtml",void 0),j([a.Event()],k.prototype,"actionBegin",void 0),j([a.Event()],k.prototype,"actionSuccess",void 0),j([a.Event()],k.prototype,"actionFailure",void 0),j([a.Event()],k.prototype,"validating",void 0),j([a.Event()],k.prototype,"beginEdit",void 0),j([a.Event()],k.prototype,"endEdit",void 0),j([a.Event()],k.prototype,"change",void 0),j([a.Event()],k.prototype,"submitClick",void 0),j([a.Event()],k.prototype,"cancelClick",void 0),j([a.Event()],k.prototype,"destroyed",void 0),j([a.NotifyPropertyChanges],k));function k(e,t){e=q.call(this,e,t)||this;return e.needsID=!0,e}D.prototype.render=function(e){this.module.render(e)},D.prototype.showPopup=function(){this.module.showPopup()},D.prototype.focus=function(){this.module.focus()},D.prototype.update=function(e){this.module.updateValue(e)},D.prototype.getValue=function(){this.module.getRenderValue()},D.prototype.destroyComponent=function(){a.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},D.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},D.prototype.addEventListener=function(){this.parent.on(h,this.render,this),this.parent.on(m,this.focus,this),this.parent.on(U,this.showPopup,this),this.parent.on(c,this.update,this),this.parent.on(y,this.getValue,this),this.parent.on(f,this.destroyComponent,this),this.parent.on(u,this.destroy,this)},D.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(h,this.render),this.parent.off(m,this.focus),this.parent.off(U,this.showPopup),this.parent.off(c,this.update),this.parent.off(y,this.getValue),this.parent.off(f,this.destroyComponent),this.parent.off(u,this.destroy))};var P=D;function D(e,t){this.parent=e,this.module=t,this.addEventListener()}M.prototype.render=function(e){this.compObj=new o.AutoComplete(this.parent.model),this.compObj.appendTo(e.target)},M.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},M.prototype.focus=function(){this.compObj.element.focus()},M.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},M.prototype.destroy=function(){this.base.destroy()},M.prototype.getModuleName=function(){return"auto-complete"};j=M;function M(e){this.compObj=void 0,this.parent=e,(this.parent.atcModule=this).base=new P(this.parent,this)}V.prototype.render=function(e){this.compObj=new d.ColorPicker(this.parent.model),this.compObj.appendTo(e.target)},V.prototype.focus=function(){this.compObj.element.focus()},V.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},V.prototype.destroy=function(){this.base.destroy()},V.prototype.getModuleName=function(){return"color-picker"};var ve=V;function V(e){this.compObj=void 0,this.parent=e,(this.parent.colorModule=this).base=new P(this.parent,this)}S.prototype.render=function(e){this.compObj=new o.ComboBox(this.parent.model),this.compObj.appendTo(e.target)},S.prototype.focus=function(){this.compObj.element.focus()},S.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},S.prototype.destroy=function(){this.base.destroy()},S.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},S.prototype.getModuleName=function(){return"combo-box"};var be=S;function S(e){this.compObj=void 0,this.parent=e,(this.parent.comboBoxModule=this).base=new P(this.parent,this)}T.prototype.render=function(e){this.compObj=new i.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},T.prototype.focus=function(){this.compObj.element.focus()},T.prototype.getModuleName=function(){return"date-range-picker"},T.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},T.prototype.destroy=function(){this.base.destroy()};var Ee=T;function T(e){this.compObj=void 0,this.parent=e,(this.parent.dateRangeModule=this).base=new P(this.parent,this)}var Oe=function(){return(Oe=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},ge=(B.prototype.render=function(e){var t=Oe({},this.parent.model);this.openEvent=t.open,this.closeEvent=t.close,t.open=this.openHandler.bind(this),t.close=this.closeHandler.bind(this),this.compObj=new o.MultiSelect(t),this.compObj.appendTo(e.target)},B.prototype.openHandler=function(e){this.isPopOpen=!0,this.openEvent&&(this.compObj.setProperties({open:this.openEvent},!0),this.compObj.trigger("open",e))},B.prototype.closeHandler=function(e){this.isPopOpen=!1,this.closeEvent&&(this.compObj.setProperties({close:this.closeEvent},!0),this.compObj.trigger("close",e))},B.prototype.focus=function(){var e;this.isPopOpen||((e=document.createEvent("MouseEvent")).initEvent("mousedown",!0,!0),a.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(e))},B.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},B.prototype.getRenderValue=function(){this.parent.printValue=this.compObj.text},B.prototype.destroy=function(){this.base.destroy()},B.prototype.getModuleName=function(){return"multi-select"},B);function B(e){this.isPopOpen=!1,this.compObj=void 0,this.parent=e,(this.parent.multiSelectModule=this).base=new P(this.parent,this)}H.prototype.render=function(e){this.compObj=new t.RichTextEditor(this.parent.model),this.compObj.appendTo(e.target)},H.prototype.focus=function(){this.compObj.focusIn()},H.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&(this.parent.setProperties({value:this.getRteValue()},!0),this.parent.extendModelValue(this.compObj.value))},H.prototype.getRteValue=function(){var e;return"Markdown"===this.compObj.editorMode?""===(e=this.compObj.contentModule.getEditPanel().value)?"":e:"<p><br></p>"===(e=this.compObj.contentModule.getEditPanel().innerHTML)||"<p><br></p>"===e||""===e?"":e},H.prototype.refresh=function(){this.compObj.refresh()},H.prototype.destroy=function(){this.base.destroy()},H.prototype.getModuleName=function(){return"rte"};var Ce=H;function H(e){this.compObj=void 0,t.RichTextEditor.Inject(t.HtmlEditor,t.MarkdownEditor,t.Toolbar,t.Link,t.Image,t.QuickToolbar,t.Table,t.FileManager,t.PasteCleanup,t.EmojiPicker,t.Audio,t.Video,t.FormatPainter,t.Count),this.parent=e,(this.parent.rteModule=this).base=new P(this.parent,this)}N.prototype.render=function(e){this.compObj=new d.Slider(this.parent.model),this.compObj.appendTo(e.target)},N.prototype.focus=function(){this.compObj.element.focus()},N.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},N.prototype.refresh=function(){this.compObj.refresh()},N.prototype.destroy=function(){this.base.destroy()},N.prototype.getModuleName=function(){return"slider"};var we=N;function N(e){this.compObj=void 0,this.parent=e,(this.parent.sliderModule=this).base=new P(this.parent,this)}x.prototype.render=function(e){this.compObj=new i.TimePicker(this.parent.model),this.compObj.appendTo(e.target)},x.prototype.focus=function(){this.compObj.focusIn()},x.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},x.prototype.getModuleName=function(){return"time-picker"},x.prototype.destroy=function(){this.base.destroy()};var je=x;function x(e){this.compObj=void 0,this.parent=e,(this.parent.timeModule=this).base=new P(this.parent,this)}e.AutoComplete=j,e.BTN_CANCEL=de,e.BTN_SAVE=pe,e.BUTTONS=ae,e.Base=P,e.CTRL_GROUP=re,e.CTRL_OVERLAY=ce,e.ColorPicker=ve,e.ComboBox=be,e.DISABLE=O,e.DateRangePicker=Ee,e.EDITABLE_ERROR=le,e.ELEMENTS=b,e.ERROR=C,e.FORM=se,e.HIDE=g,e.ICONS=ue,e.INLINE=te,e.INPUT=v,e.InPlaceEditor=z,e.LOAD=w,e.LOADING=ne,e.MultiSelect=ge,e.OPEN=E,e.OVERLAY_ICON=X,e.POPUP=ie,e.PRIMARY=me,e.PopupSettings=W,e.ROOT=Y,e.ROOT_TIP=G,e.RTE_SPIN_WRAP=he,e.RTL=fe,e.Rte=Ce,e.SHOW=ye,e.Slider=we,e.TIP_TITLE=Z,e.TITLE=ee,e.TimePicker=je,e.VALUE=J,e.VALUE_WRAPPER=$,e.WRAPPER=oe,e.accessValue=y,e.destroy=u,e.destroyModules=f,e.encode=L,e.getCompValue=A,e.localeConstant=Q,e.modulesList=F,e.parseValue=s,e.render=h,e.setFocus=m,e.showPopup=U,e.update=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
11
2
|
//# sourceMappingURL=ej2-inplace-editor.umd.min.js.map
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: ej2-inplace-editor.min.js
|
|
3
|
-
* version : 31.2.12
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
this.ej=this.ej||{},this.ej.inplaceeditor=function(e,t,i,o,n,s,r,a,l){"use strict";function p(e,i,o){if(t.isNullOrUndefined(i)||""===i)return"";var n,s;switch(e){case"Color":var r=i;n=r.length>7?r.slice(0,-2):r;break;case"Date":s=o.format,n=c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"});break;case"DateRange":s=o.format;var a=i;n=c.formatDate(a[0],{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"})+" - "+c.formatDate(a[1],{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"});break;case"DateTime":s=o.format,n=t.isNullOrUndefined(s)||""===s?c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"})+" "+c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"t":"hm"}):c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"});break;case"Time":s=o.format,n=c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"t":"hm"});break;case"Numeric":s=t.isNullOrUndefined(o.format)?"n2":o.format;var l=t.isNullOrUndefined(i)?null:"number"==typeof i?i:c.parseNumber(i);n=c.formatNumber(l,{format:s});break;default:n=i.toString()}return n}function d(e,i){if(t.isNullOrUndefined(i)||""===i)return i;if("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof i){if("DateRange"===e)if("object"==typeof i&&"string"==typeof i[0])i=[new Date(i[0]),new Date(i[1])];else if("string"==typeof i){var o=i.split("-");i=[new Date(o[0]),new Date(o[1])]}}else i=new Date(i);return i}function h(e){for(var t=[],i=e.length-1;i>=0;i--)t.unshift(["&#",e[i].charCodeAt(0),";"].join(""));return t.join("")}var c=new t.Internationalization,u=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)}}(),m=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 i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),m([t.Property("")],i.prototype,"title",void 0),m([t.Property(null)],i.prototype,"model",void 0),i}(t.ChildProperty),y={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},v={Click:{editAreaClick:"Click to edit"},DblClick:{editAreaDoubleClick:"Double click to edit"},EditIconClick:{editAreaClick:"Click to edit"}},b="e-inplaceeditor",E="e-inplaceeditor-tip",O="e-editable-value-wrapper",g="e-editable-value",C="e-editable-title",w="e-editable-inline",j="e-editable-popup",k="e-editable-form",P="e-editable-component",D="e-editable-action-buttons",M="e-editable-elements",V="e-editable-open",S="e-hide",T="e-rtl",B="e-error",H="e-loading",N=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)}}(),x=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.needsID=!0,o}return N(l,e),l.prototype.initializeValue=function(){this.initRender=!0,this.isTemplate=!1,this.isVue=!1,this.isExtModule=!1,this.submitBtn=void 0,this.cancelBtn=void 0,this.isClearTarget=!1,this.btnElements=void 0,this.dataManager=void 0,this.oldValue=void 0,this.divComponents=["RTE","Slider"],this.clearComponents=["AutoComplete","Mask","Text"],this.dateType=["Date","DateTime","Time"],this.inputDataEle=["Date","DateTime","DateRange","Time","Numeric"],this.dropDownEle=["AutoComplete","ComboBox","DropDownList","MultiSelect"],this.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"]},l.prototype.preRender=function(){this.initializeValue(),this.onScrollResizeHandler=this.scrollResizeHandler.bind(this),t.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:C}),!t.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.afterOpenEvent=this.popupSettings.model.afterOpen)},l.prototype.render=function(){t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&(this.disabled?this.element.setAttribute("tabindex","-1"):this.element.setAttribute("tabindex","0")),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):this.renderInitialValue(),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode,!0),this.setClass("add",this.cssClass),this.renderComplete()},l.prototype.setClass=function(e,i){if(!this.isEmpty(i))for(var o=i.split(" "),n=0;n<o.length;n++)""!==o[n].trim()&&("add"===e?t.addClass([this.element],[o[n]]):t.removeClass([this.element],[o[n]]))},l.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:O}),t.isBlazor()||(this.element.innerHTML=""),this.valueEle=this.createElement("span",{className:g}),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.renderInitialValue=function(){!(["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1)||t.isNullOrUndefined(this.value)||this.isEmpty(this.value.toString())||t.isNullOrUndefined(this.model.fields)||t.isNullOrUndefined(this.model.dataSource)?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):(this.renderValue(this.getLocale({loadingText:"Loading..."},"loadingText")),this.valueWrap.classList.add(H),s.createSpinner({target:this.valueWrap,width:10}),s.showSpinner(this.valueWrap),this.getInitFieldMapValue())},l.prototype.getInitFieldMapValue=function(){var e=this,o=this.model,n=o.fields.text,s=o.fields.value,r=t.isNullOrUndefined(o.query)?new i.Query:o.query;o.dataSource instanceof i.DataManager?o.dataSource.executeQuery(this.getInitQuery(o,r)).then(function(t){e.updateInitValue(n,s,t.result)}):this.updateInitValue(n,s,new i.DataManager(o.dataSource).executeLocal(this.getInitQuery(o,r)))},l.prototype.getInitQuery=function(e,t){var o,n=e.fields.value,s=this.value;if("MultiSelect"!==this.type||"object"!=typeof this.value)o=new i.Predicate(n,"equal",this.value);else for(var r=0,a=0,l=s;a<l.length;a++){var p=l[a];o=0===r?o=new i.Predicate(n,"equal",p):o.or(n,"equal",p),r++}return t.where(o)},l.prototype.updateInitValue=function(e,i,o){if(!(o.length<=0)){if(1===o.length)this.valueEle.innerHTML=this.checkValue(t.getValue(t.isNullOrUndefined(e)?i:e,o[0]));else{for(var n=[],r=0,a=o;r<a.length;r++){var l=a[r];n.push(t.getValue(t.isNullOrUndefined(e)?i:e,l))}this.valueEle.innerHTML=this.checkValue(n.toString())}s.hideSpinner(this.valueWrap),this.valueWrap.classList.remove(H)}},l.prototype.renderValue=function(e){this.enableHtmlSanitizer&&"RTE"!==this.type&&"MultiSelect"!==this.type?this.valueEle.innerText=e:this.valueEle.innerHTML=this.enableHtmlParse?e:h(e),"Color"===this.type&&t.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&this.isEditorOpen()&&t.removeClass([this.valueWrap],[S])},l.prototype.isEditorOpen=function(){return!(this.isVue&&(this.enableEditMode||!(t.isNullOrUndefined(this.valueWrap)||this.valueWrap.classList.contains(S)||this.valueWrap.classList.contains("e-tooltip"))))},l.prototype.renderEditor=function(){if(this.prevValue=this.value,this.beginEditArgs={mode:this.mode,cancelFocus:!1,cancel:!1},this.trigger("beginEdit",this.beginEditArgs),!this.beginEditArgs.cancel){var e=void 0,i=t.select("."+O,this.element);if("EditIconClick"!==this.editableOn&&i.parentElement.removeAttribute("title"),!this.valueWrap.classList.contains(V)){if("Inline"===this.mode)t.addClass([this.valueWrap],[S]),this.inlineWrapper=this.createElement("div",{className:w}),this.element.appendChild(this.inlineWrapper),["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1?this.checkRemoteData(this.model):this.renderAndOpen();else{!t.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.popupSettings.model.afterOpen=this.afterOpenHandler.bind(this));var o=this.createElement("div",{className:j});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),e={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:E,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),t.extend(e,this.popupSettings.model,e,!0),this.tipObj=new s.Tooltip(e),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),t.addClass([this.valueWrap],[V]),this.setProperties({enableEditMode:!0},!0),this.isReact&&this.renderReactTemplates()}}},l.prototype.renderAndOpen=function(){this.renderControl(this.inlineWrapper),this.afterOpenHandler(null)},l.prototype.checkRemoteData=function(e){var o=this;e.dataSource instanceof i.DataManager?(e.dataBound=function(){o.afterOpenHandler(null)},this.renderControl(this.inlineWrapper),(t.isNullOrUndefined(e.value)&&t.isNullOrUndefined(this.value)||e.value===this.value&&!t.isNullOrUndefined(e.value)&&0===e.value.length)&&this.showDropDownPopup()):this.renderAndOpen()},l.prototype.showDropDownPopup=function(){"DropDownList"===this.type?(this.model.allowFiltering||this.componentObj.focusIn(),this.componentObj.showPopup()):this.isExtModule&&this.notify("MultiSelect"===this.type?"set-focus":"show-popup",{})},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,"id"===t?i+"_editor":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:k});var i=this.createElement("div",{className:"e-component-group"}),o=this.createElement("div",{className:P});return e.appendChild(this.containerEle),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),o.appendChild(this.loader)),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:D}),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 i=void 0;if(Object.keys(e.model).length>0){var n=this.createElement("button",{className:e.className,attrs:{type:e.type,title:"save"==e.constant?t.isNullOrUndefined(this.saveButton.content)?this.getLocale(e.title,e.constant):this.saveButton.content:t.isNullOrUndefined(this.cancelButton.content)?this.getLocale(e.title,e.constant):this.cancelButton.content}});e.container.appendChild(n),i=new o.Button(e.model,n)}return i},l.prototype.renderComponent=function(e){this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1;var i;if(i=t.isNullOrUndefined(this.model.cssClass)?M:this.model.cssClass.indexOf(M)<0?""===this.model.cssClass?M:this.model.cssClass+" "+M:this.model.cssClass,t.extend(this.model,this.model,{cssClass:i,enableRtl:this.enableRtl,locale:this.locale,change:this.changeHandler.bind(this)}),t.isNullOrUndefined(this.value)||this.updateModelValue(!1),this.isExtModule)this.notify("render",{module:y[this.type],target:e,type:this.type});else{switch(t.isNullOrUndefined(this.model.showClearButton)&&!t.isBlazor()&&(this.model.showClearButton=!0),this.type){case"Date":this.componentObj=new n.DatePicker(this.model);break;case"DateTime":this.componentObj=new n.DateTimePicker(this.model);break;case"DropDownList":this.componentObj=new a.DropDownList(this.model);break;case"Mask":this.componentObj=new r.MaskedTextBox(this.model);break;case"Numeric":this.model.value&&(new RegExp("[eE][-+]?([0-9]+)").test(this.model.value)?this.model.value=this.model.value:this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"")),this.componentObj=new r.NumericTextBox(this.model);break;case"Text":this.componentObj=new r.TextBox(this.model)}this.componentObj.appendTo(e)}},l.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new i.UrlAdaptor;break;case"WebApiAdaptor":this.dataAdaptor=new i.WebApiAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new i.ODataV4Adaptor}},l.prototype.loadSpinner=function(e){t.addClass([this.loader],["e-show"]),"validate"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type?this.spinObj={target:this.loader,width:t.Browser.isDevice?"16px":"14px"}:(t.addClass([this.loader],["e-rte-spin-wrap"]),t.addClass([this.getEditElement()],["e-control-overlay"]),this.spinObj={target:this.loader}),this.formEle&&t.addClass([this.formEle],[H]),this.btnElements&&t.addClass([this.btnElements],[S]),t.setStyleAttribute(this.loader,{width:"100%"}),s.createSpinner(this.spinObj),s.showSpinner(this.spinObj.target)},l.prototype.removeSpinner=function(e){this.loader.removeAttribute("style"),s.hideSpinner(this.spinObj.target),t.detach(this.spinObj.target.firstChild),"submit"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type||(t.removeClass([this.loader],["e-rte-spin-wrap"]),t.removeClass([this.getEditElement()],["e-control-overlay"])),this.formEle&&t.removeClass([this.formEle],[H]),this.btnElements&&t.removeClass([this.btnElements],[S]),t.removeClass([this.loader],["e-show"])},l.prototype.getEditElement=function(){return t.select("."+M,this.formEle)},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.extendModelValue=function(e){var i=this.model;t.extend(i,{value:e}),this.setProperties({model:i},!0)},l.prototype.updateValue=function(){this.oldValue=this.value,this.enableHtmlSanitizer&&"string"==typeof this.value&&(this.oldValue=this.sanitizeHelper(this.value)),t.isNullOrUndefined(this.value)||(this.setProperties({value:d(this.type,this.oldValue)},!0),this.extendModelValue(d(this.type,this.oldValue)))},l.prototype.updateModelValue=function(e){"MultiSelect"!==this.type||this.isEmpty(this.value)?this.model.value=e?this.oldValue:this.value:this.model.value=e?this.oldValue.slice():this.value.slice()},l.prototype.setValue=function(){this.isExtModule?this.notify("update",{type:this.type}):this.componentObj&&("Numeric"===this.type&&null===this.componentObj.value&&this.componentObj.setProperties({value:null},!0),this.setProperties({value:this.componentObj.value},!0),this.extendModelValue(this.componentObj.value))},l.prototype.getDropDownsValue=function(e){var i;return Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1&&"MultiSelect"!==this.type?i=e?t.select(".e-"+this.type.toLocaleLowerCase(),this.containerEle).value:this.value.toString():"MultiSelect"===this.type&&(this.notify("access-value",{type:this.type}),i=e?this.printValue:this.value.join()),i},l.prototype.getSendValue=function(){return this.isEmpty(this.value)?"":Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1?this.getDropDownsValue(!1):Array.prototype.indexOf.call(this.dateType,this.type)>-1?this.value.toISOString():"DateRange"===this.type?this.value[0].toISOString()+" - "+this.value[1].toISOString():this.value.toString()},l.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():Array.prototype.indexOf.call(this.inputDataEle,this.type)>-1?this.componentRoot.value:Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1?this.getDropDownsValue(!0):p(this.type,this.value,this.model)},l.prototype.setRtl=function(e){e?t.addClass([this.element],[T]):t.removeClass([this.element],[T])},l.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify("set-focus",{}):"dropdownlist"===this.componentObj.getModuleName()?this.componentObj.focusIn():this.componentObj.element.focus())},l.prototype.removeEditor=function(e){t.isBlazor()&&!this.isStringTemplate&&t.resetBlazorTemplate(this.element.id+"template","Template");if(this.tipObj&&this.formEle&&t.closest(this.formEle,"."+E).classList.add(S),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,t.isNullOrUndefined(t.select("."+w,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,S]),e||this.setProperties({enableEditMode:!1},!0),!t.isNullOrUndefined(this.editableOn)&&"EditIconClick"!==this.editableOn){var i="DblClick"===this.editableOn?"editAreaDoubleClick":"editAreaClick";t.isNullOrUndefined(this.valueWrap.parentElement)||this.valueWrap.parentElement.setAttribute("title",this.getLocale(v[this.editableOn],i))}this.isReact&&this.clearTemplate()},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),t.EventHandler.remove(this.submitBtn.element,"keydown",this.btnKeyDownHandler),this.submitBtn.destroy(),this.submitBtn=void 0),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelBtnClick),t.EventHandler.remove(this.cancelBtn.element,"keydown",this.btnKeyDownHandler),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=this,t={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};this.trigger("actionBegin",t,function(t){if(t.cancel)e.removeSpinner("submit"),"Popup"===e.mode&&e.updateArrow();else{if(e.isEmpty(e.url)||e.isEmpty(e.primaryKey)||!e.initRender&&(e.initRender||e.prevValue===e.value)){var o={data:{},value:t.data.value};e.triggerSuccess(o)}else e.dataManager=new i.DataManager({url:e.url,adaptor:e.dataAdaptor}),"UrlAdaptor"===e.adaptor?e.dataManager.executeQuery(e.getQuery(t.data),e.successHandler.bind(e),e.failureHandler.bind(e)):e.dataManager.insert(t.data).then(function(t){return e.successHandler(t)}).catch(function(t){return e.failureHandler(t)});e.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);if(!t.isNullOrUndefined(n)){var s=!(t.isBlazor()&&"function"!=typeof i&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor"))||this.isStringTemplate;o=n({},this,"template",this.element.id+"template",s)}!t.isNullOrUndefined(n)&&o.length>0&&([].slice.call(o).forEach(function(t){e.appendChild(t)}),t.isBlazor()&&!this.isStringTemplate&&"function"!=typeof i&&0===i.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+"template","Template",this))},l.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var i=t.SanitizeHtmlHelper.beforeSanitize(),o={cancel:!1,helper:null};t.extend(i,i,o),this.trigger("beforeSanitizeHtml",i,function(o){i.cancel&&!t.isNullOrUndefined(i.helper)?e=i.helper(e):i.cancel||(e=t.SanitizeHtmlHelper.serializeValue(i,e))})}return e},l.prototype.appendTemplate=function(e,i){i="string"==typeof i?this.sanitizeHelper(i):i,this.setProperties({template:i},!0),"function"==typeof i?this.templateCompile(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,t){t&&!e||(e?this.renderEditor():this.cancelHandler("cancel"))},l.prototype.checkValidation=function(e,i){var o,n=this;if(this.validationRules){var s=Object.keys(this.validationRules),a=Object.keys(this.validationRules[s[0]]).length;a="validateHidden"in this.validationRules[s[0]]?a-1:a;var l=0;this.formValidate=new r.FormValidator(this.formEle,{rules:this.validationRules,validationBegin:function(e){if("RTE"===n.type){var t=document.createElement("div");t.innerHTML=e.value,e.value=t.innerText}},validationComplete:function(s){l+=1,o={errorMessage:s.message,data:{name:n.name,primaryKey:n.primaryKey,value:n.checkValue(n.getSendValue())}},n.trigger("validating",o,function(o){"failure"===s.status?(s.errorElement.innerText=o.errorMessage,n.toggleErrorClass(!0)):n.toggleErrorClass(!1),t.isNullOrUndefined(e)||!e||a!==l&&"failure"!==s.status||(e=!1,n.afterValidation(i),l=0)})},customPlacement:function(e,i){n.formEle&&t.select(".e-editable-error",n.formEle).appendChild(i)}}),l=0,this.formValidate.validate()}else""!==this.template?(o={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",o,function(e){e.errorMessage?(t.select(".e-editable-error",n.formEle).innerHTML=e.errorMessage,n.toggleErrorClass(!0)):n.toggleErrorClass(!1),n.afterValidation(i)})):this.afterValidation(i)},l.prototype.afterValidation=function(e){!this.formEle.classList.contains(B)&&e&&(this.loadSpinner("validate"),"Popup"===this.mode&&this.updateArrow(),this.sendValue())},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],B,e?"add":"remove")}},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 i=this,o=e.value;this.trigger("actionSuccess",e,function(e){i.oldValue=o,i.removeSpinner("submit"),e.cancel||i.renderValue(i.checkValue(e.value!==o?e.value:i.getRenderValue())),e.cancel&&"Inline"===i.mode&&t.removeClass([i.valueWrap],[S]),i.removeEditor()})},l.prototype.triggerEndEdit=function(e){var t=this,i={cancel:!1,mode:this.mode,action:e};this.trigger("endEdit",i,function(e){e.cancel||(t.formEle&&t.formEle.classList.contains(B)&&(t.updateModelValue(!0),t.setProperties({value:t.oldValue},!0)),t.removeEditor())})},l.prototype.wireEvents=function(){t.isNullOrUndefined(this.editableOn)||this.wireEditEvent(this.editableOn),t.EventHandler.add(this.editIcon,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),document.addEventListener("scroll",this.onScrollResizeHandler),window.addEventListener("resize",this.onScrollResizeHandler),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(v[e],i)),t.Browser.isDevice&&t.Browser.isIos&&"DblClick"===e?this.touchModule=new t.Touch(this.valueWrap,{tap:this.doubleTapHandler.bind(this)}):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.EventHandler.add(this.submitBtn.element,"keydown",this.btnKeyDownHandler,this)),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelBtnClick,this),t.EventHandler.add(this.cancelBtn.element,"keydown",this.btnKeyDownHandler,this))},l.prototype.cancelBtnClick=function(e){this.cancelHandler("cancel"),this.trigger("cancelClick",e)},l.prototype.unWireEvents=function(){t.isNullOrUndefined(this.editableOn)||this.unWireEditEvent(this.editableOn),t.EventHandler.remove(this.editIcon,"click",this.clickHandler),document.removeEventListener("scroll",this.onScrollResizeHandler),window.removeEventListener("resize",this.onScrollResizeHandler),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.Browser.isDevice&&t.Browser.isIos&&"DblClick"===e?(this.touchModule.destroy(),this.touchModule=void 0):t.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler))},l.prototype.unWireEditorKeyDownEvent=function(e){t.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},l.prototype.submitPrevent=function(e){e.preventDefault()},l.prototype.btnKeyDownHandler=function(e){var i=e.target;(13===e.keyCode&&13===e.which||32===e.keyCode&&32===e.which)&&(i.classList.contains("e-btn-save")?this.save():i.classList.contains("e-btn-cancel")&&this.cancelHandler("cancel")),9!==e.keyCode||!1!==e.shiftKey||!t.isNullOrUndefined(e.target.nextElementSibling)&&"BUTTON"===e.target.nextElementSibling.tagName||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))},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(),this.setAttribute(t.select(".e-richtexteditor textarea",this.containerEle),["name"])):"Slider"===this.type&&(this.sliderModule.refresh(),this.setAttribute(t.select(".e-slider-input",this.containerEle),["name"])),this.beginEditArgs.cancelFocus||("Inline"===this.mode&&["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1&&this.model.dataSource instanceof i.DataManager?this.showDropDownPopup():this.setFocus()),this.afterOpenEvent&&(this.tipObj.setProperties({afterOpen:this.afterOpenEvent},!0),this.tipObj.trigger("afterOpen",e))},l.prototype.popMouseDown=function(e){var t=e.target.classList;t.contains("e-chips-close")&&!t.contains("e-close-hooker")&&this.updateArrow()},l.prototype.doubleTapHandler=function(e){e.tapCount>1&&this.clickHandler(e.originalEvent)},l.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},l.prototype.submitHandler=function(e){e.preventDefault(),this.save(),this.trigger("submitClick",e)},l.prototype.cancelHandler=function(e){this.triggerEndEdit(e)},l.prototype.popClickHandler=function(e){var i=t.select("."+O,this.element);e.target.classList.contains("e-chips-close")&&this.tipObj.refresh(i)},l.prototype.successHandler=function(e){this.initRender=!1;var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},l.prototype.failureHandler=function(e){var t=this,i={data:e,value:this.getSendValue()};this.trigger("actionFailure",i,function(e){t.removeSpinner("submit"),"Popup"===t.mode&&t.updateArrow()})},l.prototype.enterKeyDownHandler=function(e){t.closest(e.target,"."+P+" .e-richtexteditor")||e.currentTarget.getElementsByTagName("textarea")[0]||(13===e.keyCode&&13===e.which&&t.closest(e.target,"."+P)?(this.save(),this.trigger("submitClick",e)):27===e.keyCode&&27===e.which&&this.cancelHandler("cancel"))},l.prototype.valueKeyDownHandler=function(e){9===e.keyCode&&!0===e.shiftKey&&"BUTTON"!==e.target.tagName&&("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")),13!==e.keyCode||13!==e.which||!e.target.classList.contains(b)||this.valueWrap.classList.contains(V)||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&&!t.Browser.isDevice&&this.triggerEndEdit("cancel")},l.prototype.docClickHandler=function(e){var i=e.target;if(this.isClearTarget)return void(this.isClearTarget=!1);var o=t.closest(i,"."+b),n=t.closest(i,"."+E),s=t.closest(i,"."+M),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("cancel"))},l.prototype.changeHandler=function(e){var t={previousValue:void 0===this.compPrevValue?this.value:this.compPrevValue,value:e.value};"AutoComplete"!==this.type&&"ComboBox"!==this.type&&"DropDownList"!==this.type||(t.itemData=e.itemData,t.previousItemData=e.previousItemData),this.compPrevValue=t.value,this.trigger("change",t)},l.prototype.validate=function(){this.checkValidation(!0,!1)},l.prototype.save=function(){var e=this;if(this.formEle){this.element.focus(),this.editEle=t.select("."+P,this.formEle);t.select("."+B,this.editEle),this.isTemplate||this.setValue();var i={cancel:!1,mode:this.mode,action:"submit"};this.trigger("endEdit",i,function(t){t.cancel||e.checkValidation(!0,!0)})}},l.prototype.destroy=function(){var i=this;for(this.removeEditor(t.isBlazor()),this.isExtModule&&this.notify("destroy",{}),this.unWireEvents(),["e-disable",T].forEach(function(e){t.removeClass([i.element],[e])});this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild);t.isBlazor()&&this.isServerRendered||e.prototype.destroy.call(this),this.isReact&&this.clearTemplate()},l.prototype.getPersistData=function(){return this.addOnPersist(["value"])},l.prototype.requiredModules=function(){var e=[];return Array.prototype.indexOf.call(this.moduleList,this.type)>-1&&e.push({member:y[this.type],args:[this]}),e},l.prototype.getModuleName=function(){return"inplaceeditor"},l.prototype.onPropertyChanged=function(e,i){if(!this.validationRules||!(!t.isNullOrUndefined(this.element.querySelectorAll("."+B))&&this.element.querySelectorAll("."+B).length>0)){if(this.isEditorOpen()){var o="enableEditMode"in e;o&&i.enableEditMode&&!e.enableEditMode||!o&&this.enableEditMode?this.triggerEndEdit("cancel"):this.removeEditor()}for(var n=0,s=Object.keys(e);n<s.length;n++)switch(s[n]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):this.renderInitialValue();break;case"emptyText":"Never"===this.textOption?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):this.renderInitialValue();break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled),e.disabled?this.element.tabIndex=-1:this.element.tabIndex=0;break;case"enableRtl":this.setRtl(e.enableRtl);break;case"cssClass":this.setClass("remove",i.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(i.editableOn),"EditIconClick"!==e.editableOn&&this.wireEditEvent(e.editableOn)}}},x([t.Property("")],l.prototype,"name",void 0),x([t.Property(null)],l.prototype,"value",void 0),x([t.Property("")],l.prototype,"template",void 0),x([t.Property(!0)],l.prototype,"enableHtmlSanitizer",void 0),x([t.Property(!0)],l.prototype,"enableHtmlParse",void 0),x([t.Property("")],l.prototype,"cssClass",void 0),x([t.Property("")],l.prototype,"primaryKey",void 0),x([t.Property("Empty")],l.prototype,"emptyText",void 0),x([t.Property("")],l.prototype,"url",void 0),x([t.Property("Popup")],l.prototype,"mode",void 0),x([t.Property("UrlAdaptor")],l.prototype,"adaptor",void 0),x([t.Property("Text")],l.prototype,"type",void 0),x([t.Property("Click")],l.prototype,"editableOn",void 0),x([t.Property("Never")],l.prototype,"textOption",void 0),x([t.Property("Submit")],l.prototype,"actionOnBlur",void 0),x([t.Property(!1)],l.prototype,"enablePersistence",void 0),x([t.Property(!1)],l.prototype,"disabled",void 0),x([t.Property(!0)],l.prototype,"showButtons",void 0),x([t.Property(!1)],l.prototype,"enableEditMode",void 0),x([t.Property(!0)],l.prototype,"submitOnEnter",void 0),x([t.Complex({},f)],l.prototype,"popupSettings",void 0),x([t.Property(null)],l.prototype,"model",void 0),x([t.Property({iconCss:"e-icons e-save-icon"})],l.prototype,"saveButton",void 0),x([t.Property({iconCss:"e-icons e-cancel-icon"})],l.prototype,"cancelButton",void 0),x([t.Property(null)],l.prototype,"validationRules",void 0),x([t.Event()],l.prototype,"created",void 0),x([t.Event()],l.prototype,"beforeSanitizeHtml",void 0),x([t.Event()],l.prototype,"actionBegin",void 0),x([t.Event()],l.prototype,"actionSuccess",void 0),x([t.Event()],l.prototype,"actionFailure",void 0),x([t.Event()],l.prototype,"validating",void 0),x([t.Event()],l.prototype,"beginEdit",void 0),x([t.Event()],l.prototype,"endEdit",void 0),x([t.Event()],l.prototype,"change",void 0),x([t.Event()],l.prototype,"submitClick",void 0),x([t.Event()],l.prototype,"cancelClick",void 0),x([t.Event()],l.prototype,"destroyed",void 0),l=x([t.NotifyPropertyChanges],l)}(t.Component),A=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.showPopup=function(){this.module.showPopup()},e.prototype.focus=function(){this.module.focus()},e.prototype.update=function(e){this.module.updateValue(e)},e.prototype.getValue=function(){this.module.getRenderValue()},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("show-popup",this.showPopup,this),this.parent.on("update",this.update,this),this.parent.on("access-value",this.getValue,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("show-popup",this.showPopup),this.parent.off("update",this.update),this.parent.off("access-value",this.getValue),this.parent.off("destroy-modules",this.destroyComponent),this.parent.off("destroy",this.destroy))},e}(),L=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new a.AutoComplete(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},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),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),I=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new r.ColorPicker(this.parent.model),this.compObj.appendTo(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),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),U=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new a.ComboBox(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getModuleName=function(){return"combo-box"},e}(),W=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new n.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.getModuleName=function(){return"date-range-picker"},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e}(),z=function(){return(z=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)},_=function(){function e(e){this.isPopOpen=!1,this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){var t=z({},this.parent.model);this.openEvent=t.open,this.closeEvent=t.close,t.open=this.openHandler.bind(this),t.close=this.closeHandler.bind(this),this.compObj=new a.MultiSelect(t),this.compObj.appendTo(e.target)},e.prototype.openHandler=function(e){this.isPopOpen=!0,this.openEvent&&(this.compObj.setProperties({open:this.openEvent},!0),this.compObj.trigger("open",e))},e.prototype.closeHandler=function(e){this.isPopOpen=!1,this.closeEvent&&(this.compObj.setProperties({close:this.closeEvent},!0),this.compObj.trigger("close",e))},e.prototype.focus=function(){if(!this.isPopOpen){var e=document.createEvent("MouseEvent");e.initEvent("mousedown",!0,!0),t.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(e)}},e.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getRenderValue=function(){this.parent.printValue=this.compObj.text},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"multi-select"},e}(),K=function(){function e(e){this.compObj=void 0,l.RichTextEditor.Inject(l.HtmlEditor,l.MarkdownEditor,l.Toolbar,l.Link,l.Image,l.QuickToolbar,l.Table,l.FileManager,l.PasteCleanup,l.EmojiPicker,l.Audio,l.Video,l.FormatPainter,l.Count),this.parent=e,this.parent.rteModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new l.RichTextEditor(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&(this.parent.setProperties({value:this.getRteValue()},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getRteValue=function(){var e;return"Markdown"===this.compObj.editorMode?(e=this.compObj.contentModule.getEditPanel().value,""===e?"":e):(e=this.compObj.contentModule.getEditPanel().innerHTML,"<p><br></p>"===e||"<p><br></p>"===e||""===e?"":e)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),F=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new r.Slider(this.parent.model),this.compObj.appendTo(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},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),q=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new A(this.parent,this)}return e.prototype.render=function(e){this.compObj=new n.TimePicker(this.parent.model),this.compObj.appendTo(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),this.parent.extendModelValue(this.compObj.value))},e.prototype.getModuleName=function(){return"time-picker"},e.prototype.destroy=function(){this.base.destroy()},e}();return R.Inject(L,I,U,W,_,K,F,q),e.AutoComplete=L,e.BTN_CANCEL="e-btn-cancel",e.BTN_SAVE="e-btn-save",e.BUTTONS=D,e.Base=A,e.CTRL_GROUP="e-component-group",e.CTRL_OVERLAY="e-control-overlay",e.ColorPicker=I,e.ComboBox=U,e.DISABLE="e-disable",e.DateRangePicker=W,e.EDITABLE_ERROR="e-editable-error",e.ELEMENTS=M,e.ERROR=B,e.FORM=k,e.HIDE=S,e.ICONS="e-icons",e.INLINE=w,e.INPUT=P,e.InPlaceEditor=R,e.LOAD=H,e.LOADING="e-editable-loading",e.MultiSelect=_,e.OPEN=V,e.OVERLAY_ICON="e-editable-overlay-icon",e.POPUP=j,e.PRIMARY="e-primary",e.PopupSettings=f,e.ROOT=b,e.ROOT_TIP=E,e.RTE_SPIN_WRAP="e-rte-spin-wrap",e.RTL=T,e.Rte=K,e.SHOW="e-show",e.Slider=F,e.TIP_TITLE="e-editable-tip-title",e.TITLE=C,e.TimePicker=q,e.VALUE=g,e.VALUE_WRAPPER=O,e.WRAPPER="e-editable-wrapper",e.accessValue="access-value",e.destroy="destroy",e.destroyModules="destroy-modules",e.encode=h,e.getCompValue=d,e.localeConstant=v,e.modulesList=y,e.parseValue=p,e.render="render",e.setFocus="set-focus",e.showPopup="show-popup",e.update="update",e}({},ej.base,ej.data,ej.buttons,ej.calendars,ej.popups,ej.inputs,ej.dropdowns,ej.richtexteditor),this.ejs=ej;
|
|
11
2
|
//# sourceMappingURL=ej2-inplace-editor.min.js.map
|
package/dist/global/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: index.d.ts
|
|
3
|
-
* version : 31.2.12
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
import * as _inplaceeditor from '@syncfusion/ej2-inplace-editor';
|
|
11
2
|
|
|
12
3
|
export declare namespace ej {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-inplace-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.1.19",
|
|
4
4
|
"description": "A package of Essential JS 2 Inplace editor components, which is used to edit and update the value dynamically in server.",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-inplace-editor.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-buttons": "~
|
|
13
|
-
"@syncfusion/ej2-calendars": "~
|
|
14
|
-
"@syncfusion/ej2-data": "~
|
|
15
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
16
|
-
"@syncfusion/ej2-inputs": "~
|
|
17
|
-
"@syncfusion/ej2-lists": "~
|
|
18
|
-
"@syncfusion/ej2-navigations": "~
|
|
19
|
-
"@syncfusion/ej2-notifications": "~
|
|
20
|
-
"@syncfusion/ej2-popups": "~
|
|
21
|
-
"@syncfusion/ej2-richtexteditor": "~
|
|
22
|
-
"@syncfusion/ej2-splitbuttons": "~
|
|
11
|
+
"@syncfusion/ej2-base": "~32.1.19",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~32.1.19",
|
|
13
|
+
"@syncfusion/ej2-calendars": "~32.1.19",
|
|
14
|
+
"@syncfusion/ej2-data": "~32.1.19",
|
|
15
|
+
"@syncfusion/ej2-dropdowns": "~32.1.19",
|
|
16
|
+
"@syncfusion/ej2-inputs": "~32.1.19",
|
|
17
|
+
"@syncfusion/ej2-lists": "~32.1.19",
|
|
18
|
+
"@syncfusion/ej2-navigations": "~32.1.19",
|
|
19
|
+
"@syncfusion/ej2-notifications": "~32.1.19",
|
|
20
|
+
"@syncfusion/ej2-popups": "~32.1.19",
|
|
21
|
+
"@syncfusion/ej2-richtexteditor": "~32.1.19",
|
|
22
|
+
"@syncfusion/ej2-splitbuttons": "~32.1.19"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {},
|
|
25
25
|
"keywords": [
|
package/styles/bds-lite.css
CHANGED
|
@@ -148,12 +148,6 @@
|
|
|
148
148
|
color: var(--color-sf-utility-danger) !important;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
/* stylelint-disable */
|
|
152
|
-
.e-colorpicker-wrapper .e-icon-btn:disabled, .e-colorpicker-wrapper .e-icon-btn.e-disabled {
|
|
153
|
-
background-color: var(--color-sf-bg-disabled) !important;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/* stylelint-disable-line no-empty-source */
|
|
157
151
|
/* stylelint-disable */
|
|
158
152
|
.e-btn.e-primary:focus {
|
|
159
153
|
-webkit-box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05), 0 0 0 4px var(--color-sf-brand-solid-shadow) !important;
|
|
@@ -213,6 +207,12 @@
|
|
|
213
207
|
font-weight: 600;
|
|
214
208
|
}
|
|
215
209
|
|
|
210
|
+
/* stylelint-disable */
|
|
211
|
+
.e-colorpicker-wrapper .e-icon-btn:disabled, .e-colorpicker-wrapper .e-icon-btn.e-disabled {
|
|
212
|
+
background-color: var(--color-sf-bg-disabled) !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* stylelint-disable-line no-empty-source */
|
|
216
216
|
/*! calendar theme variables */
|
|
217
217
|
/* stylelint-disable */
|
|
218
218
|
.e-daterangepicker.e-popup .e-footer {
|