Skip to content
Snippets Groups Projects
Commit 37fe354a authored by mperezsa's avatar mperezsa
Browse files

Deleted NMP 3.0 Moodle Pluggin/fliplearning/amd/build/.gitkeep, NMP 3.0 Moodle...

Deleted NMP 3.0 Moodle Pluggin/fliplearning/amd/build/.gitkeep, NMP 3.0 Moodle Pluggin/fliplearning/amd/.gitkeep, NMP 3.0 Moodle Pluggin/fliplearning/amd/alertify.min.js, NMP 3.0 Moodle Pluggin/fliplearning/amd/alertify.min.js.map, NMP 3.0 Moodle Pluggin/fliplearning/amd/assignments.min.js, NMP 3.0 Moodle Pluggin/fliplearning/amd/assignments.min.js.map, NMP 3.0 Moodle Pluggin/fliplearning/amd/axios.min.js, NMP 3.0 Moodle Pluggin/fliplearning/amd/axios.min.js.map, NMP 3.0 Moodle Pluggin/fliplearning/amd/chartdynamic.min.js, NMP 3.0 Moodle Pluggin/fliplearning/amd/chartdynamic.min.js.map, NMP 3.0 Moodle Pluggin/fliplearning/amd/chartstatic.min.js, NMP 3.0 Moodle Pluggin/fliplearning/amd/chartstatic.min.js.map, NMP 3.0 Moodle Pluggin/fliplearning/.gitkeep, NMP 3.0 Moodle Pluggin/fliplearning/ajax.php, NMP 3.0 Moodle Pluggin/.gitkeep files
parent 3691241b
Branches
Tags
No related merge requests found
Showing
with 0 additions and 340 deletions
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Ajax Script
*
* @package local_fliplearning
* @copyright 2020 Edisson Sigua <edissonf.sigua@gmail.com>, Bryan Aguilar <bryan.aguilar6174@gmail.com>
* @author Edisson Sigua, Bryan Aguilar
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('AJAX_SCRIPT', true);
require_once(dirname(__FILE__) . '/../../config.php');
require_once(dirname(__FILE__) . '/locallib.php');
global $USER, $COURSE, $DB;
$userid = required_param('userid', PARAM_INT);
$courseid = required_param('courseid', PARAM_INT);
$COURSE = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$USER = $DB->get_record('user', array('id' => $userid), '*', MUST_EXIST);
require_login($COURSE, false);
$context = context_course::instance($courseid);
require_capability('local/fliplearning:ajax', $context);
$beginDate = optional_param('beginDate', false, PARAM_TEXT);
$lastDate = optional_param('lastDate', false, PARAM_TEXT);
$sectionname = optional_param('sectionname', false, PARAM_TEXT);
$actiontype = optional_param('actiontype', false, PARAM_TEXT);
$objectType = optional_param('objectType', false, PARAM_TEXT);
$objectName = optional_param('objectName', false, PARAM_TEXT);
$objectDescription = optional_param('objectDescription', false, PARAM_TEXT);
$currentUrl = optional_param('currentUrl', false, PARAM_TEXT);
$scriptname = optional_param('scriptname', false, PARAM_ALPHA);
$action = optional_param('action', false ,PARAM_ALPHA);
$weeks = optional_param('weeks', false, PARAM_RAW);
$profile = optional_param('profile', false, PARAM_RAW);
$weekcode = optional_param('weekcode', false, PARAM_INT);
$groupid = optional_param('groupid', null, PARAM_INT);
$subject = optional_param('subject', false ,PARAM_TEXT);
$recipients = optional_param('recipients', false ,PARAM_TEXT);
$text = optional_param('text', false ,PARAM_TEXT);
$moduleid = optional_param('moduleid', false ,PARAM_INT);
$modulename = optional_param('modulename', false ,PARAM_TEXT);
$newinstance = optional_param('newinstance', false, PARAM_BOOL);
$params = array();
$func = null;
if($action == 'saveconfigweek') {
array_push($params, $weeks);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $newinstance);
if($weeks && $courseid && $userid){
$func = "local_fliplearning_save_weeks_config";
}
} elseif ($action == 'changegroup') {
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $groupid);
if($courseid && $userid){
$func = "local_fliplearning_change_group";
}
} elseif($action == 'worksessions') {
array_push($params, $weekcode);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $profile);
if($weekcode && $courseid && $userid && $profile){
$func = "local_fliplearning_get_sessions";
}
} elseif($action == 'time') {
array_push($params, $weekcode);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $profile);
if($weekcode && $courseid && $userid && $profile){
$func = "local_fliplearning_get_inverted_time";
}
} elseif($action == 'assignments') {
array_push($params, $weekcode);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $profile);
if($weekcode && $courseid && $userid && $profile){
$func = "local_fliplearning_get_assignments_submissions";
}
} elseif($action == 'sendmail') {
array_push($params, $COURSE);
array_push($params, $USER);
array_push($params, $subject);
array_push($params, $recipients);
array_push($params, $text);
array_push($params, $moduleid);
array_push($params, $modulename);
if($subject && $recipients && $text){
$func = "local_fliplearning_send_email";
}
} elseif($action == 'quiz') {
array_push($params, $weekcode);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $profile);
if($weekcode && $courseid && $userid && $profile){
$func = "local_fliplearning_get_quiz_attempts";
}
} elseif($action == 'dropoutdata') {
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $profile);
if($courseid && $userid && $profile){
$func = "local_fliplearning_generate_dropout_data";
}
} elseif($action == 'studentsessions') {
array_push($params, $weekcode);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $profile);
if($weekcode && $courseid && $userid && $profile){
$func = "local_fliplearning_get_student_sessions";
}
} elseif($action =='downloadMOODLElogs') {
array_push($params, $beginDate);
array_push($params, $lastDate);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $currentUrl);
if($lastDate && $beginDate && $courseid && $userid && $currentUrl) {
$func = "local_fliplearning_downloadMoodleLogs";
}
} elseif($action == 'downloadNMPlogs') {
array_push($params, $beginDate);
array_push($params, $lastDate);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $currentUrl);
if($lastDate && $beginDate && $courseid && $userid && $currentUrl) {
$func = "local_fliplearning_logsNMP";
}
} elseif($action == 'addLogs') {
array_push($params, $sectionname);
array_push($params, $actiontype);
array_push($params, $courseid);
array_push($params, $userid);
array_push($params, $objectType);
array_push($params, $objectName);
array_push($params, $currentUrl);
array_push($params, $objectDescription);
if($courseid && $userid && $sectionname && $actiontype && $objectType && $objectName && $objectDescription && $currentUrl) {
$func = "local_fliplearning_addLogs";
}
}
if(isset($params) && isset($func)){
call_user_func_array($func, $params);
}else{
$message = get_string('api_invalid_data', 'local_fliplearning');
local_fliplearning_ajax_response(array($message), 400);
}
function local_fliplearning_logsNMP($beginDate, $lastDate, $courseid, $userid, $currentUrl) {
$logs = new \local_fliplearning\logs($courseid, $userid);
$logs->addLogsNMP("downloaded", "logfile", "LOGFILES", "nmp", $currentUrl, "File that contains all the activities performed on the moodle course in a time interval");
$filename = $logs->searchLogsNMP($beginDate,$lastDate);
local_fliplearning_ajax_response(array("filename"=>$filename));
}
function local_fliplearning_save_weeks_config($weeks, $courseid, $userid, $newinstance){
$weeks = json_decode($weeks);
$configweeks = new \local_fliplearning\configweeks($courseid, $userid);
if($newinstance){
$configweeks->create_instance();
}
$configweeks->last_instance();
$configweeks->save_weeks($weeks);
$configweeks = new \local_fliplearning\configweeks($courseid, $userid);
local_fliplearning_ajax_response(["settings" => $configweeks->get_settings()]);
}
function local_fliplearning_change_group($courseid, $userid, $groupid){
set_time_limit(300);
global $DB;
if(is_null($groupid)){
$groupid = 0;
}
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$user = $DB->get_record('user', array('id' => $userid), '*', MUST_EXIST);
$group_manager = new \local_fliplearning\group_manager($course, $user);
$participants = new \local_fliplearning\course_participant($user->id, $course->id);
$groups = array_values($participants->current_user_groups_with_all_group($course->groupmode));
$selectedgroupid = $group_manager->selected_group()->groupid;
$groups = local_fliplearning_add_selected_property($groups, $selectedgroupid);
$group_manager->set_group($groupid);
$groups = local_fliplearning_get_groups($course, $user);
local_fliplearning_ajax_response(array("groups" => $groups));
}
function local_fliplearning_get_sessions($weekcode, $courseid, $userid, $profile){
set_time_limit(300);
$reports = new \local_fliplearning\teacher($courseid, $userid);
$indicators = $reports->get_sessions($weekcode);
$body = array( "indicators" => $indicators );
local_fliplearning_ajax_response($body);
}
function local_fliplearning_get_inverted_time($weekcode, $courseid, $userid, $profile){
set_time_limit(300);
if($profile == "teacher"){
$reports = new \local_fliplearning\teacher($courseid, $userid);
}else{
$reports = new \local_fliplearning\student($courseid, $userid);
}
$inverted_time = $reports->inverted_time($weekcode);
$body = array(
"inverted_time" => $inverted_time,
);
local_fliplearning_ajax_response($body);
}
function local_fliplearning_get_assignments_submissions($weekcode, $courseid, $userid, $profile){
set_time_limit(300);
if($profile == "teacher"){
$reports = new \local_fliplearning\teacher($courseid, $userid);
}else{
$reports = new \local_fliplearning\student($courseid, $userid);
}
$submissions = $reports->assignments_submissions($weekcode);
$access = $reports->resources_access($weekcode);
$body = array(
"submissions" => $submissions,
"access" => $access,
);
local_fliplearning_ajax_response($body);
}
function local_fliplearning_send_email($course, $user, $subject, $recipients, $text, $moduleid, $modulename){
set_time_limit(300);
$email = new \local_fliplearning\email($course, $user);
$email->sendmail($subject, $recipients, $text, $moduleid, $modulename);
$body = array(
"data" => [$subject, $recipients, $text, $moduleid],
);
local_fliplearning_ajax_response($body);
}
function local_fliplearning_get_quiz_attempts($weekcode, $courseid, $userid, $profile){
set_time_limit(300);
if($profile == "teacher"){
$reports = new \local_fliplearning\teacher($courseid, $userid);
}else{
$reports = new \local_fliplearning\student($courseid, $userid);
}
$quiz = $reports->quiz_attempts($weekcode);
$body = array(
"quiz" => $quiz,
);
local_fliplearning_ajax_response($body);
}
function local_fliplearning_generate_dropout_data($courseid, $userid, $profile){
set_time_limit(300);
if($profile == "teacher"){
$dropout = new \local_fliplearning\dropout($courseid, $userid);
$dropout->generate_data();
local_fliplearning_ajax_response([], "ok", true, 200);
}else{
local_fliplearning_ajax_response([], "", false, 400);
}
}
function local_fliplearning_get_student_sessions($weekcode, $courseid, $userid, $profile){
set_time_limit(300);
$reports = new \local_fliplearning\student($courseid, $userid);
$indicators = $reports->get_sessions($weekcode, false);
$body = array(
"indicators" => $indicators,
);
local_fliplearning_ajax_response($body);
}
function local_fliplearning_downloadMoodleLogs($beginDate, $lastDate, $courseid, $userid, $currentUrl) {
$logs = new \local_fliplearning\logs($courseid, $userid);
$logs->addLogsNMP("downloaded", "logfile", "LOGFILES", "moodle", $currentUrl, "File that contains all the activities performed on the Note My Progress plugin in a time interval");
$filename = $logs->searchLogsMoodle($beginDate, $lastDate);
local_fliplearning_ajax_response(array("filename"=>$filename));
}
function local_fliplearning_addLogs($sectionname, $actiontype, $courseid, $userid, $objectType, $objectName, $currentUrl, $objectDescription) {
$logs = new \local_fliplearning\logs($courseid, $userid);
$logs->addLogsNMP($actiontype, $objectType, $sectionname, $objectName, $currentUrl, $objectDescription);
local_fliplearning_ajax_response(array("ok"=>"ok"));
}
\ No newline at end of file
define ("local_fliplearning/alertify",["local_fliplearning/config","alertify"],function(a,b){return b});
//# sourceMappingURL=alertify.min.js.map
{"version":3,"sources":["../src/alertify.js"],"names":["define","unused","alertify"],"mappings":"AAAAA,OAAM,+BAAC,CAAC,2BAAD,CAA8B,UAA9B,CAAD,CAA4C,SAASC,CAAT,CAAiBC,CAAjB,CAA2B,CACrE,MAAOA,CAAAA,CACV,CAFC,CAAN","sourcesContent":["define(['local_fliplearning/config', 'alertify'], function(unused, alertify) {\r\n return alertify;\r\n }\r\n);"],"file":"alertify.min.js"}
\ No newline at end of file
define(["local_fliplearning/vue","local_fliplearning/vuetify","local_fliplearning/axios","local_fliplearning/moment","local_fliplearning/pagination","local_fliplearning/chartdynamic","local_fliplearning/pageheader","local_fliplearning/emailform","local_fliplearning/helpdialog"],function(s,e,t,i,n,o,a,r,c){"use strict";return{init:function(i){s.use(e),s.component("pagination",n),s.component("chart",o),s.component("pageheader",a),s.component("emailform",r),s.component("helpdialog",c);let l=new s({delimiters:["[[","]]"],el:"#submissions",vuetify:new e,data:()=>({dialog:!1,selected_users:[],modulename:"",moduleid:!1,strings:i.strings,groups:i.groups,userid:i.userid,courseid:i.courseid,timezone:i.timezone,render_has:i.profile_render,scriptname:i.scriptname,loading:!1,errors:[],pages:i.pages,submissions:i.submissions,email_strings:i.strings.email_strings,access:i.access,assigns_submissions_colors:i.assigns_submissions_colors,access_content_colors:i.access_content_colors,access_chart_categories:[],access_chart_series:[],access_chart_users:[],help_dialog:!1,help_contents:[],email_object_name:""}),beforeMount(){this.generate_access_content_data()},mounted(){document.querySelector("#sessions-loader").style.display="none",document.querySelector("#submissions").style.display="block",setTimeout(function(){l.setGraphicsEventListeners()},1e3)},methods:{get_help_content(){let s=[];return s.push({title:this.strings.section_help_title,description:this.strings.section_help_description}),s},update_interactions(s){this.loading=!0,this.errors=[];let e={action:"assignments",userid:this.userid,courseid:this.courseid,weekcode:s.weekcode,profile:this.render_has};return t({method:"get",url:M.cfg.wwwroot+"/local/fliplearning/ajax.php",params:e}).then(s=>{200==s.status&&s.data.ok?(this.submissions=s.data.data.submissions,this.access=s.data.data.access,this.generate_access_content_data()):this.error_messages.push(this.strings.error_network)}).catch(s=>{this.errors.push(this.strings.api_error_network)}).finally(()=>{this.loading=!1,l.addLogsIntoDB("viewed","week_"+s.weekcode,"week_section","Week section that allows you to obtain information on a specific week"),l.setGraphicsEventListeners()}),this.data},build_assigns_submissions_chart(){let s=new Object;return s.chart={type:"column",backgroundColor:null,style:{fontFamily:"poppins"}},s.title={text:null},s.colors=this.assigns_submissions_colors,s.xAxis={categories:this.submissions.categories,crosshair:!0},s.yAxis={min:0,title:{text:this.strings.assignsubs_chart_yaxis},allowDecimals:!1},s.tooltip={formatter:function(){let s=this.x.split("</b>");s=(s=(s=s[0]||"").split("<b>"))[1]||"";let e=this.series.name,t=this.y,i=l.strings.students_text,n=l.strings.send_mail;return 1==t&&(i=l.strings.student_text),"<b>"+s+"</b><br/><b>"+e+": </b>"+t+" "+i+"<br/>"+n}},s.plotOptions={series:{cursor:"pointer",point:{events:{click:function(){l.email_object_name="assigns_submissions";let s=this.category.split("</b>");s=(s=(s=s[0]||"").split("<b>"))[1]||"",l.email_strings.subject=l.email_strings.subject_prefix+" - "+s;let e=this.x,t=this.series.colorIndex;l.dialog=!0,l.selected_users=l.submissions.users[e][t],l.moduleid=l.submissions.modules[e],l.modulename="assign",l.scriptname="test"}}}}},s.series=this.submissions.data,s},build_access_content_chart(){let s=new Object;return s.chart={type:"bar",backgroundColor:null,style:{fontFamily:"poppins"}},s.title={text:null},s.colors=this.access_content_colors,s.xAxis={categories:this.access_chart_categories,title:{text:null},crosshair:!0},s.yAxis={min:0,title:{text:this.strings.access_chart_yaxis_label},labels:{overflow:"justify"},allowDecimals:!1},s.tooltip={formatter:function(){let s=this.x,e=this.series.name,t=this.y,i=l.strings.students_text,n=l.strings.send_mail;return 1==t&&(i=l.strings.student_text),"<b>"+s+"</b><br/><b>"+e+": </b>"+t+" "+i+"<br/>"+n}},s.plotOptions={bar:{dataLabels:{enabled:!1}},series:{cursor:"pointer",point:{events:{click:function(){l.email_object_name="access_content";let s=this.category;l.email_strings.subject=l.email_strings.subject_prefix+" - "+s;let e=this.x,t=this.series.colorIndex,i=l.get_users(l.access_chart_users[e][t]);l.selected_users=i;let n=l.get_moduletype(this.category);l.modulename=n.type,l.moduleid=n.id,l.dialog=!0,l.scriptname="test"}}}}},s.series=this.access_chart_series,s},update_dialog(s){this.dialog=s},generate_access_content_data(){let s=[];this.access.users.forEach(e=>{s.push(Number(e.id))});let e=[];this.access.types.forEach(s=>{s.show&&e.push(s.type)});let t=[];this.access.modules.forEach(s=>{e.includes(s.type)&&t.push(s)});let i=[],n=[],o=[],a=[];t.forEach(e=>{i.push(e.name);let t=e.users,r=s.filter(s=>!t.includes(s));o.push(t.length),a.push(r.length),n.push([t,r])});let r=[{name:this.strings.access,data:o},{name:this.strings.no_access,data:a}];this.access_chart_categories=i,this.access_chart_series=r,this.access_chart_users=n},get_users(s){let e=[];return this.access.users.forEach(t=>{let i=Number(t.id);s.includes(i)&&e.push(t)}),e},get_moduletype(s){let e;return this.access.modules.forEach(t=>{t.name===s&&(e=t)}),e},open_chart_help(s){let e=[];var t="",i="",n="",o="";"assigns_submissions"==s?(e.push({title:this.strings.assigns_submissions_help_title,description:this.strings.assigns_submissions_help_description_p1}),e.push({description:this.strings.assigns_submissions_help_description_p2}),t="viewed",n="help",i="assigns_submissions",o="Help section that provides information about the invested time chart",l.addLogsIntoDB(t,i,n,o)):"access_content"==s&&(e.push({title:this.strings.access_content_help_title,description:this.strings.access_content_help_description_p1}),e.push({description:this.strings.access_content_help_description_p2}),t="viewed",n="help",i="access_content",o="Help section that provides information about the sessions per hour chart",l.addLogsIntoDB(t,i,n,o)),this.help_contents=e,this.help_contents.length&&(this.help_dialog=!0)},update_help_dialog(s){this.help_dialog=s},get_timezone(){return`${this.strings.ss_change_timezone} ${this.timezone}`},setGraphicsEventListeners(){let s=document.querySelectorAll(".highcharts-container");s.length<1?setTimeout(l.setGraphicsEventListeners,500):(s[0].id="submissions",s[1].id="accessContent",s.forEach(s=>{s.addEventListener("mouseenter",l.addLogsViewGraphic)}))},addLogsViewGraphic(s){event.stopPropagation();var e="",t="",i="",n="";switch(s.target.id){case"submissions":e="viewed",t="assigns_submissions",i="chart",n="Chart showing the work submited by the students";break;case"accessContent":e="viewed",t="access_content",i="chart",n="Chart showing the course content accessed by the students";break;default:e="viewed",t="",i="chart",n="A chart"}l.addLogsIntoDB(e,t,i,n)},addLogsIntoDB(s,e,n,o){let a={courseid:i.courseid,userid:i.userid,action:"addLogs",sectionname:"TASKS_MONITORING",actiontype:s,objectType:n,objectName:e,currentUrl:document.location.href,objectDescription:o};t({method:"get",url:M.cfg.wwwroot+"/local/fliplearning/ajax.php",params:a}).then(s=>{200==s.status&&s.data.ok}).catch(s=>{})}}})}}});
//# sourceMappingURL=assignments.min.js.map
This diff is collapsed.
define ("local_fliplearning/axios",["local_fliplearning/config","axios"],function(a,b){return b});
//# sourceMappingURL=axios.min.js.map
{"version":3,"sources":["../src/axios.js"],"names":["define","unused","axios"],"mappings":"AAAAA,OAAM,4BAAC,CAAC,2BAAD,CAA8B,OAA9B,CAAD,CAAyC,SAASC,CAAT,CAAiBC,CAAjB,CAAwB,CAC/D,MAAOA,CAAAA,CACV,CAFC,CAAN","sourcesContent":["define(['local_fliplearning/config', 'axios'], function(unused, axios) {\r\n return axios;\r\n }\r\n);"],"file":"axios.min.js"}
\ No newline at end of file
define(["highcharts","highcharts/highcharts-3d","highcharts/highcharts-more","highcharts/modules/heatmap","highcharts/modules/exporting","highcharts/modules/export-data","highcharts/modules/accessibility","highcharts/modules/no-data-to-display"],function(t){return{template:'<div v-bind:id="container"></div>',props:["container","chart","lang"],data:()=>({}),mounted(){let o=this;this.lang&&t.setOptions({lang:this.lang,credits:{enabled:!1},exporting:{buttons:{contextButton:{menuItems:[{text:this.lang.downloadPNG,onclick:function(){this.exportChart({type:"image/png"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadJPEG,onclick:function(){this.exportChart({type:"image/jpeg"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadPDF,onclick:function(){this.exportChart({type:"application/pdf"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadSVG,onclick:function(){this.exportChart({type:"image/svg+xml"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadXLS,onclick:function(){this.downloadXLS(),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadCSV,onclick:function(){this.downloadCSV(),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}}],symbol:"menuball",symbolStroke:"#118AB2"}}}}),this._highchart=t.chart(this.container,this.chart);let a=this._highchart.legend.allItems,e="",n="",d="",h="";a.forEach(t=>{t.legendGroup.element.addEventListener("click",function(){e="filtered",n=o.$el.id,d="chart",h="Filtered a part of the "+n+" chart","function"==typeof o.$parent.$root.addLogsIntoDB&&o.$parent.$root.addLogsIntoDB(e,n,d,h)})})},watch:{chart:{deep:!0,handler(t){this._highchart.update(t);let o=this._highchart.legend.allItems,a=this,e="",n="",d="",h="";o.forEach(t=>{t.legendGroup.element.addEventListener("click",function(){e="filtered",n=a.$el.id,d="chart",h="Filtered a part of the "+n+" chart","function"==typeof a.$parent.$root.addLogsIntoDB&&a.$parent.$root.addLogsIntoDB(e,n,d,h)})})}}}}});
//# sourceMappingURL=chartdynamic.min.js.map
{"version":3,"sources":["../src/chartdynamic.js"],"names":["define","Highcharts","template","props","data","mounted","lang","setOptions","credits","enabled","exporting","buttons","contextButton","menuItems","text","downloadPNG","onclick","exportChart","type","downloadJPEG","downloadPDF","downloadSVG","downloadXLS","downloadCSV","symbol","symbolStroke","_highchart","chart","container","watch","deep","handler","update"],"mappings":"AAAAA,OAAM,mCAAC,CACC,YADD,CAEC,0BAFD,CAGC,4BAHD,CAIC,4BAJD,CAKC,8BALD,CAMC,gCAND,CAOC,kCAPD,CAQC,uCARD,CAAD,CAUF,SAASC,CAAT,CAAqB,CACrB,MAAO,CACHC,QAAQ,sCADL,CAEHC,KAAK,CAAE,CAAC,WAAD,CAAc,OAAd,CAAuB,MAAvB,CAFJ,CAGHC,IAHG,gBAGI,CACH,MAAO,EACV,CALE,CAMHC,OANG,mBAMO,CACL,KAAKC,IAAN,EAAeL,CAAU,CAACM,UAAX,CAAsB,CACjCD,IAAI,CAAE,KAAKA,IADsB,CAEjCE,OAAO,CAAE,CAAEC,OAAO,GAAT,CAFwB,CAGjCC,SAAS,CAAE,CACPC,OAAO,CAAE,CACLC,aAAa,CAAE,CACXC,SAAS,CAAE,CAAC,CACRC,IAAI,CAAE,KAAKR,IAAL,CAAUS,WADR,CAERC,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,WADO,CAAjB,CAGH,CANO,CAAD,CAOT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUa,YADlB,CAEEH,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,YADO,CAAjB,CAGH,CANH,CAPS,CAcT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUc,WADlB,CAEEJ,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,iBADO,CAAjB,CAGH,CANH,CAdS,CAqBT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUe,WADlB,CAEEL,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,eADO,CAAjB,CAGH,CANH,CArBS,CA4BT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUgB,WADlB,CAEEN,OAAO,CAAE,kBAAY,CACjB,KAAKM,WAAL,EACH,CAJH,CA5BS,CAiCT,CACER,IAAI,CAAE,KAAKR,IAAL,CAAUiB,WADlB,CAEEP,OAAO,CAAE,kBAAY,CACjB,KAAKO,WAAL,EACH,CAJH,CAjCS,CADA,CAwCXC,MAAM,CAAE,UAxCG,CAyCXC,YAAY,CAAE,SAzCH,CADV,CADF,CAHsB,CAAtB,CAAf,CAmDA,KAAKC,UAAL,CAAkBzB,CAAU,CAAC0B,KAAX,CAAiB,KAAKC,SAAtB,CAAiC,KAAKD,KAAtC,CACrB,CA3DE,CA4DHE,KAAK,CAAE,CACHF,KAAK,CAAE,CACHG,IAAI,GADD,CAEHC,OAFG,kBAEKJ,CAFL,CAEY,CACX,KAAKD,UAAL,CAAgBM,MAAhB,CAAuBL,CAAvB,CACH,CAJE,CADJ,CA5DJ,CAsEV,CAjFK,CAAN","sourcesContent":["define([\n 'highcharts',\n 'highcharts/highcharts-3d',\n 'highcharts/highcharts-more',\n 'highcharts/modules/heatmap',\n 'highcharts/modules/exporting',\n 'highcharts/modules/export-data',\n 'highcharts/modules/accessibility',\n 'highcharts/modules/no-data-to-display',\n ],\n function(Highcharts) {\n return {\n template: `<div v-bind:id=\"container\"></div>`,\n props: ['container', 'chart', 'lang'],\n data() {\n return { }\n },\n mounted() {\n (this.lang) && Highcharts.setOptions({\n lang: this.lang,\n credits: { enabled: false },\n exporting: {\n buttons: {\n contextButton: {\n menuItems: [{\n text: this.lang.downloadPNG,\n onclick: function () {\n this.exportChart({\n type: 'image/png'\n });\n }\n },{\n text: this.lang.downloadJPEG,\n onclick: function () {\n this.exportChart({\n type: 'image/jpeg'\n });\n }\n },{\n text: this.lang.downloadPDF,\n onclick: function () {\n this.exportChart({\n type: 'application/pdf'\n });\n }\n },{\n text: this.lang.downloadSVG,\n onclick: function () {\n this.exportChart({\n type: 'image/svg+xml'\n });\n }\n },{\n text: this.lang.downloadXLS,\n onclick: function () {\n this.downloadXLS();\n }\n },{\n text: this.lang.downloadCSV,\n onclick: function () {\n this.downloadCSV();\n }\n }],\n symbol: 'menuball',\n symbolStroke: '#118AB2'\n }\n }\n }\n });\n this._highchart = Highcharts.chart(this.container, this.chart);\n },\n watch: {\n chart: {\n deep: true,\n handler(chart) {\n this._highchart.update(chart);\n },\n }\n }\n\n };\n});"],"file":"chartdynamic.min.js"}
\ No newline at end of file
define(["highcharts","highcharts/highcharts-3d","highcharts/highcharts-more","highcharts/modules/heatmap","highcharts/modules/exporting","highcharts/modules/export-data","highcharts/modules/accessibility","highcharts/modules/no-data-to-display"],function(t){return{template:'<div v-bind:id="container"></div>',props:["container","chart","lang","test"],data:()=>({}),mounted(){let o=this;this.lang&&t.setOptions({lang:this.lang,credits:{enabled:!1},exporting:{buttons:{contextButton:{menuItems:[{text:this.lang.downloadPNG,onclick:function(){this.exportChart({type:"image/png"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadJPEG,onclick:function(){this.exportChart({type:"image/jpeg"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadPDF,onclick:function(){this.exportChart({type:"application/pdf"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadSVG,onclick:function(){this.exportChart({type:"image/svg+xml"}),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadXLS,onclick:function(){this.downloadXLS(),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}},{text:this.lang.downloadCSV,onclick:function(){this.downloadCSV(),o.$parent.$root.addLogsIntoDB("downloaded",o.$el.id,"chart","A chart")}}],symbol:"menuball",symbolStroke:"#118AB2"}}}}),this._highchart=t.chart(this.container,this.chart);let a=this._highchart.legend.allItems,n="",e="",d="",h="";a.forEach(t=>{t.legendGroup.element.addEventListener("click",function(){n="filtered",e=o.$el.id,d="chart",h="Filtered a part of the "+e+" chart","function"==typeof o.$parent.$root.addLogsIntoDB&&o.$parent.$root.addLogsIntoDB(n,e,d,h)})})}}});
//# sourceMappingURL=chartstatic.min.js.map
{"version":3,"sources":["../src/chartstatic.js"],"names":["define","Highcharts","template","props","data","mounted","lang","setOptions","credits","enabled","exporting","buttons","contextButton","menuItems","text","downloadPNG","onclick","exportChart","type","downloadJPEG","downloadPDF","downloadSVG","downloadXLS","downloadCSV","symbol","symbolStroke","_highchart","chart","container"],"mappings":"AAAAA,OAAM,kCAAC,CACC,YADD,CAEC,0BAFD,CAGC,4BAHD,CAIC,4BAJD,CAKC,8BALD,CAMC,gCAND,CAOC,kCAPD,CAQC,uCARD,CAAD,CASF,SAASC,CAAT,CAAqB,CACjB,MAAO,CACHC,QAAQ,sCADL,CAEHC,KAAK,CAAE,CAAC,WAAD,CAAc,OAAd,CAAuB,MAAvB,CAFJ,CAGHC,IAHG,gBAGI,CACH,MAAO,EACV,CALE,CAMHC,OANG,mBAMO,CACL,KAAKC,IAAN,EAAeL,CAAU,CAACM,UAAX,CAAsB,CACjCD,IAAI,CAAE,KAAKA,IADsB,CAEjCE,OAAO,CAAE,CAAEC,OAAO,GAAT,CAFwB,CAGjCC,SAAS,CAAE,CACPC,OAAO,CAAE,CACLC,aAAa,CAAE,CACXC,SAAS,CAAE,CAAC,CACRC,IAAI,CAAE,KAAKR,IAAL,CAAUS,WADR,CAERC,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,WADO,CAAjB,CAGH,CANO,CAAD,CAOT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUa,YADlB,CAEEH,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,YADO,CAAjB,CAGH,CANH,CAPS,CAcT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUc,WADlB,CAEEJ,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,iBADO,CAAjB,CAGH,CANH,CAdS,CAqBT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUe,WADlB,CAEEL,OAAO,CAAE,kBAAY,CACjB,KAAKC,WAAL,CAAiB,CACbC,IAAI,CAAE,eADO,CAAjB,CAGH,CANH,CArBS,CA4BT,CACEJ,IAAI,CAAE,KAAKR,IAAL,CAAUgB,WADlB,CAEEN,OAAO,CAAE,kBAAY,CACjB,KAAKM,WAAL,EACH,CAJH,CA5BS,CAiCT,CACER,IAAI,CAAE,KAAKR,IAAL,CAAUiB,WADlB,CAEEP,OAAO,CAAE,kBAAY,CACjB,KAAKO,WAAL,EACH,CAJH,CAjCS,CADA,CAwCXC,MAAM,CAAE,UAxCG,CAyCXC,YAAY,CAAE,SAzCH,CADV,CADF,CAHsB,CAAtB,CAAf,CAmDA,KAAKC,UAAL,CAAkBzB,CAAU,CAAC0B,KAAX,CAAiB,KAAKC,SAAtB,CAAiC,KAAKD,KAAtC,CACrB,CA3DE,CA6DV,CAvEC,CAAN","sourcesContent":["define([\r\n 'highcharts',\r\n 'highcharts/highcharts-3d',\r\n 'highcharts/highcharts-more',\r\n 'highcharts/modules/heatmap',\r\n 'highcharts/modules/exporting',\r\n 'highcharts/modules/export-data',\r\n 'highcharts/modules/accessibility',\r\n 'highcharts/modules/no-data-to-display'],\r\n function(Highcharts) {\r\n return {\r\n template: `<div v-bind:id=\"container\"></div>`,\r\n props: ['container', 'chart', 'lang'],\r\n data() {\r\n return { }\r\n },\r\n mounted() {\r\n (this.lang) && Highcharts.setOptions({\r\n lang: this.lang,\r\n credits: { enabled: false },\r\n exporting: {\r\n buttons: {\r\n contextButton: {\r\n menuItems: [{\r\n text: this.lang.downloadPNG,\r\n onclick: function () {\r\n this.exportChart({\r\n type: 'image/png'\r\n });\r\n }\r\n },{\r\n text: this.lang.downloadJPEG,\r\n onclick: function () {\r\n this.exportChart({\r\n type: 'image/jpeg'\r\n });\r\n }\r\n },{\r\n text: this.lang.downloadPDF,\r\n onclick: function () {\r\n this.exportChart({\r\n type: 'application/pdf'\r\n });\r\n }\r\n },{\r\n text: this.lang.downloadSVG,\r\n onclick: function () {\r\n this.exportChart({\r\n type: 'image/svg+xml'\r\n });\r\n }\r\n },{\r\n text: this.lang.downloadXLS,\r\n onclick: function () {\r\n this.downloadXLS();\r\n }\r\n },{\r\n text: this.lang.downloadCSV,\r\n onclick: function () {\r\n this.downloadCSV();\r\n }\r\n }],\r\n symbol: 'menuball',\r\n symbolStroke: '#118AB2'\r\n }\r\n }\r\n }\r\n });\r\n this._highchart = Highcharts.chart(this.container, this.chart);\r\n }\r\n };\r\n });"],"file":"chartstatic.min.js"}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment