Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-navigations

Package Overview
Dependencies
Maintainers
2
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-navigations - npm Package Compare versions

Comparing version 1.0.17 to 1.0.18

4

dist/ej2-navigations.umd.min.js
/*!
* filename: ej2-navigations.umd.min.js
* version : 1.0.17
* version : 1.0.18
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,2 +11,2 @@ * 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-popups"),require("@syncfusion/ej2-buttons"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-popups","@syncfusion/ej2-buttons"],t);else{var i="object"==typeof exports?t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-buttons")):t(e["@syncfusion/ej2-base"],e["@syncfusion/ej2-popups"],e["@syncfusion/ej2-buttons"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(this,function(e,t,i){return function(e){function t(o){if(i[o])return i[o].exports;var s=i[o]={exports:{},id:o,loaded:!1};return e[o].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var o,s;o=[i,t,i(1),i(4)],void 0!==(s=function(e,t,i,o){"use strict";function s(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),s(i),s(o)}.apply(t,o))&&(e.exports=s)},function(e,t,i){var o,s;o=[i,t,i(2)],void 0!==(s=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,o))&&(e.exports=s)},function(e,t,i){var o,s,r=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),l=this&&this.__decorate||function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l};o=[i,t,i(3),i(3)],void 0!==(s=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,i){return e.call(this,t,i)||this}return r(t,e),t.prototype.preRender=function(){this.browser=o.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=o.Browser.isDevice;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=i.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},t.prototype.render=function(){this.touchModule=new i.Touch(this.element,{scroll:this.touchHandler.bind(this)}),this.element.addEventListener("contextmenu",function(e){e.preventDefault()}),this.isDevice?this.element.classList.add("e-scroll-device"):(this.createNavIcon(this.element),i.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this))},t.prototype.initialize=function(){var e=o.createElement("div",{className:"e-hscroll-content"}),t=o.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=[].slice.call(i.children),r=0,l=s;r<l.length;r++){var n=l[r];e.appendChild(n)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},t.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},t.prototype.getModuleName=function(){return"hScroll"},t.prototype.destroy=function(){var t=this.element;t.style.display="",t.classList.remove("e-hscroll");for(var s=i.selectAll("#"+t.id+"_nav.e-"+t.id+"_nav"),r=0,l=[].slice.call(this.scrollItems.children);r<l.length;r++){var n=l[r];t.appendChild(n)}this.uniqueId&&this.element.removeAttribute("id"),o.detach(this.scrollEle),s.length>0&&(o.detach(s[0]),o.detach(s[1])),i.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},t.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),s=o.createElement("div",{id:t,className:i});s.setAttribute("aria-disabled","false");var r=o.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"}),l="e-"+e.id.concat("_nav e-scroll-nav e-scroll-left-nav"),n=o.createElement("div",{id:t,className:l+" e-overlay"});n.setAttribute("aria-disabled","true");var a=o.createElement("div",{className:"e-nav-left-arrow e-nav-arrow e-icons"});n.appendChild(a),s.appendChild(r),s.setAttribute("tabindex","0"),e.appendChild(s),e.insertBefore(n,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),n.classList.add("e-ie-align")),this.eventBinding([s,n])},t.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target)};this.keyTimer=window.setTimeout(function(){i()},100)}},t.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},t.prototype.eventBinding=function(e){var t=this;e.forEach(function(e){new i.Touch(e,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),e.addEventListener("keydown",t.onKeyPress.bind(t)),e.addEventListener("keyup",t.onKeyUp.bind(t)),e.addEventListener("mouseup",t.repeatScroll.bind(t)),e.addEventListener("touchend",t.repeatScroll.bind(t)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),i.EventHandler.add(e,"click",t.clickEventHandler,t)})},t.prototype.repeatScroll=function(){clearInterval(this.timeout)},t.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var o=function(){t.eleScrolling(10,i)};this.timeout=window.setInterval(function(){o()},50)},t.prototype.contains=function(e,t){return e.classList.contains(t)},t.prototype.eleScrolling=function(e,t){var i=this.scrollEle,o=this.element,s=t.classList;s.contains("e-scroll-nav")&&(s=t.querySelector(".e-nav-arrow").classList),this.contains(o,"e-rtl")&&this.browserCheck&&(e=-e);var r=i.scrollLeft;!this.contains(o,"e-rtl")||this.browserCheck||this.ieCheck?s.contains("e-nav-right-arrow")?i.scrollLeft=r+e:i.scrollLeft=r-e:s.contains("e-nav-left-arrow")?i.scrollLeft=r+e:i.scrollLeft=r-e},t.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target)},t.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceX,this.ieCheck&&this.contains(this.element,"e-rtl")&&(t=-t),"Left"===e.scrollDirection?i.scrollLeft=i.scrollLeft+t:"Right"===e.scrollDirection&&(i.scrollLeft=i.scrollLeft-t)},t.prototype.arrowDisabling=function(e,t){e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),clearInterval(this.timeout),t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0"),this.repeatScroll()},t.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,o=this.element,s=this.element.querySelector(".e-scroll-left-nav"),r=this.element.querySelector(".e-scroll-right-nav"),l=t.scrollLeft;if(l<=0&&(l=-l),0===l)!this.contains(o,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(s,r):this.arrowDisabling(r,s);else if(Math.ceil(i+l+.1)>=t.scrollWidth)!this.contains(o,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(r,s):this.arrowDisabling(s,r);else{var n=this.element.querySelector(".e-overlay");n&&(n.classList.remove("e-overlay"),n.setAttribute("aria-disabled","false"),n.setAttribute("tabindex","0"))}},t.prototype.onPropertyChanged=function(e,t){for(var i=0,o=Object.keys(e);i<o.length;i++){switch(o[i]){case"scrollStep":break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}}},t}(i.Component);l([o.Property(40)],s.prototype,"scrollStep",void 0),s=l([o.NotifyPropertyChanges],s),t.HScroll=s}.apply(t,o))&&(e.exports=s)},function(t,i){t.exports=e},function(e,t,i){var o,s;o=[i,t,i(5)],void 0!==(s=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,o))&&(e.exports=s)},function(e,t,i){var o,s,r=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),l=this&&this.__decorate||function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l};o=[i,t,i(3),i(3),i(3),i(3),i(3),i(6),i(6),i(7),i(2)],void 0!==(s=function(e,t,i,o,s,n,a,c,h,p,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f="e-toolbar-items",u="e-toolbar-item",v="e-toolbar-popup",y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(a.ChildProperty);l([i.Property("")],y.prototype,"id",void 0),l([i.Property("")],y.prototype,"text",void 0),l([i.Property("auto")],y.prototype,"width",void 0),l([i.Property("")],y.prototype,"cssClass",void 0),l([i.Property("")],y.prototype,"prefixIcon",void 0),l([i.Property("")],y.prototype,"suffixIcon",void 0),l([i.Property("None")],y.prototype,"overflow",void 0),l([i.Property("")],y.prototype,"template",void 0),l([i.Property("Button")],y.prototype,"type",void 0),l([i.Property("Both")],y.prototype,"showTextOn",void 0),l([i.Property(null)],y.prototype,"htmlAttributes",void 0),l([i.Property("")],y.prototype,"tooltipText",void 0),l([i.Property("left")],y.prototype,"align",void 0),t.Item=y;var m=function(e){function t(t,i){var o=e.call(this,t,i)||this;return o.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},o}return r(t,e),t.prototype.destroy=function(){var t=this.element;e.prototype.destroy.call(this),this.unwireEvents(),t.children.length>0&&t.removeChild(t.children[0]),t.removeAttribute("style")},t.prototype.preRender=function(){this.trigger("beforeCreate"),this.scrollModule=null,this.popObj=null,this.enableRtl&&this.add(this.element,"e-rtl")},t.prototype.wireEvents=function(){i.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resize.bind(this)),this.keyModule=new o.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),this.element.setAttribute("tabIndex","0")},t.prototype.unwireEvents=function(){i.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyHScroll(),this.keyModule.destroy(),this.popObj&&(i.EventHandler.remove(document,"scroll",this.docEvent),i.EventHandler.remove(document,"click",this.docEvent))},t.prototype.docEvent=function(e){var t=o.closest(e.target,".e-popup");this.popObj&&o.isVisible(this.popObj.element)&&!t&&this.popObj.hide({name:"SlideUp",duration:100})},t.prototype.destroyHScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,"e-tbar-pos"),this.scrollModule.destroy(),this.scrollModule=null)},t.prototype.destroyItems=function(){[].slice.call(this.element.querySelectorAll("."+u)).forEach(function(e){o.detach(e)}),this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},t.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,"e-rtl"),this.destroyHScroll()),this.popObj&&this.popupRefresh(this.popObj.element,!0)},t.prototype.add=function(e,t){e.classList.add(t)},t.prototype.remove=function(e,t){e.classList.remove(t)},t.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},t.prototype.clstElement=function(e,t){return e&&this.popObj&&o.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+u):this.element===t||e?this.element.querySelector("."+u):o.closest(t,"."+u)},t.prototype.keyHandling=function(e,t,i,r,l){var n=this.popObj,a=this.element,c={name:"SlideUp",duration:100};switch(t.action){case"moveRight":a===i||r?this.elementFocus(e):this.eleFocus(e,"next");break;case"moveLeft":if(n&&r)if(this.tbarAlign){e=o.closest(e,"."+f);var h=s.selectAll("."+u,e);e=h[h.length-1]}else e=e.parentElement.lastElementChild;!r||e.classList.contains("e-separator")||e.classList.contains("e-overlay")?this.eleFocus(e,"previous"):this.elementFocus(e);break;case"home":case"end":var p=void 0,d=void 0;if(e){var v=o.closest(e,".e-popup");v?o.isVisible(this.popObj.element)&&(d=v.children,p="home"===t.action?d[0]:d[d.length-1]):(d=this.element.querySelectorAll("."+f+" ."+u),p="home"===t.action?d[0]:d[d.length-1]),p&&this.elementFocus(p)}break;case"moveUp":case"moveDown":var y="moveUp"===t.action?"previous":"next";n&&o.closest(i,".e-popup")?"moveUp"===t.action&&n.element.firstElementChild===e?a.querySelector(".e-hor-nav").focus():this.eleFocus(e,y):"moveDown"===t.action&&this.elementFocus(e);break;case"tab":if(!l){var m=e.firstElementChild;(a===i||r)&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":n&&n.hide(c);break;case"popupOpen":if(!r)return;n&&!o.isVisible(n.element)?(n.element.style.top=a.offsetHeight+"px",n.show({name:"SlideDown",duration:100})):n.hide(c)}},t.prototype.keyActionHandler=function(e){e.preventDefault();var t,i=e.target,o=i.classList.contains("e-hor-nav"),s=i.classList.contains("e-scroll-nav");((t=this.clstElement(o,i))||s)&&this.keyHandling(t,e,i,o,s)},t.prototype.eleFocus=function(e,t){var i=Object(e)[t+"ElementSibling"],o=function(e){return e.classList.contains("e-separator")||e.classList.contains("e-overlay")};if(i){var s=o(i);if(s)if(Object(i)[t+"Sibling"]){if(i=Object(i)[t+"Sibling"],s=o(i))return void this.eleFocus(i,t)}else if(this.popObj&&"next"===t)return void this.element.querySelector(".e-hor-nav").focus();this.elementFocus(i)}else if(this.tbarAlign){var r=Object(e.parentElement)[t+"ElementSibling"];if(!n.isNullOrUndefined(r)&&r.children.length>0)if("next"===t){var l=r.querySelector("."+u);o(l)?this.eleFocus(l,t):(l.firstElementChild.focus(),this.activeEleSwitch(l))}else{var l=r.lastElementChild;o(l)?this.eleFocus(l,t):this.elementFocus(l)}else this.popObj&&this.element.querySelector(".e-hor-nav").focus()}else this.popObj&&"next"===t&&this.element.querySelector(".e-hor-nav").focus()},t.prototype.clickHandler=function(e){var t=e.target,i=t.classList,s=this.element,r=o.closest(t,".e-hor-nav");r||(r=t),!s.children[0].classList.contains("e-hscroll")&&i.contains("e-hor-nav")&&(i=t.querySelector(".e-icons").classList),(i.contains("e-popup-up-icon")||i.contains("e-popup-down-icon"))&&this.popupClickHandler(s,r,"e-rtl");var l,a=o.closest(e.target,"."+u);if(!n.isNullOrUndefined(a)&&!a.classList.contains("e-overlay")||r.classList.contains("e-hor-nav")){a&&(l=this.items[this.tbarEle.indexOf(a)]);var c={originalEvent:e,item:l};this.trigger("clicked",c)}},t.prototype.popupClickHandler=function(e,t,i){var s=this.popObj;o.isVisible(s.element)?(t.classList.remove("e-nav-active"),s.hide({name:"SlideUp",duration:100})):(e.classList.contains(i)&&(s.enableRtl=!0,s.position={X:"left",Y:"top"}),0!==s.offsetX||e.classList.contains(i)||(s.enableRtl=!1,s.position={X:"right",Y:"top"}),s.dataBind(),s.element.style.top=this.element.offsetHeight+"px",t.classList.add("e-nav-active"),s.show({name:"SlideDown",duration:100}))},t.prototype.render=function(){this.initialize(),this.renderControl(),this.wireEvents()},t.prototype.initialize=function(){var e=n.formatUnit(this.width),t=n.formatUnit(this.height);"msie"===a.Browser.info.name&&"auto"===this.height||s.setStyleAttribute(this.element,{height:t}),s.setStyleAttribute(this.element,{width:e});var i={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":"horizontal"};o.attributes(this.element,i)},t.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?this.element.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning()},t.prototype.initHScroll=function(e,t){!this.scrollModule&&this.checkOverflow(e,t[0])&&(this.tbarAlign&&this.element.querySelector("."+f+" .e-toolbar-center").removeAttribute("style"),this.scrollModule=new d.HScroll({scrollStep:50,enableRtl:this.enableRtl},t[0]),this.remove(this.scrollModule.element,"e-tbar-pos"),s.setStyleAttribute(this.element,{overflow:"hidden"}))},t.prototype.itemWidthCal=function(e){var t=0;return[].slice.call(e.children).forEach(function(e){t+=e.offsetWidth}),t},t.prototype.checkOverflow=function(e,t){if(n.isNullOrUndefined(e)||n.isNullOrUndefined(t))return!1;var i,o=e.offsetWidth;i=this.tbarAlign?this.itemWidthCal(this.scrollModule?t.querySelector(".e-hscroll-content"):t):t.offsetWidth;var s=e.querySelector(".e-hor-nav"),r=e.querySelector(".e-scroll-nav");return i>o-(s?s.offsetWidth:r?2*r.offsetWidth:0)},t.prototype.refreshOverflow=function(){this.resize()},t.prototype.renderOverflowMode=function(){var e=this.element,t=e.querySelector("."+f);if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.overflowMode){case"Scrollable":this.destroyHScroll(),this.initHScroll(e,e.getElementsByClassName(f));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),this.checkOverflow(e,t)&&(this.createPopupEle(e,[].slice.call(s.selectAll("."+f+" ."+u,e))),this.element.querySelector(".e-hor-nav").setAttribute("tabIndex","0")),this.tbarAlign&&(this.add(t,"e-tbar-pos"),this.itemPositioning())}},t.prototype.createPopupEle=function(e,t){var i=e.querySelector(".e-hor-nav");i||this.createPopupIcon(e),i=e.querySelector(".e-hor-nav");var o=e.offsetWidth-i.offsetWidth;this.element.classList.remove("e-rtl"),this.checkPriority(e,t,o,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.createPopup()},t.prototype.pushingPoppedEle=function(e,t,i,o){var r=e.element,l=s.selectAll(".e-overflow-show",i),n=0,a=[].slice.call(s.selectAll("."+v,r.querySelector("."+f))),c=0;a.forEach(function(r,a){l=s.selectAll(".e-overflow-show",i),r.classList.contains("e-overflow-show")&&l.length>0?e.tbResize&&l.length>a?(i.insertBefore(r,l[a]),++c):(i.insertBefore(r,i.children[l.length]),++c):r.classList.contains("e-overflow-show")?(i.insertBefore(r,i.firstChild),++c):e.tbResize&&r.classList.contains("e-overflow-hide")&&i.children.length>0&&0===l.length?(i.insertBefore(r,i.firstChild),++c):r.classList.contains("e-overflow-hide")?t.push(r):e.tbResize?(i.insertBefore(r,i.childNodes[n+c]),++n):i.appendChild(r),s.setStyleAttribute(r,{display:"",height:o+"px"})}),t.forEach(function(e){i.appendChild(e)});for(var h=s.selectAll("."+u,r.querySelector("."+f)),p=h.length-1;p>=0;p--){var d=h[p];if(!d.classList.contains("e-separator"))break;s.setStyleAttribute(d,{display:"none"})}},t.prototype.createPopup=function(){var e,t,i=this.element;t=i.querySelector("."+u+":not(.e-separator ):not(."+v+" )"),e="auto"===i.style.height||""===i.style.height?null:t.offsetHeight;var o,r=[];o=i.querySelector("#"+i.id+"_popup.e-toolbar-pop")?i.querySelector("#"+i.id+"_popup.e-toolbar-pop"):s.createElement("div",{id:i.id+"_popup",className:"e-toolbar-pop"}),this.pushingPoppedEle(this,r,o,e),this.popupInit(i,o)},t.prototype.popupInit=function(e,t){if(this.popObj){var o=this.popObj.element;s.setStyleAttribute(o,{maxHeight:"",display:"block"}),s.setStyleAttribute(o,{maxHeight:o.offsetHeight+"px",display:""})}else{e.appendChild(t),s.setStyleAttribute(this.element,{overflow:""});var r=new c.Popup(null,{relateTo:this.element,offsetY:e.offsetHeight,enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose,position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});r.appendTo(t),i.EventHandler.add(document,"scroll",this.docEvent.bind(this)),i.EventHandler.add(document,"click ",this.docEvent.bind(this)),r.element.style.maxHeight=r.element.offsetHeight+"px",r.hide(),this.popObj=r,this.element.setAttribute("aria-haspopup","true")}},t.prototype.popupOpen=function(e){var t=this.popObj,i=this.popObj.element,r=this.popObj.element.parentElement,l=r.querySelector(".e-hor-nav");s.setStyleAttribute(t.element,{height:"auto",maxHeight:""}),t.element.style.maxHeight=t.element.clientHeight+"px";var a=i.offsetTop+i.offsetHeight+h.calculatePosition(r).top;if(!n.isNullOrUndefined(l)){var c=l.firstElementChild;l.classList.add("e-nav-active"),o.classList(c,["e-popup-up-icon"],["e-popup-down-icon"])}if(window.innerHeight+window.scrollY<a){var p=i.offsetHeight-(a-window.innerHeight-window.scrollY+5);t.height=p+"px",s.setStyleAttribute(t.element,{maxHeight:p+"px"})}},t.prototype.popupClose=function(e){var t=this.element.parentElement,i=t.querySelector(".e-hor-nav");if(i){var s=i.firstElementChild;i.classList.remove("e-nav-active"),o.classList(s,["e-popup-down-icon"],["e-popup-up-icon"])}},t.prototype.checkPriority=function(e,t,i,o){for(var r=t.length,l=i,n=0,a=0,c=0,h=r-1;h>=0;h--){var p=parseFloat(window.getComputedStyle(t[h]).marginRight);if(p+=parseFloat(window.getComputedStyle(t[h]).marginLeft),t[h]===this.tbarEle[0]&&(this.tbarEleMrgn=p),t[h].offsetLeft+t[h].offsetWidth+p>i){if(t[h].classList.contains("e-separator")){if(n>0&&a===c){var d=t[h+a+(n-1)];d.classList.contains("e-separator")&&s.setStyleAttribute(d,{display:"none"})}n++,a=0,c=0}else a++;t[h].classList.contains("e-overflow-show")&&o?i-=t[h].offsetWidth+p:t[h].classList.contains("e-separator")?i-=t[h].offsetWidth+p:(t[h].classList.add(v),s.setStyleAttribute(t[h],{display:"none",minWidth:t[h].offsetWidth+"px"}),c++)}}if(o){var f=s.selectAll("."+u+":not(."+v+")",this.element);this.checkPriority(e,f,l,!1)}},t.prototype.createPopupIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-hor-nav"),o=s.createElement("div",{id:t,className:i});"msie"!==a.Browser.info.name&&"edge"!==a.Browser.info.name||o.classList.add("e-ie-align");var r=s.createElement("div",{className:"e-popup-down-icon e-icons"});o.appendChild(r),o.setAttribute("tabindex","0"),e.insertBefore(o,e.firstChild)},t.prototype.tbarPriRef=function(e,t,i,r,l,a,c){var h=this.popObj.element,p=s.selectAll("."+v+":not(.e-overflow-show)",h).length;if(0===s.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var d=e.children[t-(t-i)-1];if(n.isNullOrUndefined(d)||!d.classList.contains("e-separator")||o.isVisible(d))e.insertBefore(r,e.children[t-(t-i)]);else{d.style.display="inherit";var f=d.offsetWidth+2*parseFloat(window.getComputedStyle(d).marginRight),u=d.previousElementSibling;a+f<c||l?(e.insertBefore(r,e.children[t-(t-i)]),n.isNullOrUndefined(u)||(u.style.display="")):u.classList.contains("e-separator")&&(u.style.display="none"),d.style.display=""}}else e.insertBefore(r,e.children[t-p])},t.prototype.popupRefresh=function(e,t){var i=this.element,s=i.querySelector(".e-hor-nav"),r=i.querySelector("."+f);if(!n.isNullOrUndefined(s)){r.removeAttribute("style"),e.style.display="block";var l=i.offsetWidth-(s.offsetWidth+r.offsetWidth);this.popupEleRefresh(l,e,t),e.style.display="",0===e.children.length&&(o.detach(s),this.popObj.destroy(),o.detach(this.popObj.element),this.popObj=null,i.setAttribute("aria-haspopup","false"),i.classList.remove("e-toolpop"))}},t.prototype.popupEleRefresh=function(e,t,i){for(var o,r,l=this.tbarEle,a=this.element.querySelector("."+f),c=this,h=0,p=[].slice.call(t.children);h<p.length;h++){var d=p[h];if("break"===function(t){t.style.position="absolute";var h=t.offsetWidth,p=t.querySelector(".e-tbar-btn-text");if(t.classList.contains("e-tbtn-align")||t.classList.contains("e-popup-text")){var d=t.children[0];!n.isNullOrUndefined(p)&&t.classList.contains("e-popup-text")?p.style.display="none":!n.isNullOrUndefined(p)&&t.classList.contains("e-toolbar-text")&&(p.style.display="block"),d.style.minWidth="0%",h=t.offsetWidth,d.style.minWidth="",n.isNullOrUndefined(p)||(p.style.display="")}if(t===c.tbarEle[0]&&(h+=c.tbarEleMrgn),t.style.position="",!(h<e||i))return"break";if(t.style.minWidth="",t.classList.contains("e-overflow-hide")||t.classList.remove(v),r=c.tbarEle.indexOf(t),c.tbarAlign){var u=c.items[r].align;r=c.tbarAlgEle[u+"s"].indexOf(t),l=c.tbarAlgEle[u+"s"],a=c.element.querySelector("."+f+" .e-toolbar-"+u)}var y=0;l.slice(0,r).forEach(function(t){(t.classList.contains("e-overflow-show")||t.classList.contains("e-separator"))&&(t.classList.contains("e-separator")&&(t.style.display="",e-=t.offsetWidth),y++)}),t.classList.contains("e-overflow-show")?(c.tbarPriRef(a,r,y,t,i,h,e),e-=t.offsetWidth):0===r?(a.insertBefore(t,a.firstChild),e-=t.offsetWidth):(o=s.selectAll(".e-overflow-show",c.popObj.element).length,a.insertBefore(t,a.children[r-o]),e-=t.offsetWidth),t.style.height=""}(d))break}},t.prototype.removePositioning=function(){var e=this.element.querySelector("."+f);if(!n.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){this.remove(e,"e-tbar-pos");var t=[].slice.call(e.childNodes);t[1].removeAttribute("style"),t[2].removeAttribute("style")}},t.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+f);this.add(e,"e-tbar-pos"),this.itemPositioning()},t.prototype.itemPositioning=function(){var e=this.element.querySelector("."+f);if(!n.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){var t,i=this.element.querySelector(".e-hor-nav");t=this.scrollModule?[].slice.call(e.querySelector(".e-hscroll-content").children):[].slice.call(e.childNodes);var o=t[0].offsetWidth+t[2].offsetWidth,s=this.element.offsetWidth;if(i&&(s-=i.offsetWidth,t[2].style.right=i.offsetWidth+"px"),!(s<=o)){var r=(s-o-t[1].offsetWidth)/2;t[1].removeAttribute("style");var l=t[0].offsetWidth+r+"px";this.enableRtl?t[1].style.marginRight=l:t[1].style.marginLeft=l}}},t.prototype.tbarItemAlign=function(e,t,i){var o=this,r=[];if(r.push(s.createElement("div",{className:"e-toolbar-left"})),r.push(s.createElement("div",{className:"e-toolbar-center"})),r.push(s.createElement("div",{className:"e-toolbar-right"})),0===i&&"left"!==e.align)r.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,"e-tbar-pos");else if("left"!==e.align){var l=t.childNodes,n=r[0];[].slice.call(l).forEach(function(e){o.tbarAlgEle.lefts.push(e),n.appendChild(e)}),t.appendChild(n),t.appendChild(r[1]),t.appendChild(r[2]),this.tbarAlign=!0,this.add(t,"e-tbar-pos")}},t.prototype.ctrlTemplate=function(){var e=this;this.add(this.trgtEle,f),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,u))})},t.prototype.renderItems=function(){var e,t,i,o=this.element,r=this.items;if(o&&o.children.length>0&&(e=o.querySelector("."+f)),null!=this.trgtEle)this.ctrlTemplate();else if(o&&r.length>0){e||(e=s.createElement("div",{className:f}));for(var l=0;l<r.length;l++)t=this.renderSubComponent(r[l]),-1===this.tbarEle.indexOf(t)&&this.tbarEle.push(t),this.tbarAlign||this.tbarItemAlign(r[l],e,l),i=e.querySelector(".e-toolbar-"+r[l].align.toLowerCase()),i?(this.tbarAlgEle[r[l].align+"s"].push(t),i.appendChild(t)):e.appendChild(t);o.appendChild(e)}},t.prototype.setAttr=function(e,t){for(var i,o=Object.keys(e),s=0;s<o.length;s++)i=o[s],"class"===i?this.add(t,e[i]):t.setAttribute(i,e[i])},t.prototype.enableItems=function(e,t){var i=e,s=i.length;n.isNullOrUndefined(t)&&(t=!0);var r=function(e,t){e?(t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false")):(t.classList.add("e-overlay"),t.setAttribute("aria-disabled","true"))};if(s&&s>1){for(var l=0,a=[].slice.call(i);l<a.length;l++){var c=a[l];r(t,c)}t?o.removeClass(i,"e-overlay"):o.addClass(i,"e-overlay")}else{var c=void 0;c=s&&1===s?i[0]:e,r(t,c)}},t.prototype.addItems=function(e,t){var i,r,l=this.element.querySelector("."+f),a="left";n.isNullOrUndefined(t)&&(t=0),e.forEach(function(e){n.isNullOrUndefined(e.align)||"left"===e.align||"left"!==a||(a=e.align)});for(var c=0,h=e;c<h.length;c++){var p=h[c];if(n.isNullOrUndefined(p.type)&&(p.type="Button"),i=s.selectAll("."+u,this.element),p.align=a,r=this.renderSubComponent(p),this.tbarEle.length>=t&&i.length>0){if(this.destroyMode(),this.tbarAlign){var d="l"===p.align[0]?0:"c"===p.align[0]?1:2,v=void 0;v=this.scrollModule?o.closest(i[0],"."+f+" .e-hscroll-content").children[d]:o.closest(i[0],"."+f).children[d],v.insertBefore(r,v.children[t]),this.tbarAlgEle[p.align+"s"].splice(t,0,r),this.refreshPositioning()}else i[0].parentNode.insertBefore(r,i[t]);this.items.splice(t,0,p),this.tbarEle.splice(t,0,r),t++,this.offsetWid=l.offsetWidth}}l.style.width="",this.renderOverflowMode()},t.prototype.removeItems=function(e){var t,i=e,o=[].slice.call(s.selectAll("."+u,this.element));if("number"==typeof i)t=parseInt(e.toString(),10),this.removeItemByIndex(t,o);else if(i&&i.length>1)for(var r=0,l=[].slice.call(i);r<l.length;r++){var n=l[r];t=this.tbarEle.indexOf(n),this.removeItemByIndex(t,o),o=s.selectAll("."+u,this.element)}else{var n=i&&i.length&&1===i.length?i[0]:e;t=o.indexOf(n),this.removeItemByIndex(t,o)}this.resize()},t.prototype.removeItemByIndex=function(e,t){if(this.tbarEle[e]&&t[e]){var i=this.tbarEle.indexOf(t[e]);if(this.tbarAlign){var s=this.tbarAlgEle[this.items[i].align+"s"].indexOf(this.tbarEle[i]);this.tbarAlgEle[this.items[i].align+"s"].splice(s,1)}o.detach(t[e]),this.items.splice(i,1),this.tbarEle.splice(i,1)}},t.prototype.templateRender=function(e,t,i){var o=i.type;if("string"==typeof e){t.innerHTML=e;var r=t.childNodes[0];if(!r.tagName&&0===t.childElementCount){var l=document.querySelector(e);t.innerHTML="",t.appendChild(l)}}else if("Input"===o){var a=e,r=s.createElement("input");i.id?r.id=i.id:r.id=n.getUniqueID("tbr-ipt"),t.appendChild(r),a.appendTo(r)}this.add(t,"e-template"),this.tbarEle.push(t)},t.prototype.buttonRendering=function(e,t){var i,o,r=s.createElement("button",{className:"e-tbar-btn"}),l=e.text;e.id?r.id=e.id:r.id=n.getUniqueID("e-tbr-btn");var a=s.createElement("div",{className:"e-tbar-btn-text"});return l?(a.innerHTML=l,r.appendChild(a),r.classList.add("e-tbtn-txt")):this.add(t,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(i=e.prefixIcon+" e-icons",o="left"):(i=e.suffixIcon+" e-icons",o="right")),new p.Button({iconCss:i,iconPosition:o},r),e.width&&s.setStyleAttribute(r,{width:n.formatUnit(e.width)}),r},t.prototype.renderSubComponent=function(e){var t,i;if(t=s.createElement("div",{className:u}),t.setAttribute("aria-disabled","false"),this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,t),e.tooltipText&&t.setAttribute("title",e.tooltipText),e.cssClass&&(t.className=t.className+" "+e.cssClass),e.template)this.templateRender(e.template,t,e);else switch(e.type){case"Button":i=this.buttonRendering(e,t),i.setAttribute("tabindex","-1"),t.appendChild(i),t.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(t,"e-separator")}if(e.showTextOn){var o=e.showTextOn;"Toolbar"===o?(this.add(t,"e-toolbar-text"),this.add(t,"e-tbtn-align")):"Overflow"===o&&this.add(t,"e-popup-text")}if(e.overflow){var r=e.overflow;"Show"===r?this.add(t,"e-overflow-show"):"Hide"===r&&(t.classList.contains("e-separator")||this.add(t,"e-overflow-hide"))}return t},t.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},t.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},t.prototype.activeEleRemove=function(e){n.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,n.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.getModuleName=function(){return"toolbar"},t.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.hide();var t=this.checkOverflow(e,e.getElementsByClassName(f)[0]);!t&&this.scrollModule&&this.destroyHScroll(),t&&this.scrollModule&&this.offsetWid===e.offsetWidth||((this.offsetWid>e.offsetWidth||t)&&this.renderOverflowMode(),this.popObj&&(this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()),this.offsetWid=e.offsetWidth,this.tbResize=!1)},t.prototype.onPropertyChanged=function(e,t){for(var i=this.element,o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"items":this.destroyMode(),this.destroyItems(),this.renderItems(),this.renderOverflowMode();break;case"width":var l=i.offsetWidth;s.setStyleAttribute(i,{width:n.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&l<i.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":s.setStyleAttribute(this.element,{height:n.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(i,"e-rtl");break;case"enableRtl":e.enableRtl?this.add(i,"e-rtl"):this.remove(i,"e-rtl"),n.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,"e-rtl"):this.remove(this.scrollModule.element,"e-rtl")),n.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,"e-rtl"):this.remove(this.popObj.element,"e-rtl"))}}},t}(i.Component);l([n.Collection([],y)],m.prototype,"items",void 0),l([i.Property("auto")],m.prototype,"width",void 0),l([i.Property("auto")],m.prototype,"height",void 0),l([i.Property("Scrollable")],m.prototype,"overflowMode",void 0),l([i.Property(!1)],m.prototype,"enableRtl",void 0),l([i.Event()],m.prototype,"clicked",void 0),l([i.Event()],m.prototype,"created",void 0),l([i.Event()],m.prototype,"destroyed",void 0),l([i.Event()],m.prototype,"beforeCreate",void 0),m=l([a.NotifyPropertyChanges],m),t.Toolbar=m,t.toolbarBuilder=a.CreateBuilder(m)}.apply(t,o))&&(e.exports=s)},function(e,i){e.exports=t},function(e,t){e.exports=i}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-buttons"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-popups","@syncfusion/ej2-buttons"],t);else{var i="object"==typeof exports?t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-buttons")):t(e["@syncfusion/ej2-base"],e["@syncfusion/ej2-popups"],e["@syncfusion/ej2-buttons"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(this,function(e,t,i){return function(e){function t(o){if(i[o])return i[o].exports;var s=i[o]={exports:{},id:o,loaded:!1};return e[o].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var o,s;o=[i,t,i(1),i(4)],void 0!==(s=function(e,t,i,o){"use strict";function s(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),s(i),s(o)}.apply(t,o))&&(e.exports=s)},function(e,t,i){var o,s;o=[i,t,i(2)],void 0!==(s=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,o))&&(e.exports=s)},function(e,t,i){var o,s,r=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),l=this&&this.__decorate||function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l};o=[i,t,i(3),i(3)],void 0!==(s=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,i){return e.call(this,t,i)||this}return r(t,e),t.prototype.preRender=function(){this.browser=o.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=o.Browser.isDevice;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=i.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},t.prototype.render=function(){this.touchModule=new i.Touch(this.element,{scroll:this.touchHandler.bind(this)}),this.element.addEventListener("contextmenu",function(e){e.preventDefault()}),this.isDevice?this.element.classList.add("e-scroll-device"):(this.createNavIcon(this.element),i.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this))},t.prototype.initialize=function(){var e=o.createElement("div",{className:"e-hscroll-content"}),t=o.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=[].slice.call(i.children),r=0,l=s;r<l.length;r++){var n=l[r];e.appendChild(n)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},t.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},t.prototype.getModuleName=function(){return"hScroll"},t.prototype.destroy=function(){var t=this.element;t.style.display="",t.classList.remove("e-hscroll");for(var s=i.selectAll("#"+t.id+"_nav.e-"+t.id+"_nav"),r=0,l=[].slice.call(this.scrollItems.children);r<l.length;r++){var n=l[r];t.appendChild(n)}this.uniqueId&&this.element.removeAttribute("id"),o.detach(this.scrollEle),s.length>0&&(o.detach(s[0]),o.detach(s[1])),i.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},t.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),s=o.createElement("div",{id:t,className:i});s.setAttribute("aria-disabled","false");var r=o.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"}),l="e-"+e.id.concat("_nav e-scroll-nav e-scroll-left-nav"),n=o.createElement("div",{id:t,className:l+" e-overlay"});n.setAttribute("aria-disabled","true");var a=o.createElement("div",{className:"e-nav-left-arrow e-nav-arrow e-icons"});n.appendChild(a),s.appendChild(r),s.setAttribute("tabindex","0"),e.appendChild(s),e.insertBefore(n,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),n.classList.add("e-ie-align")),this.eventBinding([s,n])},t.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target)};this.keyTimer=window.setTimeout(function(){i()},100)}},t.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},t.prototype.eventBinding=function(e){var t=this;e.forEach(function(e){new i.Touch(e,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),e.addEventListener("keydown",t.onKeyPress.bind(t)),e.addEventListener("keyup",t.onKeyUp.bind(t)),e.addEventListener("mouseup",t.repeatScroll.bind(t)),e.addEventListener("touchend",t.repeatScroll.bind(t)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),i.EventHandler.add(e,"click",t.clickEventHandler,t)})},t.prototype.repeatScroll=function(){clearInterval(this.timeout)},t.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var o=function(){t.eleScrolling(10,i)};this.timeout=window.setInterval(function(){o()},50)},t.prototype.contains=function(e,t){return e.classList.contains(t)},t.prototype.eleScrolling=function(e,t){var i=this.scrollEle,o=this.element,s=t.classList;s.contains("e-scroll-nav")&&(s=t.querySelector(".e-nav-arrow").classList),this.contains(o,"e-rtl")&&this.browserCheck&&(e=-e);var r=i.scrollLeft;!this.contains(o,"e-rtl")||this.browserCheck||this.ieCheck?s.contains("e-nav-right-arrow")?i.scrollLeft=r+e:i.scrollLeft=r-e:s.contains("e-nav-left-arrow")?i.scrollLeft=r+e:i.scrollLeft=r-e},t.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target)},t.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceX,this.ieCheck&&this.contains(this.element,"e-rtl")&&(t=-t),"Left"===e.scrollDirection?i.scrollLeft=i.scrollLeft+t:"Right"===e.scrollDirection&&(i.scrollLeft=i.scrollLeft-t)},t.prototype.arrowDisabling=function(e,t){e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),clearInterval(this.timeout),t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0"),this.repeatScroll()},t.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,o=this.element,s=this.element.querySelector(".e-scroll-left-nav"),r=this.element.querySelector(".e-scroll-right-nav"),l=t.scrollLeft;if(l<=0&&(l=-l),0===l)!this.contains(o,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(s,r):this.arrowDisabling(r,s);else if(Math.ceil(i+l+.1)>=t.scrollWidth)!this.contains(o,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(r,s):this.arrowDisabling(s,r);else{var n=this.element.querySelector(".e-overlay");n&&(n.classList.remove("e-overlay"),n.setAttribute("aria-disabled","false"),n.setAttribute("tabindex","0"))}},t.prototype.onPropertyChanged=function(e,t){for(var i=0,o=Object.keys(e);i<o.length;i++){switch(o[i]){case"scrollStep":break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}}},t}(i.Component);l([o.Property(40)],s.prototype,"scrollStep",void 0),s=l([o.NotifyPropertyChanges],s),t.HScroll=s}.apply(t,o))&&(e.exports=s)},function(t,i){t.exports=e},function(e,t,i){var o,s;o=[i,t,i(5)],void 0!==(s=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,o))&&(e.exports=s)},function(e,t,i){var o,s,r=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),l=this&&this.__decorate||function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l};o=[i,t,i(3),i(3),i(3),i(3),i(3),i(6),i(6),i(7),i(2)],void 0!==(s=function(e,t,i,o,s,n,a,c,h,p,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f="e-toolbar-items",u="e-toolbar-item",v="e-toolbar-popup",y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(a.ChildProperty);l([i.Property("")],y.prototype,"id",void 0),l([i.Property("")],y.prototype,"text",void 0),l([i.Property("auto")],y.prototype,"width",void 0),l([i.Property("")],y.prototype,"cssClass",void 0),l([i.Property("")],y.prototype,"prefixIcon",void 0),l([i.Property("")],y.prototype,"suffixIcon",void 0),l([i.Property("None")],y.prototype,"overflow",void 0),l([i.Property("")],y.prototype,"template",void 0),l([i.Property("Button")],y.prototype,"type",void 0),l([i.Property("Both")],y.prototype,"showTextOn",void 0),l([i.Property(null)],y.prototype,"htmlAttributes",void 0),l([i.Property("")],y.prototype,"tooltipText",void 0),l([i.Property("left")],y.prototype,"align",void 0),t.Item=y;var m=function(e){function t(t,i){var o=e.call(this,t,i)||this;return o.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},o}return r(t,e),t.prototype.destroy=function(){var t=this,i=this.element;for(e.prototype.destroy.call(this),this.unwireEvents();i.firstChild;)i.removeChild(i.firstChild);this.trgtEle&&i.appendChild(this.ctrlTem),this.clearProperty(),this.popObj=null,this.remove(this.element,"e-toolpop"),i.removeAttribute("style"),["aria-disabled","aria-orientation","aria-haspopup","role"].forEach(function(e){t.element.removeAttribute(e)})},t.prototype.preRender=function(){this.trigger("beforeCreate"),this.scrollModule=null,this.popObj=null,this.enableRtl&&this.add(this.element,"e-rtl")},t.prototype.wireEvents=function(){i.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resize.bind(this)),this.keyModule=new o.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),i.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.element.setAttribute("tabIndex","0")},t.prototype.docKeyDown=function(e){40!==e.keyCode&&38!==e.keyCode||n.isNullOrUndefined(this.popObj)||!o.isVisible(this.popObj.element)||e.preventDefault()},t.prototype.unwireEvents=function(){i.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyHScroll(),this.keyModule.destroy(),this.popObj&&(i.EventHandler.remove(document,"scroll",this.docEvent),i.EventHandler.remove(this.element,"keydown",this.docKeyDown),i.EventHandler.remove(document,"click",this.docEvent))},t.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},t.prototype.docEvent=function(e){var t=o.closest(e.target,".e-popup");this.popObj&&o.isVisible(this.popObj.element)&&!t&&this.popObj.hide({name:"SlideUp",duration:100})},t.prototype.destroyHScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,"e-tbar-pos"),this.scrollModule.destroy(),this.scrollModule=null)},t.prototype.destroyItems=function(){[].slice.call(this.element.querySelectorAll("."+u)).forEach(function(e){o.detach(e)}),this.clearProperty()},t.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,"e-rtl"),this.destroyHScroll()),this.popObj&&this.popupRefresh(this.popObj.element,!0)},t.prototype.add=function(e,t){e.classList.add(t)},t.prototype.remove=function(e,t){e.classList.remove(t)},t.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},t.prototype.clstElement=function(e,t){return e&&this.popObj&&o.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+u):this.element===t||e?this.element.querySelector("."+u):o.closest(t,"."+u)},t.prototype.keyHandling=function(e,t,i,s,r){var l=this.popObj,n=this.element,a={name:"SlideUp",duration:100};switch(t.action){case"moveRight":n===i?this.elementFocus(e):s||this.eleFocus(e,"next");break;case"moveLeft":s||this.eleFocus(e,"previous");break;case"home":case"end":var c=void 0,h=void 0;if(e){var p=o.closest(e,".e-popup");p?o.isVisible(this.popObj.element)&&(h=p.children,c="home"===t.action?h[0]:h[h.length-1]):(h=this.element.querySelectorAll("."+f+" ."+u),c="home"===t.action?h[0]:h[h.length-1]),c&&this.elementFocus(c)}break;case"moveUp":case"moveDown":var d="moveUp"===t.action?"previous":"next";if(l&&o.closest(i,".e-popup")){var v=l.element,y=v.firstElementChild;if("previous"===d&&y===e||"next"===d&&v.lastElementChild===e)return;this.eleFocus(e,d)}else"moveDown"===t.action&&this.elementFocus(e);break;case"tab":if(!r&&!s){var m=e.firstElementChild;n===i&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":l&&l.hide(a);break;case"popupOpen":if(!s)return;l&&!o.isVisible(l.element)?(l.element.style.top=n.offsetHeight+"px",l.show({name:"SlideDown",duration:100})):l.hide(a)}},t.prototype.keyActionHandler=function(e){e.preventDefault();var t,i=e.target,o=i.classList.contains("e-hor-nav"),s=i.classList.contains("e-scroll-nav");((t=this.clstElement(o,i))||s)&&this.keyHandling(t,e,i,o,s)},t.prototype.eleFocus=function(e,t){var i=Object(e)[t+"ElementSibling"],o=function(e){return e.classList.contains("e-separator")||e.classList.contains("e-overlay")};if(i){var s=o(i);if(s&&Object(i)[t+"Sibling"]&&(i=Object(i)[t+"Sibling"],s=o(i)))return void this.eleFocus(i,t);this.elementFocus(i)}else if(this.tbarAlign){var r=Object(e.parentElement)[t+"ElementSibling"];if(!n.isNullOrUndefined(r)&&r.children.length>0)if("next"===t){var l=r.querySelector("."+u);o(l)?this.eleFocus(l,t):(l.firstElementChild.focus(),this.activeEleSwitch(l))}else{var l=r.lastElementChild;o(l)?this.eleFocus(l,t):this.elementFocus(l)}}},t.prototype.clickHandler=function(e){var t=e.target,i=t.classList,s=this.element,r=o.closest(t,".e-hor-nav");r||(r=t),!s.children[0].classList.contains("e-hscroll")&&i.contains("e-hor-nav")&&(i=t.querySelector(".e-icons").classList),(i.contains("e-popup-up-icon")||i.contains("e-popup-down-icon"))&&this.popupClickHandler(s,r,"e-rtl");var l,a=o.closest(e.target,"."+u);if(!n.isNullOrUndefined(a)&&!a.classList.contains("e-overlay")||r.classList.contains("e-hor-nav")){a&&(l=this.items[this.tbarEle.indexOf(a)]);var c={originalEvent:e,item:l};this.trigger("clicked",c)}},t.prototype.popupClickHandler=function(e,t,i){var s=this.popObj;o.isVisible(s.element)?(t.classList.remove("e-nav-active"),s.hide({name:"SlideUp",duration:100})):(e.classList.contains(i)&&(s.enableRtl=!0,s.position={X:"left",Y:"top"}),0!==s.offsetX||e.classList.contains(i)||(s.enableRtl=!1,s.position={X:"right",Y:"top"}),s.dataBind(),s.element.style.top=this.element.offsetHeight+"px",t.classList.add("e-nav-active"),s.show({name:"SlideDown",duration:100}))},t.prototype.render=function(){this.initialize(),this.renderControl(),this.wireEvents()},t.prototype.initialize=function(){var e=n.formatUnit(this.width),t=n.formatUnit(this.height);"msie"===a.Browser.info.name&&"auto"===this.height||s.setStyleAttribute(this.element,{height:t}),s.setStyleAttribute(this.element,{width:e});var i={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":"horizontal"};o.attributes(this.element,i)},t.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?this.element.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning()},t.prototype.initHScroll=function(e,t){!this.scrollModule&&this.checkOverflow(e,t[0])&&(this.tbarAlign&&this.element.querySelector("."+f+" .e-toolbar-center").removeAttribute("style"),this.scrollModule=new d.HScroll({scrollStep:50,enableRtl:this.enableRtl},t[0]),this.remove(this.scrollModule.element,"e-tbar-pos"),s.setStyleAttribute(this.element,{overflow:"hidden"}))},t.prototype.itemWidthCal=function(e){var t=0;return[].slice.call(s.selectAll("."+u),e).forEach(function(e){t+=e.offsetWidth}),t},t.prototype.checkOverflow=function(e,t){if(n.isNullOrUndefined(e)||n.isNullOrUndefined(t))return!1;var i,o=e.offsetWidth;i=this.tbarAlign||this.scrollModule?this.itemWidthCal(this.scrollModule?t.querySelector(".e-hscroll-content"):t):t.offsetWidth;var s=e.querySelector(".e-hor-nav"),r=e.querySelector(".e-scroll-nav");return i>o-(s?s.offsetWidth:r?2*r.offsetWidth:0)},t.prototype.refreshOverflow=function(){this.resize()},t.prototype.renderOverflowMode=function(){var e=this.element,t=e.querySelector("."+f);if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.overflowMode){case"Scrollable":this.destroyHScroll(),this.initHScroll(e,e.getElementsByClassName(f));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),this.checkOverflow(e,t)&&(this.createPopupEle(e,[].slice.call(s.selectAll("."+f+" ."+u,e))),this.element.querySelector(".e-hor-nav").setAttribute("tabIndex","0")),this.tbarAlign&&(this.add(t,"e-tbar-pos"),this.itemPositioning())}},t.prototype.createPopupEle=function(e,t){var i=e.querySelector(".e-hor-nav");i||this.createPopupIcon(e),i=e.querySelector(".e-hor-nav");var o=e.offsetWidth-i.offsetWidth;this.element.classList.remove("e-rtl"),this.checkPriority(e,t,o,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.createPopup()},t.prototype.pushingPoppedEle=function(e,t,i,o){var r=e.element,l=s.selectAll(".e-overflow-show",i),n=0,a=[].slice.call(s.selectAll("."+v,r.querySelector("."+f))),c=0;a.forEach(function(r,a){l=s.selectAll(".e-overflow-show",i),r.classList.contains("e-overflow-show")&&l.length>0?e.tbResize&&l.length>a?(i.insertBefore(r,l[a]),++c):(i.insertBefore(r,i.children[l.length]),++c):r.classList.contains("e-overflow-show")?(i.insertBefore(r,i.firstChild),++c):e.tbResize&&r.classList.contains("e-overflow-hide")&&i.children.length>0&&0===l.length?(i.insertBefore(r,i.firstChild),++c):r.classList.contains("e-overflow-hide")?t.push(r):e.tbResize?(i.insertBefore(r,i.childNodes[n+c]),++n):i.appendChild(r),s.setStyleAttribute(r,{display:"",height:o+"px"})}),t.forEach(function(e){i.appendChild(e)});for(var h=s.selectAll("."+u,r.querySelector("."+f)),p=h.length-1;p>=0;p--){var d=h[p];if(!d.classList.contains("e-separator"))break;s.setStyleAttribute(d,{display:"none"})}},t.prototype.createPopup=function(){var e,t,i=this.element;t=i.querySelector("."+u+":not(.e-separator ):not(."+v+" )"),e="auto"===i.style.height||""===i.style.height?null:t.offsetHeight;var o,r=[];o=i.querySelector("#"+i.id+"_popup.e-toolbar-pop")?i.querySelector("#"+i.id+"_popup.e-toolbar-pop"):s.createElement("div",{id:i.id+"_popup",className:"e-toolbar-pop"}),this.pushingPoppedEle(this,r,o,e),this.popupInit(i,o)},t.prototype.popupInit=function(e,t){if(this.popObj){var o=this.popObj.element;s.setStyleAttribute(o,{maxHeight:"",display:"block"}),s.setStyleAttribute(o,{maxHeight:o.offsetHeight+"px",display:""})}else{e.appendChild(t),s.setStyleAttribute(this.element,{overflow:""});var r=new c.Popup(null,{relateTo:this.element,offsetY:e.offsetHeight,enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose,position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});r.appendTo(t),i.EventHandler.add(document,"scroll",this.docEvent.bind(this)),i.EventHandler.add(document,"click ",this.docEvent.bind(this)),r.element.style.maxHeight=r.element.offsetHeight+"px",r.hide(),this.popObj=r,this.element.setAttribute("aria-haspopup","true")}},t.prototype.popupOpen=function(e){var t=this.popObj,i=this.popObj.element,r=this.popObj.element.parentElement,l=r.querySelector(".e-hor-nav");s.setStyleAttribute(t.element,{height:"auto",maxHeight:""}),t.element.style.maxHeight=t.element.clientHeight+"px";var a=i.offsetTop+i.offsetHeight+h.calculatePosition(r).top,c=l.firstElementChild;l.classList.add("e-nav-active"),o.classList(c,["e-popup-up-icon"],["e-popup-down-icon"]);var p=n.isNullOrUndefined(window.scrollY)?0:window.scrollY;if(window.innerHeight+p<a){var d=i.offsetHeight-(a-window.innerHeight-p+5);t.height=d+"px",s.setStyleAttribute(t.element,{maxHeight:d+"px"})}},t.prototype.popupClose=function(e){var t=this.element.parentElement,i=t.querySelector(".e-hor-nav"),s=i.firstElementChild;i.classList.remove("e-nav-active"),o.classList(s,["e-popup-down-icon"],["e-popup-up-icon"])},t.prototype.checkPriority=function(e,t,i,o){for(var r=t.length,l=i,n=0,a=0,c=0,h=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},p=r-1;p>=0;p--){var d=parseFloat(window.getComputedStyle(t[p]).marginRight);if(d+=parseFloat(window.getComputedStyle(t[p]).marginLeft),t[p]===this.tbarEle[0]&&(this.tbarEleMrgn=d),t[p].offsetLeft+t[p].offsetWidth+d>i){if(t[p].classList.contains("e-separator")){if(n>0&&a===c){var f=t[p+a+(n-1)];h(f,["e-separator","e-ignore"])&&s.setStyleAttribute(f,{display:"none"})}n++,a=0,c=0}else a++;t[p].classList.contains("e-overflow-show")&&o?i-=t[p].offsetWidth+d:h(t[p],["e-separator","e-ignore"])?i-=t[p].offsetWidth+d:(t[p].classList.add(v),s.setStyleAttribute(t[p],{display:"none",minWidth:t[p].offsetWidth+"px"}),c++)}}if(o){var y=s.selectAll("."+u+":not(."+v+")",this.element);this.checkPriority(e,y,l,!1)}},t.prototype.createPopupIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-hor-nav"),o=s.createElement("div",{id:t,className:i});"msie"!==a.Browser.info.name&&"edge"!==a.Browser.info.name||o.classList.add("e-ie-align");var r=s.createElement("div",{className:"e-popup-down-icon e-icons"});o.appendChild(r),o.setAttribute("tabindex","0"),e.appendChild(o)},t.prototype.tbarPriRef=function(e,t,i,r,l,a,c,h){var p=h,d=this.popObj.element,f=s.selectAll("."+v+":not(.e-overflow-show)",d).length,u=function(e,t){return e.classList.contains(t)};if(0===s.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var y=e.children[t-(t-i)-1],m=!n.isNullOrUndefined(y)&&u(y,"e-ignore");if(!n.isNullOrUndefined(y)&&u(y,"e-separator")&&!o.isVisible(y)||m){y.style.display="inherit";var b=y.offsetWidth+2*parseFloat(window.getComputedStyle(y).marginRight),g=y.previousElementSibling;a+b<c||l?(e.insertBefore(r,e.children[t+p-(t-i)]),n.isNullOrUndefined(g)||(g.style.display="")):g.classList.contains("e-separator")&&(g.style.display="none"),y.style.display=""}else e.insertBefore(r,e.children[t+p-(t-i)])}else e.insertBefore(r,e.children[t+p-f])},t.prototype.popupRefresh=function(e,t){var i=this.element,s=i.querySelector(".e-hor-nav"),r=i.querySelector("."+f);if(!n.isNullOrUndefined(s)){r.removeAttribute("style"),e.style.display="block";var l=i.offsetWidth-(s.offsetWidth+r.offsetWidth);this.popupEleRefresh(l,e,t),e.style.display="",0===e.children.length&&(o.detach(s),this.popObj.destroy(),o.detach(this.popObj.element),this.popObj=null,i.setAttribute("aria-haspopup","false"),i.classList.remove("e-toolpop"))}},t.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll(".e-ignore")),o=[],s=0;return i.length>0?(i.forEach(function(e){o.push([].slice.call(t.children).indexOf(e))}),o.forEach(function(t){t<=e&&s++}),s):0},t.prototype.popupEleRefresh=function(e,t,i){for(var o,r,l=this.tbarEle,a=this.element.querySelector("."+f),c=0,h=this,p=0,d=[].slice.call(t.children);p<d.length;p++){var u=d[p];if("break"===function(t){t.style.position="absolute";var p=t.offsetWidth,d=t.querySelector(".e-tbar-btn-text");if(t.classList.contains("e-tbtn-align")||t.classList.contains("e-popup-text")){var u=t.children[0];!n.isNullOrUndefined(d)&&t.classList.contains("e-popup-text")?d.style.display="none":!n.isNullOrUndefined(d)&&t.classList.contains("e-toolbar-text")&&(d.style.display="block"),u.style.minWidth="0%",p=t.offsetWidth,u.style.minWidth="",n.isNullOrUndefined(d)||(d.style.display="")}if(t===h.tbarEle[0]&&(p+=h.tbarEleMrgn),t.style.position="",!(p<e||i))return"break";if(t.style.minWidth="",t.classList.contains("e-overflow-hide")||t.classList.remove(v),r=h.tbarEle.indexOf(t),h.tbarAlign){var y=h.items[r].align;r=h.tbarAlgEle[y+"s"].indexOf(t),l=h.tbarAlgEle[y+"s"],a=h.element.querySelector("."+f+" .e-toolbar-"+y)}var m=0;l.slice(0,r).forEach(function(t){(t.classList.contains("e-overflow-show")||t.classList.contains("e-separator"))&&(t.classList.contains("e-separator")&&(t.style.display="",e-=t.offsetWidth),m++)}),c=h.ignoreEleFetch(r,a),t.classList.contains("e-overflow-show")?(h.tbarPriRef(a,r,m,t,i,p,e,c),e-=t.offsetWidth):0===r?(a.insertBefore(t,a.firstChild),e-=t.offsetWidth):(o=s.selectAll(".e-overflow-show",h.popObj.element).length,a.insertBefore(t,a.children[r+c-o]),e-=t.offsetWidth),t.style.height=""}(u))break}},t.prototype.removePositioning=function(){var e=this.element.querySelector("."+f);if(!n.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){this.remove(e,"e-tbar-pos");var t=[].slice.call(e.childNodes);t[1].removeAttribute("style"),t[2].removeAttribute("style")}},t.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+f);this.add(e,"e-tbar-pos"),this.itemPositioning()},t.prototype.itemPositioning=function(){var e=this.element.querySelector("."+f);if(!n.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){var t,i=this.element.querySelector(".e-hor-nav");t=this.scrollModule?[].slice.call(e.querySelector(".e-hscroll-content").children):[].slice.call(e.childNodes);var o=t[0].offsetWidth+t[2].offsetWidth,s=this.element.offsetWidth;if(i&&(s-=i.offsetWidth,t[2].style.right=i.offsetWidth+"px"),!(s<=o)){var r=(s-o-t[1].offsetWidth)/2;t[1].removeAttribute("style");var l=t[0].offsetWidth+r+"px";this.enableRtl?t[1].style.marginRight=l:t[1].style.marginLeft=l}}},t.prototype.tbarItemAlign=function(e,t,i){var o=this,r=[];if(r.push(s.createElement("div",{className:"e-toolbar-left"})),r.push(s.createElement("div",{className:"e-toolbar-center"})),r.push(s.createElement("div",{className:"e-toolbar-right"})),0===i&&"left"!==e.align)r.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,"e-tbar-pos");else if("left"!==e.align){var l=t.childNodes,n=r[0];[].slice.call(l).forEach(function(e){o.tbarAlgEle.lefts.push(e),n.appendChild(e)}),t.appendChild(n),t.appendChild(r[1]),t.appendChild(r[2]),this.tbarAlign=!0,this.add(t,"e-tbar-pos")}},t.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,f),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,u))})},t.prototype.renderItems=function(){var e,t,i,o=this.element,r=this.items;if(o&&o.children.length>0&&(e=o.querySelector("."+f)),null!=this.trgtEle)this.ctrlTemplate();else if(o&&r.length>0){e||(e=s.createElement("div",{className:f}));for(var l=0;l<r.length;l++)t=this.renderSubComponent(r[l]),-1===this.tbarEle.indexOf(t)&&this.tbarEle.push(t),this.tbarAlign||this.tbarItemAlign(r[l],e,l),i=e.querySelector(".e-toolbar-"+r[l].align.toLowerCase()),i?(this.tbarAlgEle[r[l].align+"s"].push(t),i.appendChild(t)):e.appendChild(t);o.appendChild(e)}},t.prototype.setAttr=function(e,t){for(var i,o=Object.keys(e),s=0;s<o.length;s++)i=o[s],"class"===i?this.add(t,e[i]):t.setAttribute(i,e[i])},t.prototype.enableItems=function(e,t){var i=e,s=i.length;n.isNullOrUndefined(t)&&(t=!0);var r=function(e,t){e?(t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false")):(t.classList.add("e-overlay"),t.setAttribute("aria-disabled","true"))};if(s&&s>1){for(var l=0,a=[].slice.call(i);l<a.length;l++){var c=a[l];r(t,c)}t?o.removeClass(i,"e-overlay"):o.addClass(i,"e-overlay")}else{var c=void 0;c=s&&1===s?i[0]:e,r(t,c)}},t.prototype.addItems=function(e,t){var i,r,l=this.element.querySelector("."+f),a="left";n.isNullOrUndefined(t)&&(t=0),e.forEach(function(e){n.isNullOrUndefined(e.align)||"left"===e.align||"left"!==a||(a=e.align)});for(var c=0,h=e;c<h.length;c++){var p=h[c];if(n.isNullOrUndefined(p.type)&&(p.type="Button"),i=s.selectAll("."+u,this.element),p.align=a,r=this.renderSubComponent(p),this.tbarEle.length>=t&&i.length>0){if(this.destroyMode(),this.tbarAlign){var d="l"===p.align[0]?0:"c"===p.align[0]?1:2,v=void 0;v=o.closest(i[0],"."+f).children[d],v.insertBefore(r,v.children[t]),this.tbarAlgEle[p.align+"s"].splice(t,0,r),this.refreshPositioning()}else i[0].parentNode.insertBefore(r,i[t]);this.items.splice(t,0,p),this.tbarEle.splice(t,0,r),t++,this.offsetWid=l.offsetWidth}}l.style.width="",this.renderOverflowMode()},t.prototype.removeItems=function(e){var t,i=e,o=[].slice.call(s.selectAll("."+u,this.element));if("number"==typeof i)t=parseInt(e.toString(),10),this.removeItemByIndex(t,o);else if(i&&i.length>1)for(var r=0,l=[].slice.call(i);r<l.length;r++){var n=l[r];t=this.tbarEle.indexOf(n),this.removeItemByIndex(t,o),o=s.selectAll("."+u,this.element)}else{var n=i&&i.length&&1===i.length?i[0]:e;t=o.indexOf(n),this.removeItemByIndex(t,o)}this.resize()},t.prototype.removeItemByIndex=function(e,t){if(this.tbarEle[e]&&t[e]){var i=this.tbarEle.indexOf(t[e]);if(this.tbarAlign){var s=this.tbarAlgEle[this.items[i].align+"s"].indexOf(this.tbarEle[i]);this.tbarAlgEle[this.items[i].align+"s"].splice(s,1)}o.detach(t[e]),this.items.splice(i,1),this.tbarEle.splice(i,1)}},t.prototype.templateRender=function(e,t,i){var r,l=i.type,a=e;if("object"==typeof e&&(r="function"==typeof a.appendTo),"string"!=typeof e&&r){if("Input"===l){var c=s.createElement("input");i.id?c.id=i.id:c.id=n.getUniqueID("tbr-ipt"),t.appendChild(c),a.appendTo(c)}}else{var h=void 0,p=e;p="string"==typeof e?e.trim():e;try{if(document.querySelectorAll(p).length){var c=document.querySelector(p);h=n.compile(c.outerHTML.trim()),o.detach(c)}}catch(e){h=n.compile(p)}!n.isNullOrUndefined(h)&&h().length>0&&[].slice.call(h()).forEach(function(e){n.isNullOrUndefined(e.tagName)||(e.style.display=""),t.appendChild(e)})}this.add(t,"e-template"),this.tbarEle.push(t)},t.prototype.buttonRendering=function(e,t){var i,o,r=s.createElement("button",{className:"e-tbar-btn"}),l=e.text;e.id?r.id=e.id:r.id=n.getUniqueID("e-tbr-btn");var a=s.createElement("div",{className:"e-tbar-btn-text"});return l?(a.innerHTML=l,r.appendChild(a),r.classList.add("e-tbtn-txt")):this.add(t,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(i=e.prefixIcon+" e-icons",o="left"):(i=e.suffixIcon+" e-icons",o="right")),new p.Button({iconCss:i,iconPosition:o},r),e.width&&s.setStyleAttribute(r,{width:n.formatUnit(e.width)}),r},t.prototype.renderSubComponent=function(e){var t,i;if(t=s.createElement("div",{className:u}),t.setAttribute("aria-disabled","false"),this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,t),e.tooltipText&&t.setAttribute("title",e.tooltipText),e.cssClass&&(t.className=t.className+" "+e.cssClass),e.template)this.templateRender(e.template,t,e);else switch(e.type){case"Button":i=this.buttonRendering(e,t),i.setAttribute("tabindex","-1"),t.appendChild(i),t.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(t,"e-separator")}if(e.showTextOn){var o=e.showTextOn;"Toolbar"===o?(this.add(t,"e-toolbar-text"),this.add(t,"e-tbtn-align")):"Overflow"===o&&this.add(t,"e-popup-text")}if(e.overflow){var r=e.overflow;"Show"===r?this.add(t,"e-overflow-show"):"Hide"===r&&(t.classList.contains("e-separator")||this.add(t,"e-overflow-hide"))}return t},t.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},t.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},t.prototype.activeEleRemove=function(e){n.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,n.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.getModuleName=function(){return"toolbar"},t.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.hide();var t=this.checkOverflow(e,e.getElementsByClassName(f)[0]);t||this.destroyHScroll(),t&&this.scrollModule&&this.offsetWid===e.offsetWidth||((this.offsetWid>e.offsetWidth||t)&&this.renderOverflowMode(),this.popObj&&(this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()),this.offsetWid=e.offsetWidth,this.tbResize=!1)},t.prototype.onPropertyChanged=function(e,t){for(var i=this.element,o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"items":this.destroyMode(),this.destroyItems(),this.renderItems(),this.renderOverflowMode();break;case"width":var l=i.offsetWidth;s.setStyleAttribute(i,{width:n.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&l<i.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":s.setStyleAttribute(this.element,{height:n.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(i,"e-rtl");break;case"enableRtl":e.enableRtl?this.add(i,"e-rtl"):this.remove(i,"e-rtl"),n.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,"e-rtl"):this.remove(this.scrollModule.element,"e-rtl")),n.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,"e-rtl"):this.remove(this.popObj.element,"e-rtl"))}}},t}(i.Component);l([n.Collection([],y)],m.prototype,"items",void 0),l([i.Property("auto")],m.prototype,"width",void 0),l([i.Property("auto")],m.prototype,"height",void 0),l([i.Property("Scrollable")],m.prototype,"overflowMode",void 0),l([i.Property(!1)],m.prototype,"enableRtl",void 0),l([i.Event()],m.prototype,"clicked",void 0),l([i.Event()],m.prototype,"created",void 0),l([i.Event()],m.prototype,"destroyed",void 0),l([i.Event()],m.prototype,"beforeCreate",void 0),m=l([a.NotifyPropertyChanges],m),t.Toolbar=m,t.toolbarBuilder=a.CreateBuilder(m)}.apply(t,o))&&(e.exports=s)},function(e,i){e.exports=t},function(e,t){e.exports=i}])});

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

import { createElement as buildTag, selectAll, setStyleAttribute as setStyle } from '@syncfusion/ej2-base';
import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection } from '@syncfusion/ej2-base';
import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';
import { NotifyPropertyChanges, CreateBuilder, ChildProperty, Browser } from '@syncfusion/ej2-base';

@@ -52,2 +52,3 @@ import { Popup } from '@syncfusion/ej2-popups';

var CLS_TBARNAVACT = 'e-nav-active';
var CLS_TBARIGNORE = 'e-ignore';
var Item = (function (_super) {

@@ -118,9 +119,19 @@ __extends(Item, _super);

Toolbar.prototype.destroy = function () {
var _this = this;
var ele = this.element;
_super.prototype.destroy.call(this);
this.unwireEvents();
if (ele.children.length > 0) {
ele.removeChild(ele.children[0]);
while (ele.firstChild) {
ele.removeChild(ele.firstChild);
}
if (this.trgtEle) {
ele.appendChild(this.ctrlTem);
}
this.clearProperty();
this.popObj = null;
this.remove(this.element, 'e-toolpop');
ele.removeAttribute('style');
['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach(function (attrb) {
_this.element.removeAttribute(attrb);
});
};

@@ -142,4 +153,10 @@ Toolbar.prototype.preRender = function () {

});
EventHandler.add(this.element, 'keydown', this.docKeyDown, this);
this.element.setAttribute('tabIndex', '0');
};
Toolbar.prototype.docKeyDown = function (e) {
if ((e.keyCode === 40 || e.keyCode === 38) && !isNOU(this.popObj) && isVisible(this.popObj.element)) {
e.preventDefault();
}
};
Toolbar.prototype.unwireEvents = function () {

@@ -151,5 +168,10 @@ EventHandler.remove(this.element, 'click', this.clickHandler);

EventHandler.remove(document, 'scroll', this.docEvent);
EventHandler.remove(this.element, 'keydown', this.docKeyDown);
EventHandler.remove(document, 'click', this.docEvent);
}
};
Toolbar.prototype.clearProperty = function () {
this.tbarEle = [];
this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
};
Toolbar.prototype.docEvent = function (e) {

@@ -174,4 +196,3 @@ var popEle = closest(e.target, '.e-popup');

});
this.tbarEle = [];
this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
this.clearProperty();
};

@@ -222,6 +243,6 @@ Toolbar.prototype.destroyMode = function () {

case 'moveRight':
if (rootEle === trgt || navChk) {
if (rootEle === trgt) {
this.elementFocus(clst);
}
else {
else if (!navChk) {
this.eleFocus(clst, 'next');

@@ -231,16 +252,3 @@ }

case 'moveLeft':
if (popObj && navChk) {
if (this.tbarAlign) {
clst = closest(clst, '.' + CLS_ITEMS);
var items = selectAll('.' + CLS_ITEM, clst);
clst = items[items.length - 1];
}
else {
clst = clst.parentElement.lastElementChild;
}
}
if (navChk && !clst.classList.contains(CLS_SEPARATOR) && !clst.classList.contains(CLS_DISABLE)) {
this.elementFocus(clst);
}
else {
if (!navChk) {
this.eleFocus(clst, 'previous');

@@ -284,4 +292,6 @@ }

if (popObj && closest(trgt, '.e-popup')) {
if (e.action === 'moveUp' && popObj.element.firstElementChild === clst) {
rootEle.querySelector('.' + CLS_TBARNAV).focus();
var popEle = popObj.element;
var popFrstEle = popEle.firstElementChild;
if ((value === 'previous' && popFrstEle === clst) || (value === 'next' && popEle.lastElementChild === clst)) {
return;
}

@@ -297,5 +307,5 @@ else {

case 'tab':
if (!scrollChk) {
if (!scrollChk && !navChk) {
var ele_1 = clst.firstElementChild;
if (rootEle === trgt || navChk) {
if (rootEle === trgt) {
if (this.activeEle) {

@@ -358,6 +368,2 @@ this.activeEle.focus();

}
else if (this.popObj && pos === 'next') {
this.element.querySelector('.' + CLS_TBARNAV).focus();
return;
}
}

@@ -389,9 +395,3 @@ this.elementFocus(sib);

}
else if (this.popObj) {
this.element.querySelector('.' + CLS_TBARNAV).focus();
}
}
else if (this.popObj && pos === 'next') {
this.element.querySelector('.' + CLS_TBARNAV).focus();
}
};

@@ -483,3 +483,3 @@ Toolbar.prototype.clickHandler = function (e) {

var width = 0;
[].slice.call(items.children).forEach(function (el) {
[].slice.call(selectAll('.' + CLS_ITEM), items).forEach(function (el) {
width += el.offsetWidth;

@@ -495,3 +495,3 @@ });

var itemWidth;
if (this.tbarAlign) {
if (this.tbarAlign || this.scrollModule) {
itemWidth = this.itemWidthCal(this.scrollModule ? innerItem.querySelector('.e-hscroll-content') : innerItem);

@@ -658,9 +658,8 @@ }

var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top;
if (!isNOU(popupNav)) {
var popIcon = popupNav.firstElementChild;
popupNav.classList.add(CLS_TBARNAVACT);
classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
}
if ((window.innerHeight + window.scrollY) < popupElePos) {
var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - window.scrollY) + 5));
var popIcon = popupNav.firstElementChild;
popupNav.classList.add(CLS_TBARNAVACT);
classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
var scrollVal = isNOU(window.scrollY) ? 0 : window.scrollY;
if ((window.innerHeight + scrollVal) < popupElePos) {
var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));
popObj.height = overflowHeight + 'px';

@@ -673,7 +672,5 @@ setStyle(popObj.element, { maxHeight: overflowHeight + 'px' });

var popupNav = element.querySelector('.' + CLS_TBARNAV);
if (popupNav) {
var popIcon = popupNav.firstElementChild;
popupNav.classList.remove(CLS_TBARNAVACT);
classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
}
var popIcon = popupNav.firstElementChild;
popupNav.classList.remove(CLS_TBARNAVACT);
classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
};

@@ -686,2 +683,11 @@ Toolbar.prototype.checkPriority = function (ele, inEle, eleWidth, pre) {

var itemPopCount = 0;
var checkClass = function (ele, val) {
var rVal = false;
val.forEach(function (cls) {
if (ele.classList.contains(cls)) {
rVal = true;
}
});
return rVal;
};
for (var i = len - 1; i >= 0; i--) {

@@ -697,3 +703,3 @@ var mrgn = parseFloat((window.getComputedStyle(inEle[i])).marginRight);

var sepEle = inEle[i + itemCount + (sepCheck - 1)];
if (sepEle.classList.contains(CLS_SEPARATOR)) {
if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
setStyle(sepEle, { display: 'none' });

@@ -712,3 +718,3 @@ }

}
else if (!inEle[i].classList.contains(CLS_SEPARATOR)) {
else if (!checkClass(inEle[i], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
inEle[i].classList.add(CLS_POPUP);

@@ -738,11 +744,16 @@ setStyle(inEle[i], { display: 'none', minWidth: inEle[i].offsetWidth + 'px' });

nav.setAttribute('tabindex', '0');
element.insertBefore(nav, element.firstChild);
element.appendChild(nav);
};
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid) {
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig) {
var ignoreCount = ig;
var popEle = this.popObj.element;
var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';
var priEleCnt = selectAll('.' + CLS_POPUP + ':not(.' + CLS_TBAROVERFLOW + ')', popEle).length;
var checkClass = function (ele, val) {
return ele.classList.contains(val);
};
if (selectAll(query, inEle).length === 0) {
var eleSep = inEle.children[indx - (indx - sepPri) - 1];
if (!isNOU(eleSep) && eleSep.classList.contains(CLS_SEPARATOR) && !isVisible(eleSep)) {
var ignoreCheck = (!isNOU(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));
if ((!isNOU(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible(eleSep)) || ignoreCheck) {
var sepDisplay = 'none';

@@ -753,3 +764,3 @@ eleSep.style.display = 'inherit';

if ((elWid + eleSepWidth) < wid || des) {
inEle.insertBefore(el, inEle.children[indx - (indx - sepPri)]);
inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);
if (!isNOU(prevSep)) {

@@ -767,7 +778,7 @@ prevSep.style.display = '';

else {
inEle.insertBefore(el, inEle.children[indx - (indx - sepPri)]);
inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);
}
}
else {
inEle.insertBefore(el, inEle.children[indx - priEleCnt]);
inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - priEleCnt]);
}

@@ -796,2 +807,21 @@ };

};
Toolbar.prototype.ignoreEleFetch = function (index, innerEle) {
var ignoreEle = [].slice.call(innerEle.querySelectorAll('.' + CLS_TBARIGNORE));
var ignoreInx = [];
var count = 0;
if (ignoreEle.length > 0) {
ignoreEle.forEach(function (ele) {
ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
});
}
else {
return 0;
}
ignoreInx.forEach(function (val) {
if (val <= index) {
count++;
}
});
return count;
};
Toolbar.prototype.popupEleRefresh = function (width, popupEle, destroy) {

@@ -802,2 +832,3 @@ var eleSplice = this.tbarEle;

var innerEle = this.element.querySelector('.' + CLS_ITEMS);
var ignoreCount = 0;
var _loop_1 = function (el) {

@@ -848,4 +879,5 @@ el.style.position = 'absolute';

});
ignoreCount = this_1.ignoreEleFetch(index, innerEle);
if (el.classList.contains(CLS_TBAROVERFLOW)) {
this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width);
this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount);
width -= el.offsetWidth;

@@ -859,3 +891,3 @@ }

priEleCnt = selectAll('.' + CLS_TBAROVERFLOW, this_1.popObj.element).length;
innerEle.insertBefore(el, innerEle.children[index - priEleCnt]);
innerEle.insertBefore(el, innerEle.children[(index + ignoreCount) - priEleCnt]);
width -= el.offsetWidth;

@@ -948,2 +980,3 @@ }

var _this = this;
this.ctrlTem = this.trgtEle.cloneNode(true);
this.add(this.trgtEle, CLS_ITEMS);

@@ -1059,8 +1092,3 @@ this.tbarEle = [];

var ele = void 0;
if (this.scrollModule) {
ele = closest(innerItems[0], '.' + CLS_ITEMS + ' .' + CLS_TBARSCROLL).children[algIndex];
}
else {
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
}
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
ele.insertBefore(innerEle, ele.children[index]);

@@ -1121,17 +1149,36 @@ this.tbarAlgEle[(item.align + 's')].splice(index, 0, innerEle);

var itemType = item.type;
if (typeof (templateProp) === 'string') {
innerEle.innerHTML = templateProp;
var ele = innerEle.childNodes[0];
if (!ele.tagName && innerEle.childElementCount === 0) {
var templateEle = document.querySelector(templateProp);
innerEle.innerHTML = '';
innerEle.appendChild(templateEle);
var eleObj = templateProp;
var isComponent;
if (typeof (templateProp) === 'object') {
isComponent = typeof (eleObj.appendTo) === 'function';
}
if (typeof (templateProp) === 'string' || !isComponent) {
var templateFn = void 0;
var val = templateProp;
val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
var e = void 0;
try {
if (document.querySelectorAll(val).length) {
var ele = document.querySelector(val);
templateFn = templateCompiler(ele.outerHTML.trim());
detach(ele);
}
}
catch (e) {
templateFn = templateCompiler(val);
}
if (!isNOU(templateFn) && templateFn().length > 0) {
[].slice.call(templateFn()).forEach(function (ele) {
if (!isNOU(ele.tagName)) {
ele.style.display = '';
}
innerEle.appendChild(ele);
});
}
}
else if (itemType === 'Input') {
var templateProperty = templateProp;
var ele = buildTag('input');
item.id ? (ele.id = item.id) : (ele.id = getUniqueID('tbr-ipt'));
innerEle.appendChild(ele);
templateProperty.appendTo(ele);
eleObj.appendTo(ele);
}

@@ -1263,3 +1310,3 @@ this.add(innerEle, CLS_TEMPLATE);

var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);
if (!checkOverflow && this.scrollModule) {
if (!checkOverflow) {
this.destroyHScroll();

@@ -1266,0 +1313,0 @@ }

{
"name": "@syncfusion/ej2-navigations",
"version": "1.0.17",
"version": "1.0.18",
"description": "Essential JS 2 Navigation Components",

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

"dependencies": {
"@syncfusion/ej2-base": "^1.0.16",
"@syncfusion/ej2-buttons": "^1.0.14",
"@syncfusion/ej2-base": "^1.0.18",
"@syncfusion/ej2-buttons": "^1.0.18",
"@syncfusion/ej2-popups": "^1.0.17"

@@ -13,0 +13,0 @@ },

@@ -42,3 +42,3 @@ import{Toolbar} from "./toolbar";

/**
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US'
* Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
*/

