2024-07-19 17:52:16 +02:00
|
|
|
{"version":3,"file":"report-viewer-components.min.js","sources":["../src/report-viewer-components.js"],"sourcesContent":["/* eslint no-var: \"error\"*/\n/* eslint no-console: \"off\"*/\n/* eslint no-unused-vars: warn */\n/* eslint max-len: [\"error\", { \"code\": 160 }] */\n/* eslint promise/no-nesting: \"off\" */\n/* eslint max-depth: [\"error\", 6] */\n/* eslint no-trailing-spaces: warn */\n/* eslint-env es6*/\n\nimport {SimpleLine} from './simpleline/simpleline';\nimport {loadStrings} from './util/string-helper';\nimport {formatDate, formatDatetime, studyplanPageTiming, studyplanTiming} from './util/date-helper';\nimport {addBrowserButtonEvent} from './util/browserbuttonevents';\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\nimport {svgarcpath} from './util/svgarc';\nimport Debugger from './util/debugger';\nimport Config from 'core/config';\nimport {processStudyplan, objCopy} from './studyplan-processor';\nimport TSComponents from './treestudyplan-components';\nimport FitTextVue from './util/fittext-vue';\n\n\n// Make π available as a constant\nconst π = Math.PI;\n// Gravity value for arrow lines - determines how much a line is pulled in the direction of the start/end before changing direction\nconst LINE_GRAVITY = 1.3;\n\n/**\n * Studyline is not enrollable\n * @var int\n */\nconst ENROLLABLE_NONE = 0;\n\n/**\n * Studyline can be enrolled into by the student\n * @var int\n */\nconst ENROLLABLE_SELF = 1;\n\n/**\n * Studyline can be enrolled into by specific role(s)\n * @var int\n */\nconst ENROLLABLE_ROLE = 2;\n\n/**\n * Studyline can be enrolled by user and/or role\n * @var int\n */\nconst ENROLLABLE_SELF_ROLE = 3;\n\n\nexport default {\n install(Vue/* ,options */) {\n Vue.use(TSComponents);\n Vue.use(FitTextVue);\n let debug = new Debugger(\"treestudyplan-viewer\");\n\n let lastCaller = null;\n /**\n * Scroll current period into view\n * @param {*} handle A key to pass so subsequent calls with the same key won't trigger (always triggers when null or undefined)\n */\n function scrollCurrentIntoView(handle) {\n const elScrollContainer = document.querySelector(\".r-studyplan-scrollable\");\n const elCurrentHeader = elScrollContainer.querySelector(\".s-studyline-header-period.current\");\n\n if (elCurrentHeader && ((!handle) || (handle != lastCaller))) {\n lastCaller = handle;\n elCurrentHeader.scrollIntoView({\n behavior: \"smooth\",\n block: \"start\",\n inline: \"center\",\n });\n }\n }\n\n let strings = loadStrings({\n report: {\n loading: \"loadinghelp@core\",\n 'studyplan_past': \"studyplan_past\",\n 'studyplan_present': \"studyplan_present\",\n 'studyplan_future': \"studyplan_future\",\n back: \"back\",\n },\n invalid: {\n error: 'error',\n },\n grading: {\n ungraded: \"ungraded\",\n graded: \"graded\",\n allgraded: \"allgraded\",\n unsubmitted: \"unsubmitted\",\n nogrades: \"nogrades\",\n unknown: \"unknown\",\n },\n completion: {\n completed: \"completion_completed\",\n incomplete: \"completion_incomplete\",\n 'completed_pass': \"completion_passed\",\n 'completed_fail': \"completion_failed\",\n ungraded: \"ungraded\",\n 'aggregation_all': \"aggregation_all\",\n 'aggregation_any': \"aggregation_any\",\n 'aggregation_one': \"aggregation_one\",\n 'aggregation_overall_all': \"aggregation_overall_all\",\n 'aggregation_overall_any': \"aggregation_overall_any\",\n 'aggregation_overall_one': \"aggregation_overall_one\",\n 'comple
|