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

@syncfusion/ej2-lists

Package Overview
Dependencies
Maintainers
2
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-lists - npm Package Compare versions

Comparing version 1.0.19 to 15.4.17

4

dist/ej2-lists.umd.min.js
/*!
* filename: ej2-lists.umd.min.js
* version : 1.0.19
* version : 15.4.17
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-data"],t);else{var i="object"==typeof exports?t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data")):t(e["@syncfusion/ej2-base"],e["@syncfusion/ej2-data"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(this,function(e,t){return function(e){function t(s){if(i[s])return i[s].exports;var r=i[s]={exports:{},id:s,loaded:!1};return e[s].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var s,r;s=[i,t,i(1),i(6)],void 0!==(r=function(e,t,i,s){"use strict";function r(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),r(i),r(s)}.apply(t,s))&&(e.exports=r)},function(e,t,i){var s,r;s=[i,t,i(2)],void 0!==(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,s))&&(e.exports=r)},function(e,t,i){var s,r,o=this&&this.__extends||function(){var 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])};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)}}(),n=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};s=[i,t,i(3),i(3),i(3),i(3),i(3),i(4),i(5)],void 0!==(r=function(e,t,i,s,r,a,l,d,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},p={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},u={root:"e-listview",hover:"e-hover",selected:"e-active",parentItem:"e-list-parent",listItem:"e-list-item",listItemText:"e-list-text",grpListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-header",headerText:"e-headertext",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back"},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(a.ChildProperty);n([r.Property("id")],m.prototype,"id",void 0),n([r.Property("text")],m.prototype,"text",void 0),n([r.Property("isChecked")],m.prototype,"isChecked",void 0),n([r.Property("isVisible")],m.prototype,"isVisible",void 0),n([r.Property("enabled")],m.prototype,"enabled",void 0),n([r.Property("iconCss")],m.prototype,"iconCss",void 0),n([r.Property("child")],m.prototype,"child",void 0),n([r.Property("tooltip")],m.prototype,"tooltip",void 0),n([r.Property("groupBy")],m.prototype,"groupBy",void 0),n([r.Property("text")],m.prototype,"sortBy",void 0),n([r.Property("htmlAttributes")],m.prototype,"htmlAttributes",void 0),n([r.Property("tableName")],m.prototype,"tableName",void 0),t.FieldSettings=m;var f=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.curDSLevel=[],s.curViewDS=[],s.keyConfigs={moveDown:"downarrow",moveUp:"uparrow",select:"enter",back:"backspace"},s.animateOptions={},s.aniObj=new l.Animation(s.animateOptions),s}return o(t,e),t.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){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.reRender();break;case"headerTitle":this.curDSLevel.length||this.header(this.headerTitle,!1);break;case"showHeader":this.header(this.headerTitle,!1);break;case"dataSource":this.reRender();break;case"sortOrder":case"showIcon":this.listBaseOption.showIcon=this.showIcon,this.curViewDS=this.getSubDS(),this.resetCurrentList()}}},t.prototype.setHTMLAttribute=function(){Object.keys(this.htmlAttributes).length&&s.attributes(this.element,this.htmlAttributes)},t.prototype.setCSSClass=function(e){this.cssClass&&s.addClass([this.element],this.cssClass.split(" ")),e&&s.removeClass([this.element],e.split(" "))},t.prototype.setSize=function(){this.element.style.height=i.formatUnit(this.height),this.element.style.width=i.formatUnit(this.width)},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(u.disable):e.classList.add(u.disable)},t.prototype.header=function(e,t){if(void 0===this.headerEle&&this.showHeader){this.headerEle=s.createElement("div",{className:u.header});var i=s.createElement("span",{className:u.headerText,innerHTML:this.headerTitle}),r=s.createElement("div",{className:u.text,innerHTML:i.outerHTML}),o=s.createElement("div",{className:u.icon+" "+u.backIcon+" e-but-back",attrs:{style:"display:none;"}});this.headerEle.appendChild(o),this.headerEle.appendChild(r),this.element.classList.add("e-has-header"),s.prepend([this.headerEle],this.element)}else if(this.headerEle)if(this.showHeader){this.headerEle.style.display="";var r=this.headerEle.querySelector("."+u.headerText),o=this.headerEle.querySelector("."+u.backIcon);r.innerHTML=e,o.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 r=e.style.position,o="hidden"!==this.element.style.overflow?this.element.style.overflow:"";e.style.position="absolute",e.classList.add("e-view");var n=void 0,a=this.animation.duration;if(this.animation.effect)n=this.enableRtl?p[this.animation.effect]:h[this.animation.effect];else{n=this.enableRtl?p.SlideLeft:h.SlideRight,a=0}this.element.style.overflow="hidden",this.aniObj.animate(e,{name:!0===i?n[0]:n[1],duration:a,timingFunction:this.animation.easing,end:function(t){e.style.display="none",s.element.style.overflow=o,e.style.position=r,e.classList.remove("e-view")}}),t.style.display="",this.aniObj.animate(t,{name:!0===i?n[2]:n[3],duration:a,timingFunction:this.animation.easing,end:function(){s.trigger("actionComplete")}}),this.curUL=t}},t.prototype.preRender=function(){this.listBaseOption={template:this.template,groupTemplate:this.groupTemplate,expandCollapse:!0,listClass:"",ariaAttributes:{itemRole:"listitem",listRole:"list",itemText:"",groupItemRole:"group",wrapperRole:"presentation"},fields:this.fields.properties,sortOrder:this.sortOrder,showIcon:this.showIcon}},t.prototype.clickHandler=function(e){var t=e.target,i=t.classList;if(i.contains(u.backIcon)||i.contains(u.headerText))this.back();else{var r=s.closest(t.parentNode,"."+u.listItem);null===r&&(r=t),this.setSelectLI(r,e)}},t.prototype.hoverHandler=function(e){var t=s.closest(e.target.parentNode,"."+u.listItem);this.setHoverLI(t)},t.prototype.leaveHandler=function(e){this.removeHover()},t.prototype.keyActionHandler=function(e){switch(e.preventDefault(),e.action){case"moveDown":this.hoverSiblingLI();break;case"moveUp":this.hoverSiblingLI(!0);break;case"select":this.setSelectLI(this.curUL.querySelector("."+u.hover),e);break;case"back":this.back()}},t.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&this.back()},t.prototype.wireEvents=function(){r.EventHandler.add(this.element,"click",this.clickHandler,this),r.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),r.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),this.keyboardModule=new a.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),this.touchModule=new l.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},t.prototype.unWireEvents=function(){r.EventHandler.remove(this.element,"click",this.clickHandler),r.EventHandler.remove(this.element,"mouseover",this.hoverHandler),r.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.keyboardModule.destroy(),this.touchModule.destroy()},t.prototype.removeHover=function(){var e=this.element.querySelector("."+u.hover);e&&e.classList.remove(u.hover)},t.prototype.removeSelect=function(){for(var e=this.element.querySelectorAll("."+u.selected),t=0,i=e;t<i.length;t++){var s=i[t];s.removeAttribute("aria-selected"),""!==s.className&&s.classList.remove(u.selected)}},t.prototype.isValidLI=function(e){return e&&e.classList.contains(u.listItem)&&!e.classList.contains(u.grpListItem)&&!e.classList.contains(u.disable)},t.prototype.setSelectLI=function(e,t){if(this.isValidLI(e)&&!e.classList.contains(u.selected)&&this.enable){this.removeSelect(),e.classList.add(u.selected),e.setAttribute("aria-selected","true"),this.removeHover();var s=this.getItemData(e);i.isNullOrUndefined(s)&&"string"==typeof this.dataSource[0]?this.selectedItems={item:e,text:e.innerText.trim(),data:this.dataSource}:this.selectedItems={item:e,text:s[this.listBaseOption.fields.text],data:s};var r={};i.merge(r,this.selectedItems),t&&i.merge(r,{isInteracted:!0,event:t}),this.trigger("select",r),this.selectedLI=e,this.renderSubList(e)}},t.prototype.setHoverLI=function(e){if(this.isValidLI(e)&&!e.classList.contains(u.hover)&&this.enable){var t=this.element.querySelectorAll("."+u.hover);t&&t.length&&s.removeClass(t,u.hover),e.classList.contains(u.selected)||e.classList.add(u.hover)}},t.prototype.hoverSiblingLI=function(e){var t,i=this.curUL.querySelector("."+u.hover);if(i||(i=this.curUL.querySelector("."+u.selected)),i)t=c.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+u.listItem),i,e);else if(e){var s=this.curUL.querySelectorAll("."+u.listItem);t=s[s.length-1]}else t=this.curUL.querySelector("."+u.listItem);this.setHoverLI(t)},t.prototype.getSubDS=function(){var e=this.curDSLevel;if(e.length){for(var t=this.localData,i=0,s=e;i<s.length;i++){var r=s[i];this.curDSJSON=this.findItemFromDS(t,{id:r}),t=this.curDSJSON?this.curDSJSON[this.fields.child]:t}return t}return this.localData},t.prototype.getItemData=function(e){var t=this.getElementUID(e),i=this.dataSource;return this.findItemFromDS(i,t)},t.prototype.findItemFromDS=function(e,t,i){var s,r=this;return e&&e.length&&t?e.some(function(o){return!t.id&&!t.text||t.id&&o[r.fields.id]!==t.id||t.text&&o[r.fields.text]!==t.text?o.hasOwnProperty(r.fields.child)&&o[r.fields.child].length&&(s=r.findItemFromDS(o[r.fields.child],t,i)):s=i?e:o,!!s}):s=e,s},t.prototype.getQuery=function(){var e=[],t=this.query?this.query:new d.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]!==c.ListBase.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),e&&this.fields.groupBy?this.curViewDS=c.ListBase.groupDataSource(e,this.fields,this.sortOrder):e&&"None"!==this.sortOrder?this.curViewDS=c.ListBase.getDataSource(e,c.ListBase.addSorting(this.sortOrder,this.fields.sortBy)):this.curViewDS=e},t.prototype.isInAnimation=function(){return this.curUL.classList.contains(".e-animate")},t.prototype.setLocalData=function(){var e=this;if(this.trigger("actionBegin"),this.dataSource instanceof d.DataManager)this.dataSource.executeQuery(this.getQuery()).then(function(t){e.isDestroyed||(e.localData=t.result,e.renderList(),e.trigger("actionComplete",t))}).catch(function(t){e.isDestroyed||e.trigger("actionFailure",t)});else if(this.dataSource&&this.dataSource.length)this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData});else{var t=this.element.querySelector("ul");t&&(s.remove(t),this.setProperties({dataSource:c.ListBase.createJsonFromElement(t)},!0),this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData}))}},t.prototype.reRender=function(){this.element.innerHTML="",this.curUL=this.headerEle=void 0,this.setLocalData(),this.header(),this.contentContainer=s.createElement("div",{className:u.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement)},t.prototype.resetCurrentList=function(){this.setViewDataSource(this.curViewDS),this.contentContainer.innerHTML="",this.createList(),this.renderIntoDom(this.curUL)},t.prototype.createList=function(){this.ulElement=this.curUL=c.ListBase.createList(this.curViewDS,this.listBaseOption),this.liCollection=this.curUL.querySelectorAll("."+u.listItem)},t.prototype.renderSubList=function(e){var t=e.getAttribute("data-uid");if(e.classList.contains(u.hasChild)&&t){var i=s.closest(e.parentNode,"."+u.parentItem),r=this.element.querySelector("[pid='"+t+"']");this.curDSLevel.push(t),this.setViewDataSource(this.getSubDS()),r||(r=c.ListBase.createListFromJson(this.curViewDS,this.listBaseOption,this.curDSLevel.length),r.setAttribute("pID",t),r.style.display="none",this.renderIntoDom(r)),this.switchView(i,r),this.liCollection=this.curUL.querySelectorAll("."+u.listItem),this.header(this.selectedItems.data[this.listBaseOption.fields.text],!0),this.selectedLI=void 0}},t.prototype.renderIntoDom=function(e){this.contentContainer.appendChild(e)},t.prototype.renderList=function(){this.setViewDataSource(),this.createList(),this.contentContainer=s.createElement("div",{className:u.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement)},t.prototype.getElementUID=function(e){var t={};return e instanceof Element?t.id=e.getAttribute("data-uid"):t=e,t},t.prototype.render=function(){this.element.classList.add(u.root),s.attributes(this.element,{role:"list"}),this.setCSSClass(),this.setEnableRTL(),this.setEnable(),this.setSize(),this.wireEvents(),this.header(),this.setLocalData(),this.setHTMLAttribute(),this.rippleFn=l.rippleEffect(this.element,{selector:"."+u.listItem})},t.prototype.destroy=function(){this.unWireEvents();var t=[u.root,this.cssClass,u.disable,"e-rtl","e-has-header"];s.removeClass([this.element],t),this.rippleFn(),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+"']"),i=this.curUL;t?t=t.parentElement:(this.createList(),this.renderIntoDom(this.ulElement),t=this.curUL);var s=this.curDSJSON[this.fields.text];this.switchView(i,t,!0),this.removeSelect(),this.liCollection=this.curUL.querySelectorAll("."+u.listItem),this.header(this.curDSLevel.length?s:this.headerTitle,!!this.curDSLevel.length)}},t.prototype.selectItem=function(e){var t=this.getItemData(e);if(t){var i=this.element.querySelector('[data-uid="'+t[this.fields.id]+'"]');i&&this.setSelectLI(i)}},t.prototype.getSelectedItem=function(){return this.selectedItems},t.prototype.findItem=function(e){return this.findItemFromDS(this.dataSource,e)},t.prototype.enableItem=function(e){var t=this.getItemData(e);if(t){var i=this.element.querySelector('[data-uid="'+t[this.fields.id]+'"]');i&&i.classList.remove(u.disable),delete t[this.fields.enabled]}},t.prototype.disableItem=function(e){var t=this.getItemData(e);if(t){var i=this.element.querySelector('[data-uid="'+t[this.fields.id]+'"]');i&&i.classList.add(u.disable),t[this.fields.enabled]=!1}},t.prototype.showItem=function(e){this.showHideItem(e,!1,"")},t.prototype.hideItem=function(e){this.showHideItem(e,!0,"none")},t.prototype.showHideItem=function(e,t,i){var s=this.getItemData(e);if(s){var r=this.element.querySelector('[data-uid="'+s[this.fields.id]+'"]');r&&(r.style.display=i),t?s[this.fields.isVisible]=!1:delete s[this.fields.isVisible]}},t.prototype.addItem=function(e,t){var i=this.findItemFromDS(this.dataSource,t),s=i[this.fields.child];s||(s=[]),s=s.concat(e),i instanceof Array?(this.dataSource=this.localData=i.concat(e),this.setViewDataSource()):i[this.fields.child]=s,this.resetCurrentList()},t.prototype.removeItem=function(e){var t=this,i=this.getElementUID(e),s=this.findItemFromDS(this.dataSource,i,!0);if(s&&e){var r,o;s.some(function(e,s,n){return!(!i.id&&!i.text||i.id&&e[t.fields.id]!==i.id||i.text&&e[t.fields.text]!==i.text)&&(r=n,o=s,!0)}),r.splice(o,1),this.resetCurrentList()}},t.prototype.getModuleName=function(){return"listview"},t.prototype.getPersistData=function(){return this.addOnPersist(["cssClass","enableRtl","htmlAttributes","enable","fields","animation","headerTitle","sortOrder","showIcon","height","width"])},t}(r.Component);n([r.Property()],f.prototype,"cssClass",void 0),n([r.Property({})],f.prototype,"htmlAttributes",void 0),n([r.Property(!0)],f.prototype,"enable",void 0),n([r.Property([])],f.prototype,"dataSource",void 0),n([r.Property()],f.prototype,"query",void 0),n([r.Complex(c.ListBase.defaultMappedFields,m)],f.prototype,"fields",void 0),n([r.Property({effect:"SlideLeft",duration:400,easing:"ease"})],f.prototype,"animation",void 0),n([r.Property("None")],f.prototype,"sortOrder",void 0),n([r.Property(!1)],f.prototype,"showIcon",void 0),n([r.Property("")],f.prototype,"headerTitle",void 0),n([r.Property(!1)],f.prototype,"showHeader",void 0),n([r.Property("")],f.prototype,"height",void 0),n([r.Property("")],f.prototype,"width",void 0),n([r.Property(null)],f.prototype,"template",void 0),n([r.Property(null)],f.prototype,"groupTemplate",void 0),n([r.Event()],f.prototype,"select",void 0),n([r.Event()],f.prototype,"actionBegin",void 0),n([r.Event()],f.prototype,"actionComplete",void 0),n([r.Event()],f.prototype,"actionFailure",void 0),f=n([a.NotifyPropertyChanges],f),t.ListView=f,t.listViewBuilder=r.CreateBuilder(f)}.apply(t,s))&&(e.exports=r)},function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){var s,r;s=[i,t,i(3),i(3),i(3),i(4)],void 0!==(r=function(e,t,i,s,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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"};!function(e){function n(e,t,s){var r=i.extend({},N,t),o=i.extend({},A,r.ariaAttributes);return"string"==typeof e[0]||"number"==typeof e[0]?a(e,s,t):c(e,t,o.level,s)}function a(e,t,i){return D(l(e,t,i),null,i)}function l(e,s,r){var o=[],n=i.extend({},N,r);t.cssClass=I(n.moduleName);for(var a=S(),l=0;l<e.length;l++){var d=void 0;if(n.itemCreating&&"function"==typeof n.itemCreating){var c={dataSource:e,curData:e[l],text:e[l],options:n};n.itemCreating(c)}if(d=s?x(e[l],null,null,[],null,a,l,r):O(e[l],null,null,r),n.itemCreated&&"function"==typeof n.itemCreated){var c={dataSource:e,curData:e[l],text:e[l],item:d,options:n};n.itemCreated(c)}o.push(d)}return o}function d(r,o,n,a){var l=i.extend({},N,o);t.cssClass=I(l.moduleName);var d,c=i.extend({},e.defaultMappedFields,l.fields),h=i.extend({},A,l.ariaAttributes);n&&(h.level=n);var p,u=[];Object.keys(r).length&&!r[0].hasOwnProperty(c.id)&&(d=S());for(var m=0;m<r.length;m++){if(l.itemCreating&&"function"==typeof l.itemCreating){var f={dataSource:r,curData:r[m],text:r[m][c.text],options:l,fields:c};l.itemCreating(f)}var y=r[m];Object.keys(r).length&&r[m].hasOwnProperty(c.id)&&!i.isNullOrUndefined(r[m][c.id])&&(d=r[m].id);var b=[];if(l.showCheckBox&&b.push(s.createElement("input",{className:t.cssClass.check,attrs:{type:"checkbox"}})),!0===a)l.showIcon&&y.hasOwnProperty(c.iconCss)&&(i.isNullOrUndefined(y[c.iconCss])||b.push(s.createElement("span",{className:t.cssClass.icon+" "+y[c.iconCss]}))),p=x(y,c,l.itemClass,b,!(!y.hasOwnProperty("isHeader")||!y.isHeader),d,m,o);else{if(p=O(y,c,l.itemClass,o),p.classList.add(t.cssClass.level+"-"+h.level),p.setAttribute("aria-level",h.level.toString()),y.hasOwnProperty(c.tooltip)&&p.setAttribute("title",y[c.tooltip]),y.hasOwnProperty(c.htmlAttributes)&&y[c.htmlAttributes]&&v(p,y[c.htmlAttributes]),y.hasOwnProperty(c.enabled)&&!1===y[c.enabled]&&p.classList.add(t.cssClass.disabled),y.hasOwnProperty(c.isVisible)&&!1===y[c.isVisible]&&(p.style.display="none"),y.hasOwnProperty(c.imageUrl)&&!i.isNullOrUndefined(y[c.imageUrl])){var g={src:y[c.imageUrl]};y.hasOwnProperty(c.imageUrl)&&i.merge(g,y[c.imageAttributes]),s.prepend([s.createElement("img",{className:t.cssClass.image,attrs:g})],p.firstElementChild)}l.showIcon&&y.hasOwnProperty(c.iconCss)&&!l.template&&(i.isNullOrUndefined(y[c.iconCss])||s.prepend([s.createElement("div",{className:t.cssClass.icon+" "+y[c.iconCss]})],p.firstElementChild)),b.length&&s.prepend(b,p.firstElementChild),L(y,c,r,l,p,h.level)}if(l.itemCreated&&"function"==typeof l.itemCreated){var f={dataSource:r,curData:r[m],text:r[m][c.text],item:p,options:l,fields:c};l.itemCreated(f)}u.push(p)}return u}function c(e,t,s,r){var o=i.extend({},N,t);return D(d(e,t,s,r),o.listClass,t)}function h(e,i,r){if(t.cssClass=I(N.moduleName),e&&e.length){var o,n,a=Array.prototype.slice.call(e);for(n=i?p(i,a):!0===r?a.length:-1,o=a[n+(!0===r?-1:1)];o&&(!s.isVisible(o)||o.classList.contains(t.cssClass.disabled));)n+=!0===r?-1:1,o=a[n];return o}}function p(e,t){if(t&&e){var i=t;return i=Array.prototype.slice.call(t),i.indexOf(e)}}function u(e,t,i){void 0===i&&(i="None");var s=(new o.Query).group(t.groupBy);s=m(i,"key",s);var r=f(e,s);e=[];for(var n=0;n<r.length;n++){var a=r[n].items,l={};l[t.text]=r[n].key,l.isHeader=!0,l.items=a,e.push(l);for(var d=0;d<a.length;d++)e.push(a[d])}return e}function m(e,t,i){return void 0===i&&(i=new o.Query),"Ascending"===e?i.sortBy(t,"ascending",!0):"Descending"===e&&i.sortBy(t,"descending",!0),i}function f(e,t){return new o.DataManager(e).executeLocal(t)}function y(t,s){var r=i.extend({},N,s),o=i.extend({},e.defaultMappedFields,r.fields),n=t.cloneNode(!0),a=[];n.classList.add("json-parent");var l=n.querySelectorAll(".json-parent>li");n.classList.remove("json-parent");for(var d=0;d<l.length;d++)!function(e){var t=l[e],i=t.querySelector("a"),r=t.querySelector("ul"),n={},d=i?i.childNodes:t.childNodes;Object.keys(d).forEach(function(e){d[Number(e)].hasChildNodes()||(n[o.text]=d[Number(e)].textContent)}),n[o.id]=S();var c=b(t);Object.keys(c).length&&(n[o.htmlAttributes]=c),i&&(c=b(i),Object.keys(c).length&&(n[o.urlAttributes]=c)),r&&(n[o.child]=y(r,s)),a.push(n)}(d);return a}function v(e,t){var r={};i.merge(r,t),r.class&&(s.addClass([e],r.class.split(" ")),delete r.class),s.attributes(e,r)}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 g(e,i,o){t.cssClass=I(N.moduleName);for(var n=s.createElement("ul",{className:t.cssClass.ul,attrs:{role:"presentation"}}),a=r.compile(e),l=[],d=S(),c=0;c<i.length;c++){var h=i[c],p=h.isHeader,u=s.createElement("li",{id:d+"-"+c,className:p?t.cssClass.group:t.cssClass.li,attrs:{role:"presentation"}});if(p)u.innerText=h[o.text];else{s.append(a(h),u);var m=h[o.value];u.setAttribute("data-value",m),u.setAttribute("role","option")}l.push(u)}return s.append(l,n),n}function C(e,t,i,o){for(var n=r.compile(e),a=i.groupBy,l={},d=0,c=o;d<c.length;d++){var h=c[d];l[a]=h.textContent,h.innerHTML="",s.append(n(l),h)}return o}function S(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function L(e,i,r,o,n,a){var l=e[i.child]||[],d=e[i.hasChildren];if(l.length&&(d=!0,n.classList.add(t.cssClass.hasChild),o.processSubChild)){var h=c(l,o,++a);n.appendChild(h)}if(o.expandCollapse&&d&&!o.template){n.firstElementChild.classList.contains(t.cssClass.textContent)&&n.firstElementChild.classList.add(t.cssClass.iconWrapper);("left"===o.expandIconPosition?s.prepend:s.append)([s.createElement("div",{className:"e-icons "+o.expandIconClass})],n.querySelector("."+t.cssClass.textContent))}}function x(e,r,o,n,a,l,d,c){var h,p=i.extend({},N,c),u=i.extend({},A,p.ariaAttributes),m=e,f=e;"string"!=typeof e&&"number"!=typeof e&&(h=e,m=e[r.text]||"",f=e[r.value]);var y;y=i.isNullOrUndefined(h)||i.isNullOrUndefined(h[r.id])||""===h[r.id]?l+"-"+d:l;var b=s.createElement("li",{className:(!0===a?t.cssClass.group:t.cssClass.li)+" "+(i.isNullOrUndefined(o)?"":o),id:y,attrs:""!==u.groupItemRole&&""!==u.itemRole?{role:!0===a?u.groupItemRole:u.itemRole}:{}});return h&&h.hasOwnProperty(r.enabled)&&"false"===h[r.enabled].toString()&&b.classList.add(t.cssClass.disabled),a?b.innerText=m:(f&&b.setAttribute("data-value",f),b.setAttribute("role","option"),h&&h.hasOwnProperty(r.htmlAttributes)&&h[r.htmlAttributes]&&v(b,h[r.htmlAttributes]),n.length&&s.append(n,b),h&&h.hasOwnProperty(r.url)&&h[r.url]?b.appendChild(w(h,r,m)):b.appendChild(document.createTextNode(m))),b}function I(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"}}function w(e,r,o){var n={href:e[r.url]};e.hasOwnProperty(r.urlAttributes)&&e[r.urlAttributes]&&i.merge(n,e[r.urlAttributes]);var a=s.createElement("a",{className:t.cssClass.text+" "+t.cssClass.url,innerHTML:o});return v(a,n),a}function O(e,o,n,a){var l,d,c,h=i.extend({},N,a),p=i.extend({},A,h.ariaAttributes),u=e;"string"!=typeof e&&(c=e,u=e[o.text]||"",l=e[o.id],d=!(!e.hasOwnProperty("isHeader")||!e.isHeader));var m=s.createElement("li",{className:(!0===d?t.cssClass.group:t.cssClass.li)+" "+(i.isNullOrUndefined(n)?"":n),attrs:""!==p.groupItemRole&&""!==p.itemRole?{role:!0===d?p.groupItemRole:p.itemRole}:{}});if(l&&m.setAttribute("data-uid",l),d&&a&&a.groupTemplate){var f=r.compile(a.groupTemplate);s.append(f(e),m)}else if(!d&&a&&a.template){var f=r.compile(a.template);s.append(f(e),m)}else{var y=s.createElement("div",{className:t.cssClass.textContent,attrs:""!==p.wrapperRole?{role:p.wrapperRole}:{}});c&&c.hasOwnProperty(o.url)&&c[o.url]?y.appendChild(w(c,o,u)):y.appendChild(s.createElement("span",{className:t.cssClass.text,innerHTML:u,attrs:""!==p.itemText?{role:p.itemText}:{}})),m.appendChild(y)}return m}function D(e,r,o){var n=i.extend({},N,o),a=i.extend({},A,n.ariaAttributes);t.cssClass=I(n.moduleName);var l=s.createElement("ul",{className:t.cssClass.ul+" "+(i.isNullOrUndefined(r)?"":r),attrs:""!==a.listRole?{role:a.listRole}:{}});return s.append(e,l),l}function E(e,r,o){var n=i.extend({},N,o);i.extend({},A,n.ariaAttributes);return t.cssClass=I(n.moduleName),("left"===n.expandIconPosition?s.prepend:s.append)([s.createElement("div",{className:"e-icons "+n.expandIconClass+" "+(i.isNullOrUndefined(r)?"":r)})],e.querySelector("."+t.cssClass.textContent)),e}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};var A={level:1,listRole:"presentation",itemRole:"presentation",groupItemRole:"group",itemText:"list-item",wrapperRole:"presentation"},N={showCheckBox:!1,showIcon:!1,expandCollapse:!1,fields:e.defaultMappedFields,ariaAttributes:A,listClass:"",itemClass:"",processSubChild:!1,sortOrder:"None",template:null,groupTemplate:null,expandIconClass:"e-icon-collapsible",moduleName:"list",expandIconPosition:"right"};e.createList=n,e.createListFromArray=a,e.createListItemFromArray=l,e.createListItemFromJson=d,e.createListFromJson=c,e.getSiblingLI=h,e.indexOf=p,e.groupDataSource=u,e.addSorting=m,e.getDataSource=f,e.createJsonFromElement=y,e.renderContentTemplate=g,e.renderGroupTemplate=C,e.generateUL=D,e.generateIcon=E}(t.ListBase||(t.ListBase={}))}.apply(t,s))&&(e.exports=r)},function(e,t,i){var s,r;s=[i,t,i(5)],void 0!==(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,s))&&(e.exports=r)}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-data"],t);else{var i="object"==typeof exports?t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data")):t(e["@syncfusion/ej2-base"],e["@syncfusion/ej2-data"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(this,function(e,t){return function(e){function t(s){if(i[s])return i[s].exports;var r=i[s]={exports:{},id:s,loaded:!1};return e[s].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var s,r;s=[i,t,i(1),i(6)],void 0!==(r=function(e,t,i,s){"use strict";function r(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),r(i),r(s)}.apply(t,s))&&(e.exports=r)},function(e,t,i){var s,r;s=[i,t,i(2)],void 0!==(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,s))&&(e.exports=r)},function(e,t,i){var s,r,o=this&&this.__extends||function(){var 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])};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)}}(),n=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};s=[i,t,i(3),i(3),i(3),i(3),i(3),i(4),i(5)],void 0!==(r=function(e,t,i,s,r,a,l,d,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},p={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},u={root:"e-listview",hover:"e-hover",selected:"e-active",parentItem:"e-list-parent",listItem:"e-list-item",listItemText:"e-list-text",grpListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-list-header",headerText:"e-headertext",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back"},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(a.ChildProperty);n([r.Property("id")],m.prototype,"id",void 0),n([r.Property("text")],m.prototype,"text",void 0),n([r.Property("isChecked")],m.prototype,"isChecked",void 0),n([r.Property("isVisible")],m.prototype,"isVisible",void 0),n([r.Property("enabled")],m.prototype,"enabled",void 0),n([r.Property("iconCss")],m.prototype,"iconCss",void 0),n([r.Property("child")],m.prototype,"child",void 0),n([r.Property("tooltip")],m.prototype,"tooltip",void 0),n([r.Property("groupBy")],m.prototype,"groupBy",void 0),n([r.Property("text")],m.prototype,"sortBy",void 0),n([r.Property("htmlAttributes")],m.prototype,"htmlAttributes",void 0),n([r.Property("tableName")],m.prototype,"tableName",void 0),t.FieldSettings=m;var f=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.curDSLevel=[],s.curViewDS=[],s.keyConfigs={moveDown:"downarrow",moveUp:"uparrow",select:"enter",back:"backspace"},s.animateOptions={},s.aniObj=new l.Animation(s.animateOptions),s}return o(t,e),t.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){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.reRender();break;case"headerTitle":this.curDSLevel.length||this.header(this.headerTitle,!1);break;case"showHeader":this.header(this.headerTitle,!1);break;case"dataSource":this.reRender();break;case"sortOrder":case"showIcon":this.listBaseOption.showIcon=this.showIcon,this.curViewDS=this.getSubDS(),this.resetCurrentList()}}},t.prototype.setHTMLAttribute=function(){Object.keys(this.htmlAttributes).length&&s.attributes(this.element,this.htmlAttributes)},t.prototype.setCSSClass=function(e){this.cssClass&&s.addClass([this.element],this.cssClass.split(" ")),e&&s.removeClass([this.element],e.split(" "))},t.prototype.setSize=function(){this.element.style.height=i.formatUnit(this.height),this.element.style.width=i.formatUnit(this.width)},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(u.disable):e.classList.add(u.disable)},t.prototype.header=function(e,t){if(void 0===this.headerEle&&this.showHeader){this.headerEle=s.createElement("div",{className:u.header});var i=s.createElement("span",{className:u.headerText,innerHTML:this.headerTitle}),r=s.createElement("div",{className:u.text,innerHTML:i.outerHTML}),o=s.createElement("div",{className:u.icon+" "+u.backIcon+" e-but-back",attrs:{style:"display:none;"}});this.headerEle.appendChild(o),this.headerEle.appendChild(r),this.element.classList.add("e-has-header"),s.prepend([this.headerEle],this.element)}else if(this.headerEle)if(this.showHeader){this.headerEle.style.display="";var r=this.headerEle.querySelector("."+u.headerText),o=this.headerEle.querySelector("."+u.backIcon);r.innerHTML=e,o.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 r=e.style.position,o="hidden"!==this.element.style.overflow?this.element.style.overflow:"";e.style.position="absolute",e.classList.add("e-view");var n=void 0,a=this.animation.duration;if(this.animation.effect)n=this.enableRtl?p[this.animation.effect]:h[this.animation.effect];else{n=this.enableRtl?p.SlideLeft:h.SlideRight,a=0}this.element.style.overflow="hidden",this.aniObj.animate(e,{name:!0===i?n[0]:n[1],duration:a,timingFunction:this.animation.easing,end:function(t){e.style.display="none",s.element.style.overflow=o,e.style.position=r,e.classList.remove("e-view")}}),t.style.display="",this.aniObj.animate(t,{name:!0===i?n[2]:n[3],duration:a,timingFunction:this.animation.easing,end:function(){s.trigger("actionComplete")}}),this.curUL=t}},t.prototype.preRender=function(){this.listBaseOption={template:this.template,groupTemplate:this.groupTemplate,expandCollapse:!0,listClass:"",ariaAttributes:{itemRole:"listitem",listRole:"list",itemText:"",groupItemRole:"group",wrapperRole:"presentation"},fields:this.fields.properties,sortOrder:this.sortOrder,showIcon:this.showIcon}},t.prototype.clickHandler=function(e){var t=e.target,i=t.classList;if(i.contains(u.backIcon)||i.contains(u.headerText))this.back();else{var r=s.closest(t.parentNode,"."+u.listItem);null===r&&(r=t),this.setSelectLI(r,e)}},t.prototype.hoverHandler=function(e){var t=s.closest(e.target.parentNode,"."+u.listItem);this.setHoverLI(t)},t.prototype.leaveHandler=function(e){this.removeHover()},t.prototype.keyActionHandler=function(e){switch(e.preventDefault(),e.action){case"moveDown":this.hoverSiblingLI();break;case"moveUp":this.hoverSiblingLI(!0);break;case"select":this.setSelectLI(this.curUL.querySelector("."+u.hover),e);break;case"back":this.back()}},t.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&this.back()},t.prototype.wireEvents=function(){r.EventHandler.add(this.element,"click",this.clickHandler,this),r.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),r.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),this.keyboardModule=new a.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),this.touchModule=new l.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},t.prototype.unWireEvents=function(){r.EventHandler.remove(this.element,"click",this.clickHandler),r.EventHandler.remove(this.element,"mouseover",this.hoverHandler),r.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.keyboardModule.destroy(),this.touchModule.destroy()},t.prototype.removeHover=function(){var e=this.element.querySelector("."+u.hover);e&&e.classList.remove(u.hover)},t.prototype.removeSelect=function(){for(var e=this.element.querySelectorAll("."+u.selected),t=0,i=e;t<i.length;t++){var s=i[t];s.removeAttribute("aria-selected"),""!==s.className&&s.classList.remove(u.selected)}},t.prototype.isValidLI=function(e){return e&&e.classList.contains(u.listItem)&&!e.classList.contains(u.grpListItem)&&!e.classList.contains(u.disable)},t.prototype.setSelectLI=function(e,t){if(this.isValidLI(e)&&!e.classList.contains(u.selected)&&this.enable){this.removeSelect(),e.classList.add(u.selected),e.setAttribute("aria-selected","true"),this.removeHover();var s=this.getItemData(e);i.isNullOrUndefined(s)&&"string"==typeof this.dataSource[0]?this.selectedItems={item:e,text:e.innerText.trim(),data:this.dataSource}:this.selectedItems={item:e,text:s[this.listBaseOption.fields.text],data:s};var r={};i.merge(r,this.selectedItems),t&&i.merge(r,{isInteracted:!0,event:t}),this.trigger("select",r),this.selectedLI=e,this.renderSubList(e)}},t.prototype.setHoverLI=function(e){if(this.isValidLI(e)&&!e.classList.contains(u.hover)&&this.enable){var t=this.element.querySelectorAll("."+u.hover);t&&t.length&&s.removeClass(t,u.hover),e.classList.contains(u.selected)||e.classList.add(u.hover)}},t.prototype.hoverSiblingLI=function(e){var t,i=this.curUL.querySelector("."+u.hover);if(i||(i=this.curUL.querySelector("."+u.selected)),i)t=c.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+u.listItem),i,e);else if(e){var s=this.curUL.querySelectorAll("."+u.listItem);t=s[s.length-1]}else t=this.curUL.querySelector("."+u.listItem);this.setHoverLI(t)},t.prototype.getSubDS=function(){var e=this.curDSLevel;if(e.length){for(var t=this.localData,i=0,s=e;i<s.length;i++){var r=s[i];this.curDSJSON=this.findItemFromDS(t,{id:r}),t=this.curDSJSON?this.curDSJSON[this.fields.child]:t}return t}return this.localData},t.prototype.getItemData=function(e){var t=this.getElementUID(e),i=this.dataSource;return this.findItemFromDS(i,t)},t.prototype.findItemFromDS=function(e,t,i){var s,r=this;return e&&e.length&&t?e.some(function(o){return!t.id&&!t.text||t.id&&o[r.fields.id]!==t.id||t.text&&o[r.fields.text]!==t.text?o.hasOwnProperty(r.fields.child)&&o[r.fields.child].length&&(s=r.findItemFromDS(o[r.fields.child],t,i)):s=i?e:o,!!s}):s=e,s},t.prototype.getQuery=function(){var e=[],t=this.query?this.query:new d.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]!==c.ListBase.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),e&&this.fields.groupBy?this.curViewDS=c.ListBase.groupDataSource(e,this.fields,this.sortOrder):e&&"None"!==this.sortOrder?this.curViewDS=c.ListBase.getDataSource(e,c.ListBase.addSorting(this.sortOrder,this.fields.sortBy)):this.curViewDS=e},t.prototype.isInAnimation=function(){return this.curUL.classList.contains(".e-animate")},t.prototype.setLocalData=function(){var e=this;if(this.trigger("actionBegin"),this.dataSource instanceof d.DataManager)this.dataSource.executeQuery(this.getQuery()).then(function(t){e.isDestroyed||(e.localData=t.result,e.renderList(),e.trigger("actionComplete",t))}).catch(function(t){e.isDestroyed||e.trigger("actionFailure",t)});else if(this.dataSource&&this.dataSource.length)this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData});else{var t=this.element.querySelector("ul");t&&(s.remove(t),this.setProperties({dataSource:c.ListBase.createJsonFromElement(t)},!0),this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData}))}},t.prototype.reRender=function(){this.element.innerHTML="",this.curUL=this.headerEle=void 0,this.setLocalData(),this.header(),this.contentContainer=s.createElement("div",{className:u.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement)},t.prototype.resetCurrentList=function(){this.setViewDataSource(this.curViewDS),this.contentContainer.innerHTML="",this.createList(),this.renderIntoDom(this.curUL)},t.prototype.createList=function(){this.ulElement=this.curUL=c.ListBase.createList(this.curViewDS,this.listBaseOption),this.liCollection=this.curUL.querySelectorAll("."+u.listItem)},t.prototype.renderSubList=function(e){var t=e.getAttribute("data-uid");if(e.classList.contains(u.hasChild)&&t){var i=s.closest(e.parentNode,"."+u.parentItem),r=this.element.querySelector("[pid='"+t+"']");this.curDSLevel.push(t),this.setViewDataSource(this.getSubDS()),r||(r=c.ListBase.createListFromJson(this.curViewDS,this.listBaseOption,this.curDSLevel.length),r.setAttribute("pID",t),r.style.display="none",this.renderIntoDom(r)),this.switchView(i,r),this.liCollection=this.curUL.querySelectorAll("."+u.listItem),this.header(this.selectedItems.data[this.listBaseOption.fields.text],!0),this.selectedLI=void 0}},t.prototype.renderIntoDom=function(e){this.contentContainer.appendChild(e)},t.prototype.renderList=function(){this.setViewDataSource(),this.createList(),this.contentContainer=s.createElement("div",{className:u.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement)},t.prototype.getElementUID=function(e){var t={};return e instanceof Element?t.id=e.getAttribute("data-uid"):t=e,t},t.prototype.render=function(){this.element.classList.add(u.root),s.attributes(this.element,{role:"list"}),this.setCSSClass(),this.setEnableRTL(),this.setEnable(),this.setSize(),this.wireEvents(),this.header(),this.setLocalData(),this.setHTMLAttribute(),this.rippleFn=l.rippleEffect(this.element,{selector:"."+u.listItem})},t.prototype.destroy=function(){this.unWireEvents();var t=[u.root,this.cssClass,u.disable,"e-rtl","e-has-header"];s.removeClass([this.element],t),this.rippleFn(),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+"']"),i=this.curUL;t?t=t.parentElement:(this.createList(),this.renderIntoDom(this.ulElement),t=this.curUL);var s=this.curDSJSON[this.fields.text];this.switchView(i,t,!0),this.removeSelect(),this.liCollection=this.curUL.querySelectorAll("."+u.listItem),this.header(this.curDSLevel.length?s:this.headerTitle,!!this.curDSLevel.length)}},t.prototype.selectItem=function(e){var t=this.getItemData(e);if(t){var i=this.element.querySelector('[data-uid="'+t[this.fields.id]+'"]');i&&this.setSelectLI(i)}},t.prototype.getSelectedItem=function(){return this.selectedItems},t.prototype.findItem=function(e){return this.findItemFromDS(this.dataSource,e)},t.prototype.enableItem=function(e){var t=this.getItemData(e);if(t){var i=this.element.querySelector('[data-uid="'+t[this.fields.id]+'"]');i&&i.classList.remove(u.disable),delete t[this.fields.enabled]}},t.prototype.disableItem=function(e){var t=this.getItemData(e);if(t){var i=this.element.querySelector('[data-uid="'+t[this.fields.id]+'"]');i&&i.classList.add(u.disable),t[this.fields.enabled]=!1}},t.prototype.showItem=function(e){this.showHideItem(e,!1,"")},t.prototype.hideItem=function(e){this.showHideItem(e,!0,"none")},t.prototype.showHideItem=function(e,t,i){var s=this.getItemData(e);if(s){var r=this.element.querySelector('[data-uid="'+s[this.fields.id]+'"]');r&&(r.style.display=i),t?s[this.fields.isVisible]=!1:delete s[this.fields.isVisible]}},t.prototype.addItem=function(e,t){var i=this.findItemFromDS(this.dataSource,t),s=i[this.fields.child];s||(s=[]),s=s.concat(e),i instanceof Array?(this.dataSource=this.localData=i.concat(e),this.setViewDataSource()):i[this.fields.child]=s,this.resetCurrentList()},t.prototype.removeItem=function(e){var t=this,i=this.getElementUID(e),s=this.findItemFromDS(this.dataSource,i,!0);if(s&&e){var r,o;s.some(function(e,s,n){return!(!i.id&&!i.text||i.id&&e[t.fields.id]!==i.id||i.text&&e[t.fields.text]!==i.text)&&(r=n,o=s,!0)}),r.splice(o,1),this.resetCurrentList()}},t.prototype.getModuleName=function(){return"listview"},t.prototype.getPersistData=function(){return this.addOnPersist(["cssClass","enableRtl","htmlAttributes","enable","fields","animation","headerTitle","sortOrder","showIcon","height","width"])},t}(r.Component);n([r.Property()],f.prototype,"cssClass",void 0),n([r.Property({})],f.prototype,"htmlAttributes",void 0),n([r.Property(!0)],f.prototype,"enable",void 0),n([r.Property([])],f.prototype,"dataSource",void 0),n([r.Property()],f.prototype,"query",void 0),n([r.Complex(c.ListBase.defaultMappedFields,m)],f.prototype,"fields",void 0),n([r.Property({effect:"SlideLeft",duration:400,easing:"ease"})],f.prototype,"animation",void 0),n([r.Property("None")],f.prototype,"sortOrder",void 0),n([r.Property(!1)],f.prototype,"showIcon",void 0),n([r.Property("")],f.prototype,"headerTitle",void 0),n([r.Property(!1)],f.prototype,"showHeader",void 0),n([r.Property("")],f.prototype,"height",void 0),n([r.Property("")],f.prototype,"width",void 0),n([r.Property(null)],f.prototype,"template",void 0),n([r.Property(null)],f.prototype,"groupTemplate",void 0),n([r.Event()],f.prototype,"select",void 0),n([r.Event()],f.prototype,"actionBegin",void 0),n([r.Event()],f.prototype,"actionComplete",void 0),n([r.Event()],f.prototype,"actionFailure",void 0),f=n([a.NotifyPropertyChanges],f),t.ListView=f,t.listViewBuilder=r.CreateBuilder(f)}.apply(t,s))&&(e.exports=r)},function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){var s,r;s=[i,t,i(3),i(3),i(3),i(4)],void 0!==(r=function(e,t,i,s,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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"};!function(e){function n(e,t,s){var r=i.extend({},P,t),o=i.extend({},N,r.ariaAttributes),n=v(e).typeof;return"string"===n||"number"===n?a(e,s,t):c(e,t,o.level,s)}function a(e,t,i){return E(l(e,t,i),null,i)}function l(e,s,r){var o=[],n=i.extend({},P,r);t.cssClass=w(n.moduleName);for(var a=L(),l=0;l<e.length;l++)if(!i.isNullOrUndefined(e[l])){var d=void 0;if(n.itemCreating&&"function"==typeof n.itemCreating){var c={dataSource:e,curData:e[l],text:e[l],options:n};n.itemCreating(c)}if(d=s?I(e[l],null,null,[],null,a,l,r):D(e[l],null,null,r),n.itemCreated&&"function"==typeof n.itemCreated){var c={dataSource:e,curData:e[l],text:e[l],item:d,options:n};n.itemCreated(c)}o.push(d)}return o}function d(r,o,n,a){var l=i.extend({},P,o);t.cssClass=w(l.moduleName);var d,c=i.extend({},e.defaultMappedFields,l.fields),h=i.extend({},N,l.ariaAttributes);n&&(h.level=n);var p,u=[];Object.keys(r).length&&!v(r).item.hasOwnProperty(c.id)&&(d=L());for(var m=0;m<r.length;m++)if(!i.isNullOrUndefined(r[m])){if(l.itemCreating&&"function"==typeof l.itemCreating){var f={dataSource:r,curData:r[m],text:r[m][c.text],options:l,fields:c};l.itemCreating(f)}var y=r[m];Object.keys(r).length&&r[m].hasOwnProperty(c.id)&&!i.isNullOrUndefined(r[m][c.id])&&(d=r[m].id);var g=[];if(l.showCheckBox&&g.push(s.createElement("input",{className:t.cssClass.check,attrs:{type:"checkbox"}})),!0===a)l.showIcon&&y.hasOwnProperty(c.iconCss)&&(i.isNullOrUndefined(y[c.iconCss])||g.push(s.createElement("span",{className:t.cssClass.icon+" "+y[c.iconCss]}))),p=I(y,c,l.itemClass,g,!(!y.hasOwnProperty("isHeader")||!y.isHeader),d,m,o);else{if(p=D(y,c,l.itemClass,o),p.classList.add(t.cssClass.level+"-"+h.level),p.setAttribute("aria-level",h.level.toString()),y.hasOwnProperty(c.tooltip)&&p.setAttribute("title",y[c.tooltip]),y.hasOwnProperty(c.htmlAttributes)&&y[c.htmlAttributes]&&b(p,y[c.htmlAttributes]),y.hasOwnProperty(c.enabled)&&!1===y[c.enabled]&&p.classList.add(t.cssClass.disabled),y.hasOwnProperty(c.isVisible)&&!1===y[c.isVisible]&&(p.style.display="none"),y.hasOwnProperty(c.imageUrl)&&!i.isNullOrUndefined(y[c.imageUrl])){var C={src:y[c.imageUrl]};y.hasOwnProperty(c.imageUrl)&&i.merge(C,y[c.imageAttributes]),s.prepend([s.createElement("img",{className:t.cssClass.image,attrs:C})],p.firstElementChild)}l.showIcon&&y.hasOwnProperty(c.iconCss)&&!l.template&&(i.isNullOrUndefined(y[c.iconCss])||s.prepend([s.createElement("div",{className:t.cssClass.icon+" "+y[c.iconCss]})],p.firstElementChild)),g.length&&s.prepend(g,p.firstElementChild),x(y,c,r,l,p,h.level)}if(l.itemCreated&&"function"==typeof l.itemCreated){var f={dataSource:r,curData:r[m],text:r[m][c.text],item:p,options:l,fields:c};l.itemCreated(f)}u.push(p)}return u}function c(e,t,s,r){var o=i.extend({},P,t);return E(d(e,t,s,r),o.listClass,t)}function h(e,i,r){if(t.cssClass=w(P.moduleName),e&&e.length){var o,n,a=Array.prototype.slice.call(e);for(n=i?p(i,a):!0===r?a.length:-1,o=a[n+(!0===r?-1:1)];o&&(!s.isVisible(o)||o.classList.contains(t.cssClass.disabled));)n+=!0===r?-1:1,o=a[n];return o}}function p(e,t){if(t&&e){var i=t;return i=Array.prototype.slice.call(t),i.indexOf(e)}}function u(e,t,i){void 0===i&&(i="None");var s=(new o.Query).group(t.groupBy);s=m(i,"key",s);var r=f(e,s);e=[];for(var n=0;n<r.length;n++){var a=r[n].items,l={};l[t.text]=r[n].key,l.isHeader=!0,l.items=a,e.push(l);for(var d=0;d<a.length;d++)e.push(a[d])}return e}function m(e,t,i){return void 0===i&&(i=new o.Query),"Ascending"===e?i.sortBy(t,"ascending",!0):"Descending"===e&&i.sortBy(t,"descending",!0),i}function f(e,t){return new o.DataManager(e).executeLocal(t)}function y(t,s){var r=i.extend({},P,s),o=i.extend({},e.defaultMappedFields,r.fields),n=t.cloneNode(!0),a=[];n.classList.add("json-parent");var l=n.querySelectorAll(".json-parent>li");n.classList.remove("json-parent");for(var d=0;d<l.length;d++)!function(e){var t=l[e],i=t.querySelector("a"),r=t.querySelector("ul"),n={},d=i?i.childNodes:t.childNodes;Object.keys(d).forEach(function(e){d[Number(e)].hasChildNodes()||(n[o.text]=d[Number(e)].textContent)}),n[o.id]=L();var c=g(t);Object.keys(c).length&&(n[o.htmlAttributes]=c),i&&(c=g(i),Object.keys(c).length&&(n[o.urlAttributes]=c)),r&&(n[o.child]=y(r,s)),a.push(n)}(d);return a}function v(e){for(var t={typeof:null,item:null},s=0;s<e.length;s++)if(!i.isNullOrUndefined(e[s]))return t={typeof:typeof e[s],item:e[s]};return t}function b(e,t){var r={};i.merge(r,t),r.class&&(s.addClass([e],r.class.split(" ")),delete r.class),s.attributes(e,r)}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 C(e,i,o){t.cssClass=w(P.moduleName);for(var n=s.createElement("ul",{className:t.cssClass.ul,attrs:{role:"presentation"}}),a=r.compile(e),l=[],d=L(),c=0;c<i.length;c++){var h=i[c],p=h.isHeader,u=s.createElement("li",{id:d+"-"+c,className:p?t.cssClass.group:t.cssClass.li,attrs:{role:"presentation"}});if(p)u.innerText=h[o.text];else{s.append(a(h),u);var m=h[o.value];u.setAttribute("data-value",m),u.setAttribute("role","option")}l.push(u)}return s.append(l,n),n}function S(e,t,i,o){for(var n=r.compile(e),a=i.groupBy,l={},d=0,c=o;d<c.length;d++){var h=c[d];l[a]=h.textContent,h.innerHTML="",s.append(n(l),h)}return o}function L(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function x(e,i,r,o,n,a){var l=e[i.child]||[],d=e[i.hasChildren];if(l.length&&(d=!0,n.classList.add(t.cssClass.hasChild),o.processSubChild)){var h=c(l,o,++a);n.appendChild(h)}if(o.expandCollapse&&d&&!o.template){n.firstElementChild.classList.contains(t.cssClass.textContent)&&n.firstElementChild.classList.add(t.cssClass.iconWrapper);("left"===o.expandIconPosition?s.prepend:s.append)([s.createElement("div",{className:"e-icons "+o.expandIconClass})],n.querySelector("."+t.cssClass.textContent))}}function I(e,r,o,n,a,l,d,c){var h,p=i.extend({},P,c),u=i.extend({},N,p.ariaAttributes),m=e,f=e;"string"!=typeof e&&"number"!=typeof e&&(h=e,m=e[r.text]||"",f=e[r.value]);var y;y=i.isNullOrUndefined(h)||i.isNullOrUndefined(h[r.id])||""===h[r.id]?l+"-"+d:l;var v=s.createElement("li",{className:(!0===a?t.cssClass.group:t.cssClass.li)+" "+(i.isNullOrUndefined(o)?"":o),id:y,attrs:""!==u.groupItemRole&&""!==u.itemRole?{role:!0===a?u.groupItemRole:u.itemRole}:{}});return h&&h.hasOwnProperty(r.enabled)&&"false"===h[r.enabled].toString()&&v.classList.add(t.cssClass.disabled),a?v.innerText=m:(i.isNullOrUndefined(f)||v.setAttribute("data-value",f),v.setAttribute("role","option"),h&&h.hasOwnProperty(r.htmlAttributes)&&h[r.htmlAttributes]&&b(v,h[r.htmlAttributes]),n.length&&s.append(n,v),h&&h.hasOwnProperty(r.url)&&h[r.url]?v.appendChild(O(h,r,m)):v.appendChild(document.createTextNode(m))),v}function w(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"}}function O(e,r,o){var n={href:e[r.url]};e.hasOwnProperty(r.urlAttributes)&&e[r.urlAttributes]&&i.merge(n,e[r.urlAttributes]);var a=s.createElement("a",{className:t.cssClass.text+" "+t.cssClass.url,innerHTML:o});return b(a,n),a}function D(e,o,n,a){var l,d,c,h=i.extend({},P,a),p=i.extend({},N,h.ariaAttributes),u=e;"string"!=typeof e&&(c=e,u=e[o.text]||"",l=e[o.id],d=!(!e.hasOwnProperty("isHeader")||!e.isHeader));var m=s.createElement("li",{className:(!0===d?t.cssClass.group:t.cssClass.li)+" "+(i.isNullOrUndefined(n)?"":n),attrs:""!==p.groupItemRole&&""!==p.itemRole?{role:!0===d?p.groupItemRole:p.itemRole}:{}});if(l&&m.setAttribute("data-uid",l),d&&a&&a.groupTemplate){var f=r.compile(a.groupTemplate);s.append(f(e),m)}else if(!d&&a&&a.template){var f=r.compile(a.template);s.append(f(e),m)}else{var y=s.createElement("div",{className:t.cssClass.textContent,attrs:""!==p.wrapperRole?{role:p.wrapperRole}:{}});c&&c.hasOwnProperty(o.url)&&c[o.url]?y.appendChild(O(c,o,u)):y.appendChild(s.createElement("span",{className:t.cssClass.text,innerHTML:u,attrs:""!==p.itemText?{role:p.itemText}:{}})),m.appendChild(y)}return m}function E(e,r,o){var n=i.extend({},P,o),a=i.extend({},N,n.ariaAttributes);t.cssClass=w(n.moduleName);var l=s.createElement("ul",{className:t.cssClass.ul+" "+(i.isNullOrUndefined(r)?"":r),attrs:""!==a.listRole?{role:a.listRole}:{}});return s.append(e,l),l}function A(e,r,o){var n=i.extend({},P,o);i.extend({},N,n.ariaAttributes);return t.cssClass=w(n.moduleName),("left"===n.expandIconPosition?s.prepend:s.append)([s.createElement("div",{className:"e-icons "+n.expandIconClass+" "+(i.isNullOrUndefined(r)?"":r)})],e.querySelector("."+t.cssClass.textContent)),e}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};var N={level:1,listRole:"presentation",itemRole:"presentation",groupItemRole:"group",itemText:"list-item",wrapperRole:"presentation"},P={showCheckBox:!1,showIcon:!1,expandCollapse:!1,fields:e.defaultMappedFields,ariaAttributes:N,listClass:"",itemClass:"",processSubChild:!1,sortOrder:"None",template:null,groupTemplate:null,expandIconClass:"e-icon-collapsible",moduleName:"list",expandIconPosition:"right"};e.createList=n,e.createListFromArray=a,e.createListItemFromArray=l,e.createListItemFromJson=d,e.createListFromJson=c,e.getSiblingLI=h,e.indexOf=p,e.groupDataSource=u,e.addSorting=m,e.getDataSource=f,e.createJsonFromElement=y,e.renderContentTemplate=C,e.renderGroupTemplate=S,e.generateUL=E,e.generateIcon=A}(t.ListBase||(t.ListBase={}))}.apply(t,s))&&(e.exports=r)},function(e,t,i){var s,r;s=[i,t,i(5)],void 0!==(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,s))&&(e.exports=r)}])});
//# sourceMappingURL=ej2-lists.umd.min.js.map

@@ -73,3 +73,4 @@ import { extend, merge, isNullOrUndefined } from '@syncfusion/ej2-base';

var ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);
if (typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') {
var type = typeofData(dataSource).typeof;
if (type === 'string' || type === 'number') {
return createListFromArray(dataSource, isSingleLevel, options);

@@ -93,2 +94,5 @@ }

for (var i = 0; i < dataSource.length; i++) {
if (isNullOrUndefined(dataSource[i])) {
continue;
}
var li = void 0;

@@ -136,6 +140,9 @@ if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {

var li;
if (Object.keys(dataSource).length && !dataSource[0].hasOwnProperty(fields.id)) {
if (Object.keys(dataSource).length && !typeofData(dataSource).item.hasOwnProperty(fields.id)) {
id = genUID();
}
for (var i = 0; i < dataSource.length; i++) {
if (isNullOrUndefined(dataSource[i])) {
continue;
}
if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {

@@ -335,2 +342,11 @@ var curData = {

ListBase.createJsonFromElement = createJsonFromElement;
function typeofData(data) {
var match = { typeof: null, item: null };
for (var i = 0; i < data.length; i++) {
if (!isNullOrUndefined(data[i])) {
return match = { typeof: typeof data[i], item: data[i] };
}
}
return match;
}
function setAttribute(element, elementAttributes) {

@@ -449,3 +465,3 @@ var attr = {};

else {
if (value) {
if (!isNullOrUndefined(value)) {
li.setAttribute('data-value', value);

@@ -452,0 +468,0 @@ }

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

view: 'e-view',
header: 'e-header',
header: 'e-list-header',
headerText: 'e-headertext',

@@ -51,0 +51,0 @@ text: 'e-text',

{
"name": "@syncfusion/ej2-lists",
"version": "1.0.19",
"version": "15.4.17",
"description": "Essential JS 2 List Components",

@@ -9,4 +9,4 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "^1.0.19",
"@syncfusion/ej2-data": "^1.0.19"
"@syncfusion/ej2-base": "^15.4.17",
"@syncfusion/ej2-data": "^15.4.17"
},

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

@@ -72,3 +72,4 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "@syncfusion/ej2-data"], function (require, exports, ej2_base_1, ej2_base_2, ej2_base_3, ej2_data_1) {

var ariaAttributes = ej2_base_1.extend({}, defaultAriaAttributes, curOpt.ariaAttributes);
if (typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') {
var type = typeofData(dataSource).typeof;
if (type === 'string' || type === 'number') {
return createListFromArray(dataSource, isSingleLevel, options);

@@ -92,2 +93,5 @@ }

for (var i = 0; i < dataSource.length; i++) {
if (ej2_base_1.isNullOrUndefined(dataSource[i])) {
continue;
}
var li = void 0;

@@ -135,6 +139,9 @@ if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {

var li;
if (Object.keys(dataSource).length && !dataSource[0].hasOwnProperty(fields.id)) {
if (Object.keys(dataSource).length && !typeofData(dataSource).item.hasOwnProperty(fields.id)) {
id = genUID();
}
for (var i = 0; i < dataSource.length; i++) {
if (ej2_base_1.isNullOrUndefined(dataSource[i])) {
continue;
}
if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {

@@ -334,2 +341,11 @@ var curData = {

ListBase.createJsonFromElement = createJsonFromElement;
function typeofData(data) {
var match = { typeof: null, item: null };
for (var i = 0; i < data.length; i++) {
if (!ej2_base_1.isNullOrUndefined(data[i])) {
return match = { typeof: typeof data[i], item: data[i] };
}
}
return match;
}
function setAttribute(element, elementAttributes) {

@@ -448,3 +464,3 @@ var attr = {};

else {
if (value) {
if (!ej2_base_1.isNullOrUndefined(value)) {
li.setAttribute('data-value', value);

@@ -451,0 +467,0 @@ }

@@ -103,3 +103,3 @@ import { merge, formatUnit, isNullOrUndefined } from '@syncfusion/ej2-base';import { attributes, addClass, removeClass, createElement, prepend, closest, remove } from '@syncfusion/ej2-base';import { Component, EventHandler, BaseEventArgs, Property, Complex, Event, CreateBuilder } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty, KeyboardEvents } from '@syncfusion/ej2-base';import { KeyboardEventArgs, EmitType } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, Effect, rippleEffect, Touch, SwipeEventArgs } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { ListBase, ListBaseOptions, SortOrder } from '../common/list-base';import { ListViewHelper } from './list-view-builder';

* Specifies the query that need to process remote dataSource.
* @default
* @default
*/

@@ -106,0 +106,0 @@ query?: Query;

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

view: 'e-view',
header: 'e-header',
header: 'e-list-header',
headerText: 'e-headertext',

@@ -47,0 +47,0 @@ text: 'e-text',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc