@syncfusion/ej2-lists 20.3.51 → 20.3.56

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/README.md CHANGED
@@ -70,4 +70,4 @@ Check the license detail [here](https://github.com/syncfusion/ej2-javascript-ui-
70
70
 
71
71
  Check the changelog [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/controls/lists/CHANGELOG.md/?utm_source=npm&utm_campaign=listview)
72
72
 
73
- © Copyright 2019 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.
73
+ © Copyright 2022 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.
@@ -1 +1,10 @@
1
+ /*!
2
+ * filename: ej2-lists.min.js
3
+ * version : 20.3.56
4
+ * Copyright Syncfusion Inc. 2001 - 2020. 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
+ */
1
10
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionButtons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionData","SyncfusionButtons"],t):"object"==typeof exports?exports.SyncfusionLists=t(require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionButtons")):e.SyncfusionLists=t(e.SyncfusionBase,e.SyncfusionData,e.SyncfusionButtons)}(this,function(e,t,i){return function(e){function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(t,i){t.exports=e},function(e,t,i){"use strict";function s(e,t){var s={};if(i.i(l.isNullOrUndefined)(e)||"string"==typeof e||"number"==typeof e||!i.i(l.isNullOrUndefined)(e.isHeader))return e;for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n],o=t[a],c=i.i(l.isNullOrUndefined)(o)||"string"!=typeof o?void 0:i.i(l.getValue)(o,e);i.i(l.isNullOrUndefined)(c)||(s[o]=c)}return s}function n(e){if(e)try{return document.querySelector(e)?i.i(l.compile)(document.querySelector(e).innerHTML.trim()):i.i(l.compile)(e)}catch(t){return i.i(l.compile)(e)}}i.d(t,"a",function(){return o}),i.d(t,"b",function(){return r}),t.c=s;var r,l=i(0),a=(i.n(l),i(2)),o=(i.n(a),{li:"e-list-item",ul:"e-list-parent e-ul",group:"e-list-group-item",icon:"e-list-icon",text:"e-list-text",check:"e-list-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-list-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-list-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"});!function(e){function t(e,t,s,n,a){var o=i.i(l.extend)({},N,s),c=i.i(l.extend)({},H,o.ariaAttributes),h=I(t).typeof;return"string"===h||"number"===h?r(e,t,n,s,a):d(e,t,s,c.level,n,a)}function r(e,t,i,s,n){return k(e,c(e,t,i,s,n),null,s)}function c(e,t,s,n,r){var a=[],c=i.i(l.extend)({},N,n);o=V(c.moduleName);for(var h=S(),d=0;d<t.length;d++)if(!i.i(l.isNullOrUndefined)(t[d])){var u=void 0;if(c.itemCreating&&"function"==typeof c.itemCreating){var p={dataSource:t,curData:t[d],text:t[d],options:c};c.itemCreating(p)}if(u=s?C(e,t[d],void 0,null,null,[],null,h,d,n):O(e,t[d],void 0,null,null,n,r),c.itemCreated&&"function"==typeof c.itemCreated){var p={dataSource:t,curData:t[d],text:t[d],item:u,options:c};c.itemCreated(p)}a.push(u)}return a}function h(t,n,r,a,c,h){var d=i.i(l.extend)({},N,r);o=V(d.moduleName);var u,p=!h||"listview"!==h.getModuleName()&&"multiselect"!==h.getModuleName()?i.i(l.extend)({},e.defaultMappedFields,d.fields):d.fields,m=i.i(l.extend)({},H,d.ariaAttributes),f=[];a&&(m.level=a);var v,g,b=[];n&&n.length&&!i.i(l.isNullOrUndefined)(I(n).item)&&!I(n).item.hasOwnProperty(p.id)&&(u=S());for(var x=0;x<n.length;x++){var w=s(n[x],p);if(!i.i(l.isNullOrUndefined)(n[x])){if(d.itemCreating&&"function"==typeof d.itemCreating){var E={dataSource:n,curData:n[x],text:w[p.text],options:d,fields:p};d.itemCreating(E)}var k=n[x];d.itemCreating&&"function"==typeof d.itemCreating&&(w=s(n[x],p)),w.hasOwnProperty(p.id)&&!i.i(l.isNullOrUndefined)(w[p.id])&&(u=w[p.id]);var D=[];if(d.showCheckBox&&(d.itemNavigable&&(w[p.url]||w[p.urlAttributes])?f.push(t("input",{className:o.check,attrs:{type:"checkbox"}})):D.push(t("input",{className:o.check,attrs:{type:"checkbox"}}))),!0===c)d.showIcon&&w.hasOwnProperty(p.iconCss)&&!i.i(l.isNullOrUndefined)(w[p.iconCss])&&D.push(t("span",{className:o.icon+" "+w[p.iconCss]})),v=C(t,k,w,p,d.itemClass,D,!(!k.hasOwnProperty("isHeader")||!k.isHeader),u,x,r),g=v.querySelector("."+o.anchorWrap),d.itemNavigable&&f.length&&i.i(l.prepend)(f,v.firstElementChild);else{if(v=O(t,k,w,p,d.itemClass,r,h),v.classList.add(o.level+"-"+m.level),v.setAttribute("aria-level",m.level.toString()),g=v.querySelector("."+o.anchorWrap),w.hasOwnProperty(p.tooltip)&&v.setAttribute("title",w[p.tooltip]),w.hasOwnProperty(p.htmlAttributes)&&w[p.htmlAttributes]&&y(v,w[p.htmlAttributes]),w.hasOwnProperty(p.enabled)&&!1===w[p.enabled]&&v.classList.add(o.disabled),w.hasOwnProperty(p.isVisible)&&!1===w[p.isVisible]&&(v.style.display="none"),w.hasOwnProperty(p.imageUrl)&&!i.i(l.isNullOrUndefined)(w[p.imageUrl])&&!d.template){var T={src:w[p.imageUrl]};i.i(l.merge)(T,w[p.imageAttributes]);var A=t("img",{className:o.image,attrs:T});g?g.insertAdjacentElement("afterbegin",A):i.i(l.prepend)([A],v.firstElementChild)}if(d.showIcon&&w.hasOwnProperty(p.iconCss)&&!i.i(l.isNullOrUndefined)(w[p.iconCss])&&!d.template){var B=t("div",{className:o.icon+" "+w[p.iconCss]});g?g.insertAdjacentElement("afterbegin",B):i.i(l.prepend)([B],v.firstElementChild)}D.length&&i.i(l.prepend)(D,v.firstElementChild),d.itemNavigable&&f.length&&i.i(l.prepend)(f,v.firstElementChild),L(t,w,p,n,d,v,m.level)}if(g&&i.i(l.addClass)([v],[o.navigable]),d.itemCreated&&"function"==typeof d.itemCreated){var E={dataSource:n,curData:n[x],text:w[p.text],item:v,options:d,fields:p};d.itemCreated(E)}f=[],b.push(v)}}return b}function d(e,t,s,n,r,a){var o=i.i(l.extend)({},N,s);return k(e,h(e,t,s,n,r,a),o.listClass,s)}function u(e,t,s){if(o=V(N.moduleName),e&&e.length){var n,r,a=Array.prototype.slice.call(e);for(r=t?p(t,a):!0===s?a.length:-1,n=a[r+(!0===s?-1:1)];n&&(!i.i(l.isVisible)(n)||n.classList.contains(o.disabled));)r+=!0===s?-1:1,n=a[r];return n}}function p(e,t){if(t&&e){var i=t;return i=Array.prototype.slice.call(t),i.indexOf(e)}}function m(t,s,n){void 0===n&&(n="None");var r=i.i(l.extend)({},e.defaultMappedFields,s),o=(new a.Query).group(r.groupBy);o=f(n,"key",o);var c=v(t,o);t=[];for(var h=0;h<c.length;h++){var d=c[h].items,u={};u[r.text]=c[h].key,u.isHeader=!0;var p=r.text;"id"===p&&(p="text",u[p]=c[h].key),u._id="group-list-item-"+(c[h].key?c[h].key.toString().trim():"undefined"),u.items=d,t.push(u);for(var m=0;m<d.length;m++)t.push(d[m])}return t}function f(e,t,i){if(void 0===i&&(i=new a.Query),"Ascending"===e)i.sortBy(t,"ascending",!0);else if("Descending"===e)i.sortBy(t,"descending",!0);else for(var s=0;s<i.queries.length;s++)"onSortBy"===i.queries[s].fn&&i.queries.splice(s,1);return i}function v(e,t){return new a.DataManager(e).executeLocal(t)}function g(t,s){var n=i.i(l.extend)({},N,s),r=i.i(l.extend)({},e.defaultMappedFields,n.fields),a=t.cloneNode(!0),o=[];a.classList.add("json-parent");var c=a.querySelectorAll(".json-parent>li");a.classList.remove("json-parent");for(var h=0;h<c.length;h++){for(var d=c[h],u=d.querySelector("a"),p=d.querySelector("ul"),m={},f=u?u.childNodes:d.childNodes,v=Object.keys(f),I=0;I<f.length;I++)f[Number(v[I])].hasChildNodes()||(m[r.text]=f[Number(v[I])].textContent);var y=b(d);y.id?(m[r.id]=y.id,delete y.id):m[r.id]=S(),Object.keys(y).length&&(m[r.htmlAttributes]=y),u&&(y=b(u),Object.keys(y).length&&(m[r.urlAttributes]=y)),p&&(m[r.child]=g(p,s)),o.push(m)}return o}function I(e){for(var t={typeof:null,item:null},s=0;s<e.length;s++)if(!i.i(l.isNullOrUndefined)(e[s]))return t={typeof:typeof e[s],item:e[s]};return t}function y(e,t){var s={};i.i(l.merge)(s,t),s.class&&(i.i(l.addClass)([e],s.class.split(" ")),delete s.class),i.i(l.attributes)(e,s)}function b(e){for(var t={},i=e.attributes,s=0;s<i.length;s++)t[i[s].nodeName]=i[s].nodeValue;return t}function x(t,r,a,c,h,d){o=V(N.moduleName);for(var u,p=t("ul",{className:o.ul,attrs:{role:"presentation"}}),m=i.i(l.extend)({},N,h),f=i.i(l.extend)({},e.defaultMappedFields,c),v=n(r),g=[],I=S(),y=0;y<a.length;y++){var b=s(a[y],f),x=a[y],w=x.isHeader;if(u="string"==typeof a[y]||"number"==typeof a[y]?x:b[f.value],m.itemCreating&&"function"==typeof m.itemCreating){var L={dataSource:a,curData:x,text:u,options:m,fields:f};m.itemCreating(L)}m.itemCreating&&"function"==typeof m.itemCreating&&(b=s(a[y],f),u="string"==typeof a[y]||"number"==typeof a[y]?x:b[f.value]);var C=t("li",{id:I+"-"+y,className:w?o.group:o.li,attrs:{role:"presentation"}});if(w)"string"==typeof a[y]||"number"==typeof a[y]?C.innerText=x:C.innerText=b[f.text];else{var E=w?m.groupTemplateID:m.templateID;if(w)if(d&&"listview"!=d.getModuleName()){var O=v(x,d,"headerTemplate",E,!!m.isStringTemplate,null,C);O&&i.i(l.append)(O,C)}else i.i(l.append)(v(x,d,"headerTemplate",E,!!m.isStringTemplate),C);else if(d&&"listview"!==d.getModuleName()){var O=v(x,d,"template",E,!!m.isStringTemplate,null,C);O&&i.i(l.append)(O,C)}else i.i(l.append)(v(x,d,"template",E,!!m.isStringTemplate),C);C.setAttribute("data-value",i.i(l.isNullOrUndefined)(u)?"null":u),C.setAttribute("role","option")}if(m.itemCreated&&"function"==typeof m.itemCreated){var L={dataSource:a,curData:x,text:u,item:C,options:m,fields:f};m.itemCreated(L)}g.push(C)}return i.i(l.append)(g,p),p}function w(t,s,r,a,o,c){for(var h=n(t),d=i.i(l.extend)({},e.defaultMappedFields,r),u=i.i(l.extend)({},N,o),p=d.groupBy,m=0,f=a;m<f.length;m++){var v=f[m],g={};if(g[p]=v.textContent,v.innerHTML="",c&&"listview"!==c.getModuleName()){var I=h(g,c,"groupTemplate",u.groupTemplateID,!!u.isStringTemplate,null,v);I&&i.i(l.append)(I,v)}else i.i(l.append)(h(g,c,"groupTemplate",u.groupTemplateID,!!u.isStringTemplate),v)}return a}function S(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function L(e,t,i,s,n,r,a){var c=t[i.child]||[],h=t[i.hasChildren];if(c.length&&(h=!0,r.classList.add(o.hasChild),n.processSubChild)){var u=d(e,c,n,++a);r.appendChild(u)}if(n.expandCollapse&&h&&!n.template){r.firstElementChild.classList.add(o.iconWrapper);("Left"===n.expandIconPosition?l.prepend:l.append)([e("div",{className:"e-icons "+n.expandIconClass})],r.querySelector("."+o.textContent))}}function C(e,t,s,n,r,a,c,h,d,u){var p,m=i.i(l.extend)({},N,u),f=i.i(l.extend)({},H,m.ariaAttributes),v=t,g=t;"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t&&(p=t,v="boolean"==typeof s[n.text]||"number"==typeof s[n.text]?s[n.text]:s[n.text]||"",g=s[n.value]);var I;I=i.i(l.isNullOrUndefined)(p)||i.i(l.isNullOrUndefined)(s[n.id])||""===s[n.id]?h+"-"+d:h;var b=e("li",{className:(!0===c?o.group:o.li)+" "+(i.i(l.isNullOrUndefined)(r)?"":r),id:I,attrs:""!==f.groupItemRole&&""!==f.itemRole?{role:!0===c?f.groupItemRole:f.itemRole}:{}});return p&&s.hasOwnProperty(n.enabled)&&"false"===s[n.enabled].toString()&&b.classList.add(o.disabled),c?b.innerText=v:(b.setAttribute("data-value",i.i(l.isNullOrUndefined)(g)?"null":g),b.setAttribute("role","option"),p&&s.hasOwnProperty(n.htmlAttributes)&&s[n.htmlAttributes]&&y(b,s[n.htmlAttributes]),a.length&&!m.itemNavigable&&i.i(l.append)(a,b),p&&(s[n.url]||s[n.urlAttributes]&&s[n.urlAttributes].href)?b.appendChild(E(e,p,n,v,a,m.itemNavigable)):(a.length&&m.itemNavigable&&i.i(l.append)(a,b),b.appendChild(document.createTextNode(v)))),b}function V(e){return{li:"e-"+e+"-item",ul:"e-"+e+"-parent e-ul",group:"e-"+e+"-group-item",icon:"e-"+e+"-icon",text:"e-"+e+"-text",check:"e-"+e+"-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-"+e+"-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-"+e+"-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"}}function E(e,t,n,r,a,c){var h=s(t,n),d={href:h[n.url]};h.hasOwnProperty(n.urlAttributes)&&h[n.urlAttributes]&&(i.i(l.merge)(d,h[n.urlAttributes]),d.href=h[n.url]?h[n.url]:h[n.urlAttributes].href);var u;if(c){u=e("a",{className:o.text+" "+o.url});var p=e("div",{className:o.anchorWrap});a&&a.length&&i.i(l.append)(a,p),p.appendChild(document.createTextNode(r)),i.i(l.append)([p],u)}else u=e("a",{className:o.text+" "+o.url,innerHTML:r});return y(u,d),u}function O(e,t,s,r,a,c,h){var d,u,p,m=i.i(l.extend)({},N,c),f=i.i(l.extend)({},H,m.ariaAttributes),v=t;"string"!=typeof t&&"number"!=typeof t&&(p=t,v=s[r.text]||"",d=i.i(l.isNullOrUndefined)(s._id)?s[r.id]:s._id,u=!(!t.hasOwnProperty("isHeader")||!t.isHeader)),c&&c.enableHtmlSanitizer&&(v=v);var g=e("li",{className:(!0===u?o.group:o.li)+" "+(i.i(l.isNullOrUndefined)(a)?"":a),attrs:""!==f.groupItemRole&&""!==f.itemRole?{role:!0===u?f.groupItemRole:f.itemRole}:{}});if(!0==!i.i(l.isNullOrUndefined)(d)?g.setAttribute("data-uid",d):g.setAttribute("data-uid",S()),u&&c&&c.groupTemplate){var I=n(c.groupTemplate);if(h&&"listview"!==h.getModuleName()){var y=I(t,h,"groupTemplate",m.groupTemplateID,!!m.isStringTemplate,null,g);y&&i.i(l.append)(y,g)}else i.i(l.append)(I(t,h,"groupTemplate",m.groupTemplateID,!!m.isStringTemplate),g)}else if(!u&&c&&c.template){var I=n(c.template);if(h&&"listview"!==h.getModuleName()){var y=I(t,h,"template",m.templateID,!!m.isStringTemplate,null,g);y&&i.i(l.append)(y,g)}else i.i(l.append)(I(t,h,"template",m.templateID,!!m.isStringTemplate),g)}else{var b=e("div",{className:o.textContent,attrs:""!==f.wrapperRole?{role:f.wrapperRole}:{}});if(p&&(s[r.url]||s[r.urlAttributes]&&s[r.urlAttributes].href))b.appendChild(E(e,p,r,v,null,m.itemNavigable));else{var x=e("span",{className:o.text,attrs:""!==f.itemText?{role:f.itemText}:{}});c&&c.enableHtmlSanitizer?x.innerText=v:x.innerHTML=v,b.appendChild(x)}g.appendChild(b)}return g}function k(e,t,s,n){var r=i.i(l.extend)({},N,n),a=i.i(l.extend)({},H,r.ariaAttributes);o=V(r.moduleName);var c=e("ul",{className:o.ul+" "+(i.i(l.isNullOrUndefined)(s)?"":s),attrs:""!==a.listRole?{role:a.listRole}:{}});return i.i(l.append)(t,c),c}function D(e,t,s,n){var r=i.i(l.extend)({},N,n);return o=V(r.moduleName),("Left"===r.expandIconPosition?l.prepend:l.append)([e("div",{className:"e-icons "+r.expandIconClass+" "+(i.i(l.isNullOrUndefined)(s)?"":s)})],t.querySelector("."+o.textContent)),t}e.defaultMappedFields={id:"id",text:"text",url:"url",value:"value",isChecked:"isChecked",enabled:"enabled",expanded:"expanded",selected:"selected",iconCss:"iconCss",child:"child",isVisible:"isVisible",hasChildren:"hasChildren",tooltip:"tooltip",htmlAttributes:"htmlAttributes",urlAttributes:"urlAttributes",imageAttributes:"imageAttributes",imageUrl:"imageUrl",groupBy:null,sortBy:null};var H={level:1,listRole:"presentation",itemRole:"presentation",groupItemRole:"group",itemText:"list-item",wrapperRole:"presentation"},N={showCheckBox:!1,showIcon:!1,enableHtmlSanitizer:!1,expandCollapse:!1,fields:e.defaultMappedFields,ariaAttributes:H,listClass:"",itemClass:"",processSubChild:!1,sortOrder:"None",template:null,groupTemplate:null,headerTemplate:null,expandIconClass:"e-icon-collapsible",moduleName:"list",expandIconPosition:"Right",itemNavigable:!1};e.createList=t,e.createListFromArray=r,e.createListItemFromArray=c,e.createListItemFromJson=h,e.createListFromJson=d,e.getSiblingLI=u,e.indexOf=p,e.groupDataSource=m,e.addSorting=f,e.getDataSource=v,e.createJsonFromElement=g,e.renderContentTemplate=x,e.renderGroupTemplate=w,e.generateId=S,e.generateUL=k,e.generateIcon=D}(r||(r={}))},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"a",function(){return d}),i.d(t,"b",function(){return u}),i.d(t,"c",function(){return p});var s=i(0),n=(i.n(s),i(2)),r=(i.n(n),i(10)),l=(i.n(r),i(1)),a=this&&this.__extends||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 s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),o=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},c={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},h={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},d={root:"e-listview",hover:"e-hover",selected:"e-active",focused:"e-focused",parentItem:"e-list-parent",listItem:"e-list-item",listIcon:"e-list-icon",textContent:"e-text-content",listItemText:"e-list-text",groupListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-list-header",headerText:"e-headertext",headerTemplateText:"e-headertemplate-text",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back",backButton:"e-back-button",checkboxWrapper:"e-checkbox-wrapper",checkbox:"e-checkbox",checked:"e-check",checklist:"e-checklist",checkboxIcon:"e-frame",checkboxRight:"e-checkbox-right",checkboxLeft:"e-checkbox-left",listviewCheckbox:"e-listview-checkbox",itemCheckList:"e-checklist",virtualElementContainer:"e-list-virtualcontainer"},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([i.i(s.Property)("id")],t.prototype,"id",void 0),o([i.i(s.Property)("text")],t.prototype,"text",void 0),o([i.i(s.Property)("isChecked")],t.prototype,"isChecked",void 0),o([i.i(s.Property)("isVisible")],t.prototype,"isVisible",void 0),o([i.i(s.Property)("enabled")],t.prototype,"enabled",void 0),o([i.i(s.Property)("iconCss")],t.prototype,"iconCss",void 0),o([i.i(s.Property)("child")],t.prototype,"child",void 0),o([i.i(s.Property)("tooltip")],t.prototype,"tooltip",void 0),o([i.i(s.Property)("groupBy")],t.prototype,"groupBy",void 0),o([i.i(s.Property)("text")],t.prototype,"sortBy",void 0),o([i.i(s.Property)("htmlAttributes")],t.prototype,"htmlAttributes",void 0),o([i.i(s.Property)("tableName")],t.prototype,"tableName",void 0),t}(s.ChildProperty),p=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.previousSelectedItems=[],s.hiddenItems=[],s.enabledItems=[],s.disabledItems=[],s}return a(t,e),t.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"htmlAttributes":this.setHTMLAttribute();break;case"cssClass":this.setCSSClass(t.cssClass);break;case"enable":this.setEnable();break;case"width":case"height":this.setSize();break;case"enableRtl":this.setEnableRTL();break;case"fields":this.listBaseOption.fields=this.fields.properties,this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"headerTitle":this.curDSLevel.length||this.header(this.headerTitle,!1,"header");break;case"query":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"showHeader":this.header(this.headerTitle,!1,"header");break;case"enableVirtualization":i.i(s.isNullOrUndefined)(this.contentContainer)||i.i(s.detach)(this.contentContainer),this.refresh();break;case"showCheckBox":case"checkBoxPosition":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.setCheckbox();break;case"dataSource":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"sortOrder":case"template":this.enableVirtualization||this.refresh();break;case"showIcon":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():(this.listBaseOption.showIcon=this.showIcon,this.curViewDS=this.getSubDS(),this.resetCurrentList())}}},t.prototype.setHTMLAttribute=function(){Object.keys(this.htmlAttributes).length&&i.i(s.attributes)(this.element,this.htmlAttributes)},t.prototype.setCSSClass=function(e){this.cssClass&&i.i(s.addClass)([this.element],this.cssClass.split(" ").filter(function(e){return e})),e&&i.i(s.removeClass)([this.element],e.split(" ").filter(function(e){return e}))},t.prototype.setSize=function(){this.element.style.height=i.i(s.formatUnit)(this.height),this.element.style.width=i.i(s.formatUnit)(this.width),this.isWindow=!this.element.clientHeight},t.prototype.setEnable=function(){this.enableElement(this.element,this.enable)},t.prototype.setEnableRTL=function(){this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},t.prototype.enableElement=function(e,t){t?e.classList.remove(d.disable):e.classList.add(d.disable)},t.prototype.header=function(e,t,n){if(void 0===this.headerEle&&this.showHeader){this.enableHtmlSanitizer&&this.setProperties({headerTitle:s.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.headerEle=this.createElement("div",{className:d.header});var r=this.createElement("span",{className:d.headerText,innerHTML:this.headerTitle}),l=this.createElement("div",{className:d.text,innerHTML:r.outerHTML}),a=this.createElement("div",{className:d.icon+" "+d.backIcon+" "+d.backButton,attrs:{style:"display:none;"}});if(this.headerEle.appendChild(a),this.headerEle.appendChild(l),this.headerTemplate){var o=i.i(s.compile)(this.headerTemplate),c=this.createElement("div",{className:d.headerTemplateText}),h=o({},this,n,this.LISTVIEW_HEADERTEMPLATE_ID,null,null,this.headerEle);h&&i.i(s.append)(h,c),i.i(s.append)([c],this.headerEle),this.isReact&&this.renderReactTemplates()}this.headerTemplate&&this.headerTitle&&l.classList.add("header"),this.element.classList.add("e-has-header"),i.i(s.prepend)([this.headerEle],this.element)}else if(this.headerEle)if(this.showHeader){this.headerEle.style.display="";var l=this.headerEle.querySelector("."+d.headerText),a=this.headerEle.querySelector("."+d.backIcon);this.enableHtmlSanitizer&&(e=s.SanitizeHtmlHelper.sanitize(e)),l.innerHTML=e,this.headerTemplate&&t&&(l.parentElement.classList.remove("header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.add("nested-header")),this.headerTemplate&&!t&&(l.parentElement.classList.add("header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.remove("nested-header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.add("header")),a.style.display=!0===t?"":"none"}else this.headerEle.style.display="none"},t.prototype.switchView=function(e,t,i){var s=this;if(e&&t){var n=e.style.position,r="hidden"!==this.element.style.overflow?this.element.style.overflow:"";e.style.position="absolute",e.classList.add("e-view");var l=void 0,a=this.animation.duration;if(this.animation.effect)l=this.enableRtl?h[this.animation.effect]:c[this.animation.effect];else{l=c.SlideLeft,i=this.enableRtl,a=0}this.element.style.overflow="hidden",this.aniObj.animate(e,{name:!0===i?l[0]:l[1],duration:a,timingFunction:this.animation.easing,end:function(t){e.style.display="none",s.element.style.overflow=r,e.style.position=n,e.classList.remove("e-view")}}),t.style.display="",this.aniObj.animate(t,{name:!0===i?l[2]:l[3],duration:a,timingFunction:this.animation.easing,end:function(){s.trigger("actionComplete")}}),this.curUL=t}},t.prototype.preRender=function(){if(this.template)try{document.querySelectorAll(this.template).length&&this.setProperties({template:document.querySelector(this.template).innerHTML.trim()},!0)}catch(e){i.i(s.compile)(this.template)}this.listBaseOption={template:this.template,headerTemplate:this.headerTemplate,groupTemplate:this.groupTemplate,expandCollapse:!0,listClass:"",ariaAttributes:{itemRole:"option",listRole:"presentation",itemText:"",groupItemRole:"option",wrapperRole:"presentation"},fields:this.fields.properties,sortOrder:this.sortOrder,showIcon:this.showIcon,itemCreated:this.renderCheckbox.bind(this),templateID:this.element.id+"Template",groupTemplateID:this.element.id+"GroupTemplate",enableHtmlSanitizer:this.enableHtmlSanitizer},this.initialization()},t.prototype.initialization=function(){this.curDSLevel=[],this.animateOptions={},this.curViewDS=[],this.currentLiElements=[],this.isNestedList=!1,this.selectedData=[],this.selectedId=[],this.LISTVIEW_TEMPLATE_ID=this.element.id+"Template",this.LISTVIEW_GROUPTEMPLATE_ID=this.element.id+"GroupTemplate",this.LISTVIEW_HEADERTEMPLATE_ID=this.element.id+"HeaderTemplate",this.aniObj=new s.Animation(this.animateOptions),this.removeElement(this.curUL),this.removeElement(this.ulElement),this.removeElement(this.headerEle),this.removeElement(this.contentContainer),this.curUL=this.ulElement=this.liCollection=this.headerEle=this.contentContainer=void 0},t.prototype.renderCheckbox=function(e){if(e.item.classList.contains(d.hasChild)&&(this.isNestedList=!0),this.showCheckBox&&this.isValidLI(e.item)){var t=void 0,s=void 0;t=i.i(r.createCheckBox)(this.createElement,!1,{checked:!1,enableRtl:this.enableRtl,cssClass:d.listviewCheckbox}),t.setAttribute("role","checkbox");var n=t.querySelector("."+d.checkboxIcon);e.item.classList.add(d.itemCheckList),e.item.firstElementChild.classList.add(d.checkbox),"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?(s=i.i(l.c)(e.curData,this.listBaseOption.fields),s[this.listBaseOption.fields.isChecked]&&this.checkInternally(e,t)):"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]||-1===this.selectedData.indexOf(e.text)||this.checkInternally(e,t),t.setAttribute("aria-checked",n.classList.contains(d.checked)?"true":"false"),"Left"===this.checkBoxPosition?(t.classList.add(d.checkboxLeft),e.item.firstElementChild.classList.add(d.checkboxLeft),e.item.firstElementChild.insertBefore(t,e.item.firstElementChild.childNodes[0])):(t.classList.add(d.checkboxRight),e.item.firstElementChild.classList.add(d.checkboxRight),e.item.firstElementChild.appendChild(t)),this.currentLiElements.push(e.item),"Left"===this.checkBoxPosition?this.virtualCheckBox=e.item.firstElementChild.children[0]:this.virtualCheckBox=e.item.firstElementChild.lastElementChild}},t.prototype.checkInternally=function(e,t){e.item.classList.add(d.selected),e.item.setAttribute("aria-selected","true"),t.querySelector("."+d.checkboxIcon).classList.add(d.checked),t.setAttribute("aria-checked","true")},t.prototype.checkItem=function(e){this.toggleCheckBase(e,!0)},t.prototype.toggleCheckBase=function(e,t){if(this.showCheckBox){var n=e;if(e instanceof Object&&e.constructor!==HTMLLIElement&&(n=this.getLiFromObjOrElement(e)),!i.i(s.isNullOrUndefined)(n)){var r=n.querySelector("."+d.checkboxIcon);!0===t?n.classList.add(d.selected):n.classList.remove(d.selected),n.setAttribute("aria-selected",t?"true":"false"),!0===t?r.classList.add(d.checked):r.classList.remove(d.checked),r.parentElement.setAttribute("aria-checked",t?"true":"false")}this.setSelectedItemData(n)}},t.prototype.uncheckItem=function(e){this.toggleCheckBase(e,!1)},t.prototype.checkAllItems=function(){this.toggleAllCheckBase(!0)},t.prototype.uncheckAllItems=function(){this.toggleAllCheckBase(!1)},t.prototype.toggleAllCheckBase=function(e){if(this.showCheckBox){for(var t=0;t<this.liCollection.length;t++){var i=this.liCollection[t].querySelector("."+d.checkboxIcon);i&&(e?i.classList.contains(d.checked)||this.checkItem(this.liCollection[t]):i.classList.contains(d.checked)&&this.uncheckItem(this.liCollection[t]))}this.enableVirtualization&&this.virtualizationModule.checkedItem(e)}},t.prototype.setCheckbox=function(){if(this.showCheckBox)for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+d.listItem)),t={item:void 0,curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:""},i=0;i<e.length;i++){var s=e[i];t.item=s,t.curData=this.getItemData(s),s.querySelector("."+d.checkboxWrapper)&&this.removeElement(s.querySelector("."+d.checkboxWrapper)),this.renderCheckbox(t),t.item.classList.contains(d.selected)&&this.checkInternally(t,t.item.querySelector("."+d.checkboxWrapper))}else{for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+d.itemCheckList)),i=0;i<e.length;i++){var s=e[i];s.classList.remove(d.selected),s.firstElementChild.classList.remove(d.checkbox),this.removeElement(s.querySelector("."+d.checkboxWrapper))}this.selectedItems&&this.selectedItems.item.classList.add(d.selected)}},t.prototype.refreshItemHeight=function(){this.virtualizationModule&&this.virtualizationModule.refreshItemHeight()},t.prototype.clickHandler=function(e){var t=e.target;this.targetElement=t;var n,r=t.classList;if(r.contains(d.backIcon)||r.contains(d.headerText))this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();else{var l=i.i(s.closest)(t.parentNode,"."+d.listItem);if(null===l&&(l=t),this.removeFocus(),this.enable&&this.showCheckBox&&this.isValidLI(l))if(e.target.classList.contains(d.checkboxIcon)){if(l.classList.add(d.focused),i.i(s.isNullOrUndefined)(l.querySelector("."+d.checked))){var a={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:l};this.checkInternally(a,a.item.querySelector("."+d.checkboxWrapper))}else this.uncheckItem(l),l.classList.add(d.focused);if(this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(l,e),e){var o=this.selectEventData(l,e),c=l.querySelector("."+d.checkboxIcon);i.i(s.merge)(o,{isChecked:c.classList.contains(d.checked)}),this.trigger("select",o)}}else l.classList.contains(d.hasChild)?(this.removeHover(),this.removeSelect(),this.removeSelect(l),this.setSelectLI(l,e),l.classList.remove(d.selected)):(this.setCheckboxLI(l,e),"INPUT"!=t.nodeName&&"TEXTAREA"!=t.nodeName||(t.classList.add("e-focused"),this.targetElement=t));else this.setSelectLI(l,e),"INPUT"!=t.nodeName&&"TEXTAREA"!=t.nodeName||(t.classList.add("e-focused"),this.targetElement=t);n=i.i(s.closest)(e.target,"li"),i.i(s.isNullOrUndefined)(n)||n.classList.contains("e-has-child")&&!e.target.parentElement.classList.contains("e-listview-checkbox")&&n.classList.add(d.disable)}},t.prototype.removeElement=function(e){return e&&e.parentNode&&e.parentNode.removeChild(e)},t.prototype.hoverHandler=function(e){var t=i.i(s.closest)(e.target.parentNode,"."+d.listItem);this.setHoverLI(t)},t.prototype.leaveHandler=function(e){this.removeHover()},t.prototype.homeKeyHandler=function(e,t){if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){this.selectedItems&&this.selectedItems.item.setAttribute("aria-selected","false");var i=this.curUL.querySelectorAll("."+d.listItem),s=this.curUL.querySelector("."+d.focused)||this.curUL.querySelector("."+d.selected);s&&(s.classList.remove(d.focused),this.showCheckBox||s.classList.remove(d.selected));var n=t?i.length-1:0;i[n].classList.contains(d.hasChild)||this.showCheckBox?i[n].classList.add(d.focused):this.setSelectLI(i[n],e),i[n]?this.element.setAttribute("aria-activedescendant",i[n].id.toString()):this.element.removeAttribute("aria-activedescendant")}},t.prototype.onArrowKeyDown=function(e,t){var n,r;return!i.i(s.isNullOrUndefined)(this.curUL.querySelector("."+d.hasChild))||this.showCheckBox?(r=this.curUL.querySelector("."+d.focused)||this.curUL.querySelector("."+d.selected),n=l.b.getSiblingLI(this.curUL.querySelectorAll("."+d.listItem),r,t),i.i(s.isNullOrUndefined)(n)||(r&&(r.classList.remove(d.focused),this.showCheckBox||r.classList.remove(d.selected)),n.classList.contains(d.hasChild)||this.showCheckBox?n.classList.add(d.focused):this.setSelectLI(n,e))):(r=this.curUL.querySelector("."+d.selected),n=l.b.getSiblingLI(this.curUL.querySelectorAll("."+d.listItem),r,t),this.setSelectLI(n,e)),n?this.element.setAttribute("aria-activedescendant",n.id.toString()):this.element.removeAttribute("aria-activedescendant"),n},t.prototype.arrowKeyHandler=function(e,t){var i=this;if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){var s=this.onArrowKeyDown(e,t),n=this.element.getBoundingClientRect().top,r=this.element.getBoundingClientRect().height,l=this.curUL.querySelector("."+d.listItem).getBoundingClientRect(),a=void 0,o=void 0;if(this.fields.groupBy&&(o=this.curUL.querySelector("."+d.groupListItem).getBoundingClientRect()),s){var c=s.getBoundingClientRect().top,h=s.getBoundingClientRect().height;if(t)(a=this.isWindow?c:c-n)<0&&(!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop+a);else{var u=this.isWindow?window.innerHeight:r;a=this.isWindow?c+h:c-n+h,a>u&&(!0===this.isWindow?window.scroll(0,pageYOffset+(a-u)):this.element.scrollTop=this.element.scrollTop+(a-u))}}else if(this.enableVirtualization&&t&&this.virtualizationModule.uiFirstIndex)this.onUIScrolled=function(){i.onArrowKeyDown(e,t),i.onUIScrolled=void 0},a=this.virtualizationModule.listItemHeight,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=this.element.scrollTop-a;else if(t)if(this.showHeader&&this.headerEle){var p=o?o.top:l.top,m=this.headerEle.getBoundingClientRect();a=m.top<0?m.height-p:0,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=0}else this.fields.groupBy&&(a=this.isWindow?o.top<0?o.top:0:n-l.top+o.height,!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop-a)}},t.prototype.enterKeyHandler=function(e){if(Object.keys(this.dataSource).length&&this.curUL){var t=!i.i(s.isNullOrUndefined)(this.curUL.querySelector("."+d.hasChild)),n=this.curUL.querySelector("."+d.focused);t&&n&&(n.classList.remove(d.focused),this.showCheckBox&&(this.removeSelect(),this.removeSelect(n),this.removeHover()),this.setSelectLI(n,e))}},t.prototype.spaceKeyHandler=function(e){if(e.preventDefault(),this.enable&&this.showCheckBox&&Object.keys(this.dataSource).length&&this.curUL){var t=this.curUL.querySelector("."+d.focused),n=void 0,r=void 0;if(!i.i(s.isNullOrUndefined)(t)&&i.i(s.isNullOrUndefined)(t.querySelector("."+d.checked))){var l={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:t};n=l.item.querySelector("."+d.checkboxWrapper),this.checkInternally(l,n),r=n.querySelector("."+d.checkboxIcon+"."+d.icon)}else this.uncheckItem(t);var a=this.selectEventData(t,e);i.i(s.merge)(a,{isChecked:!!r&&r.classList.contains(d.checked)}),this.trigger("select",a)}},t.prototype.keyActionHandler=function(e){switch(e.keyCode){case 36:this.homeKeyHandler(e);break;case 35:this.homeKeyHandler(e,!0);break;case 40:this.arrowKeyHandler(e);break;case 38:this.arrowKeyHandler(e,!0);break;case 13:this.enterKeyHandler(e);break;case 8:this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();break;case 32:!i.i(s.isNullOrUndefined)(this.targetElement)&&this.targetElement.classList.contains("e-focused")||this.spaceKeyHandler(e)}},t.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&e.velocity>.5&&"touchend"===e.originalEvent.type&&(this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back())},t.prototype.focusout=function(){if(Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+d.focused),t=this.curUL.querySelector("[aria-selected = true]");e&&(e.classList.remove(d.focused),t&&!this.showCheckBox&&t.classList.add(d.selected))}},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"keydown",this.keyActionHandler,this),s.EventHandler.add(this.element,"click",this.clickHandler,this),s.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),s.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),s.EventHandler.add(this.element,"focusout",this.focusout,this),this.touchModule=new s.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"click",this.clickHandler),s.EventHandler.remove(this.element,"mouseover",this.hoverHandler),s.EventHandler.remove(this.element,"mouseout",this.leaveHandler),s.EventHandler.remove(this.element,"mouseover",this.hoverHandler),s.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.touchModule.destroy()},t.prototype.removeFocus=function(){for(var e=this.element.querySelectorAll("."+d.focused),t=0,i=e;t<i.length;t++){i[t].classList.remove(d.focused)}},t.prototype.removeHover=function(){var e=this.element.querySelector("."+d.hover);e&&e.classList.remove(d.hover)},t.prototype.removeSelect=function(e){if(i.i(s.isNullOrUndefined)(e))for(var t=this.element.querySelectorAll("."+d.selected),n=0,r=t;n<r.length;n++){var l=r[n];this.showCheckBox&&l.querySelector("."+d.checked)||(l.setAttribute("aria-selected","false"),l.classList.remove(d.selected))}else e.classList.remove(d.selected),e.setAttribute("aria-selected","false")},t.prototype.isValidLI=function(e){return e&&e.classList.contains(d.listItem)&&!e.classList.contains(d.groupListItem)&&!e.classList.contains(d.disable)},t.prototype.setCheckboxLI=function(e,t){if(this.isValidLI(e)&&this.enable&&this.showCheckBox){this.curUL.querySelector("."+d.focused)&&this.curUL.querySelector("."+d.focused).classList.remove(d.focused);var n=e.querySelector("textarea")||e.querySelector("input");e.classList.add(d.focused),i.i(s.isNullOrUndefined)(t)||t.target===n&&n.classList.add("e-focused");var r=e.querySelector("."+d.checkboxWrapper),l=r.querySelector("."+d.checkboxIcon+"."+d.icon);this.removeHover(),l.classList.contains(d.checked)?(l.classList.remove(d.checked),e.classList.remove(d.selected),e.setAttribute("aria-selected","false")):(l.classList.add(d.checked),e.classList.add(d.selected),e.setAttribute("aria-selected","true")),r.setAttribute("aria-checked",l.classList.contains(d.checked)?"true":"false");var a=this.selectEventData(e,t);i.i(s.merge)(a,{isChecked:l.classList.contains(d.checked)}),this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(e,t),this.trigger("select",a),this.setSelectedItemData(e),this.renderSubList(e)}},t.prototype.selectEventData=function(e,t){var n,r=this.getItemData(e),a=i.i(l.c)(r,this.listBaseOption.fields);n=!i.i(s.isNullOrUndefined)(r)&&"string"==typeof this.dataSource[0]||"number"==typeof this.dataSource[0]?{item:e,text:e&&e.innerText.trim(),data:this.dataSource}:{item:e,text:a&&a[this.listBaseOption.fields.text],data:r};var o={};return i.i(s.merge)(o,n),t&&i.i(s.merge)(o,{isInteracted:!0,event:t,cancel:!1,index:this.curUL&&Array.prototype.indexOf.call(this.curUL.children,e)}),o},t.prototype.setSelectedItemData=function(e){var t=this.getItemData(e),n=i.i(l.c)(t,this.listBaseOption.fields);i.i(s.isNullOrUndefined)(t)||"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?this.selectedItems={item:e,text:n&&n[this.listBaseOption.fields.text],data:t}:this.selectedItems={item:e,text:e&&e.innerText.trim(),data:this.dataSource}},t.prototype.setSelectLI=function(e,t){var i=this;if(this.isValidLI(e)&&!e.classList.contains(d.selected)&&this.enable){this.showCheckBox||this.removeSelect(),e.classList.add(d.selected),e.setAttribute("aria-selected","true"),this.removeHover(),this.setSelectedItemData(e),this.enableVirtualization&&this.virtualizationModule.setSelectLI(e,t);var s=this.selectEventData(e,t);this.trigger("select",s,function(t){t.cancel||(i.selectedLI=e,i.renderSubList(e))})}},t.prototype.setHoverLI=function(e){if(this.isValidLI(e)&&!e.classList.contains(d.hover)&&this.enable){var t=this.element.querySelectorAll("."+d.hover);t&&t.length&&i.i(s.removeClass)(t,d.hover),e.classList.contains(d.selected)&&!this.showCheckBox||e.classList.add(d.hover)}},t.prototype.getSubDS=function(){var e=this.curDSLevel;if(e.length){for(var t=this.localData,s=0,n=e;s<n.length;s++){var r=n[s],a={};a[this.fields.id]=r,this.curDSJSON=this.findItemFromDS(t,a);var o=i.i(l.c)(this.curDSJSON,this.listBaseOption.fields);t=this.curDSJSON?o[this.fields.child]:t}return t}return this.localData},t.prototype.getItemData=function(e){var t,r=this.dataSource instanceof n.DataManager?this.localData:this.dataSource,l=this.getElementUID(e);return t=i.i(s.isNullOrUndefined)(this.element.querySelector("."+d.hasChild))&&this.fields.groupBy?this.curViewDS:r,this.findItemFromDS(t,l)},t.prototype.findItemFromDS=function(e,t,n){var r,a=this;return e&&e.length&&t?e.some(function(o){var c=i.i(l.c)(o,a.listBaseOption.fields);if(!t[a.fields.id]&&!t[a.fields.text]||t[a.fields.id]&&(!i.i(s.isNullOrUndefined)(c[a.fields.id])&&c[a.fields.id].toString())!==t[a.fields.id].toString()||t[a.fields.text]&&c[a.fields.text]!==t[a.fields.text])if("object"!=typeof o&&-1!==e.indexOf(o))r=n?e:o;else if(!i.i(s.isNullOrUndefined)(t[a.fields.id])&&i.i(s.isNullOrUndefined)(c[a.fields.id])){var h=a.element.querySelector('[data-uid="'+t[a.fields.id]+'"]');h&&h.innerText.trim()===c[a.fields.text]&&(r=o)}else c.hasOwnProperty(a.fields.child)&&c[a.fields.child].length&&(r=a.findItemFromDS(c[a.fields.child],t,n));else r=n?e:o;return!!r}):r=e,r},t.prototype.getQuery=function(){var e=[],t=this.query?this.query:new n.Query;if(!this.query){for(var i=0,s=Object.keys(this.fields.properties);i<s.length;i++){var r=s[i];"tableName"!==r&&this.fields[r]&&this.fields[r]!==l.b.defaultMappedFields[r]&&-1===e.indexOf(this.fields[r])&&e.push(this.fields[r])}t.select(e),this.fields.properties.hasOwnProperty("tableName")&&t.from(this.fields.tableName)}return t},t.prototype.setViewDataSource=function(e){void 0===e&&(e=this.localData);var t=i.i(s.isNullOrUndefined)(this.fields.sortBy)?this.fields.text:this.fields.sortBy,n=l.b.addSorting(this.sortOrder,t);e&&this.fields.groupBy?"None"!==this.sortOrder?this.curViewDS=l.b.groupDataSource(l.b.getDataSource(e,n),this.listBaseOption.fields,this.sortOrder):this.curViewDS=l.b.groupDataSource(e,this.listBaseOption.fields,this.sortOrder):e&&"None"!==this.sortOrder?this.curViewDS=l.b.getDataSource(e,n):this.curViewDS=e},t.prototype.isInAnimation=function(){return this.curUL.classList.contains(".e-animate")},t.prototype.renderRemoteLists=function(e,t){this.isDestroyed||(this.localData=e.result,t.removeElement(t.contentContainer),this.renderList(),this.trigger("actionComplete",e))},t.prototype.triggerActionFailure=function(e){this.isDestroyed||this.trigger("actionFailure",e)},t.prototype.setLocalData=function(){var e=this;this.trigger("actionBegin");var t=this;if(this.dataSource instanceof n.DataManager)this.dataSource.ready?this.dataSource.ready.then(function(i){e.isOffline=e.dataSource.dataSource.offline,e.dataSource instanceof n.DataManager&&e.isOffline&&e.renderRemoteLists(i,t)}).catch(function(t){e.triggerActionFailure(t)}):this.dataSource.executeQuery(this.getQuery()).then(function(i){e.renderRemoteLists(i,t)}).catch(function(t){e.triggerActionFailure(t)});else if(this.dataSource&&this.dataSource.length)this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData});else{var r=this.element.querySelector("ul");r&&(i.i(s.remove)(r),this.setProperties({dataSource:l.b.createJsonFromElement(r)},!0),this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData}))}},t.prototype.reRender=function(){this.removeElement(this.headerEle),this.removeElement(this.ulElement),this.removeElement(this.contentContainer),this.isReact&&this.clearTemplate(),-1===Object.keys(window).indexOf("ejsInterop")&&(this.element.innerHTML=""),this.headerEle=this.ulElement=this.liCollection=void 0,this.header(),this.setLocalData()},t.prototype.resetCurrentList=function(){this.setViewDataSource(this.curViewDS),this.contentContainer.innerHTML="",this.createList(),this.renderIntoDom(this.curUL)},t.prototype.setAttributes=function(e){for(var t=0;t<e.length;t++){var i=e[t];i.classList.contains("e-list-item")&&(i.setAttribute("id",this.element.id+"_"+i.getAttribute("data-uid")),i.setAttribute("aria-selected","false"),i.setAttribute("tabindex","-1"))}},t.prototype.createList=function(){this.currentLiElements=[],this.isNestedList=!1,this.ulElement=this.curUL=l.b.createList(this.createElement,this.curViewDS,this.listBaseOption,null,this),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.setAttributes(this.liCollection)},t.prototype.exceptionEvent=function(e){this.trigger("actionFailure",e)},t.prototype.UpdateCurrentUL=function(){this.ulElement=this.curUL=this.element.querySelector("."+d.parentItem),this.curUL&&(this.liCollection=this.curUL.querySelectorAll("."+d.listItem))},t.prototype.renderSubList=function(e){this.liElement=e;var t=e.getAttribute("data-uid");if(e.classList.contains(d.hasChild)&&t){var n=i.i(s.closest)(e.parentNode,"."+d.parentItem),r=this.element.querySelector("[pid='"+t+"']");if(this.curDSLevel.push(t),this.setViewDataSource(this.getSubDS()),!r){var a=this.curViewDS;r=l.b.createListFromJson(this.createElement,a,this.listBaseOption,this.curDSLevel.length,null,this),this.isReact&&this.renderReactTemplates();var o=r.querySelectorAll("."+d.listItem);this.setAttributes(o),r.setAttribute("pID",t),r.style.display="none",this.renderIntoDom(r)}if(this.switchView(n,r),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.selectedItems){var c=i.i(l.c)(this.selectedItems.data,this.listBaseOption.fields);this.header(c[this.listBaseOption.fields.text],!0,"header")}this.selectedLI=void 0}},t.prototype.renderIntoDom=function(e){this.contentContainer.appendChild(e)},t.prototype.renderList=function(e){this.setViewDataSource(e),this.enableVirtualization?(Object.keys(this.dataSource).length&&(!this.template&&!this.groupTemplate||this.virtualizationModule.isNgTemplate()||(this.isReact?("string"==typeof this.template&&(this.listBaseOption.template=null),"string"==typeof this.groupTemplate&&(this.listBaseOption.groupTemplate=null)):(this.listBaseOption.template=null,this.listBaseOption.groupTemplate=null),this.listBaseOption.itemCreated=this.virtualizationModule.createUIItem.bind(this.virtualizationModule))),this.virtualizationModule.uiVirtualization()):(this.createList(),this.contentContainer=this.createElement("div",{className:d.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement),this.isReact&&this.renderReactTemplates())},t.prototype.getElementUID=function(e){var t={};return e instanceof Element?t[this.fields.id]=e.getAttribute("data-uid"):t=e,t},t.prototype.render=function(){this.element.classList.add(d.root),i.i(s.attributes)(this.element,{role:"list",tabindex:"0"}),this.setCSSClass(),this.setEnableRTL(),this.setEnable(),this.setSize(),this.wireEvents(),this.header(),this.setLocalData(),this.setHTMLAttribute(),this.rippleFn=i.i(s.rippleEffect)(this.element,{selector:"."+d.listItem}),this.renderComplete()},t.prototype.destroy=function(){this.isReact&&this.clearTemplate(),this.unWireEvents();var t=[d.root,d.disable,"e-rtl","e-has-header","e-lib"].concat(this.cssClass.split(" ").filter(function(e){return e}));i.i(s.removeClass)([this.element],t),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex"),this.curUL=this.ulElement=this.liCollection=this.headerEle=void 0,this.element.innerHTML="",e.prototype.destroy.call(this)},t.prototype.back=function(){var e=this.curDSLevel[this.curDSLevel.length-1];if(void 0!==e&&!this.isInAnimation()){this.curDSLevel.pop(),this.setViewDataSource(this.getSubDS());var t=this.element.querySelector("[data-uid='"+e+"']"),n=this.curUL;t?t=t.parentElement:(this.createList(),this.renderIntoDom(this.ulElement),t=this.curUL);var r=i.i(l.c)(this.curDSJSON,this.listBaseOption.fields),a=r[this.fields.text];this.switchView(n,t,!0),this.removeFocus();var o=this.element.querySelector("[data-uid='"+e+"']");o.classList.remove(d.disable),o.classList.add(d.focused),this.showCheckBox&&o.querySelector("."+d.checkboxIcon).classList.contains(d.checked)?o.setAttribute("aria-selected","true"):(o.classList.remove(d.selected),o.setAttribute("aria-selected","false")),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.enableHtmlSanitizer&&this.setProperties({headerTitle:s.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.header(this.curDSLevel.length?a:this.headerTitle,!!this.curDSLevel.length,"header")}},t.prototype.selectItem=function(e){this.enableVirtualization?this.virtualizationModule.selectItem(e):this.showCheckBox?this.setCheckboxLI(this.getLiFromObjOrElement(e)):!0===i.i(s.isNullOrUndefined)(e)?this.removeSelect():this.setSelectLI(this.getLiFromObjOrElement(e))},t.prototype.getLiFromObjOrElement=function(e){var t,r=this.dataSource instanceof n.DataManager?this.localData:this.dataSource;if(!i.i(s.isNullOrUndefined)(e))if("string"==typeof r[0]||"number"==typeof r[0])if(e instanceof Element){for(var a=e.getAttribute("data-uid").toString(),o=0;o<this.liCollection.length;o++)if(this.liCollection[o].getAttribute("data-uid").toString()===a){t=this.liCollection[o];break}}else Array.prototype.some.call(this.curUL.querySelectorAll("."+d.listItem),function(i){return i.innerText.trim()===e.toString()&&(t=i,!0)});else{var c=this.getItemData(e),h=i.i(l.c)(c,this.listBaseOption.fields);if(c&&(t=this.element.querySelector('[data-uid="'+h[this.fields.id]+'"]'),!this.enableVirtualization&&i.i(s.isNullOrUndefined)(t)))for(var u=this.element.querySelectorAll("."+d.listItem),o=0;o<u.length;o++)u[o].innerText.trim()===h[this.fields.text]&&(t=u[o])}return t},t.prototype.selectMultipleItems=function(e){if(!i.i(s.isNullOrUndefined)(e))for(var t=0;t<e.length;t++)i.i(s.isNullOrUndefined)(e[t])||this.selectItem(e[t])},t.prototype.getParentId=function(){var e=[];if(this.isNestedList)for(var t=this.curDSLevel.length-1;t>=0;t--)e.push(this.curDSLevel[t]);return e},t.prototype.getSelectedItems=function(){var e,t=!1;this.selectedId=[];var r=this.dataSource instanceof n.DataManager?this.localData:this.dataSource;if(this.enableVirtualization&&!t)e=this.virtualizationModule.getSelectedItems(),t=!0;else if(this.showCheckBox&&!t){var a=this.curUL.getElementsByClassName(d.selected),o=[],c=[];this.selectedId=[];for(var h=[],u=0;u<a.length;u++)if("string"==typeof r[0]||"number"==typeof r[0])o.push(a[u].innerText.trim());else{var p=this.getItemData(a[u]),m=i.i(l.c)(p,this.listBaseOption.fields);this.isNestedList?h.push({data:p,parentId:this.getParentId()}):c.push(p),m?(o.push(m[this.listBaseOption.fields.text]),this.selectedId.push(m[this.listBaseOption.fields.id])):(o.push(void 0),this.selectedId.push(void 0))}"string"!=typeof r[0]&&"number"!=typeof r[0]||t||(e={item:a,data:r,text:o},t=!0),this.isNestedList&&!t?(e={item:a,data:h,text:o},t=!0):t||(e={item:a,data:c,text:o},t=!0)}else if(!t){var f=this.element.getElementsByClassName(d.selected)[0],m=i.i(l.c)(this.getItemData(f),this.listBaseOption.fields);"string"!=typeof r[0]&&"number"!=typeof r[0]||t?t||(i.i(s.isNullOrUndefined)(m)||i.i(s.isNullOrUndefined)(f)?(e=void 0,t=!0):(this.selectedId.push(m[this.listBaseOption.fields.id]),e={text:m[this.listBaseOption.fields.text],item:f,data:this.getItemData(f)},t=!0)):(e=i.i(s.isNullOrUndefined)(f)?void 0:{item:f,data:r,text:f.innerText.trim()},t=!0)}return e},t.prototype.findItem=function(e){return this.getItemData(e)},t.prototype.enableItem=function(e){this.setItemState(e,!0),this.enableVirtualization&&this.virtualizationModule.enableItem(e)},t.prototype.disableItem=function(e){this.setItemState(e,!1),this.enableVirtualization&&this.virtualizationModule.disableItem(e)},t.prototype.setItemState=function(e,t){var s=this.getItemData(e),n=i.i(l.c)(s,this.listBaseOption.fields);if(s){var r=this.element.querySelector('[data-uid="'+n[this.fields.id]+'"]');t?(r&&r.classList.remove(d.disable),delete s[this.fields.enabled]):t||(r&&r.classList.add(d.disable),s[this.fields.enabled]=!1)}},t.prototype.showItem=function(e){this.showHideItem(e,!1,""),this.enableVirtualization&&this.virtualizationModule.showItem(e)},t.prototype.hideItem=function(e){this.showHideItem(e,!0,"none"),this.enableVirtualization&&this.virtualizationModule.hideItem(e)},t.prototype.showHideItem=function(e,t,s){var n=this.getItemData(e),r=i.i(l.c)(n,this.listBaseOption.fields);if(n){var a=this.element.querySelector('[data-uid="'+r[this.fields.id]+'"]');a&&(a.style.display=s),t?n[this.fields.isVisible]=!1:delete n[this.fields.isVisible]}},t.prototype.addItem=function(e,t){void 0===t&&(t=void 0);var i=this.dataSource instanceof n.DataManager?this.localData:this.dataSource;this.addItemInternally(e,t,i)},t.prototype.addItemInternally=function(e,t,s){if(e instanceof Array)if(this.enableVirtualization)this.virtualizationModule.addItem(e,t,s);else{var n=this.findItemFromDS(s,t),r=void 0;if(n){var a=i.i(l.c)(n,this.listBaseOption.fields);r=a[this.fields.child],r||(r=[]),r=r.concat(e)}if(n instanceof Array){for(var o=0;o<e.length;o++){s.push(e[o]),this.setViewDataSource(s);var c=this.contentContainer?this.contentContainer.children[0]:null;this.contentContainer&&c?this.addItemIntoDom(e[o],c,this.curViewDS):this.reRender()}this.liCollection=this.curUL.querySelectorAll("."+d.listItem)}else n&&(n[this.fields.child]=r,this.addItemInNestedList(n,e))}},t.prototype.addItemInNestedList=function(e,t){var n=e[this.fields.id],r=e[this.fields.child],a=this.element.querySelector("[pid='"+n+"']"),o=this.element.querySelector("[data-uid='"+n+"']"),c=a||(o?i.i(s.closest)(o,"ul"):null),h=a?r:[e],u=!!o&&!o.classList.contains(d.hasChild);if(u){var p=l.b.createListItemFromJson(this.createElement,h,this.listBaseOption,null,null,this);this.setAttributes(p),c.insertBefore(p[0],o),i.i(s.detach)(o),!0}if(a&&t){for(var m=0;m<t.length;m++)h.push(t[m]),this.addItemIntoDom(t[m],c,h);!0}},t.prototype.addItemIntoDom=function(e,t,i){var s=i.indexOf(e);this.addListItem(e,s,t,i);var n=i[s-1];n&&n.isHeader&&1===n.items.length&&this.addListItem(n,s-1,t,i)},t.prototype.addListItem=function(e,t,i,s){var n=this.getLiFromObjOrElement(s[t+1])||this.getLiFromObjOrElement(s[t+2])||null,r=l.b.createListItemFromJson(this.createElement,[e],this.listBaseOption,null,null,this);if(this.setAttributes(r),this.template&&this.isReact&&this.renderReactTemplates(),this.fields.groupBy&&s[t+1]&&s[t+1].isHeader){var a=this.getLiFromObjOrElement(s[t-1]);a&&(n=a.nextElementSibling)}i.insertBefore(r[0],n)},t.prototype.removeItem=function(e){var t=this.dataSource instanceof n.DataManager?this.localData:this.dataSource;this.enableVirtualization?this.virtualizationModule.removeItem(e):this.removeItemFromList(e,t)},t.prototype.removeItemFromList=function(e,t){var n,r=this,a=this.curViewDS,o=e instanceof Element?this.getElementUID(e):e;if(n=this.findItemFromDS(t,o,!0)){var c;c=this.findItemFromDS(n,o);var h=a.indexOf(c),u=this.getLiFromObjOrElement(e),p=void 0;this.validateNestedView(u),this.fields.groupBy&&this.curViewDS[h-1]&&a[h-1].isHeader&&1===a[h-1].items.length&&u&&u.previousElementSibling.classList.contains(d.groupListItem)&&(i.i(s.isNullOrUndefined)(u.nextElementSibling)||u.nextElementSibling&&u.nextElementSibling.classList.contains(d.groupListItem))&&(p=u.previousElementSibling),u&&i.i(s.detach)(u),p&&i.i(s.detach)(p);var m=n.length-1<=0?this.findParent(this.localData,this.fields.id,function(e){return e===c[r.fields.id]},null):null,f=n.indexOf(c);if(n.splice(f,1),this.setViewDataSource(t),m&&m.parent&&Array.isArray(m.parent[this.fields.child])&&m.parent[this.fields.child].length<=0){var v=this.getLiFromObjOrElement(m.parent);if(v){var g=l.b.createListItemFromJson(this.createElement,[m.parent],this.listBaseOption,null,null,this);this.setAttributes(g),v.parentElement.insertBefore(g[0],v),v.parentElement.removeChild(v)}}n.length<=0&&this.back(),this.liCollection=Array.prototype.slice.call(this.element.querySelectorAll("."+d.listItem))}},t.prototype.validateNestedView=function(e){var t=e?e.getAttribute("data-uid").toString().toLowerCase():null;if(t&&this.curDSLevel&&this.curDSLevel.length>0)for(;this.curDSLevel.some(function(e){return e.toString().toLowerCase()===t});)this.back()},t.prototype.removeMultipleItems=function(e){if(e.length)for(var t=0;t<e.length;t++)this.removeItem(e[t])},t.prototype.findParent=function(e,t,n,r){if(e.hasOwnProperty(t)&&!0===n(e[t]))return i.i(s.extend)({},e);for(var l=0;l<Object.keys(e).length;l++)if(e[Object.keys(e)[l]]&&"object"==typeof e[Object.keys(e)[l]]){var a=this.findParent(e[Object.keys(e)[l]],t,n,e);if(null!=a)return a.parent||(a.parent=r),a}return null},t.prototype.getModuleName=function(){return"listview"},t.prototype.requiredModules=function(){var e=[];return this.enableVirtualization&&e.push({args:[this],member:"virtualization"}),e},t.prototype.getPersistData=function(){return this.addOnPersist(["cssClass","enableRtl","htmlAttributes","enable","fields","animation","headerTitle","sortOrder","showIcon","height","width","showCheckBox","checkBoxPosition"])},o([i.i(s.Property)("")],t.prototype,"cssClass",void 0),o([i.i(s.Property)(!1)],t.prototype,"enableVirtualization",void 0),o([i.i(s.Property)({})],t.prototype,"htmlAttributes",void 0),o([i.i(s.Property)(!0)],t.prototype,"enable",void 0),o([i.i(s.Property)([])],t.prototype,"dataSource",void 0),o([i.i(s.Property)()],t.prototype,"query",void 0),o([i.i(s.Complex)(l.b.defaultMappedFields,u)],t.prototype,"fields",void 0),o([i.i(s.Property)({effect:"SlideLeft",duration:400,easing:"ease"})],t.prototype,"animation",void 0),o([i.i(s.Property)("None")],t.prototype,"sortOrder",void 0),o([i.i(s.Property)(!1)],t.prototype,"showIcon",void 0),o([i.i(s.Property)(!1)],t.prototype,"showCheckBox",void 0),o([i.i(s.Property)("Left")],t.prototype,"checkBoxPosition",void 0),o([i.i(s.Property)("")],t.prototype,"headerTitle",void 0),o([i.i(s.Property)(!1)],t.prototype,"showHeader",void 0),o([i.i(s.Property)(!1)],t.prototype,"enableHtmlSanitizer",void 0),o([i.i(s.Property)("")],t.prototype,"height",void 0),o([i.i(s.Property)("")],t.prototype,"width",void 0),o([i.i(s.Property)(null)],t.prototype,"template",void 0),o([i.i(s.Property)(null)],t.prototype,"headerTemplate",void 0),o([i.i(s.Property)(null)],t.prototype,"groupTemplate",void 0),o([i.i(s.Event)()],t.prototype,"select",void 0),o([i.i(s.Event)()],t.prototype,"actionBegin",void 0),o([i.i(s.Event)()],t.prototype,"actionComplete",void 0),o([i.i(s.Event)()],t.prototype,"actionFailure",void 0),t=o([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";var s=i(1);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c})},function(e,t,i){"use strict";var s=i(3);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c});var n=i(8);i.d(t,"d",function(){return n.a})},function(e,t,i){"use strict";var s=i(9);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(5);i.d(t,"classNames",function(){return s.a}),i.d(t,"FieldSettings",function(){return s.b}),i.d(t,"ListView",function(){return s.c}),i.d(t,"Virtualization",function(){return s.d});var n=i(4);i.d(t,"cssClass",function(){return n.a}),i.d(t,"ListBase",function(){return n.b}),i.d(t,"getFieldValues",function(){return n.c});var r=i(6);i.d(t,"Sortable",function(){return r.a}),i.d(t,"moveTo",function(){return r.b})},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var s=i(3),n=i(0),r=(i.n(n),i(1)),l=i(2),a=(i.n(l),function(){function e(e){this.elementDifference=0,this.listViewInstance=e}return e.prototype.isNgTemplate=function(){return!i.i(n.isNullOrUndefined)(this.listViewInstance.templateRef)&&"string"!=typeof this.listViewInstance.templateRef},e.prototype.uiVirtualization=function(){this.wireScrollEvent(!1);var e=this.listViewInstance.curViewDS,t=e.slice(0,1);this.listViewInstance.ulElement=this.listViewInstance.curUL=r.b.createList(this.listViewInstance.createElement,t,this.listViewInstance.listBaseOption,null,this.listViewInstance),this.listViewInstance.contentContainer=this.listViewInstance.createElement("div",{className:s.a.content}),this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer),this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement),this.listItemHeight=this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height,this.expectedDomItemCount=this.ValidateItemCount(1e4),this.domItemCount=this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length),this.uiFirstIndex=0,this.uiLastIndex=this.domItemCount-1;var l=e.slice(1,this.domItemCount),a=r.b.createListItemFromJson(this.listViewInstance.createElement,l,this.listViewInstance.listBaseOption,null,null,this.listViewInstance);i.i(n.append)(a,this.listViewInstance.ulElement),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li"),this.topElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.topElement,this.listViewInstance.ulElement.firstElementChild),this.bottomElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.bottomElement,null),this.totalHeight=Object.keys(e).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.uiIndicesInitialization()},e.prototype.wireScrollEvent=function(e){e?!0===this.listViewInstance.isWindow?(window.removeEventListener("scroll",this.onVirtualScroll),window.removeEventListener("scroll",this.updateUl)):(n.EventHandler.remove(this.listViewInstance.element,"scroll",this.onVirtualUiScroll),n.EventHandler.remove(this.listViewInstance.element,"scroll",this.updateUlContainer)):this.listViewInstance.isWindow?(this.onVirtualScroll=this.onVirtualUiScroll.bind(this),window.addEventListener("scroll",this.onVirtualScroll)):n.EventHandler.add(this.listViewInstance.element,"scroll",this.onVirtualUiScroll,this)},e.prototype.updateUlContainer=function(e){var t,r=this.listViewInstance.ulElement.querySelector("."+s.a.virtualElementContainer);i.i(n.isNullOrUndefined)(this.listViewInstance.liElementHeight)&&this.listViewInstance.updateLiElementHeight(),t=this.listViewInstance.isWindow?Math.round(e.target.documentElement.scrollTop/this.listViewInstance.liElementHeight)-2:Math.round(e.target.scrollTop/this.listViewInstance.liElementHeight)-2,(t-1)*this.listViewInstance.liElementHeight<0?r.style.top="0px":r.style.top=t*this.listViewInstance.liElementHeight+"px"},e.prototype.ValidateItemCount=function(e){var t,s=parseFloat(i.i(n.formatUnit)(this.listViewInstance.height));return t=this.listViewInstance.isWindow?Math.round(window.innerHeight/this.listItemHeight*3):"string"==typeof this.listViewInstance.height&&-1!==this.listViewInstance.height.indexOf("%")?Math.round(this.listViewInstance.element.getBoundingClientRect().height/this.listItemHeight*1.5):Math.round(s/this.listItemHeight*1.5),t>e&&(t=e),t},e.prototype.uiIndicesInitialization=function(){this.uiIndices={activeIndices:[],disabledItemIndices:[],hiddenItemIndices:[]};for(var e=this.listViewInstance.curViewDS,t=0;t<e.length;t++)this.listViewInstance.showCheckBox&&e[t][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(t),i.i(n.isNullOrUndefined)(e[t][this.listViewInstance.fields.enabled])||e[t][this.listViewInstance.fields.enabled]||this.uiIndices.disabledItemIndices.push(t);if(this.isNgTemplate())for(var r=this.listViewInstance.element.querySelectorAll("."+s.a.listItem),l=0;l<r.length;l++)r[l].context=this.listViewInstance.viewContainerRef.get(l).context},e.prototype.refreshItemHeight=function(){if(this.listViewInstance.curViewDS.length){var e=this.listViewInstance.curViewDS;this.listItemHeight=this.topElement.nextSibling.getBoundingClientRect().height,this.totalHeight=Object.keys(e).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.bottomElementHeight=this.totalHeight,this.bottomElement.style.height=this.totalHeight+"px"}},e.prototype.getscrollerHeight=function(e){return this.listViewInstance.isWindow?pageYOffset-e<=0?0:pageYOffset-e:this.listViewInstance.element.scrollTop-e<=0?0:this.listViewInstance.element.scrollTop-e},e.prototype.onVirtualUiScroll=function(e){var t,s;s=this.listViewInstance.isWindow?this.listViewInstance.ulElement.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top:this.listViewInstance.headerEle?this.listViewInstance.headerEle.getBoundingClientRect().height:0,this.scrollPosition=i.i(n.isNullOrUndefined)(this.scrollPosition)?0:this.scrollPosition;var r=this.getscrollerHeight(s);if(this.topElementHeight=this.listItemHeight*Math.floor(r/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,t=r<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=t[0],this.bottomElementHeight=t[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",r>this.scrollPosition){var l=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);l>this.expectedDomItemCount+5?this.onLongScroll(l,!0):this.onNormalScroll(l,!0)}else{var l=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);l>this.expectedDomItemCount+5?this.onLongScroll(l,!1):this.onNormalScroll(l,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),"function"==typeof this.listViewInstance.onUIScrolled&&this.listViewInstance.onUIScrolled(),this.scrollPosition=r},e.prototype.onLongScroll=function(e,t){for(var i=t?this.uiFirstIndex+e:this.uiFirstIndex-e,s=this.listViewInstance.ulElement.querySelectorAll("li"),n=0;n<s.length;n++)this.updateUI(s[n],i),i++;this.uiLastIndex=t?this.uiLastIndex+e:this.uiLastIndex-e,this.uiFirstIndex=t?this.uiFirstIndex+e:this.uiFirstIndex-e},e.prototype.onNormalScroll=function(e,t){if(t)for(var i=0;i<e;i++){var s=++this.uiLastIndex;this.updateUI(this.topElement.nextElementSibling,s,this.bottomElement),this.uiFirstIndex++}else for(var i=0;i<e;i++){var s=--this.uiFirstIndex,n=this.topElement.nextSibling;this.updateUI(this.bottomElement.previousElementSibling,s,n),this.uiLastIndex--}},e.prototype.updateUiContent=function(e,t){var l=this.listViewInstance.curViewDS;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]?(e.dataset.uid=r.b.generateId(),e.getElementsByClassName(s.a.listItemText)[0].innerHTML=this.listViewInstance.curViewDS[t].toString()):(e.dataset.uid=l[t][this.listViewInstance.fields.id]?l[t][this.listViewInstance.fields.id]:r.b.generateId(),e.getElementsByClassName(s.a.listItemText)[0].innerHTML=l[t][this.listViewInstance.fields.text]),this.listViewInstance.showIcon&&(e.querySelector("."+s.a.listIcon)&&i.i(n.detach)(e.querySelector("."+s.a.listIcon)),this.listViewInstance.curViewDS[t][this.listViewInstance.fields.iconCss])){var a=e.querySelector("."+s.a.textContent),o=this.listViewInstance.createElement("div",{className:s.a.listIcon+" "+this.listViewInstance.curViewDS[t][this.listViewInstance.fields.iconCss]});a.insertBefore(o,e.querySelector("."+s.a.listItemText))}if(this.listViewInstance.showCheckBox&&this.listViewInstance.fields.groupBy){this.checkListWrapper||(this.checkListWrapper=this.listViewInstance.curUL.querySelector("."+s.a.checkboxWrapper).cloneNode(!0));var a=e.querySelector("."+s.a.textContent);this.listViewInstance.curViewDS[t].isHeader?e.querySelector("."+s.a.checkboxWrapper)&&(e.classList.remove(s.a.checklist),a.classList.remove(s.a.checkbox),i.i(n.detach)(e.querySelector("."+s.a.checkboxWrapper))):e.querySelector("."+s.a.checkboxWrapper)||(e.classList.add(s.a.checklist),a.classList.add(s.a.checkbox),a.insertBefore(this.checkListWrapper.cloneNode(!0),e.querySelector("."+s.a.listItemText)))}},e.prototype.changeElementAttributes=function(e,t){if(e.classList.remove(s.a.disable),this.uiIndices.disabledItemIndices.length&&-1!==this.uiIndices.disabledItemIndices.indexOf(t)&&e.classList.add(s.a.disable),e.style.display="",this.uiIndices.hiddenItemIndices.length&&-1!==this.uiIndices.hiddenItemIndices.indexOf(t)&&(e.style.display="none"),this.listViewInstance.showCheckBox){var r=e.querySelector("."+s.a.checkboxWrapper);e.classList.remove(s.a.selected),e.classList.remove(s.a.focused),r&&(r.removeAttribute("aria-checked"),r.firstElementChild.classList.remove(s.a.checked)),this.uiIndices.activeIndices.length&&-1!==this.uiIndices.activeIndices.indexOf(t)&&!this.listViewInstance.curUL.querySelector(s.a.selected)&&(e.classList.add(s.a.selected),r.firstElementChild.classList.add(s.a.checked),r.setAttribute("aria-checked","true"),this.activeIndex===t&&e.classList.add(s.a.focused))}else e.classList.remove(s.a.selected),e.removeAttribute("aria-selected"),i.i(n.isNullOrUndefined)(this.activeIndex)||this.activeIndex!==t||this.listViewInstance.curUL.querySelector(s.a.selected)||(e.classList.add(s.a.selected),e.setAttribute("aria-selected","true"));this.listViewInstance.fields.groupBy&&(this.listViewInstance.curViewDS[t].isHeader?e.classList.contains(s.a.listItem)&&(e.classList.remove(s.a.listItem),e.setAttribute("role","group"),e.classList.add(s.a.groupListItem)):e.classList.contains(s.a.groupListItem)&&(e.classList.remove(s.a.groupListItem),e.setAttribute("role","listitem"),e.classList.add(s.a.listItem)))},e.prototype.findDSAndIndexFromId=function(e,t){var s=this,r={};return t=this.listViewInstance.getElementUID(t),i.i(n.isNullOrUndefined)(t)||e.some(function(e,i){return!!(t[s.listViewInstance.fields.id]&&t[s.listViewInstance.fields.id]===(e[s.listViewInstance.fields.id]&&e[s.listViewInstance.fields.id])||t===e)&&(r.index=i,r.data=e,!0)}),r},e.prototype.getSelectedItems=function(){var e=this;if(!i.i(n.isNullOrUndefined)(this.activeIndex)||this.listViewInstance.showCheckBox&&this.uiIndices.activeIndices.length){var t=[],s=[];if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]){var r=this.listViewInstance.curViewDS;if(this.listViewInstance.showCheckBox){for(var a=this.uiIndices.activeIndices,o=0;o<a.length;o++)t.push(r[a[o]]);return{text:t,data:t,index:this.uiIndices.activeIndices.map(function(t){return e.listViewInstance.dataSource.indexOf(r[t])})}}return{text:r[this.activeIndex],data:r[this.activeIndex],index:this.listViewInstance.dataSource.indexOf(r[this.activeIndex])}}var c=this.listViewInstance.curViewDS,h=this.listViewInstance.fields.text;if(this.listViewInstance.showCheckBox){for(var d=this.uiIndices.activeIndices,o=0;o<d.length;o++)s.push(c[d[o]][h]),t.push(c[d[o]]);var u=this.listViewInstance.dataSource instanceof l.DataManager?c:this.listViewInstance.dataSource;return{text:s,data:t,index:this.uiIndices.activeIndices.map(function(e){return u.indexOf(c[e])})}}var p=this.listViewInstance.dataSource instanceof l.DataManager?c:this.listViewInstance.dataSource;return{text:c[this.activeIndex][this.listViewInstance.fields.text],data:c[this.activeIndex],index:p.indexOf(c[this.activeIndex])}}},e.prototype.selectItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(Object.keys(t).length){var r=this.activeIndex===t.index,l=void 0;if(this.activeIndex=t.index,this.listViewInstance.showCheckBox&&(-1===this.uiIndices.activeIndices.indexOf(t.index)?(l=!0,this.uiIndices.activeIndices.push(t.index)):(l=!1,this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(t.index),1)),this.listViewInstance.curUL.querySelector("."+s.a.focused)&&this.listViewInstance.curUL.querySelector("."+s.a.focused).classList.remove(s.a.focused)),this.listViewInstance.getLiFromObjOrElement(e))this.listViewInstance.showCheckBox?this.listViewInstance.setCheckboxLI(this.listViewInstance.getLiFromObjOrElement(e)):this.listViewInstance.setSelectLI(this.listViewInstance.getLiFromObjOrElement(e));else{var a=void 0;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0])a={text:this.listViewInstance.curViewDS[this.activeIndex],data:this.listViewInstance.curViewDS[this.activeIndex],index:this.activeIndex};else{var o=this.listViewInstance.curViewDS;a={text:o[this.activeIndex][this.listViewInstance.fields.text],data:o[this.activeIndex],index:this.activeIndex}}this.listViewInstance.showCheckBox?(a.isChecked=l,this.listViewInstance.trigger("select",a)):r||(this.listViewInstance.removeSelect(),this.listViewInstance.trigger("select",a))}}else i.i(n.isNullOrUndefined)(e)&&!this.listViewInstance.showCheckBox&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0)},e.prototype.enableItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(t.index),1)},e.prototype.disableItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&-1===this.uiIndices.disabledItemIndices.indexOf(t.index)&&this.uiIndices.disabledItemIndices.push(t.index)},e.prototype.showItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(t.index),1)},e.prototype.hideItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&-1===this.uiIndices.hiddenItemIndices.indexOf(t.index)&&this.uiIndices.hiddenItemIndices.push(t.index)},e.prototype.removeItem=function(e){var t,i=this.listViewInstance.curViewDS,s=this.findDSAndIndexFromId(i,e);Object.keys(s).length&&(t=s.data,i[s.index-1]&&i[s.index-1].isHeader&&1===i[s.index-1].items.length?(this.removeUiItem(s.index-1),this.removeUiItem(s.index-1)):this.removeUiItem(s.index));var n=this.listViewInstance.dataSource instanceof l.DataManager?this.listViewInstance.localData:this.listViewInstance.dataSource,r=n.indexOf(t);-1!==r&&(n.splice(r,1),this.listViewInstance.setViewDataSource(n)),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")},e.prototype.setCheckboxLI=function(e,t){var i=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex;this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex,e.classList.contains(s.a.selected)?-1===this.uiIndices.activeIndices.indexOf(i)&&this.uiIndices.activeIndices.push(i):this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(i),1)},e.prototype.setSelectLI=function(e,t){this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex},e.prototype.checkedItem=function(e){if(e){this.uiIndices.activeIndices=[],this.activeIndex=void 0;for(var t=this.listViewInstance.curViewDS,i=0;i<t.length;i++)t[i].isHeader||this.uiIndices.activeIndices.push(i)}else this.activeIndex=void 0,this.uiIndices.activeIndices=[]},e.prototype.addUiItem=function(e){var t=this.listViewInstance.curViewDS;if(this.changeUiIndices(e,!0),this.activeIndex&&this.activeIndex>=e&&this.activeIndex++,this.listViewInstance.showCheckBox&&t[e][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(e),parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)||(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px"),parseFloat(this.bottomElement.style.height)){var i=this.listViewInstance.curUL.lastElementChild.previousSibling,s=this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]);s&&(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px",this.updateUI(i,e,s))}else{var i=this.listViewInstance.curUL.firstElementChild.nextSibling,s=void 0;s=Object.keys(this.listViewInstance.curViewDS).length-1===e?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]),this.topElement.style.height=parseFloat(this.topElement.style.height)+this.listItemHeight+"px",this.uiFirstIndex++,this.uiLastIndex++,s&&(this.updateUI(i,e,s),!0===this.listViewInstance.isWindow?window.scrollTo(0,pageYOffset+this.listItemHeight):this.listViewInstance.element.scrollTop+=this.listItemHeight)}this.totalHeight+=this.listItemHeight,this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},e.prototype.removeUiItem=function(e){this.totalHeight-=this.listItemHeight;var t=this.listViewInstance.curViewDS[e],r=this.listViewInstance.getLiFromObjOrElement(t);if(this.listViewInstance.curViewDS.splice(e,1),this.activeIndex&&this.activeIndex>=e&&this.activeIndex--,r)if(this.domItemCount>Object.keys(this.listViewInstance.curViewDS).length)i.i(n.detach)(r),this.domItemCount--,this.uiLastIndex--,this.totalHeight=0;else{if(r.classList.contains(s.a.disable)&&(r.classList.remove(s.a.disable),this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(e),1)),"none"===r.style.display&&(r.style.display="",this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(e),1)),this.listViewInstance.showCheckBox&&r.classList.contains(s.a.selected)){this.listViewInstance.removeSelect(),this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(e),1);var l=r.querySelector("."+s.a.checkboxWrapper);l.removeAttribute("aria-checked"),l.firstElementChild.classList.remove(s.a.checked),r.classList.contains(s.a.focused)&&(r.classList.remove(s.a.focused),this.activeIndex=void 0)}else r.classList.contains(s.a.selected)&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0);parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)?parseFloat(this.bottomElement.style.height)?(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)-this.listItemHeight+"px",this.updateUI(r,this.uiLastIndex,this.bottomElement)):(this.topElement.style.height=parseFloat(this.topElement.style.height)-this.listItemHeight+"px",this.updateUI(r,this.uiFirstIndex-1,this.topElement.nextSibling),this.uiLastIndex--,this.uiFirstIndex--):this.updateUI(r,this.uiLastIndex,this.bottomElement)}this.changeUiIndices(e,!1),this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},e.prototype.changeUiIndices=function(e,t){for(var i=Object.keys(this.uiIndices),s=0;s<i.length;s++)this.uiIndices[i[s]]=this.uiIndices[i[s]].map(function(i){return i>=e?t?++i:--i:i})},e.prototype.addItem=function(e,t,i){for(var s=0;s<e.length;s++){var n=e[s];if(i.push(n),this.listViewInstance.setViewDataSource(i),this.domItemCount)if(this.domItemCount<this.expectedDomItemCount){var r=this.listViewInstance.findItemFromDS(i,t);if(r instanceof Array){if(this.listViewInstance.ulElement){var l=this.listViewInstance.curViewDS.indexOf(n);this.createAndInjectNewItem(n,l);var a=this.listViewInstance.curViewDS[l-1];a&&a.isHeader&&1===a.items.length&&(--l,this.createAndInjectNewItem(a,l))}this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")}}else{var l=this.listViewInstance.curViewDS.indexOf(n);this.addUiItem(l);var a=this.listViewInstance.curViewDS[l-1];a&&a.isHeader&&1===a.items.length&&this.addUiItem(l-1)}else!this.listViewInstance.template&&!this.listViewInstance.groupTemplate||this.isNgTemplate()||(this.listViewInstance.listBaseOption.template=null,this.listViewInstance.listBaseOption.groupTemplate=null,this.listViewInstance.listBaseOption.itemCreated=this.createUIItem.bind(this)),this.uiVirtualization()}},e.prototype.createAndInjectNewItem=function(e,t){var i,s=r.b.createListItemFromJson(this.listViewInstance.createElement,[e],this.listViewInstance.listBaseOption,null,null,this.listViewInstance);if(i=Object.keys(this.listViewInstance.curViewDS).length-1===t?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[t+1])||this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[t+2]),this.listViewInstance.fields.groupBy&&this.listViewInstance.curViewDS[t+1]&&this.listViewInstance.curViewDS[t+1].isHeader){var n=this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[t-1]);n&&(i=n.nextElementSibling)}this.listViewInstance.ulElement.insertBefore(s[0],i),this.domItemCount++,this.bottomElementHeight<=0&&this.uiLastIndex++,this.refreshItemHeight()},e.prototype.createUIItem=function(e){var t=this.listViewInstance.template,s=this.listViewInstance.createElement("div"),r='<div class="e-text-content" role="presentation"> <span class="e-list-text"> ${'+this.listViewInstance.fields.text+"} </span></div>";if(this.listViewInstance.isReact&&(r=null),this.listViewInstance.showCheckBox){if(this.listViewInstance.renderCheckbox(e),!i.i(n.isNullOrUndefined)(this.listViewInstance.virtualCheckBox)&&!i.i(n.isNullOrUndefined)(this.listViewInstance.virtualCheckBox.outerHTML)){var l=document.createElement("div");l.innerHTML=this.listViewInstance.template||r,l.children&&l.children[0]&&(l.children[0].classList.add("e-checkbox"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].classList.add("e-checkbox-left"):l.children[0].classList.add("e-checkbox-right"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].insertBefore(this.listViewInstance.virtualCheckBox,l.childNodes[0].children[0]):l.children[0].appendChild(this.listViewInstance.virtualCheckBox),this.listViewInstance.template=l.innerHTML)}s.innerHTML=this.listViewInstance.template,this.listViewInstance.template=t}else s.innerHTML=this.listViewInstance.template||r;var a=s.getElementsByTagName("*"),o=this.listViewInstance.createElement("div");this.listViewInstance.fields.groupBy&&(o.innerHTML=this.listViewInstance.groupTemplate||r);var c=o.getElementsByTagName("*");e.curData.isHeader&&(this.headerData=e.curData),this.templateData=e.curData.isHeader?e.curData.items[0]:e.curData,(!this.listViewInstance.isReact||"string"==typeof this.listViewInstance.template&&!e.item.classList.contains("e-list-group-item")||"string"==typeof this.listViewInstance.groupTemplate&&e.item.classList.contains("e-list-group-item"))&&(e.item.innerHTML=""),e.item.context={data:e.curData,nodes:{flatTemplateNodes:[],groupTemplateNodes:[]}};for(var h=0;h<a.length;h++)this.compileTemplate(a[h],e.item,!1);for(var h=0;h<c.length;h++)this.compileTemplate(c[h],e.item,!0);e.item.context.template=e.curData.isHeader?s.firstElementChild:o.firstElementChild,e.item.context.type=e.curData.isHeader?"flatList":"groupList";var d=e.curData.isHeader?o:s;d.firstElementChild&&e.item.insertBefore(d.firstElementChild,null)},e.prototype.compileTemplate=function(e,t,i){this.textProperty(e,t,i),this.classProperty(e,t,i),this.attributeProperty(e,t,i)},e.prototype.onChange=function(e,t){t.context.data=e;var s=t.context.nodes.groupTemplateNodes,r=t.context.nodes.flatTemplateNodes;if(!i.i(n.isNullOrUndefined)(e.isHeader)&&e.isHeader&&"groupList"===t.context.type){var l=t.firstElementChild;i.i(n.detach)(t.firstElementChild),t.insertBefore(t.context.template,null),t.context.template=l,t.context.type="flatList";for(var a=0;a<s.length;a++)s[a].onChange(e)}else if(e.isHeader||"flatList"!==t.context.type)if(e.isHeader)for(var a=0;a<s.length;a++)s[a].onChange(e);else for(var a=0;a<r.length;a++)r[a].onChange(e);else{var l=t.firstElementChild;i.i(n.detach)(t.firstElementChild),t.insertBefore(t.context.template,null),t.context.template=l,t.context.type="groupList";for(var a=0;a<r.length;a++)r[a].onChange(e)}},e.prototype.updateContextData=function(e,t,i){i?e.context.nodes.groupTemplateNodes.push(t):e.context.nodes.flatTemplateNodes.push(t)},e.prototype.classProperty=function(e,t,s){for(var r,l=new RegExp("\\${([^}]*)}","g"),a=[];null!==r;){var o=l.exec(e.className);a.push(o),r=o,null===r&&a.pop()}if(a&&a.length)for(var c=this,h=0;h<a.length;h++)!function(r){var l,o=a[r];l=-1!==o[1].indexOf("?")&&-1!==o[1].indexOf(":")?new Function("data","return "+o[1].replace(/\$/g,"data.")):new Function("data","return data."+o[1]);var h={};h.bindedvalue=l(s?c.headerData:c.templateData),h.onChange=function(t){h.bindedvalue&&i.i(n.removeClass)([e],h.bindedvalue.split(" ").filter(function(e){return e}));var s=l(t);s&&i.i(n.addClass)([e],s.split(" ").filter(function(e){return e})),h.bindedvalue=s};for(var d=o[0].split(" "),u=0;u<d.length;u++)e.classList.remove(d[u]);h.bindedvalue&&i.i(n.addClass)([e],h.bindedvalue.split(" ").filter(function(e){return e})),c.updateContextData(t,h,s)}(h)},e.prototype.attributeProperty=function(e,t,i){for(var s=[],n=0;n<e.attributes.length;n++)s.push(e.attributes[n].nodeName);-1!==s.indexOf("class")&&s.splice(s.indexOf("class"),1);for(var r=this,n=0;n<s.length;n++)!function(n){var l,a,o=s[n],c=new RegExp("\\${([^}]*)}","g").exec(o)||[],h=new RegExp("\\${([^}]*)}","g").exec(e.getAttribute(o))||[];if(c.length||h.length){c[1]&&(l=new Function("data","return data."+c[1])),h[1]&&(a=-1!==h[1].indexOf("?")&&-1!==h[1].indexOf(":")?new Function("data","return "+h[1].replace(/\$/g,"data.")):new Function("data","return data."+h[1]));var d={};d.bindedvalue=i?[void 0===c[1]?void 0:l(r.headerData),void 0===h[1]?void 0:a(r.headerData)]:[void 0===c[1]?void 0:l(r.templateData),void 0===h[1]?void 0:a(r.templateData)],d.attrName=void 0===d.bindedvalue[0]?o:d.bindedvalue[0],d.onChange=function(t){var i=void 0===d.bindedvalue[1]?e.getAttribute(d.attrName):a(t);e.removeAttribute(d.attrName),d.attrName=void 0===d.bindedvalue[0]?d.attrName:l(t),e.setAttribute(d.attrName,i),d.bindedvalue=[void 0===d.bindedvalue[0]?void 0:l(t),void 0===d.bindedvalue[1]?void 0:a(t)]};var u=void 0===d.bindedvalue[1]?e.getAttribute(o):d.bindedvalue[1];e.removeAttribute(o),e.setAttribute(d.attrName,u),r.updateContextData(t,d,i)}}(n)},e.prototype.textProperty=function(e,t,i){for(var s,n=new RegExp("\\${([^}]*)}","g"),r=[];null!==s;){var l=n.exec(e.innerText);r.push(l),s=l,null===s&&r.pop()}var a=Array.prototype.some.call(e.children,function(e){return!!new RegExp("\\${([^}]*)}","g").exec(e.innerText)});if(r&&r.length&&!a)for(var o=this,c=0;c<r.length;c++)!function(s){var n,l=r[s],a={};n=-1!==l[1].indexOf("?")&&-1!==l[1].indexOf(":")?new Function("data","return "+l[1].replace(/\$/g,"data.")):new Function("data","return data."+l[1]),a.bindedvalue=n(i?o.headerData:o.templateData),a.onChange=function(t){e.innerText=e.innerText.replace(a.bindedvalue,n(t)),a.bindedvalue=n(t)},e.innerText=e.innerText.replace(l[0],a.bindedvalue),o.updateContextData(t,a,i)}(c)},e.prototype.reRenderUiVirtualization=function(){this.wireScrollEvent(!0),this.listViewInstance.contentContainer&&i.i(n.detach)(this.listViewInstance.contentContainer),this.listViewInstance.preRender(),this.domItemCount=0,this.listViewInstance.header(),this.listViewInstance.setLocalData()},e.prototype.updateUI=function(e,t,i){var s=this.isNgTemplate()?this.onNgChange:this.onChange;if(this.listViewInstance.template||this.listViewInstance.groupTemplate){var n=this.listViewInstance.curViewDS[t];e.dataset.uid=n[this.listViewInstance.fields.id]?n[this.listViewInstance.fields.id]:r.b.generateId(),s(n,e,this)}else this.updateUiContent(e,t);this.changeElementAttributes(e,t),i&&this.listViewInstance.ulElement.insertBefore(e,i)},e.prototype.onNgChange=function(e,t,s){for(var r=i.i(n.compile)(s.listViewInstance.template),l=r(e);t.lastChild;)t.removeChild(t.lastChild);t.appendChild(l[0])},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.wireScrollEvent(!0)},e}())},function(e,t,i){"use strict";function s(e,t,s,r){var l=[];if(t||(t=e),s&&s.length?s.forEach(function(t){l.push(e.children[t])}):l=[].slice.call(e.children),i.i(n.isNullOrUndefined)(r))l.forEach(function(e){t.appendChild(e)});else{var a=t.children[r];l.forEach(function(e){t.insertBefore(e,a)})}}i.d(t,"a",function(){return a}),t.b=s;var n=i(0),r=(i.n(n),this&&this.__extends||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 s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),l=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},a=function(e){function t(t,s){var r=e.call(this,s,t)||this;return r.getHelper=function(e){var t=r.getSortableElement(e.sender.target);if(!r.isValidTarget(t,r))return!1;var s;return r.helper?s=r.helper({sender:t,element:e.element}):(s=t.cloneNode(!0),s.style.width=t.offsetWidth+"px",s.style.height=t.offsetHeight+"px"),i.i(n.addClass)([s],["e-sortableclone"]),document.body.appendChild(s),s},r.onDrag=function(e){if(e.target){r.trigger("drag",{event:e.event,element:r.element,target:e.target});var t=r.getSortableInstance(e.target),s=r.getSortableElement(e.target,t);if(!(r.isValidTarget(s,t)||e.target.className.indexOf("e-list-group-item")>-1)||r.curTarget===s&&i.i(n.isNullOrUndefined)(t.placeHolder)||t.placeHolderElement&&t.placeHolderElement===e.target)r.curTarget!==r.target&&r.scope&&r.curTarget!==s&&!i.i(n.isNullOrUndefined)(t.placeHolder)&&(i.i(n.remove)(r.getSortableInstance(r.curTarget).placeHolderElement),r.curTarget=r.target);else{if(e.target.className.indexOf("e-list-group-item")>-1&&(s=e.target),r.curTarget=s,r.target===s)return;var l=r.getIndex(t.placeHolderElement,t),a=r.getPlaceHolder(s,t),o=void 0;if(a){l=i.i(n.isNullOrUndefined)(l)?r.getIndex(r.target):l,o=r.getIndex(s,t,e.event);var c=r.isPlaceHolderPresent(t);if(c&&l===o)return;c&&i.i(n.remove)(t.placeHolderElement),t.placeHolderElement=a,e.target.className.indexOf("e-list-group-item")>-1?t.element.insertBefore(t.placeHolderElement,t.element.children[o]):t.element!==r.element&&o===t.element.childElementCount?t.element.appendChild(t.placeHolderElement):t.element.insertBefore(t.placeHolderElement,t.element.children[o]),r.refreshDisabled(l,o,t)}else{l=i.i(n.isNullOrUndefined)(l)?r.getIndex(r.target):r.getIndex(s,t)<l||!l?l:l-1,o=r.getIndex(s,t);var h=t.element!==r.element?o:l<o?o+1:o;r.updateItemClass(t),t.element.insertBefore(r.target,t.element.children[h]),r.refreshDisabled(l,o,t),r.curTarget=r.target,r.trigger("drop",{droppedElement:r.target,element:t.element,previousIndex:l,currentIndex:o,target:e.target,helper:document.getElementsByClassName("e-sortableclone")[0],event:e.event,scope:r.scope})}}if(t=r.getSortableInstance(r.curTarget),i.i(n.isNullOrUndefined)(s)&&e.target!==t.placeHolderElement)r.isPlaceHolderPresent(t)&&r.removePlaceHolder(t);else{var d,u=[].slice.call(document.getElementsByClassName("e-sortable-placeholder"));u.forEach(function(e){d=r.getSortableInstance(e),d.element&&d!==t&&r.removePlaceHolder(d)})}}},r.onDragStart=function(e){r.target=r.getSortableElement(e.target);var t=!1;r.target.classList.add("e-grabbed"),r.curTarget=r.target,e.helper=document.getElementsByClassName("e-sortableclone")[0];var i={cancel:!1,element:r.element,target:r.target};r.trigger("beforeDragStart",i,function(i){i.cancel&&(t=i.cancel,r.onDragStop(e))}),t||(n.isBlazor?r.trigger("dragStart",{event:e.event,element:r.element,target:r.target,bindEvents:e.bindEvents,dragElement:e.dragElement}):r.trigger("dragStart",{event:e.event,element:r.element,target:r.target}))},r.onDragStop=function(e){var t,s,l,a=r.getSortableInstance(r.curTarget);t=r.getIndex(r.target);var o=r.isPlaceHolderPresent(a);if(o){var c=r.getIndex(a.placeHolderElement,a),h={previousIndex:t,currentIndex:c,target:e.target,droppedElement:r.target,helper:e.helper,cancel:!1,handled:!1};r.trigger("beforeDrop",h,function(s){if(!s.cancel){if(l=s.handled,r.updateItemClass(a),s.handled){var o=r.target.cloneNode(!0);r.target.classList.remove("e-grabbed"),r.target=o}a.element.insertBefore(r.target,a.placeHolderElement);var c=r.getIndex(r.target,a);t=r===a&&t-c>1?t-1:t,r.trigger("drop",{event:e.event,element:a.element,previousIndex:t,currentIndex:c,target:e.target,helper:e.helper,droppedElement:r.target,scopeName:r.scope,handled:l})}i.i(n.remove)(a.placeHolderElement)})}if(a=r.getSortableInstance(e.target),s=a.element.childElementCount,t=r.getIndex(r.target),a.element===e.target||!o&&r.curTarget===r.target){var d={previousIndex:t,currentIndex:r.curTarget===r.target?t:s,target:e.target,droppedElement:r.target,helper:e.helper,cancel:!1};r.trigger("beforeDrop",d,function(i){a.element!==e.target||i.cancel||(r.updateItemClass(a),a.element.appendChild(r.target),r.trigger("drop",{event:e.event,element:a.element,previousIndex:t,currentIndex:s,target:e.target,helper:e.helper,droppedElement:r.target,scopeName:r.scope}))})}r.target.classList.remove("e-grabbed"),r.target=null,r.curTarget=null,i.i(n.remove)(e.helper),i.i(n.getComponent)(r.element,n.Draggable).intDestroy(e.event)},r.bind(),r}r(t,e),a=t,t.prototype.bind=function(){this.element.id||(this.element.id=i.i(n.getUniqueID)("sortable")),this.itemClass||(this.itemClass="e-sort-item",this.dataBind()),this.initializeDraggable()},t.prototype.initializeDraggable=function(){new n.Draggable(this.element,{helper:this.getHelper,dragStart:this.onDragStart,drag:this.onDrag,dragStop:this.onDragStop,dragTarget:"."+this.itemClass,enableTapHold:!0,tapHoldThreshold:200,queryPositionInfo:this.queryPositionInfo,distance:5})},t.prototype.getPlaceHolder=function(e,t){if(t.placeHolder){var i=t.placeHolder({element:t.element,grabbedElement:this.target,target:e});return i.classList.add("e-sortable-placeholder"),i}return null},t.prototype.isValidTarget=function(e,t){return e&&i.i(n.compareElementParent)(e,t.element)&&e.classList.contains(t.itemClass)&&!e.classList.contains("e-disabled")},t.prototype.removePlaceHolder=function(e){i.i(n.remove)(e.placeHolderElement),e.placeHolderElement=null},t.prototype.updateItemClass=function(e){this!==e&&(this.target.classList.remove(this.itemClass),this.target.classList.add(e.itemClass))},t.prototype.getSortableInstance=function(e){if(e=i.i(n.closest)(e,".e-"+this.getModuleName())){var t=i.i(n.getComponent)(e,a);return t.scope&&this.scope&&t.scope===this.scope?t:this}return this},t.prototype.refreshDisabled=function(e,t,i){if(i===this)for(var s=void 0,n=e<t,r=void 0,l=n?e:t,a=n?t:e;l<=a;)s=this.element.children[l],s.classList.contains("e-disabled")?(r=this.getIndex(s),this.element.insertBefore(s,this.element.children[n?r+2:r-1]),l=n?r+2:r+1):l++},t.prototype.getIndex=function(e,t,s){void 0===t&&(t=this);var r,l;return[].slice.call(t.element.children).forEach(function(t,a){if(t.classList.contains("e-sortable-placeholder")&&(l=!0),t!==e);else if(r=a,!i.i(n.isNullOrUndefined)(s)){l&&(r-=1);var o=e.getBoundingClientRect(),c=o.bottom-(o.bottom-o.top)/2;r=s.clientY<=c?r:r+1}}),r},t.prototype.getSortableElement=function(e,t){return void 0===t&&(t=this),i.i(n.closest)(e,"."+t.itemClass)},t.prototype.queryPositionInfo=function(e){return e.left=pageXOffset?parseFloat(e.left)-pageXOffset+"px":e.left,e.top=pageYOffset?parseFloat(e.top)-pageYOffset+"px":e.top,e},t.prototype.isPlaceHolderPresent=function(e){return e.placeHolderElement&&!!i.i(n.closest)(e.placeHolderElement,"#"+e.element.id)},t.prototype.moveTo=function(e,t,i){s(this.element,e,t,i)},t.prototype.destroy=function(){"e-sort-item"===this.itemClass&&(this.itemClass=null,this.dataBind()),i.i(n.getComponent)(this.element,n.Draggable).destroy(),e.prototype.destroy.call(this)},t.prototype.getModuleName=function(){return"sortable"},t.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"itemClass":[].slice.call(this.element.children).forEach(function(i){i.classList.contains(t.itemClass)&&i.classList.remove(t.itemClass),e.itemClass&&i.classList.add(e.itemClass)})}}};var a;return l([i.i(n.Property)(!1)],t.prototype,"enableAnimation",void 0),l([i.i(n.Property)(null)],t.prototype,"itemClass",void 0),l([i.i(n.Property)(null)],t.prototype,"scope",void 0),l([i.i(n.Property)()],t.prototype,"helper",void 0),l([i.i(n.Property)()],t.prototype,"placeHolder",void 0),l([i.i(n.Event)()],t.prototype,"drag",void 0),l([i.i(n.Event)()],t.prototype,"beforeDragStart",void 0),l([i.i(n.Event)()],t.prototype,"dragStart",void 0),l([i.i(n.Event)()],t.prototype,"beforeDrop",void 0),l([i.i(n.Event)()],t.prototype,"drop",void 0),t=a=l([n.NotifyPropertyChanges],t)}(n.Base)},function(e,t){e.exports=i}])});
@@ -1,2 +1,11 @@
1
+ /*!
2
+ * filename: ej2-lists.umd.min.js
3
+ * version : 20.3.56
4
+ * Copyright Syncfusion Inc. 2001 - 2020. 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
+ */
1
10
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-buttons")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-data","@syncfusion/ej2-buttons"],t):t(e.ej={},e.ej2Base,e.ej2Data,e.ej2Buttons)}(this,function(e,t,i,s){"use strict";function n(e,i){var s={};if(t.isNullOrUndefined(e)||"string"==typeof e||"number"==typeof e||!t.isNullOrUndefined(e.isHeader))return e;for(var n=0,l=Object.keys(i);n<l.length;n++){var r=i[l[n]],a=t.isNullOrUndefined(r)||"string"!=typeof r?void 0:t.getValue(r,e);t.isNullOrUndefined(a)||(s[r]=a)}return s}function l(e){if(e)try{return document.querySelector(e)?t.compile(document.querySelector(e).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}}function r(e,i,s,n){var l=[];if(i||(i=e),s&&s.length?s.forEach(function(t){l.push(e.children[t])}):l=[].slice.call(e.children),t.isNullOrUndefined(n))l.forEach(function(e){i.appendChild(e)});else{var r=i.children[n];l.forEach(function(e){i.insertBefore(e,r)})}}e.cssClass={li:"e-list-item",ul:"e-list-parent e-ul",group:"e-list-group-item",icon:"e-list-icon",text:"e-list-text",check:"e-list-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-list-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-list-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"},function(s){function r(e,t,i,s,n){return w(e,a(e,t,i,s,n),null,s)}function a(i,s,n,l,r){var a=[],o=t.extend({},L,l);e.cssClass=y(o.moduleName);for(var c=v(),h=0;h<s.length;h++)if(!t.isNullOrUndefined(s[h])){var d=void 0;if(o.itemCreating&&"function"==typeof o.itemCreating){var u={dataSource:s,curData:s[h],text:s[h],options:o};o.itemCreating(u)}if(d=n?I(i,s[h],void 0,null,null,[],null,c,h,l):x(i,s[h],void 0,null,null,l,r),o.itemCreated&&"function"==typeof o.itemCreated){u={dataSource:s,curData:s[h],text:s[h],item:d,options:o};o.itemCreated(u)}a.push(d)}return a}function o(i,l,r,a,o,h){var d=t.extend({},L,r);e.cssClass=y(d.moduleName);var u,p=!h||"listview"!==h.getModuleName()&&"multiselect"!==h.getModuleName()?t.extend({},s.defaultMappedFields,d.fields):d.fields,g=t.extend({},S,d.ariaAttributes),b=[];a&&(g.level=a);var w,C,V=[];l&&l.length&&!t.isNullOrUndefined(m(l).item)&&!m(l).item.hasOwnProperty(p.id)&&(u=v());for(var E=0;E<l.length;E++){var O=n(l[E],p);if(!t.isNullOrUndefined(l[E])){if(d.itemCreating&&"function"==typeof d.itemCreating){var k={dataSource:l,curData:l[E],text:O[p.text],options:d,fields:p};d.itemCreating(k)}var D=l[E];d.itemCreating&&"function"==typeof d.itemCreating&&(O=n(l[E],p)),O.hasOwnProperty(p.id)&&!t.isNullOrUndefined(O[p.id])&&(u=O[p.id]);var H=[];if(d.showCheckBox&&(d.itemNavigable&&(O[p.url]||O[p.urlAttributes])?b.push(i("input",{className:e.cssClass.check,attrs:{type:"checkbox"}})):H.push(i("input",{className:e.cssClass.check,attrs:{type:"checkbox"}}))),!0===o)d.showIcon&&O.hasOwnProperty(p.iconCss)&&!t.isNullOrUndefined(O[p.iconCss])&&H.push(i("span",{className:e.cssClass.icon+" "+O[p.iconCss]})),C=(w=I(i,D,O,p,d.itemClass,H,!(!D.hasOwnProperty("isHeader")||!D.isHeader),u,E,r)).querySelector("."+e.cssClass.anchorWrap),d.itemNavigable&&b.length&&t.prepend(b,w.firstElementChild);else{if((w=x(i,D,O,p,d.itemClass,r,h)).classList.add(e.cssClass.level+"-"+g.level),w.setAttribute("aria-level",g.level.toString()),C=w.querySelector("."+e.cssClass.anchorWrap),O.hasOwnProperty(p.tooltip)&&w.setAttribute("title",O[p.tooltip]),O.hasOwnProperty(p.htmlAttributes)&&O[p.htmlAttributes]&&f(w,O[p.htmlAttributes]),O.hasOwnProperty(p.enabled)&&!1===O[p.enabled]&&w.classList.add(e.cssClass.disabled),O.hasOwnProperty(p.isVisible)&&!1===O[p.isVisible]&&(w.style.display="none"),O.hasOwnProperty(p.imageUrl)&&!t.isNullOrUndefined(O[p.imageUrl])&&!d.template){var N={src:O[p.imageUrl]};t.merge(N,O[p.imageAttributes]);var T=i("img",{className:e.cssClass.image,attrs:N});C?C.insertAdjacentElement("afterbegin",T):t.prepend([T],w.firstElementChild)}if(d.showIcon&&O.hasOwnProperty(p.iconCss)&&!t.isNullOrUndefined(O[p.iconCss])&&!d.template){var B=i("div",{className:e.cssClass.icon+" "+O[p.iconCss]});C?C.insertAdjacentElement("afterbegin",B):t.prepend([B],w.firstElementChild)}H.length&&t.prepend(H,w.firstElementChild),d.itemNavigable&&b.length&&t.prepend(b,w.firstElementChild),function(i,s,n,l,r,a,o){var h=s[n.child]||[],d=s[n.hasChildren];if(h.length&&(d=!0,a.classList.add(e.cssClass.hasChild),r.processSubChild)){var u=c(i,h,r,++o);a.appendChild(u)}if(r.expandCollapse&&d&&!r.template){a.firstElementChild.classList.add(e.cssClass.iconWrapper);var p="Left"===r.expandIconPosition?t.prepend:t.append;p([i("div",{className:"e-icons "+r.expandIconClass})],a.querySelector("."+e.cssClass.textContent))}}(i,O,p,0,d,w,g.level)}if(C&&t.addClass([w],[e.cssClass.navigable]),d.itemCreated&&"function"==typeof d.itemCreated){k={dataSource:l,curData:l[E],text:O[p.text],item:w,options:d,fields:p};d.itemCreated(k)}b=[],V.push(w)}}return V}function c(e,i,s,n,l,r){var a=t.extend({},L,s);return w(e,o(e,i,s,n,l,r),a.listClass,s)}function h(e,t){if(t&&e){return Array.prototype.slice.call(t).indexOf(e)}}function d(e,t,s){if(void 0===s&&(s=new i.Query),"Ascending"===e)s.sortBy(t,"ascending",!0);else if("Descending"===e)s.sortBy(t,"descending",!0);else for(var n=0;n<s.queries.length;n++)"onSortBy"===s.queries[n].fn&&s.queries.splice(n,1);return s}function u(e,t){return new i.DataManager(e).executeLocal(t)}function p(e,i){var n=t.extend({},L,i),l=t.extend({},s.defaultMappedFields,n.fields),r=e.cloneNode(!0),a=[];r.classList.add("json-parent");var o=r.querySelectorAll(".json-parent>li");r.classList.remove("json-parent");for(var c=0;c<o.length;c++){for(var h=o[c],d=h.querySelector("a"),u=h.querySelector("ul"),m={},f=d?d.childNodes:h.childNodes,I=Object.keys(f),y=0;y<f.length;y++)f[Number(I[y])].hasChildNodes()||(m[l.text]=f[Number(I[y])].textContent);var b=g(h);b.id?(m[l.id]=b.id,delete b.id):m[l.id]=v(),Object.keys(b).length&&(m[l.htmlAttributes]=b),d&&(b=g(d),Object.keys(b).length&&(m[l.urlAttributes]=b)),u&&(m[l.child]=p(u,i)),a.push(m)}return a}function m(e){for(var i={typeof:null,item:null},s=0;s<e.length;s++)if(!t.isNullOrUndefined(e[s]))return i={typeof:typeof e[s],item:e[s]};return i}function f(e,i){var s={};t.merge(s,i),s.class&&(t.addClass([e],s.class.split(" ")),delete s.class),t.attributes(e,s)}function g(e){for(var t={},i=e.attributes,s=0;s<i.length;s++)t[i[s].nodeName]=i[s].nodeValue;return t}function v(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function I(i,s,n,l,r,a,o,c,h,d){var u,p=t.extend({},L,d),m=t.extend({},S,p.ariaAttributes),g=s,v=s;"string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s&&(u=s,g="boolean"==typeof n[l.text]||"number"==typeof n[l.text]?n[l.text]:n[l.text]||"",v=n[l.value]);var I;I=t.isNullOrUndefined(u)||t.isNullOrUndefined(n[l.id])||""===n[l.id]?c+"-"+h:c;var y=i("li",{className:(!0===o?e.cssClass.group:e.cssClass.li)+" "+(t.isNullOrUndefined(r)?"":r),id:I,attrs:""!==m.groupItemRole&&""!==m.itemRole?{role:!0===o?m.groupItemRole:m.itemRole}:{}});return u&&n.hasOwnProperty(l.enabled)&&"false"===n[l.enabled].toString()&&y.classList.add(e.cssClass.disabled),o?y.innerText=g:(y.setAttribute("data-value",t.isNullOrUndefined(v)?"null":v),y.setAttribute("role","option"),u&&n.hasOwnProperty(l.htmlAttributes)&&n[l.htmlAttributes]&&f(y,n[l.htmlAttributes]),a.length&&!p.itemNavigable&&t.append(a,y),u&&(n[l.url]||n[l.urlAttributes]&&n[l.urlAttributes].href)?y.appendChild(b(i,u,l,g,a,p.itemNavigable)):(a.length&&p.itemNavigable&&t.append(a,y),y.appendChild(document.createTextNode(g)))),y}function y(e){return{li:"e-"+e+"-item",ul:"e-"+e+"-parent e-ul",group:"e-"+e+"-group-item",icon:"e-"+e+"-icon",text:"e-"+e+"-text",check:"e-"+e+"-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-"+e+"-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-"+e+"-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"}}function b(i,s,l,r,a,o){var c=n(s,l),h={href:c[l.url]};c.hasOwnProperty(l.urlAttributes)&&c[l.urlAttributes]&&(t.merge(h,c[l.urlAttributes]),h.href=c[l.url]?c[l.url]:c[l.urlAttributes].href);var d;if(o){d=i("a",{className:e.cssClass.text+" "+e.cssClass.url});var u=i("div",{className:e.cssClass.anchorWrap});a&&a.length&&t.append(a,u),u.appendChild(document.createTextNode(r)),t.append([u],d)}else d=i("a",{className:e.cssClass.text+" "+e.cssClass.url,innerHTML:r});return f(d,h),d}function x(i,s,n,r,a,o,c){var h,d,u,p=t.extend({},L,o),m=t.extend({},S,p.ariaAttributes),f=s;"string"!=typeof s&&"number"!=typeof s&&(u=s,f=n[r.text]||"",h=t.isNullOrUndefined(n._id)?n[r.id]:n._id,d=!(!s.hasOwnProperty("isHeader")||!s.isHeader)),o&&o.enableHtmlSanitizer&&(f=f);var g=i("li",{className:(!0===d?e.cssClass.group:e.cssClass.li)+" "+(t.isNullOrUndefined(a)?"":a),attrs:""!==m.groupItemRole&&""!==m.itemRole?{role:!0===d?m.groupItemRole:m.itemRole}:{}});if(!0==!t.isNullOrUndefined(h)?g.setAttribute("data-uid",h):g.setAttribute("data-uid",v()),d&&o&&o.groupTemplate){var I=l(o.groupTemplate);if(c&&"listview"!==c.getModuleName()){(y=I(s,c,"groupTemplate",p.groupTemplateID,!!p.isStringTemplate,null,g))&&t.append(y,g)}else t.append(I(s,c,"groupTemplate",p.groupTemplateID,!!p.isStringTemplate),g)}else if(!d&&o&&o.template){I=l(o.template);if(c&&"listview"!==c.getModuleName()){var y;(y=I(s,c,"template",p.templateID,!!p.isStringTemplate,null,g))&&t.append(y,g)}else t.append(I(s,c,"template",p.templateID,!!p.isStringTemplate),g)}else{var x=i("div",{className:e.cssClass.textContent,attrs:""!==m.wrapperRole?{role:m.wrapperRole}:{}});if(u&&(n[r.url]||n[r.urlAttributes]&&n[r.urlAttributes].href))x.appendChild(b(i,u,r,f,null,p.itemNavigable));else{var w=i("span",{className:e.cssClass.text,attrs:""!==m.itemText?{role:m.itemText}:{}});o&&o.enableHtmlSanitizer?w.innerText=f:w.innerHTML=f,x.appendChild(w)}g.appendChild(x)}return g}function w(i,s,n,l){var r=t.extend({},L,l),a=t.extend({},S,r.ariaAttributes);e.cssClass=y(r.moduleName);var o=i("ul",{className:e.cssClass.ul+" "+(t.isNullOrUndefined(n)?"":n),attrs:""!==a.listRole?{role:a.listRole}:{}});return t.append(s,o),o}s.defaultMappedFields={id:"id",text:"text",url:"url",value:"value",isChecked:"isChecked",enabled:"enabled",expanded:"expanded",selected:"selected",iconCss:"iconCss",child:"child",isVisible:"isVisible",hasChildren:"hasChildren",tooltip:"tooltip",htmlAttributes:"htmlAttributes",urlAttributes:"urlAttributes",imageAttributes:"imageAttributes",imageUrl:"imageUrl",groupBy:null,sortBy:null};var S={level:1,listRole:"presentation",itemRole:"presentation",groupItemRole:"group",itemText:"list-item",wrapperRole:"presentation"},L={showCheckBox:!1,showIcon:!1,enableHtmlSanitizer:!1,expandCollapse:!1,fields:s.defaultMappedFields,ariaAttributes:S,listClass:"",itemClass:"",processSubChild:!1,sortOrder:"None",template:null,groupTemplate:null,headerTemplate:null,expandIconClass:"e-icon-collapsible",moduleName:"list",expandIconPosition:"Right",itemNavigable:!1};s.createList=function(e,i,s,n,l){var a=t.extend({},L,s),o=t.extend({},S,a.ariaAttributes),h=m(i).typeof;return"string"===h||"number"===h?r(e,i,n,s,l):c(e,i,s,o.level,n,l)},s.createListFromArray=r,s.createListItemFromArray=a,s.createListItemFromJson=o,s.createListFromJson=c,s.getSiblingLI=function(i,s,n){if(e.cssClass=y(L.moduleName),i&&i.length){var l,r,a=Array.prototype.slice.call(i);for(l=a[(r=s?h(s,a):!0===n?a.length:-1)+(!0===n?-1:1)];l&&(!t.isVisible(l)||l.classList.contains(e.cssClass.disabled));)l=a[r+=!0===n?-1:1];return l}},s.indexOf=h,s.groupDataSource=function(e,n,l){void 0===l&&(l="None");var r=t.extend({},s.defaultMappedFields,n),a=(new i.Query).group(r.groupBy),o=u(e,a=d(l,"key",a));e=[];for(var c=0;c<o.length;c++){var h=o[c].items,p={};p[r.text]=o[c].key,p.isHeader=!0;var m=r.text;"id"===m&&(p[m="text"]=o[c].key),p._id="group-list-item-"+(o[c].key?o[c].key.toString().trim():"undefined"),p.items=h,e.push(p);for(var f=0;f<h.length;f++)e.push(h[f])}return e},s.addSorting=d,s.getDataSource=u,s.createJsonFromElement=p,s.renderContentTemplate=function(i,r,a,o,c,h){e.cssClass=y(L.moduleName);for(var d,u=i("ul",{className:e.cssClass.ul,attrs:{role:"presentation"}}),p=t.extend({},L,c),m=t.extend({},s.defaultMappedFields,o),f=l(r),g=[],I=v(),b=0;b<a.length;b++){var x=n(a[b],m),w=a[b],S=w.isHeader;if(d="string"==typeof a[b]||"number"==typeof a[b]?w:x[m.value],p.itemCreating&&"function"==typeof p.itemCreating){var C={dataSource:a,curData:w,text:d,options:p,fields:m};p.itemCreating(C)}p.itemCreating&&"function"==typeof p.itemCreating&&(x=n(a[b],m),d="string"==typeof a[b]||"number"==typeof a[b]?w:x[m.value]);var V=i("li",{id:I+"-"+b,className:S?e.cssClass.group:e.cssClass.li,attrs:{role:"presentation"}});if(S)"string"==typeof a[b]||"number"==typeof a[b]?V.innerText=w:V.innerText=x[m.text];else{var E=S?p.groupTemplateID:p.templateID;if(S)h&&"listview"!=h.getModuleName()?(O=f(w,h,"headerTemplate",E,!!p.isStringTemplate,null,V))&&t.append(O,V):t.append(f(w,h,"headerTemplate",E,!!p.isStringTemplate),V);else if(h&&"listview"!==h.getModuleName()){var O;(O=f(w,h,"template",E,!!p.isStringTemplate,null,V))&&t.append(O,V)}else t.append(f(w,h,"template",E,!!p.isStringTemplate),V);V.setAttribute("data-value",t.isNullOrUndefined(d)?"null":d),V.setAttribute("role","option")}p.itemCreated&&"function"==typeof p.itemCreated&&(C={dataSource:a,curData:w,text:d,item:V,options:p,fields:m},p.itemCreated(C)),g.push(V)}return t.append(g,u),u},s.renderGroupTemplate=function(e,i,n,r,a,o){for(var c=l(e),h=t.extend({},s.defaultMappedFields,n),d=t.extend({},L,a),u=h.groupBy,p=0,m=r;p<m.length;p++){var f=m[p],g={};if(g[u]=f.textContent,f.innerHTML="",o&&"listview"!==o.getModuleName()){var v=c(g,o,"groupTemplate",d.groupTemplateID,!!d.isStringTemplate,null,f);v&&t.append(v,f)}else t.append(c(g,o,"groupTemplate",d.groupTemplateID,!!d.isStringTemplate),f)}return r},s.generateId=v,s.generateUL=w,s.generateIcon=function(i,s,n,l){var r=t.extend({},L,l);return e.cssClass=y(r.moduleName),("Left"===r.expandIconPosition?t.prepend:t.append)([i("div",{className:"e-icons "+r.expandIconClass+" "+(t.isNullOrUndefined(n)?"":n)})],s.querySelector("."+e.cssClass.textContent)),s}}(e.ListBase||(e.ListBase={}));var a=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 s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),o=function(e,t,i,s){var n,l=arguments.length,r=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},c={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},h={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},d={root:"e-listview",hover:"e-hover",selected:"e-active",focused:"e-focused",parentItem:"e-list-parent",listItem:"e-list-item",listIcon:"e-list-icon",textContent:"e-text-content",listItemText:"e-list-text",groupListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-list-header",headerText:"e-headertext",headerTemplateText:"e-headertemplate-text",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back",backButton:"e-back-button",checkboxWrapper:"e-checkbox-wrapper",checkbox:"e-checkbox",checked:"e-check",checklist:"e-checklist",checkboxIcon:"e-frame",checkboxRight:"e-checkbox-right",checkboxLeft:"e-checkbox-left",listviewCheckbox:"e-listview-checkbox",itemCheckList:"e-checklist",virtualElementContainer:"e-list-virtualcontainer"},u="GroupTemplate",p=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return a(i,e),o([t.Property("id")],i.prototype,"id",void 0),o([t.Property("text")],i.prototype,"text",void 0),o([t.Property("isChecked")],i.prototype,"isChecked",void 0),o([t.Property("isVisible")],i.prototype,"isVisible",void 0),o([t.Property("enabled")],i.prototype,"enabled",void 0),o([t.Property("iconCss")],i.prototype,"iconCss",void 0),o([t.Property("child")],i.prototype,"child",void 0),o([t.Property("tooltip")],i.prototype,"tooltip",void 0),o([t.Property("groupBy")],i.prototype,"groupBy",void 0),o([t.Property("text")],i.prototype,"sortBy",void 0),o([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),o([t.Property("tableName")],i.prototype,"tableName",void 0),i}(t.ChildProperty),m=function(l){function r(e,t){var i=l.call(this,e,t)||this;return i.previousSelectedItems=[],i.hiddenItems=[],i.enabledItems=[],i.disabledItems=[],i}return a(r,l),r.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"htmlAttributes":this.setHTMLAttribute();break;case"cssClass":this.setCSSClass(i.cssClass);break;case"enable":this.setEnable();break;case"width":case"height":this.setSize();break;case"enableRtl":this.setEnableRTL();break;case"fields":this.listBaseOption.fields=this.fields.properties,this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"headerTitle":this.curDSLevel.length||this.header(this.headerTitle,!1,"header");break;case"query":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"showHeader":this.header(this.headerTitle,!1,"header");break;case"enableVirtualization":t.isNullOrUndefined(this.contentContainer)||t.detach(this.contentContainer),this.refresh();break;case"showCheckBox":case"checkBoxPosition":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.setCheckbox();break;case"dataSource":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"sortOrder":case"template":this.enableVirtualization||this.refresh();break;case"showIcon":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():(this.listBaseOption.showIcon=this.showIcon,this.curViewDS=this.getSubDS(),this.resetCurrentList())}}},r.prototype.setHTMLAttribute=function(){Object.keys(this.htmlAttributes).length&&t.attributes(this.element,this.htmlAttributes)},r.prototype.setCSSClass=function(e){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ").filter(function(e){return e})),e&&t.removeClass([this.element],e.split(" ").filter(function(e){return e}))},r.prototype.setSize=function(){this.element.style.height=t.formatUnit(this.height),this.element.style.width=t.formatUnit(this.width),this.isWindow=!this.element.clientHeight},r.prototype.setEnable=function(){this.enableElement(this.element,this.enable)},r.prototype.setEnableRTL=function(){this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},r.prototype.enableElement=function(e,t){t?e.classList.remove(d.disable):e.classList.add(d.disable)},r.prototype.header=function(e,i,s){if(void 0===this.headerEle&&this.showHeader){this.enableHtmlSanitizer&&this.setProperties({headerTitle:t.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.headerEle=this.createElement("div",{className:d.header});var n=this.createElement("span",{className:d.headerText,innerHTML:this.headerTitle}),l=this.createElement("div",{className:d.text,innerHTML:n.outerHTML}),r=this.createElement("div",{className:d.icon+" "+d.backIcon+" "+d.backButton,attrs:{style:"display:none;"}});if(this.headerEle.appendChild(r),this.headerEle.appendChild(l),this.headerTemplate){var a=t.compile(this.headerTemplate),o=this.createElement("div",{className:d.headerTemplateText}),c=a({},this,s,this.LISTVIEW_HEADERTEMPLATE_ID,null,null,this.headerEle);c&&t.append(c,o),t.append([o],this.headerEle),this.isReact&&this.renderReactTemplates()}this.headerTemplate&&this.headerTitle&&l.classList.add("header"),this.element.classList.add("e-has-header"),t.prepend([this.headerEle],this.element)}else if(this.headerEle)if(this.showHeader){this.headerEle.style.display="";l=this.headerEle.querySelector("."+d.headerText),r=this.headerEle.querySelector("."+d.backIcon);this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(e)),l.innerHTML=e,this.headerTemplate&&i&&(l.parentElement.classList.remove("header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.add("nested-header")),this.headerTemplate&&!i&&(l.parentElement.classList.add("header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.remove("nested-header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.add("header")),r.style.display=!0===i?"":"none"}else this.headerEle.style.display="none"},r.prototype.switchView=function(e,t,i){var s=this;if(e&&t){var n=e.style.position,l="hidden"!==this.element.style.overflow?this.element.style.overflow:"";e.style.position="absolute",e.classList.add("e-view");var r=void 0,a=this.animation.duration;if(this.animation.effect)r=this.enableRtl?h[this.animation.effect]:c[this.animation.effect];else{r=c.SlideLeft,i=this.enableRtl,a=0}this.element.style.overflow="hidden",this.aniObj.animate(e,{name:!0===i?r[0]:r[1],duration:a,timingFunction:this.animation.easing,end:function(t){e.style.display="none",s.element.style.overflow=l,e.style.position=n,e.classList.remove("e-view")}}),t.style.display="",this.aniObj.animate(t,{name:!0===i?r[2]:r[3],duration:a,timingFunction:this.animation.easing,end:function(){s.trigger("actionComplete")}}),this.curUL=t}},r.prototype.preRender=function(){if(this.template)try{document.querySelectorAll(this.template).length&&this.setProperties({template:document.querySelector(this.template).innerHTML.trim()},!0)}catch(e){t.compile(this.template)}this.listBaseOption={template:this.template,headerTemplate:this.headerTemplate,groupTemplate:this.groupTemplate,expandCollapse:!0,listClass:"",ariaAttributes:{itemRole:"option",listRole:"presentation",itemText:"",groupItemRole:"option",wrapperRole:"presentation"},fields:this.fields.properties,sortOrder:this.sortOrder,showIcon:this.showIcon,itemCreated:this.renderCheckbox.bind(this),templateID:this.element.id+"Template",groupTemplateID:""+this.element.id+u,enableHtmlSanitizer:this.enableHtmlSanitizer},this.initialization()},r.prototype.initialization=function(){this.curDSLevel=[],this.animateOptions={},this.curViewDS=[],this.currentLiElements=[],this.isNestedList=!1,this.selectedData=[],this.selectedId=[],this.LISTVIEW_TEMPLATE_ID=this.element.id+"Template",this.LISTVIEW_GROUPTEMPLATE_ID=""+this.element.id+u,this.LISTVIEW_HEADERTEMPLATE_ID=this.element.id+"HeaderTemplate",this.aniObj=new t.Animation(this.animateOptions),this.removeElement(this.curUL),this.removeElement(this.ulElement),this.removeElement(this.headerEle),this.removeElement(this.contentContainer),this.curUL=this.ulElement=this.liCollection=this.headerEle=this.contentContainer=void 0},r.prototype.renderCheckbox=function(e){if(e.item.classList.contains(d.hasChild)&&(this.isNestedList=!0),this.showCheckBox&&this.isValidLI(e.item)){var t=void 0;(t=s.createCheckBox(this.createElement,!1,{checked:!1,enableRtl:this.enableRtl,cssClass:d.listviewCheckbox})).setAttribute("role","checkbox");var i=t.querySelector("."+d.checkboxIcon);e.item.classList.add(d.itemCheckList),e.item.firstElementChild.classList.add(d.checkbox),"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?n(e.curData,this.listBaseOption.fields)[this.listBaseOption.fields.isChecked]&&this.checkInternally(e,t):"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]||-1===this.selectedData.indexOf(e.text)||this.checkInternally(e,t),t.setAttribute("aria-checked",i.classList.contains(d.checked)?"true":"false"),"Left"===this.checkBoxPosition?(t.classList.add(d.checkboxLeft),e.item.firstElementChild.classList.add(d.checkboxLeft),e.item.firstElementChild.insertBefore(t,e.item.firstElementChild.childNodes[0])):(t.classList.add(d.checkboxRight),e.item.firstElementChild.classList.add(d.checkboxRight),e.item.firstElementChild.appendChild(t)),this.currentLiElements.push(e.item),"Left"===this.checkBoxPosition?this.virtualCheckBox=e.item.firstElementChild.children[0]:this.virtualCheckBox=e.item.firstElementChild.lastElementChild}},r.prototype.checkInternally=function(e,t){e.item.classList.add(d.selected),e.item.setAttribute("aria-selected","true"),t.querySelector("."+d.checkboxIcon).classList.add(d.checked),t.setAttribute("aria-checked","true")},r.prototype.checkItem=function(e){this.toggleCheckBase(e,!0)},r.prototype.toggleCheckBase=function(e,i){if(this.showCheckBox){var s=e;if(e instanceof Object&&e.constructor!==HTMLLIElement&&(s=this.getLiFromObjOrElement(e)),!t.isNullOrUndefined(s)){var n=s.querySelector("."+d.checkboxIcon);!0===i?s.classList.add(d.selected):s.classList.remove(d.selected),s.setAttribute("aria-selected",i?"true":"false"),!0===i?n.classList.add(d.checked):n.classList.remove(d.checked),n.parentElement.setAttribute("aria-checked",i?"true":"false")}this.setSelectedItemData(s)}},r.prototype.uncheckItem=function(e){this.toggleCheckBase(e,!1)},r.prototype.checkAllItems=function(){this.toggleAllCheckBase(!0)},r.prototype.uncheckAllItems=function(){this.toggleAllCheckBase(!1)},r.prototype.toggleAllCheckBase=function(e){if(this.showCheckBox){for(var t=0;t<this.liCollection.length;t++){var i=this.liCollection[t].querySelector("."+d.checkboxIcon);i&&(e?i.classList.contains(d.checked)||this.checkItem(this.liCollection[t]):i.classList.contains(d.checked)&&this.uncheckItem(this.liCollection[t]))}this.enableVirtualization&&this.virtualizationModule.checkedItem(e)}},r.prototype.setCheckbox=function(){if(this.showCheckBox)for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+d.listItem)),t={item:void 0,curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:""},i=0;i<e.length;i++){var s=e[i];t.item=s,t.curData=this.getItemData(s),s.querySelector("."+d.checkboxWrapper)&&this.removeElement(s.querySelector("."+d.checkboxWrapper)),this.renderCheckbox(t),t.item.classList.contains(d.selected)&&this.checkInternally(t,t.item.querySelector("."+d.checkboxWrapper))}else{for(e=Array.prototype.slice.call(this.element.querySelectorAll("."+d.itemCheckList)),i=0;i<e.length;i++){(s=e[i]).classList.remove(d.selected),s.firstElementChild.classList.remove(d.checkbox),this.removeElement(s.querySelector("."+d.checkboxWrapper))}this.selectedItems&&this.selectedItems.item.classList.add(d.selected)}},r.prototype.refreshItemHeight=function(){this.virtualizationModule&&this.virtualizationModule.refreshItemHeight()},r.prototype.clickHandler=function(e){var i=e.target;this.targetElement=i;var s,n=i.classList;if(n.contains(d.backIcon)||n.contains(d.headerText))this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();else{var l=t.closest(i.parentNode,"."+d.listItem);if(null===l&&(l=i),this.removeFocus(),this.enable&&this.showCheckBox&&this.isValidLI(l))if(e.target.classList.contains(d.checkboxIcon)){if(l.classList.add(d.focused),t.isNullOrUndefined(l.querySelector("."+d.checked))){var r={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:l};this.checkInternally(r,r.item.querySelector("."+d.checkboxWrapper))}else this.uncheckItem(l),l.classList.add(d.focused);if(this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(l,e),e){var a=this.selectEventData(l,e),o=l.querySelector("."+d.checkboxIcon);t.merge(a,{isChecked:o.classList.contains(d.checked)}),this.trigger("select",a)}}else l.classList.contains(d.hasChild)?(this.removeHover(),this.removeSelect(),this.removeSelect(l),this.setSelectLI(l,e),l.classList.remove(d.selected)):(this.setCheckboxLI(l,e),"INPUT"!=i.nodeName&&"TEXTAREA"!=i.nodeName||(i.classList.add("e-focused"),this.targetElement=i));else this.setSelectLI(l,e),"INPUT"!=i.nodeName&&"TEXTAREA"!=i.nodeName||(i.classList.add("e-focused"),this.targetElement=i);s=t.closest(e.target,"li"),t.isNullOrUndefined(s)||s.classList.contains("e-has-child")&&!e.target.parentElement.classList.contains("e-listview-checkbox")&&s.classList.add(d.disable)}},r.prototype.removeElement=function(e){return e&&e.parentNode&&e.parentNode.removeChild(e)},r.prototype.hoverHandler=function(e){var i=t.closest(e.target.parentNode,"."+d.listItem);this.setHoverLI(i)},r.prototype.leaveHandler=function(e){this.removeHover()},r.prototype.homeKeyHandler=function(e,t){if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){this.selectedItems&&this.selectedItems.item.setAttribute("aria-selected","false");var i=this.curUL.querySelectorAll("."+d.listItem),s=this.curUL.querySelector("."+d.focused)||this.curUL.querySelector("."+d.selected);s&&(s.classList.remove(d.focused),this.showCheckBox||s.classList.remove(d.selected));var n=t?i.length-1:0;i[n].classList.contains(d.hasChild)||this.showCheckBox?i[n].classList.add(d.focused):this.setSelectLI(i[n],e),i[n]?this.element.setAttribute("aria-activedescendant",i[n].id.toString()):this.element.removeAttribute("aria-activedescendant")}},r.prototype.onArrowKeyDown=function(i,s){var n,l;return!t.isNullOrUndefined(this.curUL.querySelector("."+d.hasChild))||this.showCheckBox?(l=this.curUL.querySelector("."+d.focused)||this.curUL.querySelector("."+d.selected),n=e.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+d.listItem),l,s),t.isNullOrUndefined(n)||(l&&(l.classList.remove(d.focused),this.showCheckBox||l.classList.remove(d.selected)),n.classList.contains(d.hasChild)||this.showCheckBox?n.classList.add(d.focused):this.setSelectLI(n,i))):(l=this.curUL.querySelector("."+d.selected),n=e.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+d.listItem),l,s),this.setSelectLI(n,i)),n?this.element.setAttribute("aria-activedescendant",n.id.toString()):this.element.removeAttribute("aria-activedescendant"),n},r.prototype.arrowKeyHandler=function(e,t){var i=this;if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){var s=this.onArrowKeyDown(e,t),n=this.element.getBoundingClientRect().top,l=this.element.getBoundingClientRect().height,r=this.curUL.querySelector("."+d.listItem).getBoundingClientRect(),a=void 0,o=void 0;if(this.fields.groupBy&&(o=this.curUL.querySelector("."+d.groupListItem).getBoundingClientRect()),s){var c=s.getBoundingClientRect().top,h=s.getBoundingClientRect().height;if(t)(a=this.isWindow?c:c-n)<0&&(!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop+a);else{var u=this.isWindow?window.innerHeight:l;(a=this.isWindow?c+h:c-n+h)>u&&(!0===this.isWindow?window.scroll(0,pageYOffset+(a-u)):this.element.scrollTop=this.element.scrollTop+(a-u))}}else if(this.enableVirtualization&&t&&this.virtualizationModule.uiFirstIndex)this.onUIScrolled=function(){i.onArrowKeyDown(e,t),i.onUIScrolled=void 0},a=this.virtualizationModule.listItemHeight,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=this.element.scrollTop-a;else if(t)if(this.showHeader&&this.headerEle){var p=o?o.top:r.top,m=this.headerEle.getBoundingClientRect();a=m.top<0?m.height-p:0,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=0}else this.fields.groupBy&&(a=this.isWindow?o.top<0?o.top:0:n-r.top+o.height,!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop-a)}},r.prototype.enterKeyHandler=function(e){if(Object.keys(this.dataSource).length&&this.curUL){var i=!t.isNullOrUndefined(this.curUL.querySelector("."+d.hasChild)),s=this.curUL.querySelector("."+d.focused);i&&s&&(s.classList.remove(d.focused),this.showCheckBox&&(this.removeSelect(),this.removeSelect(s),this.removeHover()),this.setSelectLI(s,e))}},r.prototype.spaceKeyHandler=function(e){if(e.preventDefault(),this.enable&&this.showCheckBox&&Object.keys(this.dataSource).length&&this.curUL){var i=this.curUL.querySelector("."+d.focused),s=void 0,n=void 0;if(!t.isNullOrUndefined(i)&&t.isNullOrUndefined(i.querySelector("."+d.checked))){var l={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:i};s=l.item.querySelector("."+d.checkboxWrapper),this.checkInternally(l,s),n=s.querySelector("."+d.checkboxIcon+"."+d.icon)}else this.uncheckItem(i);var r=this.selectEventData(i,e);t.merge(r,{isChecked:!!n&&n.classList.contains(d.checked)}),this.trigger("select",r)}},r.prototype.keyActionHandler=function(e){switch(e.keyCode){case 36:this.homeKeyHandler(e);break;case 35:this.homeKeyHandler(e,!0);break;case 40:this.arrowKeyHandler(e);break;case 38:this.arrowKeyHandler(e,!0);break;case 13:this.enterKeyHandler(e);break;case 8:this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();break;case 32:!t.isNullOrUndefined(this.targetElement)&&this.targetElement.classList.contains("e-focused")||this.spaceKeyHandler(e)}},r.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&e.velocity>.5&&"touchend"===e.originalEvent.type&&(this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back())},r.prototype.focusout=function(){if(Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+d.focused),t=this.curUL.querySelector("[aria-selected = true]");e&&(e.classList.remove(d.focused),t&&!this.showCheckBox&&t.classList.add(d.selected))}},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,"keydown",this.keyActionHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),t.EventHandler.add(this.element,"focusout",this.focusout,this),this.touchModule=new t.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.touchModule.destroy()},r.prototype.removeFocus=function(){for(var e=0,t=this.element.querySelectorAll("."+d.focused);e<t.length;e++){t[e].classList.remove(d.focused)}},r.prototype.removeHover=function(){var e=this.element.querySelector("."+d.hover);e&&e.classList.remove(d.hover)},r.prototype.removeSelect=function(e){if(t.isNullOrUndefined(e))for(var i=0,s=this.element.querySelectorAll("."+d.selected);i<s.length;i++){var n=s[i];this.showCheckBox&&n.querySelector("."+d.checked)||(n.setAttribute("aria-selected","false"),n.classList.remove(d.selected))}else e.classList.remove(d.selected),e.setAttribute("aria-selected","false")},r.prototype.isValidLI=function(e){return e&&e.classList.contains(d.listItem)&&!e.classList.contains(d.groupListItem)&&!e.classList.contains(d.disable)},r.prototype.setCheckboxLI=function(e,i){if(this.isValidLI(e)&&this.enable&&this.showCheckBox){this.curUL.querySelector("."+d.focused)&&this.curUL.querySelector("."+d.focused).classList.remove(d.focused);var s=e.querySelector("textarea")||e.querySelector("input");e.classList.add(d.focused),t.isNullOrUndefined(i)||i.target===s&&s.classList.add("e-focused");var n=e.querySelector("."+d.checkboxWrapper),l=n.querySelector("."+d.checkboxIcon+"."+d.icon);this.removeHover(),l.classList.contains(d.checked)?(l.classList.remove(d.checked),e.classList.remove(d.selected),e.setAttribute("aria-selected","false")):(l.classList.add(d.checked),e.classList.add(d.selected),e.setAttribute("aria-selected","true")),n.setAttribute("aria-checked",l.classList.contains(d.checked)?"true":"false");var r=this.selectEventData(e,i);t.merge(r,{isChecked:l.classList.contains(d.checked)}),this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(e,i),this.trigger("select",r),this.setSelectedItemData(e),this.renderSubList(e)}},r.prototype.selectEventData=function(e,i){var s,l=this.getItemData(e),r=n(l,this.listBaseOption.fields);s=!t.isNullOrUndefined(l)&&"string"==typeof this.dataSource[0]||"number"==typeof this.dataSource[0]?{item:e,text:e&&e.innerText.trim(),data:this.dataSource}:{item:e,text:r&&r[this.listBaseOption.fields.text],data:l};var a={};return t.merge(a,s),i&&t.merge(a,{isInteracted:!0,event:i,cancel:!1,index:this.curUL&&Array.prototype.indexOf.call(this.curUL.children,e)}),a},r.prototype.setSelectedItemData=function(e){var i=this.getItemData(e),s=n(i,this.listBaseOption.fields);t.isNullOrUndefined(i)||"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?this.selectedItems={item:e,text:s&&s[this.listBaseOption.fields.text],data:i}:this.selectedItems={item:e,text:e&&e.innerText.trim(),data:this.dataSource}},r.prototype.setSelectLI=function(e,t){var i=this;if(this.isValidLI(e)&&!e.classList.contains(d.selected)&&this.enable){this.showCheckBox||this.removeSelect(),e.classList.add(d.selected),e.setAttribute("aria-selected","true"),this.removeHover(),this.setSelectedItemData(e),this.enableVirtualization&&this.virtualizationModule.setSelectLI(e,t);var s=this.selectEventData(e,t);this.trigger("select",s,function(t){t.cancel||(i.selectedLI=e,i.renderSubList(e))})}},r.prototype.setHoverLI=function(e){if(this.isValidLI(e)&&!e.classList.contains(d.hover)&&this.enable){var i=this.element.querySelectorAll("."+d.hover);i&&i.length&&t.removeClass(i,d.hover),e.classList.contains(d.selected)&&!this.showCheckBox||e.classList.add(d.hover)}},r.prototype.getSubDS=function(){var e=this.curDSLevel;if(e.length){for(var t=this.localData,i=0,s=e;i<s.length;i++){var l=s[i],r={};r[this.fields.id]=l,this.curDSJSON=this.findItemFromDS(t,r);var a=n(this.curDSJSON,this.listBaseOption.fields);t=this.curDSJSON?a[this.fields.child]:t}return t}return this.localData},r.prototype.getItemData=function(e){var s,n=this.dataSource instanceof i.DataManager?this.localData:this.dataSource,l=this.getElementUID(e);return s=t.isNullOrUndefined(this.element.querySelector("."+d.hasChild))&&this.fields.groupBy?this.curViewDS:n,this.findItemFromDS(s,l)},r.prototype.findItemFromDS=function(e,i,s){var l,r=this;return e&&e.length&&i?e.some(function(a){var o=n(a,r.listBaseOption.fields);if(!i[r.fields.id]&&!i[r.fields.text]||i[r.fields.id]&&(!t.isNullOrUndefined(o[r.fields.id])&&o[r.fields.id].toString())!==i[r.fields.id].toString()||i[r.fields.text]&&o[r.fields.text]!==i[r.fields.text])if("object"!=typeof a&&-1!==e.indexOf(a))l=s?e:a;else if(!t.isNullOrUndefined(i[r.fields.id])&&t.isNullOrUndefined(o[r.fields.id])){var c=r.element.querySelector('[data-uid="'+i[r.fields.id]+'"]');c&&c.innerText.trim()===o[r.fields.text]&&(l=a)}else o.hasOwnProperty(r.fields.child)&&o[r.fields.child].length&&(l=r.findItemFromDS(o[r.fields.child],i,s));else l=s?e:a;return!!l}):l=e,l},r.prototype.getQuery=function(){var t=[],s=this.query?this.query:new i.Query;if(!this.query){for(var n=0,l=Object.keys(this.fields.properties);n<l.length;n++){var r=l[n];"tableName"!==r&&this.fields[r]&&this.fields[r]!==e.ListBase.defaultMappedFields[r]&&-1===t.indexOf(this.fields[r])&&t.push(this.fields[r])}s.select(t),this.fields.properties.hasOwnProperty("tableName")&&s.from(this.fields.tableName)}return s},r.prototype.setViewDataSource=function(i){void 0===i&&(i=this.localData);var s=t.isNullOrUndefined(this.fields.sortBy)?this.fields.text:this.fields.sortBy,n=e.ListBase.addSorting(this.sortOrder,s);i&&this.fields.groupBy?"None"!==this.sortOrder?this.curViewDS=e.ListBase.groupDataSource(e.ListBase.getDataSource(i,n),this.listBaseOption.fields,this.sortOrder):this.curViewDS=e.ListBase.groupDataSource(i,this.listBaseOption.fields,this.sortOrder):i&&"None"!==this.sortOrder?this.curViewDS=e.ListBase.getDataSource(i,n):this.curViewDS=i},r.prototype.isInAnimation=function(){return this.curUL.classList.contains(".e-animate")},r.prototype.renderRemoteLists=function(e,t){this.isDestroyed||(this.localData=e.result,t.removeElement(t.contentContainer),this.renderList(),this.trigger("actionComplete",e))},r.prototype.triggerActionFailure=function(e){this.isDestroyed||this.trigger("actionFailure",e)},r.prototype.setLocalData=function(){var s=this;this.trigger("actionBegin");var n=this;if(this.dataSource instanceof i.DataManager)this.dataSource.ready?this.dataSource.ready.then(function(e){s.isOffline=s.dataSource.dataSource.offline,s.dataSource instanceof i.DataManager&&s.isOffline&&s.renderRemoteLists(e,n)}).catch(function(e){s.triggerActionFailure(e)}):this.dataSource.executeQuery(this.getQuery()).then(function(e){s.renderRemoteLists(e,n)}).catch(function(e){s.triggerActionFailure(e)});else if(this.dataSource&&this.dataSource.length)this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData});else{var l=this.element.querySelector("ul");l&&(t.remove(l),this.setProperties({dataSource:e.ListBase.createJsonFromElement(l)},!0),this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData}))}},r.prototype.reRender=function(){this.removeElement(this.headerEle),this.removeElement(this.ulElement),this.removeElement(this.contentContainer),this.isReact&&this.clearTemplate(),-1===Object.keys(window).indexOf("ejsInterop")&&(this.element.innerHTML=""),this.headerEle=this.ulElement=this.liCollection=void 0,this.header(),this.setLocalData()},r.prototype.resetCurrentList=function(){this.setViewDataSource(this.curViewDS),this.contentContainer.innerHTML="",this.createList(),this.renderIntoDom(this.curUL)},r.prototype.setAttributes=function(e){for(var t=0;t<e.length;t++){var i=e[t];i.classList.contains("e-list-item")&&(i.setAttribute("id",this.element.id+"_"+i.getAttribute("data-uid")),i.setAttribute("aria-selected","false"),i.setAttribute("tabindex","-1"))}},r.prototype.createList=function(){this.currentLiElements=[],this.isNestedList=!1,this.ulElement=this.curUL=e.ListBase.createList(this.createElement,this.curViewDS,this.listBaseOption,null,this),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.setAttributes(this.liCollection)},r.prototype.exceptionEvent=function(e){this.trigger("actionFailure",e)},r.prototype.UpdateCurrentUL=function(){this.ulElement=this.curUL=this.element.querySelector("."+d.parentItem),this.curUL&&(this.liCollection=this.curUL.querySelectorAll("."+d.listItem))},r.prototype.renderSubList=function(i){this.liElement=i;var s=i.getAttribute("data-uid");if(i.classList.contains(d.hasChild)&&s){var l=t.closest(i.parentNode,"."+d.parentItem),r=this.element.querySelector("[pid='"+s+"']");if(this.curDSLevel.push(s),this.setViewDataSource(this.getSubDS()),!r){var a=this.curViewDS;r=e.ListBase.createListFromJson(this.createElement,a,this.listBaseOption,this.curDSLevel.length,null,this),this.isReact&&this.renderReactTemplates();var o=r.querySelectorAll("."+d.listItem);this.setAttributes(o),r.setAttribute("pID",s),r.style.display="none",this.renderIntoDom(r)}if(this.switchView(l,r),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.selectedItems){var c=n(this.selectedItems.data,this.listBaseOption.fields);this.header(c[this.listBaseOption.fields.text],!0,"header")}this.selectedLI=void 0}},r.prototype.renderIntoDom=function(e){this.contentContainer.appendChild(e)},r.prototype.renderList=function(e){this.setViewDataSource(e),this.enableVirtualization?(Object.keys(this.dataSource).length&&(!this.template&&!this.groupTemplate||this.virtualizationModule.isNgTemplate()||(this.isReact?("string"==typeof this.template&&(this.listBaseOption.template=null),"string"==typeof this.groupTemplate&&(this.listBaseOption.groupTemplate=null)):(this.listBaseOption.template=null,this.listBaseOption.groupTemplate=null),this.listBaseOption.itemCreated=this.virtualizationModule.createUIItem.bind(this.virtualizationModule))),this.virtualizationModule.uiVirtualization()):(this.createList(),this.contentContainer=this.createElement("div",{className:d.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement),this.isReact&&this.renderReactTemplates())},r.prototype.getElementUID=function(e){var t={};return e instanceof Element?t[this.fields.id]=e.getAttribute("data-uid"):t=e,t},r.prototype.render=function(){this.element.classList.add(d.root),t.attributes(this.element,{role:"list",tabindex:"0"}),this.setCSSClass(),this.setEnableRTL(),this.setEnable(),this.setSize(),this.wireEvents(),this.header(),this.setLocalData(),this.setHTMLAttribute(),this.rippleFn=t.rippleEffect(this.element,{selector:"."+d.listItem}),this.renderComplete()},r.prototype.destroy=function(){this.isReact&&this.clearTemplate(),this.unWireEvents();var e=[d.root,d.disable,"e-rtl","e-has-header","e-lib"].concat(this.cssClass.split(" ").filter(function(e){return e}));t.removeClass([this.element],e),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex"),this.curUL=this.ulElement=this.liCollection=this.headerEle=void 0,this.element.innerHTML="",l.prototype.destroy.call(this)},r.prototype.back=function(){var e=this.curDSLevel[this.curDSLevel.length-1];if(void 0!==e&&!this.isInAnimation()){this.curDSLevel.pop(),this.setViewDataSource(this.getSubDS());var i=this.element.querySelector("[data-uid='"+e+"']"),s=this.curUL;i?i=i.parentElement:(this.createList(),this.renderIntoDom(this.ulElement),i=this.curUL);var l=n(this.curDSJSON,this.listBaseOption.fields)[this.fields.text];this.switchView(s,i,!0),this.removeFocus();var r=this.element.querySelector("[data-uid='"+e+"']");r.classList.remove(d.disable),r.classList.add(d.focused),this.showCheckBox&&r.querySelector("."+d.checkboxIcon).classList.contains(d.checked)?r.setAttribute("aria-selected","true"):(r.classList.remove(d.selected),r.setAttribute("aria-selected","false")),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.enableHtmlSanitizer&&this.setProperties({headerTitle:t.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.header(this.curDSLevel.length?l:this.headerTitle,!!this.curDSLevel.length,"header")}},r.prototype.selectItem=function(e){this.enableVirtualization?this.virtualizationModule.selectItem(e):this.showCheckBox?this.setCheckboxLI(this.getLiFromObjOrElement(e)):!0===t.isNullOrUndefined(e)?this.removeSelect():this.setSelectLI(this.getLiFromObjOrElement(e))},r.prototype.getLiFromObjOrElement=function(e){var s,l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(!t.isNullOrUndefined(e))if("string"==typeof l[0]||"number"==typeof l[0])if(e instanceof Element){for(var r=e.getAttribute("data-uid").toString(),a=0;a<this.liCollection.length;a++)if(this.liCollection[a].getAttribute("data-uid").toString()===r){s=this.liCollection[a];break}}else Array.prototype.some.call(this.curUL.querySelectorAll("."+d.listItem),function(t){return t.innerText.trim()===e.toString()&&(s=t,!0)});else{var o=this.getItemData(e),c=n(o,this.listBaseOption.fields);if(o&&(s=this.element.querySelector('[data-uid="'+c[this.fields.id]+'"]'),!this.enableVirtualization&&t.isNullOrUndefined(s))){var h=this.element.querySelectorAll("."+d.listItem);for(a=0;a<h.length;a++)h[a].innerText.trim()===c[this.fields.text]&&(s=h[a])}}return s},r.prototype.selectMultipleItems=function(e){if(!t.isNullOrUndefined(e))for(var i=0;i<e.length;i++)t.isNullOrUndefined(e[i])||this.selectItem(e[i])},r.prototype.getParentId=function(){var e=[];if(this.isNestedList)for(var t=this.curDSLevel.length-1;t>=0;t--)e.push(this.curDSLevel[t]);return e},r.prototype.getSelectedItems=function(){var e,s=!1;this.selectedId=[];var l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(this.enableVirtualization&&!s)e=this.virtualizationModule.getSelectedItems(),s=!0;else if(this.showCheckBox&&!s){var r=this.curUL.getElementsByClassName(d.selected),a=[],o=[];this.selectedId=[];for(var c=[],h=0;h<r.length;h++)if("string"==typeof l[0]||"number"==typeof l[0])a.push(r[h].innerText.trim());else{var u=this.getItemData(r[h]),p=n(u,this.listBaseOption.fields);this.isNestedList?c.push({data:u,parentId:this.getParentId()}):o.push(u),p?(a.push(p[this.listBaseOption.fields.text]),this.selectedId.push(p[this.listBaseOption.fields.id])):(a.push(void 0),this.selectedId.push(void 0))}"string"!=typeof l[0]&&"number"!=typeof l[0]||s||(e={item:r,data:l,text:a},s=!0),this.isNestedList&&!s?(e={item:r,data:c,text:a},s=!0):s||(e={item:r,data:o,text:a},s=!0)}else if(!s){var m=this.element.getElementsByClassName(d.selected)[0];p=n(this.getItemData(m),this.listBaseOption.fields);"string"!=typeof l[0]&&"number"!=typeof l[0]||s?s||(t.isNullOrUndefined(p)||t.isNullOrUndefined(m)?(e=void 0,s=!0):(this.selectedId.push(p[this.listBaseOption.fields.id]),e={text:p[this.listBaseOption.fields.text],item:m,data:this.getItemData(m)},s=!0)):(e=t.isNullOrUndefined(m)?void 0:{item:m,data:l,text:m.innerText.trim()},s=!0)}return e},r.prototype.findItem=function(e){return this.getItemData(e)},r.prototype.enableItem=function(e){this.setItemState(e,!0),this.enableVirtualization&&this.virtualizationModule.enableItem(e)},r.prototype.disableItem=function(e){this.setItemState(e,!1),this.enableVirtualization&&this.virtualizationModule.disableItem(e)},r.prototype.setItemState=function(e,t){var i=this.getItemData(e),s=n(i,this.listBaseOption.fields);if(i){var l=this.element.querySelector('[data-uid="'+s[this.fields.id]+'"]');t?(l&&l.classList.remove(d.disable),delete i[this.fields.enabled]):t||(l&&l.classList.add(d.disable),i[this.fields.enabled]=!1)}},r.prototype.showItem=function(e){this.showHideItem(e,!1,""),this.enableVirtualization&&this.virtualizationModule.showItem(e)},r.prototype.hideItem=function(e){this.showHideItem(e,!0,"none"),this.enableVirtualization&&this.virtualizationModule.hideItem(e)},r.prototype.showHideItem=function(e,t,i){var s=this.getItemData(e),l=n(s,this.listBaseOption.fields);if(s){var r=this.element.querySelector('[data-uid="'+l[this.fields.id]+'"]');r&&(r.style.display=i),t?s[this.fields.isVisible]=!1:delete s[this.fields.isVisible]}},r.prototype.addItem=function(e,t){void 0===t&&(t=void 0);var s=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;this.addItemInternally(e,t,s)},r.prototype.addItemInternally=function(e,t,i){if(e instanceof Array)if(this.enableVirtualization)this.virtualizationModule.addItem(e,t,i);else{var s=this.findItemFromDS(i,t),l=void 0;if(s){(l=n(s,this.listBaseOption.fields)[this.fields.child])||(l=[]),l=l.concat(e)}if(s instanceof Array){for(var r=0;r<e.length;r++){i.push(e[r]),this.setViewDataSource(i);var a=this.contentContainer?this.contentContainer.children[0]:null;this.contentContainer&&a?this.addItemIntoDom(e[r],a,this.curViewDS):this.reRender()}this.liCollection=this.curUL.querySelectorAll("."+d.listItem)}else s&&(s[this.fields.child]=l,this.addItemInNestedList(s,e))}},r.prototype.addItemInNestedList=function(i,s){var n=i[this.fields.id],l=i[this.fields.child],r=this.element.querySelector("[pid='"+n+"']"),a=this.element.querySelector("[data-uid='"+n+"']"),o=r||(a?t.closest(a,"ul"):null),c=r?l:[i];if(!!a&&!a.classList.contains(d.hasChild)){var h=e.ListBase.createListItemFromJson(this.createElement,c,this.listBaseOption,null,null,this);this.setAttributes(h),o.insertBefore(h[0],a),t.detach(a)}if(r&&s)for(var u=0;u<s.length;u++)c.push(s[u]),this.addItemIntoDom(s[u],o,c)},r.prototype.addItemIntoDom=function(e,t,i){var s=i.indexOf(e);this.addListItem(e,s,t,i);var n=i[s-1];n&&n.isHeader&&1===n.items.length&&this.addListItem(n,s-1,t,i)},r.prototype.addListItem=function(t,i,s,n){var l=this.getLiFromObjOrElement(n[i+1])||this.getLiFromObjOrElement(n[i+2])||null,r=e.ListBase.createListItemFromJson(this.createElement,[t],this.listBaseOption,null,null,this);if(this.setAttributes(r),this.template&&this.isReact&&this.renderReactTemplates(),this.fields.groupBy&&n[i+1]&&n[i+1].isHeader){var a=this.getLiFromObjOrElement(n[i-1]);a&&(l=a.nextElementSibling)}s.insertBefore(r[0],l)},r.prototype.removeItem=function(e){var t=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;this.enableVirtualization?this.virtualizationModule.removeItem(e):this.removeItemFromList(e,t)},r.prototype.removeItemFromList=function(i,s){var n,l=this,r=this.curViewDS,a=i instanceof Element?this.getElementUID(i):i;if(n=this.findItemFromDS(s,a,!0)){var o;o=this.findItemFromDS(n,a);var c=r.indexOf(o),h=this.getLiFromObjOrElement(i),u=void 0;this.validateNestedView(h),this.fields.groupBy&&this.curViewDS[c-1]&&r[c-1].isHeader&&1===r[c-1].items.length&&h&&h.previousElementSibling.classList.contains(d.groupListItem)&&(t.isNullOrUndefined(h.nextElementSibling)||h.nextElementSibling&&h.nextElementSibling.classList.contains(d.groupListItem))&&(u=h.previousElementSibling),h&&t.detach(h),u&&t.detach(u);var p=n.length-1<=0?this.findParent(this.localData,this.fields.id,function(e){return e===o[l.fields.id]},null):null,m=n.indexOf(o);if(n.splice(m,1),this.setViewDataSource(s),p&&p.parent&&Array.isArray(p.parent[this.fields.child])&&p.parent[this.fields.child].length<=0){var f=this.getLiFromObjOrElement(p.parent);if(f){var g=e.ListBase.createListItemFromJson(this.createElement,[p.parent],this.listBaseOption,null,null,this);this.setAttributes(g),f.parentElement.insertBefore(g[0],f),f.parentElement.removeChild(f)}}n.length<=0&&this.back(),this.liCollection=Array.prototype.slice.call(this.element.querySelectorAll("."+d.listItem))}},r.prototype.validateNestedView=function(e){var t=e?e.getAttribute("data-uid").toString().toLowerCase():null;if(t&&this.curDSLevel&&this.curDSLevel.length>0)for(;this.curDSLevel.some(function(e){return e.toString().toLowerCase()===t});)this.back()},r.prototype.removeMultipleItems=function(e){if(e.length)for(var t=0;t<e.length;t++)this.removeItem(e[t])},r.prototype.findParent=function(e,i,s,n){if(e.hasOwnProperty(i)&&!0===s(e[i]))return t.extend({},e);for(var l=0;l<Object.keys(e).length;l++)if(e[Object.keys(e)[l]]&&"object"==typeof e[Object.keys(e)[l]]){var r=this.findParent(e[Object.keys(e)[l]],i,s,e);if(null!=r)return r.parent||(r.parent=n),r}return null},r.prototype.getModuleName=function(){return"listview"},r.prototype.requiredModules=function(){var e=[];return this.enableVirtualization&&e.push({args:[this],member:"virtualization"}),e},r.prototype.getPersistData=function(){return this.addOnPersist(["cssClass","enableRtl","htmlAttributes","enable","fields","animation","headerTitle","sortOrder","showIcon","height","width","showCheckBox","checkBoxPosition"])},o([t.Property("")],r.prototype,"cssClass",void 0),o([t.Property(!1)],r.prototype,"enableVirtualization",void 0),o([t.Property({})],r.prototype,"htmlAttributes",void 0),o([t.Property(!0)],r.prototype,"enable",void 0),o([t.Property([])],r.prototype,"dataSource",void 0),o([t.Property()],r.prototype,"query",void 0),o([t.Complex(e.ListBase.defaultMappedFields,p)],r.prototype,"fields",void 0),o([t.Property({effect:"SlideLeft",duration:400,easing:"ease"})],r.prototype,"animation",void 0),o([t.Property("None")],r.prototype,"sortOrder",void 0),o([t.Property(!1)],r.prototype,"showIcon",void 0),o([t.Property(!1)],r.prototype,"showCheckBox",void 0),o([t.Property("Left")],r.prototype,"checkBoxPosition",void 0),o([t.Property("")],r.prototype,"headerTitle",void 0),o([t.Property(!1)],r.prototype,"showHeader",void 0),o([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),o([t.Property("")],r.prototype,"height",void 0),o([t.Property("")],r.prototype,"width",void 0),o([t.Property(null)],r.prototype,"template",void 0),o([t.Property(null)],r.prototype,"headerTemplate",void 0),o([t.Property(null)],r.prototype,"groupTemplate",void 0),o([t.Event()],r.prototype,"select",void 0),o([t.Event()],r.prototype,"actionBegin",void 0),o([t.Event()],r.prototype,"actionComplete",void 0),o([t.Event()],r.prototype,"actionFailure",void 0),r=o([t.NotifyPropertyChanges],r)}(t.Component),f=function(){function s(e){this.elementDifference=0,this.listViewInstance=e}return s.prototype.isNgTemplate=function(){return!t.isNullOrUndefined(this.listViewInstance.templateRef)&&"string"!=typeof this.listViewInstance.templateRef},s.prototype.uiVirtualization=function(){this.wireScrollEvent(!1);var i=this.listViewInstance.curViewDS,s=i.slice(0,1);this.listViewInstance.ulElement=this.listViewInstance.curUL=e.ListBase.createList(this.listViewInstance.createElement,s,this.listViewInstance.listBaseOption,null,this.listViewInstance),this.listViewInstance.contentContainer=this.listViewInstance.createElement("div",{className:d.content}),this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer),this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement),this.listItemHeight=this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height,this.expectedDomItemCount=this.ValidateItemCount(1e4),this.domItemCount=this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length),this.uiFirstIndex=0,this.uiLastIndex=this.domItemCount-1;var n=i.slice(1,this.domItemCount),l=e.ListBase.createListItemFromJson(this.listViewInstance.createElement,n,this.listViewInstance.listBaseOption,null,null,this.listViewInstance);t.append(l,this.listViewInstance.ulElement),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li"),this.topElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.topElement,this.listViewInstance.ulElement.firstElementChild),this.bottomElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.bottomElement,null),this.totalHeight=Object.keys(i).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.uiIndicesInitialization()},s.prototype.wireScrollEvent=function(e){e?!0===this.listViewInstance.isWindow?(window.removeEventListener("scroll",this.onVirtualScroll),window.removeEventListener("scroll",this.updateUl)):(t.EventHandler.remove(this.listViewInstance.element,"scroll",this.onVirtualUiScroll),t.EventHandler.remove(this.listViewInstance.element,"scroll",this.updateUlContainer)):this.listViewInstance.isWindow?(this.onVirtualScroll=this.onVirtualUiScroll.bind(this),window.addEventListener("scroll",this.onVirtualScroll)):t.EventHandler.add(this.listViewInstance.element,"scroll",this.onVirtualUiScroll,this)},s.prototype.updateUlContainer=function(e){var i,s=this.listViewInstance.ulElement.querySelector("."+d.virtualElementContainer);t.isNullOrUndefined(this.listViewInstance.liElementHeight)&&this.listViewInstance.updateLiElementHeight(),((i=this.listViewInstance.isWindow?Math.round(e.target.documentElement.scrollTop/this.listViewInstance.liElementHeight)-2:Math.round(e.target.scrollTop/this.listViewInstance.liElementHeight)-2)-1)*this.listViewInstance.liElementHeight<0?s.style.top="0px":s.style.top=i*this.listViewInstance.liElementHeight+"px"},s.prototype.ValidateItemCount=function(e){var i,s=parseFloat(t.formatUnit(this.listViewInstance.height));return(i=this.listViewInstance.isWindow?Math.round(window.innerHeight/this.listItemHeight*3):"string"==typeof this.listViewInstance.height&&-1!==this.listViewInstance.height.indexOf("%")?Math.round(this.listViewInstance.element.getBoundingClientRect().height/this.listItemHeight*1.5):Math.round(s/this.listItemHeight*1.5))>e&&(i=e),i},s.prototype.uiIndicesInitialization=function(){this.uiIndices={activeIndices:[],disabledItemIndices:[],hiddenItemIndices:[]};for(var e=this.listViewInstance.curViewDS,i=0;i<e.length;i++)this.listViewInstance.showCheckBox&&e[i][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(i),t.isNullOrUndefined(e[i][this.listViewInstance.fields.enabled])||e[i][this.listViewInstance.fields.enabled]||this.uiIndices.disabledItemIndices.push(i);if(this.isNgTemplate())for(var s=this.listViewInstance.element.querySelectorAll("."+d.listItem),n=0;n<s.length;n++)s[n].context=this.listViewInstance.viewContainerRef.get(n).context},s.prototype.refreshItemHeight=function(){if(this.listViewInstance.curViewDS.length){var e=this.listViewInstance.curViewDS;this.listItemHeight=this.topElement.nextSibling.getBoundingClientRect().height,this.totalHeight=Object.keys(e).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.bottomElementHeight=this.totalHeight,this.bottomElement.style.height=this.totalHeight+"px"}},s.prototype.getscrollerHeight=function(e){return this.listViewInstance.isWindow?pageYOffset-e<=0?0:pageYOffset-e:this.listViewInstance.element.scrollTop-e<=0?0:this.listViewInstance.element.scrollTop-e},s.prototype.onVirtualUiScroll=function(e){var i,s;s=this.listViewInstance.isWindow?this.listViewInstance.ulElement.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top:this.listViewInstance.headerEle?this.listViewInstance.headerEle.getBoundingClientRect().height:0,this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var n=this.getscrollerHeight(s);if(this.topElementHeight=this.listItemHeight*Math.floor(n/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,i=n<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=i[0],this.bottomElementHeight=i[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",n>this.scrollPosition){(l=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff))>this.expectedDomItemCount+5?this.onLongScroll(l,!0):this.onNormalScroll(l,!0)}else{var l;(l=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight))>this.expectedDomItemCount+5?this.onLongScroll(l,!1):this.onNormalScroll(l,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),"function"==typeof this.listViewInstance.onUIScrolled&&this.listViewInstance.onUIScrolled(),this.scrollPosition=n},s.prototype.onLongScroll=function(e,t){for(var i=t?this.uiFirstIndex+e:this.uiFirstIndex-e,s=this.listViewInstance.ulElement.querySelectorAll("li"),n=0;n<s.length;n++)this.updateUI(s[n],i),i++;this.uiLastIndex=t?this.uiLastIndex+e:this.uiLastIndex-e,this.uiFirstIndex=t?this.uiFirstIndex+e:this.uiFirstIndex-e},s.prototype.onNormalScroll=function(e,t){if(t)for(var i=0;i<e;i++){var s=++this.uiLastIndex;this.updateUI(this.topElement.nextElementSibling,s,this.bottomElement),this.uiFirstIndex++}else for(i=0;i<e;i++){s=--this.uiFirstIndex;var n=this.topElement.nextSibling;this.updateUI(this.bottomElement.previousElementSibling,s,n),this.uiLastIndex--}},s.prototype.updateUiContent=function(i,s){var n=this.listViewInstance.curViewDS;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]?(i.dataset.uid=e.ListBase.generateId(),i.getElementsByClassName(d.listItemText)[0].innerHTML=this.listViewInstance.curViewDS[s].toString()):(i.dataset.uid=n[s][this.listViewInstance.fields.id]?n[s][this.listViewInstance.fields.id]:e.ListBase.generateId(),i.getElementsByClassName(d.listItemText)[0].innerHTML=n[s][this.listViewInstance.fields.text]),this.listViewInstance.showIcon&&(i.querySelector("."+d.listIcon)&&t.detach(i.querySelector("."+d.listIcon)),this.listViewInstance.curViewDS[s][this.listViewInstance.fields.iconCss])){var l=i.querySelector("."+d.textContent),r=this.listViewInstance.createElement("div",{className:d.listIcon+" "+this.listViewInstance.curViewDS[s][this.listViewInstance.fields.iconCss]});l.insertBefore(r,i.querySelector("."+d.listItemText))}if(this.listViewInstance.showCheckBox&&this.listViewInstance.fields.groupBy){this.checkListWrapper||(this.checkListWrapper=this.listViewInstance.curUL.querySelector("."+d.checkboxWrapper).cloneNode(!0));l=i.querySelector("."+d.textContent);this.listViewInstance.curViewDS[s].isHeader?i.querySelector("."+d.checkboxWrapper)&&(i.classList.remove(d.checklist),l.classList.remove(d.checkbox),t.detach(i.querySelector("."+d.checkboxWrapper))):i.querySelector("."+d.checkboxWrapper)||(i.classList.add(d.checklist),l.classList.add(d.checkbox),l.insertBefore(this.checkListWrapper.cloneNode(!0),i.querySelector("."+d.listItemText)))}},s.prototype.changeElementAttributes=function(e,i){if(e.classList.remove(d.disable),this.uiIndices.disabledItemIndices.length&&-1!==this.uiIndices.disabledItemIndices.indexOf(i)&&e.classList.add(d.disable),e.style.display="",this.uiIndices.hiddenItemIndices.length&&-1!==this.uiIndices.hiddenItemIndices.indexOf(i)&&(e.style.display="none"),this.listViewInstance.showCheckBox){var s=e.querySelector("."+d.checkboxWrapper);e.classList.remove(d.selected),e.classList.remove(d.focused),s&&(s.removeAttribute("aria-checked"),s.firstElementChild.classList.remove(d.checked)),this.uiIndices.activeIndices.length&&-1!==this.uiIndices.activeIndices.indexOf(i)&&!this.listViewInstance.curUL.querySelector(d.selected)&&(e.classList.add(d.selected),s.firstElementChild.classList.add(d.checked),s.setAttribute("aria-checked","true"),this.activeIndex===i&&e.classList.add(d.focused))}else e.classList.remove(d.selected),e.removeAttribute("aria-selected"),t.isNullOrUndefined(this.activeIndex)||this.activeIndex!==i||this.listViewInstance.curUL.querySelector(d.selected)||(e.classList.add(d.selected),e.setAttribute("aria-selected","true"));this.listViewInstance.fields.groupBy&&(this.listViewInstance.curViewDS[i].isHeader?e.classList.contains(d.listItem)&&(e.classList.remove(d.listItem),e.setAttribute("role","group"),e.classList.add(d.groupListItem)):e.classList.contains(d.groupListItem)&&(e.classList.remove(d.groupListItem),e.setAttribute("role","listitem"),e.classList.add(d.listItem)))},s.prototype.findDSAndIndexFromId=function(e,i){var s=this,n={};return i=this.listViewInstance.getElementUID(i),t.isNullOrUndefined(i)||e.some(function(e,t){return!!(i[s.listViewInstance.fields.id]&&i[s.listViewInstance.fields.id]===(e[s.listViewInstance.fields.id]&&e[s.listViewInstance.fields.id])||i===e)&&(n.index=t,n.data=e,!0)}),n},s.prototype.getSelectedItems=function(){var e=this;if(!t.isNullOrUndefined(this.activeIndex)||this.listViewInstance.showCheckBox&&this.uiIndices.activeIndices.length){var s=[],n=[];if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]){var l=this.listViewInstance.curViewDS;if(this.listViewInstance.showCheckBox){for(var r=this.uiIndices.activeIndices,a=0;a<r.length;a++)s.push(l[r[a]]);return{text:s,data:s,index:this.uiIndices.activeIndices.map(function(t){return e.listViewInstance.dataSource.indexOf(l[t])})}}return{text:l[this.activeIndex],data:l[this.activeIndex],index:this.listViewInstance.dataSource.indexOf(l[this.activeIndex])}}var o=this.listViewInstance.curViewDS,c=this.listViewInstance.fields.text;if(this.listViewInstance.showCheckBox){var h=this.uiIndices.activeIndices;for(a=0;a<h.length;a++)n.push(o[h[a]][c]),s.push(o[h[a]]);var d=this.listViewInstance.dataSource instanceof i.DataManager?o:this.listViewInstance.dataSource;return{text:n,data:s,index:this.uiIndices.activeIndices.map(function(e){return d.indexOf(o[e])})}}var u=this.listViewInstance.dataSource instanceof i.DataManager?o:this.listViewInstance.dataSource;return{text:o[this.activeIndex][this.listViewInstance.fields.text],data:o[this.activeIndex],index:u.indexOf(o[this.activeIndex])}}},s.prototype.selectItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(Object.keys(i).length){var s=this.activeIndex===i.index,n=void 0;if(this.activeIndex=i.index,this.listViewInstance.showCheckBox&&(-1===this.uiIndices.activeIndices.indexOf(i.index)?(n=!0,this.uiIndices.activeIndices.push(i.index)):(n=!1,this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(i.index),1)),this.listViewInstance.curUL.querySelector("."+d.focused)&&this.listViewInstance.curUL.querySelector("."+d.focused).classList.remove(d.focused)),this.listViewInstance.getLiFromObjOrElement(e))this.listViewInstance.showCheckBox?this.listViewInstance.setCheckboxLI(this.listViewInstance.getLiFromObjOrElement(e)):this.listViewInstance.setSelectLI(this.listViewInstance.getLiFromObjOrElement(e));else{var l=void 0;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0])l={text:this.listViewInstance.curViewDS[this.activeIndex],data:this.listViewInstance.curViewDS[this.activeIndex],index:this.activeIndex};else{var r=this.listViewInstance.curViewDS;l={text:r[this.activeIndex][this.listViewInstance.fields.text],data:r[this.activeIndex],index:this.activeIndex}}this.listViewInstance.showCheckBox?(l.isChecked=n,this.listViewInstance.trigger("select",l)):s||(this.listViewInstance.removeSelect(),this.listViewInstance.trigger("select",l))}}else t.isNullOrUndefined(e)&&!this.listViewInstance.showCheckBox&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0)},s.prototype.enableItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(t.index),1)},s.prototype.disableItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&-1===this.uiIndices.disabledItemIndices.indexOf(t.index)&&this.uiIndices.disabledItemIndices.push(t.index)},s.prototype.showItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(t.index),1)},s.prototype.hideItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&-1===this.uiIndices.hiddenItemIndices.indexOf(t.index)&&this.uiIndices.hiddenItemIndices.push(t.index)},s.prototype.removeItem=function(e){var t,s=this.listViewInstance.curViewDS,n=this.findDSAndIndexFromId(s,e);Object.keys(n).length&&(t=n.data,s[n.index-1]&&s[n.index-1].isHeader&&1===s[n.index-1].items.length?(this.removeUiItem(n.index-1),this.removeUiItem(n.index-1)):this.removeUiItem(n.index));var l=this.listViewInstance.dataSource instanceof i.DataManager?this.listViewInstance.localData:this.listViewInstance.dataSource,r=l.indexOf(t);-1!==r&&(l.splice(r,1),this.listViewInstance.setViewDataSource(l)),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")},s.prototype.setCheckboxLI=function(e,t){var i=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex;this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex,e.classList.contains(d.selected)?-1===this.uiIndices.activeIndices.indexOf(i)&&this.uiIndices.activeIndices.push(i):this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(i),1)},s.prototype.setSelectLI=function(e,t){this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex},s.prototype.checkedItem=function(e){if(e){this.uiIndices.activeIndices=[],this.activeIndex=void 0;for(var t=this.listViewInstance.curViewDS,i=0;i<t.length;i++)t[i].isHeader||this.uiIndices.activeIndices.push(i)}else this.activeIndex=void 0,this.uiIndices.activeIndices=[]},s.prototype.addUiItem=function(e){var t=this.listViewInstance.curViewDS;if(this.changeUiIndices(e,!0),this.activeIndex&&this.activeIndex>=e&&this.activeIndex++,this.listViewInstance.showCheckBox&&t[e][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(e),parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)||(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px"),parseFloat(this.bottomElement.style.height)){var i=this.listViewInstance.curUL.lastElementChild.previousSibling;(s=this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]))&&(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px",this.updateUI(i,e,s))}else{i=this.listViewInstance.curUL.firstElementChild.nextSibling;var s=void 0;s=Object.keys(this.listViewInstance.curViewDS).length-1===e?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]),this.topElement.style.height=parseFloat(this.topElement.style.height)+this.listItemHeight+"px",this.uiFirstIndex++,this.uiLastIndex++,s&&(this.updateUI(i,e,s),!0===this.listViewInstance.isWindow?window.scrollTo(0,pageYOffset+this.listItemHeight):this.listViewInstance.element.scrollTop+=this.listItemHeight)}this.totalHeight+=this.listItemHeight,this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.removeUiItem=function(e){this.totalHeight-=this.listItemHeight;var i=this.listViewInstance.curViewDS[e],s=this.listViewInstance.getLiFromObjOrElement(i);if(this.listViewInstance.curViewDS.splice(e,1),this.activeIndex&&this.activeIndex>=e&&this.activeIndex--,s)if(this.domItemCount>Object.keys(this.listViewInstance.curViewDS).length)t.detach(s),this.domItemCount--,this.uiLastIndex--,this.totalHeight=0;else{if(s.classList.contains(d.disable)&&(s.classList.remove(d.disable),this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(e),1)),"none"===s.style.display&&(s.style.display="",this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(e),1)),this.listViewInstance.showCheckBox&&s.classList.contains(d.selected)){this.listViewInstance.removeSelect(),this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(e),1);var n=s.querySelector("."+d.checkboxWrapper);n.removeAttribute("aria-checked"),n.firstElementChild.classList.remove(d.checked),s.classList.contains(d.focused)&&(s.classList.remove(d.focused),this.activeIndex=void 0)}else s.classList.contains(d.selected)&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0);parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)?parseFloat(this.bottomElement.style.height)?(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiLastIndex,this.bottomElement)):(this.topElement.style.height=parseFloat(this.topElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiFirstIndex-1,this.topElement.nextSibling),this.uiLastIndex--,this.uiFirstIndex--):this.updateUI(s,this.uiLastIndex,this.bottomElement)}this.changeUiIndices(e,!1),this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.changeUiIndices=function(e,t){for(var i=Object.keys(this.uiIndices),s=0;s<i.length;s++)this.uiIndices[i[s]]=this.uiIndices[i[s]].map(function(i){return i>=e?t?++i:--i:i})},s.prototype.addItem=function(e,t,i){for(var s=0;s<e.length;s++){var n=e[s];if(i.push(n),this.listViewInstance.setViewDataSource(i),this.domItemCount)if(this.domItemCount<this.expectedDomItemCount){if(this.listViewInstance.findItemFromDS(i,t)instanceof Array){if(this.listViewInstance.ulElement){var l=this.listViewInstance.curViewDS.indexOf(n);this.createAndInjectNewItem(n,l);(r=this.listViewInstance.curViewDS[l-1])&&r.isHeader&&1===r.items.length&&(--l,this.createAndInjectNewItem(r,l))}this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")}}else{l=this.listViewInstance.curViewDS.indexOf(n);this.addUiItem(l);var r;(r=this.listViewInstance.curViewDS[l-1])&&r.isHeader&&1===r.items.length&&this.addUiItem(l-1)}else!this.listViewInstance.template&&!this.listViewInstance.groupTemplate||this.isNgTemplate()||(this.listViewInstance.listBaseOption.template=null,this.listViewInstance.listBaseOption.groupTemplate=null,this.listViewInstance.listBaseOption.itemCreated=this.createUIItem.bind(this)),this.uiVirtualization()}},s.prototype.createAndInjectNewItem=function(t,i){var s,n=e.ListBase.createListItemFromJson(this.listViewInstance.createElement,[t],this.listViewInstance.listBaseOption,null,null,this.listViewInstance);if(s=Object.keys(this.listViewInstance.curViewDS).length-1===i?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i+1])||this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i+2]),this.listViewInstance.fields.groupBy&&this.listViewInstance.curViewDS[i+1]&&this.listViewInstance.curViewDS[i+1].isHeader){var l=this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i-1]);l&&(s=l.nextElementSibling)}this.listViewInstance.ulElement.insertBefore(n[0],s),this.domItemCount++,this.bottomElementHeight<=0&&this.uiLastIndex++,this.refreshItemHeight()},s.prototype.createUIItem=function(e){var i=this.listViewInstance.template,s=this.listViewInstance.createElement("div"),n='<div class="e-text-content" role="presentation"> <span class="e-list-text"> ${'+this.listViewInstance.fields.text+"} </span></div>";if(this.listViewInstance.isReact&&(n=null),this.listViewInstance.showCheckBox){if(this.listViewInstance.renderCheckbox(e),!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox)&&!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox.outerHTML)){var l=document.createElement("div");l.innerHTML=this.listViewInstance.template||n,l.children&&l.children[0]&&(l.children[0].classList.add("e-checkbox"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].classList.add("e-checkbox-left"):l.children[0].classList.add("e-checkbox-right"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].insertBefore(this.listViewInstance.virtualCheckBox,l.childNodes[0].children[0]):l.children[0].appendChild(this.listViewInstance.virtualCheckBox),this.listViewInstance.template=l.innerHTML)}s.innerHTML=this.listViewInstance.template,this.listViewInstance.template=i}else s.innerHTML=this.listViewInstance.template||n;var r=s.getElementsByTagName("*"),a=this.listViewInstance.createElement("div");this.listViewInstance.fields.groupBy&&(a.innerHTML=this.listViewInstance.groupTemplate||n);var o=a.getElementsByTagName("*");e.curData.isHeader&&(this.headerData=e.curData),this.templateData=e.curData.isHeader?e.curData.items[0]:e.curData,(!this.listViewInstance.isReact||"string"==typeof this.listViewInstance.template&&!e.item.classList.contains("e-list-group-item")||"string"==typeof this.listViewInstance.groupTemplate&&e.item.classList.contains("e-list-group-item"))&&(e.item.innerHTML=""),e.item.context={data:e.curData,nodes:{flatTemplateNodes:[],groupTemplateNodes:[]}};for(var c=0;c<r.length;c++)this.compileTemplate(r[c],e.item,!1);for(c=0;c<o.length;c++)this.compileTemplate(o[c],e.item,!0);e.item.context.template=e.curData.isHeader?s.firstElementChild:a.firstElementChild,e.item.context.type=e.curData.isHeader?"flatList":"groupList";var h=e.curData.isHeader?a:s;h.firstElementChild&&e.item.insertBefore(h.firstElementChild,null)},s.prototype.compileTemplate=function(e,t,i){this.textProperty(e,t,i),this.classProperty(e,t,i),this.attributeProperty(e,t,i)},s.prototype.onChange=function(e,i){i.context.data=e;var s=i.context.nodes.groupTemplateNodes,n=i.context.nodes.flatTemplateNodes;if(!t.isNullOrUndefined(e.isHeader)&&e.isHeader&&"groupList"===i.context.type){var l=i.firstElementChild;t.detach(i.firstElementChild),i.insertBefore(i.context.template,null),i.context.template=l,i.context.type="flatList";for(var r=0;r<s.length;r++)s[r].onChange(e)}else if(e.isHeader||"flatList"!==i.context.type)if(e.isHeader)for(r=0;r<s.length;r++)s[r].onChange(e);else for(r=0;r<n.length;r++)n[r].onChange(e);else{l=i.firstElementChild;t.detach(i.firstElementChild),i.insertBefore(i.context.template,null),i.context.template=l,i.context.type="groupList";for(var r=0;r<n.length;r++)n[r].onChange(e)}},s.prototype.updateContextData=function(e,t,i){i?e.context.nodes.groupTemplateNodes.push(t):e.context.nodes.flatTemplateNodes.push(t)},s.prototype.classProperty=function(e,i,s){for(var n,l=new RegExp("\\${([^}]*)}","g"),r=[];null!==n;){var a=l.exec(e.className);r.push(a),null===(n=a)&&r.pop()}if(r&&r.length)for(var o=function(n){var l,a=r[n];l=-1!==a[1].indexOf("?")&&-1!==a[1].indexOf(":")?new Function("data","return "+a[1].replace(/\$/g,"data.")):new Function("data","return data."+a[1]);var o={};o.bindedvalue=l(s?c.headerData:c.templateData),o.onChange=function(i){o.bindedvalue&&t.removeClass([e],o.bindedvalue.split(" ").filter(function(e){return e}));var s=l(i);s&&t.addClass([e],s.split(" ").filter(function(e){return e})),o.bindedvalue=s};for(var h=a[0].split(" "),d=0;d<h.length;d++)e.classList.remove(h[d]);o.bindedvalue&&t.addClass([e],o.bindedvalue.split(" ").filter(function(e){return e})),c.updateContextData(i,o,s)},c=this,h=0;h<r.length;h++)o(h)},s.prototype.attributeProperty=function(e,t,i){for(var s=[],n=0;n<e.attributes.length;n++)s.push(e.attributes[n].nodeName);-1!==s.indexOf("class")&&s.splice(s.indexOf("class"),1);var l=function(n){var l,a,o=s[n],c=new RegExp("\\${([^}]*)}","g").exec(o)||[],h=new RegExp("\\${([^}]*)}","g").exec(e.getAttribute(o))||[];if(c.length||h.length){c[1]&&(l=new Function("data","return data."+c[1])),h[1]&&(a=-1!==h[1].indexOf("?")&&-1!==h[1].indexOf(":")?new Function("data","return "+h[1].replace(/\$/g,"data.")):new Function("data","return data."+h[1]));var d={};d.bindedvalue=i?[void 0===c[1]?void 0:l(r.headerData),void 0===h[1]?void 0:a(r.headerData)]:[void 0===c[1]?void 0:l(r.templateData),void 0===h[1]?void 0:a(r.templateData)],d.attrName=void 0===d.bindedvalue[0]?o:d.bindedvalue[0],d.onChange=function(t){var i=void 0===d.bindedvalue[1]?e.getAttribute(d.attrName):a(t);e.removeAttribute(d.attrName),d.attrName=void 0===d.bindedvalue[0]?d.attrName:l(t),e.setAttribute(d.attrName,i),d.bindedvalue=[void 0===d.bindedvalue[0]?void 0:l(t),void 0===d.bindedvalue[1]?void 0:a(t)]};var u=void 0===d.bindedvalue[1]?e.getAttribute(o):d.bindedvalue[1];e.removeAttribute(o),e.setAttribute(d.attrName,u),r.updateContextData(t,d,i)}},r=this;for(n=0;n<s.length;n++)l(n)},s.prototype.textProperty=function(e,t,i){for(var s,n=new RegExp("\\${([^}]*)}","g"),l=[];null!==s;){var r=n.exec(e.innerText);l.push(r),null===(s=r)&&l.pop()}var a=Array.prototype.some.call(e.children,function(e){return!!new RegExp("\\${([^}]*)}","g").exec(e.innerText)});if(l&&l.length&&!a)for(var o=function(s){var n,r=l[s],a={};n=-1!==r[1].indexOf("?")&&-1!==r[1].indexOf(":")?new Function("data","return "+r[1].replace(/\$/g,"data.")):new Function("data","return data."+r[1]),a.bindedvalue=n(i?c.headerData:c.templateData),a.onChange=function(t){e.innerText=e.innerText.replace(a.bindedvalue,n(t)),a.bindedvalue=n(t)},e.innerText=e.innerText.replace(r[0],a.bindedvalue),c.updateContextData(t,a,i)},c=this,h=0;h<l.length;h++)o(h)},s.prototype.reRenderUiVirtualization=function(){this.wireScrollEvent(!0),this.listViewInstance.contentContainer&&t.detach(this.listViewInstance.contentContainer),this.listViewInstance.preRender(),this.domItemCount=0,this.listViewInstance.header(),this.listViewInstance.setLocalData()},s.prototype.updateUI=function(t,i,s){var n=this.isNgTemplate()?this.onNgChange:this.onChange;if(this.listViewInstance.template||this.listViewInstance.groupTemplate){var l=this.listViewInstance.curViewDS[i];t.dataset.uid=l[this.listViewInstance.fields.id]?l[this.listViewInstance.fields.id]:e.ListBase.generateId(),n(l,t,this)}else this.updateUiContent(t,i);this.changeElementAttributes(t,i),s&&this.listViewInstance.ulElement.insertBefore(t,s)},s.prototype.onNgChange=function(e,i,s){for(var n=t.compile(s.listViewInstance.template)(e);i.lastChild;)i.removeChild(i.lastChild);i.appendChild(n[0])},s.prototype.getModuleName=function(){return"virtualization"},s.prototype.destroy=function(){this.wireScrollEvent(!0)},s}(),g=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 s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),v=function(e,t,i,s){var n,l=arguments.length,r=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},I=function(e){function i(i,s){var n=e.call(this,s,i)||this;return n.getHelper=function(e){var i=n.getSortableElement(e.sender.target);if(!n.isValidTarget(i,n))return!1;var s;return n.helper?s=n.helper({sender:i,element:e.element}):((s=i.cloneNode(!0)).style.width=i.offsetWidth+"px",s.style.height=i.offsetHeight+"px"),t.addClass([s],["e-sortableclone"]),document.body.appendChild(s),s},n.onDrag=function(e){if(e.target){n.trigger("drag",{event:e.event,element:n.element,target:e.target});var i=n.getSortableInstance(e.target),s=n.getSortableElement(e.target,i);if(!(n.isValidTarget(s,i)||e.target.className.indexOf("e-list-group-item")>-1)||n.curTarget===s&&t.isNullOrUndefined(i.placeHolder)||i.placeHolderElement&&i.placeHolderElement===e.target)n.curTarget!==n.target&&n.scope&&n.curTarget!==s&&!t.isNullOrUndefined(i.placeHolder)&&(t.remove(n.getSortableInstance(n.curTarget).placeHolderElement),n.curTarget=n.target);else{if(e.target.className.indexOf("e-list-group-item")>-1&&(s=e.target),n.curTarget=s,n.target===s)return;var l=n.getIndex(i.placeHolderElement,i),r=n.getPlaceHolder(s,i),a=void 0;if(r){l=t.isNullOrUndefined(l)?n.getIndex(n.target):l,a=n.getIndex(s,i,e.event);var o=n.isPlaceHolderPresent(i);if(o&&l===a)return;o&&t.remove(i.placeHolderElement),i.placeHolderElement=r,e.target.className.indexOf("e-list-group-item")>-1?i.element.insertBefore(i.placeHolderElement,i.element.children[a]):i.element!==n.element&&a===i.element.childElementCount?i.element.appendChild(i.placeHolderElement):i.element.insertBefore(i.placeHolderElement,i.element.children[a]),n.refreshDisabled(l,a,i)}else{l=t.isNullOrUndefined(l)?n.getIndex(n.target):n.getIndex(s,i)<l||!l?l:l-1,a=n.getIndex(s,i);var c=i.element!==n.element?a:l<a?a+1:a;n.updateItemClass(i),i.element.insertBefore(n.target,i.element.children[c]),n.refreshDisabled(l,a,i),n.curTarget=n.target,n.trigger("drop",{droppedElement:n.target,element:i.element,previousIndex:l,currentIndex:a,target:e.target,helper:document.getElementsByClassName("e-sortableclone")[0],event:e.event,scope:n.scope})}}if(i=n.getSortableInstance(n.curTarget),t.isNullOrUndefined(s)&&e.target!==i.placeHolderElement)n.isPlaceHolderPresent(i)&&n.removePlaceHolder(i);else{var h;[].slice.call(document.getElementsByClassName("e-sortable-placeholder")).forEach(function(e){(h=n.getSortableInstance(e)).element&&h!==i&&n.removePlaceHolder(h)})}}},n.onDragStart=function(e){n.target=n.getSortableElement(e.target);var i=!1;n.target.classList.add("e-grabbed"),n.curTarget=n.target,e.helper=document.getElementsByClassName("e-sortableclone")[0];var s={cancel:!1,element:n.element,target:n.target};n.trigger("beforeDragStart",s,function(t){t.cancel&&(i=t.cancel,n.onDragStop(e))}),i||(t.isBlazor?n.trigger("dragStart",{event:e.event,element:n.element,target:n.target,bindEvents:e.bindEvents,dragElement:e.dragElement}):n.trigger("dragStart",{event:e.event,element:n.element,target:n.target}))},n.onDragStop=function(e){var i,s,l,r=n.getSortableInstance(n.curTarget);i=n.getIndex(n.target);var a=n.isPlaceHolderPresent(r);if(a){var o=n.getIndex(r.placeHolderElement,r),c={previousIndex:i,currentIndex:o,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1,handled:!1};n.trigger("beforeDrop",c,function(s){if(!s.cancel){if(l=s.handled,n.updateItemClass(r),s.handled){var a=n.target.cloneNode(!0);n.target.classList.remove("e-grabbed"),n.target=a}r.element.insertBefore(n.target,r.placeHolderElement);var o=n.getIndex(n.target,r);i=n===r&&i-o>1?i-1:i,n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:o,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope,handled:l})}t.remove(r.placeHolderElement)})}if(r=n.getSortableInstance(e.target),s=r.element.childElementCount,i=n.getIndex(n.target),r.element===e.target||!a&&n.curTarget===n.target){var h={previousIndex:i,currentIndex:n.curTarget===n.target?i:s,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1};n.trigger("beforeDrop",h,function(t){r.element!==e.target||t.cancel||(n.updateItemClass(r),r.element.appendChild(n.target),n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:s,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope}))})}n.target.classList.remove("e-grabbed"),n.target=null,n.curTarget=null,t.remove(e.helper),t.getComponent(n.element,t.Draggable).intDestroy(e.event)},n.bind(),n}g(i,e),s=i,i.prototype.bind=function(){this.element.id||(this.element.id=t.getUniqueID("sortable")),this.itemClass||(this.itemClass="e-sort-item",this.dataBind()),this.initializeDraggable()},i.prototype.initializeDraggable=function(){new t.Draggable(this.element,{helper:this.getHelper,dragStart:this.onDragStart,drag:this.onDrag,dragStop:this.onDragStop,dragTarget:"."+this.itemClass,enableTapHold:!0,tapHoldThreshold:200,queryPositionInfo:this.queryPositionInfo,distance:5})},i.prototype.getPlaceHolder=function(e,t){if(t.placeHolder){var i=t.placeHolder({element:t.element,grabbedElement:this.target,target:e});return i.classList.add("e-sortable-placeholder"),i}return null},i.prototype.isValidTarget=function(e,i){return e&&t.compareElementParent(e,i.element)&&e.classList.contains(i.itemClass)&&!e.classList.contains("e-disabled")},i.prototype.removePlaceHolder=function(e){t.remove(e.placeHolderElement),e.placeHolderElement=null},i.prototype.updateItemClass=function(e){this!==e&&(this.target.classList.remove(this.itemClass),this.target.classList.add(e.itemClass))},i.prototype.getSortableInstance=function(e){if(e=t.closest(e,".e-"+this.getModuleName())){var i=t.getComponent(e,s);return i.scope&&this.scope&&i.scope===this.scope?i:this}return this},i.prototype.refreshDisabled=function(e,t,i){if(i===this)for(var s=void 0,n=e<t,l=void 0,r=n?e:t,a=n?t:e;r<=a;)(s=this.element.children[r]).classList.contains("e-disabled")?(l=this.getIndex(s),this.element.insertBefore(s,this.element.children[n?l+2:l-1]),r=n?l+2:l+1):r++},i.prototype.getIndex=function(e,i,s){void 0===i&&(i=this);var n,l;return[].slice.call(i.element.children).forEach(function(i,r){if(i.classList.contains("e-sortable-placeholder")&&(l=!0),i!==e);else if(n=r,!t.isNullOrUndefined(s)){l&&(n-=1);var a=e.getBoundingClientRect(),o=a.bottom-(a.bottom-a.top)/2;n=s.clientY<=o?n:n+1}}),n},i.prototype.getSortableElement=function(e,i){return void 0===i&&(i=this),t.closest(e,"."+i.itemClass)},i.prototype.queryPositionInfo=function(e){return e.left=pageXOffset?parseFloat(e.left)-pageXOffset+"px":e.left,e.top=pageYOffset?parseFloat(e.top)-pageYOffset+"px":e.top,e},i.prototype.isPlaceHolderPresent=function(e){return e.placeHolderElement&&!!t.closest(e.placeHolderElement,"#"+e.element.id)},i.prototype.moveTo=function(e,t,i){r(this.element,e,t,i)},i.prototype.destroy=function(){"e-sort-item"===this.itemClass&&(this.itemClass=null,this.dataBind()),t.getComponent(this.element,t.Draggable).destroy(),e.prototype.destroy.call(this)},i.prototype.getModuleName=function(){return"sortable"},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"itemClass":[].slice.call(this.element.children).forEach(function(i){i.classList.contains(t.itemClass)&&i.classList.remove(t.itemClass),e.itemClass&&i.classList.add(e.itemClass)})}}};var s;return v([t.Property(!1)],i.prototype,"enableAnimation",void 0),v([t.Property(null)],i.prototype,"itemClass",void 0),v([t.Property(null)],i.prototype,"scope",void 0),v([t.Property()],i.prototype,"helper",void 0),v([t.Property()],i.prototype,"placeHolder",void 0),v([t.Event()],i.prototype,"drag",void 0),v([t.Event()],i.prototype,"beforeDragStart",void 0),v([t.Event()],i.prototype,"dragStart",void 0),v([t.Event()],i.prototype,"beforeDrop",void 0),v([t.Event()],i.prototype,"drop",void 0),i=s=v([t.NotifyPropertyChanges],i)}(t.Base);e.classNames=d,e.FieldSettings=p,e.ListView=m,e.Virtualization=f,e.getFieldValues=n,e.Sortable=I,e.moveTo=r,Object.defineProperty(e,"__esModule",{value:!0})});
2
11
  //# sourceMappingURL=ej2-lists.umd.min.js.map
