Your IP : 18.117.151.127


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/ui/panel/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/ui/panel/icon_panel.min.js

(function(){"use strict";BX.namespace("BX.Landing.UI.Panel");BX.Landing.UI.Panel.Icon=function(n,i){BX.Landing.UI.Panel.Content.apply(this,arguments);this.layout.classList.add("landing-ui-panel-icon");this.overlay.classList.add("landing-ui-panel-icon");this.overlay.hidden=true;this.resolver=function(){};this.libraries=[BX.Landing.Icon.FontAwesome,BX.Landing.Icon.SimpleLine,BX.Landing.Icon.SimpleLineProOne,BX.Landing.Icon.SimpleLineProTwo,BX.Landing.Icon.EtLineIcons,BX.Landing.Icon.HSIcons];this.layout.hidden=true;document.body.appendChild(this.layout)};BX.Landing.UI.Panel.Icon.instance=null;BX.Landing.UI.Panel.Icon.getInstance=function(){if(!BX.Landing.UI.Panel.Icon.instance){BX.Landing.UI.Panel.Icon.instance=new BX.Landing.UI.Panel.Icon("icon_panel",{title:BX.Landing.Loc.getMessage("LANDING_ICONS_SLIDER_TITLE")})}return BX.Landing.UI.Panel.Icon.instance};BX.Landing.UI.Panel.Icon.prototype={constructor:BX.Landing.UI.Panel.Icon,__proto__:BX.Landing.UI.Panel.Content.prototype,show:function(){return new Promise(function(n){this.resolver=n;this.makeLayout();BX.Landing.UI.Panel.Content.prototype.show.call(this)}.bind(this))},onChange:function(n){this.resolver(n);this.hide()},makeLayout:function(){if(!this.content.innerHTML){this.libraries.forEach(function(n){this.appendSidebarButton(new BX.Landing.UI.Button.SidebarButton(n.id,{text:n.name}));n.categories.forEach(function(n){this.appendSidebarButton(new BX.Landing.UI.Button.SidebarButton(n.id,{text:n.name,onClick:this.onCategoryChange.bind(this,n.id),child:true}))},this)},this);this.onCategoryChange(this.libraries[0].categories[0].id)}},onCategoryChange:function(n){this.content.innerHTML="";this.libraries.forEach(function(i){i.categories.forEach(function(i){if(n===i.id){var e=new Map;var t=new BX.Landing.UI.Card.BaseCard({title:i.name,className:"landing-ui-card-icons"});i.items.forEach(function(n){var i=document.createElement("div");i.className="landing-ui-card landing-ui-card-icon";var a=document.createElement("span");a.className=n;i.appendChild(a);i.addEventListener("click",function(){this.onChange(n)}.bind(this));t.body.appendChild(i);var o=getComputedStyle(a,":before");requestAnimationFrame(function(){var n=o.getPropertyValue("content");if(e.has(n)){i.hidden=true}else{e.set(n,true)}}.bind(this))},this);this.appendCard(t)}},this)},this)}}})();
//# sourceMappingURL=icon_panel.map.js