Added built files so update from git is an option

This commit is contained in:
PMKuipers 2023-08-04 22:39:58 +02:00
parent 6d2c6d2c7f
commit 0e10bb7733
61 changed files with 129 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
/.vs /.vs
/node_modules /node_modules
/amd/build
/build /build

12
amd/build/bootstrap-vue.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/cfg-grades.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/cfg-grades",["exports","core/str","core/ajax","./debugger","./string-helper"],(function(_exports,_str,_ajax,_debugger,_stringHelper){var obj;function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function(){it=it.call(o)},n:function(){var step=it.next();return normalCompletion=step.done,step},e:function(_e2){didErr=!0,err=_e2},f:function(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=function(){var _step,intRx=/\d/,integerChange=function(event){event.key.length>1||intRx.test(event.key)||event.preventDefault()},_iterator=_createForOfIteratorHelper(document.querySelectorAll('input[type="number"][step="1"][min="0"]'));try{for(_iterator.s();!(_step=_iterator.n()).done;){_step.value.addEventListener("keydown",integerChange)}}catch(err){_iterator.e(err)}finally{_iterator.f()}var _step2,decimal=/^[0-9]*?\.[0-9]*?$/,_intRx=/\d/,floatChange=function(event){event.key.length>1||"."===event.key&&!event.currentTarget.value.match(decimal)||_intRx.test(event.key)||event.preventDefault()},_iterator2=_createForOfIteratorHelper(document.querySelectorAll('input[type="number"][min="0"]:not([step])'));try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){_step2.value.addEventListener("keydown",floatChange)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}var _step3,_iterator3=_createForOfIteratorHelper(document.querySelectorAll('input[type="text"].float'));try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){_step3.value.addEventListener("keydown",floatChange)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}},new(_debugger=(obj=_debugger)&&obj.__esModule?obj:{default:obj}).default("treestudyplan-config-grades").enable()}));
//# sourceMappingURL=cfg-grades.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"cfg-grades.min.js","sources":["../src/cfg-grades.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint no-unused-vars: \"off\" */\n/*eslint linebreak-style: \"off\" */\n/*eslint no-trailing-spaces: \"off\" */\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\n\nimport {get_string,get_strings} from 'core/str';\nimport {call} from 'core/ajax';\nimport Debugger from './debugger';\n\nimport {load_strings} from './string-helper';\n\nlet debug = new Debugger(\"treestudyplan-config-grades\");\ndebug.enable();\n\n/*\nlet strings = load_strings({\n studyplan: {\n studyplan_select_placeholder: 'studyplan_select_placeholder',\n },\n});\n*/\n\n/**\n * Initialize grade cfg page\n */\nexport function init() {\n { const\n intRx = /\\d/,\n integerChange = (event) => {\n if ( (event.key.length > 1) || intRx.test(event.key)\n ) { \n return; \n }\n event.preventDefault();\n };\n \n for (let input of document.querySelectorAll( 'input[type=\"number\"][step=\"1\"][min=\"0\"]' )){\n input.addEventListener(\"keydown\", integerChange);\n } \n \n }\n\n { const\n decimal= /^[0-9]*?\\.[0-9]*?$/,\n intRx = /\\d/,\n floatChange = (event) => {\n if ( (event.key.length > 1) || ( (event.key === \".\") && (!event.currentTarget.value.match(decimal)) )\n || intRx.test(event.key)\n ) { \n return; \n }\n event.preventDefault();\n };\n \n for (let input of document.querySelectorAll( 'input[type=\"number\"][min=\"0\"]:not([step])' )){\n input.addEventListener(\"keydown\", floatChange);\n } \n for (let input of document.querySelectorAll( 'input[type=\"text\"].float' )){\n input.addEventListener(\"keydown\", floatChange);\n } \n \n }\n\n\n}\n\n"],"names":["intRx","integerChange","event","key","length","test","preventDefault","document","querySelectorAll","addEventListener","decimal","floatChange","currentTarget","value","match","enable"],"mappings":"kgDA8BQA,MAAQ,KACRC,cAAgB,SAACC,OACTA,MAAMC,IAAIC,OAAS,GAAMJ,MAAMK,KAAKH,MAAMC,MAIhDD,MAAMI,uDAGQC,SAASC,iBAAkB,+FAA4C,aACjFC,iBAAiB,UAAWR,6EAMlCS,QAAS,qBACTV,OAAQ,KACRW,YAAc,SAACT,OACPA,MAAMC,IAAIC,OAAS,GAAuB,MAAdF,MAAMC,MAAkBD,MAAMU,cAAcC,MAAMC,MAAMJ,UACjFV,OAAMK,KAAKH,MAAMC,MAI1BD,MAAMI,wDAGQC,SAASC,iBAAkB,oGAA8C,cACnFC,iBAAiB,UAAWE,mHAElBJ,SAASC,iBAAkB,mFAA6B,cAClEC,iBAAiB,UAAWE,oEA/C9B,yEAAa,+BACnBI"}

3
amd/build/css-calc.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/css-calc",["exports"],(function(_exports){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.Units=_exports.UnitRegexpStr=_exports.UnitRegexpGM=_exports.UnitRegexp=_exports.Relative=_exports.Absolute=void 0,_exports.calc=calc,_exports.calcCtx=calcCtx,_exports.convert=convert,_exports.convertAllInStr=convertAllInStr;var Absolute={px:1,cm:96/2.54,mm:96/25.4,Q:96/101.6,in:96,pc:16,pt:96/72};_exports.Absolute=Absolute;var Relative={vh:function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?ctx.viewportHeight:window.innerHeight)/100*count},vw:function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?ctx.viewportWidth:window.innerWidth)/100*count},vmin:function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?Math.min(ctx.viewportWidth,ctx.viewportHeight):Math.min(window.innerWidth,window.innerHeight))/100*count},vmax:function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?Math.max(ctx.viewportWidth,ctx.viewportHeight):Math.max(window.innerWidth,window.innerHeight))/100*count},rem:function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?ctx.htmlFontSize:parseFloat(window.getComputedStyle(document.querySelector("html")).fontSize))*count},"%w":function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?ctx.width:document.body.clientWidth)/100*count},"%h":function(){var count=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,ctx=arguments.length>1?arguments[1]:void 0;return(ctx?ctx.height:document.body.clientHeight)/100*count}};_exports.Relative=Relative;var Units=_objectSpread(_objectSpread({},Relative),Absolute);_exports.Units=Units;var UnitRegexpStr="(?:\\s|^)(\\d*(?:\\.\\d+)?)(".concat(Object.keys(Units).join("|"),")(?:\\s|$|\\n)");_exports.UnitRegexpStr=UnitRegexpStr;var UnitRegexp=new RegExp(UnitRegexpStr);_exports.UnitRegexp=UnitRegexp;var UnitRegexpGM=new RegExp(UnitRegexpStr,"gm");function convert(count,fromUnits,toUnits){var ctx=arguments.length>3&&void 0!==arguments[3]?arguments[3]:calcCtx(),baseUnit=Units[fromUnits],basePx="function"==typeof baseUnit?baseUnit(count,ctx):baseUnit*count,dstUnit=Units[toUnits];return basePx/("function"==typeof dstUnit?dstUnit(1,ctx):dstUnit)}function convertAllInStr(expr,toUnits){var ctx=arguments.length>2&&void 0!==arguments[2]?arguments[2]:calcCtx();return expr.replace(UnitRegexpGM,(function(substr,count,unit){return convert(parseFloat(count),unit,toUnits,ctx).toString()}))}function calcCtx(el){if(el){var rect=el.getBoundingClientRect();return{width:rect.width,height:rect.height,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,htmlFontSize:parseFloat(window.getComputedStyle(document.querySelector("html")).fontSize)}}return{width:document.body.clientWidth,height:document.body.clientHeight,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,htmlFontSize:parseFloat(window.getComputedStyle(document.querySelector("html")).fontSize)}}function calc(expression,el_ctx,ctx){return void 0===el_ctx?ctx=calcCtx():el_ctx instanceof HTMLElement?ctx||(ctx=calcCtx(el_ctx)):ctx=el_ctx,eval(convertAllInStr(expression,"px",ctx))}_exports.UnitRegexpGM=UnitRegexpGM}));
//# sourceMappingURL=css-calc.min.js.map

File diff suppressed because one or more lines are too long

3
amd/build/debounce.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/debounce",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.debounce=function(func,wait,immediate){var timeout;return function(){var context=this,args=arguments,callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout((function(){timeout=null,immediate||func.apply(context,args)}),wait),callNow&&func.apply(context,args)}}}));
//# sourceMappingURL=debounce.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"debounce.min.js","sources":["../src/debounce.js"],"sourcesContent":["/*eslint no-var: \"error\"*/\n/*eslint no-console: \"off\"*/\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\n\n/**\n * Limits consecutive function calls.\n * @param {function} func The function to wrap.\n * @param {int} wait The time limit between function calls.\n * @param {bool} immediate perform the actual function call first rather than after the timout passed.\n * @returns {function} a new function that wraps the debounce.\n */\nfunction debounce(func, wait, immediate) {\n let timeout;\n return function() {\n let context = this, args = arguments;\n let later = function() {\n timeout = null;\n if (!immediate){ func.apply(context, args); }\n };\n let callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow){ func.apply(context, args); }\n };\n}\n\nexport {debounce};"],"names":["func","wait","immediate","timeout","context","this","args","arguments","callNow","clearTimeout","setTimeout","apply"],"mappings":"yJAakBA,KAAMC,KAAMC,eACtBC,eACG,eACCC,QAAUC,KAAMC,KAAOC,UAKvBC,QAAUN,YAAcC,QAC5BM,aAAaN,SACbA,QAAUO,YANE,WACRP,QAAU,KACLD,WAAYF,KAAKW,MAAMP,QAASE,QAIbL,MACxBO,SAAUR,KAAKW,MAAMP,QAASE"}

3
amd/build/debugger.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/debugger",[],(function(){return function(handle){var output_enabled=!1;return{write:function(){if(output_enabled){var args=Array.prototype.slice.call(arguments);args.unshift(handle+": "),console.info.apply(console,args)}},info:function(){if(output_enabled){var args=Array.prototype.slice.call(arguments);args.unshift(handle+": "),console.info.apply(console,args)}},warn:function(){if(output_enabled){var args=Array.prototype.slice.call(arguments);args.unshift(handle+": "),console.warn.apply(console,args)}},error:function(){if(output_enabled){var args=Array.prototype.slice.call(arguments);args.unshift(handle+": "),console.error.apply(console,args)}},enable:function(){output_enabled=!0},disable:function(){output_enabled=!1}}}}));
//# sourceMappingURL=debugger.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"debugger.min.js","sources":["../src/debugger.js"],"sourcesContent":["/*eslint no-var: \"error\"*/\n/*eslint no-console: \"off\"*/\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\n\ndefine([], function () {\n\n return (function (handle) {\n let output_enabled = false;\n\n return {\n write: function debugger_write() {\n if (output_enabled) {\n let args = Array.prototype.slice.call(arguments);\n args.unshift(handle + \": \");\n console.info.apply(console, args);\n }\n },\n info: function debugger_info() {\n if (output_enabled) {\n let args = Array.prototype.slice.call(arguments);\n args.unshift(handle + \": \");\n console.info.apply(console, args);\n }\n },\n warn: function debugger_warn() {\n if (output_enabled) {\n let args = Array.prototype.slice.call(arguments);\n args.unshift(handle + \": \");\n console.warn.apply(console, args);\n }\n },\n error: function debugger_error() {\n if (output_enabled) {\n let args = Array.prototype.slice.call(arguments);\n args.unshift(handle + \": \");\n console.error.apply(console, args);\n }\n },\n enable: function debugger_enable() {\n output_enabled = true;\n },\n\n disable: function debugger_disable() {\n output_enabled = false;\n }\n };\n\n });\n});"],"names":["define","handle","output_enabled","write","args","Array","prototype","slice","call","arguments","unshift","console","info","apply","warn","error","enable","disable"],"mappings":"AAMAA,sCAAO,IAAI,kBAEC,SAAUC,YACVC,gBAAiB,QAEd,CACHC,MAAO,cACCD,eAAgB,KACZE,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQT,OAAS,MACtBU,QAAQC,KAAKC,MAAMF,QAASP,QAGpCQ,KAAM,cACEV,eAAgB,KACZE,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQT,OAAS,MACtBU,QAAQC,KAAKC,MAAMF,QAASP,QAGpCU,KAAM,cACEZ,eAAgB,KACZE,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQT,OAAS,MACtBU,QAAQG,KAAKD,MAAMF,QAASP,QAGpCW,MAAO,cACCb,eAAgB,KACZE,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQT,OAAS,MACtBU,QAAQI,MAAMF,MAAMF,QAASP,QAGrCY,OAAQ,WACJd,gBAAiB,GAGrBe,QAAS,WACLf,gBAAiB,IAKhC"}

3
amd/build/downloader.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/downloader",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.download=function(filename,text,type){null==type&&(type="text/plain");var pom=document.createElement("a");if(pom.setAttribute("href","data:"+type+";charset=utf-8,"+encodeURIComponent(text)),pom.setAttribute("download",filename),document.createEvent){var event=document.createEvent("MouseEvents");event.initEvent("click",!0,!0),pom.dispatchEvent(event)}else pom.click()},_exports.upload=function(onready,accept){var input=document.createElement("input");input.type="file",Array.isArray(accept)?accept.count>0&&(input.accept=accept.join(", ")):void 0!==accept&&(input.accept=accept);if(input.onchange=function(){var files=Array.from(input.files);if(files.length>0){var file=files[0],reader=new FileReader;reader.onload=function(e){var contents=e.target.result;onready instanceof Function&&onready(file,contents)},reader.readAsText(file)}},document.createEvent){var event=document.createEvent("MouseEvents");event.initEvent("click",!0,!0),input.dispatchEvent(event)}else input.click()}}));
//# sourceMappingURL=downloader.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"downloader.min.js","sources":["../src/downloader.js"],"sourcesContent":["/*eslint no-console: \"off\"*/\n\n/**\n * Save a piece of text to file as if it was downloaded\n * @param {string} filename\n * @param {string} text\n * @param {string} type\n */\nexport function download(filename, text, type) {\n if(undefined == type) { type = \"text/plain\"; }\n var pom = document.createElement('a');\n pom.setAttribute('href', 'data:'+type+';charset=utf-8,' + encodeURIComponent(text));\n pom.setAttribute('download', filename);\n\n if (document.createEvent) {\n var event = document.createEvent('MouseEvents');\n event.initEvent('click', true, true);\n pom.dispatchEvent(event);\n }\n else {\n pom.click();\n }\n}\n\n/**\n * This callback type is called `requestCallback` and is displayed as a global symbol.\n *\n * @callback fileOpenedCallback\n * @param {File} file File name\n * @param {string} content File Contents\n */\n\n/**\n * Open a file from disk and read its contents\n * @param {fileOpenedCallback} onready Callback to run when file is opened\n * @param {Array} accept Array of mime types that the file dialog will accept\n */\nexport function upload(onready,accept) {\n let input = document.createElement('input');\n input.type = 'file';\n if(Array.isArray(accept)){\n if(accept.count > 0){\n input.accept = accept.join(\", \");\n }\n } else if (undefined !== accept){\n input.accept = accept;\n }\n input.onchange = () => {\n let files = Array.from(input.files);\n if(files.length > 0){\n let file = files[0];\n var reader = new FileReader();\n reader.onload = function(e) {\n var contents = e.target.result;\n if(onready instanceof Function){\n onready(file,contents);\n }\n };\n reader.readAsText(file);\n }\n };\n\n if (document.createEvent) {\n var event = document.createEvent('MouseEvents');\n event.initEvent('click', true, true);\n input.dispatchEvent(event);\n }\n else {\n input.click();\n }\n}"],"names":["filename","text","type","undefined","pom","document","createElement","setAttribute","encodeURIComponent","createEvent","event","initEvent","dispatchEvent","click","onready","accept","input","Array","isArray","count","join","onchange","files","from","length","file","reader","FileReader","onload","e","contents","target","result","Function","readAsText"],"mappings":"2JAQyBA,SAAUC,KAAMC,MAClCC,MAAaD,OAAQA,KAAO,kBAC3BE,IAAMC,SAASC,cAAc,QACjCF,IAAIG,aAAa,OAAQ,QAAQL,KAAK,kBAAoBM,mBAAmBP,OAC7EG,IAAIG,aAAa,WAAYP,UAEzBK,SAASI,YAAa,KAClBC,MAAQL,SAASI,YAAY,eACjCC,MAAMC,UAAU,SAAS,GAAM,GAC/BP,IAAIQ,cAAcF,YAGlBN,IAAIS,kCAiBWC,QAAQC,YACvBC,MAAQX,SAASC,cAAc,SACnCU,MAAMd,KAAO,OACVe,MAAMC,QAAQH,QACVA,OAAOI,MAAQ,IACdH,MAAMD,OAASA,OAAOK,KAAK,YAExBjB,IAAcY,SACrBC,MAAMD,OAASA,WAEnBC,MAAMK,SAAW,eACLC,MAAUL,MAAMM,KAAKP,MAAMM,UAC5BA,MAAME,OAAS,EAAE,KACZC,KAAOH,MAAM,GACbI,OAAS,IAAIC,WACjBD,OAAOE,OAAS,SAASC,OACjBC,SAAWD,EAAEE,OAAOC,OACrBlB,mBAAmBmB,UAClBnB,QAAQW,KAAKK,WAGrBJ,OAAOQ,WAAWT,QAI1BpB,SAASI,YAAa,KAClBC,MAAQL,SAASI,YAAY,eACjCC,MAAMC,UAAU,SAAS,GAAM,GAC/BK,MAAMJ,cAAcF,YAGpBM,MAAMH"}

3
amd/build/leaderline.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
define("local_treestudyplan/lib-hide-primarynav-items",["exports"],(function(_exports){function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.hide_primary=function(hrefs){var element=document.createElement("style");document.head.appendChild(element);var sheet=element.sheet;("string"==typeof hrefs||hrefs instanceof String)&&(hrefs=[hrefs]);if("object"===_typeof(hrefs)&&Array.isArray(hrefs))for(var ix in hrefs){var href=hrefs[ix],style='\n .primary-navigation li.nav-item > a[href*="'.concat(href,'"] {\n display: none;\n }\n ');sheet.insertRule(style,sheet.cssRules.length)}}}));
//# sourceMappingURL=lib-hide-primarynav-items.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"lib-hide-primarynav-items.min.js","sources":["../src/lib-hide-primarynav-items.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint no-unused-vars: \"off\" */\n/*eslint linebreak-style: \"off\" */\n/*eslint no-trailing-spaces: \"off\" */\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\n\n/**\n * Hide a primary navigation item by href\n * @param {string|Array} hrefs The link that should be hidden\n */\nexport function hide_primary(hrefs) {\n let element = document.createElement('style');\n document.head.appendChild(element);\n let sheet = element.sheet;\n\n if(typeof hrefs === 'string' || hrefs instanceof String){\n hrefs = [hrefs];\n }\n\n if(typeof hrefs === 'object' && Array.isArray(hrefs)){\n for(const ix in hrefs){\n const href = hrefs[ix];\n let style = `\n .primary-navigation li.nav-item > a[href*=\"${href}\"] {\n display: none;\n }\n `;\n\n sheet.insertRule(style, sheet.cssRules.length);\n }\n }\n}\n"],"names":["hrefs","element","document","createElement","head","appendChild","sheet","String","_typeof","Array","isArray","ix","href","style","insertRule","cssRules","length"],"mappings":"wbAY6BA,WACrBC,QAAUC,SAASC,cAAc,SACrCD,SAASE,KAAKC,YAAYJ,aACtBK,MAAQL,QAAQK,OAEA,iBAAVN,OAAsBA,iBAAiBO,UAC7CP,MAAQ,CAACA,WAGO,WAAjBQ,QAAOR,QAAsBS,MAAMC,QAAQV,WACtC,IAAMW,MAAMX,MAAM,KACZY,KAAOZ,MAAMW,IACfE,6EAC6CD,kFAKjDN,MAAMQ,WAAWD,MAAOP,MAAMS,SAASC"}

3
amd/build/modedit-modal.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/modedit-modal",["exports","core/fragment","./string-helper","core/ajax","core/notification","core/templates"],(function(_exports,_fragment,_stringHelper,_ajax,_notification,_templates){var obj;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_notification=(obj=_notification)&&obj.__esModule?obj:{default:obj};var _default={install:function(Vue){var strings=(0,_stringHelper.load_strings)({editmod:{save$core:"save$core",cancel$core:"cancel$core"}});Vue.component("s-edit-mod",{props:{cmid:{type:Number},coursectxid:{type:Number},title:{type:String,default:""},genericonly:{type:Boolean,default:!1}},data:function(){return{content:"",text:strings.editmod}},computed:{},methods:{openForm:function(){this.$refs.editormodal.show()},onShown:function(){var self=this,params={cmid:this.cmid};console.info("Loading form"),(0,_fragment.loadFragment)("local_treestudyplan","mod_edit_form",this.coursectxid,params).then((function(html,js){(0,_templates.replaceNodeContents)(self.$refs.content,html,js)})).catch(_notification.default.exception)},onSave:function(){var self=this,form=this.$refs.content.getElementsByTagName("form")[0];form.dispatchEvent(new Event("save-form-state"));var formdata=new FormData(form),data=new URLSearchParams(formdata).toString();(0,_ajax.call)([{methodname:"local_treestudyplan_submit_cm_editform",args:{cmid:this.cmid,formdata:data}}])[0].done((function(){self.$emit("saved",formdata)})).fail(_notification.default.exception)}},template:'\n <span class=\'s-edit-mod\'><a href=\'#\' @click.prevent="openForm"><slot><i class="fa fa-cog"></i></slot></a>\n <b-modal \n ref="editormodal"\n scrollable\n centered\n size="xl"\n id="\'modal-cm-\'+cmid"\n @shown="onShown"\n @ok="onSave"\n :title="title"\n :ok-title="text.save$core"\n ><div :class="\'s-edit-mod-form \'+ (genericonly?\'genericonly\':\'\')" ref="content"\n ><div class="d-flex justify-content-center mb-3"><b-spinner variant="primary"></b-spinner></div\n ></div\n ></b-modal>\n </span>\n '})}};return _exports.default=_default,_exports.default}));
//# sourceMappingURL=modedit-modal.min.js.map

File diff suppressed because one or more lines are too long

3
amd/build/page-edit-plan.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/page-invitemanager.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/page-invitemanager",["jquery","core/str","core/ajax","core/modal_factory","core/modal_events","local_treestudyplan/handlers","local_treestudyplan/debugger"],(function($,str,ajax,ModalFactory,ModalEvents,handlers,Debugger){var debug=new Debugger("treestudyplan");return debug.enable(),{init:function(){$(".path-local-treestudyplan a.m-action-confirm").on("click",(function(e){e.preventDefault();var $link=$(e.currentTarget),href=$link.attr("data-actionhref"),text=$link.attr("data-confirmtext"),oktext=$link.attr("data-confirmbtn");debug.info("Ok",oktext),null==oktext&&(oktext=str.get_string("ok"));var title=$link.attr("data-confirmtitle");debug.info("Title",title),null==title&&(title=str.get_string("confirm")),debug.info("Link, href, text",$link,href,text),ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL,title:title,body:text}).then((function(modal){modal.setSaveButtonText(oktext),modal.getRoot().on(ModalEvents.save,(function(){window.location=href})),$(modal.modal).css("max-width","345px"),modal.show()}))}))}}}));
//# sourceMappingURL=page-invitemanager.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"page-invitemanager.min.js","sources":["../src/page-invitemanager.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint no-unused-vars: \"off\" */\n/*eslint linebreak-style: \"off\" */\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\n\ndefine(['jquery', 'core/str', 'core/ajax', 'core/modal_factory', 'core/modal_events',\n 'local_treestudyplan/handlers', 'local_treestudyplan/debugger'],\nfunction ($, str, ajax, ModalFactory, ModalEvents,\n handlers, Debugger) {\n let debug = new Debugger(\"treestudyplan\");\n debug.enable();\n let self = {\n init: function init() {\n $('.path-local-treestudyplan a.m-action-confirm').on('click', function (e) {\n e.preventDefault();\n let $link = $(e.currentTarget);\n let href = $link.attr('data-actionhref');\n let text = $link.attr('data-confirmtext');\n let oktext = $link.attr('data-confirmbtn');\n debug.info(\"Ok\", oktext);\n if (undefined == oktext) { oktext = str.get_string('ok'); }\n let title = $link.attr('data-confirmtitle');\n debug.info(\"Title\", title);\n if (undefined == title) { title = str.get_string('confirm'); }\n\n debug.info(\"Link, href, text\", $link, href, text);\n\n ModalFactory.create({\n type: ModalFactory.types.SAVE_CANCEL,\n title: title,\n body: text,\n }).then(function (modal) {\n modal.setSaveButtonText(oktext);\n\n let root = modal.getRoot();\n root.on(ModalEvents.save, function () {\n window.location = href;\n });\n\n $(modal.modal).css(\"max-width\", \"345px\");\n modal.show();\n });\n });\n },\n\n\n };\n return self;\n});"],"names":["define","$","str","ajax","ModalFactory","ModalEvents","handlers","Debugger","debug","enable","init","on","e","preventDefault","$link","currentTarget","href","attr","text","oktext","info","undefined","get_string","title","create","type","types","SAVE_CANCEL","body","then","modal","setSaveButtonText","getRoot","save","window","location","css","show"],"mappings":"AAOAA,gDAAO,CAAC,SAAU,WAAY,YAAa,qBAAsB,oBACzD,+BAAgC,iCACxC,SAAUC,EAAGC,IAAKC,KAAMC,aAAcC,YAC5BC,SAAUC,cACZC,MAAQ,IAAID,SAAS,wBACzBC,MAAMC,SACK,CACPC,KAAM,WACFT,EAAE,gDAAgDU,GAAG,SAAS,SAAUC,GACpEA,EAAEC,qBACEC,MAAQb,EAAEW,EAAEG,eACZC,KAAOF,MAAMG,KAAK,mBAClBC,KAAOJ,MAAMG,KAAK,oBAClBE,OAASL,MAAMG,KAAK,mBACxBT,MAAMY,KAAK,KAAMD,QACbE,MAAaF,SAAUA,OAASjB,IAAIoB,WAAW,WAC/CC,MAAQT,MAAMG,KAAK,qBACvBT,MAAMY,KAAK,QAASG,OAChBF,MAAaE,QAASA,MAAQrB,IAAIoB,WAAW,YAEjDd,MAAMY,KAAK,mBAAoBN,MAAOE,KAAME,MAE5Cd,aAAaoB,OAAO,CAChBC,KAAMrB,aAAasB,MAAMC,YACzBJ,MAAOA,MACPK,KAAMV,OACPW,MAAK,SAAUC,OACdA,MAAMC,kBAAkBZ,QAEbW,MAAME,UACZrB,GAAGN,YAAY4B,MAAM,WACtBC,OAAOC,SAAWnB,QAGtBf,EAAE6B,MAAMA,OAAOM,IAAI,YAAa,SAChCN,MAAMO,cAQzB"}

3
amd/build/page-myreport.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/page-myreport",["exports","core/ajax","core/notification","./vue","./report-viewer-components","./treestudyplan-components","./debugger","./studyplan-processor","./portal-vue","./bootstrap-vue"],(function(_exports,_ajax,_notification,_vue,_reportViewerComponents,_treestudyplanComponents,_debugger,_studyplanProcessor,_portalVue,_bootstrapVue){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=function(){var type=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"myreport",arg=arguments.length>1?arguments[1]:void 0,app=new _vue.default({el:"#root",data:{studyplans:[]},mounted:function(){var call_method,call_args;"invited"==type?(call_method="local_treestudyplan_get_invited_studyplan",call_args={invitekey:arg}):"other"==type?(call_method="local_treestudyplan_get_user_studyplans",call_args={userid:arg}):"teaching"==type?(call_method="local_treestudyplan_get_teaching_studyplans",call_args={}):(call_method="local_treestudyplan_get_own_studyplan",call_args={}),(0,_ajax.call)([{methodname:call_method,args:call_args}])[0].done((function(response){debug.info("Studyplans:",response);var timingval={future:0,present:1,past:2};response.sort((function(a,b){var timinga=_treestudyplanComponents.default.studyplanTiming(a),timingb=_treestudyplanComponents.default.studyplanTiming(b),t=timingval[timinga]-timingval[timingb];return 0==t&&0==(t=new Date(b.startdate).getTime()-new Date(a.startdate).getTime())&&(t=a.name.localeCompare(b.name)),t})),app.studyplans=(0,_studyplanProcessor.ProcessStudyplans)(response)})).fail(_notification.default.exception)},methods:{}})},_notification=_interopRequireDefault(_notification),_vue=_interopRequireDefault(_vue),_reportViewerComponents=_interopRequireDefault(_reportViewerComponents),_treestudyplanComponents=_interopRequireDefault(_treestudyplanComponents),_debugger=_interopRequireDefault(_debugger),_portalVue=_interopRequireDefault(_portalVue),_bootstrapVue=_interopRequireDefault(_bootstrapVue),_vue.default.use(_reportViewerComponents.default),_vue.default.use(_portalVue.default),_vue.default.use(_bootstrapVue.default);var debug=new _debugger.default("treestudyplan-report");debug.enable()}));
//# sourceMappingURL=page-myreport.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"page-myreport.min.js","sources":["../src/page-myreport.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint no-unused-vars: \"off\" */\n/*eslint linebreak-style: \"off\" */\n/*eslint no-trailing-spaces: \"off\" */\n/*eslint no-console: \"off\" */\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\n\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\nimport Vue from './vue';\nimport RVComponents from './report-viewer-components';\nimport TSComponents from './treestudyplan-components';\nimport Debugger from './debugger';\n\nimport {ProcessStudyplans} from './studyplan-processor';\n\n\nimport PortalVue from './portal-vue';\nimport BootstrapVue from './bootstrap-vue';\nVue.use(RVComponents);\nVue.use(PortalVue);\nVue.use(BootstrapVue);\n\nlet debug = new Debugger(\"treestudyplan-report\");\ndebug.enable();\n\n/**\n * Initialize the Page\n * @param {string} type Type of page to show\n * @param {Object} arg Arguments passed\n */\n export function init(type=\"myreport\",arg) {\n let app = new Vue({\n el: '#root',\n data: {\n \"studyplans\": [],\n },\n mounted() {\n let call_method;\n let call_args;\n if(type == \"invited\"){\n call_method = 'local_treestudyplan_get_invited_studyplan';\n call_args = {\"invitekey\": arg};\n }\n else if(type == \"other\"){\n call_method = 'local_treestudyplan_get_user_studyplans';\n call_args = {\"userid\": arg};\n }\n else if(type == \"teaching\"){\n call_method = 'local_treestudyplan_get_teaching_studyplans';\n call_args = {};\n }\n else{\n call_method = 'local_treestudyplan_get_own_studyplan';\n call_args = {};\n }\n call([{\n methodname: call_method,\n args: call_args\n }])[0].done(function(response){\n debug.info(\"Studyplans:\",response);\n const timingval = { future: 0, present: 1, past: 2, };\n response.sort((a,b) => {\n const timinga = TSComponents.studyplanTiming(a);\n const timingb = TSComponents.studyplanTiming(b);\n\n let t = timingval[timinga] - timingval[timingb];\n if(t == 0){\n // sort by start date if timing is equal\n t = new Date(b.startdate).getTime() - new Date(a.startdate).getTime();\n \n if (t == 0) {\n // sort by name if timing is equal\n t = a.name.localeCompare(b.name);\n }\n }\n return t;\n });\n app.studyplans = ProcessStudyplans(response);\n }).fail(notification.exception); \n \n },\n\n methods: {\n \n },\n });\n\n}\n\n"],"names":["type","arg","app","Vue","el","data","mounted","call_method","call_args","methodname","args","done","response","debug","info","timingval","future","present","past","sort","a","b","timinga","TSComponents","studyplanTiming","timingb","t","Date","startdate","getTime","name","localeCompare","studyplans","fail","notification","exception","methods","use","RVComponents","PortalVue","BootstrapVue","Debugger","enable"],"mappings":"2hBAiCsBA,4DAAK,WAAWC,2CAC9BC,IAAM,IAAIC,aAAI,CACdC,GAAI,QACJC,KAAM,YACY,IAElBC,uBACQC,YACAC,UACO,WAARR,MACCO,YAAc,4CACdC,UAAY,WAAcP,MAEd,SAARD,MACJO,YAAc,0CACdC,UAAY,QAAWP,MAEX,YAARD,MACJO,YAAc,8CACdC,UAAY,KAGZD,YAAc,wCACdC,UAAY,mBAEX,CAAC,CACFC,WAAYF,YACZG,KAAMF,aACN,GAAGG,MAAK,SAASC,UACjBC,MAAMC,KAAK,cAAcF,cACnBG,UAAY,CAAEC,OAAQ,EAAGC,QAAS,EAAGC,KAAM,GACjDN,SAASO,MAAK,SAACC,EAAEC,OACPC,QAAUC,iCAAaC,gBAAgBJ,GACvCK,QAAUF,iCAAaC,gBAAgBH,GAEzCK,EAAIX,UAAUO,SAAWP,UAAUU,gBAC/B,GAALC,GAIU,IAFTA,EAAI,IAAIC,KAAKN,EAAEO,WAAWC,UAAY,IAAIF,KAAKP,EAAEQ,WAAWC,aAIxDH,EAAIN,EAAEU,KAAKC,cAAcV,EAAES,OAG5BJ,KAEXxB,IAAI8B,YAAa,yCAAkBpB,aACpCqB,KAAKC,sBAAaC,YAIzBC,QAAS,yYAhEbC,IAAIC,8CACJD,IAAIE,iCACJF,IAAIG,2BAEJ3B,MAAQ,IAAI4B,kBAAS,wBACzB5B,MAAM6B"}

3
amd/build/page-view-plan copy.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/page-view-plan.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/portal-vue.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/primary-nav-tools.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/primary-nav-tools",["exports","./debugger"],(function(_exports,_debugger){var obj;function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.hide_primary=function(hrefs){var element=document.createElement("style");document.head.appendChild(element);var sheet=element.sheet;("string"==typeof hrefs||hrefs instanceof String)&&(hrefs=[hrefs]);if("object"===_typeof(hrefs)&&Array.isArray(hrefs))for(var ix in hrefs){var href=hrefs[ix];debug.info("Hiding",href);var style='\n .primary-navigation li.nav-item > a[href*="'.concat(href,'"] {\n display: none;\n }\n ');debug.info("Adding style",style),sheet.insertRule(style,sheet.cssRules.length)}debug.info("stylesheet",sheet)};var debug=new(_debugger=(obj=_debugger)&&obj.__esModule?obj:{default:obj}).default("primary-nav-tools");debug.enable()}));
//# sourceMappingURL=primary-nav-tools.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"primary-nav-tools.min.js","sources":["../src/primary-nav-tools.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint no-unused-vars: \"off\" */\n/*eslint linebreak-style: \"off\" */\n/*eslint no-trailing-spaces: \"off\" */\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n// You can call it anything you like\nimport Debugger from './debugger';\nlet debug = new Debugger(\"primary-nav-tools\");\ndebug.enable();\n\n/**\n * Hide a primary navigation item by href\n * @param {string|Array} hrefs The link that should be hidden\n */\nexport function hide_primary(hrefs) {\n let element = document.createElement('style');\n document.head.appendChild(element);\n let sheet = element.sheet;\n\n if(typeof hrefs === 'string' || hrefs instanceof String){\n hrefs = [hrefs];\n }\n\n if(typeof hrefs === 'object' && Array.isArray(hrefs)){\n for(const ix in hrefs){\n const href = hrefs[ix];\n debug.info(\"Hiding\",href);\n let style = `\n .primary-navigation li.nav-item > a[href*=\"${href}\"] {\n display: none;\n }\n `;\n debug.info(\"Adding style\",style);\n\n sheet.insertRule(style, sheet.cssRules.length);\n }\n }\n debug.info(\"stylesheet\",sheet);\n}\n"],"names":["hrefs","element","document","createElement","head","appendChild","sheet","String","_typeof","Array","isArray","ix","href","debug","info","style","insertRule","cssRules","length","enable"],"mappings":"+cAe6BA,WACrBC,QAAUC,SAASC,cAAc,SACrCD,SAASE,KAAKC,YAAYJ,aACtBK,MAAQL,QAAQK,OAEA,iBAAVN,OAAsBA,iBAAiBO,UAC7CP,MAAQ,CAACA,WAGO,WAAjBQ,QAAOR,QAAsBS,MAAMC,QAAQV,WACtC,IAAMW,MAAMX,MAAM,KACZY,KAAOZ,MAAMW,IACnBE,MAAMC,KAAK,SAASF,UAChBG,6EAC6CH,kFAIjDC,MAAMC,KAAK,eAAeC,OAE1BT,MAAMU,WAAWD,MAAOT,MAAMW,SAASC,QAG/CL,MAAMC,KAAK,aAAaR,YA9BxBO,MAAQ,yEAAa,qBACzBA,MAAMM"}