@@ -1,2 +1,11 @@
1
+ /*!
2
+ * filename: ej2-lists.min.js
3
+ * version : 20.3.56
4
+ * Copyright Syncfusion Inc. 2001 - 2020. 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
+ */
1
10
  this.ej=this.ej||{},this.ej.lists=function(e,t,i,s){"use strict";function n(e,i){var s={};if(t.isNullOrUndefined(e)||"string"==typeof e||"number"==typeof e||!t.isNullOrUndefined(e.isHeader))return e;for(var n=0,l=Object.keys(i);n<l.length;n++){var r=i[l[n]],a=t.isNullOrUndefined(r)||"string"!=typeof r?void 0:t.getValue(r,e);t.isNullOrUndefined(a)||(s[r]=a)}return s}function l(e){if(e)try{return document.querySelector(e)?t.compile(document.querySelector(e).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}}function r(e,i,s,n){var l=[];if(i||(i=e),s&&s.length?s.forEach(function(t){l.push(e.children[t])}):l=[].slice.call(e.children),t.isNullOrUndefined(n))l.forEach(function(e){i.appendChild(e)});else{var r=i.children[n];l.forEach(function(e){i.insertBefore(e,r)})}}e.cssClass={li:"e-list-item",ul:"e-list-parent e-ul",group:"e-list-group-item",icon:"e-list-icon",text:"e-list-text",check:"e-list-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-list-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-list-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"},function(s){function r(e,i,s,n,l){var r=t.extend({},H,s),o=t.extend({},D,r.ariaAttributes),c=v(i).typeof;return"string"===c||"number"===c?a(e,i,n,s,l):h(e,i,s,o.level,n,l)}function a(e,t,i,s,n){return O(e,o(e,t,i,s,n),null,s)}function o(i,s,n,l,r){var a=[],o=t.extend({},H,l);e.cssClass=C(o.moduleName);for(var c=x(),h=0;h<s.length;h++)if(!t.isNullOrUndefined(s[h])){var d=void 0;if(o.itemCreating&&"function"==typeof o.itemCreating){u={dataSource:s,curData:s[h],text:s[h],options:o};o.itemCreating(u)}if(d=n?L(i,s[h],void 0,null,null,[],null,c,h,l):E(i,s[h],void 0,null,null,l,r),o.itemCreated&&"function"==typeof o.itemCreated){var u={dataSource:s,curData:s[h],text:s[h],item:d,options:o};o.itemCreated(u)}a.push(d)}return a}function c(i,l,r,a,o,c){var h=t.extend({},H,r);e.cssClass=C(h.moduleName);var d,u=!c||"listview"!==c.getModuleName()&&"multiselect"!==c.getModuleName()?t.extend({},s.defaultMappedFields,h.fields):h.fields,p=t.extend({},D,h.ariaAttributes),m=[];a&&(p.level=a);var f,g,y=[];l&&l.length&&!t.isNullOrUndefined(v(l).item)&&!v(l).item.hasOwnProperty(u.id)&&(d=x());for(var b=0;b<l.length;b++){var w=n(l[b],u);if(!t.isNullOrUndefined(l[b])){if(h.itemCreating&&"function"==typeof h.itemCreating){B={dataSource:l,curData:l[b],text:w[u.text],options:h,fields:u};h.itemCreating(B)}var V=l[b];h.itemCreating&&"function"==typeof h.itemCreating&&(w=n(l[b],u)),w.hasOwnProperty(u.id)&&!t.isNullOrUndefined(w[u.id])&&(d=w[u.id]);var O=[];if(h.showCheckBox&&(h.itemNavigable&&(w[u.url]||w[u.urlAttributes])?m.push(i("input",{className:e.cssClass.check,attrs:{type:"checkbox"}})):O.push(i("input",{className:e.cssClass.check,attrs:{type:"checkbox"}}))),!0===o)h.showIcon&&w.hasOwnProperty(u.iconCss)&&!t.isNullOrUndefined(w[u.iconCss])&&O.push(i("span",{className:e.cssClass.icon+" "+w[u.iconCss]})),g=(f=L(i,V,w,u,h.itemClass,O,!(!V.hasOwnProperty("isHeader")||!V.isHeader),d,b,r)).querySelector("."+e.cssClass.anchorWrap),h.itemNavigable&&m.length&&t.prepend(m,f.firstElementChild);else{if((f=E(i,V,w,u,h.itemClass,r,c)).classList.add(e.cssClass.level+"-"+p.level),f.setAttribute("aria-level",p.level.toString()),g=f.querySelector("."+e.cssClass.anchorWrap),w.hasOwnProperty(u.tooltip)&&f.setAttribute("title",w[u.tooltip]),w.hasOwnProperty(u.htmlAttributes)&&w[u.htmlAttributes]&&I(f,w[u.htmlAttributes]),w.hasOwnProperty(u.enabled)&&!1===w[u.enabled]&&f.classList.add(e.cssClass.disabled),w.hasOwnProperty(u.isVisible)&&!1===w[u.isVisible]&&(f.style.display="none"),w.hasOwnProperty(u.imageUrl)&&!t.isNullOrUndefined(w[u.imageUrl])&&!h.template){var k={src:w[u.imageUrl]};t.merge(k,w[u.imageAttributes]);var N=i("img",{className:e.cssClass.image,attrs:k});g?g.insertAdjacentElement("afterbegin",N):t.prepend([N],f.firstElementChild)}if(h.showIcon&&w.hasOwnProperty(u.iconCss)&&!t.isNullOrUndefined(w[u.iconCss])&&!h.template){var T=i("div",{className:e.cssClass.icon+" "+w[u.iconCss]});g?g.insertAdjacentElement("afterbegin",T):t.prepend([T],f.firstElementChild)}O.length&&t.prepend(O,f.firstElementChild),h.itemNavigable&&m.length&&t.prepend(m,f.firstElementChild),S(i,w,u,l,h,f,p.level)}if(g&&t.addClass([f],[e.cssClass.navigable]),h.itemCreated&&"function"==typeof h.itemCreated){var B={dataSource:l,curData:l[b],text:w[u.text],item:f,options:h,fields:u};h.itemCreated(B)}m=[],y.push(f)}}return y}function h(e,i,s,n,l,r){var a=t.extend({},H,s);return O(e,c(e,i,s,n,l,r),a.listClass,s)}function d(i,s,n){if(e.cssClass=C(H.moduleName),i&&i.length){var l,r,a=Array.prototype.slice.call(i);for(l=a[(r=s?u(s,a):!0===n?a.length:-1)+(!0===n?-1:1)];l&&(!t.isVisible(l)||l.classList.contains(e.cssClass.disabled));)l=a[r+=!0===n?-1:1];return l}}function u(e,t){if(t&&e){return Array.prototype.slice.call(t).indexOf(e)}}function p(e,n,l){void 0===l&&(l="None");var r=t.extend({},s.defaultMappedFields,n),a=(new i.Query).group(r.groupBy),o=f(e,a=m(l,"key",a));e=[];for(var c=0;c<o.length;c++){var h=o[c].items,d={};d[r.text]=o[c].key,d.isHeader=!0;var u=r.text;"id"===u&&(d[u="text"]=o[c].key),d._id="group-list-item-"+(o[c].key?o[c].key.toString().trim():"undefined"),d.items=h,e.push(d);for(var p=0;p<h.length;p++)e.push(h[p])}return e}function m(e,t,s){if(void 0===s&&(s=new i.Query),"Ascending"===e)s.sortBy(t,"ascending",!0);else if("Descending"===e)s.sortBy(t,"descending",!0);else for(var n=0;n<s.queries.length;n++)"onSortBy"===s.queries[n].fn&&s.queries.splice(n,1);return s}function f(e,t){return new i.DataManager(e).executeLocal(t)}function g(e,i){var n=t.extend({},H,i),l=t.extend({},s.defaultMappedFields,n.fields),r=e.cloneNode(!0),a=[];r.classList.add("json-parent");var o=r.querySelectorAll(".json-parent>li");r.classList.remove("json-parent");for(var c=0;c<o.length;c++){for(var h=o[c],d=h.querySelector("a"),u=h.querySelector("ul"),p={},m=d?d.childNodes:h.childNodes,f=Object.keys(m),v=0;v<m.length;v++)m[Number(f[v])].hasChildNodes()||(p[l.text]=m[Number(f[v])].textContent);var I=y(h);I.id?(p[l.id]=I.id,delete I.id):p[l.id]=x(),Object.keys(I).length&&(p[l.htmlAttributes]=I),d&&(I=y(d),Object.keys(I).length&&(p[l.urlAttributes]=I)),u&&(p[l.child]=g(u,i)),a.push(p)}return a}function v(e){for(var i={typeof:null,item:null},s=0;s<e.length;s++)if(!t.isNullOrUndefined(e[s]))return i={typeof:typeof e[s],item:e[s]};return i}function I(e,i){var s={};t.merge(s,i),s.class&&(t.addClass([e],s.class.split(" ")),delete s.class),t.attributes(e,s)}function y(e){for(var t={},i=e.attributes,s=0;s<i.length;s++)t[i[s].nodeName]=i[s].nodeValue;return t}function b(i,r,a,o,c,h){e.cssClass=C(H.moduleName);for(var d,u=i("ul",{className:e.cssClass.ul,attrs:{role:"presentation"}}),p=t.extend({},H,c),m=t.extend({},s.defaultMappedFields,o),f=l(r),g=[],v=x(),I=0;I<a.length;I++){var y=n(a[I],m),b=a[I],w=b.isHeader;if(d="string"==typeof a[I]||"number"==typeof a[I]?b:y[m.value],p.itemCreating&&"function"==typeof p.itemCreating){E={dataSource:a,curData:b,text:d,options:p,fields:m};p.itemCreating(E)}p.itemCreating&&"function"==typeof p.itemCreating&&(y=n(a[I],m),d="string"==typeof a[I]||"number"==typeof a[I]?b:y[m.value]);var S=i("li",{id:v+"-"+I,className:w?e.cssClass.group:e.cssClass.li,attrs:{role:"presentation"}});if(w)"string"==typeof a[I]||"number"==typeof a[I]?S.innerText=b:S.innerText=y[m.text];else{var L=w?p.groupTemplateID:p.templateID;if(w)h&&"listview"!=h.getModuleName()?(V=f(b,h,"headerTemplate",L,!!p.isStringTemplate,null,S))&&t.append(V,S):t.append(f(b,h,"headerTemplate",L,!!p.isStringTemplate),S);else if(h&&"listview"!==h.getModuleName()){var V=f(b,h,"template",L,!!p.isStringTemplate,null,S);V&&t.append(V,S)}else t.append(f(b,h,"template",L,!!p.isStringTemplate),S);S.setAttribute("data-value",t.isNullOrUndefined(d)?"null":d),S.setAttribute("role","option")}if(p.itemCreated&&"function"==typeof p.itemCreated){var E={dataSource:a,curData:b,text:d,item:S,options:p,fields:m};p.itemCreated(E)}g.push(S)}return t.append(g,u),u}function w(e,i,n,r,a,o){for(var c=l(e),h=t.extend({},s.defaultMappedFields,n),d=t.extend({},H,a),u=h.groupBy,p=0,m=r;p<m.length;p++){var f=m[p],g={};if(g[u]=f.textContent,f.innerHTML="",o&&"listview"!==o.getModuleName()){var v=c(g,o,"groupTemplate",d.groupTemplateID,!!d.isStringTemplate,null,f);v&&t.append(v,f)}else t.append(c(g,o,"groupTemplate",d.groupTemplateID,!!d.isStringTemplate),f)}return r}function x(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function S(i,s,n,l,r,a,o){var c=s[n.child]||[],d=s[n.hasChildren];if(c.length&&(d=!0,a.classList.add(e.cssClass.hasChild),r.processSubChild)){var u=h(i,c,r,++o);a.appendChild(u)}r.expandCollapse&&d&&!r.template&&(a.firstElementChild.classList.add(e.cssClass.iconWrapper),("Left"===r.expandIconPosition?t.prepend:t.append)([i("div",{className:"e-icons "+r.expandIconClass})],a.querySelector("."+e.cssClass.textContent)))}function L(i,s,n,l,r,a,o,c,h,d){var u,p=t.extend({},H,d),m=t.extend({},D,p.ariaAttributes),f=s,g=s;"string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s&&(u=s,f="boolean"==typeof n[l.text]||"number"==typeof n[l.text]?n[l.text]:n[l.text]||"",g=n[l.value]);var v;v=t.isNullOrUndefined(u)||t.isNullOrUndefined(n[l.id])||""===n[l.id]?c+"-"+h:c;var y=i("li",{className:(!0===o?e.cssClass.group:e.cssClass.li)+" "+(t.isNullOrUndefined(r)?"":r),id:v,attrs:""!==m.groupItemRole&&""!==m.itemRole?{role:!0===o?m.groupItemRole:m.itemRole}:{}});return u&&n.hasOwnProperty(l.enabled)&&"false"===n[l.enabled].toString()&&y.classList.add(e.cssClass.disabled),o?y.innerText=f:(y.setAttribute("data-value",t.isNullOrUndefined(g)?"null":g),y.setAttribute("role","option"),u&&n.hasOwnProperty(l.htmlAttributes)&&n[l.htmlAttributes]&&I(y,n[l.htmlAttributes]),a.length&&!p.itemNavigable&&t.append(a,y),u&&(n[l.url]||n[l.urlAttributes]&&n[l.urlAttributes].href)?y.appendChild(V(i,u,l,f,a,p.itemNavigable)):(a.length&&p.itemNavigable&&t.append(a,y),y.appendChild(document.createTextNode(f)))),y}function C(e){return{li:"e-"+e+"-item",ul:"e-"+e+"-parent e-ul",group:"e-"+e+"-group-item",icon:"e-"+e+"-icon",text:"e-"+e+"-text",check:"e-"+e+"-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-"+e+"-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-"+e+"-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"}}function V(i,s,l,r,a,o){var c=n(s,l),h={href:c[l.url]};c.hasOwnProperty(l.urlAttributes)&&c[l.urlAttributes]&&(t.merge(h,c[l.urlAttributes]),h.href=c[l.url]?c[l.url]:c[l.urlAttributes].href);var d;if(o){d=i("a",{className:e.cssClass.text+" "+e.cssClass.url});var u=i("div",{className:e.cssClass.anchorWrap});a&&a.length&&t.append(a,u),u.appendChild(document.createTextNode(r)),t.append([u],d)}else d=i("a",{className:e.cssClass.text+" "+e.cssClass.url,innerHTML:r});return I(d,h),d}function E(i,s,n,r,a,o,c){var h,d,u,p=t.extend({},H,o),m=t.extend({},D,p.ariaAttributes),f=s;"string"!=typeof s&&"number"!=typeof s&&(u=s,f=n[r.text]||"",h=t.isNullOrUndefined(n._id)?n[r.id]:n._id,d=!(!s.hasOwnProperty("isHeader")||!s.isHeader)),o&&o.enableHtmlSanitizer&&(f=f);var g=i("li",{className:(!0===d?e.cssClass.group:e.cssClass.li)+" "+(t.isNullOrUndefined(a)?"":a),attrs:""!==m.groupItemRole&&""!==m.itemRole?{role:!0===d?m.groupItemRole:m.itemRole}:{}});if(!0==!t.isNullOrUndefined(h)?g.setAttribute("data-uid",h):g.setAttribute("data-uid",x()),d&&o&&o.groupTemplate){v=l(o.groupTemplate);c&&"listview"!==c.getModuleName()?(I=v(s,c,"groupTemplate",p.groupTemplateID,!!p.isStringTemplate,null,g))&&t.append(I,g):t.append(v(s,c,"groupTemplate",p.groupTemplateID,!!p.isStringTemplate),g)}else if(!d&&o&&o.template){var v=l(o.template);if(c&&"listview"!==c.getModuleName()){var I=v(s,c,"template",p.templateID,!!p.isStringTemplate,null,g);I&&t.append(I,g)}else t.append(v(s,c,"template",p.templateID,!!p.isStringTemplate),g)}else{var y=i("div",{className:e.cssClass.textContent,attrs:""!==m.wrapperRole?{role:m.wrapperRole}:{}});if(u&&(n[r.url]||n[r.urlAttributes]&&n[r.urlAttributes].href))y.appendChild(V(i,u,r,f,null,p.itemNavigable));else{var b=i("span",{className:e.cssClass.text,attrs:""!==m.itemText?{role:m.itemText}:{}});o&&o.enableHtmlSanitizer?b.innerText=f:b.innerHTML=f,y.appendChild(b)}g.appendChild(y)}return g}function O(i,s,n,l){var r=t.extend({},H,l),a=t.extend({},D,r.ariaAttributes);e.cssClass=C(r.moduleName);var o=i("ul",{className:e.cssClass.ul+" "+(t.isNullOrUndefined(n)?"":n),attrs:""!==a.listRole?{role:a.listRole}:{}});return t.append(s,o),o}function k(i,s,n,l){var r=t.extend({},H,l);return e.cssClass=C(r.moduleName),("Left"===r.expandIconPosition?t.prepend:t.append)([i("div",{className:"e-icons "+r.expandIconClass+" "+(t.isNullOrUndefined(n)?"":n)})],s.querySelector("."+e.cssClass.textContent)),s}s.defaultMappedFields={id:"id",text:"text",url:"url",value:"value",isChecked:"isChecked",enabled:"enabled",expanded:"expanded",selected:"selected",iconCss:"iconCss",child:"child",isVisible:"isVisible",hasChildren:"hasChildren",tooltip:"tooltip",htmlAttributes:"htmlAttributes",urlAttributes:"urlAttributes",imageAttributes:"imageAttributes",imageUrl:"imageUrl",groupBy:null,sortBy:null};var D={level:1,listRole:"presentation",itemRole:"presentation",groupItemRole:"group",itemText:"list-item",wrapperRole:"presentation"},H={showCheckBox:!1,showIcon:!1,enableHtmlSanitizer:!1,expandCollapse:!1,fields:s.defaultMappedFields,ariaAttributes:D,listClass:"",itemClass:"",processSubChild:!1,sortOrder:"None",template:null,groupTemplate:null,headerTemplate:null,expandIconClass:"e-icon-collapsible",moduleName:"list",expandIconPosition:"Right",itemNavigable:!1};s.createList=r,s.createListFromArray=a,s.createListItemFromArray=o,s.createListItemFromJson=c,s.createListFromJson=h,s.getSiblingLI=d,s.indexOf=u,s.groupDataSource=p,s.addSorting=m,s.getDataSource=f,s.createJsonFromElement=g,s.renderContentTemplate=b,s.renderGroupTemplate=w,s.generateId=x,s.generateUL=O,s.generateIcon=k}(e.ListBase||(e.ListBase={}));var a=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 s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),o=function(e,t,i,s){var n,l=arguments.length,r=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},c={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},h={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},d={root:"e-listview",hover:"e-hover",selected:"e-active",focused:"e-focused",parentItem:"e-list-parent",listItem:"e-list-item",listIcon:"e-list-icon",textContent:"e-text-content",listItemText:"e-list-text",groupListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-list-header",headerText:"e-headertext",headerTemplateText:"e-headertemplate-text",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back",backButton:"e-back-button",checkboxWrapper:"e-checkbox-wrapper",checkbox:"e-checkbox",checked:"e-check",checklist:"e-checklist",checkboxIcon:"e-frame",checkboxRight:"e-checkbox-right",checkboxLeft:"e-checkbox-left",listviewCheckbox:"e-listview-checkbox",itemCheckList:"e-checklist",virtualElementContainer:"e-list-virtualcontainer"},u=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return a(i,e),o([t.Property("id")],i.prototype,"id",void 0),o([t.Property("text")],i.prototype,"text",void 0),o([t.Property("isChecked")],i.prototype,"isChecked",void 0),o([t.Property("isVisible")],i.prototype,"isVisible",void 0),o([t.Property("enabled")],i.prototype,"enabled",void 0),o([t.Property("iconCss")],i.prototype,"iconCss",void 0),o([t.Property("child")],i.prototype,"child",void 0),o([t.Property("tooltip")],i.prototype,"tooltip",void 0),o([t.Property("groupBy")],i.prototype,"groupBy",void 0),o([t.Property("text")],i.prototype,"sortBy",void 0),o([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),o([t.Property("tableName")],i.prototype,"tableName",void 0),i}(t.ChildProperty),p=function(l){function r(e,t){var i=l.call(this,e,t)||this;return i.previousSelectedItems=[],i.hiddenItems=[],i.enabledItems=[],i.disabledItems=[],i}return a(r,l),r.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"htmlAttributes":this.setHTMLAttribute();break;case"cssClass":this.setCSSClass(i.cssClass);break;case"enable":this.setEnable();break;case"width":case"height":this.setSize();break;case"enableRtl":this.setEnableRTL();break;case"fields":this.listBaseOption.fields=this.fields.properties,this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"headerTitle":this.curDSLevel.length||this.header(this.headerTitle,!1,"header");break;case"query":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"showHeader":this.header(this.headerTitle,!1,"header");break;case"enableVirtualization":t.isNullOrUndefined(this.contentContainer)||t.detach(this.contentContainer),this.refresh();break;case"showCheckBox":case"checkBoxPosition":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.setCheckbox();break;case"dataSource":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.reRender();break;case"sortOrder":case"template":this.enableVirtualization||this.refresh();break;case"showIcon":this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():(this.listBaseOption.showIcon=this.showIcon,this.curViewDS=this.getSubDS(),this.resetCurrentList())}},r.prototype.setHTMLAttribute=function(){Object.keys(this.htmlAttributes).length&&t.attributes(this.element,this.htmlAttributes)},r.prototype.setCSSClass=function(e){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ").filter(function(e){return e})),e&&t.removeClass([this.element],e.split(" ").filter(function(e){return e}))},r.prototype.setSize=function(){this.element.style.height=t.formatUnit(this.height),this.element.style.width=t.formatUnit(this.width),this.isWindow=!this.element.clientHeight},r.prototype.setEnable=function(){this.enableElement(this.element,this.enable)},r.prototype.setEnableRTL=function(){this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},r.prototype.enableElement=function(e,t){t?e.classList.remove(d.disable):e.classList.add(d.disable)},r.prototype.header=function(e,i,s){if(void 0===this.headerEle&&this.showHeader){this.enableHtmlSanitizer&&this.setProperties({headerTitle:t.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.headerEle=this.createElement("div",{className:d.header});var n=this.createElement("span",{className:d.headerText,innerHTML:this.headerTitle}),l=this.createElement("div",{className:d.text,innerHTML:n.outerHTML}),r=this.createElement("div",{className:d.icon+" "+d.backIcon+" "+d.backButton,attrs:{style:"display:none;"}});if(this.headerEle.appendChild(r),this.headerEle.appendChild(l),this.headerTemplate){var a=t.compile(this.headerTemplate),o=this.createElement("div",{className:d.headerTemplateText}),c=a({},this,s,this.LISTVIEW_HEADERTEMPLATE_ID,null,null,this.headerEle);c&&t.append(c,o),t.append([o],this.headerEle),this.isReact&&this.renderReactTemplates()}this.headerTemplate&&this.headerTitle&&l.classList.add("header"),this.element.classList.add("e-has-header"),t.prepend([this.headerEle],this.element)}else if(this.headerEle)if(this.showHeader){this.headerEle.style.display="";var l=this.headerEle.querySelector("."+d.headerText),r=this.headerEle.querySelector("."+d.backIcon);this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(e)),l.innerHTML=e,this.headerTemplate&&i&&(l.parentElement.classList.remove("header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.add("nested-header")),this.headerTemplate&&!i&&(l.parentElement.classList.add("header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.remove("nested-header"),this.headerEle.querySelector("."+d.headerTemplateText).classList.add("header")),r.style.display=!0===i?"":"none"}else this.headerEle.style.display="none"},r.prototype.switchView=function(e,t,i){var s=this;if(e&&t){var n=e.style.position,l="hidden"!==this.element.style.overflow?this.element.style.overflow:"";e.style.position="absolute",e.classList.add("e-view");var r=void 0,a=this.animation.duration;if(this.animation.effect)r=this.enableRtl?h[this.animation.effect]:c[this.animation.effect];else{r=c.SlideLeft,i=this.enableRtl,a=0}this.element.style.overflow="hidden",this.aniObj.animate(e,{name:!0===i?r[0]:r[1],duration:a,timingFunction:this.animation.easing,end:function(t){e.style.display="none",s.element.style.overflow=l,e.style.position=n,e.classList.remove("e-view")}}),t.style.display="",this.aniObj.animate(t,{name:!0===i?r[2]:r[3],duration:a,timingFunction:this.animation.easing,end:function(){s.trigger("actionComplete")}}),this.curUL=t}},r.prototype.preRender=function(){if(this.template)try{document.querySelectorAll(this.template).length&&this.setProperties({template:document.querySelector(this.template).innerHTML.trim()},!0)}catch(e){t.compile(this.template)}this.listBaseOption={template:this.template,headerTemplate:this.headerTemplate,groupTemplate:this.groupTemplate,expandCollapse:!0,listClass:"",ariaAttributes:{itemRole:"option",listRole:"presentation",itemText:"",groupItemRole:"option",wrapperRole:"presentation"},fields:this.fields.properties,sortOrder:this.sortOrder,showIcon:this.showIcon,itemCreated:this.renderCheckbox.bind(this),templateID:this.element.id+"Template",groupTemplateID:this.element.id+"GroupTemplate",enableHtmlSanitizer:this.enableHtmlSanitizer},this.initialization()},r.prototype.initialization=function(){this.curDSLevel=[],this.animateOptions={},this.curViewDS=[],this.currentLiElements=[],this.isNestedList=!1,this.selectedData=[],this.selectedId=[],this.LISTVIEW_TEMPLATE_ID=this.element.id+"Template",this.LISTVIEW_GROUPTEMPLATE_ID=this.element.id+"GroupTemplate",this.LISTVIEW_HEADERTEMPLATE_ID=this.element.id+"HeaderTemplate",this.aniObj=new t.Animation(this.animateOptions),this.removeElement(this.curUL),this.removeElement(this.ulElement),this.removeElement(this.headerEle),this.removeElement(this.contentContainer),this.curUL=this.ulElement=this.liCollection=this.headerEle=this.contentContainer=void 0},r.prototype.renderCheckbox=function(e){if(e.item.classList.contains(d.hasChild)&&(this.isNestedList=!0),this.showCheckBox&&this.isValidLI(e.item)){var t=void 0;(t=s.createCheckBox(this.createElement,!1,{checked:!1,enableRtl:this.enableRtl,cssClass:d.listviewCheckbox})).setAttribute("role","checkbox");var i=t.querySelector("."+d.checkboxIcon);e.item.classList.add(d.itemCheckList),e.item.firstElementChild.classList.add(d.checkbox),"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?n(e.curData,this.listBaseOption.fields)[this.listBaseOption.fields.isChecked]&&this.checkInternally(e,t):"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]||-1===this.selectedData.indexOf(e.text)||this.checkInternally(e,t),t.setAttribute("aria-checked",i.classList.contains(d.checked)?"true":"false"),"Left"===this.checkBoxPosition?(t.classList.add(d.checkboxLeft),e.item.firstElementChild.classList.add(d.checkboxLeft),e.item.firstElementChild.insertBefore(t,e.item.firstElementChild.childNodes[0])):(t.classList.add(d.checkboxRight),e.item.firstElementChild.classList.add(d.checkboxRight),e.item.firstElementChild.appendChild(t)),this.currentLiElements.push(e.item),"Left"===this.checkBoxPosition?this.virtualCheckBox=e.item.firstElementChild.children[0]:this.virtualCheckBox=e.item.firstElementChild.lastElementChild}},r.prototype.checkInternally=function(e,t){e.item.classList.add(d.selected),e.item.setAttribute("aria-selected","true"),t.querySelector("."+d.checkboxIcon).classList.add(d.checked),t.setAttribute("aria-checked","true")},r.prototype.checkItem=function(e){this.toggleCheckBase(e,!0)},r.prototype.toggleCheckBase=function(e,i){if(this.showCheckBox){var s=e;if(e instanceof Object&&e.constructor!==HTMLLIElement&&(s=this.getLiFromObjOrElement(e)),!t.isNullOrUndefined(s)){var n=s.querySelector("."+d.checkboxIcon);!0===i?s.classList.add(d.selected):s.classList.remove(d.selected),s.setAttribute("aria-selected",i?"true":"false"),!0===i?n.classList.add(d.checked):n.classList.remove(d.checked),n.parentElement.setAttribute("aria-checked",i?"true":"false")}this.setSelectedItemData(s)}},r.prototype.uncheckItem=function(e){this.toggleCheckBase(e,!1)},r.prototype.checkAllItems=function(){this.toggleAllCheckBase(!0)},r.prototype.uncheckAllItems=function(){this.toggleAllCheckBase(!1)},r.prototype.toggleAllCheckBase=function(e){if(this.showCheckBox){for(var t=0;t<this.liCollection.length;t++){var i=this.liCollection[t].querySelector("."+d.checkboxIcon);i&&(e?i.classList.contains(d.checked)||this.checkItem(this.liCollection[t]):i.classList.contains(d.checked)&&this.uncheckItem(this.liCollection[t]))}this.enableVirtualization&&this.virtualizationModule.checkedItem(e)}},r.prototype.setCheckbox=function(){if(this.showCheckBox)for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+d.listItem)),t={item:void 0,curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:""},i=0;i<e.length;i++){var s=e[i];t.item=s,t.curData=this.getItemData(s),s.querySelector("."+d.checkboxWrapper)&&this.removeElement(s.querySelector("."+d.checkboxWrapper)),this.renderCheckbox(t),t.item.classList.contains(d.selected)&&this.checkInternally(t,t.item.querySelector("."+d.checkboxWrapper))}else{for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+d.itemCheckList)),i=0;i<e.length;i++)(s=e[i]).classList.remove(d.selected),s.firstElementChild.classList.remove(d.checkbox),this.removeElement(s.querySelector("."+d.checkboxWrapper));this.selectedItems&&this.selectedItems.item.classList.add(d.selected)}},r.prototype.refreshItemHeight=function(){this.virtualizationModule&&this.virtualizationModule.refreshItemHeight()},r.prototype.clickHandler=function(e){var i=e.target;this.targetElement=i;var s,n=i.classList;if(n.contains(d.backIcon)||n.contains(d.headerText))this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();else{var l=t.closest(i.parentNode,"."+d.listItem);if(null===l&&(l=i),this.removeFocus(),this.enable&&this.showCheckBox&&this.isValidLI(l))if(e.target.classList.contains(d.checkboxIcon)){if(l.classList.add(d.focused),t.isNullOrUndefined(l.querySelector("."+d.checked))){var r={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:l};this.checkInternally(r,r.item.querySelector("."+d.checkboxWrapper))}else this.uncheckItem(l),l.classList.add(d.focused);if(this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(l,e),e){var a=this.selectEventData(l,e),o=l.querySelector("."+d.checkboxIcon);t.merge(a,{isChecked:o.classList.contains(d.checked)}),this.trigger("select",a)}}else l.classList.contains(d.hasChild)?(this.removeHover(),this.removeSelect(),this.removeSelect(l),this.setSelectLI(l,e),l.classList.remove(d.selected)):(this.setCheckboxLI(l,e),"INPUT"!=i.nodeName&&"TEXTAREA"!=i.nodeName||(i.classList.add("e-focused"),this.targetElement=i));else this.setSelectLI(l,e),"INPUT"!=i.nodeName&&"TEXTAREA"!=i.nodeName||(i.classList.add("e-focused"),this.targetElement=i);s=t.closest(e.target,"li"),t.isNullOrUndefined(s)||s.classList.contains("e-has-child")&&!e.target.parentElement.classList.contains("e-listview-checkbox")&&s.classList.add(d.disable)}},r.prototype.removeElement=function(e){return e&&e.parentNode&&e.parentNode.removeChild(e)},r.prototype.hoverHandler=function(e){var i=t.closest(e.target.parentNode,"."+d.listItem);this.setHoverLI(i)},r.prototype.leaveHandler=function(e){this.removeHover()},r.prototype.homeKeyHandler=function(e,t){if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){this.selectedItems&&this.selectedItems.item.setAttribute("aria-selected","false");var i=this.curUL.querySelectorAll("."+d.listItem),s=this.curUL.querySelector("."+d.focused)||this.curUL.querySelector("."+d.selected);s&&(s.classList.remove(d.focused),this.showCheckBox||s.classList.remove(d.selected));var n=t?i.length-1:0;i[n].classList.contains(d.hasChild)||this.showCheckBox?i[n].classList.add(d.focused):this.setSelectLI(i[n],e),i[n]?this.element.setAttribute("aria-activedescendant",i[n].id.toString()):this.element.removeAttribute("aria-activedescendant")}},r.prototype.onArrowKeyDown=function(i,s){var n,l;return!t.isNullOrUndefined(this.curUL.querySelector("."+d.hasChild))||this.showCheckBox?(l=this.curUL.querySelector("."+d.focused)||this.curUL.querySelector("."+d.selected),n=e.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+d.listItem),l,s),t.isNullOrUndefined(n)||(l&&(l.classList.remove(d.focused),this.showCheckBox||l.classList.remove(d.selected)),n.classList.contains(d.hasChild)||this.showCheckBox?n.classList.add(d.focused):this.setSelectLI(n,i))):(l=this.curUL.querySelector("."+d.selected),n=e.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+d.listItem),l,s),this.setSelectLI(n,i)),n?this.element.setAttribute("aria-activedescendant",n.id.toString()):this.element.removeAttribute("aria-activedescendant"),n},r.prototype.arrowKeyHandler=function(e,t){var i=this;if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){var s=this.onArrowKeyDown(e,t),n=this.element.getBoundingClientRect().top,l=this.element.getBoundingClientRect().height,r=this.curUL.querySelector("."+d.listItem).getBoundingClientRect(),a=void 0,o=void 0;if(this.fields.groupBy&&(o=this.curUL.querySelector("."+d.groupListItem).getBoundingClientRect()),s){var c=s.getBoundingClientRect().top,h=s.getBoundingClientRect().height;if(t)(a=this.isWindow?c:c-n)<0&&(!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop+a);else{var u=this.isWindow?window.innerHeight:l;(a=this.isWindow?c+h:c-n+h)>u&&(!0===this.isWindow?window.scroll(0,pageYOffset+(a-u)):this.element.scrollTop=this.element.scrollTop+(a-u))}}else if(this.enableVirtualization&&t&&this.virtualizationModule.uiFirstIndex)this.onUIScrolled=function(){i.onArrowKeyDown(e,t),i.onUIScrolled=void 0},a=this.virtualizationModule.listItemHeight,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=this.element.scrollTop-a;else if(t)if(this.showHeader&&this.headerEle){var p=o?o.top:r.top,m=this.headerEle.getBoundingClientRect();a=m.top<0?m.height-p:0,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=0}else this.fields.groupBy&&(a=this.isWindow?o.top<0?o.top:0:n-r.top+o.height,!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop-a)}},r.prototype.enterKeyHandler=function(e){if(Object.keys(this.dataSource).length&&this.curUL){var i=!t.isNullOrUndefined(this.curUL.querySelector("."+d.hasChild)),s=this.curUL.querySelector("."+d.focused);i&&s&&(s.classList.remove(d.focused),this.showCheckBox&&(this.removeSelect(),this.removeSelect(s),this.removeHover()),this.setSelectLI(s,e))}},r.prototype.spaceKeyHandler=function(e){if(e.preventDefault(),this.enable&&this.showCheckBox&&Object.keys(this.dataSource).length&&this.curUL){var i=this.curUL.querySelector("."+d.focused),s=void 0,n=void 0;if(!t.isNullOrUndefined(i)&&t.isNullOrUndefined(i.querySelector("."+d.checked))){var l={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:i};s=l.item.querySelector("."+d.checkboxWrapper),this.checkInternally(l,s),n=s.querySelector("."+d.checkboxIcon+"."+d.icon)}else this.uncheckItem(i);var r=this.selectEventData(i,e);t.merge(r,{isChecked:!!n&&n.classList.contains(d.checked)}),this.trigger("select",r)}},r.prototype.keyActionHandler=function(e){switch(e.keyCode){case 36:this.homeKeyHandler(e);break;case 35:this.homeKeyHandler(e,!0);break;case 40:this.arrowKeyHandler(e);break;case 38:this.arrowKeyHandler(e,!0);break;case 13:this.enterKeyHandler(e);break;case 8:this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();break;case 32:!t.isNullOrUndefined(this.targetElement)&&this.targetElement.classList.contains("e-focused")||this.spaceKeyHandler(e)}},r.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&e.velocity>.5&&"touchend"===e.originalEvent.type&&(this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back())},r.prototype.focusout=function(){if(Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+d.focused),t=this.curUL.querySelector("[aria-selected = true]");e&&(e.classList.remove(d.focused),t&&!this.showCheckBox&&t.classList.add(d.selected))}},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,"keydown",this.keyActionHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),t.EventHandler.add(this.element,"focusout",this.focusout,this),this.touchModule=new t.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.touchModule.destroy()},r.prototype.removeFocus=function(){for(var e=0,t=this.element.querySelectorAll("."+d.focused);e<t.length;e++)t[e].classList.remove(d.focused)},r.prototype.removeHover=function(){var e=this.element.querySelector("."+d.hover);e&&e.classList.remove(d.hover)},r.prototype.removeSelect=function(e){if(t.isNullOrUndefined(e))for(var i=0,s=this.element.querySelectorAll("."+d.selected);i<s.length;i++){var n=s[i];this.showCheckBox&&n.querySelector("."+d.checked)||(n.setAttribute("aria-selected","false"),n.classList.remove(d.selected))}else e.classList.remove(d.selected),e.setAttribute("aria-selected","false")},r.prototype.isValidLI=function(e){return e&&e.classList.contains(d.listItem)&&!e.classList.contains(d.groupListItem)&&!e.classList.contains(d.disable)},r.prototype.setCheckboxLI=function(e,i){if(this.isValidLI(e)&&this.enable&&this.showCheckBox){this.curUL.querySelector("."+d.focused)&&this.curUL.querySelector("."+d.focused).classList.remove(d.focused);var s=e.querySelector("textarea")||e.querySelector("input");e.classList.add(d.focused),t.isNullOrUndefined(i)||i.target===s&&s.classList.add("e-focused");var n=e.querySelector("."+d.checkboxWrapper),l=n.querySelector("."+d.checkboxIcon+"."+d.icon);this.removeHover(),l.classList.contains(d.checked)?(l.classList.remove(d.checked),e.classList.remove(d.selected),e.setAttribute("aria-selected","false")):(l.classList.add(d.checked),e.classList.add(d.selected),e.setAttribute("aria-selected","true")),n.setAttribute("aria-checked",l.classList.contains(d.checked)?"true":"false");var r=this.selectEventData(e,i);t.merge(r,{isChecked:l.classList.contains(d.checked)}),this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(e,i),this.trigger("select",r),this.setSelectedItemData(e),this.renderSubList(e)}},r.prototype.selectEventData=function(e,i){var s,l=this.getItemData(e),r=n(l,this.listBaseOption.fields);s=!t.isNullOrUndefined(l)&&"string"==typeof this.dataSource[0]||"number"==typeof this.dataSource[0]?{item:e,text:e&&e.innerText.trim(),data:this.dataSource}:{item:e,text:r&&r[this.listBaseOption.fields.text],data:l};var a={};return t.merge(a,s),i&&t.merge(a,{isInteracted:!0,event:i,cancel:!1,index:this.curUL&&Array.prototype.indexOf.call(this.curUL.children,e)}),a},r.prototype.setSelectedItemData=function(e){var i=this.getItemData(e),s=n(i,this.listBaseOption.fields);t.isNullOrUndefined(i)||"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?this.selectedItems={item:e,text:s&&s[this.listBaseOption.fields.text],data:i}:this.selectedItems={item:e,text:e&&e.innerText.trim(),data:this.dataSource}},r.prototype.setSelectLI=function(e,t){var i=this;if(this.isValidLI(e)&&!e.classList.contains(d.selected)&&this.enable){this.showCheckBox||this.removeSelect(),e.classList.add(d.selected),e.setAttribute("aria-selected","true"),this.removeHover(),this.setSelectedItemData(e),this.enableVirtualization&&this.virtualizationModule.setSelectLI(e,t);var s=this.selectEventData(e,t);this.trigger("select",s,function(t){t.cancel||(i.selectedLI=e,i.renderSubList(e))})}},r.prototype.setHoverLI=function(e){if(this.isValidLI(e)&&!e.classList.contains(d.hover)&&this.enable){var i=this.element.querySelectorAll("."+d.hover);i&&i.length&&t.removeClass(i,d.hover),e.classList.contains(d.selected)&&!this.showCheckBox||e.classList.add(d.hover)}},r.prototype.getSubDS=function(){var e=this.curDSLevel;if(e.length){for(var t=this.localData,i=0,s=e;i<s.length;i++){var l=s[i],r={};r[this.fields.id]=l,this.curDSJSON=this.findItemFromDS(t,r);var a=n(this.curDSJSON,this.listBaseOption.fields);t=this.curDSJSON?a[this.fields.child]:t}return t}return this.localData},r.prototype.getItemData=function(e){var s,n=this.dataSource instanceof i.DataManager?this.localData:this.dataSource,l=this.getElementUID(e);return s=t.isNullOrUndefined(this.element.querySelector("."+d.hasChild))&&this.fields.groupBy?this.curViewDS:n,this.findItemFromDS(s,l)},r.prototype.findItemFromDS=function(e,i,s){var l,r=this;return e&&e.length&&i?e.some(function(a){var o=n(a,r.listBaseOption.fields);if(!i[r.fields.id]&&!i[r.fields.text]||i[r.fields.id]&&(!t.isNullOrUndefined(o[r.fields.id])&&o[r.fields.id].toString())!==i[r.fields.id].toString()||i[r.fields.text]&&o[r.fields.text]!==i[r.fields.text])if("object"!=typeof a&&-1!==e.indexOf(a))l=s?e:a;else if(!t.isNullOrUndefined(i[r.fields.id])&&t.isNullOrUndefined(o[r.fields.id])){var c=r.element.querySelector('[data-uid="'+i[r.fields.id]+'"]');c&&c.innerText.trim()===o[r.fields.text]&&(l=a)}else o.hasOwnProperty(r.fields.child)&&o[r.fields.child].length&&(l=r.findItemFromDS(o[r.fields.child],i,s));else l=s?e:a;return!!l}):l=e,l},r.prototype.getQuery=function(){var t=[],s=this.query?this.query:new i.Query;if(!this.query){for(var n=0,l=Object.keys(this.fields.properties);n<l.length;n++){var r=l[n];"tableName"!==r&&this.fields[r]&&this.fields[r]!==e.ListBase.defaultMappedFields[r]&&-1===t.indexOf(this.fields[r])&&t.push(this.fields[r])}s.select(t),this.fields.properties.hasOwnProperty("tableName")&&s.from(this.fields.tableName)}return s},r.prototype.setViewDataSource=function(i){void 0===i&&(i=this.localData);var s=t.isNullOrUndefined(this.fields.sortBy)?this.fields.text:this.fields.sortBy,n=e.ListBase.addSorting(this.sortOrder,s);i&&this.fields.groupBy?"None"!==this.sortOrder?this.curViewDS=e.ListBase.groupDataSource(e.ListBase.getDataSource(i,n),this.listBaseOption.fields,this.sortOrder):this.curViewDS=e.ListBase.groupDataSource(i,this.listBaseOption.fields,this.sortOrder):i&&"None"!==this.sortOrder?this.curViewDS=e.ListBase.getDataSource(i,n):this.curViewDS=i},r.prototype.isInAnimation=function(){return this.curUL.classList.contains(".e-animate")},r.prototype.renderRemoteLists=function(e,t){this.isDestroyed||(this.localData=e.result,t.removeElement(t.contentContainer),this.renderList(),this.trigger("actionComplete",e))},r.prototype.triggerActionFailure=function(e){this.isDestroyed||this.trigger("actionFailure",e)},r.prototype.setLocalData=function(){var s=this;this.trigger("actionBegin");var n=this;if(this.dataSource instanceof i.DataManager)this.dataSource.ready?this.dataSource.ready.then(function(e){s.isOffline=s.dataSource.dataSource.offline,s.dataSource instanceof i.DataManager&&s.isOffline&&s.renderRemoteLists(e,n)}).catch(function(e){s.triggerActionFailure(e)}):this.dataSource.executeQuery(this.getQuery()).then(function(e){s.renderRemoteLists(e,n)}).catch(function(e){s.triggerActionFailure(e)});else if(this.dataSource&&this.dataSource.length)this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData});else{var l=this.element.querySelector("ul");l&&(t.remove(l),this.setProperties({dataSource:e.ListBase.createJsonFromElement(l)},!0),this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData}))}},r.prototype.reRender=function(){this.removeElement(this.headerEle),this.removeElement(this.ulElement),this.removeElement(this.contentContainer),this.isReact&&this.clearTemplate(),-1===Object.keys(window).indexOf("ejsInterop")&&(this.element.innerHTML=""),this.headerEle=this.ulElement=this.liCollection=void 0,this.header(),this.setLocalData()},r.prototype.resetCurrentList=function(){this.setViewDataSource(this.curViewDS),this.contentContainer.innerHTML="",this.createList(),this.renderIntoDom(this.curUL)},r.prototype.setAttributes=function(e){for(var t=0;t<e.length;t++){var i=e[t];i.classList.contains("e-list-item")&&(i.setAttribute("id",this.element.id+"_"+i.getAttribute("data-uid")),i.setAttribute("aria-selected","false"),i.setAttribute("tabindex","-1"))}},r.prototype.createList=function(){this.currentLiElements=[],this.isNestedList=!1,this.ulElement=this.curUL=e.ListBase.createList(this.createElement,this.curViewDS,this.listBaseOption,null,this),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.setAttributes(this.liCollection)},r.prototype.exceptionEvent=function(e){this.trigger("actionFailure",e)},r.prototype.UpdateCurrentUL=function(){this.ulElement=this.curUL=this.element.querySelector("."+d.parentItem),this.curUL&&(this.liCollection=this.curUL.querySelectorAll("."+d.listItem))},r.prototype.renderSubList=function(i){this.liElement=i;var s=i.getAttribute("data-uid");if(i.classList.contains(d.hasChild)&&s){var l=t.closest(i.parentNode,"."+d.parentItem),r=this.element.querySelector("[pid='"+s+"']");if(this.curDSLevel.push(s),this.setViewDataSource(this.getSubDS()),!r){var a=this.curViewDS;r=e.ListBase.createListFromJson(this.createElement,a,this.listBaseOption,this.curDSLevel.length,null,this),this.isReact&&this.renderReactTemplates();var o=r.querySelectorAll("."+d.listItem);this.setAttributes(o),r.setAttribute("pID",s),r.style.display="none",this.renderIntoDom(r)}if(this.switchView(l,r),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.selectedItems){var c=n(this.selectedItems.data,this.listBaseOption.fields);this.header(c[this.listBaseOption.fields.text],!0,"header")}this.selectedLI=void 0}},r.prototype.renderIntoDom=function(e){this.contentContainer.appendChild(e)},r.prototype.renderList=function(e){this.setViewDataSource(e),this.enableVirtualization?(Object.keys(this.dataSource).length&&(!this.template&&!this.groupTemplate||this.virtualizationModule.isNgTemplate()||(this.isReact?("string"==typeof this.template&&(this.listBaseOption.template=null),"string"==typeof this.groupTemplate&&(this.listBaseOption.groupTemplate=null)):(this.listBaseOption.template=null,this.listBaseOption.groupTemplate=null),this.listBaseOption.itemCreated=this.virtualizationModule.createUIItem.bind(this.virtualizationModule))),this.virtualizationModule.uiVirtualization()):(this.createList(),this.contentContainer=this.createElement("div",{className:d.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement),this.isReact&&this.renderReactTemplates())},r.prototype.getElementUID=function(e){var t={};return e instanceof Element?t[this.fields.id]=e.getAttribute("data-uid"):t=e,t},r.prototype.render=function(){this.element.classList.add(d.root),t.attributes(this.element,{role:"list",tabindex:"0"}),this.setCSSClass(),this.setEnableRTL(),this.setEnable(),this.setSize(),this.wireEvents(),this.header(),this.setLocalData(),this.setHTMLAttribute(),this.rippleFn=t.rippleEffect(this.element,{selector:"."+d.listItem}),this.renderComplete()},r.prototype.destroy=function(){this.isReact&&this.clearTemplate(),this.unWireEvents();var e=[d.root,d.disable,"e-rtl","e-has-header","e-lib"].concat(this.cssClass.split(" ").filter(function(e){return e}));t.removeClass([this.element],e),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex"),this.curUL=this.ulElement=this.liCollection=this.headerEle=void 0,this.element.innerHTML="",l.prototype.destroy.call(this)},r.prototype.back=function(){var e=this.curDSLevel[this.curDSLevel.length-1];if(void 0!==e&&!this.isInAnimation()){this.curDSLevel.pop(),this.setViewDataSource(this.getSubDS());var i=this.element.querySelector("[data-uid='"+e+"']"),s=this.curUL;i?i=i.parentElement:(this.createList(),this.renderIntoDom(this.ulElement),i=this.curUL);var l=n(this.curDSJSON,this.listBaseOption.fields)[this.fields.text];this.switchView(s,i,!0),this.removeFocus();var r=this.element.querySelector("[data-uid='"+e+"']");r.classList.remove(d.disable),r.classList.add(d.focused),this.showCheckBox&&r.querySelector("."+d.checkboxIcon).classList.contains(d.checked)?r.setAttribute("aria-selected","true"):(r.classList.remove(d.selected),r.setAttribute("aria-selected","false")),this.liCollection=this.curUL.querySelectorAll("."+d.listItem),this.enableHtmlSanitizer&&this.setProperties({headerTitle:t.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.header(this.curDSLevel.length?l:this.headerTitle,!!this.curDSLevel.length,"header")}},r.prototype.selectItem=function(e){this.enableVirtualization?this.virtualizationModule.selectItem(e):this.showCheckBox?this.setCheckboxLI(this.getLiFromObjOrElement(e)):!0===t.isNullOrUndefined(e)?this.removeSelect():this.setSelectLI(this.getLiFromObjOrElement(e))},r.prototype.getLiFromObjOrElement=function(e){var s,l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(!t.isNullOrUndefined(e))if("string"==typeof l[0]||"number"==typeof l[0])if(e instanceof Element){for(var r=e.getAttribute("data-uid").toString(),a=0;a<this.liCollection.length;a++)if(this.liCollection[a].getAttribute("data-uid").toString()===r){s=this.liCollection[a];break}}else Array.prototype.some.call(this.curUL.querySelectorAll("."+d.listItem),function(t){return t.innerText.trim()===e.toString()&&(s=t,!0)});else{var o=this.getItemData(e),c=n(o,this.listBaseOption.fields);if(o&&(s=this.element.querySelector('[data-uid="'+c[this.fields.id]+'"]'),!this.enableVirtualization&&t.isNullOrUndefined(s)))for(var h=this.element.querySelectorAll("."+d.listItem),a=0;a<h.length;a++)h[a].innerText.trim()===c[this.fields.text]&&(s=h[a])}return s},r.prototype.selectMultipleItems=function(e){if(!t.isNullOrUndefined(e))for(var i=0;i<e.length;i++)t.isNullOrUndefined(e[i])||this.selectItem(e[i])},r.prototype.getParentId=function(){var e=[];if(this.isNestedList)for(var t=this.curDSLevel.length-1;t>=0;t--)e.push(this.curDSLevel[t]);return e},r.prototype.getSelectedItems=function(){var e,s=!1;this.selectedId=[];var l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(this.enableVirtualization&&!s)e=this.virtualizationModule.getSelectedItems(),s=!0;else if(this.showCheckBox&&!s){var r=this.curUL.getElementsByClassName(d.selected),a=[],o=[];this.selectedId=[];for(var c=[],h=0;h<r.length;h++)if("string"==typeof l[0]||"number"==typeof l[0])a.push(r[h].innerText.trim());else{var u=this.getItemData(r[h]),p=n(u,this.listBaseOption.fields);this.isNestedList?c.push({data:u,parentId:this.getParentId()}):o.push(u),p?(a.push(p[this.listBaseOption.fields.text]),this.selectedId.push(p[this.listBaseOption.fields.id])):(a.push(void 0),this.selectedId.push(void 0))}"string"!=typeof l[0]&&"number"!=typeof l[0]||s||(e={item:r,data:l,text:a},s=!0),this.isNestedList&&!s?(e={item:r,data:c,text:a},s=!0):s||(e={item:r,data:o,text:a},s=!0)}else if(!s){var m=this.element.getElementsByClassName(d.selected)[0],p=n(this.getItemData(m),this.listBaseOption.fields);"string"!=typeof l[0]&&"number"!=typeof l[0]||s?s||(t.isNullOrUndefined(p)||t.isNullOrUndefined(m)?(e=void 0,s=!0):(this.selectedId.push(p[this.listBaseOption.fields.id]),e={text:p[this.listBaseOption.fields.text],item:m,data:this.getItemData(m)},s=!0)):(e=t.isNullOrUndefined(m)?void 0:{item:m,data:l,text:m.innerText.trim()},s=!0)}return e},r.prototype.findItem=function(e){return this.getItemData(e)},r.prototype.enableItem=function(e){this.setItemState(e,!0),this.enableVirtualization&&this.virtualizationModule.enableItem(e)},r.prototype.disableItem=function(e){this.setItemState(e,!1),this.enableVirtualization&&this.virtualizationModule.disableItem(e)},r.prototype.setItemState=function(e,t){var i=this.getItemData(e),s=n(i,this.listBaseOption.fields);if(i){var l=this.element.querySelector('[data-uid="'+s[this.fields.id]+'"]');t?(l&&l.classList.remove(d.disable),delete i[this.fields.enabled]):t||(l&&l.classList.add(d.disable),i[this.fields.enabled]=!1)}},r.prototype.showItem=function(e){this.showHideItem(e,!1,""),this.enableVirtualization&&this.virtualizationModule.showItem(e)},r.prototype.hideItem=function(e){this.showHideItem(e,!0,"none"),this.enableVirtualization&&this.virtualizationModule.hideItem(e)},r.prototype.showHideItem=function(e,t,i){var s=this.getItemData(e),l=n(s,this.listBaseOption.fields);if(s){var r=this.element.querySelector('[data-uid="'+l[this.fields.id]+'"]');r&&(r.style.display=i),t?s[this.fields.isVisible]=!1:delete s[this.fields.isVisible]}},r.prototype.addItem=function(e,t){void 0===t&&(t=void 0);var s=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;this.addItemInternally(e,t,s)},r.prototype.addItemInternally=function(e,t,i){if(e instanceof Array)if(this.enableVirtualization)this.virtualizationModule.addItem(e,t,i);else{var s=this.findItemFromDS(i,t),l=void 0;if(s&&((l=n(s,this.listBaseOption.fields)[this.fields.child])||(l=[]),l=l.concat(e)),s instanceof Array){for(var r=0;r<e.length;r++){i.push(e[r]),this.setViewDataSource(i);var a=this.contentContainer?this.contentContainer.children[0]:null;this.contentContainer&&a?this.addItemIntoDom(e[r],a,this.curViewDS):this.reRender()}this.liCollection=this.curUL.querySelectorAll("."+d.listItem)}else s&&(s[this.fields.child]=l,this.addItemInNestedList(s,e))}},r.prototype.addItemInNestedList=function(i,s){var n=i[this.fields.id],l=i[this.fields.child],r=this.element.querySelector("[pid='"+n+"']"),a=this.element.querySelector("[data-uid='"+n+"']"),o=r||(a?t.closest(a,"ul"):null),c=r?l:[i];if(!!a&&!a.classList.contains(d.hasChild)){var h=e.ListBase.createListItemFromJson(this.createElement,c,this.listBaseOption,null,null,this);this.setAttributes(h),o.insertBefore(h[0],a),t.detach(a)}if(r&&s)for(var u=0;u<s.length;u++)c.push(s[u]),this.addItemIntoDom(s[u],o,c)},r.prototype.addItemIntoDom=function(e,t,i){var s=i.indexOf(e);this.addListItem(e,s,t,i);var n=i[s-1];n&&n.isHeader&&1===n.items.length&&this.addListItem(n,s-1,t,i)},r.prototype.addListItem=function(t,i,s,n){var l=this.getLiFromObjOrElement(n[i+1])||this.getLiFromObjOrElement(n[i+2])||null,r=e.ListBase.createListItemFromJson(this.createElement,[t],this.listBaseOption,null,null,this);if(this.setAttributes(r),this.template&&this.isReact&&this.renderReactTemplates(),this.fields.groupBy&&n[i+1]&&n[i+1].isHeader){var a=this.getLiFromObjOrElement(n[i-1]);a&&(l=a.nextElementSibling)}s.insertBefore(r[0],l)},r.prototype.removeItem=function(e){var t=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;this.enableVirtualization?this.virtualizationModule.removeItem(e):this.removeItemFromList(e,t)},r.prototype.removeItemFromList=function(i,s){var n,l=this,r=this.curViewDS,a=i instanceof Element?this.getElementUID(i):i;if(n=this.findItemFromDS(s,a,!0)){var o;o=this.findItemFromDS(n,a);var c=r.indexOf(o),h=this.getLiFromObjOrElement(i),u=void 0;this.validateNestedView(h),this.fields.groupBy&&this.curViewDS[c-1]&&r[c-1].isHeader&&1===r[c-1].items.length&&h&&h.previousElementSibling.classList.contains(d.groupListItem)&&(t.isNullOrUndefined(h.nextElementSibling)||h.nextElementSibling&&h.nextElementSibling.classList.contains(d.groupListItem))&&(u=h.previousElementSibling),h&&t.detach(h),u&&t.detach(u);var p=n.length-1<=0?this.findParent(this.localData,this.fields.id,function(e){return e===o[l.fields.id]},null):null,m=n.indexOf(o);if(n.splice(m,1),this.setViewDataSource(s),p&&p.parent&&Array.isArray(p.parent[this.fields.child])&&p.parent[this.fields.child].length<=0){var f=this.getLiFromObjOrElement(p.parent);if(f){var g=e.ListBase.createListItemFromJson(this.createElement,[p.parent],this.listBaseOption,null,null,this);this.setAttributes(g),f.parentElement.insertBefore(g[0],f),f.parentElement.removeChild(f)}}n.length<=0&&this.back(),this.liCollection=Array.prototype.slice.call(this.element.querySelectorAll("."+d.listItem))}},r.prototype.validateNestedView=function(e){var t=e?e.getAttribute("data-uid").toString().toLowerCase():null;if(t&&this.curDSLevel&&this.curDSLevel.length>0)for(;this.curDSLevel.some(function(e){return e.toString().toLowerCase()===t});)this.back()},r.prototype.removeMultipleItems=function(e){if(e.length)for(var t=0;t<e.length;t++)this.removeItem(e[t])},r.prototype.findParent=function(e,i,s,n){if(e.hasOwnProperty(i)&&!0===s(e[i]))return t.extend({},e);for(var l=0;l<Object.keys(e).length;l++)if(e[Object.keys(e)[l]]&&"object"==typeof e[Object.keys(e)[l]]){var r=this.findParent(e[Object.keys(e)[l]],i,s,e);if(null!=r)return r.parent||(r.parent=n),r}return null},r.prototype.getModuleName=function(){return"listview"},r.prototype.requiredModules=function(){var e=[];return this.enableVirtualization&&e.push({args:[this],member:"virtualization"}),e},r.prototype.getPersistData=function(){return this.addOnPersist(["cssClass","enableRtl","htmlAttributes","enable","fields","animation","headerTitle","sortOrder","showIcon","height","width","showCheckBox","checkBoxPosition"])},o([t.Property("")],r.prototype,"cssClass",void 0),o([t.Property(!1)],r.prototype,"enableVirtualization",void 0),o([t.Property({})],r.prototype,"htmlAttributes",void 0),o([t.Property(!0)],r.prototype,"enable",void 0),o([t.Property([])],r.prototype,"dataSource",void 0),o([t.Property()],r.prototype,"query",void 0),o([t.Complex(e.ListBase.defaultMappedFields,u)],r.prototype,"fields",void 0),o([t.Property({effect:"SlideLeft",duration:400,easing:"ease"})],r.prototype,"animation",void 0),o([t.Property("None")],r.prototype,"sortOrder",void 0),o([t.Property(!1)],r.prototype,"showIcon",void 0),o([t.Property(!1)],r.prototype,"showCheckBox",void 0),o([t.Property("Left")],r.prototype,"checkBoxPosition",void 0),o([t.Property("")],r.prototype,"headerTitle",void 0),o([t.Property(!1)],r.prototype,"showHeader",void 0),o([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),o([t.Property("")],r.prototype,"height",void 0),o([t.Property("")],r.prototype,"width",void 0),o([t.Property(null)],r.prototype,"template",void 0),o([t.Property(null)],r.prototype,"headerTemplate",void 0),o([t.Property(null)],r.prototype,"groupTemplate",void 0),o([t.Event()],r.prototype,"select",void 0),o([t.Event()],r.prototype,"actionBegin",void 0),o([t.Event()],r.prototype,"actionComplete",void 0),o([t.Event()],r.prototype,"actionFailure",void 0),r=o([t.NotifyPropertyChanges],r)}(t.Component),m=function(){function s(e){this.elementDifference=0,this.listViewInstance=e}return s.prototype.isNgTemplate=function(){return!t.isNullOrUndefined(this.listViewInstance.templateRef)&&"string"!=typeof this.listViewInstance.templateRef},s.prototype.uiVirtualization=function(){this.wireScrollEvent(!1);var i=this.listViewInstance.curViewDS,s=i.slice(0,1);this.listViewInstance.ulElement=this.listViewInstance.curUL=e.ListBase.createList(this.listViewInstance.createElement,s,this.listViewInstance.listBaseOption,null,this.listViewInstance),this.listViewInstance.contentContainer=this.listViewInstance.createElement("div",{className:d.content}),this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer),this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement),this.listItemHeight=this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height,this.expectedDomItemCount=this.ValidateItemCount(1e4),this.domItemCount=this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length),this.uiFirstIndex=0,this.uiLastIndex=this.domItemCount-1;var n=i.slice(1,this.domItemCount),l=e.ListBase.createListItemFromJson(this.listViewInstance.createElement,n,this.listViewInstance.listBaseOption,null,null,this.listViewInstance);t.append(l,this.listViewInstance.ulElement),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li"),this.topElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.topElement,this.listViewInstance.ulElement.firstElementChild),this.bottomElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.bottomElement,null),this.totalHeight=Object.keys(i).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.uiIndicesInitialization()},s.prototype.wireScrollEvent=function(e){e?!0===this.listViewInstance.isWindow?(window.removeEventListener("scroll",this.onVirtualScroll),window.removeEventListener("scroll",this.updateUl)):(t.EventHandler.remove(this.listViewInstance.element,"scroll",this.onVirtualUiScroll),t.EventHandler.remove(this.listViewInstance.element,"scroll",this.updateUlContainer)):this.listViewInstance.isWindow?(this.onVirtualScroll=this.onVirtualUiScroll.bind(this),window.addEventListener("scroll",this.onVirtualScroll)):t.EventHandler.add(this.listViewInstance.element,"scroll",this.onVirtualUiScroll,this)},s.prototype.updateUlContainer=function(e){var i,s=this.listViewInstance.ulElement.querySelector("."+d.virtualElementContainer);t.isNullOrUndefined(this.listViewInstance.liElementHeight)&&this.listViewInstance.updateLiElementHeight(),((i=this.listViewInstance.isWindow?Math.round(e.target.documentElement.scrollTop/this.listViewInstance.liElementHeight)-2:Math.round(e.target.scrollTop/this.listViewInstance.liElementHeight)-2)-1)*this.listViewInstance.liElementHeight<0?s.style.top="0px":s.style.top=i*this.listViewInstance.liElementHeight+"px"},s.prototype.ValidateItemCount=function(e){var i,s=parseFloat(t.formatUnit(this.listViewInstance.height));return(i=this.listViewInstance.isWindow?Math.round(window.innerHeight/this.listItemHeight*3):"string"==typeof this.listViewInstance.height&&-1!==this.listViewInstance.height.indexOf("%")?Math.round(this.listViewInstance.element.getBoundingClientRect().height/this.listItemHeight*1.5):Math.round(s/this.listItemHeight*1.5))>e&&(i=e),i},s.prototype.uiIndicesInitialization=function(){this.uiIndices={activeIndices:[],disabledItemIndices:[],hiddenItemIndices:[]};for(var e=this.listViewInstance.curViewDS,i=0;i<e.length;i++)this.listViewInstance.showCheckBox&&e[i][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(i),t.isNullOrUndefined(e[i][this.listViewInstance.fields.enabled])||e[i][this.listViewInstance.fields.enabled]||this.uiIndices.disabledItemIndices.push(i);if(this.isNgTemplate())for(var s=this.listViewInstance.element.querySelectorAll("."+d.listItem),n=0;n<s.length;n++)s[n].context=this.listViewInstance.viewContainerRef.get(n).context},s.prototype.refreshItemHeight=function(){if(this.listViewInstance.curViewDS.length){var e=this.listViewInstance.curViewDS;this.listItemHeight=this.topElement.nextSibling.getBoundingClientRect().height,this.totalHeight=Object.keys(e).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.bottomElementHeight=this.totalHeight,this.bottomElement.style.height=this.totalHeight+"px"}},s.prototype.getscrollerHeight=function(e){return this.listViewInstance.isWindow?pageYOffset-e<=0?0:pageYOffset-e:this.listViewInstance.element.scrollTop-e<=0?0:this.listViewInstance.element.scrollTop-e},s.prototype.onVirtualUiScroll=function(e){var i,s;s=this.listViewInstance.isWindow?this.listViewInstance.ulElement.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top:this.listViewInstance.headerEle?this.listViewInstance.headerEle.getBoundingClientRect().height:0,this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var n=this.getscrollerHeight(s);if(this.topElementHeight=this.listItemHeight*Math.floor(n/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,i=n<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=i[0],this.bottomElementHeight=i[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",n>this.scrollPosition)(l=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff))>this.expectedDomItemCount+5?this.onLongScroll(l,!0):this.onNormalScroll(l,!0);else{var l=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);l>this.expectedDomItemCount+5?this.onLongScroll(l,!1):this.onNormalScroll(l,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),"function"==typeof this.listViewInstance.onUIScrolled&&this.listViewInstance.onUIScrolled(),this.scrollPosition=n},s.prototype.onLongScroll=function(e,t){for(var i=t?this.uiFirstIndex+e:this.uiFirstIndex-e,s=this.listViewInstance.ulElement.querySelectorAll("li"),n=0;n<s.length;n++)this.updateUI(s[n],i),i++;this.uiLastIndex=t?this.uiLastIndex+e:this.uiLastIndex-e,this.uiFirstIndex=t?this.uiFirstIndex+e:this.uiFirstIndex-e},s.prototype.onNormalScroll=function(e,t){if(t)for(i=0;i<e;i++){s=++this.uiLastIndex;this.updateUI(this.topElement.nextElementSibling,s,this.bottomElement),this.uiFirstIndex++}else for(var i=0;i<e;i++){var s=--this.uiFirstIndex,n=this.topElement.nextSibling;this.updateUI(this.bottomElement.previousElementSibling,s,n),this.uiLastIndex--}},s.prototype.updateUiContent=function(i,s){var n=this.listViewInstance.curViewDS;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]?(i.dataset.uid=e.ListBase.generateId(),i.getElementsByClassName(d.listItemText)[0].innerHTML=this.listViewInstance.curViewDS[s].toString()):(i.dataset.uid=n[s][this.listViewInstance.fields.id]?n[s][this.listViewInstance.fields.id]:e.ListBase.generateId(),i.getElementsByClassName(d.listItemText)[0].innerHTML=n[s][this.listViewInstance.fields.text]),this.listViewInstance.showIcon&&(i.querySelector("."+d.listIcon)&&t.detach(i.querySelector("."+d.listIcon)),this.listViewInstance.curViewDS[s][this.listViewInstance.fields.iconCss])){var l=i.querySelector("."+d.textContent),r=this.listViewInstance.createElement("div",{className:d.listIcon+" "+this.listViewInstance.curViewDS[s][this.listViewInstance.fields.iconCss]});l.insertBefore(r,i.querySelector("."+d.listItemText))}if(this.listViewInstance.showCheckBox&&this.listViewInstance.fields.groupBy){this.checkListWrapper||(this.checkListWrapper=this.listViewInstance.curUL.querySelector("."+d.checkboxWrapper).cloneNode(!0));l=i.querySelector("."+d.textContent);this.listViewInstance.curViewDS[s].isHeader?i.querySelector("."+d.checkboxWrapper)&&(i.classList.remove(d.checklist),l.classList.remove(d.checkbox),t.detach(i.querySelector("."+d.checkboxWrapper))):i.querySelector("."+d.checkboxWrapper)||(i.classList.add(d.checklist),l.classList.add(d.checkbox),l.insertBefore(this.checkListWrapper.cloneNode(!0),i.querySelector("."+d.listItemText)))}},s.prototype.changeElementAttributes=function(e,i){if(e.classList.remove(d.disable),this.uiIndices.disabledItemIndices.length&&-1!==this.uiIndices.disabledItemIndices.indexOf(i)&&e.classList.add(d.disable),e.style.display="",this.uiIndices.hiddenItemIndices.length&&-1!==this.uiIndices.hiddenItemIndices.indexOf(i)&&(e.style.display="none"),this.listViewInstance.showCheckBox){var s=e.querySelector("."+d.checkboxWrapper);e.classList.remove(d.selected),e.classList.remove(d.focused),s&&(s.removeAttribute("aria-checked"),s.firstElementChild.classList.remove(d.checked)),this.uiIndices.activeIndices.length&&-1!==this.uiIndices.activeIndices.indexOf(i)&&!this.listViewInstance.curUL.querySelector(d.selected)&&(e.classList.add(d.selected),s.firstElementChild.classList.add(d.checked),s.setAttribute("aria-checked","true"),this.activeIndex===i&&e.classList.add(d.focused))}else e.classList.remove(d.selected),e.removeAttribute("aria-selected"),t.isNullOrUndefined(this.activeIndex)||this.activeIndex!==i||this.listViewInstance.curUL.querySelector(d.selected)||(e.classList.add(d.selected),e.setAttribute("aria-selected","true"));this.listViewInstance.fields.groupBy&&(this.listViewInstance.curViewDS[i].isHeader?e.classList.contains(d.listItem)&&(e.classList.remove(d.listItem),e.setAttribute("role","group"),e.classList.add(d.groupListItem)):e.classList.contains(d.groupListItem)&&(e.classList.remove(d.groupListItem),e.setAttribute("role","listitem"),e.classList.add(d.listItem)))},s.prototype.findDSAndIndexFromId=function(e,i){var s=this,n={};return i=this.listViewInstance.getElementUID(i),t.isNullOrUndefined(i)||e.some(function(e,t){return!!(i[s.listViewInstance.fields.id]&&i[s.listViewInstance.fields.id]===(e[s.listViewInstance.fields.id]&&e[s.listViewInstance.fields.id])||i===e)&&(n.index=t,n.data=e,!0)}),n},s.prototype.getSelectedItems=function(){var e=this;if(!t.isNullOrUndefined(this.activeIndex)||this.listViewInstance.showCheckBox&&this.uiIndices.activeIndices.length){var s=[],n=[];if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]){var l=this.listViewInstance.curViewDS;if(this.listViewInstance.showCheckBox){for(var r=this.uiIndices.activeIndices,a=0;a<r.length;a++)s.push(l[r[a]]);return{text:s,data:s,index:this.uiIndices.activeIndices.map(function(t){return e.listViewInstance.dataSource.indexOf(l[t])})}}return{text:l[this.activeIndex],data:l[this.activeIndex],index:this.listViewInstance.dataSource.indexOf(l[this.activeIndex])}}var o=this.listViewInstance.curViewDS,c=this.listViewInstance.fields.text;if(this.listViewInstance.showCheckBox){for(var h=this.uiIndices.activeIndices,a=0;a<h.length;a++)n.push(o[h[a]][c]),s.push(o[h[a]]);var d=this.listViewInstance.dataSource instanceof i.DataManager?o:this.listViewInstance.dataSource;return{text:n,data:s,index:this.uiIndices.activeIndices.map(function(e){return d.indexOf(o[e])})}}var u=this.listViewInstance.dataSource instanceof i.DataManager?o:this.listViewInstance.dataSource;return{text:o[this.activeIndex][this.listViewInstance.fields.text],data:o[this.activeIndex],index:u.indexOf(o[this.activeIndex])}}},s.prototype.selectItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(Object.keys(i).length){var s=this.activeIndex===i.index,n=void 0;if(this.activeIndex=i.index,this.listViewInstance.showCheckBox&&(-1===this.uiIndices.activeIndices.indexOf(i.index)?(n=!0,this.uiIndices.activeIndices.push(i.index)):(n=!1,this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(i.index),1)),this.listViewInstance.curUL.querySelector("."+d.focused)&&this.listViewInstance.curUL.querySelector("."+d.focused).classList.remove(d.focused)),this.listViewInstance.getLiFromObjOrElement(e))this.listViewInstance.showCheckBox?this.listViewInstance.setCheckboxLI(this.listViewInstance.getLiFromObjOrElement(e)):this.listViewInstance.setSelectLI(this.listViewInstance.getLiFromObjOrElement(e));else{var l=void 0;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0])l={text:this.listViewInstance.curViewDS[this.activeIndex],data:this.listViewInstance.curViewDS[this.activeIndex],index:this.activeIndex};else{var r=this.listViewInstance.curViewDS;l={text:r[this.activeIndex][this.listViewInstance.fields.text],data:r[this.activeIndex],index:this.activeIndex}}this.listViewInstance.showCheckBox?(l.isChecked=n,this.listViewInstance.trigger("select",l)):s||(this.listViewInstance.removeSelect(),this.listViewInstance.trigger("select",l))}}else t.isNullOrUndefined(e)&&!this.listViewInstance.showCheckBox&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0)},s.prototype.enableItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(t.index),1)},s.prototype.disableItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&-1===this.uiIndices.disabledItemIndices.indexOf(t.index)&&this.uiIndices.disabledItemIndices.push(t.index)},s.prototype.showItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(t.index),1)},s.prototype.hideItem=function(e){var t=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);Object.keys(t).length&&-1===this.uiIndices.hiddenItemIndices.indexOf(t.index)&&this.uiIndices.hiddenItemIndices.push(t.index)},s.prototype.removeItem=function(e){var t,s=this.listViewInstance.curViewDS,n=this.findDSAndIndexFromId(s,e);Object.keys(n).length&&(t=n.data,s[n.index-1]&&s[n.index-1].isHeader&&1===s[n.index-1].items.length?(this.removeUiItem(n.index-1),this.removeUiItem(n.index-1)):this.removeUiItem(n.index));var l=this.listViewInstance.dataSource instanceof i.DataManager?this.listViewInstance.localData:this.listViewInstance.dataSource,r=l.indexOf(t);-1!==r&&(l.splice(r,1),this.listViewInstance.setViewDataSource(l)),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")},s.prototype.setCheckboxLI=function(e,t){var i=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex;this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex,e.classList.contains(d.selected)?-1===this.uiIndices.activeIndices.indexOf(i)&&this.uiIndices.activeIndices.push(i):this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(i),1)},s.prototype.setSelectLI=function(e,t){this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex},s.prototype.checkedItem=function(e){if(e){this.uiIndices.activeIndices=[],this.activeIndex=void 0;for(var t=this.listViewInstance.curViewDS,i=0;i<t.length;i++)t[i].isHeader||this.uiIndices.activeIndices.push(i)}else this.activeIndex=void 0,this.uiIndices.activeIndices=[]},s.prototype.addUiItem=function(e){var t=this.listViewInstance.curViewDS;if(this.changeUiIndices(e,!0),this.activeIndex&&this.activeIndex>=e&&this.activeIndex++,this.listViewInstance.showCheckBox&&t[e][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(e),parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)||(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px"),parseFloat(this.bottomElement.style.height)){i=this.listViewInstance.curUL.lastElementChild.previousSibling;(s=this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]))&&(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px",this.updateUI(i,e,s))}else{var i=this.listViewInstance.curUL.firstElementChild.nextSibling,s=void 0;s=Object.keys(this.listViewInstance.curViewDS).length-1===e?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]),this.topElement.style.height=parseFloat(this.topElement.style.height)+this.listItemHeight+"px",this.uiFirstIndex++,this.uiLastIndex++,s&&(this.updateUI(i,e,s),!0===this.listViewInstance.isWindow?window.scrollTo(0,pageYOffset+this.listItemHeight):this.listViewInstance.element.scrollTop+=this.listItemHeight)}this.totalHeight+=this.listItemHeight,this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.removeUiItem=function(e){this.totalHeight-=this.listItemHeight;var i=this.listViewInstance.curViewDS[e],s=this.listViewInstance.getLiFromObjOrElement(i);if(this.listViewInstance.curViewDS.splice(e,1),this.activeIndex&&this.activeIndex>=e&&this.activeIndex--,s)if(this.domItemCount>Object.keys(this.listViewInstance.curViewDS).length)t.detach(s),this.domItemCount--,this.uiLastIndex--,this.totalHeight=0;else{if(s.classList.contains(d.disable)&&(s.classList.remove(d.disable),this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(e),1)),"none"===s.style.display&&(s.style.display="",this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(e),1)),this.listViewInstance.showCheckBox&&s.classList.contains(d.selected)){this.listViewInstance.removeSelect(),this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(e),1);var n=s.querySelector("."+d.checkboxWrapper);n.removeAttribute("aria-checked"),n.firstElementChild.classList.remove(d.checked),s.classList.contains(d.focused)&&(s.classList.remove(d.focused),this.activeIndex=void 0)}else s.classList.contains(d.selected)&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0);parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)?parseFloat(this.bottomElement.style.height)?(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiLastIndex,this.bottomElement)):(this.topElement.style.height=parseFloat(this.topElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiFirstIndex-1,this.topElement.nextSibling),this.uiLastIndex--,this.uiFirstIndex--):this.updateUI(s,this.uiLastIndex,this.bottomElement)}this.changeUiIndices(e,!1),this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.changeUiIndices=function(e,t){for(var i=Object.keys(this.uiIndices),s=0;s<i.length;s++)this.uiIndices[i[s]]=this.uiIndices[i[s]].map(function(i){return i>=e?t?++i:--i:i})},s.prototype.addItem=function(e,t,i){for(var s=0;s<e.length;s++){var n=e[s];if(i.push(n),this.listViewInstance.setViewDataSource(i),this.domItemCount)if(this.domItemCount<this.expectedDomItemCount){if(this.listViewInstance.findItemFromDS(i,t)instanceof Array){if(this.listViewInstance.ulElement){l=this.listViewInstance.curViewDS.indexOf(n);this.createAndInjectNewItem(n,l),(r=this.listViewInstance.curViewDS[l-1])&&r.isHeader&&1===r.items.length&&(--l,this.createAndInjectNewItem(r,l))}this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")}}else{var l=this.listViewInstance.curViewDS.indexOf(n);this.addUiItem(l);var r=this.listViewInstance.curViewDS[l-1];r&&r.isHeader&&1===r.items.length&&this.addUiItem(l-1)}else!this.listViewInstance.template&&!this.listViewInstance.groupTemplate||this.isNgTemplate()||(this.listViewInstance.listBaseOption.template=null,this.listViewInstance.listBaseOption.groupTemplate=null,this.listViewInstance.listBaseOption.itemCreated=this.createUIItem.bind(this)),this.uiVirtualization()}},s.prototype.createAndInjectNewItem=function(t,i){var s,n=e.ListBase.createListItemFromJson(this.listViewInstance.createElement,[t],this.listViewInstance.listBaseOption,null,null,this.listViewInstance);if(s=Object.keys(this.listViewInstance.curViewDS).length-1===i?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i+1])||this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i+2]),this.listViewInstance.fields.groupBy&&this.listViewInstance.curViewDS[i+1]&&this.listViewInstance.curViewDS[i+1].isHeader){var l=this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i-1]);l&&(s=l.nextElementSibling)}this.listViewInstance.ulElement.insertBefore(n[0],s),this.domItemCount++,this.bottomElementHeight<=0&&this.uiLastIndex++,this.refreshItemHeight()},s.prototype.createUIItem=function(e){var i=this.listViewInstance.template,s=this.listViewInstance.createElement("div"),n='<div class="e-text-content" role="presentation"> <span class="e-list-text"> ${'+this.listViewInstance.fields.text+"} </span></div>";if(this.listViewInstance.isReact&&(n=null),this.listViewInstance.showCheckBox){if(this.listViewInstance.renderCheckbox(e),!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox)&&!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox.outerHTML)){var l=document.createElement("div");l.innerHTML=this.listViewInstance.template||n,l.children&&l.children[0]&&(l.children[0].classList.add("e-checkbox"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].classList.add("e-checkbox-left"):l.children[0].classList.add("e-checkbox-right"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].insertBefore(this.listViewInstance.virtualCheckBox,l.childNodes[0].children[0]):l.children[0].appendChild(this.listViewInstance.virtualCheckBox),this.listViewInstance.template=l.innerHTML)}s.innerHTML=this.listViewInstance.template,this.listViewInstance.template=i}else s.innerHTML=this.listViewInstance.template||n;var r=s.getElementsByTagName("*"),a=this.listViewInstance.createElement("div");this.listViewInstance.fields.groupBy&&(a.innerHTML=this.listViewInstance.groupTemplate||n);var o=a.getElementsByTagName("*");e.curData.isHeader&&(this.headerData=e.curData),this.templateData=e.curData.isHeader?e.curData.items[0]:e.curData,(!this.listViewInstance.isReact||"string"==typeof this.listViewInstance.template&&!e.item.classList.contains("e-list-group-item")||"string"==typeof this.listViewInstance.groupTemplate&&e.item.classList.contains("e-list-group-item"))&&(e.item.innerHTML=""),e.item.context={data:e.curData,nodes:{flatTemplateNodes:[],groupTemplateNodes:[]}};for(c=0;c<r.length;c++)this.compileTemplate(r[c],e.item,!1);for(var c=0;c<o.length;c++)this.compileTemplate(o[c],e.item,!0);e.item.context.template=e.curData.isHeader?s.firstElementChild:a.firstElementChild,e.item.context.type=e.curData.isHeader?"flatList":"groupList";var h=e.curData.isHeader?a:s;h.firstElementChild&&e.item.insertBefore(h.firstElementChild,null)},s.prototype.compileTemplate=function(e,t,i){this.textProperty(e,t,i),this.classProperty(e,t,i),this.attributeProperty(e,t,i)},s.prototype.onChange=function(e,i){i.context.data=e;var s=i.context.nodes.groupTemplateNodes,n=i.context.nodes.flatTemplateNodes;if(!t.isNullOrUndefined(e.isHeader)&&e.isHeader&&"groupList"===i.context.type){l=i.firstElementChild;t.detach(i.firstElementChild),i.insertBefore(i.context.template,null),i.context.template=l,i.context.type="flatList";for(r=0;r<s.length;r++)s[r].onChange(e)}else if(e.isHeader||"flatList"!==i.context.type)if(e.isHeader)for(r=0;r<s.length;r++)s[r].onChange(e);else for(r=0;r<n.length;r++)n[r].onChange(e);else{var l=i.firstElementChild;t.detach(i.firstElementChild),i.insertBefore(i.context.template,null),i.context.template=l,i.context.type="groupList";for(var r=0;r<n.length;r++)n[r].onChange(e)}},s.prototype.updateContextData=function(e,t,i){i?e.context.nodes.groupTemplateNodes.push(t):e.context.nodes.flatTemplateNodes.push(t)},s.prototype.classProperty=function(e,i,s){for(var n,l=new RegExp("\\${([^}]*)}","g"),r=[];null!==n;){var a=l.exec(e.className);r.push(a),null===(n=a)&&r.pop()}if(r&&r.length)for(var o=this,c=0;c<r.length;c++)!function(n){var l,a=r[n];l=-1!==a[1].indexOf("?")&&-1!==a[1].indexOf(":")?new Function("data","return "+a[1].replace(/\$/g,"data.")):new Function("data","return data."+a[1]);var c={};c.bindedvalue=l(s?o.headerData:o.templateData),c.onChange=function(i){c.bindedvalue&&t.removeClass([e],c.bindedvalue.split(" ").filter(function(e){return e}));var s=l(i);s&&t.addClass([e],s.split(" ").filter(function(e){return e})),c.bindedvalue=s};for(var h=a[0].split(" "),d=0;d<h.length;d++)e.classList.remove(h[d]);c.bindedvalue&&t.addClass([e],c.bindedvalue.split(" ").filter(function(e){return e})),o.updateContextData(i,c,s)}(c)},s.prototype.attributeProperty=function(e,t,i){for(var s=[],n=0;n<e.attributes.length;n++)s.push(e.attributes[n].nodeName);-1!==s.indexOf("class")&&s.splice(s.indexOf("class"),1);for(var l=this,n=0;n<s.length;n++)!function(n){var r,a,o=s[n],c=new RegExp("\\${([^}]*)}","g").exec(o)||[],h=new RegExp("\\${([^}]*)}","g").exec(e.getAttribute(o))||[];if(c.length||h.length){c[1]&&(r=new Function("data","return data."+c[1])),h[1]&&(a=-1!==h[1].indexOf("?")&&-1!==h[1].indexOf(":")?new Function("data","return "+h[1].replace(/\$/g,"data.")):new Function("data","return data."+h[1]));var d={};d.bindedvalue=i?[void 0===c[1]?void 0:r(l.headerData),void 0===h[1]?void 0:a(l.headerData)]:[void 0===c[1]?void 0:r(l.templateData),void 0===h[1]?void 0:a(l.templateData)],d.attrName=void 0===d.bindedvalue[0]?o:d.bindedvalue[0],d.onChange=function(t){var i=void 0===d.bindedvalue[1]?e.getAttribute(d.attrName):a(t);e.removeAttribute(d.attrName),d.attrName=void 0===d.bindedvalue[0]?d.attrName:r(t),e.setAttribute(d.attrName,i),d.bindedvalue=[void 0===d.bindedvalue[0]?void 0:r(t),void 0===d.bindedvalue[1]?void 0:a(t)]};var u=void 0===d.bindedvalue[1]?e.getAttribute(o):d.bindedvalue[1];e.removeAttribute(o),e.setAttribute(d.attrName,u),l.updateContextData(t,d,i)}}(n)},s.prototype.textProperty=function(e,t,i){for(var s,n=new RegExp("\\${([^}]*)}","g"),l=[];null!==s;){var r=n.exec(e.innerText);l.push(r),null===(s=r)&&l.pop()}var a=Array.prototype.some.call(e.children,function(e){return!!new RegExp("\\${([^}]*)}","g").exec(e.innerText)});if(l&&l.length&&!a)for(var o=this,c=0;c<l.length;c++)!function(s){var n,r=l[s],a={};n=-1!==r[1].indexOf("?")&&-1!==r[1].indexOf(":")?new Function("data","return "+r[1].replace(/\$/g,"data.")):new Function("data","return data."+r[1]),a.bindedvalue=n(i?o.headerData:o.templateData),a.onChange=function(t){e.innerText=e.innerText.replace(a.bindedvalue,n(t)),a.bindedvalue=n(t)},e.innerText=e.innerText.replace(r[0],a.bindedvalue),o.updateContextData(t,a,i)}(c)},s.prototype.reRenderUiVirtualization=function(){this.wireScrollEvent(!0),this.listViewInstance.contentContainer&&t.detach(this.listViewInstance.contentContainer),this.listViewInstance.preRender(),this.domItemCount=0,this.listViewInstance.header(),this.listViewInstance.setLocalData()},s.prototype.updateUI=function(t,i,s){var n=this.isNgTemplate()?this.onNgChange:this.onChange;if(this.listViewInstance.template||this.listViewInstance.groupTemplate){var l=this.listViewInstance.curViewDS[i];t.dataset.uid=l[this.listViewInstance.fields.id]?l[this.listViewInstance.fields.id]:e.ListBase.generateId(),n(l,t,this)}else this.updateUiContent(t,i);this.changeElementAttributes(t,i),s&&this.listViewInstance.ulElement.insertBefore(t,s)},s.prototype.onNgChange=function(e,i,s){for(var n=t.compile(s.listViewInstance.template)(e);i.lastChild;)i.removeChild(i.lastChild);i.appendChild(n[0])},s.prototype.getModuleName=function(){return"virtualization"},s.prototype.destroy=function(){this.wireScrollEvent(!0)},s}(),f=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),g=function(e,t,i,s){var n,l=arguments.length,r=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},v=function(e){function i(i,s){var n=e.call(this,s,i)||this;return n.getHelper=function(e){var i=n.getSortableElement(e.sender.target);if(!n.isValidTarget(i,n))return!1;var s;return n.helper?s=n.helper({sender:i,element:e.element}):((s=i.cloneNode(!0)).style.width=i.offsetWidth+"px",s.style.height=i.offsetHeight+"px"),t.addClass([s],["e-sortableclone"]),document.body.appendChild(s),s},n.onDrag=function(e){if(e.target){n.trigger("drag",{event:e.event,element:n.element,target:e.target});var i=n.getSortableInstance(e.target),s=n.getSortableElement(e.target,i);if(!(n.isValidTarget(s,i)||e.target.className.indexOf("e-list-group-item")>-1)||n.curTarget===s&&t.isNullOrUndefined(i.placeHolder)||i.placeHolderElement&&i.placeHolderElement===e.target)n.curTarget!==n.target&&n.scope&&n.curTarget!==s&&!t.isNullOrUndefined(i.placeHolder)&&(t.remove(n.getSortableInstance(n.curTarget).placeHolderElement),n.curTarget=n.target);else{if(e.target.className.indexOf("e-list-group-item")>-1&&(s=e.target),n.curTarget=s,n.target===s)return;var l=n.getIndex(i.placeHolderElement,i),r=n.getPlaceHolder(s,i),a=void 0;if(r){l=t.isNullOrUndefined(l)?n.getIndex(n.target):l,a=n.getIndex(s,i,e.event);var o=n.isPlaceHolderPresent(i);if(o&&l===a)return;o&&t.remove(i.placeHolderElement),i.placeHolderElement=r,e.target.className.indexOf("e-list-group-item")>-1?i.element.insertBefore(i.placeHolderElement,i.element.children[a]):i.element!==n.element&&a===i.element.childElementCount?i.element.appendChild(i.placeHolderElement):i.element.insertBefore(i.placeHolderElement,i.element.children[a]),n.refreshDisabled(l,a,i)}else{l=t.isNullOrUndefined(l)?n.getIndex(n.target):n.getIndex(s,i)<l||!l?l:l-1,a=n.getIndex(s,i);var c=i.element!==n.element?a:l<a?a+1:a;n.updateItemClass(i),i.element.insertBefore(n.target,i.element.children[c]),n.refreshDisabled(l,a,i),n.curTarget=n.target,n.trigger("drop",{droppedElement:n.target,element:i.element,previousIndex:l,currentIndex:a,target:e.target,helper:document.getElementsByClassName("e-sortableclone")[0],event:e.event,scope:n.scope})}}if(i=n.getSortableInstance(n.curTarget),t.isNullOrUndefined(s)&&e.target!==i.placeHolderElement)n.isPlaceHolderPresent(i)&&n.removePlaceHolder(i);else{var h;[].slice.call(document.getElementsByClassName("e-sortable-placeholder")).forEach(function(e){(h=n.getSortableInstance(e)).element&&h!==i&&n.removePlaceHolder(h)})}}},n.onDragStart=function(e){n.target=n.getSortableElement(e.target);var i=!1;n.target.classList.add("e-grabbed"),n.curTarget=n.target,e.helper=document.getElementsByClassName("e-sortableclone")[0];var s={cancel:!1,element:n.element,target:n.target};n.trigger("beforeDragStart",s,function(t){t.cancel&&(i=t.cancel,n.onDragStop(e))}),i||(t.isBlazor?n.trigger("dragStart",{event:e.event,element:n.element,target:n.target,bindEvents:e.bindEvents,dragElement:e.dragElement}):n.trigger("dragStart",{event:e.event,element:n.element,target:n.target}))},n.onDragStop=function(e){var i,s,l,r=n.getSortableInstance(n.curTarget);i=n.getIndex(n.target);var a=n.isPlaceHolderPresent(r);if(a){var o=n.getIndex(r.placeHolderElement,r),c={previousIndex:i,currentIndex:o,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1,handled:!1};n.trigger("beforeDrop",c,function(s){if(!s.cancel){if(l=s.handled,n.updateItemClass(r),s.handled){var a=n.target.cloneNode(!0);n.target.classList.remove("e-grabbed"),n.target=a}r.element.insertBefore(n.target,r.placeHolderElement);var o=n.getIndex(n.target,r);i=n===r&&i-o>1?i-1:i,n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:o,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope,handled:l})}t.remove(r.placeHolderElement)})}if(r=n.getSortableInstance(e.target),s=r.element.childElementCount,i=n.getIndex(n.target),r.element===e.target||!a&&n.curTarget===n.target){var h={previousIndex:i,currentIndex:n.curTarget===n.target?i:s,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1};n.trigger("beforeDrop",h,function(t){r.element!==e.target||t.cancel||(n.updateItemClass(r),r.element.appendChild(n.target),n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:s,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope}))})}n.target.classList.remove("e-grabbed"),n.target=null,n.curTarget=null,t.remove(e.helper),t.getComponent(n.element,t.Draggable).intDestroy(e.event)},n.bind(),n}f(i,e),s=i,i.prototype.bind=function(){this.element.id||(this.element.id=t.getUniqueID("sortable")),this.itemClass||(this.itemClass="e-sort-item",this.dataBind()),this.initializeDraggable()},i.prototype.initializeDraggable=function(){new t.Draggable(this.element,{helper:this.getHelper,dragStart:this.onDragStart,drag:this.onDrag,dragStop:this.onDragStop,dragTarget:"."+this.itemClass,enableTapHold:!0,tapHoldThreshold:200,queryPositionInfo:this.queryPositionInfo,distance:5})},i.prototype.getPlaceHolder=function(e,t){if(t.placeHolder){var i=t.placeHolder({element:t.element,grabbedElement:this.target,target:e});return i.classList.add("e-sortable-placeholder"),i}return null},i.prototype.isValidTarget=function(e,i){return e&&t.compareElementParent(e,i.element)&&e.classList.contains(i.itemClass)&&!e.classList.contains("e-disabled")},i.prototype.removePlaceHolder=function(e){t.remove(e.placeHolderElement),e.placeHolderElement=null},i.prototype.updateItemClass=function(e){this!==e&&(this.target.classList.remove(this.itemClass),this.target.classList.add(e.itemClass))},i.prototype.getSortableInstance=function(e){if(e=t.closest(e,".e-"+this.getModuleName())){var i=t.getComponent(e,s);return i.scope&&this.scope&&i.scope===this.scope?i:this}return this},i.prototype.refreshDisabled=function(e,t,i){if(i===this)for(var s=void 0,n=e<t,l=void 0,r=n?e:t,a=n?t:e;r<=a;)(s=this.element.children[r]).classList.contains("e-disabled")?(l=this.getIndex(s),this.element.insertBefore(s,this.element.children[n?l+2:l-1]),r=n?l+2:l+1):r++},i.prototype.getIndex=function(e,i,s){void 0===i&&(i=this);var n,l;return[].slice.call(i.element.children).forEach(function(i,r){if(i.classList.contains("e-sortable-placeholder")&&(l=!0),i!==e);else if(n=r,!t.isNullOrUndefined(s)){l&&(n-=1);var a=e.getBoundingClientRect(),o=a.bottom-(a.bottom-a.top)/2;n=s.clientY<=o?n:n+1}}),n},i.prototype.getSortableElement=function(e,i){return void 0===i&&(i=this),t.closest(e,"."+i.itemClass)},i.prototype.queryPositionInfo=function(e){return e.left=pageXOffset?parseFloat(e.left)-pageXOffset+"px":e.left,e.top=pageYOffset?parseFloat(e.top)-pageYOffset+"px":e.top,e},i.prototype.isPlaceHolderPresent=function(e){return e.placeHolderElement&&!!t.closest(e.placeHolderElement,"#"+e.element.id)},i.prototype.moveTo=function(e,t,i){r(this.element,e,t,i)},i.prototype.destroy=function(){"e-sort-item"===this.itemClass&&(this.itemClass=null,this.dataBind()),t.getComponent(this.element,t.Draggable).destroy(),e.prototype.destroy.call(this)},i.prototype.getModuleName=function(){return"sortable"},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"itemClass":[].slice.call(this.element.children).forEach(function(i){i.classList.contains(t.itemClass)&&i.classList.remove(t.itemClass),e.itemClass&&i.classList.add(e.itemClass)})}};var s;return g([t.Property(!1)],i.prototype,"enableAnimation",void 0),g([t.Property(null)],i.prototype,"itemClass",void 0),g([t.Property(null)],i.prototype,"scope",void 0),g([t.Property()],i.prototype,"helper",void 0),g([t.Property()],i.prototype,"placeHolder",void 0),g([t.Event()],i.prototype,"drag",void 0),g([t.Event()],i.prototype,"beforeDragStart",void 0),g([t.Event()],i.prototype,"dragStart",void 0),g([t.Event()],i.prototype,"beforeDrop",void 0),g([t.Event()],i.prototype,"drop",void 0),i=s=g([t.NotifyPropertyChanges],i)}(t.Base);return p.Inject(m),e.classNames=d,e.FieldSettings=u,e.ListView=p,e.Virtualization=m,e.getFieldValues=n,e.Sortable=v,e.moveTo=r,e}({},ej.base,ej.data,ej.buttons),this.ejs=ej;
