From 09605834aea7cb1137762e3b3be4fb27ae91f9fe Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Wed, 23 Aug 2023 23:03:53 +0200 Subject: [PATCH] Updated vue-easy-dnd to latest version supporting vue2 --- .../vue-easy-dnd/vue-class-component.min.js | 2 +- .../vue-class-component.min.js.map | 2 +- .../vue-property-decorator.min.js | 2 +- .../vue-property-decorator.min.js.map | 2 +- amd/src/page-edit-plan.js | 2 +- amd/src/vue-easy-dnd/readme-moodle.txt | 50 +- amd/src/vue-easy-dnd/vue-class-component.js | 519 +++--- amd/src/vue-easy-dnd/vue-easy-dnd.js | 1586 ----------------- .../vue-easy-dnd/vue-property-decorator.js | 10 +- thirdpartylibs.xml | 97 +- 10 files changed, 397 insertions(+), 1875 deletions(-) delete mode 100644 amd/src/vue-easy-dnd/vue-easy-dnd.js diff --git a/amd/build/vue-easy-dnd/vue-class-component.min.js b/amd/build/vue-easy-dnd/vue-class-component.min.js index 7855687..7721a21 100644 --- a/amd/build/vue-easy-dnd/vue-class-component.min.js +++ b/amd/build/vue-easy-dnd/vue-class-component.min.js @@ -1,3 +1,3 @@ -define("local_treestudyplan/vue-easy-dnd/vue-class-component",["exports","./vue/vue"],(function(_exports,_vue){var obj;function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||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)||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.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&void 0!==arguments[1]?arguments[1]:{};options.name=options.name||Component._componentTag||Component.name;var proto=Component.prototype;Object.getOwnPropertyNames(proto).forEach((function(key){if("constructor"!==key)if($internalHooks.indexOf(key)>-1)options[key]=proto[key];else{var descriptor=Object.getOwnPropertyDescriptor(proto,key);void 0!==descriptor.value?"function"==typeof descriptor.value?(options.methods||(options.methods={}))[key]=descriptor.value:(options.mixins||(options.mixins=[])).push({data:function(){return function(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({},key,descriptor.value)}}):(descriptor.get||descriptor.set)&&((options.computed||(options.computed={}))[key]={get:descriptor.get,set:descriptor.set})}})),(options.mixins||(options.mixins=[])).push({data:function(){return function(vm,Component){var originalInit=Component.prototype._init;Component.prototype._init=function(){var _this=this,keys=Object.getOwnPropertyNames(vm);if(vm.$options.props)for(var key in vm.$options.props)vm.hasOwnProperty(key)||keys.push(key);keys.forEach((function(key){Object.defineProperty(_this,key,{get:function(){return vm[key]},set:function(value){vm[key]=value},configurable:!0})}))};var data=new Component;Component.prototype._init=originalInit;var plainData={};return Object.keys(data).forEach((function(key){void 0!==data[key]&&(plainData[key]=data[key])})),!(Component.prototype instanceof _vue.default)&&Object.keys(plainData).length>0&&warn("Component class must inherit Vue or its descendant class when class property is used."),plainData}(this,Component)}});var decorators=Component.__decorators__;decorators&&(decorators.forEach((function(fn){return fn(options)})),delete Component.__decorators__);var to,from,superProto=Object.getPrototypeOf(Component.prototype),Super=superProto instanceof _vue.default?superProto.constructor:_vue.default,Extended=Super.extend(options);return function(Extended,Original,Super){Object.getOwnPropertyNames(Original).forEach((function(key){if(!shouldIgnore[key]){var extendedDescriptor=Object.getOwnPropertyDescriptor(Extended,key);if(!extendedDescriptor||extendedDescriptor.configurable){var value,type,descriptor=Object.getOwnPropertyDescriptor(Original,key);if(!hasProto){if("cid"===key)return;var superDescriptor=Object.getOwnPropertyDescriptor(Super,key);if(value=descriptor.value,type=_typeof(value),null!=value&&("object"===type||"function"===type)&&superDescriptor&&superDescriptor.value===descriptor.value)return}reservedPropertyNames.indexOf(key)>=0&&warn("Static property name '".concat(key,"' declared on class '").concat(Original.name,"' ")+"conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."),Object.defineProperty(Extended,key,descriptor)}}}))}(Extended,Component,Super),"undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys&&(forwardMetadata(to=Extended,from=Component),Object.getOwnPropertyNames(from.prototype).forEach((function(key){forwardMetadata(to.prototype,from.prototype,key)})),Object.getOwnPropertyNames(from).forEach((function(key){forwardMetadata(to,from,key)}))),Extended}var reservedPropertyNames=["cid","super","options","superOptions","extendOptions","sealedOptions","component","directive","filter"],shouldIgnore={prototype:!0,arguments:!0,callee:!0,caller:!0};function Component(options){return"function"==typeof options?componentFactory(options):function(Component){return componentFactory(Component,options)}}Component.registerHooks=function(keys){$internalHooks.push.apply($internalHooks,_toConsumableArray(keys))}})); +define("local_treestudyplan/vue-easy-dnd/vue-class-component",["exports","../vue/vue"],(function(_exports,_vue){var obj;function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||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)||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.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&void 0!==arguments[1]?arguments[1]:{};options.name=options.name||Component._componentTag||Component.name;var proto=Component.prototype;Object.getOwnPropertyNames(proto).forEach((function(key){if("constructor"!==key)if($internalHooks.indexOf(key)>-1)options[key]=proto[key];else{var descriptor=Object.getOwnPropertyDescriptor(proto,key);void 0!==descriptor.value?"function"==typeof descriptor.value?(options.methods||(options.methods={}))[key]=descriptor.value:(options.mixins||(options.mixins=[])).push({data:function(){return function(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({},key,descriptor.value)}}):(descriptor.get||descriptor.set)&&((options.computed||(options.computed={}))[key]={get:descriptor.get,set:descriptor.set})}})),(options.mixins||(options.mixins=[])).push({data:function(){return function(vm,Component){var originalInit=Component.prototype._init;Component.prototype._init=function(){var _this=this,keys=Object.getOwnPropertyNames(vm);if(vm.$options.props)for(var key in vm.$options.props)vm.hasOwnProperty(key)||keys.push(key);keys.forEach((function(key){Object.defineProperty(_this,key,{get:function(){return vm[key]},set:function(value){vm[key]=value},configurable:!0})}))};var data=new Component;Component.prototype._init=originalInit;var plainData={};return Object.keys(data).forEach((function(key){void 0!==data[key]&&(plainData[key]=data[key])})),!(Component.prototype instanceof _vue.default)&&Object.keys(plainData).length>0&&warn("Component class must inherit Vue or its descendant class when class property is used."),plainData}(this,Component)}});var decorators=Component.__decorators__;decorators&&(decorators.forEach((function(fn){return fn(options)})),delete Component.__decorators__);var to,from,superProto=Object.getPrototypeOf(Component.prototype),Super=superProto instanceof _vue.default?superProto.constructor:_vue.default,Extended=Super.extend(options);return function(Extended,Original,Super){Object.getOwnPropertyNames(Original).forEach((function(key){if(!shouldIgnore[key]){var extendedDescriptor=Object.getOwnPropertyDescriptor(Extended,key);if(!extendedDescriptor||extendedDescriptor.configurable){var value,type,descriptor=Object.getOwnPropertyDescriptor(Original,key);if(!hasProto){if("cid"===key)return;var superDescriptor=Object.getOwnPropertyDescriptor(Super,key);if(value=descriptor.value,type=_typeof(value),null!=value&&("object"===type||"function"===type)&&superDescriptor&&superDescriptor.value===descriptor.value)return}reservedPropertyNames.indexOf(key)>=0&&warn("Static property name '".concat(key,"' declared on class '").concat(Original.name,"' ")+"conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."),Object.defineProperty(Extended,key,descriptor)}}}))}(Extended,Component,Super),"undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys&&(forwardMetadata(to=Extended,from=Component),Object.getOwnPropertyNames(from.prototype).forEach((function(key){forwardMetadata(to.prototype,from.prototype,key)})),Object.getOwnPropertyNames(from).forEach((function(key){forwardMetadata(to,from,key)}))),Extended}var reservedPropertyNames=["cid","super","options","superOptions","extendOptions","sealedOptions","component","directive","filter"],shouldIgnore={prototype:!0,arguments:!0,callee:!0,caller:!0};function Component(options){return"function"==typeof options?componentFactory(options):function(Component){return componentFactory(Component,options)}}Component.registerHooks=function(keys){$internalHooks.push.apply($internalHooks,_toConsumableArray(keys))}})); //# sourceMappingURL=vue-class-component.min.js.map \ No newline at end of file diff --git a/amd/build/vue-easy-dnd/vue-class-component.min.js.map b/amd/build/vue-easy-dnd/vue-class-component.min.js.map index ba78e2b..77d4095 100644 --- a/amd/build/vue-easy-dnd/vue-class-component.min.js.map +++ b/amd/build/vue-easy-dnd/vue-class-component.min.js.map @@ -1 +1 @@ -{"version":3,"file":"vue-class-component.min.js","sources":["../../src/vue-easy-dnd/vue-class-component.js"],"sourcesContent":["/* eslint-disable */\n/*eslint no-unused-vars: \"off\" */\n/**\n * vue-class-component v7.2.5\n * (c) 2015-present Evan You\n * @license MIT\n */\n\nimport Vue from './vue/vue';\n\n\n // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n // which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n // Without this check consumers will encounter hard to track down runtime errors.\n function reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n }\n function copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(key => {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(key => {\n forwardMetadata(to, from, key);\n });\n }\n \n function forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(metaKey => {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n \n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n }\n \n var fakeArray = {\n __proto__: []\n };\n var hasProto = fakeArray instanceof Array;\n function createDecorator(factory) {\n return (target, key, index) => {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n \n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n \n if (typeof index !== 'number') {\n index = undefined;\n }\n \n Ctor.__decorators__.push(options => factory(options, key, index));\n };\n }\n function mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n \n return Vue.extend({\n mixins: Ctors\n });\n }\n function isPrimitive(value) {\n var type = typeof value;\n return value == null || type !== 'object' && type !== 'function';\n }\n function warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n }\n \n function collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n \n Component.prototype._init = function () {\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n \n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n \n keys.forEach(key => {\n Object.defineProperty(this, key, {\n get: () => vm[key],\n set: value => {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n \n \n var data = new Component(); // restore original _init to avoid memory leak (#209)\n \n Component.prototype._init = originalInit; // create plain data object\n \n var plainData = {};\n Object.keys(data).forEach(key => {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n \n {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n \n return plainData;\n }\n \n var $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n ];\n function componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n \n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n \n \n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n \n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n \n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data() {\n return {\n [key]: descriptor.value\n };\n }\n \n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data() {\n return collectDataFromConstructor(this, Component);\n }\n \n }); // decorate options\n \n var decorators = Component.__decorators__;\n \n if (decorators) {\n decorators.forEach(fn => fn(options));\n delete Component.__decorators__;\n } // find super\n \n \n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n \n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n \n return Extended;\n }\n var reservedPropertyNames = [// Unique id\n 'cid', // Super Vue constructor\n 'super', // Component options that will be used by the component\n 'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n 'component', 'directive', 'filter'];\n var shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n };\n \n function forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(key => {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n \n \n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n \n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n \n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n \n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n \n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n \n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n \n \n if ( reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n \n Object.defineProperty(Extended, key, descriptor);\n });\n }\n \n function Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n \n return function (Component) {\n return componentFactory(Component, options);\n };\n }\n \n Component.registerHooks = function registerHooks(keys) {\n $internalHooks.push(...keys);\n };\n \n export { Component, createDecorator, mixins };\n "],"names":["forwardMetadata","to","from","propertyKey","Reflect","getOwnMetadataKeys","forEach","metaKey","metadata","getOwnMetadata","defineMetadata","factory","target","key","index","Ctor","constructor","__decorators__","undefined","push","options","_len","arguments","length","Ctors","Array","_key","Vue","extend","mixins","hasProto","__proto__","warn","message","console","$internalHooks","componentFactory","Component","name","_componentTag","proto","prototype","Object","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","value","methods","data","get","set","computed","vm","originalInit","_init","keys","$options","props","hasOwnProperty","defineProperty","_this","configurable","plainData","collectDataFromConstructor","this","decorators","fn","superProto","getPrototypeOf","Super","Extended","Original","shouldIgnore","extendedDescriptor","type","superDescriptor","reservedPropertyNames","concat","forwardStaticMembers","callee","caller","registerHooks"],"mappings":"8xCA2BUA,gBAAgBC,GAAIC,KAAMC,cAClBA,YAAcC,QAAQC,mBAAmBH,KAAMC,aAAeC,QAAQC,mBAAmBH,OAC/FI,SAAQ,SAAAC,aACXC,SAAWL,YAAcC,QAAQK,eAAeF,QAASL,KAAMC,aAAeC,QAAQK,eAAeF,QAASL,MAE9GC,YACFC,QAAQM,eAAeH,QAASC,SAAUP,GAAIE,aAE9CC,QAAQM,eAAeH,QAASC,SAAUP,8HASvBU,gBAChB,SAACC,OAAQC,IAAKC,WACfC,KAAyB,mBAAXH,OAAwBA,OAASA,OAAOI,YAErDD,KAAKE,iBACRF,KAAKE,eAAiB,IAGH,iBAAVH,QACTA,WAAQI,GAGVH,KAAKE,eAAeE,MAAK,SAAAC,gBAAWT,QAAQS,QAASP,IAAKC,2CAIvD,IAAIO,KAAOC,UAAUC,OAAQC,MAAQ,IAAIC,MAAMJ,MAAOK,KAAO,EAAGA,KAAOL,KAAMK,OAChFF,MAAME,MAAQJ,UAAUI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CkC,CAAqBR,SAAUlC,UAAWiC,OA5KhB,oBAAZlE,SAA2BA,QAAQM,gBAAkBN,QAAQC,qBAG3EL,gBAD8BC,GA6KLsE,SA7KSrE,KA6KCmC,WA3KnCK,OAAOC,oBAAoBzC,KAAKuC,WAAWnC,SAAQ,SAAAO,KACjDb,gBAAgBC,GAAGwC,UAAWvC,KAAKuC,UAAW5B,QAEhD6B,OAAOC,oBAAoBzC,MAAMI,SAAQ,SAAAO,KACvCb,gBAAgBC,GAAIC,KAAMW,SA0KrB0D,aAELM,sBAAwB,CAC5B,MACA,QACA,UAAW,eAAgB,gBAAiB,gBAC5C,YAAa,YAAa,UACtBJ,aAAe,CACjBhC,WAAW,EACXnB,WAAW,EACX0D,QAAQ,EACRC,QAAQ,YAkDD5C,UAAUjB,eACM,mBAAZA,QACFgB,iBAAiBhB,SAGnB,SAAUiB,kBACRD,iBAAiBC,UAAWjB,UAIvCiB,UAAU6C,cAAgB,SAAuB1B,MAC/CrB,eAAehB,WAAfgB,kCAAuBqB"} \ No newline at end of file +{"version":3,"file":"vue-class-component.min.js","sources":["../../src/vue-easy-dnd/vue-class-component.js"],"sourcesContent":["/* eslint-disable */\n/*eslint no-unused-vars: \"off\" */\n/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from '../vue/vue';\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(key => {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(key => {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(metaKey => {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return (target, key, index) => {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(options => factory(options, key, index));\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = typeof value;\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(key => {\n Object.defineProperty(this, key, {\n get: () => vm[key],\n set: value => {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(key => {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data() {\n return {\n [key]: descriptor.value\n };\n }\n\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data() {\n return collectDataFromConstructor(this, Component);\n }\n\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(fn => fn(options));\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(key => {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if ( reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push(...keys);\n};\n\nexport { Component, createDecorator, mixins };\n"],"names":["forwardMetadata","to","from","propertyKey","Reflect","getOwnMetadataKeys","forEach","metaKey","metadata","getOwnMetadata","defineMetadata","factory","target","key","index","Ctor","constructor","__decorators__","undefined","push","options","_len","arguments","length","Ctors","Array","_key","Vue","extend","mixins","hasProto","__proto__","warn","message","console","$internalHooks","componentFactory","Component","name","_componentTag","proto","prototype","Object","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","value","methods","data","get","set","computed","vm","originalInit","_init","keys","$options","props","hasOwnProperty","defineProperty","_this","configurable","plainData","collectDataFromConstructor","this","decorators","fn","superProto","getPrototypeOf","Super","Extended","Original","shouldIgnore","extendedDescriptor","type","superDescriptor","reservedPropertyNames","concat","forwardStaticMembers","callee","caller","registerHooks"],"mappings":"+xCAyBSA,gBAAgBC,GAAIC,KAAMC,cAClBA,YAAcC,QAAQC,mBAAmBH,KAAMC,aAAeC,QAAQC,mBAAmBH,OAC/FI,SAAQ,SAAAC,aACXC,SAAWL,YAAcC,QAAQK,eAAeF,QAASL,KAAMC,aAAeC,QAAQK,eAAeF,QAASL,MAE9GC,YACFC,QAAQM,eAAeH,QAASC,SAAUP,GAAIE,aAE9CC,QAAQM,eAAeH,QAASC,SAAUP,8HASvBU,gBAChB,SAACC,OAAQC,IAAKC,WACfC,KAAyB,mBAAXH,OAAwBA,OAASA,OAAOI,YAErDD,KAAKE,iBACRF,KAAKE,eAAiB,IAGH,iBAAVH,QACTA,WAAQI,GAGVH,KAAKE,eAAeE,MAAK,SAAAC,gBAAWT,QAAQS,QAASP,IAAKC,2CAIvD,IAAIO,KAAOC,UAAUC,OAAQC,MAAQ,IAAIC,MAAMJ,MAAOK,KAAO,EAAGA,KAAOL,KAAMK,OAChFF,MAAME,MAAQJ,UAAUI,aAGnBC,aAAIC,OAAO,CAChBC,OAAQL,+DAtBRM,SAHY,CACdC,UAAW,cAEuBN,eA6B3BO,KAAKC,SACW,oBAAZC,SACTA,QAAQF,KAAK,yBAA2BC,aAoDxCE,eAAiB,CAAC,OAAQ,eAAgB,UAAW,cAAe,UAAW,gBAAiB,YAAa,eAAgB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GwC,UAAWvC,KAAKuC,UAAW5B,QAEhD6B,OAAOC,oBAAoBzC,MAAMI,SAAQ,SAAAO,KACvCb,gBAAgBC,GAAIC,KAAMW,SA0KrB0D,aAELM,sBAAwB,CAC5B,MACA,QACA,UAAW,eAAgB,gBAAiB,gBAC5C,YAAa,YAAa,UACtBJ,aAAe,CACjBhC,WAAW,EACXnB,WAAW,EACX0D,QAAQ,EACRC,QAAQ,YAkDD5C,UAAUjB,eACM,mBAAZA,QACFgB,iBAAiBhB,SAGnB,SAAUiB,kBACRD,iBAAiBC,UAAWjB,UAIvCiB,UAAU6C,cAAgB,SAAuB1B,MAC/CrB,eAAehB,WAAfgB,kCAAuBqB"} \ No newline at end of file diff --git a/amd/build/vue-easy-dnd/vue-property-decorator.min.js b/amd/build/vue-easy-dnd/vue-property-decorator.min.js index f827f35..414bd28 100644 --- a/amd/build/vue-easy-dnd/vue-property-decorator.min.js +++ b/amd/build/vue-easy-dnd/vue-property-decorator.min.js @@ -1,3 +1,3 @@ -define("local_treestudyplan/vue-easy-dnd/vue-property-decorator",["exports","./vue/vue","./vue-class-component"],(function(_exports,_vue,_vueClassComponent){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}),Object.defineProperty(_exports,"Component",{enumerable:!0,get:function(){return _vueClassComponent.Component}}),_exports.Emit=function(event){return function(_target,propertyKey,descriptor){var key=hyphenate(propertyKey),original=descriptor.value;descriptor.value=function(){for(var _this=this,args=[],_i=0;_i\n'use strict';\nimport Vue from '../vue/vue';\nimport { Component, createDecorator, mixins } from './vue-class-component';\nexport { Component, Vue, mixins as Mixins };\n/** Used for keying reactive provide/inject properties */\nvar reactiveInjectKey = '__reactiveInject__';\n/**\n * decorator of an inject\n * @param from key\n * @return PropertyDecorator\n */\nexport function Inject(options) {\n return createDecorator(function (componentOptions, key) {\n if (typeof componentOptions.inject === 'undefined') {\n componentOptions.inject = {};\n }\n if (!Array.isArray(componentOptions.inject)) {\n componentOptions.inject[key] = options || key;\n }\n });\n}\n/**\n * decorator of a reactive inject\n * @param from key\n * @return PropertyDecorator\n */\nexport function InjectReactive(options) {\n return createDecorator(function (componentOptions, key) {\n if (typeof componentOptions.inject === 'undefined') {\n componentOptions.inject = {};\n }\n if (!Array.isArray(componentOptions.inject)) {\n var fromKey_1 = !!options ? options.from || options : key;\n var defaultVal_1 = (!!options && options.default) || undefined;\n if (!componentOptions.computed)\n componentOptions.computed = {};\n componentOptions.computed[key] = function () {\n var obj = this[reactiveInjectKey];\n return obj ? obj[fromKey_1] : defaultVal_1;\n };\n componentOptions.inject[reactiveInjectKey] = reactiveInjectKey;\n }\n });\n}\nfunction produceProvide(original) {\n var provide = function () {\n var _this = this;\n var rv = typeof original === 'function' ? original.call(this) : original;\n rv = Object.create(rv || null);\n // set reactive services (propagates previous services if necessary)\n rv[reactiveInjectKey] = this[reactiveInjectKey] || {};\n for (var i in provide.managed) {\n rv[provide.managed[i]] = this[i];\n }\n var _loop_1 = function (i) {\n rv[provide.managedReactive[i]] = this_1[i]; // Duplicates the behavior of `@Provide`\n Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {\n enumerable: true,\n get: function () { return _this[i]; },\n });\n };\n var this_1 = this;\n for (var i in provide.managedReactive) {\n _loop_1(i);\n }\n return rv;\n };\n provide.managed = {};\n provide.managedReactive = {};\n return provide;\n}\nfunction needToProduceProvide(original) {\n return (typeof original !== 'function' ||\n (!original.managed && !original.managedReactive));\n}\n/**\n * decorator of a provide\n * @param key key\n * @return PropertyDecorator | void\n */\nexport function Provide(key) {\n return createDecorator(function (componentOptions, k) {\n var provide = componentOptions.provide;\n if (needToProduceProvide(provide)) {\n provide = componentOptions.provide = produceProvide(provide);\n }\n provide.managed[k] = key || k;\n });\n}\n/**\n * decorator of a reactive provide\n * @param key key\n * @return PropertyDecorator | void\n */\nexport function ProvideReactive(key) {\n return createDecorator(function (componentOptions, k) {\n var provide = componentOptions.provide;\n // inject parent reactive services (if any)\n if (!Array.isArray(componentOptions.inject)) {\n componentOptions.inject = componentOptions.inject || {};\n componentOptions.inject[reactiveInjectKey] = {\n from: reactiveInjectKey,\n default: {},\n };\n }\n if (needToProduceProvide(provide)) {\n provide = componentOptions.provide = produceProvide(provide);\n }\n provide.managedReactive[k] = key || k;\n });\n}\n/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nfunction applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n/**\n * decorator of model\n * @param event event name\n * @param options options\n * @return PropertyDecorator\n */\nexport function Model(event, options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n componentOptions.model = { prop: k, event: event || k };\n })(target, key);\n };\n}\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n/**\n * decorator of a synced prop\n * @param propName the name to interface with from outside, must be different from decorated property\n * @param options the options for the synced prop\n * @return PropertyDecorator | void\n */\nexport function PropSync(propName, options) {\n if (options === void 0) { options = {}; }\n // @ts-ignore\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[propName] = options;\n (componentOptions.computed || (componentOptions.computed = {}))[k] = {\n get: function () {\n return this[propName];\n },\n set: function (value) {\n // @ts-ignore\n this.$emit(\"update:\" + propName, value);\n },\n };\n })(target, key);\n };\n}\n/**\n * decorator of a watch function\n * @param path the path or the expression to observe\n * @param WatchOption\n * @return MethodDecorator\n */\nexport function Watch(path, options) {\n if (options === void 0) { options = {}; }\n var _a = options.deep, deep = _a === void 0 ? false : _a, _b = options.immediate, immediate = _b === void 0 ? false : _b;\n return createDecorator(function (componentOptions, handler) {\n if (typeof componentOptions.watch !== 'object') {\n componentOptions.watch = Object.create(null);\n }\n var watch = componentOptions.watch;\n if (typeof watch[path] === 'object' && !Array.isArray(watch[path])) {\n watch[path] = [watch[path]];\n }\n else if (typeof watch[path] === 'undefined') {\n watch[path] = [];\n }\n watch[path].push({ handler: handler, deep: deep, immediate: immediate });\n });\n}\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, [emitName].concat(args));\n }\n }\n else {\n if (args.length === 0) {\n _this.$emit(emitName, returnValue);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, returnValue, args[0]);\n }\n else {\n _this.$emit.apply(_this, [emitName, returnValue].concat(args));\n }\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\n/**\n * decorator of a ref prop\n * @param refKey the ref key defined in template\n */\nexport function Ref(refKey) {\n return createDecorator(function (options, key) {\n options.computed = options.computed || {};\n options.computed[key] = {\n cache: false,\n get: function () {\n return this.$refs[refKey || key];\n },\n };\n });\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n"],"names":["event","_target","propertyKey","descriptor","key","hyphenate","original","value","_this","this","args","_i","arguments","length","obj","emit","returnValue","emitName","undefined","$emit","apply","concat","Promise","then","options","componentOptions","inject","Array","isArray","fromKey_1","from","defaultVal_1","default","computed","reactiveInjectKey","target","applyMetadata","k","props","model","prop","propName","get","set","provide","needToProduceProvide","produceProvide","managed","managedReactive","refKey","cache","$refs","path","_a","deep","_b","immediate","handler","_typeof","watch","Object","create","push","rv","call","i","_loop_1","this_1","defineProperty","enumerable","reflectMetadataIsSupported","Reflect","getMetadata","type","hyphenateRE","str","replace","toLowerCase"],"mappings":"+mBA0NqBA,cACV,SAAUC,QAASC,YAAaC,gBAC/BC,IAAMC,UAAUH,aAChBI,SAAWH,WAAWI,MAC1BJ,WAAWI,MAAQ,mBACXC,MAAQC,KACRC,KAAO,GACFC,GAAK,EAAGA,GAAKC,UAAUC,OAAQF,KACpCD,KAAKC,IAAMC,UAAUD,QAqDlBG,IAnDHC,KAAO,SAAUC,iBACbC,SAAWjB,OAASI,SACJc,IAAhBF,YACoB,IAAhBN,KAAKG,OACLL,MAAMW,MAAMF,UAES,IAAhBP,KAAKG,OACVL,MAAMW,MAAMF,SAAUP,KAAK,IAG3BF,MAAMW,MAAMC,MAAMZ,MAAO,CAACS,UAAUI,OAAOX,OAI3B,IAAhBA,KAAKG,OACLL,MAAMW,MAAMF,SAAUD,aAED,IAAhBN,KAAKG,OACVL,MAAMW,MAAMF,SAAUD,YAAaN,KAAK,IAGxCF,MAAMW,MAAMC,MAAMZ,MAAO,CAACS,SAAUD,aAAaK,O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AG5B,IAAhBO,MAAMP,QAClBO,MAAMP,MAAQ,IAHdO,MAAMP,MAAQ,CAACO,MAAMP,OAKzBO,MAAMP,MAAMU,KAAK,CAAEL,QAASA,QAASH,KAAMA,KAAME,UAAWA,sEAtMhEtB,kBAAoB,8BAuCfY,eAAexC,cAChBsC,QAAU,SAAVA,cACIpC,MAAQC,KACRsD,GAAyB,mBAAbzD,SAA0BA,SAAS0D,KAAKvD,MAAQH,aAI3D,IAAI2D,KAHTF,GAAKH,OAAOC,OAAOE,IAAM,OAEtB7B,mBAAqBzB,KAAKyB,oBAAsB,GACrCU,QAAQG,QAClBgB,GAAGnB,QAAQG,QAAQkB,IAAMxD,KAAKwD,OAE9BC,QAAU,SAAUD,GACpBF,GAAGnB,QAAQI,gBAAgBiB,IAAME,OAAOF,GACxCL,OAAOQ,eAAeL,GAAG7B,mBAAoBU,QAAQI,gBAAgBiB,GAAI,CACrEI,YAAY,EACZ3B,IAAK,kBAAqBlC,MAAMyD,OAGpCE,OAAS1D,SACR,IAAIwD,KAAKrB,QAAQI,gBAClBkB,QAAQD,UAELF,WAEXnB,QAAQG,QAAU,GAClBH,QAAQI,gBAAkB,GACnBJ,iBAEFC,qBAAqBvC,gBACE,mBAAbA,WACTA,SAASyC,UAAYzC,SAAS0C,oBAuCpCsB,2BAAgD,oBAAZC,cAA0D,IAAxBA,QAAQC,qBACzEpC,cAAcZ,QAASW,OAAQ/B,QAChCkE,6BACK3C,MAAMC,QAAQJ,UACI,mBAAZA,cACiB,IAAjBA,QAAQiD,KAAsB,KACjCA,KAAOF,QAAQC,YAAY,cAAerC,OAAQ/B,KAClDqE,OAASb,SACTpC,QAAQiD,KAAOA,WAuF3BC,YAAc,aACdrE,UAAY,SAAUsE,YAAcA,IAAIC,QAAQF,YAAa,OAAOG"} \ No newline at end of file diff --git a/amd/src/page-edit-plan.js b/amd/src/page-edit-plan.js index f667ead..a1f5c6d 100644 --- a/amd/src/page-edit-plan.js +++ b/amd/src/page-edit-plan.js @@ -32,7 +32,7 @@ Vue.use(PortalVue); import BootstrapVue from './bootstrap-vue/bootstrap-vue.esm'; Vue.use(BootstrapVue); -import {Drag, Drop, DropList} from './vue-easy-dnd/vue-easy-dnd'; +import {Drag, Drop, DropList} from './vue-easy-dnd/vue-easy-dnd.esm'; Vue.component('drag',Drag); Vue.component('drop',Drop); Vue.component('drop-list',DropList); diff --git a/amd/src/vue-easy-dnd/readme-moodle.txt b/amd/src/vue-easy-dnd/readme-moodle.txt index e2be572..15e67ec 100644 --- a/amd/src/vue-easy-dnd/readme-moodle.txt +++ b/amd/src/vue-easy-dnd/readme-moodle.txt @@ -5,10 +5,56 @@ Instructions for downloading and integrating vue-easy-dnd 1. download vue-easy-dnd distribusion throuhg npm npm install vue-easy-dnd@1.22.0 -2. Copy node_modules/vue-easy-dnd/dist/vue-easy-dnd.esm.js to amd/src/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 statements to import './reflect-metadata'; import { Vue, Component, Prop } from './vue-property-decorator'; -4. add /* eslint-disable */ to top of file \ No newline at end of file +4. add /* eslint-disable */ to top of file + +--- Support libraries ---- +This version if vue-easy-dnd requires some additional support libraries in the same folder + +-- vue-class-component.js -- +1. if not already installed during vue-easy-dnd install, download vue-class-component distribusion through npm + npm install vue-class-component@7.2.6 + +2. copy node_modules/vue-class-component/dist/vue-class-component.esm-browser.js to amd/src/vue-easy-dnd/vue-class-component.js + +3. change Vue import statement to + import Vue from '../vue/vue'; + +4. add the following to the top of the file + /* eslint-disable */ + /*eslint no-unused-vars: "off" */ + +5. Replace both export statements at the bottom of the file by the following: + export { Component, createDecorator, mixins }; + +-- vue-property-decorator -- +1. if not already installed during vue-easy-dnd install, download vue-property-decorator distribusion through npm + npm install vue-property-decorator@8.5.1 + +2. copy node_modules/vue-property-decorator/lib/vue-property-decorator.js to amd/src/vue-easy-dnd/ + +3. change import statements to + import Vue from '../vue/vue'; + import { Component, createDecorator, mixins } from './vue-class-component'; + +4. add the following to the top of the file + /* eslint-disable */ + /*eslint no-unused-vars: "off" */ + +-- reflect-metadata.js -- +1. if not already installed during vue-easy-dnd install, download reflect-metadata distribusion through npm + npm install reflect-metadata@0.1.13 + +2. copy node_modules/reflect-metadata/Reflect.js to amd/src/vue-easy-dnd/reflect-metadata.js + +3. add the following to the top of the file + /* eslint-disable */ + /*eslint no-unused-vars: "off" */ + +4. add the following after the copyright notice: + export {Reflect}; \ No newline at end of file diff --git a/amd/src/vue-easy-dnd/vue-class-component.js b/amd/src/vue-easy-dnd/vue-class-component.js index b2c90af..d4d939d 100644 --- a/amd/src/vue-easy-dnd/vue-class-component.js +++ b/amd/src/vue-easy-dnd/vue-class-component.js @@ -1,270 +1,267 @@ /* eslint-disable */ /*eslint no-unused-vars: "off" */ /** - * vue-class-component v7.2.5 + * vue-class-component v7.2.6 * (c) 2015-present Evan You * @license MIT */ +import Vue from '../vue/vue'; -import Vue from './vue/vue'; +// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills +// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys. +// Without this check consumers will encounter hard to track down runtime errors. +function reflectionIsSupported() { + return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys; +} +function copyReflectionMetadata(to, from) { + forwardMetadata(to, from); + Object.getOwnPropertyNames(from.prototype).forEach(key => { + forwardMetadata(to.prototype, from.prototype, key); + }); + Object.getOwnPropertyNames(from).forEach(key => { + forwardMetadata(to, from, key); + }); +} + +function forwardMetadata(to, from, propertyKey) { + var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from); + metaKeys.forEach(metaKey => { + var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from); + + if (propertyKey) { + Reflect.defineMetadata(metaKey, metadata, to, propertyKey); + } else { + Reflect.defineMetadata(metaKey, metadata, to); + } + }); +} + +var fakeArray = { + __proto__: [] +}; +var hasProto = fakeArray instanceof Array; +function createDecorator(factory) { + return (target, key, index) => { + var Ctor = typeof target === 'function' ? target : target.constructor; + + if (!Ctor.__decorators__) { + Ctor.__decorators__ = []; + } + + if (typeof index !== 'number') { + index = undefined; + } + + Ctor.__decorators__.push(options => factory(options, key, index)); + }; +} +function mixins() { + for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) { + Ctors[_key] = arguments[_key]; + } + + return Vue.extend({ + mixins: Ctors + }); +} +function isPrimitive(value) { + var type = typeof value; + return value == null || type !== 'object' && type !== 'function'; +} +function warn(message) { + if (typeof console !== 'undefined') { + console.warn('[vue-class-component] ' + message); + } +} + +function collectDataFromConstructor(vm, Component) { + // override _init to prevent to init as Vue instance + var originalInit = Component.prototype._init; + + Component.prototype._init = function () { + // proxy to actual vm + var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties) + + if (vm.$options.props) { + for (var key in vm.$options.props) { + if (!vm.hasOwnProperty(key)) { + keys.push(key); + } + } + } + + keys.forEach(key => { + Object.defineProperty(this, key, { + get: () => vm[key], + set: value => { + vm[key] = value; + }, + configurable: true + }); + }); + }; // should be acquired class property values - // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills - // which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys. - // Without this check consumers will encounter hard to track down runtime errors. - function reflectionIsSupported() { - return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys; - } - function copyReflectionMetadata(to, from) { - forwardMetadata(to, from); - Object.getOwnPropertyNames(from.prototype).forEach(key => { - forwardMetadata(to.prototype, from.prototype, key); - }); - Object.getOwnPropertyNames(from).forEach(key => { - forwardMetadata(to, from, key); - }); - } - - function forwardMetadata(to, from, propertyKey) { - var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from); - metaKeys.forEach(metaKey => { - var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from); - - if (propertyKey) { - Reflect.defineMetadata(metaKey, metadata, to, propertyKey); - } else { - Reflect.defineMetadata(metaKey, metadata, to); - } - }); - } - - var fakeArray = { - __proto__: [] - }; - var hasProto = fakeArray instanceof Array; - function createDecorator(factory) { - return (target, key, index) => { - var Ctor = typeof target === 'function' ? target : target.constructor; - - if (!Ctor.__decorators__) { - Ctor.__decorators__ = []; - } - - if (typeof index !== 'number') { - index = undefined; - } - - Ctor.__decorators__.push(options => factory(options, key, index)); - }; - } - function mixins() { - for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) { - Ctors[_key] = arguments[_key]; - } - - return Vue.extend({ - mixins: Ctors - }); - } - function isPrimitive(value) { - var type = typeof value; - return value == null || type !== 'object' && type !== 'function'; - } - function warn(message) { - if (typeof console !== 'undefined') { - console.warn('[vue-class-component] ' + message); - } - } - - function collectDataFromConstructor(vm, Component) { - // override _init to prevent to init as Vue instance - var originalInit = Component.prototype._init; - - Component.prototype._init = function () { - // proxy to actual vm - var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties) - - if (vm.$options.props) { - for (var key in vm.$options.props) { - if (!vm.hasOwnProperty(key)) { - keys.push(key); - } - } - } - - keys.forEach(key => { - Object.defineProperty(this, key, { - get: () => vm[key], - set: value => { - vm[key] = value; - }, - configurable: true - }); - }); - }; // should be acquired class property values - - - var data = new Component(); // restore original _init to avoid memory leak (#209) - - Component.prototype._init = originalInit; // create plain data object - - var plainData = {}; - Object.keys(data).forEach(key => { - if (data[key] !== undefined) { - plainData[key] = data[key]; - } - }); - - { - if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) { - warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.'); - } - } - - return plainData; - } - - var $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6 - ]; - function componentFactory(Component) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - options.name = options.name || Component._componentTag || Component.name; // prototype props. - - var proto = Component.prototype; - Object.getOwnPropertyNames(proto).forEach(function (key) { - if (key === 'constructor') { - return; - } // hooks - - - if ($internalHooks.indexOf(key) > -1) { - options[key] = proto[key]; - return; - } - - var descriptor = Object.getOwnPropertyDescriptor(proto, key); - - if (descriptor.value !== void 0) { - // methods - if (typeof descriptor.value === 'function') { - (options.methods || (options.methods = {}))[key] = descriptor.value; - } else { - // typescript decorated data - (options.mixins || (options.mixins = [])).push({ - data() { - return { - [key]: descriptor.value - }; - } - - }); - } - } else if (descriptor.get || descriptor.set) { - // computed properties - (options.computed || (options.computed = {}))[key] = { - get: descriptor.get, - set: descriptor.set - }; - } - }); - (options.mixins || (options.mixins = [])).push({ - data() { - return collectDataFromConstructor(this, Component); - } - - }); // decorate options - - var decorators = Component.__decorators__; - - if (decorators) { - decorators.forEach(fn => fn(options)); - delete Component.__decorators__; - } // find super - - - var superProto = Object.getPrototypeOf(Component.prototype); - var Super = superProto instanceof Vue ? superProto.constructor : Vue; - var Extended = Super.extend(options); - forwardStaticMembers(Extended, Component, Super); - - if (reflectionIsSupported()) { - copyReflectionMetadata(Extended, Component); - } - - return Extended; - } - var reservedPropertyNames = [// Unique id - 'cid', // Super Vue constructor - 'super', // Component options that will be used by the component - 'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets - 'component', 'directive', 'filter']; - var shouldIgnore = { - prototype: true, - arguments: true, - callee: true, - caller: true - }; - - function forwardStaticMembers(Extended, Original, Super) { - // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable - Object.getOwnPropertyNames(Original).forEach(key => { - // Skip the properties that should not be overwritten - if (shouldIgnore[key]) { - return; - } // Some browsers does not allow reconfigure built-in properties - - - var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key); - - if (extendedDescriptor && !extendedDescriptor.configurable) { - return; - } - - var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10), - // the sub class properties may be inherited properties from the super class in TypeScript. - // We need to exclude such properties to prevent to overwrite - // the component options object which stored on the extended constructor (See #192). - // If the value is a referenced value (object or function), - // we can check equality of them and exclude it if they have the same reference. - // If it is a primitive value, it will be forwarded for safety. - - if (!hasProto) { - // Only `cid` is explicitly exluded from property forwarding - // because we cannot detect whether it is a inherited property or not - // on the no `__proto__` environment even though the property is reserved. - if (key === 'cid') { - return; - } - - var superDescriptor = Object.getOwnPropertyDescriptor(Super, key); - - if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) { - return; - } - } // Warn if the users manually declare reserved properties - - - if ( reservedPropertyNames.indexOf(key) >= 0) { - warn("Static property name '".concat(key, "' declared on class '").concat(Original.name, "' ") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.'); - } - - Object.defineProperty(Extended, key, descriptor); - }); - } - - function Component(options) { - if (typeof options === 'function') { - return componentFactory(options); - } - - return function (Component) { - return componentFactory(Component, options); - }; - } - - Component.registerHooks = function registerHooks(keys) { - $internalHooks.push(...keys); - }; - - export { Component, createDecorator, mixins }; - \ No newline at end of file + var data = new Component(); // restore original _init to avoid memory leak (#209) + + Component.prototype._init = originalInit; // create plain data object + + var plainData = {}; + Object.keys(data).forEach(key => { + if (data[key] !== undefined) { + plainData[key] = data[key]; + } + }); + + { + if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) { + warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.'); + } + } + + return plainData; +} + +var $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6 +]; +function componentFactory(Component) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + options.name = options.name || Component._componentTag || Component.name; // prototype props. + + var proto = Component.prototype; + Object.getOwnPropertyNames(proto).forEach(function (key) { + if (key === 'constructor') { + return; + } // hooks + + + if ($internalHooks.indexOf(key) > -1) { + options[key] = proto[key]; + return; + } + + var descriptor = Object.getOwnPropertyDescriptor(proto, key); + + if (descriptor.value !== void 0) { + // methods + if (typeof descriptor.value === 'function') { + (options.methods || (options.methods = {}))[key] = descriptor.value; + } else { + // typescript decorated data + (options.mixins || (options.mixins = [])).push({ + data() { + return { + [key]: descriptor.value + }; + } + + }); + } + } else if (descriptor.get || descriptor.set) { + // computed properties + (options.computed || (options.computed = {}))[key] = { + get: descriptor.get, + set: descriptor.set + }; + } + }); + (options.mixins || (options.mixins = [])).push({ + data() { + return collectDataFromConstructor(this, Component); + } + + }); // decorate options + + var decorators = Component.__decorators__; + + if (decorators) { + decorators.forEach(fn => fn(options)); + delete Component.__decorators__; + } // find super + + + var superProto = Object.getPrototypeOf(Component.prototype); + var Super = superProto instanceof Vue ? superProto.constructor : Vue; + var Extended = Super.extend(options); + forwardStaticMembers(Extended, Component, Super); + + if (reflectionIsSupported()) { + copyReflectionMetadata(Extended, Component); + } + + return Extended; +} +var reservedPropertyNames = [// Unique id +'cid', // Super Vue constructor +'super', // Component options that will be used by the component +'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets +'component', 'directive', 'filter']; +var shouldIgnore = { + prototype: true, + arguments: true, + callee: true, + caller: true +}; + +function forwardStaticMembers(Extended, Original, Super) { + // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable + Object.getOwnPropertyNames(Original).forEach(key => { + // Skip the properties that should not be overwritten + if (shouldIgnore[key]) { + return; + } // Some browsers does not allow reconfigure built-in properties + + + var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key); + + if (extendedDescriptor && !extendedDescriptor.configurable) { + return; + } + + var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10), + // the sub class properties may be inherited properties from the super class in TypeScript. + // We need to exclude such properties to prevent to overwrite + // the component options object which stored on the extended constructor (See #192). + // If the value is a referenced value (object or function), + // we can check equality of them and exclude it if they have the same reference. + // If it is a primitive value, it will be forwarded for safety. + + if (!hasProto) { + // Only `cid` is explicitly exluded from property forwarding + // because we cannot detect whether it is a inherited property or not + // on the no `__proto__` environment even though the property is reserved. + if (key === 'cid') { + return; + } + + var superDescriptor = Object.getOwnPropertyDescriptor(Super, key); + + if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) { + return; + } + } // Warn if the users manually declare reserved properties + + + if ( reservedPropertyNames.indexOf(key) >= 0) { + warn("Static property name '".concat(key, "' declared on class '").concat(Original.name, "' ") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.'); + } + + Object.defineProperty(Extended, key, descriptor); + }); +} + +function Component(options) { + if (typeof options === 'function') { + return componentFactory(options); + } + + return function (Component) { + return componentFactory(Component, options); + }; +} + +Component.registerHooks = function registerHooks(keys) { + $internalHooks.push(...keys); +}; + +export { Component, createDecorator, mixins }; diff --git a/amd/src/vue-easy-dnd/vue-easy-dnd.js b/amd/src/vue-easy-dnd/vue-easy-dnd.js deleted file mode 100644 index a930fa5..0000000 --- a/amd/src/vue-easy-dnd/vue-easy-dnd.js +++ /dev/null @@ -1,1586 +0,0 @@ -/* eslint-disable */ -/*eslint no-unused-vars: "off" */ -/* Miqra Engineering: (c) 2020 added modifications to work as es6 module and preserve vue tag names during minification -*/ -import './reflect-metadata'; -import { Vue, Component, Prop } from './vue-property-decorator'; - -/*MIT License - -Copyright (c) 2019 Régis Lemaigre - -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. -*/ - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -/** - * 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 - * attachted to it using the method on. - */ -var DnD = function DnD() { - this.inProgress = false; - this.type = null; - this.data = null; - this.source = null; - this.top = null; - this.position = null; - this.eventBus = new Vue(); - this.sourceListeners = null; - this.success = null; -}; -DnD.prototype.startDrag = function startDrag (source, event, x, y, type, data) { - this.type = type; - this.data = data; - this.source = source; - this.position = { - x: x, - y: y - }; - this.top = null; - this.sourceListeners = source.$listeners; - this.inProgress = true; - this.emit(event, "dragstart"); - this.emit(event, "dragtopchanged", { previousTop: null }); -}; -DnD.prototype.stopDrag = function stopDrag (event) { - this.success = this.top !== null && this.top['compatibleMode'] && this.top['dropAllowed']; - if (this.top !== null) { - this.emit(event, "drop"); - } - this.emit(event, "dragend"); - this.inProgress = false; - this.data = null; - this.source = null; - this.position = null; - this.success = null; -}; -DnD.prototype.mouseMove = function mouseMove (event, comp) { - if (this.inProgress) { - var prevent = false; - var previousTop = this.top; - if (comp === null) { - // The mouse move event reached the top of the document without hitting a drop component. - this.top = null; - prevent = true; - } - else if (comp['isDropMask']) { - // The mouse move event bubbled until it reached a drop mask. - this.top = null; - prevent = true; - } - else if (comp['candidate'](this.type, this.data, this.source)) { - // The mouse move event bubbled until it reached a drop component that participates in the current drag operation. - this.top = comp; - prevent = true; - } - if (prevent) { - // We prevent the mouse move event from bubbling further up the tree because it reached the foremost drop component and that component is all that matters. - event.stopPropagation(); - } - if (this.top !== previousTop) { - this.emit(event.detail.native, 'dragtopchanged', { previousTop: previousTop }); - } - this.position = { - x: event.detail.x, - y: event.detail.y - }; - this.emit(event.detail.native, 'dragpositionchanged'); - } -}; -DnD.prototype.emit = function emit (native, event, data) { - this.eventBus.$emit(event, Object.assign({}, {type: this.type, - data: this.data, - top: this.top, - source: this.source, - position: this.position, - success: this.success, - native: native}, - data)); -}; -DnD.prototype.on = function on (event, callback) { - this.eventBus.$on(event, callback); -}; -DnD.prototype.off = function off (event, callback) { - this.eventBus.$off(event, callback); -}; -var dnd = new DnD(); -dnd = Vue.observable(dnd); - -var DragAwareMixin = /*@__PURE__*/(function (Vue) { - function DragAwareMixin () { - Vue.apply(this, arguments); - } - - if ( Vue ) DragAwareMixin.__proto__ = Vue; - DragAwareMixin.prototype = Object.create( Vue && Vue.prototype ); - DragAwareMixin.prototype.constructor = DragAwareMixin; - - var prototypeAccessors = { dragInProgress: { configurable: true },dragData: { configurable: true },dragType: { configurable: true },dragPosition: { configurable: true },dragSource: { configurable: true },dragTop: { configurable: true } }; - - prototypeAccessors.dragInProgress.get = function () { - return dnd.inProgress; - }; - prototypeAccessors.dragData.get = function () { - return dnd.data; - }; - prototypeAccessors.dragType.get = function () { - return dnd.type; - }; - prototypeAccessors.dragPosition.get = function () { - return dnd.position; - }; - prototypeAccessors.dragSource.get = function () { - return dnd.source; - }; - prototypeAccessors.dragTop.get = function () { - return dnd.top; - }; - - Object.defineProperties( DragAwareMixin.prototype, prototypeAccessors ); - - return DragAwareMixin; -}(Vue)); -DragAwareMixin = __decorate([ - Component({ name: "DragAwareMixin",}) -], DragAwareMixin); -var DragAwareMixin$1 = DragAwareMixin; - -/** - * 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 - * the model, no matter where the drag images is grafted into the DOM. - */ -/** - * Creates a drag image using the given element as model. - */ -function createDragImage(el) { - var clone = deepClone(el); - clone.style.position = 'fixed'; - clone.style.margin = '0'; - clone.style["z-index"] = '1000'; - clone.style.transition = 'opacity 0.2s'; - return clone; -} -/** - * Clones the given element and all its descendants. - */ -function deepClone(el) { - var clone = el.cloneNode(true); - copyStyle(el, clone); - var vSrcElements = el.getElementsByTagName("*"); - var vDstElements = clone.getElementsByTagName("*"); - for (var i = vSrcElements.length; i--;) { - var vSrcElement = vSrcElements[i]; - var vDstElement = vDstElements[i]; - copyStyle(vSrcElement, vDstElement); - } - return clone; -} -/** - * Copy the computed styles from src to destination. - */ -function copyStyle(src, destination) { - var computedStyle = window.getComputedStyle(src); - Array.from(computedStyle).forEach(function (key) { - destination.style.setProperty(key, computedStyle.getPropertyValue(key), computedStyle.getPropertyPriority(key)); - }); - destination.style.pointerEvents = 'none'; -} - -var DragMixin = /*@__PURE__*/(function (DragAwareMixin) { - function DragMixin() { - DragAwareMixin.apply(this, arguments); - this.isDrag = true; - this.mouseIn = null; - } - - if ( DragAwareMixin ) DragMixin.__proto__ = DragAwareMixin; - DragMixin.prototype = Object.create( DragAwareMixin && DragAwareMixin.prototype ); - DragMixin.prototype.constructor = DragMixin; - - var prototypeAccessors = { dragIn: { configurable: true },cssClasses: { configurable: true },currentDropMode: { configurable: true } }; - DragMixin.prototype.created = function created () { - this.reEmit("dragstart"); - this.reEmit("dragend"); - }; - DragMixin.prototype.reEmit = function reEmit (eventName) { - var this$1 = this; - - dnd.on(eventName, function (ev) { - if (ev.source === this$1) { - this$1.$emit(eventName, ev); - } - }); - }; - DragMixin.prototype.mounted = function mounted () { - var isNodeList = function (el) { - return 'item' in el; - }; - var comp = this; - var el = this.$el; - var dragStarted = false; - var initialUserSelect; - var downEvent = null; - var startPosition = null; - if (this.handle) { - el = this.$el.querySelectorAll(this.handle); - } - if (isNodeList(el)) { - el.forEach(function (element) { - element.addEventListener('mousedown', onMouseDown); - element.addEventListener('touchstart', onMouseDown); - element.addEventListener('mouseenter', onMouseEnter); - element.addEventListener('mouseleave', onMouseLeave); - }); - } - else { - el.addEventListener('mousedown', onMouseDown); - el.addEventListener('touchstart', onMouseDown); - el.addEventListener('mouseenter', onMouseEnter); - el.addEventListener('mouseleave', onMouseLeave); - } - function onMouseEnter() { - comp.mouseIn = true; - } - function onMouseLeave() { - comp.mouseIn = false; - } - function noop(e) { - e.stopPropagation(); - e.preventDefault(); - } - function onMouseDown(e) { - if (!comp.disabled && downEvent === null) { - initialUserSelect = document.body.style.userSelect; - document.documentElement.style.userSelect = 'none'; // Permet au drag de se poursuivre normalement même - // quand on quitte un élémént avec overflow: hidden. - dragStarted = false; - downEvent = e; - if (downEvent.type === 'mousedown') { - var mouse = event; - startPosition = { - x: mouse.clientX, - y: mouse.clientY - }; - } - else { - var touch = event; - startPosition = { - x: touch.touches[0].clientX, - y: touch.touches[0].clientY - }; - } - document.addEventListener('mousemove', onMouseMove); - document.addEventListener('touchmove', onMouseMove, { passive: false }); - document.addEventListener('easy-dnd-move', onEasyDnDMove); - document.addEventListener('mouseup', onMouseUp); - document.addEventListener('touchend', onMouseUp); - document.addEventListener('selectstart', noop); - // Prevents event from bubbling to ancestor drag components and initiate several drags at the same time - e.stopPropagation(); - // Prevents touchstart event to be converted to mousedown - //e.preventDefault(); - } - } - function onMouseMove(e) { - // We ignore the mousemove event that follows touchend : - if (downEvent === null) - { return; } - // On touch devices, we ignore fake mouse events and deal with touch events only. - if (downEvent.type === 'touchstart' && e.type === 'mousemove') - { return; } - // Find out event target and pointer position : - var target; - var x; - var y; - if (e.type === 'touchmove') { - var touch = e; - x = touch.touches[0].clientX; - y = touch.touches[0].clientY; - target = document.elementFromPoint(x, y); - } - else { - var mouse = e; - x = mouse.clientX; - y = mouse.clientY; - target = mouse.target; - } - // Distance between current event and start position : - var dist = Math.sqrt(Math.pow(startPosition.x - x, 2) + Math.pow(startPosition.y - y, 2)); - // If the drag has not begun yet and distance from initial point is greater than delta, we start the drag : - if (!dragStarted && dist > comp.delta) { - dragStarted = true; - dnd.startDrag(comp, downEvent, startPosition.x, startPosition.y, comp.type, comp.data); - document.documentElement.classList.add('drag-in-progress'); - } - // Dispatch custom easy-dnd-move event : - if (dragStarted) { - var custom = new CustomEvent("easy-dnd-move", { - bubbles: true, - cancelable: true, - detail: { - x: x, - y: y, - native: e - } - }); - target.dispatchEvent(custom); - } - // Prevent scroll on touch devices : - e.preventDefault(); - } - function onEasyDnDMove(e) { - dnd.mouseMove(e, null); - } - function onMouseUp(e) { - // On touch devices, we ignore fake mouse events and deal with touch events only. - if (downEvent.type === 'touchstart' && e.type === 'mouseup') - { return; } - downEvent = null; - // This delay makes sure that when the click event that results from the mouseup is produced, the drag is still - // in progress. So by checking the flag dnd.inProgress, one can tell appart true clicks from drag and drop artefacts. - setTimeout(function () { - if (dragStarted) { - document.documentElement.classList.remove('drag-in-progress'); - dnd.stopDrag(e); - } - document.removeEventListener('mousemove', onMouseMove); - document.removeEventListener('touchmove', onMouseMove); - document.removeEventListener('easy-dnd-move', onEasyDnDMove); - document.removeEventListener('mouseup', onMouseUp); - document.removeEventListener('touchend', onMouseUp); - document.removeEventListener('selectstart', noop); - document.documentElement.style.userSelect = initialUserSelect; - }, 0); - } - }; - prototypeAccessors.dragIn.get = function () { - return !this.dragInProgress && this.mouseIn; - }; - prototypeAccessors.cssClasses.get = function () { - if (!this.disabled) { - return { - 'drag-source': this.dragInProgress && this.dragSource === this, - 'drag-in': this.dragIn, - 'drag-out': !this.dragIn, - 'drag-mode-copy': this.currentDropMode === 'copy', - 'drag-mode-cut': this.currentDropMode === 'cut', - 'drag-mode-reordering': this.currentDropMode === 'reordering', - }; - } - else { - return {}; - } - }; - prototypeAccessors.currentDropMode.get = function () { - if (this.dragInProgress && this.dragSource === this) { - if (this.dragTop && this.dragTop['dropAllowed']) { - if (this.dragTop['reordering']) - { return 'reordering'; } - else - { return this.dragTop['mode']; } - } - else { - return null; - } - } - else { - return null; - } - }; - DragMixin.prototype.createDragImage = function createDragImage$1 (selfTransform) { - var image; - if (this.$scopedSlots['drag-image']) { - var el = this.$refs['drag-image']; - if (el.childElementCount !== 1) { - image = createDragImage(el); - } - else { - image = createDragImage(el.children.item(0)); - } - } - else { - image = createDragImage(this.$el); - image.style.transform = selfTransform; - } - image['__opacity'] = this.dragImageOpacity; - return image; - }; - - Object.defineProperties( DragMixin.prototype, prototypeAccessors ); - - return DragMixin; -}(DragAwareMixin$1)); -__decorate([ - Prop({ default: null, type: null }), - __metadata("design:type", String) -], DragMixin.prototype, "type", void 0); -__decorate([ - Prop({ default: null, type: null }), - __metadata("design:type", Object) -], DragMixin.prototype, "data", void 0); -__decorate([ - Prop({ default: 0.7, type: Number }), - __metadata("design:type", Object) -], DragMixin.prototype, "dragImageOpacity", void 0); -__decorate([ - Prop({ default: false, type: Boolean }), - __metadata("design:type", Boolean) -], DragMixin.prototype, "disabled", void 0); -__decorate([ - Prop({ default: false, type: Boolean }), - __metadata("design:type", Boolean) -], DragMixin.prototype, "goBack", void 0); -__decorate([ - Prop({ required: false, type: String }), - __metadata("design:type", String) -], DragMixin.prototype, "handle", void 0); -__decorate([ - Prop({ type: Number, default: 3 }), - __metadata("design:type", Number) -], DragMixin.prototype, "delta", void 0); -DragMixin = __decorate([ - Component({ name: "DragMixin",}) -], DragMixin); -var DragMixin$1 = DragMixin; - -var Drag = /*@__PURE__*/(function (DragMixin) { - function Drag () { - DragMixin.apply(this, arguments); - }if ( DragMixin ) Drag.__proto__ = DragMixin; - Drag.prototype = Object.create( DragMixin && DragMixin.prototype ); - Drag.prototype.constructor = Drag; - - - - return Drag; -}(DragMixin$1)); -__decorate([ - Prop({ default: 'div', type: [String, Object, Function] }), - __metadata("design:type", Object) -], Drag.prototype, "tag", void 0); -Drag = __decorate([ - Component({ name: "Drag",}) -], Drag); -var script = Drag; - -function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier -/* server only */ -, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { - if (typeof shadowMode !== 'boolean') { - createInjectorSSR = createInjector; - createInjector = shadowMode; - shadowMode = false; - } // Vue.extend constructor export interop. - - - var options = typeof script === 'function' ? script.options : script; // render functions - - if (template && template.render) { - options.render = template.render; - options.staticRenderFns = template.staticRenderFns; - options._compiled = true; // functional template - - if (isFunctionalTemplate) { - options.functional = true; - } - } // scopedId - - - if (scopeId) { - options._scopeId = scopeId; - } - - var hook; - - if (moduleIdentifier) { - // server build - hook = function hook(context) { - // 2.3 injection - context = context || // cached call - this.$vnode && this.$vnode.ssrContext || // stateful - this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional - // 2.2 with runInNewContext: true - - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } // inject component styles - - - if (style) { - style.call(this, createInjectorSSR(context)); - } // register component module identifier for async chunk inference - - - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; // used by ssr in case component is cached and beforeCreate - // never gets called - - - options._ssrRegister = hook; - } else if (style) { - hook = shadowMode ? function () { - style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); - } : function (context) { - style.call(this, createInjector(context)); - }; - } - - if (hook) { - if (options.functional) { - // register for functional component in vue file - var originalRender = options.render; - - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; - } - } - - return script; -} - -var normalizeComponent_1 = normalizeComponent; - -var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); -function createInjector(context) { - return function (id, style) { - return addStyle(id, style); - }; -} -var HEAD; -var styles = {}; - -function addStyle(id, css) { - var group = isOldIE ? css.media || 'default' : id; - var style = styles[group] || (styles[group] = { - ids: new Set(), - styles: [] - }); - - if (!style.ids.has(id)) { - style.ids.add(id); - var code = css.source; - - if (css.map) { - // https://developer.chrome.com/devtools/docs/javascript-debugging - // this makes source maps inside style tags work properly in Chrome - code += '\n/*# sourceURL=' + css.map.sources[0] + ' */'; // http://stackoverflow.com/a/26603875 - - code += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) + ' */'; - } - - if (!style.element) { - style.element = document.createElement('style'); - style.element.type = 'text/css'; - if (css.media) { style.element.setAttribute('media', css.media); } - - if (HEAD === undefined) { - HEAD = document.head || document.getElementsByTagName('head')[0]; - } - - HEAD.appendChild(style.element); - } - - if ('styleSheet' in style.element) { - style.styles.push(code); - style.element.styleSheet.cssText = style.styles.filter(Boolean).join('\n'); - } else { - var index = style.ids.size - 1; - var textNode = document.createTextNode(code); - var nodes = style.element.childNodes; - if (nodes[index]) { style.element.removeChild(nodes[index]); } - if (nodes.length) { style.element.insertBefore(textNode, nodes[index]); }else { style.element.appendChild(textNode); } - } - } -} - -var browser = createInjector; - -/* script */ -var __vue_script__ = script; - -/* template */ -var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.tag,_vm._g(_vm._b({tag:"component",class:_vm.cssClasses,style:({cursor: _vm.disabled || _vm.handle ? null : 'grab'}),scopedSlots:_vm._u([_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [_vm._t(slot,null,null,scope)]}}})],null,true)},'component',_vm.$attrs,false),_vm.$listeners),[_vm._t("default"),_vm._v(" "),_vm._v(" "),_c('div',{ref:"drag-image",staticClass:"__drag-image"},[_vm._t("drag-image")],2)],2)}; -var __vue_staticRenderFns__ = []; - - /* style */ - var __vue_inject_styles__ = function (inject) { - if (!inject) { return } - inject("data-v-15f89b5d_0", { source: ".drop-allowed.drop-in *{cursor:inherit!important}.drop-forbidden.drop-in,.drop-forbidden.drop-in *{cursor:no-drop!important}", map: undefined, media: undefined }) -,inject("data-v-15f89b5d_1", { source: "html.drag-in-progress *{cursor:grabbing!important}", map: undefined, media: undefined }) -,inject("data-v-15f89b5d_2", { source: ".__drag-image[data-v-15f89b5d]{position:fixed;top:-10000px;left:-10000px;will-change:left,top}", map: undefined, media: undefined }); - - }; - /* scoped */ - var __vue_scope_id__ = "data-v-15f89b5d"; - /* module identifier */ - var __vue_module_identifier__ = undefined; - /* functional template */ - var __vue_is_functional_template__ = false; - /* style inject SSR */ - - - - var Drag$1 = normalizeComponent_1( - { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, - __vue_inject_styles__, - __vue_script__, - __vue_scope_id__, - __vue_is_functional_template__, - __vue_module_identifier__, - browser, - undefined - ); - -var DropMixin = /*@__PURE__*/(function (DragAwareMixin) { - function DropMixin() { - DragAwareMixin.call(this); - this.isDrop = true; - } - - if ( DragAwareMixin ) DropMixin.__proto__ = DragAwareMixin; - DropMixin.prototype = Object.create( DragAwareMixin && DragAwareMixin.prototype ); - DropMixin.prototype.constructor = DropMixin; - - var prototypeAccessors = { compatibleMode: { configurable: true },dropIn: { configurable: true },typeAllowed: { configurable: true },dropAllowed: { configurable: true },cssClasses: { configurable: true },cssStyle: { configurable: true } }; - DropMixin.prototype.effectiveAcceptsType = function effectiveAcceptsType (type) { - if (this.acceptsType === null) - { return true; } - else if (typeof (this.acceptsType) === 'string') - { return this.acceptsType === type; } - else if (typeof (this.acceptsType) === 'object' && Array.isArray(this.acceptsType)) { - return this.acceptsType.includes(type); - } - else { - return this.acceptsType(type); - } - }; - DropMixin.prototype.effectiveAcceptsData = function effectiveAcceptsData (data, type) { - return this.acceptsData(data, type); - }; - DropMixin.prototype.created = function created () { - dnd.on("dragpositionchanged", this.onDragPositionChanged); - dnd.on("dragtopchanged", this.onDragTopChanged); - dnd.on("drop", this.onDrop); - }; - DropMixin.prototype.destroyed = function destroyed () { - dnd.off("dragpositionchanged", this.onDragPositionChanged); - dnd.off("dragtopchanged", this.onDragTopChanged); - dnd.off("drop", this.onDrop); - }; - DropMixin.prototype.onDragPositionChanged = function onDragPositionChanged (event) { - if (this === event.top) { - this.$emit("dragover", event); - } - }; - DropMixin.prototype.onDragTopChanged = function onDragTopChanged (event) { - if (this === event.top) { - this.$emit("dragenter", event); - } - if (this === event.previousTop) { - this.$emit("dragleave", event); - } - }; - DropMixin.prototype.onDrop = function onDrop (event) { - if (this.dropIn && this.compatibleMode && this.dropAllowed) { - this.doDrop(event); - } - }; - DropMixin.prototype.doDrop = function doDrop (event) { - this.$emit('drop', event); - event.source.$emit(this.mode, event); - }; - DropMixin.prototype.mounted = function mounted () { - var el = this.$el; - var comp = this; - el.addEventListener('easy-dnd-move', onMouseMove); - function onMouseMove(e) { - dnd.mouseMove(e, comp); - } - }; - prototypeAccessors.compatibleMode.get = function () { - if (this.dragInProgress) { - return this.mode === 'copy' || dnd.sourceListeners.hasOwnProperty(this.mode); - } - else { - return null; - } - }; - prototypeAccessors.dropIn.get = function () { - if (this.dragInProgress) { - return this.dragTop === this; - } - else { - return null; - } - }; - prototypeAccessors.typeAllowed.get = function () { - if (this.dragInProgress) { - return this.effectiveAcceptsType(this.dragType); - } - else { - return null; - } - }; - prototypeAccessors.dropAllowed.get = function () { - if (this.dragInProgress) { - if (this.typeAllowed) { - return this.compatibleMode && this.effectiveAcceptsData(this.dragData, this.dragType); - } - else { - return null; - } - } - else { - return null; - } - }; - prototypeAccessors.cssClasses.get = function () { - var clazz = { - 'dnd-drop': true - }; - if (this.dropIn !== null) { - clazz = Object.assign({}, clazz, - {"drop-in": this.dropIn, - "drop-out": !this.dropIn}); - } - if (this.typeAllowed !== null) { - clazz = Object.assign({}, clazz, - {"type-allowed": this.typeAllowed, - "type-forbidden": !this.typeAllowed}); - } - if (this.dropAllowed !== null) { - clazz = Object.assign({}, clazz, - {"drop-allowed": this.dropAllowed, - "drop-forbidden": !this.dropAllowed}); - } - return clazz; - }; - prototypeAccessors.cssStyle.get = function () { - if (this.dropAllowed && this.dropIn) { - return { cursor: this.cursor + ' !important' }; - } - else { - return { cursor: 'inherit' }; - } - }; - /** - * Returns true if the current drop area participates in the current drag operation. - */ - DropMixin.prototype.candidate = function candidate (type, data, source) { - return this.effectiveAcceptsType(type); - }; - DropMixin.prototype.createDragImage = function createDragImage$1 () { - var image; - if (this.$refs['drag-image']) { - var el = this.$refs['drag-image']; - if (el.childElementCount !== 1) { - image = createDragImage(el); - } - else { - image = createDragImage(el.children.item(0)); - } - image['__opacity'] = this.dragImageOpacity; - } - else { - image = 'source'; - } - return image; - }; - - Object.defineProperties( DropMixin.prototype, prototypeAccessors ); - - return DropMixin; -}(DragAwareMixin$1)); -__decorate([ - Prop({ default: function () { return function () { return true; }; }, type: [String, Array, Function] }), - __metadata("design:type", Object) -], DropMixin.prototype, "acceptsType", void 0); -__decorate([ - Prop({ default: function () { return true; }, type: Function }), - __metadata("design:type", Object) -], DropMixin.prototype, "acceptsData", void 0); -__decorate([ - Prop({ default: 'pointer' }), - __metadata("design:type", String) -], DropMixin.prototype, "cursor", void 0); -__decorate([ - Prop({ default: 'copy' }), - __metadata("design:type", String) -], DropMixin.prototype, "mode", void 0); -__decorate([ - Prop({ default: 0.7, type: Number }), - __metadata("design:type", Object) -], DropMixin.prototype, "dragImageOpacity", void 0); -DropMixin = __decorate([ - Component({ name: "DropMixin",}), - __metadata("design:paramtypes", []) -], DropMixin); -var DropMixin$1 = DropMixin; - -var Drop = /*@__PURE__*/(function (DropMixin) { - function Drop () { - DropMixin.apply(this, arguments); - } - - if ( DropMixin ) Drop.__proto__ = DropMixin; - Drop.prototype = Object.create( DropMixin && DropMixin.prototype ); - Drop.prototype.constructor = Drop; - - var prototypeAccessors = { showDragImage: { configurable: true } }; - - prototypeAccessors.showDragImage.get = function () { - return this.dragInProgress && this.typeAllowed && this.$scopedSlots['drag-image']; - }; - - Object.defineProperties( Drop.prototype, prototypeAccessors ); - - return Drop; -}(DropMixin$1)); -__decorate([ - Prop({ default: 'div', type: [String, Object, Function] }), - __metadata("design:type", Object) -], Drop.prototype, "tag", void 0); -Drop = __decorate([ - Component({ name: "Drop",}) -], Drop); -var script$1 = Drop; - -/* script */ -var __vue_script__$1 = script$1; - -/* template */ -var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.tag,_vm._g(_vm._b({tag:"component",class:_vm.cssClasses,style:(_vm.cssStyle),scopedSlots:_vm._u([_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [_vm._t(slot,null,null,scope)]}}})],null,true)},'component',_vm.$attrs,false),_vm.$listeners),[_vm._t("default"),_vm._v(" "),_vm._v(" "),(_vm.showDragImage)?_c('div',{ref:"drag-image",staticClass:"__drag-image"},[_vm._t("drag-image",null,{"type":_vm.dragType,"data":_vm.dragData})],2):_vm._e()],2)}; -var __vue_staticRenderFns__$1 = []; - - /* style */ - var __vue_inject_styles__$1 = function (inject) { - if (!inject) { return } - inject("data-v-4eedfece_0", { source: ".drop-allowed.drop-in *{cursor:inherit!important}.drop-forbidden.drop-in,.drop-forbidden.drop-in *{cursor:no-drop!important}", map: undefined, media: undefined }) -,inject("data-v-4eedfece_1", { source: ".__drag-image[data-v-4eedfece]{position:fixed;top:-10000px;left:-10000px;will-change:left,top}", map: undefined, media: undefined }); - - }; - /* scoped */ - var __vue_scope_id__$1 = "data-v-4eedfece"; - /* module identifier */ - var __vue_module_identifier__$1 = undefined; - /* functional template */ - var __vue_is_functional_template__$1 = false; - /* style inject SSR */ - - - - var Drop$1 = normalizeComponent_1( - { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 }, - __vue_inject_styles__$1, - __vue_script__$1, - __vue_scope_id__$1, - __vue_is_functional_template__$1, - __vue_module_identifier__$1, - browser, - undefined - ); - -var DropMask = /*@__PURE__*/(function (DragAwareMixin) { - function DropMask() { - DragAwareMixin.apply(this, arguments); - this.isDropMask = true; - } - - if ( DragAwareMixin ) DropMask.__proto__ = DragAwareMixin; - DropMask.prototype = Object.create( DragAwareMixin && DragAwareMixin.prototype ); - DropMask.prototype.constructor = DropMask; - DropMask.prototype.mounted = function mounted () { - var el = this.$el; - var comp = this; - el.addEventListener('easy-dnd-move', onMouseMove); - function onMouseMove(e) { - dnd.mouseMove(e, comp); - } - }; - DropMask.prototype.createDragImage = function createDragImage () { - return 'source'; - }; - - return DropMask; -}(DragAwareMixin$1)); -__decorate([ - Prop({ default: 'div', type: [String, Object, Function] }), - __metadata("design:type", Object) -], DropMask.prototype, "tag", void 0); -DropMask = __decorate([ - Component({ name: "DropMask",}) -], DropMask); -var script$2 = DropMask; - -/* script */ -var __vue_script__$2 = script$2; - -/* template */ -var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.tag,_vm._g(_vm._b({tag:"component",scopedSlots:_vm._u([_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [_vm._t(slot,null,null,scope)]}}})],null,true)},'component',_vm.$attrs,false),_vm.$listeners),[_vm._t("default")],2)}; -var __vue_staticRenderFns__$2 = []; - - /* style */ - var __vue_inject_styles__$2 = undefined; - /* scoped */ - var __vue_scope_id__$2 = undefined; - /* module identifier */ - var __vue_module_identifier__$2 = undefined; - /* functional template */ - var __vue_is_functional_template__$2 = false; - /* style inject */ - - /* style inject SSR */ - - - - var DropMask$1 = normalizeComponent_1( - { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 }, - __vue_inject_styles__$2, - __vue_script__$2, - __vue_scope_id__$2, - __vue_is_functional_template__$2, - __vue_module_identifier__$2, - undefined, - undefined - ); - -/** - * 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. - */ -var DragImagesManager = /*@__PURE__*/(function (Vue) { - function DragImagesManager() { - Vue.call(this); - this.selfTransform = null; - this.clones = null; - this.source = null; - this.sourcePos = null; - this.sourceClone = null; - dnd.on('dragstart', this.onDragStart); - dnd.on('dragtopchanged', this.onDragTopChanged); - dnd.on('dragpositionchanged', this.onDragPositionChanged); - dnd.on('dragend', this.onDragEnd); - } - - if ( Vue ) DragImagesManager.__proto__ = Vue; - DragImagesManager.prototype = Object.create( Vue && Vue.prototype ); - DragImagesManager.prototype.constructor = DragImagesManager; - DragImagesManager.prototype.onDragStart = function onDragStart (event) { - this.sourcePos = { - x: event.source.$el.getBoundingClientRect().left, - y: event.source.$el.getBoundingClientRect().top - }; - this.selfTransform = "translate(-" + (event.position.x - this.sourcePos.x) + "px, -" + (event.position.y - this.sourcePos.y) + "px)"; - this.clones = new Map(); - this.source = event.source; - }; - DragImagesManager.prototype.onDragEnd = function onDragEnd (event) { - var this$1 = this; - - Vue.nextTick(function () { - if (!event.success && this$1.source['goBack']) { - // Restore the drag image that is active when hovering outside any drop zone : - var img = this$1.switch(null); - // Move it back to its original place : - window.requestAnimationFrame(function () { - img.style.transition = "all 0.5s"; - window.requestAnimationFrame(function () { - img.style.left = this$1.sourcePos.x + "px"; - img.style.top = this$1.sourcePos.y + "px"; - img.style.transform = "translate(0,0)"; - var handler = function () { - this$1.cleanUp(); - img.removeEventListener("transitionend", handler); - }; - img.addEventListener("transitionend", handler); - }); - }); - } - else { - this$1.cleanUp(); - } - }); - }; - DragImagesManager.prototype.cleanUp = function cleanUp () { - this.clones.forEach(function (clone) { - clone.remove(); - }); - if (this.sourceClone !== null) { - this.sourceClone.remove(); - } - this.selfTransform = null; - this.clones = null; - this.source = null; - this.sourceClone = null; - this.sourcePos = null; - }; - DragImagesManager.prototype.onDragTopChanged = function onDragTopChanged (event) { - this.switch(event.top); - }; - DragImagesManager.prototype.switch = function switch$1 (top) { - this.clones.forEach(function (clone) { - clone.style.opacity = "0"; - }); - if (this.sourceClone) { - this.sourceClone.style.opacity = "0"; - } - var activeClone; - if (top === null) { - activeClone = this.getSourceClone(); - } - else { - if (!this.clones.has(top)) { - var clone = top['createDragImage'](this.selfTransform); - if (clone === 'source') { - clone = this.getSourceClone(); - } - else if (clone !== null) { - clone.style.opacity = '0'; - document.body.append(clone); - } - this.clones.set(top, clone); - } - activeClone = this.clones.get(top); - } - if (activeClone !== null) { - activeClone.offsetWidth; // Forces broswer reflow - activeClone.style.opacity = activeClone['__opacity']; - activeClone.style.visibility = 'visible'; - } - return activeClone; - }; - DragImagesManager.prototype.getSourceClone = function getSourceClone () { - if (this.sourceClone === null) { - this.sourceClone = this.source['createDragImage'](this.selfTransform); - this.sourceClone.style.opacity = '0'; - document.body.append(this.sourceClone); - } - return this.sourceClone; - }; - DragImagesManager.prototype.onDragPositionChanged = function onDragPositionChanged (event) { - this.clones.forEach(function (clone) { - clone.style.left = dnd.position.x + "px"; - clone.style.top = dnd.position.y + "px"; - }); - if (this.sourceClone) { - this.sourceClone.style.left = dnd.position.x + "px"; - this.sourceClone.style.top = dnd.position.y + "px"; - } - }; - - return DragImagesManager; -}(Vue)); -DragImagesManager = __decorate([ - Component({ name: "DragImagesManager",}) // Necessary to set proper "this" context in event listeners. - , - __metadata("design:paramtypes", []) -], DragImagesManager); -new DragImagesManager(); - -var DragFeedback = /*@__PURE__*/(function (Vue) { - function DragFeedback () { - Vue.apply(this, arguments); - }if ( Vue ) DragFeedback.__proto__ = Vue; - DragFeedback.prototype = Object.create( Vue && Vue.prototype ); - DragFeedback.prototype.constructor = DragFeedback; - - - - return DragFeedback; -}(Vue)); -DragFeedback = __decorate([ - Component({ name: "DragFeedback",}) -], DragFeedback); -var script$3 = DragFeedback; - -/* script */ -var __vue_script__$3 = script$3; - -/* template */ -var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"DragFeedback"},[_vm._t("default")],2)}; -var __vue_staticRenderFns__$3 = []; - - /* style */ - var __vue_inject_styles__$3 = undefined; - /* scoped */ - var __vue_scope_id__$3 = "data-v-0589f3cb"; - /* module identifier */ - var __vue_module_identifier__$3 = undefined; - /* functional template */ - var __vue_is_functional_template__$3 = false; - /* style inject */ - - /* style inject SSR */ - - - - var DragFeedback$1 = normalizeComponent_1( - { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 }, - __vue_inject_styles__$3, - __vue_script__$3, - __vue_scope_id__$3, - __vue_is_functional_template__$3, - __vue_module_identifier__$3, - undefined, - undefined - ); - -var Grid = function Grid(collection, upToIndex, row, fromIndex) { - this.magnets = []; - var index = 0; - for (var i = 0, list = collection; i < list.length; i += 1) { - var child = list[i]; - - if (index > upToIndex) - { break; } - var rect = child.getBoundingClientRect(); - var hasNestedDrop = child.classList.contains("dnd-drop") || child.getElementsByClassName("dnd-drop").length > 0; - var horizontal = null; - if (hasNestedDrop) { - if (row === 'auto') { - // Auto mode not supported for now. Row or column must be defined explicitly if there are nested drop lists. - throw new Error("Easy-DnD error : a drop list is missing one of these attributes : 'row' or 'column'."); - } - else { - horizontal = row === 'row'; - } - } - if (fromIndex === null) { - // Inserting mode. - this.magnets.push(hasNestedDrop ? this.before(rect, horizontal) : this.center(rect)); - } - else { - // Reordering mode. - this.magnets.push(hasNestedDrop ? (fromIndex < index ? this.after : this.before)(rect, horizontal) : this.center(rect)); - } - // Debug : show magnets : - //document.body.insertAdjacentHTML("beforeend", "
") - index++; - } -}; -/** - * Returns the center of the rectangle. - */ -Grid.prototype.center = function center (rect) { - return { - x: rect.left + rect.width / 2, - y: rect.top + rect.height / 2 - }; -}; -/** - * When horizontal is true / false, returns middle of the left / top side of the rectangle. - */ -Grid.prototype.before = function before (rect, horizontal) { - return horizontal ? { - x: rect.left, - y: rect.top + rect.height / 2 - } : { - x: rect.left + rect.width / 2, - y: rect.top - }; -}; -/** - * When horizontal is true / false, returns middle of the right / bottom side of the rectangle. - */ -Grid.prototype.after = function after (rect, horizontal) { - return horizontal ? { - x: rect.left + rect.width, - y: rect.top + rect.height / 2 - } : { - x: rect.left + rect.width / 2, - y: rect.top + rect.height - }; -}; -Grid.prototype.closestIndex = function closestIndex (position) { - var minDist = 999999; - var index = -1; - for (var i = 0; i < this.magnets.length; i++) { - var magnet = this.magnets[i]; - var dist = Math.sqrt(Math.pow(magnet.x - position.x, 2) + Math.pow(magnet.y - position.y, 2)); - if (dist < minDist) { - minDist = dist; - index = i; - } - } - return index; -}; - -var DnDEvent = function DnDEvent () {}; -var ReorderEvent = function ReorderEvent(from, to) { - this.from = from; - this.to = to; -}; -ReorderEvent.prototype.apply = function apply (array) { - var tmp = array[this.from]; - array.splice(this.from, 1); - array.splice(this.to, 0, tmp); -}; -var InsertEvent = function InsertEvent(type, data, index) { - this.type = type; - this.data = data; - this.index = index; -}; - -var DropList = /*@__PURE__*/(function (DropMixin) { - function DropList() { - DropMixin.apply(this, arguments); - this.grid = null; - this.forbiddenKeys = []; - this.feedbackKey = null; - this.fromIndex = null; - } - - if ( DropMixin ) DropList.__proto__ = DropMixin; - DropList.prototype = Object.create( DropMixin && DropMixin.prototype ); - DropList.prototype.constructor = DropList; - - var prototypeAccessors = { rootTag: { configurable: true },rootProps: { configurable: true },rootListeners: { configurable: true },direction: { configurable: true },reordering: { configurable: true },closestIndex: { configurable: true },dropAllowed: { configurable: true },itemsBeforeFeedback: { configurable: true },itemsAfterFeedback: { configurable: true },itemsBeforeReorderingFeedback: { configurable: true },itemsAfterReorderingFeedback: { configurable: true },reorderedItems: { configurable: true },clazz: { configurable: true },style: { configurable: true },showDragFeedback: { configurable: true },showInsertingDragImage: { configurable: true },showReorderingDragImage: { configurable: true },hasReorderingFeedback: { configurable: true } }; - prototypeAccessors.rootTag.get = function () { - if (this.noAnimations) { - return this.tag ? this.tag : 'div'; - } - else { - return "transition-group"; - } - }; - prototypeAccessors.rootProps.get = function () { - if (this.noAnimations) { - return this.$attrs; - } - else { - return { - tag: this.tag, - duration: { enter: 0, leave: 0 }, - css: false - }; - } - }; - prototypeAccessors.rootListeners.get = function () { - if (this.noAnimations) { - return this.$listeners; - } - else { - return {}; - } - }; - DropList.prototype.created = function created () { - dnd.on("dragstart", this.onDragStart); - dnd.on("dragend", this.onDragEnd); - }; - prototypeAccessors.direction.get = function () { - if (this.row) - { return 'row'; } - if (this.column) - { return 'column'; } - return 'auto'; - }; - DropList.prototype.destroyed = function destroyed () { - dnd.off("dragstart", this.onDragStart); - dnd.off("dragend", this.onDragEnd); - }; - DropList.prototype.onDragStart = function onDragStart (event) { - var this$1 = this; - - if (this.candidate(dnd.type, dnd.data, dnd.source)) { - if (this.reordering) { - this.fromIndex = Array.prototype.indexOf.call(event.source.$el.parentElement.children, event.source.$el); - this.grid = this.computeReorderingGrid(); - } - else { - this.$nextTick(function () { - // Presence of feedback node in the DOM and of keys in the virtual DOM required => delayed until what - // depends on drag data has been processed. - this$1.grid = this$1.computeInsertingGrid(); - this$1.feedbackKey = this$1.computeFeedbackKey(); - this$1.forbiddenKeys = this$1.computeForbiddenKeys(); - }); - } - } - }; - DropList.prototype.onDragEnd = function onDragEnd () { - this.fromIndex = null; - this.feedbackKey = null; - this.forbiddenKeys = null; - this.grid = null; - }; - prototypeAccessors.reordering.get = function () { - if (dnd.inProgress) { - return dnd.source.$el.parentElement === this.$el && this.$listeners.hasOwnProperty('reorder'); - } - else { - return null; - } - }; - prototypeAccessors.closestIndex.get = function () { - if (this.grid) { - return this.grid.closestIndex(dnd.position); - } - else { - return null; - } - }; - prototypeAccessors.dropAllowed.get = function () { - if (this.dragInProgress) { - if (this.reordering) { - return this.items.length > 1; - } - else { - var superDropAllowed = DropMixin['options'].computed.dropAllowed.get.call(this); - if (!superDropAllowed) { - return false; - } - else { - if (this.forbiddenKeys !== null && this.feedbackKey !== null) { - return !this.forbiddenKeys.includes(this.feedbackKey); - } - else { - return null; - } - } - } - } - else { - return null; - } - }; - prototypeAccessors.itemsBeforeFeedback.get = function () { - if (this.closestIndex === 0) { - return []; - } - else { - return this.items.slice(0, this.closestIndex); - } - }; - prototypeAccessors.itemsAfterFeedback.get = function () { - if (this.closestIndex === this.items.length) { - return []; - } - else { - return this.items.slice(this.closestIndex); - } - }; - prototypeAccessors.itemsBeforeReorderingFeedback.get = function () { - if (this.closestIndex <= this.fromIndex) { - return this.items.slice(0, this.closestIndex); - } - else { - return this.items.slice(0, this.closestIndex + 1); - } - }; - prototypeAccessors.itemsAfterReorderingFeedback.get = function () { - if (this.closestIndex <= this.fromIndex) { - return this.items.slice(this.closestIndex); - } - else { - return this.items.slice(this.closestIndex + 1); - } - }; - prototypeAccessors.reorderedItems.get = function () { - var toIndex = this.closestIndex; - var reordered = [].concat( this.items ); - var temp = reordered[this.fromIndex]; - reordered.splice(this.fromIndex, 1); - reordered.splice(toIndex, 0, temp); - return reordered; - }; - prototypeAccessors.clazz.get = function () { - return Object.assign({}, {'drop-list': true, - 'reordering': this.reordering === true, - 'inserting': this.reordering === false}, - (this.reordering === false ? this.cssClasses : { 'dnd-drop': true })); - }; - prototypeAccessors.style.get = function () { - return Object.assign({}, (this.reordering === false ? this.cssStyle : {})); - }; - prototypeAccessors.showDragFeedback.get = function () { - return this.dragInProgress && this.typeAllowed && !this.reordering; - }; - prototypeAccessors.showInsertingDragImage.get = function () { - return this.dragInProgress && this.typeAllowed && !this.reordering && this.$scopedSlots.hasOwnProperty("drag-image"); - }; - prototypeAccessors.showReorderingDragImage.get = function () { - return this.dragInProgress && this.reordering && this.$scopedSlots.hasOwnProperty("reordering-drag-image"); - }; - DropList.prototype.doDrop = function doDrop (event) { - if (this.reordering) { - if (this.fromIndex !== this.closestIndex) { - this.$emit('reorder', new ReorderEvent(this.fromIndex, this.closestIndex)); - } - } - else { - DropMixin['options'].methods.doDrop.call(this, event); - this.$emit('insert', new InsertEvent(event.type, event.data, this.closestIndex)); - } - }; - DropList.prototype.candidate = function candidate (type, data, source) { - var i = arguments.length, argsArray = Array(i); - while ( i-- ) argsArray[i] = arguments[i]; - var ref; - - var superCandidate = (ref = DropMixin['options'].methods.candidate).call.apply(ref, [ this ].concat( argsArray )); - return (superCandidate && (this.$listeners.hasOwnProperty("insert") || this.$listeners.hasOwnProperty("drop"))) || this.reordering; - }; - DropList.prototype.computeForbiddenKeys = function computeForbiddenKeys () { - var vnodes = this.noAnimations ? [] : this.$children[0].$vnode.context.$children[0].$slots.default; - return vnodes - .map(function (vn) { return vn.key; }) - .filter(function (k) { return k !== undefined && k !== 'drag-image' && k !== 'drag-feedback'; }); - }; - DropList.prototype.computeFeedbackKey = function computeFeedbackKey () { - return this.$refs['feedback']['$slots']['default'][0]['key']; - }; - prototypeAccessors.hasReorderingFeedback.get = function () { - return this.$scopedSlots.hasOwnProperty("reordering-feedback"); - }; - DropList.prototype.computeInsertingGrid = function computeInsertingGrid () { - var feedbackParent = this.$refs['feedback']['$el']; - if(feedbackParent.children.length == 0){ - console.warn("Feedback template has no children",$feedbackParent,this); - } - var feedback = feedbackParent.children[0]; - var clone = feedback.cloneNode(true); - var tg = this.$el; - if (tg.children.length > this.items.length) { - tg.insertBefore(clone, tg.children[this.items.length]); - } - else { - tg.append(clone); - } - var grid = new Grid(tg.children, this.items.length, this.direction, null); - clone.remove(); - return grid; - }; - DropList.prototype.computeReorderingGrid = function computeReorderingGrid () { - var tg = this.$el; - return new Grid(tg.children, this.items.length - 1, this.direction, this.fromIndex); - }; - DropList.prototype.createDragImage = function createDragImage$1 () { - var image; - if (this.$refs['drag-image']) { - var el = this.$refs['drag-image']; - var model; - if (el.childElementCount !== 1) { - model = el; - } - else { - model = el.children.item(0); - } - var clone = model.cloneNode(true); - var tg = this.$el; - tg.append(clone); - image = createDragImage(clone); - clone.remove(); - image['__opacity'] = this.dragImageOpacity; - } - else { - image = 'source'; - } - return image; - }; - - Object.defineProperties( DropList.prototype, prototypeAccessors ); - - return DropList; -}(DropMixin$1)); -__decorate([ - Prop({ default: 'div', type: [String, Object, Function] }), - __metadata("design:type", Object) -], DropList.prototype, "tag", void 0); -__decorate([ - Prop(), - __metadata("design:type", Array) -], DropList.prototype, "items", void 0); -__decorate([ - Prop({ default: null }), - __metadata("design:type", Boolean) -], DropList.prototype, "row", void 0); -__decorate([ - Prop({ default: null, type: Boolean }), - __metadata("design:type", Boolean) -], DropList.prototype, "column", void 0); -__decorate([ - Prop({ default: false, type: Boolean }), - __metadata("design:type", Boolean) -], DropList.prototype, "noAnimations", void 0); -DropList = __decorate([ - Component({ - components: { DragFeedback: DragFeedback$1 }, - name: "DropList", - }) -], DropList); -var script$4 = DropList; - -/* script */ -var __vue_script__$4 = script$4; - -/* template */ -var __vue_render__$4 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.rootTag,_vm._g(_vm._b({tag:"component",class:_vm.clazz,style:(_vm.style)},'component',_vm.rootProps,false),_vm.rootListeners),[(_vm.dropIn && _vm.dropAllowed)?[(_vm.reordering)?[(_vm.hasReorderingFeedback)?[_vm._l((_vm.itemsBeforeReorderingFeedback),function(item){return _vm._t("item",null,{"item":item})}),_vm._v(" "),_vm._t("reordering-feedback",null,{"item":_vm.items[_vm.fromIndex]}),_vm._v(" "),_vm._l((_vm.itemsAfterReorderingFeedback),function(item){return _vm._t("item",null,{"item":item})})]:[_vm._l((_vm.reorderedItems),function(item,index){return _vm._t("item",null,{"item":item,"reorder":index === _vm.closestIndex})})]]:[_vm._l((_vm.itemsBeforeFeedback),function(item){return _vm._t("item",null,{"item":item,"reorder":false})}),_vm._v(" "),_vm._t("feedback",null,{"data":_vm.dragData,"type":_vm.dragType}),_vm._v(" "),_vm._l((_vm.itemsAfterFeedback),function(item){return _vm._t("item",null,{"item":item,"reorder":false})})]]:[_vm._l((_vm.items),function(item){return _vm._t("item",null,{"item":item,"reorder":false})})],_vm._v(" "),(_vm.showDragFeedback)?_c('drag-feedback',{key:"drag-feedback",ref:"feedback",staticClass:"__feedback"},[_vm._t("feedback",null,{"data":_vm.dragData,"type":_vm.dragType})],2):_vm._e(),_vm._v(" "),(_vm.showInsertingDragImage)?_c('div',{key:"inserting-drag-image",ref:"drag-image",staticClass:"__drag-image"},[_vm._t("drag-image",null,{"type":_vm.dragType,"data":_vm.dragData})],2):_vm._e(),_vm._v(" "),(_vm.showReorderingDragImage)?_c('div',{key:"reordering-drag-image",ref:"drag-image",staticClass:"__drag-image"},[_vm._t("reordering-drag-image",null,{"item":_vm.items[_vm.fromIndex]})],2):_vm._e(),_vm._v(" "),_c('div',{key:"drop-list-content"},[_vm._t("default")],2)],2)}; -var __vue_staticRenderFns__$4 = []; - - /* style */ - var __vue_inject_styles__$4 = function (inject) { - if (!inject) { return } - inject("data-v-56f28757_0", { source: ".drop-list[data-v-56f28757]>*{transition:transform .2s}.__feedback[data-v-56f28757]{display:none}.__drag-image[data-v-56f28757]{position:fixed;top:-10000px;left:-10000px;will-change:left,top}", map: undefined, media: undefined }) -,inject("data-v-56f28757_1", { source: ".drop-allowed.drop-in *{cursor:inherit!important}.drop-forbidden.drop-in,.drop-forbidden.drop-in *{cursor:no-drop!important}", map: undefined, media: undefined }); - - }; - /* scoped */ - var __vue_scope_id__$4 = "data-v-56f28757"; - /* module identifier */ - var __vue_module_identifier__$4 = undefined; - /* functional template */ - var __vue_is_functional_template__$4 = false; - /* style inject SSR */ - - - - var DropList$1 = normalizeComponent_1( - { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 }, - __vue_inject_styles__$4, - __vue_script__$4, - __vue_scope_id__$4, - __vue_is_functional_template__$4, - __vue_module_identifier__$4, - browser, - undefined - ); - -// minor modifications to handle minification in moodle - the reflected property name does not survive minification. Do not want all our components to be known as 'b' - -export { DnDEvent, Drag$1 as Drag, DragAwareMixin$1 as DragAwareMixin, DragImagesManager, DragMixin$1 as DragMixin, Drop$1 as Drop, DropList$1 as DropList, DropMask$1 as DropMask, DropMixin$1 as DropMixin, InsertEvent, ReorderEvent, createDragImage, dnd }; diff --git a/amd/src/vue-easy-dnd/vue-property-decorator.js b/amd/src/vue-easy-dnd/vue-property-decorator.js index 740536f..88d2c67 100644 --- a/amd/src/vue-easy-dnd/vue-property-decorator.js +++ b/amd/src/vue-easy-dnd/vue-property-decorator.js @@ -1,12 +1,10 @@ /* eslint-disable */ /*eslint no-unused-vars: "off" */ -/** vue-property-decorator verson 9.0.0 MIT LICENSE copyright 2020 kaorun343 */ - +/** vue-property-decorator verson 8.5.1 MIT LICENSE copyright 2020 kaorun343 */ +/// 'use strict'; - -import Vue from './vue/vue'; - -import {Component, createDecorator, mixins } from './vue-class-component'; +import Vue from '../vue/vue'; +import { Component, createDecorator, mixins } from './vue-class-component'; export { Component, Vue, mixins as Mixins }; /** Used for keying reactive provide/inject properties */ var reactiveInjectKey = '__reactiveInject__'; diff --git a/thirdpartylibs.xml b/thirdpartylibs.xml index 19fa81b..0f844e0 100644 --- a/thirdpartylibs.xml +++ b/thirdpartylibs.xml @@ -1,18 +1,6 @@ - + amd/src/bootstrap-vue/ Bootstrap-Vue.js @@ -24,6 +12,19 @@ 2016-2023 - BootstrapVue + + + css/bootstrap-vue/ + Bootstrap-Vue.js + Vue components for Bootstrap + 2.23.0 + MIT + https://github.com/bootstrap-vue/bootstrap-vue + + 2016-2023 - BootstrapVue + + + amd/src/portal-vue/ Portal-Vue.js @@ -35,16 +36,82 @@ 2021 Thorsten Lünborg + - amd/src/vue-easy-dnd/ + amd/src/vue + Vu + Vue is a progressive framework for building user interfaces. + 2.7.14 + MIT + https://github.com/vuejs/vue + + 2014-2022 Evan You + + + + + + amd/src/vue-easy-dnd/vue-easy-dnd.esm.js Vue-Easy-DnD A drag and drop implementation for Vue that uses only standard mouse events instead of the HTML5 drag and drop API 2.1.3 - MIT + Apache 2.0 https://github.com/rlemaigre/Easy-DnD 2019 Régis Lemaigre + + amd/src/vue-easy-dnd/reflect-metadata.js + reflect-metadata + Metadata Reflection API for javascript + 0.1.13 + Apache 2.0 + https://github.com/rbuckton/reflect-metadata + + Cy Brown + Oleh Dokuka + Ron Buckton + William Buchwalter + + + + + amd/src/vue-easy-dnd/vue-class-component.js + vue-class-component + Vue Class Component + 0.1.13 + MIT + https://github.com/vuejs/vue-class-component + + 2015-present Evan You + + + + + amd/src/vue-easy-dnd/vue-property-decorator.js + vue-property-decorator + Vue Property Decorator + 8.5.1 + MIT + https://github.com/kaorun343/vue-property-decorator + + 2015-present Evan You + + + + + amd/src/simpleline + SimpleLine + Simpleline is a simple and lightweight tool to draw lines and arrows between two html elements. + 1.0.0 + MIT + https://github.com/miqraeng/simpleline + + 2023 P.M. Kuipers + Morglod/jchnkl + + +