Reverted vue mode switching to build stage instead of dynamic in js

This commit is contained in:
PMKuipers 2023-08-22 23:12:33 +02:00
parent e3e69a88e6
commit beabb7d84f
40 changed files with 12136 additions and 218 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,3 @@
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")}));
define("local_treestudyplan/page-myreport",["exports","core/ajax","core/notification","./vue/vue","./report-viewer-components","./treestudyplan-components","./util/debugger","./studyplan-processor","./portal-vue/portal-vue.esm","./bootstrap-vue/bootstrap-vue.esm"],(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")}));
//# sourceMappingURL=page-myreport.min.js.map

View file

@ -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';\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"}
{"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\nimport Vue from './vue/vue';\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","use","RVComponents","PortalVue","BootstrapVue","Debugger"],"mappings":"qkBAmCsBA,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,yYAxEbC,IAAIC,8CASJD,IAAIE,iCAEJF,IAAIG,2BAEJ3B,MAAQ,IAAI4B,kBAAS"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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/util/svgarc.min.js vendored Normal file
View file

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

View file

@ -0,0 +1 @@
{"version":3,"file":"svgarc.min.js","sources":["../../src/util/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":"qyCAoBMA,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"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -11,12 +11,7 @@
/* Path modifications by PMKuipers to handle relative loading of vue in moodle context*/
// 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 Vue from '../vue/vue';
import { mergeData } from './vue-functional-data-merge';
import Popper from 'core/popper'; // Popper is included in core

View file

@ -1,6 +1,6 @@
Instructions for downloading and integrating bootstrap-vue
Instructions for downloading and integrating bootstrap-vue and associoated files
1. download bootstrap-vue distribusion throuhg npm
1. download bootstrap-vue distribusion through npm
npm install bootstrap-vue@2.23.1
2. Copy node_modules/bootstrap-vue/dist/bootstrap-vue.esm.js to amd/src/bootstrap-vue
@ -8,16 +8,29 @@ Instructions for downloading and integrating bootstrap-vue
3. Change import statements on top of bootstrap-vue.esm to:
/* Path modifications to handle relative loading of vue in moodle context */
// 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;
/* Path modifications by PMKuipers to handle relative loading of vue in moodle context*/
import Vue from '../vue/vue';
import { mergeData } from './vue-functional-data-merge';
import Popper from 'core/popper'; // Popper is included in core
import { Wormhole, PortalTarget, Portal } from '../portal-vue/portal-vue.esm';
/* End modifications */
import { mergeData } from './vue-functional-data-merge';
import Popper from 'core/popper'; // Popper is included in core
import { Wormhole, PortalTarget, Portal } from '../portal-vue/portal-vue.esm';
/* End modifications */
4. add /* eslint-disable */ to top of bootstrap-vue.esm.js
--------- vue-functional-data-merge.js ----------
6. install node typescript compiler
sudo npm install -g typescript
5. clone https://github.com/alexsasharegan/vue-functional-data-merge into a folder
in the cloned folder call
tsc -t es6 src/index.ts
6. Copy the newley generated src/index.js to amd/src/bootstrap-vue/vue-functional-data-merge.js
7. add the following to top of vue-functional-data-merge.js
/* eslint-disable */
/*
<content of LICENSE.md from the vue-functional-data-merge git repository>
*/

View file

@ -10,12 +10,8 @@ import {get_string,get_strings} from 'core/str';
import {call} from 'core/ajax';
import notification from 'core/notification';
// 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 Vue from './vue/vue';
import EditorComponents from './studyplan-editor-components';
Vue.use(EditorComponents);

View file

@ -10,12 +10,7 @@
import {call} from 'core/ajax';
import notification from 'core/notification';
// 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 Vue from './vue/vue';
import RVComponents from './report-viewer-components';
Vue.use(RVComponents);

View file

@ -9,13 +9,7 @@
import {call} from 'core/ajax';
import notification from 'core/notification';
// 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 Vue from './vue/vue';
import Debugger from './util/debugger';
import {load_strings} from './util/string-helper';

View file

@ -11,12 +11,7 @@
*/
/* 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;
import Vue from '../vue/vue';
/* End modification */
function _typeof(obj) {

View file

@ -8,11 +8,7 @@ Instructions for downloading and integrating portal-vue
3. Change import statements on top of bootstrap-vue.esm to:
/* Modification 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;
import Vue from '../vue/vue';
/* End modification */
4. add /* eslint-disable */ to top of file

View file

@ -11,7 +11,7 @@ import {get_strings} from 'core/str';
import {load_strings, format_date} from './util/string-helper';
import {call} from 'core/ajax';
import notification from 'core/notification';
import {svgarcpath} from './svgarc/svgarc';
import {svgarcpath} from './util/svgarc';
import Debugger from './util/debugger';
import Config from 'core/config';

View file

@ -0,0 +1,2 @@
A number of simple utility scripts that could be easily re-used are collected here.
Most are more like boilerplate tools than real separate scripts

View file

@ -0,0 +1,13 @@
Instructions for downloading and integrating vue-easy-dnd
1. download vue-easy-dnd distribusion throuhg npm
npm install vue-easy-dnd@
2. Copy node_modules/vue-easy-dnd/dist/vue-easy-dnd.esm.js to amd/src/vue-easy-dnd
3. Change import statement
... from 'vue';
into
... from '../vue/vue';
4. add /* eslint-disable */ to top of file

View file

@ -6,13 +6,7 @@
* @license MIT
*/
// 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 Vue from './vue/vue';
// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills

View file

@ -1,7 +1,8 @@
import { reactive, openBlock, createBlock, resolveDynamicComponent, normalizeClass, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementBlock, createCommentVNode, renderList, TransitionGroup, h, nextTick } from 'vue';
function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get("*"))&&i.slice().map(function(n){n(t,e);});}}}
/* eslint-disable */
import { reactive, openBlock, createBlock, resolveDynamicComponent, normalizeClass, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementBlock, createCommentVNode, renderList, TransitionGroup, h, nextTick } from '../vue/vue';
function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get("*"))&&i.slice().map(function(n){n(t,e);});}}}
/**
* This is the class of the global object that holds the state of the drag and drop during its progress. It emits events
* reporting its state evolution during the progress of the drag and drop. Its data is reactive and listeners can be
@ -109,8 +110,8 @@ class DnD {
}
}
const dnd = reactive(new DnD());
const dnd = reactive(new DnD());
var DragAwareMixin = {
data () {
return {
@ -137,8 +138,8 @@ var DragAwareMixin = {
return dnd.top;
}
}
};
};
/**
* This files contains the primitives required to create drag images from HTML elements that serve as models. A snapshot
* of the computed styles of the model elements is taken when creating the drag image, so that it will look the same as
@ -198,8 +199,8 @@ function copyStyle (src, destination) {
}
}
destination.style.pointerEvents = 'none';
}
}
// Forked from https://gist.github.com/gre/296291b8ce0d8fe6e1c3ea4f1d1c5c3b
const regex = /(auto|scroll)/;
@ -217,8 +218,8 @@ const scrollparent = (node) =>
? document.body
: scroll(node)
? node
: scrollparent(node.parentNode);
: scrollparent(node.parentNode);
// Forked from https://github.com/bennadel/JavaScript-Demos/blob/master/demos/window-edge-scrolling/index.htm
// Code was altered to work with scrollable containers
@ -393,8 +394,8 @@ function performEdgeScroll (event, container, clientX, clientY, edgeSize) {
}
return true;
}
}
var DragMixin = {
mixins: [DragAwareMixin],
props: {
@ -777,8 +778,8 @@ var DragMixin = {
this.$el.removeEventListener('mousedown', this.onMouseDown);
this.$el.removeEventListener('touchstart', this.onMouseDown);
}
};
};
var script$4 = {
name: 'Drag',
mixins: [DragMixin],
@ -796,42 +797,42 @@ var script$4 = {
return Object.entries(this.$slots).filter(([key]) => key !== 'drag-image' && key !== 'default');
}
}
};
const _hoisted_1$2 = {
key: 0,
ref: "drag-image",
class: "__drag-image"
};
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock(resolveDynamicComponent($props.tag), {
class: normalizeClass(_ctx.cssClasses)
}, createSlots({
default: withCtx(() => [
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$slots['default'] || {}))),
(_ctx.dragInitialised)
? (openBlock(), createElementBlock("div", _hoisted_1$2, [
renderSlot(_ctx.$slots, "drag-image")
], 512 /* NEED_PATCH */))
: createCommentVNode("v-if", true)
]),
_: 2 /* DYNAMIC */
}, [
renderList($options.dynamicSlots, ([slot, args]) => {
return {
name: slot,
fn: withCtx(() => [
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))
])
}
})
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"]))
}
script$4.render = render$3;
script$4.__scopeId = "data-v-f87407ce";
};
const _hoisted_1$2 = {
key: 0,
ref: "drag-image",
class: "__drag-image"
};
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock(resolveDynamicComponent($props.tag), {
class: normalizeClass(_ctx.cssClasses)
}, createSlots({
default: withCtx(() => [
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$slots['default'] || {}))),
(_ctx.dragInitialised)
? (openBlock(), createElementBlock("div", _hoisted_1$2, [
renderSlot(_ctx.$slots, "drag-image")
], 512 /* NEED_PATCH */))
: createCommentVNode("v-if", true)
]),
_: 2 /* DYNAMIC */
}, [
renderList($options.dynamicSlots, ([slot, args]) => {
return {
name: slot,
fn: withCtx(() => [
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))
])
}
})
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"]))
}
script$4.render = render$3;
script$4.__scopeId = "data-v-f87407ce";
function dropAllowed (inst) {
if (inst.dragInProgress && inst.typeAllowed) {
return inst.compatibleMode && inst.effectiveAcceptsData(inst.dragData, inst.dragType);
@ -1000,8 +1001,8 @@ var DropMixin = {
dnd.off('drop', this.onDrop);
dnd.off('dragend', this.onDragEnd);
}
};
};
var script$3 = {
name: 'Drop',
mixins: [DropMixin],
@ -1019,45 +1020,45 @@ var script$3 = {
return this.dragInProgress && this.typeAllowed && !!this.$slots['drag-image'];
}
}
};
const _hoisted_1$1 = {
key: 0,
ref: "drag-image",
class: "__drag-image"
};
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock(resolveDynamicComponent($props.tag), {
class: normalizeClass(_ctx.cssClasses)
}, createSlots({
default: withCtx(() => [
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$slots['default'] || {}))),
($options.showDragImage)
? (openBlock(), createElementBlock("div", _hoisted_1$1, [
renderSlot(_ctx.$slots, "drag-image", {
type: _ctx.dragType,
data: _ctx.dragData
})
], 512 /* NEED_PATCH */))
: createCommentVNode("v-if", true)
]),
_: 2 /* DYNAMIC */
}, [
renderList($options.dynamicSlots, ([slot, args]) => {
return {
name: slot,
fn: withCtx(() => [
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))
])
}
})
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"]))
}
script$3.render = render$2;
script$3.__scopeId = "data-v-12a39e52";
};
const _hoisted_1$1 = {
key: 0,
ref: "drag-image",
class: "__drag-image"
};
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock(resolveDynamicComponent($props.tag), {
class: normalizeClass(_ctx.cssClasses)
}, createSlots({
default: withCtx(() => [
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$slots['default'] || {}))),
($options.showDragImage)
? (openBlock(), createElementBlock("div", _hoisted_1$1, [
renderSlot(_ctx.$slots, "drag-image", {
type: _ctx.dragType,
data: _ctx.dragData
})
], 512 /* NEED_PATCH */))
: createCommentVNode("v-if", true)
]),
_: 2 /* DYNAMIC */
}, [
renderList($options.dynamicSlots, ([slot, args]) => {
return {
name: slot,
fn: withCtx(() => [
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))
])
}
})
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"]))
}
script$3.render = render$2;
script$3.__scopeId = "data-v-12a39e52";
var script$2 = {
name: 'DropMask',
mixins: [DragAwareMixin],
@ -1086,37 +1087,37 @@ var script$2 = {
dnd.mouseMove(e, this);
}
}
};
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock(resolveDynamicComponent($props.tag), null, createSlots({ _: 2 /* DYNAMIC */ }, [
renderList(_ctx.$slots, (args, slot) => {
return {
name: slot,
fn: withCtx(() => [
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))
])
}
})
]), 1024 /* DYNAMIC_SLOTS */))
}
script$2.render = render$1;
};
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock(resolveDynamicComponent($props.tag), null, createSlots({ _: 2 /* DYNAMIC */ }, [
renderList(_ctx.$slots, (args, slot) => {
return {
name: slot,
fn: withCtx(() => [
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))
])
}
})
]), 1024 /* DYNAMIC_SLOTS */))
}
script$2.render = render$1;
var script$1 = {
name: 'DragFeedback'
};
const _hoisted_1 = { class: "DragFeedback" };
function render(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createElementBlock("div", _hoisted_1, [
renderSlot(_ctx.$slots, "default")
]))
}
script$1.render = render;
};
const _hoisted_1 = { class: "DragFeedback" };
function render(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createElementBlock("div", _hoisted_1, [
renderSlot(_ctx.$slots, "default")
]))
}
script$1.render = render;
class Grid {
reference;
referenceOriginalPosition;
@ -1222,8 +1223,8 @@ class Grid {
}
return index;
}
}
}
class DnDEvent {
type;
data;
@ -1262,8 +1263,8 @@ class InsertEvent {
this.data = data;
this.index = index;
}
}
}
var script = {
name: 'DropList',
mixins: [DropMixin],
@ -1688,10 +1689,10 @@ var script = {
}
);
}
};
script.__scopeId = "data-v-230f65e3";
};
script.__scopeId = "data-v-230f65e3";
/**
* This class reacts to drag events emitted by the dnd object to manage a sequence of drag images and fade from one to the
* other as the drag progresses.
@ -1836,6 +1837,6 @@ class DragImagesManager {
}
new DragImagesManager();
export { DnDEvent, script$4 as Drag, DragAwareMixin, script$1 as DragFeedback, DragImagesManager, DragMixin, script$3 as Drop, script as DropList, script$2 as DropMask, DropMixin, InsertEvent, ReorderEvent, createDragImage, dnd };
new DragImagesManager();
export { DnDEvent, script$4 as Drag, DragAwareMixin, script$1 as DragFeedback, DragImagesManager, DragMixin, script$3 as Drop, script as DropList, script$2 as DropMask, DropMixin, InsertEvent, ReorderEvent, createDragImage, dnd };

View file

@ -4,13 +4,7 @@
'use strict';
// 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 Vue from './vue/vue';
import {Component, createDecorator, mixins } from './vue-class-component';
export { Component, Vue, mixins as Mixins };

View file

@ -1,5 +1,5 @@
/* eslint-disable */
/*eslint no-unused-vars: "off" */
/* eslint no-unused-vars: "off" */
/*!
* Vue.js v2.7.14
* (c) 2014-2022 Evan You

View file

@ -0,0 +1,11 @@
Instructions for downloading and integrating vue
1. download bootstrap-vue distribusion throuhg npm
npm install vue@2.7.14
2. Copy node_modules/vue/dist/vue.js to amd/src/vue/dev/vue.js
Copy node_modules/vue/dist/vue.min.css to amd/src/vue/prod/vue.js
4. add the following to top of both files
/* eslint-disable */
/* eslint no-unused-vars: "off" */

11911
amd/src/vue/vue.js Normal file

File diff suppressed because it is too large Load diff