moodle_local_treestudyplan/amd/build/vue-easy-dnd/vue-easy-dnd.min.js.map

1 line
95 KiB
Plaintext
Raw Normal View History

{"version":3,"file":"vue-easy-dnd.min.js","sources":["../../src/vue-easy-dnd/vue-easy-dnd.js"],"sourcesContent":["/* eslint-disable */\r\n/*eslint no-unused-vars: \"off\" */\r\n/* Miqra Engineering: (c) 2020 added modifications to work as es6 module and preserve vue tag names during minification\r\n*/\r\nimport './reflect-metadata';\r\nimport { Vue, Component, Prop } from './vue-property-decorator';\r\n\r\n/*MIT License\r\n\r\nCopyright (c) 2019 Régis Lemaigre\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n*/\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\n/**\r\n * This is the class of the global object that holds the state of the drag and drop during its progress. It emits events\r\n * reporting its state evolution during the progress of the drag and drop. Its data is reactive and listeners can be\r\n * attachted to it using the method on.\r\n */\r\nvar DnD = function DnD() {\r\n this.inProgress = false;\r\n this.type = null;\r\n this.data = null;\r\n this.source = null;\r\n this.top = null;\r\n this.position = null;\r\n this.eventBus = new Vue();\r\n this.sourceListeners = null;\r\n this.success = null;\r\n};\r\nDnD.prototype.startDrag = function startDrag (source, event, x, y, type, data) {\r\n this.type = type;\r\n this.data = data;\r\n this.source = source;\r\n this.position = {\r\n x: x,\r\n y: y\r\n };\r\n this.top = null;\r\n this.sourceListeners = source.$listeners;\r\n this.inProgress = true;\r\n this.emit(event, \"dragstart\");\r\n this.emit(event, \"dragtopchanged\", { previousTop: null });\r\n};\r\nDnD.prototype.stopDrag = function stopDrag (event) {\r\n this.success = this.top !== null && this.top['compatibleMode'] && this.top['dropAllowed'];\r\n if (this.top !== null) {\r\n this.emit(event, \"drop\");\r\n }\r\n this.emit(event, \"dragend\");\r\n this.inProgress = false;\r\n this.data = null;\r\n this.source = null;\r\n this.position = null;\r\n this.success = null;\r\n};\r\nDnD.prototype.mouseMove = function mouseMove (event, comp) {\r\n if (this.inProgress) {\r\n var prevent = false;\r\n var previousTop = this.top;\r\n if (comp === null) {\r\n // The mouse move event reached the top of the document without hitting a drop component.\r\n