Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/report/js/visualconstructor/ |
Upload File : |
(function(){"use strict";BX.namespace("BX.Report.VisualConstructor.Widget.Content");function t(t){var e=document.createElement("p");e.innerHTML=t;return e.innerText}BX.Report.VisualConstructor.Widget.Content.AmChart=function(t){BX.Report.Dashboard.Content.apply(this,arguments);this.chartWrapper=BX.create("div",{style:{height:this.getHeight()-8+"px",paddingTop:"8px"}});BX.addCustomEvent(this.widget,"Dashboard.Board.Widget:onAfterRender",function(){if(this.data.isFilled){if(!AmCharts.isReady){AmCharts.ready(this.makeChart.bind(this))}else{this.makeChart()}}}.bind(this))};BX.Report.VisualConstructor.Widget.Content.AmChart.prototype={__proto__:BX.Report.Dashboard.Content.prototype,constructor:BX.Report.VisualConstructor.Widget.Content.AmChart,clickHandler:null,render:function(){jsDD.unregisterObject(this.getWidget().getWidgetContainer());this.getWidget().makeDraggable(this.getWidget().getHeadContainer());return this.chartWrapper},makeChart:function(){var t=[];var e=[];for(var r=1;r<=12;r++){t.push(BX.message["MONTH_"+r.toString()]);e.push(BX.message["MON_"+r.toString()])}AmCharts.monthNames=t;AmCharts.shortMonthNames=e;if(!this.chart){this.prepareDataForAmChart();if(this.data.dataProvider.length){this.chart=AmCharts.makeChart(this.chartWrapper,this.data);if(this.clickHandler){this.chart.addListener("clickGraphItem",this.clickHandler)}}}if(this.chart){this.chart.invalidateSize()}},prepareDataForAmChart:function(){var e;if(this.data["graphs"]&&BX.type.isArray(this.data["graphs"])){this.data["graphs"].forEach(function(r){if(r["balloonFunction"]){e=BX.Report.VC.Core.getFunction(r["balloonFunction"]);if(BX.Type.isFunction(e)){r["balloonFunction"]=e}else{throw new Error("balloonFunction "+r["balloonFunction"]+" is not a function")}}if(r["title"]){r["title"]=t(r["title"])}})}if(this.data["clickGraphItem"]){e=BX.Report.VC.Core.getFunction(this.data["clickGraphItem"]);if(BX.Type.isFunction(e)){this.clickHandler=e;delete this.data["clickGraphItem"]}else{throw new Error("clickGraphItem event handler "+this.data["clickGraphItem"]+" is not a function")}}else{this.clickHandler=this.handleItemClick.bind(this)}},handleItemClick:function(t){var e=t.item.graph.valueField.toString();var r="targetUrl";var i=e.search("_");if(i!=-1){var a=e.substr(i+1);r=r+"_"+a}if(!t.item.dataContext.hasOwnProperty(r)){return}var o=t.item.dataContext[r];if(BX.type.isNotEmptyString(o)){if(BX.SidePanel){BX.SidePanel.Instance.open(o,{cacheable:false})}else{window.open(o)}}}};BX.Report.VisualConstructor.Widget.Content.AmChart.PieDiagram=function(t){BX.Report.VisualConstructor.Widget.Content.AmChart.apply(this,arguments)};BX.Report.VisualConstructor.Widget.Content.AmChart.PieDiagram.prototype={__proto__:BX.Report.VisualConstructor.Widget.Content.AmChart.prototype,constructor:BX.Report.VisualConstructor.Widget.Content.AmChart.PieDiagram,render:function(){var t=BX.Report.VisualConstructor.Widget.Content.AmChart.prototype.render.call(this);t.style.opacity=0;setTimeout(function(){t.style.opacity=1;t.style.transition="200ms"}.bind(t),100);jsDD.unregisterObject(this.getWidget().getHeadContainer());this.getWidget().makeDraggable(this.getWidget().getWidgetContainer());return t}};BX.Report.VisualConstructor.Widget.Content.AmChart.Funnel=function(t){BX.Report.VisualConstructor.Widget.Content.AmChart.apply(this,arguments);this.chartWrapper.style.paddingLeft="25px"};BX.Report.VisualConstructor.Widget.Content.AmChart.Funnel.prototype={__proto__:BX.Report.VisualConstructor.Widget.Content.AmChart.prototype,constructor:BX.Report.VisualConstructor.Widget.Content.AmChart.Funnel};BX.Report.VisualConstructor.Widget.Content.AmCharts4=function(t){BX.Report.Dashboard.Content.apply(this,arguments);this.currentColumnWidth=0;this.chartWrapper=BX.create("div",{style:{height:this.getHeight()-8+"px",paddingTop:"8px"}});BX.addCustomEvent(this.widget,"Dashboard.Board.Widget:onAfterRender",function(){if(this.data.isFilled){this.makeChart()}}.bind(this));am4core.useTheme(am4themes_animated)};BX.Report.VisualConstructor.Widget.Content.AmCharts4.prototype={__proto__:BX.Report.Dashboard.Content.prototype,constructor:BX.Report.VisualConstructor.Widget.Content.AmCharts4,render:function(){jsDD.unregisterObject(this.getWidget().getWidgetContainer());this.getWidget().makeDraggable(this.getWidget().getHeadContainer());return this.chartWrapper},makeChart:function(){if(!this.chart){if(this.data.data.length){this.prepareDataForAmChart();this.chart=am4core.createFromConfig(this.data,this.chartWrapper,this.data.type);this.onAfterChartCreate()}}if(this.chart){this.chart.invalidateLayout()}},prepareDataForAmChart:function(){this.data.xAxes.forEach(function(e){if(e.renderer&&e.renderer.labels&&e.renderer.labels.template&&e.renderer.labels.template.ellipsis){e.renderer.labels.template.ellipsis=t(e.renderer.labels.template.ellipsis)}},this);this.data.series.forEach(function(t){if(t.columns&&t.columns.adapter&&t.columns.adapter.tooltipHTML){var e=BX.Report.VC.Core.getFunction(t.columns.adapter.tooltipHTML);if(BX.Type.isFunction(e)){t.columns.adapter.tooltipHTML=e}else{throw new Error("tooltipHTML adapter "+t.columns.adapter.tooltipHTML+" is not a function")}}if(!t.columns.events){t.columns.events={}}t.columns.events.hit=this.handleItemClick.bind(this)},this)},onAfterChartCreate:function(){},handleItemClick:function(t){if(!t.target.hasOwnProperty("valueUrl")||!BX.type.isNotEmptyString(t.target.valueUrl)){return}if(BX.SidePanel){BX.SidePanel.Instance.open(t.target.valueUrl,{cacheable:false})}else{window.open(t.target.valueUrl)}}};BX.Report.VisualConstructor.Widget.Content.Activity=function(t){BX.Report.Dashboard.Content.apply(this,arguments);var e=this.getWidget().getCell();if(e){BX.addCustomEvent(e,"BX.Report.Dashboard.Cell:clean",this.handlerClearCell.bind(this))}this.graph=null};BX.Report.VisualConstructor.Widget.Content.Activity.prototype={__proto__:BX.Report.Dashboard.Content.prototype,constructor:BX.Report.VisualConstructor.Widget.Activity,handlerClearCell:function(){BX.Report.VC.PopupWindowManager.closeAllPopups()},render:function(){jsDD.unregisterObject(this.getWidget().getWidgetContainer());this.getWidget().makeDraggable(this.getWidget().getHeadContainer());if(!this.graphContainer){this.graphContainer=BX.create("div",{style:{height:this.getHeight()+"px"}});var t=new BX.ActivityTileWidget({renderTo:this.graphContainer,labelY:this.data.config.labelY,labelX:this.data.config.labelX,items:this.data.items});t.render()}return this.graphContainer}};BX.Report.VisualConstructor.Widget.Content.NumberBlock=function(t){BX.Report.Dashboard.Content.Html.apply(this,arguments)};BX.Report.VisualConstructor.Widget.Content.NumberBlock.prototype={__proto__:BX.Report.Dashboard.Content.Html.prototype,constructor:BX.Report.VisualConstructor.Widget.NumberBlock,render:function(){this.getWidget().setColor("inherit");this.getWidget().applyColor();this.getWidget().getHeadContainer().style.backgroundColor=this.getColor();this.getWidget().getWidgetWrapper().style.backgroundColor="inherit";var t=this.getColor().substring(1,7);var e=BX.Report.Dashboard.Utils.isDarkColor(t);if(e){this.getWidget().getWidgetWrapper().classList.remove("report-visualconstructor-dashboard-widget-light");this.getWidget().getWidgetWrapper().classList.add("report-visualconstructor-dashboard-widget-dark")}else{this.getWidget().getWidgetWrapper().classList.remove("report-visualconstructor-dashboard-widget-dark");this.getWidget().getWidgetWrapper().classList.add("report-visualconstructor-dashboard-widget-light")}return BX.Report.Dashboard.Content.Html.prototype.render.call(this)}};BX.Report.VisualConstructor.Widget.Content.GroupedDataGrid=function(t){BX.Report.Dashboard.Content.Html.apply(this,arguments)};BX.Report.VisualConstructor.Widget.Content.GroupedDataGrid.prototype={__proto__:BX.Report.Dashboard.Content.Html.prototype,constructor:BX.Report.VisualConstructor.Widget.GroupedDataGrid,getHeight:function(){if(this.htmlContentWrapper.parentNode){var t=BX.Report.Dashboard.Content.Html.prototype.render.call(this);return t.clientHeight}else{return 325}},render:function(){return BX.Report.Dashboard.Content.Html.prototype.render.call(this)}}})(); //# sourceMappingURL=contenttypes.map.js