@@ -45,0 +45,0 @@ locale(value:string): BuilderProperties;

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

import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { createElement as buildTag, selectAll, setStyleAttribute as setStyle, KeyboardEventArgs } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, CreateBuilder, ChildProperty, Browser } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { ToolbarHelper } from './toolbar-builder';
import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { createElement as buildTag, selectAll, setStyleAttribute as setStyle, KeyboardEventArgs } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, CreateBuilder, ChildProperty, Browser } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { ToolbarHelper } from './toolbar-builder';
import {OverflowOption,ItemType,DisplayMode,ItemAlign,OverflowMode,ClickEventArgs} from "./toolbar";

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

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

private trgtEle;
private ctrlTem;
/** @hidden */

@@ -225,3 +226,3 @@ private popObj;

/**
* Removes the widget safely from the DOM and also detaches all its related event handlers.
* Removes the control from the DOM and also removes all its related events.
* @returns void

@@ -242,3 +243,5 @@ */

private wireEvents();
private docKeyDown(e);
private unwireEvents();
private clearProperty();
private docEvent(e);

@@ -278,4 +281,5 @@ private destroyHScroll();

private createPopupIcon(element);
private tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid);
private tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid, ig);
private popupRefresh(popupEle, destroy);
private ignoreEleFetch(index, innerEle);
private popupEleRefresh(width, popupEle, destroy);

@@ -282,0 +286,0 @@ private removePositioning();

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

var CLS_TBARNAVACT = 'e-nav-active';
var CLS_TBARIGNORE = 'e-ignore';
var Item = (function (_super) {

@@ -111,9 +112,19 @@ __extends(Item, _super);

Toolbar.prototype.destroy = function () {
var _this = this;
var ele = this.element;
_super.prototype.destroy.call(this);
this.unwireEvents();
if (ele.children.length > 0) {
ele.removeChild(ele.children[0]);
while (ele.firstChild) {
ele.removeChild(ele.firstChild);
}
if (this.trgtEle) {
ele.appendChild(this.ctrlTem);
}
this.clearProperty();
this.popObj = null;
this.remove(this.element, 'e-toolpop');
ele.removeAttribute('style');
['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach(function (attrb) {
_this.element.removeAttribute(attrb);
});
};

@@ -135,4 +146,10 @@ Toolbar.prototype.preRender = function () {

});
ej2_base_1.EventHandler.add(this.element, 'keydown', this.docKeyDown, this);
this.element.setAttribute('tabIndex', '0');
};
Toolbar.prototype.docKeyDown = function (e) {
if ((e.keyCode === 40 || e.keyCode === 38) && !ej2_base_4.isNullOrUndefined(this.popObj) && ej2_base_2.isVisible(this.popObj.element)) {
e.preventDefault();
}
};
Toolbar.prototype.unwireEvents = function () {

@@ -144,5 +161,10 @@ ej2_base_1.EventHandler.remove(this.element, 'click', this.clickHandler);

ej2_base_1.EventHandler.remove(document, 'scroll', this.docEvent);
ej2_base_1.EventHandler.remove(this.element, 'keydown', this.docKeyDown);
ej2_base_1.EventHandler.remove(document, 'click', this.docEvent);
}
};
Toolbar.prototype.clearProperty = function () {
this.tbarEle = [];
this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
};
Toolbar.prototype.docEvent = function (e) {

@@ -167,4 +189,3 @@ var popEle = ej2_base_2.closest(e.target, '.e-popup');

});
this.tbarEle = [];
this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
this.clearProperty();
};

@@ -215,6 +236,6 @@ Toolbar.prototype.destroyMode = function () {

case 'moveRight':
if (rootEle === trgt || navChk) {
if (rootEle === trgt) {
this.elementFocus(clst);
}
else {
else if (!navChk) {
this.eleFocus(clst, 'next');

@@ -224,16 +245,3 @@ }

case 'moveLeft':
if (popObj && navChk) {
if (this.tbarAlign) {
clst = ej2_base_2.closest(clst, '.' + CLS_ITEMS);
var items = ej2_base_3.selectAll('.' + CLS_ITEM, clst);
clst = items[items.length - 1];
}
else {
clst = clst.parentElement.lastElementChild;
}
}
if (navChk && !clst.classList.contains(CLS_SEPARATOR) && !clst.classList.contains(CLS_DISABLE)) {
this.elementFocus(clst);
}
else {
if (!navChk) {
this.eleFocus(clst, 'previous');

@@ -277,4 +285,6 @@ }

if (popObj && ej2_base_2.closest(trgt, '.e-popup')) {
if (e.action === 'moveUp' && popObj.element.firstElementChild === clst) {
rootEle.querySelector('.' + CLS_TBARNAV).focus();
var popEle = popObj.element;
var popFrstEle = popEle.firstElementChild;
if ((value === 'previous' && popFrstEle === clst) || (value === 'next' && popEle.lastElementChild === clst)) {
return;
}

@@ -290,5 +300,5 @@ else {

case 'tab':
if (!scrollChk) {
if (!scrollChk && !navChk) {
var ele_1 = clst.firstElementChild;
if (rootEle === trgt || navChk) {
if (rootEle === trgt) {
if (this.activeEle) {

@@ -351,6 +361,2 @@ this.activeEle.focus();

}
else if (this.popObj && pos === 'next') {
this.element.querySelector('.' + CLS_TBARNAV).focus();
return;
}
}

@@ -382,9 +388,3 @@ this.elementFocus(sib);

}
else if (this.popObj) {
this.element.querySelector('.' + CLS_TBARNAV).focus();
}
}
else if (this.popObj && pos === 'next') {
this.element.querySelector('.' + CLS_TBARNAV).focus();
}
};

@@ -476,3 +476,3 @@ Toolbar.prototype.clickHandler = function (e) {

var width = 0;
[].slice.call(items.children).forEach(function (el) {
[].slice.call(ej2_base_3.selectAll('.' + CLS_ITEM), items).forEach(function (el) {
width += el.offsetWidth;

@@ -488,3 +488,3 @@ });

var itemWidth;
if (this.tbarAlign) {
if (this.tbarAlign || this.scrollModule) {
itemWidth = this.itemWidthCal(this.scrollModule ? innerItem.querySelector('.e-hscroll-content') : innerItem);

@@ -651,9 +651,8 @@ }

var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + ej2_popups_2.calculatePosition(toolEle).top;
if (!ej2_base_4.isNullOrUndefined(popupNav)) {
var popIcon = popupNav.firstElementChild;
popupNav.classList.add(CLS_TBARNAVACT);
ej2_base_2.classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
}
if ((window.innerHeight + window.scrollY) < popupElePos) {
var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - window.scrollY) + 5));
var popIcon = popupNav.firstElementChild;
popupNav.classList.add(CLS_TBARNAVACT);
ej2_base_2.classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
var scrollVal = ej2_base_4.isNullOrUndefined(window.scrollY) ? 0 : window.scrollY;
if ((window.innerHeight + scrollVal) < popupElePos) {
var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));
popObj.height = overflowHeight + 'px';

@@ -666,7 +665,5 @@ ej2_base_3.setStyleAttribute(popObj.element, { maxHeight: overflowHeight + 'px' });

var popupNav = element.querySelector('.' + CLS_TBARNAV);
if (popupNav) {
var popIcon = popupNav.firstElementChild;
popupNav.classList.remove(CLS_TBARNAVACT);
ej2_base_2.classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
}
var popIcon = popupNav.firstElementChild;
popupNav.classList.remove(CLS_TBARNAVACT);
ej2_base_2.classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
};

@@ -679,2 +676,11 @@ Toolbar.prototype.checkPriority = function (ele, inEle, eleWidth, pre) {

var itemPopCount = 0;
var checkClass = function (ele, val) {
var rVal = false;
val.forEach(function (cls) {
if (ele.classList.contains(cls)) {
rVal = true;
}
});
return rVal;
};
for (var i = len - 1; i >= 0; i--) {

@@ -690,3 +696,3 @@ var mrgn = parseFloat((window.getComputedStyle(inEle[i])).marginRight);

var sepEle = inEle[i + itemCount + (sepCheck - 1)];
if (sepEle.classList.contains(CLS_SEPARATOR)) {
if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
ej2_base_3.setStyleAttribute(sepEle, { display: 'none' });

@@ -705,3 +711,3 @@ }

}
else if (!inEle[i].classList.contains(CLS_SEPARATOR)) {
else if (!checkClass(inEle[i], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
inEle[i].classList.add(CLS_POPUP);

@@ -731,11 +737,16 @@ ej2_base_3.setStyleAttribute(inEle[i], { display: 'none', minWidth: inEle[i].offsetWidth + 'px' });

nav.setAttribute('tabindex', '0');
element.insertBefore(nav, element.firstChild);
element.appendChild(nav);
};
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid) {
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig) {
var ignoreCount = ig;
var popEle = this.popObj.element;
var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';
var priEleCnt = ej2_base_3.selectAll('.' + CLS_POPUP + ':not(.' + CLS_TBAROVERFLOW + ')', popEle).length;
var checkClass = function (ele, val) {
return ele.classList.contains(val);
};
if (ej2_base_3.selectAll(query, inEle).length === 0) {
var eleSep = inEle.children[indx - (indx - sepPri) - 1];
if (!ej2_base_4.isNullOrUndefined(eleSep) && eleSep.classList.contains(CLS_SEPARATOR) && !ej2_base_2.isVisible(eleSep)) {
var ignoreCheck = (!ej2_base_4.isNullOrUndefined(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));
if ((!ej2_base_4.isNullOrUndefined(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !ej2_base_2.isVisible(eleSep)) || ignoreCheck) {
var sepDisplay = 'none';

@@ -746,3 +757,3 @@ eleSep.style.display = 'inherit';

if ((elWid + eleSepWidth) < wid || des) {
inEle.insertBefore(el, inEle.children[indx - (indx - sepPri)]);
inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);
if (!ej2_base_4.isNullOrUndefined(prevSep)) {

@@ -760,7 +771,7 @@ prevSep.style.display = '';

else {
inEle.insertBefore(el, inEle.children[indx - (indx - sepPri)]);
inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);
}
}
else {
inEle.insertBefore(el, inEle.children[indx - priEleCnt]);
inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - priEleCnt]);
}

@@ -789,2 +800,21 @@ };

};
Toolbar.prototype.ignoreEleFetch = function (index, innerEle) {
var ignoreEle = [].slice.call(innerEle.querySelectorAll('.' + CLS_TBARIGNORE));
var ignoreInx = [];
var count = 0;
if (ignoreEle.length > 0) {
ignoreEle.forEach(function (ele) {
ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
});
}
else {
return 0;
}
ignoreInx.forEach(function (val) {
if (val <= index) {
count++;
}
});
return count;
};
Toolbar.prototype.popupEleRefresh = function (width, popupEle, destroy) {

@@ -795,2 +825,3 @@ var eleSplice = this.tbarEle;

var innerEle = this.element.querySelector('.' + CLS_ITEMS);
var ignoreCount = 0;
var _loop_1 = function (el) {

@@ -841,4 +872,5 @@ el.style.position = 'absolute';

});
ignoreCount = this_1.ignoreEleFetch(index, innerEle);
if (el.classList.contains(CLS_TBAROVERFLOW)) {
this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width);
this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount);
width -= el.offsetWidth;

@@ -852,3 +884,3 @@ }

priEleCnt = ej2_base_3.selectAll('.' + CLS_TBAROVERFLOW, this_1.popObj.element).length;
innerEle.insertBefore(el, innerEle.children[index - priEleCnt]);
innerEle.insertBefore(el, innerEle.children[(index + ignoreCount) - priEleCnt]);
width -= el.offsetWidth;

@@ -941,2 +973,3 @@ }

var _this = this;
this.ctrlTem = this.trgtEle.cloneNode(true);
this.add(this.trgtEle, CLS_ITEMS);

@@ -1052,8 +1085,3 @@ this.tbarEle = [];

var ele = void 0;
if (this.scrollModule) {
ele = ej2_base_2.closest(innerItems[0], '.' + CLS_ITEMS + ' .' + CLS_TBARSCROLL).children[algIndex];
}
else {
ele = ej2_base_2.closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
}
ele = ej2_base_2.closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
ele.insertBefore(innerEle, ele.children[index]);

@@ -1114,17 +1142,36 @@ this.tbarAlgEle[(item.align + 's')].splice(index, 0, innerEle);

var itemType = item.type;
if (typeof (templateProp) === 'string') {
innerEle.innerHTML = templateProp;
var ele = innerEle.childNodes[0];
if (!ele.tagName && innerEle.childElementCount === 0) {
var templateEle = document.querySelector(templateProp);
innerEle.innerHTML = '';
innerEle.appendChild(templateEle);
var eleObj = templateProp;
var isComponent;
if (typeof (templateProp) === 'object') {
isComponent = typeof (eleObj.appendTo) === 'function';
}
if (typeof (templateProp) === 'string' || !isComponent) {
var templateFn = void 0;
var val = templateProp;
val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
var e = void 0;
try {
if (document.querySelectorAll(val).length) {
var ele = document.querySelector(val);
templateFn = ej2_base_4.compile(ele.outerHTML.trim());
ej2_base_2.detach(ele);
}
}
catch (e) {
templateFn = ej2_base_4.compile(val);
}
if (!ej2_base_4.isNullOrUndefined(templateFn) && templateFn().length > 0) {
[].slice.call(templateFn()).forEach(function (ele) {
if (!ej2_base_4.isNullOrUndefined(ele.tagName)) {
ele.style.display = '';
}
innerEle.appendChild(ele);
});
}
}
else if (itemType === 'Input') {
var templateProperty = templateProp;
var ele = ej2_base_3.createElement('input');
item.id ? (ele.id = item.id) : (ele.id = ej2_base_4.getUniqueID('tbr-ipt'));
innerEle.appendChild(ele);
templateProperty.appendTo(ele);
eleObj.appendTo(ele);
}

@@ -1256,3 +1303,3 @@ this.add(innerEle, CLS_TEMPLATE);

var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);
if (!checkOverflow && this.scrollModule) {
if (!checkOverflow) {
this.destroyHScroll();

@@ -1259,0 +1306,0 @@ }

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

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

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

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