public_html/layouts/basic/modules/OSSTimeControl/resources/InRelation.min.js.map
{"version":3,"file":"InRelation.min.js","sources":["InRelation.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery(document).ready(function ($) {\n\tif (window.loadInRelationTomeControl == undefined) {\n\t\tjQuery.Class(\n\t\t\t'OSSTimeControl_Calendar_Js',\n\t\t\t{},\n\t\t\t{\n\t\t\t\tchart: false,\n\t\t\t\tloadChart: function () {\n\t\t\t\t\tvar data = $('.sumaryRelatedTimeControl .widgetData').val();\n\t\t\t\t\tif (data == undefined || data == '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tvar jdata = JSON.parse(data);\n\t\t\t\t\tif (jdata.datasets.length == 0 || jdata.datasets[0].data.length == 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tjdata.datasets[0].datalabels = {\n\t\t\t\t\t\tfont: {\n\t\t\t\t\t\t\tweight: 'bold'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\tanchor: 'end',\n\t\t\t\t\t\talign: 'start'\n\t\t\t\t\t};\n\n\t\t\t\t\tnew Chart($(this.chart).find('canvas')[0].getContext('2d'), {\n\t\t\t\t\t\ttype: 'bar',\n\t\t\t\t\t\tdata: jdata,\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\ttooltips: {\n\t\t\t\t\t\t\t\tcallbacks: {\n\t\t\t\t\t\t\t\t\tlabelColor: function (tooltipItem, chart) {\n\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\tborderColor: jdata.datasets[0].backgroundColor[tooltipItem['index']],\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: jdata.datasets[0].borderColor[tooltipItem['index']]\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\ttitle: function ([tooltipItem], chart) {\n\t\t\t\t\t\t\t\t\t\treturn jdata.datasets[0].tooltips[tooltipItem['index']];\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tlabel: function (tooltipItem, chart) {\n\t\t\t\t\t\t\t\t\t\treturn jdata.datasets[0].dataFormatted[tooltipItem['index']];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tlegend: {\n\t\t\t\t\t\t\t\tdisplay: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttitle: {\n\t\t\t\t\t\t\t\tdisplay: true,\n\t\t\t\t\t\t\t\tposition: 'top',\n\t\t\t\t\t\t\t\ttext: jdata.title\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tmaintainAspectRatio: false,\n\t\t\t\t\t\t\tscales: {\n\t\t\t\t\t\t\t\tyAxes: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tticks: {\n\t\t\t\t\t\t\t\t\t\t\tbeginAtZero: true\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tregisterSwitch: function () {\n\t\t\t\t\t$('.switchChartContainer').on('click', function () {\n\t\t\t\t\t\tvar chartContainer = $('.chartContainer')[0];\n\t\t\t\t\t\tif ($(chartContainer).is(':visible')) {\n\t\t\t\t\t\t\t$(this).find('.fas').removeClass('fa-chevron-up').addClass('fa-chevron-down');\n\t\t\t\t\t\t\t$('.chartContainer').hide();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$(this).find('.fas').removeClass('fa-chevron-down').addClass('fa-chevron-up');\n\t\t\t\t\t\t\t$('.chartContainer').show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tregisterEvents: function () {\n\t\t\t\t\tthis.chart = $('.sumaryRelatedTimeControl .chartBlock');\n\t\t\t\t\tthis.loadChart();\n\t\t\t\t\tthis.registerSwitch();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\tvar instance = new OSSTimeControl_Calendar_Js();\n\tinstance.registerEvents();\n\twindow.loadInRelationTomeControl = true;\n});\n"],"names":["_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","len","length","arr2","r","l","t","Symbol","iterator","e","u","a","f","next","done","push","value","return","isArray","jQuery","document","ready","$","window","loadInRelationTomeControl","Class","chart","loadChart","data","val","jdata","JSON","parse","datasets","datalabels","font","weight","color","anchor","align","Chart","find","getContext","type","options","tooltips","callbacks","labelColor","tooltipItem","borderColor","backgroundColor","index","title","_ref","_ref2","label","dataFormatted","legend","display","position","text","maintainAspectRatio","scales","yAxes","ticks","beginAtZero","registerSwitch","on","chartContainer","is","removeClass","addClass","hide","show","registerEvents","instance","OSSTimeControl_Calendar_Js"],"mappings":";;AAAA,kKACA,YAAY,CAAC,SAAAA,eAAAC,GAAA,CAAAC,CAAA,CAAAC,CAAAA,OAAAA,eAAA,CAAAF,GAAA,GAAAG,qBAAA,CAAAH,GAAA,CAAAC,CAAA,GAAAG,2BAAA,CAAAJ,GAAA,CAAAC,CAAA,CAAAI,EAAAA,gBAAA,YAAAA,gBAAA,EAAA,CAAA,MAAA,IAAAC,SAAA,CAAAF,2IAAAA,CAAAA,CAAAA,SAAAA,2BAAAA,CAAAG,CAAA,CAAAC,MAAA,KAAAD,CAAA,CAAA,CAAA,GAAA,QAAA,EAAA,OAAAA,CAAA,CAAAE,OAAAA,iBAAA,CAAAF,CAAA,CAAAC,MAAA,CAAA,CAAA,IAAAE,CAAA,CAAAC,MAAA,CAAAC,SAAA,CAAAC,QAAA,CAAA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