framework/extensions/statistics/js/dist/admin.js

2 lines
62 KiB
JavaScript
Raw Normal View History

module.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=8)}([function(t,e){t.exports=flarum.core.compat["admin/app"]},function(t,e){t.exports=flarum.core.compat["common/utils/abbreviateNumber"]},function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e){t.exports=flarum.core.compat["admin/components/DashboardPage"]},function(t,e){t.exports=flarum.core.compat["admin/components/DashboardWidget"]},function(t,e){t.exports=flarum.core.compat["common/components/SelectDropdown"]},function(t,e){t.exports=flarum.core.compat["common/components/Button"]},function(t,e){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,e,i){"use strict";i.r(e);var n=i(0),s=i.n(n),a=i(2),r=i(3),o=i.n(r);function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,l(t,e)}var u=i(4),h=i.n(u),d=i(5),p=i.n(d),f=i(6),v=i.n(f),g=i(7),y=i.n(g),b=i(1),x=i.n(b);function w(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function A(t){var e=t.getBoundingClientRect();return{top:e.top+(document.documentElement.scrollTop||document.body.scrollTop),left:e.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}}w.create=function(t,e){var i=document.createElement(t);for(var n in e){var s=e[n];if("inside"===n)w(s).appendChild(i);else if("around"===n){var a=w(s);a.parentNode.insertBefore(i,a),i.appendChild(a)}else"styles"===n?"object"==typeof s&&Object.keys(s).map((function(t){i.style[t]=s[t]})):n in i?i[n]=s:i.setAttribute(n,s)}return i};var P={margins:{top:10,bottom:10,left:20,right:20},paddings:{top:20,bottom:40,left:30,right:10},baseHeight:240,titleHeight:20,legendHeight:30,titleFontSize:12};function k(t){return t.titleHeight+t.margins.top+t.paddings.top}function M(t){return t.margins.left+t.paddings.left}function T(t){return t.margins.top+t.margins.bottom+t.paddings.top+t.paddings.bottom+t.titleHeight+t.legendHeight}function L(t){return t.margins.left+t.margins.right+t.paddings.left+t.paddings.right}var C=["line","bar"],D=["light-blue","blue","violet","red","orange","yellow","green","light-green","purple","magenta","light-grey","dark-grey"],N={bar:D,line:D,pie:D,percentage:D,heatmap:["#ebedf0","#c6e48b","#7bc96f","#239a3b","#196127"],donut:D},S=Math.PI/180,O=function(){function t(t){var e=t.parent,i=void 0===e?null:e,n=t.colors,s=void 0===n?[]:n;this.parent=i,this.colors=s,this.titleName="",this.titleValue="",this.listValues=[],this.titleValueFirst=0,this.x=0,this.y=0,this.top=0,this.left=0,this.setup()}var e=t.prototype;return e.setup=function(){this.makeTooltip()},e.refresh=function(){this.fill(),this.calcPosition()},e.makeTooltip=function(){var t=this;this.container=w.create("div",{inside:this.parent,className:"graph-svg-tip comparison",innerHTML:'<span class="title"></span>\n\t\t\t\t<ul class="data-point-list"></ul>\n\t\t\t\t<div class="svg-pointer"></div>'}),this.hideTip(),this.title=this.container.querySelector(".title"),this.dataPointList=this.container.querySelector(".data-point-list"),this.parent.addEventListener("mouseleave",(function(){t.hideTip()}))},e.fill=function(){var t,e=this;this.index&&this.container.setAttribute("dat
//# sourceMappingURL=admin.js.map