3
amd/build/reflect-metadata.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/simpleline.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/string-helper.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/string-helper",["exports","core/str"],(function(_exports,_str){function format_date(d,short){d instanceof Date||(d=new Date(d));var monthformat="short";return short&&(monthformat="numeric"),d.toLocaleDateString(document.documentElement.lang,{year:"numeric",month:monthformat,day:"numeric"})}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.datespaninfo=function(first,last){first instanceof Date||(first=new Date(first));last instanceof Date||(last=new Date(last));first.setHours(0),first.setMinutes(0),first.setSeconds(0),first.setMilliseconds(0),last.setHours(23),last.setMinutes(59),last.setSeconds(59),last.setMilliseconds(999);var dayspan=Math.round((last-first+1)/864e5),years=Math.floor(dayspan/365),ydaysleft=dayspan%365,weeks=Math.floor(ydaysleft/7);return{first:first,last:last,totaldays:dayspan,years:years,weeks:weeks,days:ydaysleft%7,formatted:{first:format_date(first),last:format_date(last)}}},_exports.format_date=format_date,_exports.load_stringkeys=function(string_keys){var _loop2=function(idx){var stringkeys=[];for(var i in string_keys[idx]){var parts=string_keys[idx][i].textkey.split("$"),identifier=parts[0],component=parts.length>1?parts[1]:"local_treestudyplan";stringkeys.push({key:identifier,component:component})}(0,_str.get_strings)(stringkeys).then((function(strings){for(var _i in strings){var s=strings[_i];string_keys[idx][_i].text=s}}))};for(var idx in string_keys)_loop2(idx);return string_keys},_exports.load_strings=function(strings){var _loop=function(idx){var stringkeys=[];for(var handle in strings[idx]){var parts=strings[idx][handle].split("$"),identifier=parts[0],component=parts.length>1?parts[1]:"local_treestudyplan";stringkeys.push({key:identifier,component:component})}(0,_str.get_strings)(stringkeys).then((function(str){var i=0;for(var _key in strings[idx])strings[idx][_key]=str[i],i++}))};for(var idx in strings)_loop(idx);return strings}}));
//# sourceMappingURL=string-helper.min.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/studyplan-processor.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/studyplan-processor",["exports"],(function(_exports){function ProcessStudyplan(studyplan){var connections={};for(var ip in studyplan.pages){var page=studyplan.pages[ip];for(var il in page.studylines){var line=page.studylines[il];for(var is in line.slots){var slot=line.slots[is];if(void 0!==slot.competencies)for(var ic in slot.competencies){var itm=slot.competencies[ic];for(var idx in itm.connections.in){var conn=itm.connections.in[idx];conn.id in connections?itm.connections[idx]=connections[conn.id]:connections[conn.id]=conn}for(var _idx in itm.connections.out){var _conn=itm.connections.out[_idx];_conn.id in connections?itm.connections[_idx]=connections[_conn.id]:connections[_conn.id]=_conn}}if(void 0!==slot.filters)for(var ix in slot.filters){var _itm=slot.filters[ix];for(var _idx2 in _itm.connections.in){var _conn2=_itm.connections.in[_idx2];_conn2.id in connections?_itm.connections[_idx2]=connections[_conn2.id]:connections[_conn2.id]=_conn2}for(var _idx3 in _itm.connections.out){var _conn3=_itm.connections.out[_idx3];_conn3.id in connections?_itm.connections[_idx3]=connections[_conn3.id]:connections[_conn3.id]=_conn3}}}}}return studyplan}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.ProcessStudyplan=ProcessStudyplan,_exports.ProcessStudyplans=function(studyplans){for(var isx in studyplans){ProcessStudyplan(studyplans[isx])}return studyplans},_exports.objCopy=function(target,source,fields){for(var ix in fields){var field=fields[ix];target[field]=source[field]}},_exports.transportItem=function(target,source,identifier,param){param||(param="value");var item,itemindex;for(var ix in source)if(source[ix][param]==identifier){item=source[ix],itemindex=ix;break}item&&(target.push(item),source.splice(itemindex,1))}}));
//# sourceMappingURL=studyplan-processor.min.js.map

File diff suppressed because one or more lines are too long