2
11
  //# sourceMappingURL=ej2-lists.min.js.map
@@ -1,3 +1,12 @@
1
+ /*!
2
+ * filename: index.d.ts
3
+ * version : 20.3.56
4
+ * Copyright Syncfusion Inc. 2001 - 2020. 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
+ */
1
10
  import * as _lists from '@syncfusion/ej2-lists';
2
11
 
3
12
  export declare namespace ej {
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
1
  {
2
- "_from": "@syncfusion/ej2-lists@*",
3
- "_id": "@syncfusion/ej2-lists@20.3.47",
4
- "_inBundle": false,
5
- "_integrity": "sha512-YfsxlVZSwlmJPLDKEg2X0IdRZJV+4LKeWsENgUchVKQoZDSclRcK6JHte/t81/Dt0s5Wo/ft1/7dXapc/hDyDQ==",
6
- "_location": "/@syncfusion/ej2-lists",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "@syncfusion/ej2-lists@*",
12
- "name": "@syncfusion/ej2-lists",
13
- "escapedName": "@syncfusion%2fej2-lists",
14
- "scope": "@syncfusion",
15
- "rawSpec": "*",
16
- "saveSpec": null,
17
- "fetchSpec": "*"
18
- },
19
- "_requiredBy": [
20
- "/",
21
- "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-lists",
23
- "/@syncfusion/ej2-calendars",
24
- "/@syncfusion/ej2-diagrams",
25
- "/@syncfusion/ej2-dropdowns",
26
- "/@syncfusion/ej2-filemanager",
27
- "/@syncfusion/ej2-gantt",
28
- "/@syncfusion/ej2-grids",
29
- "/@syncfusion/ej2-inplace-editor",
30
- "/@syncfusion/ej2-navigations",
31
- "/@syncfusion/ej2-pdfviewer",
32
- "/@syncfusion/ej2-pivotview",
33
- "/@syncfusion/ej2-react-lists",
34
- "/@syncfusion/ej2-schedule",
35
- "/@syncfusion/ej2-vue-lists"
36
- ],
37
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-20.3.47.tgz",
38
- "_shasum": "3c2ab01c399234ebc5a481d88296a08b991f7591",
39
- "_spec": "@syncfusion/ej2-lists@*",
40
- "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
41
- "author": {
42
- "name": "Syncfusion Inc."
43
- },
44
- "bundleDependencies": false,
45
- "dependencies": {
46
- "@syncfusion/ej2-base": "~20.3.50",
47
- "@syncfusion/ej2-buttons": "~20.3.50",
48
- "@syncfusion/ej2-data": "~20.3.50"
49
- },
50
- "deprecated": false,
51
- "description": "The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.",
52
- "devDependencies": {},
53
- "es2015": "./dist/es6/ej2-lists.es5.js",
54
- "keywords": [
55
- "ej2",
56
- "Syncfusion",
57
- "web components",
58
- "virtualization",
59
- "group list",
60
- "check list",
61
- "listview with checkbox",
62
- "listview template",
63
- "material list",
64
- "ui listview",
65
- "remote listview",
66
- "nested view",
67
- "data list",
68
- "infinite list",
69
- "sort",
70
- "checkbox",
71
- "todo",
72
- "list widget",
73
- "list component",
74
- "mobile list",
75
- "list gestures",
76
- "es6 list",
77
- "dynamic list"
78
- ],
79
- "license": "SEE LICENSE IN license",
80
- "main": "./dist/ej2-lists.umd.min.js",
81
- "module": "./index.js",
82
- "name": "@syncfusion/ej2-lists",
83
- "repository": {
84
- "type": "git",
85
- "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/lists"
86
- },
87
- "typings": "index.d.ts",
88
- "version": "20.3.51",
89
- "sideEffects": false
90
- }
2
+ "_from": "@syncfusion/ej2-lists@*",
3
+ "_id": "@syncfusion/ej2-lists@20.3.50",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-lC7Tp5ffJRoD7Q9nOSGL54cJoUUPMQA6IE7Md6f5mCvoTqQWSY+a0p93CnS1JdGHPDka+yEiJbFM4TFGHErrdA==",
6
+ "_location": "/@syncfusion/ej2-lists",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "@syncfusion/ej2-lists@*",
12
+ "name": "@syncfusion/ej2-lists",
13
+ "escapedName": "@syncfusion%2fej2-lists",
14
+ "scope": "@syncfusion",
15
+ "rawSpec": "*",
16
+ "saveSpec": null,
17
+ "fetchSpec": "*"
18
+ },
19
+ "_requiredBy": [
20
+ "/",
21
+ "/@syncfusion/ej2",
22
+ "/@syncfusion/ej2-angular-lists",
23
+ "/@syncfusion/ej2-calendars",
24
+ "/@syncfusion/ej2-diagrams",
25
+ "/@syncfusion/ej2-dropdowns",
26
+ "/@syncfusion/ej2-filemanager",
27
+ "/@syncfusion/ej2-gantt",
28
+ "/@syncfusion/ej2-grids",
29
+ "/@syncfusion/ej2-inplace-editor",
30
+ "/@syncfusion/ej2-navigations",
31
+ "/@syncfusion/ej2-pdfviewer",
32
+ "/@syncfusion/ej2-pivotview",
33
+ "/@syncfusion/ej2-react-lists",
34
+ "/@syncfusion/ej2-schedule",
35
+ "/@syncfusion/ej2-vue-lists"
36
+ ],
37
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-20.3.50.tgz",
38
+ "_shasum": "9b54f37a1b3eede8258af771002403ca544ea26a",
39
+ "_spec": "@syncfusion/ej2-lists@*",
40
+ "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
41
+ "author": {
42
+ "name": "Syncfusion Inc."
43
+ },
44
+ "bundleDependencies": false,
45
+ "dependencies": {
46
+ "@syncfusion/ej2-base": "~20.3.56",
47
+ "@syncfusion/ej2-buttons": "~20.3.56",
48
+ "@syncfusion/ej2-data": "~20.3.56"
49
+ },
50
+ "deprecated": false,
51
+ "description": "The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.",
52
+ "devDependencies": {},
53
+ "es2015": "./dist/es6/ej2-lists.es5.js",
54
+ "keywords": [
55
+ "ej2",
56
+ "Syncfusion",
57
+ "web components",
58
+ "virtualization",
59
+ "group list",
60
+ "check list",
61
+ "listview with checkbox",
62
+ "listview template",
63
+ "material list",
64
+ "ui listview",
65
+ "remote listview",
66
+ "nested view",
67
+ "data list",
68
+ "infinite list",
69
+ "sort",
70
+ "checkbox",
71
+ "todo",
72
+ "list widget",
73
+ "list component",
74
+ "mobile list",
75
+ "list gestures",
76
+ "es6 list",
77
+ "dynamic list"
78
+ ],
79
+ "license": "SEE LICENSE IN license",
80
+ "main": "./dist/ej2-lists.umd.min.js",
81
+ "module": "./index.js",
82
+ "name": "@syncfusion/ej2-lists",
83
+ "repository": {
84
+ "type": "git",
85
+ "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/lists"
86
+ },
87
+ "typings": "index.d.ts",
88
+ "version": "20.3.56",
89
+ "sideEffects": false
90
+ }
@@ -250,7 +250,7 @@ export interface ListViewModel extends ComponentModel{
250
250
  * {% codeBlock src='listview/template/index.md' %}{% endcodeBlock %}
251
251
  *
252
252
  * @default null
253
- * @deprecated
253
+
254
254
  */
255
255
  template?: string;
256
256
 
@@ -260,7 +260,7 @@ export interface ListViewModel extends ComponentModel{
260
260
  * {% codeBlock src="listview/headerTemplate/index.md" %}{% endcodeBlock %}
261
261
  *
262
262
  * @default null
263
- * @deprecated
263
+
264
264
  */
265
265
  headerTemplate?: string;
266
266
 
@@ -270,7 +270,7 @@ export interface ListViewModel extends ComponentModel{
270
270
  * {% codeBlock src="listview/groupTemplate/index.md" %}{% endcodeBlock %}
271
271
  *
272
272
  * @default null
273
- * @deprecated
273
+
274
274
  */
275
275
  groupTemplate?: string;
276
276
 
@@ -316,7 +316,7 @@ export declare class ListView extends Component<HTMLElement> implements INotifyP
316
316
  * {% codeBlock src='listview/template/index.md' %}{% endcodeBlock %}
317
317
  *
318
318
  * @default null
319
- * @deprecated
319
+
320
320
  */
321
321
  template: string;
322
322
  /**
@@ -325,7 +325,7 @@ export declare class ListView extends Component<HTMLElement> implements INotifyP
325
325
  * {% codeBlock src="listview/headerTemplate/index.md" %}{% endcodeBlock %}
326
326
  *
327
327
  * @default null
328
- * @deprecated
328
+
329
329
  */
330
330
  headerTemplate: string;
331
331
  /**
@@ -334,7 +334,7 @@ export declare class ListView extends Component<HTMLElement> implements INotifyP
334
334
  * {% codeBlock src="listview/groupTemplate/index.md" %}{% endcodeBlock %}
335
335
  *
336
336
  * @default null
337
- * @deprecated
337
+
338
338
  */
339
339
  groupTemplate: string;
340
340
  /**