Javascript library re-organization
This commit is contained in:
parent
896079defe
commit
723e8a24b3
12
amd/build/bootstrap-vue.min.js
vendored
12
amd/build/bootstrap-vue.min.js
vendored
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/bootstrap-vue/bootstrap-vue.esm.min.js
vendored
Normal file
3
amd/build/bootstrap-vue/bootstrap-vue.esm.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/bootstrap-vue/bootstrap-vue.esm.min.js.map
Normal file
1
amd/build/bootstrap-vue/bootstrap-vue.esm.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/bootstrap-vue/vue-functional-data-merge.min.js
vendored
Normal file
3
amd/build/bootstrap-vue/vue-functional-data-merge.min.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
define("local_treestudyplan/bootstrap-vue/vue-functional-data-merge",["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)||_unsupportedIterableToArray(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 _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}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.mergeData=function(){var prop,mergeTarget={},i=arguments.length;for(;i--;)for(var _i2=0,_Object$keys=Object.keys(arguments[i]);_i2<_Object$keys.length;_i2++)if(prop=_Object$keys[_i2],null!=arguments[i][prop]){switch(prop){case"class":var classes=[],value=mergeTarget.class;Array.isArray(value)&&(classes=value),mergeTarget.class=classes.concat(arguments[i].class);continue;case"style":var styles=[],_value=mergeTarget.style;Array.isArray(_value)&&(styles=_value);var thisStyle=[];Array.isArray(arguments[i].style)?thisStyle=arguments[i].style:thisStyle.push(arguments[i].style);for(var j=0;j<thisStyle.length;j++){var s=thisStyle[j];"string"==typeof s&&(thisStyle[j]=parseStyle(s))}mergeTarget[prop]=styles.concat(thisStyle);continue;case"id":case"key":case"ref":case"keepAlive":mergeTarget[prop]||(mergeTarget[prop]=arguments[i][prop]);continue}if(prop.startsWith("on")&&"on"!==prop){if(mergeTarget[prop]&&!Array.isArray(mergeTarget[prop])){mergeTarget[prop]=[mergeTarget[prop],arguments[i][prop]];continue}var targetValue=mergeTarget[prop],thisValue=arguments[i][prop];if(Array.isArray(targetValue)){Array.isArray(thisValue)?targetValue.push.apply(targetValue,function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr=thisValue)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||_unsupportedIterableToArray(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):targetValue.push(thisValue);continue}}mergeTarget[prop]=arguments[i][prop]}var arr;return mergeTarget};var pattern={kebab:/-(\w)/g,styleProp:/:(.*)/,styleList:/;(?![^(]*\))/g};function camelReplace(_substr,match){return match.toUpperCase()}function parseStyle(style){var _step,str,styleMap={},_iterator=function(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(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(_e2){throw _e2},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(_e3){didErr=!0,err=_e3},f:function(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}(style.split(pattern.styleList));try{for(_iterator.s();!(_step=_iterator.n()).done;){var _s$split2=_slicedToArray(_step.value.split(pattern.styleProp),2),key=_s$split2[0],val=_s$split2[1];(key=key.trim())&&(val=val.trim(),styleMap[(str=key,str.replace(pattern.kebab,camelReplace))]=val)}}catch(err){_iterator.e(err)}finally{_iterator.f()}return styleMap}}));
|
||||
|
||||
//# sourceMappingURL=vue-functional-data-merge.min.js.map
|
File diff suppressed because one or more lines are too long
2
amd/build/cfg-grades.min.js
vendored
2
amd/build/cfg-grades.min.js
vendored
|
@ -1,3 +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()}));
|
||||
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")}));
|
||||
|
||||
//# sourceMappingURL=cfg-grades.min.js.map
|
|
@ -1 +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"}
|
||||
{"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\");\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"],"mappings":"kgDA6BQA,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,oEA9C9B,yEAAa"}
|
3
amd/build/css-calc.min.js
vendored
3
amd/build/css-calc.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
3
amd/build/debounce.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -1 +0,0 @@
|
|||
{"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
3
amd/build/debugger.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -1 +0,0 @@
|
|||
{"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/leaderline.min.js
vendored
3
amd/build/leaderline.min.js
vendored
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/lib-hide-primarynav-items.min.js
vendored
3
amd/build/lib-hide-primarynav-items.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -1 +0,0 @@
|
|||
{"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"}
|
2
amd/build/modedit-modal.min.js
vendored
2
amd/build/modedit-modal.min.js
vendored
|
@ -1,3 +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}));
|
||||
define("local_treestudyplan/modedit-modal",["exports","core/fragment","./util/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
2
amd/build/page-edit-plan.min.js
vendored
2
amd/build/page-edit-plan.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
amd/build/page-invitemanager.min.js
vendored
2
amd/build/page-invitemanager.min.js
vendored
|
@ -1,3 +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()}))}))}}}));
|
||||
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{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
|
|
@ -1 +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"}
|
||||
{"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\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","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,uBAEd,CACPE,KAAM,WACFR,EAAE,gDAAgDS,GAAG,SAAS,SAAUC,GACpEA,EAAEC,qBACEC,MAAQZ,EAAEU,EAAEG,eACZC,KAAOF,MAAMG,KAAK,mBAClBC,KAAOJ,MAAMG,KAAK,oBAClBE,OAASL,MAAMG,KAAK,mBACxBR,MAAMW,KAAK,KAAMD,QACbE,MAAaF,SAAUA,OAAShB,IAAImB,WAAW,WAC/CC,MAAQT,MAAMG,KAAK,qBACvBR,MAAMW,KAAK,QAASG,OAChBF,MAAaE,QAASA,MAAQpB,IAAImB,WAAW,YAEjDb,MAAMW,KAAK,mBAAoBN,MAAOE,KAAME,MAE5Cb,aAAamB,OAAO,CAChBC,KAAMpB,aAAaqB,MAAMC,YACzBJ,MAAOA,MACPK,KAAMV,OACPW,MAAK,SAAUC,OACdA,MAAMC,kBAAkBZ,QAEbW,MAAME,UACZrB,GAAGL,YAAY2B,MAAM,WACtBC,OAAOC,SAAWnB,QAGtBd,EAAE4B,MAAMA,OAAOM,IAAI,YAAa,SAChCN,MAAMO,cAQzB"}
|
2
amd/build/page-myreport.min.js
vendored
2
amd/build/page-myreport.min.js
vendored
|
@ -1,3 +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()}));
|
||||
define("local_treestudyplan/page-myreport",["exports","core/ajax","core/notification","core/config","./vue/dev/vue","./vue/prod/vue","./report-viewer-components","./treestudyplan-components","./util/debugger","./studyplan-processor","./portal-vue/portal-vue.esm","./bootstrap-vue/bootstrap-vue.esm"],(function(_exports,_ajax,_notification,_config,_vue,_vue2,_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({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),_config=_interopRequireDefault(_config),_vue=_interopRequireDefault(_vue),_vue2=_interopRequireDefault(_vue2),_reportViewerComponents=_interopRequireDefault(_reportViewerComponents),_treestudyplanComponents=_interopRequireDefault(_treestudyplanComponents),_debugger=_interopRequireDefault(_debugger),_portalVue=_interopRequireDefault(_portalVue),_bootstrapVue=_interopRequireDefault(_bootstrapVue);var Vue=_config.default.developerdebug?_vue.default:_vue2.default;Vue.use(_reportViewerComponents.default),Vue.use(_portalVue.default),Vue.use(_bootstrapVue.default);var debug=new _debugger.default("treestudyplan-report")}));
|
||||
|
||||
//# sourceMappingURL=page-myreport.min.js.map
|
|
@ -1 +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"}
|
||||
{"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';\n\n// Import Vue from dev or prod depending on the developerdebug setting.\n// (Importing both dev and prod seems easier than using dynamic imports, but I could be mistaken)\nimport Config from \"core/config\";\nimport VueDev from './vue/dev/vue';\nimport VueProd from './vue/prod/vue';\nconst Vue = Config.developerdebug?VueDev:VueProd;\n\nimport RVComponents from './report-viewer-components';\nVue.use(RVComponents);\n\nimport TSComponents from './treestudyplan-components';\nimport Debugger from './util/debugger';\n\nimport {ProcessStudyplans} from './studyplan-processor';\n\n\nimport PortalVue from './portal-vue/portal-vue.esm';\nVue.use(PortalVue);\nimport BootstrapVue from './bootstrap-vue/bootstrap-vue.esm';\nVue.use(BootstrapVue);\n\nlet debug = new Debugger(\"treestudyplan-report\");\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","Config","developerdebug","VueDev","VueProd","use","RVComponents","PortalVue","BootstrapVue","Debugger"],"mappings":"snBAwCsBA,4DAAK,WAAWC,2CAC9BC,IAAM,IAAIC,IAAI,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,4cA3EXjC,IAAMkC,gBAAOC,eAAeC,aAAOC,cAGzCrC,IAAIsC,IAAIC,iCASRvC,IAAIsC,IAAIE,oBAERxC,IAAIsC,IAAIG,2BAEJ/B,MAAQ,IAAIgC,kBAAS"}
|
3
amd/build/page-view-plan copy.min.js
vendored
3
amd/build/page-view-plan copy.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
amd/build/page-view-plan.min.js
vendored
2
amd/build/page-view-plan.min.js
vendored
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
3
amd/build/portal-vue.min.js
vendored
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/portal-vue.esm.min.js
vendored
Normal file
3
amd/build/portal-vue/portal-vue.esm.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/portal-vue/portal-vue.esm.min.js.map
Normal file
1
amd/build/portal-vue/portal-vue.esm.min.js.map
Normal file
File diff suppressed because one or more lines are too long
2
amd/build/primary-nav-tools.min.js
vendored
2
amd/build/primary-nav-tools.min.js
vendored
|
@ -1,3 +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()}));
|
||||
define("local_treestudyplan/primary-nav-tools",["exports","./util/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")}));
|
||||
|
||||
//# sourceMappingURL=primary-nav-tools.min.js.map
|
|
@ -1 +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"}
|
||||
{"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 './util/debugger';\nlet debug = new Debugger(\"primary-nav-tools\");\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"],"mappings":"odAc6BA,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,YA7BxBO,MAAQ,yEAAa"}
|
3
amd/build/reflect-metadata.min.js
vendored
3
amd/build/reflect-metadata.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
amd/build/report-viewer-components.min.js
vendored
2
amd/build/report-viewer-components.min.js
vendored
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
3
amd/build/simpleline.min.js
vendored
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/css-calc.min.js
vendored
Normal file
3
amd/build/simpleline/css-calc.min.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
define("local_treestudyplan/simpleline/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
|
1
amd/build/simpleline/css-calc.min.js.map
Normal file
1
amd/build/simpleline/css-calc.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/simpleline/simpleline.min.js
vendored
Normal file
3
amd/build/simpleline/simpleline.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/simpleline/simpleline.min.js.map
Normal file
1
amd/build/simpleline/simpleline.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/string-helper.min.js
vendored
3
amd/build/string-helper.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
2
amd/build/studyplan-editor-components.min.js
vendored
2
amd/build/studyplan-editor-components.min.js
vendored
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/svgarc.min.js
vendored
3
amd/build/svgarc.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -1 +0,0 @@
|
|||
{"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"}
|
3
amd/build/svgarc/svgarc.min.js
vendored
Normal file
3
amd/build/svgarc/svgarc.min.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
define("local_treestudyplan/svgarc/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
|
1
amd/build/svgarc/svgarc.min.js.map
Normal file
1
amd/build/svgarc/svgarc.min.js.map
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"svgarc.min.js","sources":["../../src/svgarc/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":"uyCAoBMA,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"}
|
2
amd/build/treestudyplan-components.min.js
vendored
2
amd/build/treestudyplan-components.min.js
vendored
|
@ -1,3 +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",idnumber:"studyplan_idnumber"}}),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.pages[0].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 <div class='s-studyplan-card-idnumber' v-if='value.idnumber'><i>{{ text.idnumber}}:</i> {{ value.idnumber }}</div>\n <div class='s-studyplan-card-description' v-if='value.description'>{{ value.description }}</div>\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&&(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}));
|
||||
define("local_treestudyplan/treestudyplan-components",["exports","./util/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",idnumber:"studyplan_idnumber"}}),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.pages[0].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 <div class='s-studyplan-card-idnumber' v-if='value.idnumber'><i>{{ text.idnumber}}:</i> {{ value.idnumber }}</div>\n <div class='s-studyplan-card-description' v-if='value.description'>{{ value.description }}</div>\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&&(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/util/debounce.min.js
vendored
Normal file
3
amd/build/util/debounce.min.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
define("local_treestudyplan/util/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
|
1
amd/build/util/debounce.min.js.map
Normal file
1
amd/build/util/debounce.min.js.map
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"debounce.min.js","sources":["../../src/util/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":"8JAakBA,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/util/debugger.min.js
vendored
Normal file
3
amd/build/util/debugger.min.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
define("local_treestudyplan/util/debugger",["exports","core/config"],(function(_exports,_config){var obj;return Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=function(handle){var output_enabled=_config.default.developerdebug;output_enabled?console.warn("In development environment. Debugger output enabled for ".concat(handle)):console.warn("In production environment. Debugger output disabled for ".concat(handle));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}}},_config=(obj=_config)&&obj.__esModule?obj:{default:obj},_exports.default}));
|
||||
|
||||
//# sourceMappingURL=debugger.min.js.map
|
1
amd/build/util/debugger.min.js.map
Normal file
1
amd/build/util/debugger.min.js.map
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"debugger.min.js","sources":["../../src/util/debugger.js"],"sourcesContent":["/*eslint no-var: \"error\"*/\n/*eslint no-console: \"off\"*/\n/*eslint-env es6*/\n\nimport Config from \"core/config\";\n\n/**\n * Start a new debugger\n * @param {*} handle The string to attach to all messages from this debugger\n * @returns Debugger object\n */\nexport default function (handle) {\n let output_enabled = Config.developerdebug;\n if(output_enabled){\n console.warn(`In development environment. Debugger output enabled for ${handle}`);\n } else {\n console.warn(`In production environment. Debugger output disabled for ${handle}`);\n }\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":["handle","output_enabled","Config","developerdebug","console","warn","write","args","Array","prototype","slice","call","arguments","unshift","info","apply","error","enable","disable"],"mappings":"kMAWyBA,YACjBC,eAAiBC,gBAAOC,eACzBF,eACCG,QAAQC,uEAAgEL,SAExEI,QAAQC,uEAAgEL,eAGrE,CACHM,MAAO,cACCL,eAAgB,KACZM,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQb,OAAS,MACtBI,QAAQU,KAAKC,MAAMX,QAASG,QAGpCO,KAAM,cACEb,eAAgB,KACZM,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQb,OAAS,MACtBI,QAAQU,KAAKC,MAAMX,QAASG,QAGpCF,KAAM,cACEJ,eAAgB,KACZM,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQb,OAAS,MACtBI,QAAQC,KAAKU,MAAMX,QAASG,QAGpCS,MAAO,cACCf,eAAgB,KACZM,KAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,KAAKM,QAAQb,OAAS,MACtBI,QAAQY,MAAMD,MAAMX,QAASG,QAGrCU,OAAQ,WACJhB,gBAAiB,GAGrBiB,QAAS,WACLjB,gBAAiB"}
|
3
amd/build/util/string-helper.min.js
vendored
Normal file
3
amd/build/util/string-helper.min.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
define("local_treestudyplan/util/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
|
1
amd/build/util/string-helper.min.js.map
Normal file
1
amd/build/util/string-helper.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/vue-class-component.min.js
vendored
3
amd/build/vue-class-component.min.js
vendored
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-color-picker-wheel.min.js
vendored
3
amd/build/vue-color-picker-wheel.min.js
vendored
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
3
amd/build/vue-easy-dnd.min.js
vendored
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/reflect-metadata.min.js
vendored
Normal file
3
amd/build/vue-easy-dnd/reflect-metadata.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/vue-easy-dnd/reflect-metadata.min.js.map
Normal file
1
amd/build/vue-easy-dnd/reflect-metadata.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/vue-easy-dnd/vue-class-component.min.js
vendored
Normal file
3
amd/build/vue-easy-dnd/vue-class-component.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/vue-easy-dnd/vue-class-component.min.js.map
Normal file
1
amd/build/vue-easy-dnd/vue-class-component.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/vue-easy-dnd/vue-easy-dnd.min.js
vendored
Normal file
3
amd/build/vue-easy-dnd/vue-easy-dnd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/vue-easy-dnd/vue-easy-dnd.min.js.map
Normal file
1
amd/build/vue-easy-dnd/vue-easy-dnd.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/vue-easy-dnd/vue-property-decorator.min.js
vendored
Normal file
3
amd/build/vue-easy-dnd/vue-property-decorator.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/vue-easy-dnd/vue-property-decorator.min.js.map
Normal file
1
amd/build/vue-easy-dnd/vue-property-decorator.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/vue-hsluv-picker.min.js
vendored
3
amd/build/vue-hsluv-picker.min.js
vendored
|
@ -1,3 +0,0 @@
|
|||
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
|
|
@ -1 +0,0 @@
|
|||
{"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"}
|
3
amd/build/vue-property-decorator.min.js
vendored
3
amd/build/vue-property-decorator.min.js
vendored
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
3
amd/build/vue.min.js
vendored
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/dev/vue.min.js
vendored
Normal file
3
amd/build/vue/dev/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/vue/dev/vue.min.js.map
Normal file
1
amd/build/vue/dev/vue.min.js.map
Normal file
File diff suppressed because one or more lines are too long
3
amd/build/vue/prod/vue.min.js
vendored
Normal file
3
amd/build/vue/prod/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
amd/build/vue/prod/vue.min.js.map
Normal file
1
amd/build/vue/prod/vue.min.js.map
Normal file
File diff suppressed because one or more lines are too long
33153
amd/src/bootstrap-vue.js
vendored
33153
amd/src/bootstrap-vue.js
vendored
File diff suppressed because it is too large
Load Diff
30398
amd/src/bootstrap-vue/bootstrap-vue.esm.js
vendored
Normal file
30398
amd/src/bootstrap-vue/bootstrap-vue.esm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
147
amd/src/bootstrap-vue/vue-functional-data-merge.js
Normal file
147
amd/src/bootstrap-vue/vue-functional-data-merge.js
Normal file
|
@ -0,0 +1,147 @@
|
|||
/* eslint-disable */
|
||||
/*
|
||||
Compiled from ts into js by PMKuipers @ 2023) from source
|
||||
at https://github.com/alexsasharegan/vue-functional-data-merge
|
||||
Below is copy of licens in original project
|
||||
*/
|
||||
/*
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Alex Regan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
const pattern = {
|
||||
kebab: /-(\w)/g,
|
||||
styleProp: /:(.*)/,
|
||||
styleList: /;(?![^(]*\))/g,
|
||||
};
|
||||
function camelReplace(_substr, match) {
|
||||
return match.toUpperCase();
|
||||
}
|
||||
function camelCase(str) {
|
||||
return str.replace(pattern.kebab, camelReplace);
|
||||
}
|
||||
function parseStyle(style) {
|
||||
let styleMap = {};
|
||||
for (let s of style.split(pattern.styleList)) {
|
||||
let [key, val] = s.split(pattern.styleProp);
|
||||
key = key.trim();
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
// May be undefined if the `key: value` pair is incomplete.
|
||||
val = val.trim();
|
||||
styleMap[camelCase(key)] = val;
|
||||
}
|
||||
return styleMap;
|
||||
}
|
||||
function mergeData() {
|
||||
let mergeTarget = {};
|
||||
let i = arguments.length;
|
||||
let prop;
|
||||
// Allow for variadic argument length.
|
||||
while (i--) {
|
||||
// Iterate through the data properties and execute merge strategies
|
||||
// Object.keys eliminates need for hasOwnProperty call
|
||||
for (prop of Object.keys(arguments[i])) {
|
||||
if (arguments[i][prop] == null) {
|
||||
continue;
|
||||
}
|
||||
switch (prop) {
|
||||
case "class": {
|
||||
let classes = [];
|
||||
{
|
||||
let value = mergeTarget["class"];
|
||||
if (Array.isArray(value)) {
|
||||
classes = value;
|
||||
}
|
||||
}
|
||||
// Repackaging in an array allows Vue runtime
|
||||
// to merge class/style bindings regardless of type.
|
||||
mergeTarget["class"] = classes.concat(arguments[i]["class"]);
|
||||
continue;
|
||||
}
|
||||
// merge style by concatenating arrays
|
||||
case "style": {
|
||||
let styles = [];
|
||||
{
|
||||
let value = mergeTarget.style;
|
||||
if (Array.isArray(value)) {
|
||||
styles = value;
|
||||
}
|
||||
}
|
||||
let thisStyle = [];
|
||||
if (Array.isArray(arguments[i].style)) {
|
||||
thisStyle = arguments[i].style;
|
||||
}
|
||||
else {
|
||||
thisStyle.push(arguments[i].style);
|
||||
}
|
||||
for (let j = 0; j < thisStyle.length; j++) {
|
||||
let s = thisStyle[j];
|
||||
if (typeof s === "string") {
|
||||
thisStyle[j] = parseStyle(s);
|
||||
}
|
||||
}
|
||||
mergeTarget[prop] = styles.concat(thisStyle);
|
||||
continue;
|
||||
}
|
||||
case "id":
|
||||
case "key":
|
||||
case "ref":
|
||||
case "keepAlive": {
|
||||
if (!mergeTarget[prop]) {
|
||||
mergeTarget[prop] = arguments[i][prop];
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (prop.startsWith("on") && prop !== "on") {
|
||||
// Object, the properties of which to merge via array merge strategy (array concatenation).
|
||||
// Callback merge strategy merges callbacks to the beginning of the array,
|
||||
// so that the last defined callback will be invoked first.
|
||||
// This is done since to mimic how Object.assign merging
|
||||
// uses the last given value to assign.
|
||||
// Concat function to array of functions if callback present.
|
||||
if (mergeTarget[prop] && !Array.isArray(mergeTarget[prop])) {
|
||||
// Insert current iteration data in beginning of merged array.
|
||||
mergeTarget[prop] = [mergeTarget[prop], arguments[i][prop]];
|
||||
continue;
|
||||
}
|
||||
let targetValue = mergeTarget[prop];
|
||||
let thisValue = arguments[i][prop];
|
||||
// The `else` condition falls through to a simple assignment.
|
||||
if (Array.isArray(targetValue)) {
|
||||
if (Array.isArray(thisValue)) {
|
||||
targetValue.push(...thisValue);
|
||||
}
|
||||
else {
|
||||
targetValue.push(thisValue);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
mergeTarget[prop] = arguments[i][prop];
|
||||
}
|
||||
}
|
||||
return mergeTarget;
|
||||
}
|
||||
export { mergeData };
|
|
@ -13,7 +13,6 @@ import Debugger from './debugger';
|
|||
import {load_strings} from './string-helper';
|
||||
|
||||
let debug = new Debugger("treestudyplan-config-grades");
|
||||
debug.enable();
|
||||
|
||||
/*
|
||||
let strings = load_strings({
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/*eslint no-var: "error"*/
|
||||
/*eslint no-console: "off"*/
|
||||
/*eslint-env es6*/
|
||||
// Put this file in path/to/plugin/amd/src
|
||||
// You can call it anything you like
|
||||
|
||||
define([], function () {
|
||||
|
||||
return (function (handle) {
|
||||
let output_enabled = false;
|
||||
|
||||
return {
|
||||
write: function debugger_write() {
|
||||
if (output_enabled) {
|
||||
let args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(handle + ": ");
|
||||
console.info.apply(console, args);
|
||||
}
|
||||
},
|
||||
info: function debugger_info() {
|
||||
if (output_enabled) {
|
||||
let args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(handle + ": ");
|
||||
console.info.apply(console, args);
|
||||
}
|
||||
},
|
||||
warn: function debugger_warn() {
|
||||
if (output_enabled) {
|
||||
let args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(handle + ": ");
|
||||
console.warn.apply(console, args);
|
||||
}
|
||||
},
|
||||
error: function debugger_error() {
|
||||
if (output_enabled) {
|
||||
let args = Array.prototype.slice.call(arguments);
|
||||
args.unshift(handle + ": ");
|
||||
console.error.apply(console, args);
|
||||
}
|
||||
},
|
||||
enable: function debugger_enable() {
|
||||
output_enabled = true;
|
||||
},
|
||||
|
||||
disable: function debugger_disable() {
|
||||
output_enabled = false;
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
});
|
|
@ -5,7 +5,7 @@
|
|||
// Put this file in path/to/plugin/amd/src
|
||||
|
||||
import {loadFragment} from 'core/fragment';
|
||||
import {load_strings} from './string-helper';
|
||||
import {load_strings} from './util/string-helper';
|
||||
import {call} from 'core/ajax';
|
||||
import notification from 'core/notification';
|
||||
import {replaceNodeContents} from 'core/templates';
|
||||
|
|
|
@ -9,34 +9,39 @@
|
|||
import {get_string,get_strings} from 'core/str';
|
||||
import {call} from 'core/ajax';
|
||||
import notification from 'core/notification';
|
||||
import Vue from './vue';
|
||||
import EditorComponents from './studyplan-editor-components';
|
||||
import TSComponents from './treestudyplan-components';
|
||||
import ModalComponents from './modedit-modal';
|
||||
import Debugger from './debugger';
|
||||
|
||||
import {load_strings} from './string-helper';
|
||||
// Import Vue from dev or prod depending on the developerdebug setting.
|
||||
// (Importing both dev and prod seems easier than using dynamic imports, but I could be mistaken)
|
||||
import Config from "core/config";
|
||||
import VueDev from './vue/dev/vue';
|
||||
import VueProd from './vue/prod/vue';
|
||||
const Vue = Config.developerdebug?VueDev:VueProd;
|
||||
|
||||
import EditorComponents from './studyplan-editor-components';
|
||||
Vue.use(EditorComponents);
|
||||
|
||||
import TSComponents from './treestudyplan-components';
|
||||
Vue.use(TSComponents);
|
||||
|
||||
import ModalComponents from './modedit-modal';
|
||||
Vue.use(ModalComponents);
|
||||
import Debugger from './util/debugger';
|
||||
|
||||
import {load_strings} from './util/string-helper';
|
||||
import {ProcessStudyplan} from './studyplan-processor';
|
||||
import {download,upload} from './downloader';
|
||||
|
||||
import PortalVue from './portal-vue';
|
||||
import BootstrapVue from './bootstrap-vue';
|
||||
import {Drag, Drop, DropList} from './vue-easy-dnd';
|
||||
import PortalVue from './portal-vue/portal-vue.esm';
|
||||
Vue.use(PortalVue);
|
||||
import BootstrapVue from './bootstrap-vue/bootstrap-vue.esm';
|
||||
Vue.use(BootstrapVue);
|
||||
Vue.use(TSComponents);
|
||||
Vue.use(EditorComponents);
|
||||
vue.use(ModalComponents);
|
||||
|
||||
import {Drag, Drop, DropList} from './vue-easy-dnd/vue-easy-dnd';
|
||||
Vue.component('drag',Drag);
|
||||
Vue.component('drop',Drop);
|
||||
Vue.component('drop-list',DropList);
|
||||
|
||||
|
||||
import vue from './vue';
|
||||
|
||||
const debug = new Debugger("treestudyplan");
|
||||
debug.enable();
|
||||
|
||||
|
||||
let strings = load_strings({
|
||||
studyplan: {
|
||||
|
|
|
@ -10,7 +10,7 @@ define(['jquery', 'core/str', 'core/ajax', 'core/modal_factory', 'core/modal_eve
|
|||
function ($, str, ajax, ModalFactory, ModalEvents,
|
||||
handlers, Debugger) {
|
||||
let debug = new Debugger("treestudyplan");
|
||||
debug.enable();
|
||||
|
||||
let self = {
|
||||
init: function init() {
|
||||
$('.path-local-treestudyplan a.m-action-confirm').on('click', function (e) {
|
||||
|
|
|
@ -9,22 +9,29 @@
|
|||
|
||||
import {call} from 'core/ajax';
|
||||
import notification from 'core/notification';
|
||||
import Vue from './vue';
|
||||
|
||||
// Import Vue from dev or prod depending on the developerdebug setting.
|
||||
// (Importing both dev and prod seems easier than using dynamic imports, but I could be mistaken)
|
||||
import Config from "core/config";
|
||||
import VueDev from './vue/dev/vue';
|
||||
import VueProd from './vue/prod/vue';
|
||||
const Vue = Config.developerdebug?VueDev:VueProd;
|
||||
|
||||
import RVComponents from './report-viewer-components';
|
||||
Vue.use(RVComponents);
|
||||
|
||||
import TSComponents from './treestudyplan-components';
|
||||
import Debugger from './debugger';
|
||||
import Debugger from './util/debugger';
|
||||
|
||||
import {ProcessStudyplans} from './studyplan-processor';
|
||||
|
||||
|
||||
import PortalVue from './portal-vue';
|
||||
import BootstrapVue from './bootstrap-vue';
|
||||
Vue.use(RVComponents);
|
||||
import PortalVue from './portal-vue/portal-vue.esm';
|
||||
Vue.use(PortalVue);
|
||||
import BootstrapVue from './bootstrap-vue/bootstrap-vue.esm';
|
||||
Vue.use(BootstrapVue);
|
||||
|
||||
let debug = new Debugger("treestudyplan-report");
|
||||
debug.enable();
|
||||
|
||||
/**
|
||||
* Initialize the Page
|
||||
|
|
|
@ -8,10 +8,17 @@
|
|||
|
||||
import {call} from 'core/ajax';
|
||||
import notification from 'core/notification';
|
||||
import Vue from './vue';
|
||||
|
||||
import Debugger from './debugger';
|
||||
import {load_strings} from './string-helper';
|
||||
// Import Vue from dev or prod depending on the developerdebug setting.
|
||||
// (Importing both dev and prod seems easier than using dynamic imports, but I could be mistaken)
|
||||
import Config from "core/config";
|
||||
import VueDev from './vue/dev/vue';
|
||||
import VueProd from './vue/prod/vue';
|
||||
const Vue = Config.developerdebug?VueDev:VueProd;
|
||||
|
||||
|
||||
import Debugger from './util/debugger';
|
||||
import {load_strings} from './util/string-helper';
|
||||
import {ProcessStudyplan} from './studyplan-processor';
|
||||
|
||||
import TSComponents from './treestudyplan-components';
|
||||
|
@ -22,14 +29,13 @@ Vue.use(RVComponents);
|
|||
import ModalComponents from './modedit-modal';
|
||||
Vue.use(ModalComponents);
|
||||
|
||||
import PortalVue from './portal-vue';
|
||||
import PortalVue from './portal-vue/portal-vue.esm';
|
||||
Vue.use(PortalVue);
|
||||
import BootstrapVue from './bootstrap-vue';
|
||||
import BootstrapVue from './bootstrap-vue/bootstrap-vue.esm';
|
||||
Vue.use(BootstrapVue);
|
||||
|
||||
|
||||
let debug = new Debugger("treestudyplanviewer");
|
||||
debug.enable();
|
||||
|
||||
let strings = load_strings({
|
||||
studyplan: {
|
||||
|
|
|
@ -1,628 +0,0 @@
|
|||
|
||||
/* eslint-disable */
|
||||
/*!
|
||||
* portal-vue © Thorsten Lünborg, 2019
|
||||
*
|
||||
* Version: 2.1.7
|
||||
*
|
||||
* LICENCE: MIT
|
||||
*
|
||||
* https://github.com/linusborg/portal-vue
|
||||
*
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./vue')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', './vue'], factory) :
|
||||
(factory((global.PortalVue = {}),global.Vue));
|
||||
}(this, (function (exports,Vue) { 'use strict';
|
||||
|
||||
Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function (obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _toConsumableArray(arr) {
|
||||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
||||
}
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
}
|
||||
}
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
||||
}
|
||||
|
||||
function _nonIterableSpread() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
||||
}
|
||||
|
||||
var inBrowser = typeof window !== 'undefined';
|
||||
function freeze(item) {
|
||||
if (Array.isArray(item) || _typeof(item) === 'object') {
|
||||
return Object.freeze(item);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
function combinePassengers(transports) {
|
||||
var slotProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
return transports.reduce(function (passengers, transport) {
|
||||
var temp = transport.passengers[0];
|
||||
var newPassengers = typeof temp === 'function' ? temp(slotProps) : transport.passengers;
|
||||
return passengers.concat(newPassengers);
|
||||
}, []);
|
||||
}
|
||||
function stableSort(array, compareFn) {
|
||||
return array.map(function (v, idx) {
|
||||
return [idx, v];
|
||||
}).sort(function (a, b) {
|
||||
return compareFn(a[1], b[1]) || a[0] - b[0];
|
||||
}).map(function (c) {
|
||||
return c[1];
|
||||
});
|
||||
}
|
||||
function pick(obj, keys) {
|
||||
return keys.reduce(function (acc, key) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
acc[key] = obj[key];
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
var transports = {};
|
||||
var targets = {};
|
||||
var sources = {};
|
||||
var Wormhole = Vue.extend({
|
||||
data: function data() {
|
||||
return {
|
||||
transports: transports,
|
||||
targets: targets,
|
||||
sources: sources,
|
||||
trackInstances: inBrowser
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
open: function open(transport) {
|
||||
if (!inBrowser) return;
|
||||
var to = transport.to,
|
||||
from = transport.from,
|
||||
passengers = transport.passengers,
|
||||
_transport$order = transport.order,
|
||||
order = _transport$order === void 0 ? Infinity : _transport$order;
|
||||
if (!to || !from || !passengers) return;
|
||||
var newTransport = {
|
||||
to: to,
|
||||
from: from,
|
||||
passengers: freeze(passengers),
|
||||
order: order
|
||||
};
|
||||
var keys = Object.keys(this.transports);
|
||||
|
||||
if (keys.indexOf(to) === -1) {
|
||||
Vue.set(this.transports, to, []);
|
||||
}
|
||||
|
||||
var currentIndex = this.$_getTransportIndex(newTransport); // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays
|
||||
|
||||
var newTransports = this.transports[to].slice(0);
|
||||
|
||||
if (currentIndex === -1) {
|
||||
newTransports.push(newTransport);
|
||||
} else {
|
||||
newTransports[currentIndex] = newTransport;
|
||||
}
|
||||
|
||||
this.transports[to] = stableSort(newTransports, function (a, b) {
|
||||
return a.order - b.order;
|
||||
});
|
||||
},
|
||||
close: function close(transport) {
|
||||
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
var to = transport.to,
|
||||
from = transport.from;
|
||||
if (!to || !from && force === false) return;
|
||||
|
||||
if (!this.transports[to]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (force) {
|
||||
this.transports[to] = [];
|
||||
} else {
|
||||
var index = this.$_getTransportIndex(transport);
|
||||
|
||||
if (index >= 0) {
|
||||
// Copying the array here so that the PortalTarget change event will actually contain two distinct arrays
|
||||
var newTransports = this.transports[to].slice(0);
|
||||
newTransports.splice(index, 1);
|
||||
this.transports[to] = newTransports;
|
||||
}
|
||||
}
|
||||
},
|
||||
registerTarget: function registerTarget(target, vm, force) {
|
||||
if (!inBrowser) return;
|
||||
|
||||
if (this.trackInstances && !force && this.targets[target]) {
|
||||
console.warn("[portal-vue]: Target ".concat(target, " already exists"));
|
||||
}
|
||||
|
||||
this.$set(this.targets, target, Object.freeze([vm]));
|
||||
},
|
||||
unregisterTarget: function unregisterTarget(target) {
|
||||
this.$delete(this.targets, target);
|
||||
},
|
||||
registerSource: function registerSource(source, vm, force) {
|
||||
if (!inBrowser) return;
|
||||
|
||||
if (this.trackInstances && !force && this.sources[source]) {
|
||||
console.warn("[portal-vue]: source ".concat(source, " already exists"));
|
||||
}
|
||||
|
||||
this.$set(this.sources, source, Object.freeze([vm]));
|
||||
},
|
||||
unregisterSource: function unregisterSource(source) {
|
||||
this.$delete(this.sources, source);
|
||||
},
|
||||
hasTarget: function hasTarget(to) {
|
||||
return !!(this.targets[to] && this.targets[to][0]);
|
||||
},
|
||||
hasSource: function hasSource(to) {
|
||||
return !!(this.sources[to] && this.sources[to][0]);
|
||||
},
|
||||
hasContentFor: function hasContentFor(to) {
|
||||
return !!this.transports[to] && !!this.transports[to].length;
|
||||
},
|
||||
// Internal
|
||||
$_getTransportIndex: function $_getTransportIndex(_ref) {
|
||||
var to = _ref.to,
|
||||
from = _ref.from;
|
||||
|
||||
for (var i in this.transports[to]) {
|
||||
if (this.transports[to][i].from === from) {
|
||||
return +i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
});
|
||||
var wormhole = new Wormhole(transports);
|
||||
|
||||
var _id = 1;
|
||||
var Portal = Vue.extend({
|
||||
name: 'portal',
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return String(_id++);
|
||||
}
|
||||
},
|
||||
order: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
slim: {
|
||||
type: Boolean
|
||||
},
|
||||
slotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'DIV'
|
||||
},
|
||||
to: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return String(Math.round(Math.random() * 10000000));
|
||||
}
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
var _this = this;
|
||||
|
||||
this.$nextTick(function () {
|
||||
wormhole.registerSource(_this.name, _this);
|
||||
});
|
||||
},
|
||||
mounted: function mounted() {
|
||||
if (!this.disabled) {
|
||||
this.sendUpdate();
|
||||
}
|
||||
},
|
||||
updated: function updated() {
|
||||
if (this.disabled) {
|
||||
this.clear();
|
||||
} else {
|
||||
this.sendUpdate();
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
wormhole.unregisterSource(this.name);
|
||||
this.clear();
|
||||
},
|
||||
watch: {
|
||||
to: function to(newValue, oldValue) {
|
||||
oldValue && oldValue !== newValue && this.clear(oldValue);
|
||||
this.sendUpdate();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear: function clear(target) {
|
||||
var closer = {
|
||||
from: this.name,
|
||||
to: target || this.to
|
||||
};
|
||||
wormhole.close(closer);
|
||||
},
|
||||
normalizeSlots: function normalizeSlots() {
|
||||
return this.$scopedSlots.default ? [this.$scopedSlots.default] : this.$slots.default;
|
||||
},
|
||||
normalizeOwnChildren: function normalizeOwnChildren(children) {
|
||||
return typeof children === 'function' ? children(this.slotProps) : children;
|
||||
},
|
||||
sendUpdate: function sendUpdate() {
|
||||
var slotContent = this.normalizeSlots();
|
||||
|
||||
if (slotContent) {
|
||||
var transport = {
|
||||
from: this.name,
|
||||
to: this.to,
|
||||
passengers: _toConsumableArray(slotContent),
|
||||
order: this.order
|
||||
};
|
||||
wormhole.open(transport);
|
||||
} else {
|
||||
this.clear();
|
||||
}
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var children = this.$slots.default || this.$scopedSlots.default || [];
|
||||
var Tag = this.tag;
|
||||
|
||||
if (children && this.disabled) {
|
||||
return children.length <= 1 && this.slim ? this.normalizeOwnChildren(children)[0] : h(Tag, [this.normalizeOwnChildren(children)]);
|
||||
} else {
|
||||
return this.slim ? h() : h(Tag, {
|
||||
class: {
|
||||
'v-portal': true
|
||||
},
|
||||
style: {
|
||||
display: 'none'
|
||||
},
|
||||
key: 'v-portal-placeholder'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var PortalTarget = Vue.extend({
|
||||
name: 'portalTarget',
|
||||
props: {
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
slim: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
slotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'div'
|
||||
},
|
||||
transition: {
|
||||
type: [String, Object, Function]
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
transports: wormhole.transports,
|
||||
firstRender: true
|
||||
};
|
||||
},
|
||||
created: function created() {
|
||||
var _this = this;
|
||||
|
||||
this.$nextTick(function () {
|
||||
wormhole.registerTarget(_this.name, _this);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
ownTransports: function ownTransports() {
|
||||
this.$emit('change', this.children().length > 0);
|
||||
},
|
||||
name: function name(newVal, oldVal) {
|
||||
/**
|
||||
* TODO
|
||||
* This should warn as well ...
|
||||
*/
|
||||
wormhole.unregisterTarget(oldVal);
|
||||
wormhole.registerTarget(newVal, this);
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this.transition) {
|
||||
this.$nextTick(function () {
|
||||
// only when we have a transition, because it causes a re-render
|
||||
_this2.firstRender = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
wormhole.unregisterTarget(this.name);
|
||||
},
|
||||
computed: {
|
||||
ownTransports: function ownTransports() {
|
||||
var transports = this.transports[this.name] || [];
|
||||
|
||||
if (this.multiple) {
|
||||
return transports;
|
||||
}
|
||||
|
||||
return transports.length === 0 ? [] : [transports[transports.length - 1]];
|
||||
},
|
||||
passengers: function passengers() {
|
||||
return combinePassengers(this.ownTransports, this.slotProps);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// can't be a computed prop because it has to "react" to $slot changes.
|
||||
children: function children() {
|
||||
return this.passengers.length !== 0 ? this.passengers : this.$scopedSlots.default ? this.$scopedSlots.default(this.slotProps) : this.$slots.default || [];
|
||||
},
|
||||
// can't be a computed prop because it has to "react" to this.children().
|
||||
noWrapper: function noWrapper() {
|
||||
var noWrapper = this.slim && !this.transition;
|
||||
|
||||
if (noWrapper && this.children().length > 1) {
|
||||
console.warn('[portal-vue]: PortalTarget with `slim` option received more than one child element.');
|
||||
}
|
||||
|
||||
return noWrapper;
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var noWrapper = this.noWrapper();
|
||||
var children = this.children();
|
||||
var Tag = this.transition || this.tag;
|
||||
return noWrapper ? children[0] : this.slim && !Tag ? h() : h(Tag, {
|
||||
props: {
|
||||
// if we have a transition component, pass the tag if it exists
|
||||
tag: this.transition && this.tag ? this.tag : undefined
|
||||
},
|
||||
class: {
|
||||
'vue-portal-target': true
|
||||
}
|
||||
}, children);
|
||||
}
|
||||
});
|
||||
|
||||
var _id$1 = 0;
|
||||
var portalProps = ['disabled', 'name', 'order', 'slim', 'slotProps', 'tag', 'to'];
|
||||
var targetProps = ['multiple', 'transition'];
|
||||
var MountingPortal = Vue.extend({
|
||||
name: 'MountingPortal',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
append: {
|
||||
type: [Boolean, String]
|
||||
},
|
||||
bail: {
|
||||
type: Boolean
|
||||
},
|
||||
mountTo: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
// Portal
|
||||
disabled: {
|
||||
type: Boolean
|
||||
},
|
||||
// name for the portal
|
||||
name: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return 'mounted_' + String(_id$1++);
|
||||
}
|
||||
},
|
||||
order: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
slim: {
|
||||
type: Boolean
|
||||
},
|
||||
slotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'DIV'
|
||||
},
|
||||
// name for the target
|
||||
to: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return String(Math.round(Math.random() * 10000000));
|
||||
}
|
||||
},
|
||||
// Target
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
targetSlim: {
|
||||
type: Boolean
|
||||
},
|
||||
targetSlotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
targetTag: {
|
||||
type: String,
|
||||
default: 'div'
|
||||
},
|
||||
transition: {
|
||||
type: [String, Object, Function]
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
if (typeof document === 'undefined') return;
|
||||
var el = document.querySelector(this.mountTo);
|
||||
|
||||
if (!el) {
|
||||
console.error("[portal-vue]: Mount Point '".concat(this.mountTo, "' not found in document"));
|
||||
return;
|
||||
}
|
||||
|
||||
var props = this.$props; // Target already exists
|
||||
|
||||
if (wormhole.targets[props.name]) {
|
||||
if (props.bail) {
|
||||
console.warn("[portal-vue]: Target ".concat(props.name, " is already mounted.\n Aborting because 'bail: true' is set"));
|
||||
} else {
|
||||
this.portalTarget = wormhole.targets[props.name];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var append = props.append;
|
||||
|
||||
if (append) {
|
||||
var type = typeof append === 'string' ? append : 'DIV';
|
||||
var mountEl = document.createElement(type);
|
||||
el.appendChild(mountEl);
|
||||
el = mountEl;
|
||||
} // get props for target from $props
|
||||
// we have to rename a few of them
|
||||
|
||||
|
||||
var _props = pick(this.$props, targetProps);
|
||||
|
||||
_props.slim = this.targetSlim;
|
||||
_props.tag = this.targetTag;
|
||||
_props.slotProps = this.targetSlotProps;
|
||||
_props.name = this.to;
|
||||
this.portalTarget = new PortalTarget({
|
||||
el: el,
|
||||
parent: this.$parent || this,
|
||||
propsData: _props
|
||||
});
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
var target = this.portalTarget;
|
||||
|
||||
if (this.append) {
|
||||
var el = target.$el;
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
|
||||
target.$destroy();
|
||||
},
|
||||
render: function render(h) {
|
||||
if (!this.portalTarget) {
|
||||
console.warn("[portal-vue] Target wasn't mounted");
|
||||
return h();
|
||||
} // if there's no "manual" scoped slot, so we create a <Portal> ourselves
|
||||
|
||||
|
||||
if (!this.$scopedSlots.manual) {
|
||||
var props = pick(this.$props, portalProps);
|
||||
return h(Portal, {
|
||||
props: props,
|
||||
attrs: this.$attrs,
|
||||
on: this.$listeners,
|
||||
scopedSlots: this.$scopedSlots
|
||||
}, this.$slots.default);
|
||||
} // else, we render the scoped slot
|
||||
|
||||
|
||||
var content = this.$scopedSlots.manual({
|
||||
to: this.to
|
||||
}); // if user used <template> for the scoped slot
|
||||
// content will be an array
|
||||
|
||||
if (Array.isArray(content)) {
|
||||
content = content[0];
|
||||
}
|
||||
|
||||
if (!content) return h();
|
||||
return content;
|
||||
}
|
||||
});
|
||||
|
||||
function install(Vue$$1) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
Vue$$1.component(options.portalName || 'Portal', Portal);
|
||||
Vue$$1.component(options.portalTargetName || 'PortalTarget', PortalTarget);
|
||||
Vue$$1.component(options.MountingPortalName || 'MountingPortal', MountingPortal);
|
||||
}
|
||||
|
||||
if ( // @ts-ignore
|
||||
typeof window !== 'undefined' && window.Vue && window.Vue === Vue) {
|
||||
window.Vue.use({
|
||||
install: install
|
||||
});
|
||||
}
|
||||
|
||||
var index = {
|
||||
install: install
|
||||
};
|
||||
|
||||
exports.default = index;
|
||||
exports.Portal = Portal;
|
||||
exports.PortalTarget = PortalTarget;
|
||||
exports.MountingPortal = MountingPortal;
|
||||
exports.Wormhole = wormhole;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
|
614
amd/src/portal-vue/portal-vue.esm.js
Normal file
614
amd/src/portal-vue/portal-vue.esm.js
Normal file
|
@ -0,0 +1,614 @@
|
|||
/* eslint-disable */
|
||||
/*!
|
||||
* portal-vue © Thorsten Lünborg, 2019
|
||||
*
|
||||
* Version: 2.1.7
|
||||
*
|
||||
* LICENCE: MIT
|
||||
*
|
||||
* https://github.com/linusborg/portal-vue
|
||||
*
|
||||
*/
|
||||
|
||||
/* Modification by PMKuipers to handle relative loading of vue */
|
||||
// Import Vue from dev or prod depending on the developerdebug setting.
|
||||
// (Importing both dev and prod seems easier than using dynamic imports, but I could be mistaken)
|
||||
import Config from "core/config";
|
||||
import VueDev from '../vue/dev/vue';
|
||||
import VueProd from '../vue/prod/vue';
|
||||
const Vue = Config.developerdebug?VueDev:VueProd;
|
||||
/* End modification */
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function (obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _toConsumableArray(arr) {
|
||||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
||||
}
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
}
|
||||
}
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
||||
}
|
||||
|
||||
function _nonIterableSpread() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
||||
}
|
||||
|
||||
var inBrowser = typeof window !== 'undefined';
|
||||
function freeze(item) {
|
||||
if (Array.isArray(item) || _typeof(item) === 'object') {
|
||||
return Object.freeze(item);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
function combinePassengers(transports) {
|
||||
var slotProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
return transports.reduce(function (passengers, transport) {
|
||||
var temp = transport.passengers[0];
|
||||
var newPassengers = typeof temp === 'function' ? temp(slotProps) : transport.passengers;
|
||||
return passengers.concat(newPassengers);
|
||||
}, []);
|
||||
}
|
||||
function stableSort(array, compareFn) {
|
||||
return array.map(function (v, idx) {
|
||||
return [idx, v];
|
||||
}).sort(function (a, b) {
|
||||
return compareFn(a[1], b[1]) || a[0] - b[0];
|
||||
}).map(function (c) {
|
||||
return c[1];
|
||||
});
|
||||
}
|
||||
function pick(obj, keys) {
|
||||
return keys.reduce(function (acc, key) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
acc[key] = obj[key];
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
var transports = {};
|
||||
var targets = {};
|
||||
var sources = {};
|
||||
var Wormhole = Vue.extend({
|
||||
data: function data() {
|
||||
return {
|
||||
transports: transports,
|
||||
targets: targets,
|
||||
sources: sources,
|
||||
trackInstances: inBrowser
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
open: function open(transport) {
|
||||
if (!inBrowser) return;
|
||||
var to = transport.to,
|
||||
from = transport.from,
|
||||
passengers = transport.passengers,
|
||||
_transport$order = transport.order,
|
||||
order = _transport$order === void 0 ? Infinity : _transport$order;
|
||||
if (!to || !from || !passengers) return;
|
||||
var newTransport = {
|
||||
to: to,
|
||||
from: from,
|
||||
passengers: freeze(passengers),
|
||||
order: order
|
||||
};
|
||||
var keys = Object.keys(this.transports);
|
||||
|
||||
if (keys.indexOf(to) === -1) {
|
||||
Vue.set(this.transports, to, []);
|
||||
}
|
||||
|
||||
var currentIndex = this.$_getTransportIndex(newTransport); // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays
|
||||
|
||||
var newTransports = this.transports[to].slice(0);
|
||||
|
||||
if (currentIndex === -1) {
|
||||
newTransports.push(newTransport);
|
||||
} else {
|
||||
newTransports[currentIndex] = newTransport;
|
||||
}
|
||||
|
||||
this.transports[to] = stableSort(newTransports, function (a, b) {
|
||||
return a.order - b.order;
|
||||
});
|
||||
},
|
||||
close: function close(transport) {
|
||||
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
var to = transport.to,
|
||||
from = transport.from;
|
||||
if (!to || !from && force === false) return;
|
||||
|
||||
if (!this.transports[to]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (force) {
|
||||
this.transports[to] = [];
|
||||
} else {
|
||||
var index = this.$_getTransportIndex(transport);
|
||||
|
||||
if (index >= 0) {
|
||||
// Copying the array here so that the PortalTarget change event will actually contain two distinct arrays
|
||||
var newTransports = this.transports[to].slice(0);
|
||||
newTransports.splice(index, 1);
|
||||
this.transports[to] = newTransports;
|
||||
}
|
||||
}
|
||||
},
|
||||
registerTarget: function registerTarget(target, vm, force) {
|
||||
if (!inBrowser) return;
|
||||
|
||||
if (this.trackInstances && !force && this.targets[target]) {
|
||||
console.warn("[portal-vue]: Target ".concat(target, " already exists"));
|
||||
}
|
||||
|
||||
this.$set(this.targets, target, Object.freeze([vm]));
|
||||
},
|
||||
unregisterTarget: function unregisterTarget(target) {
|
||||
this.$delete(this.targets, target);
|
||||
},
|
||||
registerSource: function registerSource(source, vm, force) {
|
||||
if (!inBrowser) return;
|
||||
|
||||
if (this.trackInstances && !force && this.sources[source]) {
|
||||
console.warn("[portal-vue]: source ".concat(source, " already exists"));
|
||||
}
|
||||
|
||||
this.$set(this.sources, source, Object.freeze([vm]));
|
||||
},
|
||||
unregisterSource: function unregisterSource(source) {
|
||||
this.$delete(this.sources, source);
|
||||
},
|
||||
hasTarget: function hasTarget(to) {
|
||||
return !!(this.targets[to] && this.targets[to][0]);
|
||||
},
|
||||
hasSource: function hasSource(to) {
|
||||
return !!(this.sources[to] && this.sources[to][0]);
|
||||
},
|
||||
hasContentFor: function hasContentFor(to) {
|
||||
return !!this.transports[to] && !!this.transports[to].length;
|
||||
},
|
||||
// Internal
|
||||
$_getTransportIndex: function $_getTransportIndex(_ref) {
|
||||
var to = _ref.to,
|
||||
from = _ref.from;
|
||||
|
||||
for (var i in this.transports[to]) {
|
||||
if (this.transports[to][i].from === from) {
|
||||
return +i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
});
|
||||
var wormhole = new Wormhole(transports);
|
||||
|
||||
var _id = 1;
|
||||
var Portal = Vue.extend({
|
||||
name: 'portal',
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return String(_id++);
|
||||
}
|
||||
},
|
||||
order: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
slim: {
|
||||
type: Boolean
|
||||
},
|
||||
slotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'DIV'
|
||||
},
|
||||
to: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return String(Math.round(Math.random() * 10000000));
|
||||
}
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
var _this = this;
|
||||
|
||||
this.$nextTick(function () {
|
||||
wormhole.registerSource(_this.name, _this);
|
||||
});
|
||||
},
|
||||
mounted: function mounted() {
|
||||
if (!this.disabled) {
|
||||
this.sendUpdate();
|
||||
}
|
||||
},
|
||||
updated: function updated() {
|
||||
if (this.disabled) {
|
||||
this.clear();
|
||||
} else {
|
||||
this.sendUpdate();
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
wormhole.unregisterSource(this.name);
|
||||
this.clear();
|
||||
},
|
||||
watch: {
|
||||
to: function to(newValue, oldValue) {
|
||||
oldValue && oldValue !== newValue && this.clear(oldValue);
|
||||
this.sendUpdate();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear: function clear(target) {
|
||||
var closer = {
|
||||
from: this.name,
|
||||
to: target || this.to
|
||||
};
|
||||
wormhole.close(closer);
|
||||
},
|
||||
normalizeSlots: function normalizeSlots() {
|
||||
return this.$scopedSlots.default ? [this.$scopedSlots.default] : this.$slots.default;
|
||||
},
|
||||
normalizeOwnChildren: function normalizeOwnChildren(children) {
|
||||
return typeof children === 'function' ? children(this.slotProps) : children;
|
||||
},
|
||||
sendUpdate: function sendUpdate() {
|
||||
var slotContent = this.normalizeSlots();
|
||||
|
||||
if (slotContent) {
|
||||
var transport = {
|
||||
from: this.name,
|
||||
to: this.to,
|
||||
passengers: _toConsumableArray(slotContent),
|
||||
order: this.order
|
||||
};
|
||||
wormhole.open(transport);
|
||||
} else {
|
||||
this.clear();
|
||||
}
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var children = this.$slots.default || this.$scopedSlots.default || [];
|
||||
var Tag = this.tag;
|
||||
|
||||
if (children && this.disabled) {
|
||||
return children.length <= 1 && this.slim ? this.normalizeOwnChildren(children)[0] : h(Tag, [this.normalizeOwnChildren(children)]);
|
||||
} else {
|
||||
return this.slim ? h() : h(Tag, {
|
||||
class: {
|
||||
'v-portal': true
|
||||
},
|
||||
style: {
|
||||
display: 'none'
|
||||
},
|
||||
key: 'v-portal-placeholder'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var PortalTarget = Vue.extend({
|
||||
name: 'portalTarget',
|
||||
props: {
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
slim: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
slotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'div'
|
||||
},
|
||||
transition: {
|
||||
type: [String, Object, Function]
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
transports: wormhole.transports,
|
||||
firstRender: true
|
||||
};
|
||||
},
|
||||
created: function created() {
|
||||
var _this = this;
|
||||
|
||||
this.$nextTick(function () {
|
||||
wormhole.registerTarget(_this.name, _this);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
ownTransports: function ownTransports() {
|
||||
this.$emit('change', this.children().length > 0);
|
||||
},
|
||||
name: function name(newVal, oldVal) {
|
||||
/**
|
||||
* TODO
|
||||
* This should warn as well ...
|
||||
*/
|
||||
wormhole.unregisterTarget(oldVal);
|
||||
wormhole.registerTarget(newVal, this);
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this.transition) {
|
||||
this.$nextTick(function () {
|
||||
// only when we have a transition, because it causes a re-render
|
||||
_this2.firstRender = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
wormhole.unregisterTarget(this.name);
|
||||
},
|
||||
computed: {
|
||||
ownTransports: function ownTransports() {
|
||||
var transports = this.transports[this.name] || [];
|
||||
|
||||
if (this.multiple) {
|
||||
return transports;
|
||||
}
|
||||
|
||||
return transports.length === 0 ? [] : [transports[transports.length - 1]];
|
||||
},
|
||||
passengers: function passengers() {
|
||||
return combinePassengers(this.ownTransports, this.slotProps);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// can't be a computed prop because it has to "react" to $slot changes.
|
||||
children: function children() {
|
||||
return this.passengers.length !== 0 ? this.passengers : this.$scopedSlots.default ? this.$scopedSlots.default(this.slotProps) : this.$slots.default || [];
|
||||
},
|
||||
// can't be a computed prop because it has to "react" to this.children().
|
||||
noWrapper: function noWrapper() {
|
||||
var noWrapper = this.slim && !this.transition;
|
||||
|
||||
if (noWrapper && this.children().length > 1) {
|
||||
console.warn('[portal-vue]: PortalTarget with `slim` option received more than one child element.');
|
||||
}
|
||||
|
||||
return noWrapper;
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var noWrapper = this.noWrapper();
|
||||
var children = this.children();
|
||||
var Tag = this.transition || this.tag;
|
||||
return noWrapper ? children[0] : this.slim && !Tag ? h() : h(Tag, {
|
||||
props: {
|
||||
// if we have a transition component, pass the tag if it exists
|
||||
tag: this.transition && this.tag ? this.tag : undefined
|
||||
},
|
||||
class: {
|
||||
'vue-portal-target': true
|
||||
}
|
||||
}, children);
|
||||
}
|
||||
});
|
||||
|
||||
var _id$1 = 0;
|
||||
var portalProps = ['disabled', 'name', 'order', 'slim', 'slotProps', 'tag', 'to'];
|
||||
var targetProps = ['multiple', 'transition'];
|
||||
var MountingPortal = Vue.extend({
|
||||
name: 'MountingPortal',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
append: {
|
||||
type: [Boolean, String]
|
||||
},
|
||||
bail: {
|
||||
type: Boolean
|
||||
},
|
||||
mountTo: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
// Portal
|
||||
disabled: {
|
||||
type: Boolean
|
||||
},
|
||||
// name for the portal
|
||||
name: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return 'mounted_' + String(_id$1++);
|
||||
}
|
||||
},
|
||||
order: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
slim: {
|
||||
type: Boolean
|
||||
},
|
||||
slotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'DIV'
|
||||
},
|
||||
// name for the target
|
||||
to: {
|
||||
type: String,
|
||||
default: function _default() {
|
||||
return String(Math.round(Math.random() * 10000000));
|
||||
}
|
||||
},
|
||||
// Target
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
targetSlim: {
|
||||
type: Boolean
|
||||
},
|
||||
targetSlotProps: {
|
||||
type: Object,
|
||||
default: function _default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
targetTag: {
|
||||
type: String,
|
||||
default: 'div'
|
||||
},
|
||||
transition: {
|
||||
type: [String, Object, Function]
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
if (typeof document === 'undefined') return;
|
||||
var el = document.querySelector(this.mountTo);
|
||||
|
||||
if (!el) {
|
||||
console.error("[portal-vue]: Mount Point '".concat(this.mountTo, "' not found in document"));
|
||||
return;
|
||||
}
|
||||
|
||||
var props = this.$props; // Target already exists
|
||||
|
||||
if (wormhole.targets[props.name]) {
|
||||
if (props.bail) {
|
||||
console.warn("[portal-vue]: Target ".concat(props.name, " is already mounted.\n Aborting because 'bail: true' is set"));
|
||||
} else {
|
||||
this.portalTarget = wormhole.targets[props.name];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var append = props.append;
|
||||
|
||||
if (append) {
|
||||
var type = typeof append === 'string' ? append : 'DIV';
|
||||
var mountEl = document.createElement(type);
|
||||
el.appendChild(mountEl);
|
||||
el = mountEl;
|
||||
} // get props for target from $props
|
||||
// we have to rename a few of them
|
||||
|
||||
|
||||
var _props = pick(this.$props, targetProps);
|
||||
|
||||
_props.slim = this.targetSlim;
|
||||
_props.tag = this.targetTag;
|
||||
_props.slotProps = this.targetSlotProps;
|
||||
_props.name = this.to;
|
||||
this.portalTarget = new PortalTarget({
|
||||
el: el,
|
||||
parent: this.$parent || this,
|
||||
propsData: _props
|
||||
});
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
var target = this.portalTarget;
|
||||
|
||||
if (this.append) {
|
||||
var el = target.$el;
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
|
||||
target.$destroy();
|
||||
},
|
||||
render: function render(h) {
|
||||
if (!this.portalTarget) {
|
||||
console.warn("[portal-vue] Target wasn't mounted");
|
||||
return h();
|
||||
} // if there's no "manual" scoped slot, so we create a <Portal> ourselves
|
||||
|
||||
|
||||
if (!this.$scopedSlots.manual) {
|
||||
var props = pick(this.$props, portalProps);
|
||||
return h(Portal, {
|
||||
props: props,
|
||||
attrs: this.$attrs,
|
||||
on: this.$listeners,
|
||||
scopedSlots: this.$scopedSlots
|
||||
}, this.$slots.default);
|
||||
} // else, we render the scoped slot
|
||||
|
||||
|
||||
var content = this.$scopedSlots.manual({
|
||||
to: this.to
|
||||
}); // if user used <template> for the scoped slot
|
||||
// content will be an array
|
||||
|
||||
if (Array.isArray(content)) {
|
||||
content = content[0];
|
||||
}
|
||||
|
||||
if (!content) return h();
|
||||
return content;
|
||||
}
|
||||
});
|
||||
|
||||
function install(Vue$$1) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
Vue$$1.component(options.portalName || 'Portal', Portal);
|
||||
Vue$$1.component(options.portalTargetName || 'PortalTarget', PortalTarget);
|
||||
Vue$$1.component(options.MountingPortalName || 'MountingPortal', MountingPortal);
|
||||
}
|
||||
|
||||
var index = {
|
||||
install: install
|
||||
};
|
||||
|
||||
export default index;
|
||||
export { Portal, PortalTarget, MountingPortal, wormhole as Wormhole };
|
||||
//# sourceMappingURL=portal-vue.esm.js.map
|
|
@ -5,9 +5,8 @@
|
|||
/*eslint-env es6*/
|
||||
// Put this file in path/to/plugin/amd/src
|
||||
// You can call it anything you like
|
||||
import Debugger from './debugger';
|
||||
import Debugger from './util/debugger';
|
||||
let debug = new Debugger("primary-nav-tools");
|
||||
debug.enable();
|
||||
|
||||
/**
|
||||
* Hide a primary navigation item by href
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
/*eslint-env es6*/
|
||||
// Put this file in path/to/plugin/amd/src
|
||||
|
||||
import {SimpleLine} from './simpleline';
|
||||
import {SimpleLine} from './simpleline/simpleline';
|
||||
import {get_strings} from 'core/str';
|
||||
import {load_strings, format_date} from './string-helper';
|
||||
import {load_strings, format_date} from './util/string-helper';
|
||||
import {call} from 'core/ajax';
|
||||
import notification from 'core/notification';
|
||||
import {svgarcpath} from './svgarc';
|
||||
import Debugger from './debugger';
|
||||
import Config from "core/config";
|
||||
import {svgarcpath} from './svgarc/svgarc';
|
||||
import Debugger from './util/debugger';
|
||||
import Config from 'core/config';
|
||||
|
||||
// Make π available as a constant
|
||||
const π = Math.PI;
|
||||
|
@ -23,7 +23,8 @@ const LINE_GRAVITY = 1.3;
|
|||
export default {
|
||||
install(Vue/*,options*/){
|
||||
let debug = new Debugger("treestudyplan-viewer");
|
||||
debug.enable();
|
||||
|
||||
debug.warn(Config);
|
||||
let lastCaller = null;
|
||||
/**
|
||||
* Scroll current period into view
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user