3
amd/build/svgarc.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/svgarc",["exports"],(function(_exports){function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.svgarcpath=_exports.svgarc=void 0;var cos=Math.cos,sin=Math.sin,π=Math.PI,f_matrix_times=function(_ref,_ref2){var _ref3=_slicedToArray(_ref,2),_ref3$=_slicedToArray(_ref3[0],2),a=_ref3$[0],b=_ref3$[1],_ref3$2=_slicedToArray(_ref3[1],2),c=_ref3$2[0],d=_ref3$2[1],_ref4=_slicedToArray(_ref2,2),x=_ref4[0],y=_ref4[1];return[a*x+b*y,c*x+d*y]},f_vec_add=function(_ref5,_ref6){var _ref7=_slicedToArray(_ref5,2),a1=_ref7[0],a2=_ref7[1],_ref8=_slicedToArray(_ref6,2);return[a1+_ref8[0],a2+_ref8[1]]},svgarcpath=function(_ref9,_ref10,_ref11,φ){var _ref12=_slicedToArray(_ref9,2),cx=_ref12[0],cy=_ref12[1],_ref13=_slicedToArray(_ref10,2),rx=_ref13[0],ry=_ref13[1],_ref14=_slicedToArray(_ref11,2),t1=_ref14[0],Δ=_ref14[1];Δ%=2*π;var x,rotMatrix=[[cos(x=φ),-sin(x)],[sin(x),cos(x)]],_f_vec_add2=_slicedToArray(f_vec_add(f_matrix_times(rotMatrix,[rx*cos(t1),ry*sin(t1)]),[cx,cy]),2),sX=_f_vec_add2[0],sY=_f_vec_add2[1],_f_vec_add4=_slicedToArray(f_vec_add(f_matrix_times(rotMatrix,[rx*cos(t1+Δ),ry*sin(t1+Δ)]),[cx,cy]),2),eX=_f_vec_add4[0],eY=_f_vec_add4[1];return"M "+sX+" "+sY+" A "+[rx,ry,φ/(2*π)*360,Δ>π?1:0,Δ>0?1:0,eX,eY].join(" ")};_exports.svgarcpath=svgarcpath;_exports.svgarc=function(_ref15,_ref16,_ref17,φ){var _ref18=_slicedToArray(_ref15,2),cx=_ref18[0],cy=_ref18[1],_ref19=_slicedToArray(_ref16,2),rx=_ref19[0],ry=_ref19[1],_ref20=_slicedToArray(_ref17,2),t1=_ref20[0],Δ=_ref20[1],path_2wk2r=document.createElementNS("http://www.w3.org/2000/svg","path"),d=svgarcpath([cx,cy],[rx,ry],[t1,Δ],φ);return path_2wk2r.setAttribute("d",d),path_2wk2r}}));
//# sourceMappingURL=svgarc.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"svgarc.min.js","sources":["../src/svgarc.js"],"sourcesContent":["/*\nCopyright © 2020 Xah Lee, © 2023 P.M Kuipers\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the “Software”),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\nURL: SVG Circle Arc http://xahlee.info/js/svg_circle_arc.html\n*/\n\nconst cos = Math.cos;\nconst sin = Math.sin;\nconst π = Math.PI;\n\nconst f_matrix_times = (( [[a,b], [c,d]], [x,y]) => [ a * x + b * y, c * x + d * y]);\nconst f_rotate_matrix = (x => [[cos(x),-sin(x)], [sin(x), cos(x)]]);\nconst f_vec_add = (([a1, a2], [b1, b2]) => [a1 + b1, a2 + b2]);\n\n// function modified by pmkuipers for text params\n/**\n * Create svg path text for an arc\n * @param {*} center [cx,cy] center of ellipse\n * @param {*} radius [rx,ry] major minor radius\n * @param {*} angle [t1, Δ] start angle, in radian, angle to sweep, in radian. positive.\n * @param {*} φ rotation on the whole, in radian\n * @returns a SVG path element that represent a ellipse. Text describing the arc path in an svg path element\n */\nconst svgarcpath = (([cx,cy],[rx,ry], [t1, Δ], φ ) => {\n Δ = Δ % (2*π);\n const rotMatrix = f_rotate_matrix (φ);\n const [sX, sY] = ( f_vec_add ( f_matrix_times ( rotMatrix, [rx * cos(t1), ry * sin(t1)] ), [cx,cy] ) );\n const [eX, eY] = ( f_vec_add ( f_matrix_times ( rotMatrix, [rx * cos(t1+Δ), ry * sin(t1+Δ)] ), [cx,cy] ) );\n const fA = ( ( Δ > π ) ? 1 : 0 );\n const fS = ( ( Δ > 0 ) ? 1 : 0 );\n return \"M \" + sX + \" \" + sY + \" A \" + [ rx , ry , φ / (2*π) *360, fA, fS, eX, eY ].join(\" \");\n});\n\n/**\n * Create an svg arc element\n * @param {*} center [cx,cy] center of ellipse\n * @param {*} radius [rx,ry] major minor radius\n * @param {*} angle [t1, Δ] start angle, in radian, angle to sweep, in radian. positive.\n * @param {*} φ rotation on the whole, in radian\n * @returns a SVG path element that represent a ellipse.\n */\nconst svgarc = (([cx,cy],[rx,ry], [t1, Δ], φ ) => {\n const path_2wk2r = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n const d = svgarcpath([cx,cy],[rx,ry], [t1, Δ], φ );\n path_2wk2r.setAttribute(\"d\", d);\n return path_2wk2r;\n});\n\nexport {svgarc, svgarcpath};"],"names":["cos","Math","sin","π","PI","f_matrix_times","a","b","c","d","x","y","f_vec_add","a1","a2","svgarcpath","φ","cx","cy","rx","ry","t1","Δ","rotMatrix","sX","sY","eX","eY","join","path_2wk2r","document","createElementNS","setAttribute"],"mappings":"gyCAoBMA,IAAMC,KAAKD,IACXE,IAAMD,KAAKC,IACXC,EAAIF,KAAKG,GAETC,eAAkB,wFAAIC,YAAEC,+CAAKC,aAAEC,2CAAMC,WAAEC,iBAAO,CAAEL,EAAII,EAAIH,EAAII,EAAGH,EAAIE,EAAID,EAAIE,IAE3EC,UAAa,wDAAEC,YAAIC,gDAAkB,CAACD,YAASC,cAW/CC,WAAc,6BAA2BC,sCAAzBC,aAAGC,6CAAKC,aAAGC,6CAAMC,aAAIC,YACvCA,GAAS,EAAEnB,MAbUO,EAcfa,UAdoB,CAAC,CAACvB,IAAPU,EAccM,IAdCd,IAAIQ,IAAK,CAACR,IAAIQ,GAAIV,IAAIU,gCAevCE,UAAYP,eAAiBkB,UAAW,CAACJ,GAAKnB,IAAIqB,IAAKD,GAAKlB,IAAImB,MAAQ,CAACJ,GAAGC,QAAxFM,kBAAIC,6CACQb,UAAYP,eAAiBkB,UAAW,CAACJ,GAAKnB,IAAIqB,GAAGC,GAAIF,GAAKlB,IAAImB,GAAGC,KAAO,CAACL,GAAGC,QAA5FQ,kBAAIC,wBAGJ,KAAOH,GAAK,IAAMC,GAAK,MAAQ,CAAEN,GAAKC,GAAKJ,GAAK,EAAEb,GAAI,IAF7CmB,EAAInB,EAAM,EAAI,EACdmB,EAAI,EAAM,EAAI,EAC4CI,GAAIC,IAAKC,KAAK,qDAW5E,8BAA2BZ,uCAAzBC,aAAGC,6CAAKC,aAAGC,6CAAMC,aAAIC,YAC7BO,WAAaC,SAASC,gBAAgB,6BAA8B,QACpEtB,EAAIM,WAAW,CAACE,GAAGC,IAAI,CAACC,GAAGC,IAAK,CAACC,GAAIC,GAAIN,UAC/Ca,WAAWG,aAAa,IAAKvB,GACtBoB"}

View File

@ -0,0 +1,3 @@
define("local_treestudyplan/treestudyplan-components",["exports","./string-helper"],(function(_exports,_stringHelper){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var _default={studyplanTiming:function(a){var now=(new Date).getTime(),timing="future";return new Date(a.startdate).getTime()<now&&(timing=a.enddate&&now>new Date(a.enddate).getTime()?"past":"present"),timing},install:function(Vue){var strings=(0,_stringHelper.load_strings)({studyplancard:{open:"open",noenddate:"noenddate"}}),ItemEventBus=new Vue;Vue.component("s-studyplan-card",{props:{value:{type:Object},open:{type:Boolean}},data:function(){return{text:strings.studyplancard}},computed:{timing:function(){var now=(new Date).getTime(),startdate=new Date(this.value.pages[0].startdate).getTime(),enddate=new Date(this.value.pages[0].enddate).getTime(),timing="future";return startdate<now&&(timing=this.value.pages[0].enddate&&now>enddate?"past":"present"),timing},startdate:function(){return(0,_stringHelper.format_date)(this.value.pages[0].startdate)},enddate:function(){return this.value.enddate?(0,_stringHelper.format_date)(this.value.pages[0].enddate):this.text.noenddate}},methods:{onOpenClick:function(e){this.$emit("open",e)}},template:"\n <b-card \n :class=\"'s-studyplan-card timing-' + timing\"\n >\n <template #header></template>\n <b-card-title>\n <a v-if='open' href='#' @click.prevent='onOpenClick($event)'>{{value.name}}</a>\n <template v-else>{{value.name}}</template>\n <slot name='title'></slot>\n </b-card-title>\n {{ value.description }}\n <slot></slot>\n <template #footer>\n <span :class=\"'t-timing-'+timing\" v-html=\"startdate + ' - '+ enddate\"></span>\n <span class=\"s-studyplan-card-buttons\">\n <slot name='footer'></slot>\n <b-button style=\"float:right;\" v-if='open' variant='primary' \n @click.prevent='onOpenClick($event)'>{{ text.open }}</b-button>\n </span>\n </template>\n </b-card>\n "}),Vue.component("s-studyline-header-heading",{props:{},data:function(){return{layerHeights:{}}},created:function(){ItemEventBus.$on("headerHeightChange",this.onHeaderHeightChange)},computed:{},methods:{onHeaderHeightChange:function(newheight){this.$refs.main.style.height="".concat(newheight,"px")}},template:'\n <div class="s-studyline-header-heading" ref="main"></div>\n '}),Vue.component("s-studyline-header-period",{props:{value:{type:Object}},mounted:function(){var self=this;1==self.value.period&&(self.resizeListener=new ResizeObserver((function(){if(self.$refs.main){var size=self.$refs.main.getBoundingClientRect();ItemEventBus.$emit("headerHeightChange",size.height)}})).observe(self.$refs.main))},unmounted:function(){this.resizeListener&&this.resizeListener.disconnect()},computed:{startdate:function(){return(0,_stringHelper.format_date)(this.value.startdate)},enddate:function(){return(0,_stringHelper.format_date)(this.value.enddate)},current:function(){if(this.value&&this.value.startdate&&this.value.enddate){var now=new Date,pstart=new Date(this.value.startdate),pend=new Date(this.value.enddate);return now>=pstart&&now<pend}return!1}},data:function(){return{}},template:'\n <div :class="\'s-studyline-header-period \' + (current?\'current \':\' \')" ref="main"\n ><p><abbr :id="\'s-period-\'+value.id" :title="value.fullname">{{ value.shortname }}</abbr>\n <b-tooltip\n :target="\'s-period-\'+value.id" triggers="hover"\n >{{ value.fullname }}<br>\n <span class="s-studyline-header-period-datespan">\n <span class="date">{{ startdate }}</span> - <span class="date">{{ enddate }}</span>\n </span>\n </b-tooltip>\n <slot></slot\n ><p class="s-studyline-header-period-datespan small">\n <span class="date">{{ startdate }}</span> - <span class="date">{{ enddate }}</span>\n </p>\n </div>\n '})}};return _exports.default=_default,_exports.default}));
//# sourceMappingURL=treestudyplan-components.min.js.map

