2024-06-03 23:24:16 +02:00
|
|
|
{"version":3,"file":"vue-property-decorator.min.js","sources":["../../src/vue-easy-dnd/vue-property-decorator.js"],"sourcesContent":["/* eslint-disable */\n/* eslint no-unused-vars: \"off\" */\n/** vue-property-decorator verson 8.5.1 MIT LICENSE copyright 2020 kaorun343 */\n/// <reference types='reflect-metadata'/>\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
|