File diff suppressed because one or more lines are too long

3
amd/build/vue-class-component.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/vue-easy-dnd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/vue-hsluv-picker.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
define("local_treestudyplan/vue-hsluv-picker",["exports","./hsluvpicker"],(function(_exports,_hsluvpicker){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var _default={name:"hsluv-picker",props:{value:{type:String,default:"#cccccc"},nodisplay:{type:Boolean,default:!1},displaysize:{type:String,default:300},horizontal:{type:Boolean,default:!1}},watch:{value:function(newVal){newVal!=this.currentcolor&&(this.$refs.picker.dispatchEvent(new CustomEvent("updatecolor",{detail:newVal})),this.currentcolor=newVal)}},data:function(){return{currentcolor:""}},methods:{onColorChange:function(event){this.currentcolor=event.detail,this.$emit("input",event.detail)}},mounted:function(){this.currentcolor=this.value,(0,_hsluvpicker.InitializePicker)(this.$refs.picker,this.value)},template:'\n <div ref="picker" @colorchange="onColorChange" :class="\'vue-hsluv-picker\'+(horizontal?\' horizontal\':\'\')">\n <div v-if="!nodisplay" class="display">\n <canvas :height="displaysize" :width="displaysize"></canvas>\n </div>\n <table class=\'picker\'>\n <tr class="control-h">\n <td class="cell-input">\n <input type="number" min="0" max="360" step="any" class="counter counter-hue" tabindex="0"/>\n </td>\n <td><div class="range-slider"></div></td>\n <td class="picker-label">H</td>\n </tr>\n <tr class="control-s">\n <td class="cell-input">\n <input type="number" step="any" min="0" max="100" class="counter counter-saturation"/>\n </td>\n <td><div class="range-slider"></div></td>\n <td class="picker-label">S</td>\n </tr>\n <tr class="control-l">\n <td class="cell-input">\n <input type="number" step="any" min="0" max="100" class="counter counter-lightness"/>\n </td>\n <td><div class="range-slider"></div></td>\n <td class="picker-label">L</td>\n </tr>\n <tr>\n <td class="cell-input cell-input-hex">\n <input ref="input" class="input-hex" pattern="#?[0-9a-fA-F]{6}"/>\n </td>\n <td><div class="swatch"></div></td>\n <td></td>\n </tr>\n </table>\n </div>\n </div>\n'};return _exports.default=_default,_exports.default}));
//# sourceMappingURL=vue-hsluv-picker.min.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"vue-hsluv-picker.min.js","sources":["../src/vue-hsluv-picker.js"],"sourcesContent":["/*eslint no-console: \"off\" */\nimport {InitializePicker} from './hsluvpicker';\nexport default {\n name: 'hsluv-picker',\n props: {\n value: {\n type: String,\n default: \"#cccccc\",\n },\n nodisplay: {\n type: Boolean,\n default: false,\n },\n displaysize: {\n type: String,\n default: 300,\n },\n horizontal: {\n type: Boolean,\n default: false,\n }\n },\n watch: {\n value: function(newVal){\n if(newVal != this.currentcolor){\n this.$refs.picker.dispatchEvent(new CustomEvent('updatecolor', {detail: newVal}));\n this.currentcolor = newVal;\n }\n }\n },\n data() {\n return {\n currentcolor: \"\",\n };\n },\n methods: {\n onColorChange(event) {\n this.currentcolor = event.detail;\n this.$emit(\"input\",event.detail);\n }\n },\n mounted(){\n this.currentcolor=this.value;\n InitializePicker(this.$refs.picker, this.value);\n },\n template: `\n <div ref=\"picker\" @colorchange=\"onColorChange\" :class=\"'vue-hsluv-picker'+(horizontal?' horizontal':'')\">\n <div v-if=\"!nodisplay\" class=\"display\">\n <canvas :height=\"displaysize\" :width=\"displaysize\"></canvas>\n </div>\n <table class='picker'>\n <tr class=\"control-h\">\n <td class=\"cell-input\">\n <input type=\"number\" min=\"0\" max=\"360\" step=\"any\" class=\"counter counter-hue\" tabindex=\"0\"/>\n </td>\n <td><div class=\"range-slider\"></div></td>\n <td class=\"picker-label\">H</td>\n </tr>\n <tr class=\"control-s\">\n <td class=\"cell-input\">\n <input type=\"number\" step=\"any\" min=\"0\" max=\"100\" class=\"counter counter-saturation\"/>\n </td>\n <td><div class=\"range-slider\"></div></td>\n <td class=\"picker-label\">S</td>\n </tr>\n <tr class=\"control-l\">\n <td class=\"cell-input\">\n <input type=\"number\" step=\"any\" min=\"0\" max=\"100\" class=\"counter counter-lightness\"/>\n </td>\n <td><div class=\"range-slider\"></div></td>\n <td class=\"picker-label\">L</td>\n </tr>\n <tr>\n <td class=\"cell-input cell-input-hex\">\n <input ref=\"input\" class=\"input-hex\" pattern=\"#?[0-9a-fA-F]{6}\"/>\n </td>\n <td><div class=\"swatch\"></div></td>\n <td></td>\n </tr>\n </table>\n </div>\n </div>\n`,\n};"],"names":["name","props","value","type","String","default","nodisplay","Boolean","displaysize","horizontal","watch","newVal","this","currentcolor","$refs","picker","dispatchEvent","CustomEvent","detail","data","methods","onColorChange","event","$emit","mounted","template"],"mappings":"wMAEe,CACXA,KAAM,eACNC,MAAO,CACHC,MAAO,CACHC,KAAMC,OACNC,QAAS,WAEbC,UAAW,CACPH,KAAMI,QACNF,SAAS,GAEbG,YAAa,CACTL,KAAMC,OACNC,QAAS,KAEbI,WAAY,CACRN,KAAMI,QACNF,SAAS,IAGjBK,MAAO,CACHR,MAAO,SAASS,QACTA,QAAUC,KAAKC,oBACTC,MAAMC,OAAOC,cAAc,IAAIC,YAAY,cAAe,CAACC,OAAQP,eACnEE,aAAeF,UAIhCQ,sBACW,CACHN,aAAc,KAGtBO,QAAS,CACLC,uBAAcC,YACLT,aAAeS,MAAMJ,YACrBK,MAAM,QAAQD,MAAMJ,UAGjCM,wBACSX,aAAaD,KAAKV,wCACNU,KAAKE,MAAMC,OAAQH,KAAKV,QAE7CuB"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
amd/build/vue.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
amd/build/vue.min.js.map Normal file

File diff suppressed because one or more lines are too long