@devexpress/dx-vue-core
Advanced tools
Comparing version
/** | ||
* Bundle of @devexpress/dx-vue-core | ||
* Generated: 2018-09-07 | ||
* Version: 1.8.0-beta.1 | ||
* Generated: 2018-10-04 | ||
* Version: 1.8.0 | ||
* License: https://js.devexpress.com/Licensing | ||
@@ -17,127 +17,2 @@ */ | ||
var asyncGenerator = function () { | ||
function AwaitValue(value) { | ||
this.value = value; | ||
} | ||
function AsyncGenerator(gen) { | ||
var front, back; | ||
function send(key, arg) { | ||
return new Promise(function (resolve, reject) { | ||
var request = { | ||
key: key, | ||
arg: arg, | ||
resolve: resolve, | ||
reject: reject, | ||
next: null | ||
}; | ||
if (back) { | ||
back = back.next = request; | ||
} else { | ||
front = back = request; | ||
resume(key, arg); | ||
} | ||
}); | ||
} | ||
function resume(key, arg) { | ||
try { | ||
var result = gen[key](arg); | ||
var value = result.value; | ||
if (value instanceof AwaitValue) { | ||
Promise.resolve(value.value).then(function (arg) { | ||
resume("next", arg); | ||
}, function (arg) { | ||
resume("throw", arg); | ||
}); | ||
} else { | ||
settle(result.done ? "return" : "normal", result.value); | ||
} | ||
} catch (err) { | ||
settle("throw", err); | ||
} | ||
} | ||
function settle(type, value) { | ||
switch (type) { | ||
case "return": | ||
front.resolve({ | ||
value: value, | ||
done: true | ||
}); | ||
break; | ||
case "throw": | ||
front.reject(value); | ||
break; | ||
default: | ||
front.resolve({ | ||
value: value, | ||
done: false | ||
}); | ||
break; | ||
} | ||
front = front.next; | ||
if (front) { | ||
resume(front.key, front.arg); | ||
} else { | ||
back = null; | ||
} | ||
} | ||
this._invoke = send; | ||
if (typeof gen.return !== "function") { | ||
this.return = undefined; | ||
} | ||
} | ||
if (typeof Symbol === "function" && Symbol.asyncIterator) { | ||
AsyncGenerator.prototype[Symbol.asyncIterator] = function () { | ||
return this; | ||
}; | ||
} | ||
AsyncGenerator.prototype.next = function (arg) { | ||
return this._invoke("next", arg); | ||
}; | ||
AsyncGenerator.prototype.throw = function (arg) { | ||
return this._invoke("throw", arg); | ||
}; | ||
AsyncGenerator.prototype.return = function (arg) { | ||
return this._invoke("return", arg); | ||
}; | ||
return { | ||
wrap: function (fn) { | ||
return function () { | ||
return new AsyncGenerator(fn.apply(this, arguments)); | ||
}; | ||
}, | ||
await: function (value) { | ||
return new AwaitValue(value); | ||
} | ||
}; | ||
}(); | ||
var defineProperty = function (obj, key, value) { | ||
@@ -172,36 +47,2 @@ if (key in obj) { | ||
var toConsumableArray = function (arr) { | ||
@@ -208,0 +49,0 @@ if (Array.isArray(arr)) { |
/** | ||
* Bundle of @devexpress/dx-vue-core | ||
* Generated: 2018-09-07 | ||
* Version: 1.8.0-beta.1 | ||
* Generated: 2018-10-04 | ||
* Version: 1.8.0 | ||
* License: https://js.devexpress.com/Licensing | ||
@@ -9,919 +9,760 @@ */ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@devexpress/dx-core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@devexpress/dx-core'], factory) : | ||
(factory((global.DevExpress = global.DevExpress || {}, global.DevExpress.DXVueCore = {}),global.DevExpress.DXCore)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@devexpress/dx-core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@devexpress/dx-core'], factory) : | ||
(factory((global.DevExpress = global.DevExpress || {}, global.DevExpress.DXVueCore = {}),global.DevExpress.DXCore)); | ||
}(this, (function (exports,dxCore) { 'use strict'; | ||
var PLUGIN_HOST_CONTEXT = Symbol('pluginHost'); | ||
var POSITION_CONTEXT = Symbol('position'); | ||
var TEMPLATE_HOST_CONTEXT = Symbol('templateHost'); | ||
var PLUGIN_HOST_CONTEXT = Symbol('pluginHost'); | ||
var POSITION_CONTEXT = Symbol('position'); | ||
var TEMPLATE_HOST_CONTEXT = Symbol('templateHost'); | ||
var RERENDER_TEMPLATE_EVENT = Symbol('rerenderTemplate'); | ||
var UPDATE_CONNECTION_EVENT = Symbol('updateConnection'); | ||
var RERENDER_TEMPLATE_EVENT = Symbol('rerenderTemplate'); | ||
var UPDATE_CONNECTION_EVENT = Symbol('updateConnection'); | ||
var asyncGenerator = function () { | ||
function AwaitValue(value) { | ||
this.value = value; | ||
} | ||
function AsyncGenerator(gen) { | ||
var front, back; | ||
function send(key, arg) { | ||
return new Promise(function (resolve, reject) { | ||
var request = { | ||
key: key, | ||
arg: arg, | ||
resolve: resolve, | ||
reject: reject, | ||
next: null | ||
}; | ||
if (back) { | ||
back = back.next = request; | ||
} else { | ||
front = back = request; | ||
resume(key, arg); | ||
} | ||
var defineProperty = function (obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
function resume(key, arg) { | ||
try { | ||
var result = gen[key](arg); | ||
var value = result.value; | ||
return obj; | ||
}; | ||
if (value instanceof AwaitValue) { | ||
Promise.resolve(value.value).then(function (arg) { | ||
resume("next", arg); | ||
}, function (arg) { | ||
resume("throw", arg); | ||
}); | ||
} else { | ||
settle(result.done ? "return" : "normal", result.value); | ||
var _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} catch (err) { | ||
settle("throw", err); | ||
} | ||
} | ||
function settle(type, value) { | ||
switch (type) { | ||
case "return": | ||
front.resolve({ | ||
value: value, | ||
done: true | ||
}); | ||
break; | ||
return target; | ||
}; | ||
case "throw": | ||
front.reject(value); | ||
break; | ||
var toConsumableArray = function (arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; | ||
default: | ||
front.resolve({ | ||
value: value, | ||
done: false | ||
}); | ||
break; | ||
} | ||
front = front.next; | ||
if (front) { | ||
resume(front.key, front.arg); | ||
} else { | ||
back = null; | ||
} | ||
return arr2; | ||
} else { | ||
return Array.from(arr); | ||
} | ||
this._invoke = send; | ||
if (typeof gen.return !== "function") { | ||
this.return = undefined; | ||
} | ||
} | ||
if (typeof Symbol === "function" && Symbol.asyncIterator) { | ||
AsyncGenerator.prototype[Symbol.asyncIterator] = function () { | ||
return this; | ||
}; | ||
} | ||
AsyncGenerator.prototype.next = function (arg) { | ||
return this._invoke("next", arg); | ||
}; | ||
AsyncGenerator.prototype.throw = function (arg) { | ||
return this._invoke("throw", arg); | ||
}; | ||
AsyncGenerator.prototype.return = function (arg) { | ||
return this._invoke("return", arg); | ||
}; | ||
return { | ||
wrap: function (fn) { | ||
return function () { | ||
return new AsyncGenerator(fn.apply(this, arguments)); | ||
}; | ||
var PluginIndexerContext = { | ||
name: 'PluginIndexerContext', | ||
props: { | ||
position: { | ||
type: Function, | ||
required: true | ||
} | ||
}, | ||
await: function (value) { | ||
return new AwaitValue(value); | ||
provide: function provide() { | ||
return defineProperty({}, POSITION_CONTEXT, this.position); | ||
}, | ||
render: function render() { | ||
return this.$slots.default && this.$slots.default[0]; | ||
} | ||
}; | ||
}(); | ||
var PluginIndexer = { | ||
name: 'PluginIndexer', | ||
inject: { | ||
position: { | ||
from: POSITION_CONTEXT, | ||
default: undefined | ||
} | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
var position = this.position; | ||
return h('div', [this.$slots.default.map(function (child, index) { | ||
if (!child.componentOptions) return child; | ||
var childPosition = function childPosition() { | ||
var calculatedPosition = position && position() || []; | ||
return [].concat(toConsumableArray(calculatedPosition), [index]); | ||
}; | ||
return h( | ||
PluginIndexerContext, | ||
{ | ||
attrs: { position: childPosition } | ||
}, | ||
[child] | ||
); | ||
})]); | ||
} | ||
}; | ||
var DxTemplatePlaceholder = { | ||
name: 'DxTemplatePlaceholder', | ||
inheritAttrs: false, | ||
props: { | ||
name: { | ||
type: String | ||
} | ||
}, | ||
provide: function provide() { | ||
var _this = this; | ||
var templateHost = {}; | ||
Object.defineProperty(templateHost, 'params', { | ||
enumerable: true, | ||
get: function get$$1() { | ||
return _this.computedParams; | ||
} | ||
}); | ||
Object.defineProperty(templateHost, 'templates', { | ||
enumerable: true, | ||
get: function get$$1() { | ||
return _this.computedTemplates.slice(1); | ||
} | ||
}); | ||
return defineProperty({}, TEMPLATE_HOST_CONTEXT, templateHost); | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
templateHost: { | ||
from: TEMPLATE_HOST_CONTEXT, | ||
default: { templates: [], params: undefined } | ||
} | ||
}, | ||
created: function created() { | ||
var _this2 = this; | ||
this.subscription = defineProperty({}, RERENDER_TEMPLATE_EVENT, function (id) { | ||
if (_this2.computedTemplates[0] && _this2.computedTemplates[0].id === id) { | ||
_this2.$forceUpdate(); | ||
} | ||
}); | ||
}, | ||
beforeMount: function beforeMount() { | ||
this.pluginHost.registerSubscription(this.subscription); | ||
}, | ||
computed: { | ||
computedParams: function computedParams() { | ||
var that = this; | ||
return !Object.keys(this.$attrs).length && !Object.keys(this.$listeners).length ? this.templateHost.params : { | ||
get attrs() { | ||
return that.$attrs; | ||
}, | ||
get listeners() { | ||
return that.$listeners; | ||
}, | ||
get slots() { | ||
return that.$slots; | ||
}, | ||
get scopedSlots() { | ||
return that.$scopedSlots; | ||
} | ||
}; | ||
}, | ||
computedTemplates: function computedTemplates() { | ||
var _this3 = this; | ||
return this.name ? this.pluginHost.collect(this.name + 'Template').filter(function (template) { | ||
return template.predicate(_this3.computedParams); | ||
}).reverse() : this.templateHost.templates; | ||
} | ||
}, | ||
render: function render() { | ||
var template = this.computedTemplates[0]; | ||
var defineProperty = function (obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
}; | ||
var _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
var content = template ? template.children() : null; | ||
if (content && typeof content === 'function') { | ||
content = content(this.computedParams); | ||
} | ||
if (this.$scopedSlots.default) { | ||
content = this.$scopedSlots.default(content); | ||
} | ||
return content && content.length ? content[0] : content; | ||
}, | ||
destroyed: function destroyed() { | ||
this.pluginHost.unregisterSubscription(this.subscription); | ||
} | ||
} | ||
}; | ||
return target; | ||
}; | ||
var DxPluginHost = { | ||
name: 'DxPluginHost', | ||
beforeCreate: function beforeCreate() { | ||
this.pluginHost = new dxCore.PluginHost(); | ||
}, | ||
provide: function provide() { | ||
return defineProperty({}, PLUGIN_HOST_CONTEXT, this.pluginHost); | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
var toConsumableArray = function (arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} else { | ||
return Array.from(arr); | ||
} | ||
}; | ||
var PluginIndexerContext = { | ||
name: 'PluginIndexerContext', | ||
props: { | ||
position: { | ||
type: Function, | ||
required: true | ||
return h('div', [h(PluginIndexer, [this.$slots.default]), h(DxTemplatePlaceholder, { | ||
attrs: { name: 'root' } | ||
})]); | ||
} | ||
}, | ||
provide: function provide() { | ||
return defineProperty({}, POSITION_CONTEXT, this.position); | ||
}, | ||
render: function render() { | ||
return this.$slots.default && this.$slots.default[0]; | ||
} | ||
}; | ||
}; | ||
var PluginIndexer = { | ||
name: 'PluginIndexer', | ||
inject: { | ||
position: { | ||
from: POSITION_CONTEXT, | ||
default: undefined | ||
} | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
var position = this.position; | ||
var DxPlugin = { | ||
name: 'DxPlugin', | ||
props: { | ||
name: { | ||
type: String, | ||
default: '' | ||
}, | ||
dependencies: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
} | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
beforeMount: function beforeMount() { | ||
var pluginHost = this.pluginHost, | ||
position = this.position, | ||
name = this.name, | ||
dependencies = this.dependencies; | ||
return h('div', [this.$slots.default.map(function (child, index) { | ||
if (!child.componentOptions) return child; | ||
var childPosition = function childPosition() { | ||
var calculatedPosition = position && position() || []; | ||
return [].concat(toConsumableArray(calculatedPosition), [index]); | ||
this.plugin = { | ||
position: position, | ||
name: name, | ||
dependencies: dependencies, | ||
container: true | ||
}; | ||
pluginHost.registerPlugin(this.plugin); | ||
}, | ||
beforeUpdate: function beforeUpdate() { | ||
this.pluginHost.ensureDependencies(); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
return h( | ||
PluginIndexerContext, | ||
{ | ||
attrs: { position: childPosition } | ||
}, | ||
[child] | ||
); | ||
})]); | ||
} | ||
}; | ||
var DxTemplatePlaceholder = { | ||
name: 'DxTemplatePlaceholder', | ||
inheritAttrs: false, | ||
props: { | ||
name: { | ||
type: String | ||
return h(PluginIndexer, [this.$slots.default]); | ||
} | ||
}, | ||
provide: function provide() { | ||
var _this = this; | ||
}; | ||
var templateHost = {}; | ||
Object.defineProperty(templateHost, 'params', { | ||
enumerable: true, | ||
get: function get$$1() { | ||
return _this.computedParams; | ||
} | ||
}); | ||
Object.defineProperty(templateHost, 'templates', { | ||
enumerable: true, | ||
get: function get$$1() { | ||
return _this.computedTemplates.slice(1); | ||
} | ||
}); | ||
return defineProperty({}, TEMPLATE_HOST_CONTEXT, templateHost); | ||
}, | ||
var getAvailableGetters = function getAvailableGetters(pluginHost) { | ||
var getGetterValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (getterName) { | ||
return pluginHost.get(getterName + 'Getter'); | ||
}; | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
templateHost: { | ||
from: TEMPLATE_HOST_CONTEXT, | ||
default: { templates: [], params: undefined } | ||
} | ||
}, | ||
created: function created() { | ||
var _this2 = this; | ||
var trackedDependencies = {}; | ||
this.subscription = defineProperty({}, RERENDER_TEMPLATE_EVENT, function (id) { | ||
if (_this2.computedTemplates[0] && _this2.computedTemplates[0].id === id) { | ||
_this2.$forceUpdate(); | ||
} | ||
}); | ||
}, | ||
beforeMount: function beforeMount() { | ||
this.pluginHost.registerSubscription(this.subscription); | ||
}, | ||
computed: { | ||
computedParams: function computedParams() { | ||
var that = this; | ||
return !Object.keys(this.$attrs).length && !Object.keys(this.$listeners).length ? this.templateHost.params : { | ||
get attrs() { | ||
return that.$attrs; | ||
var getters = void 0; | ||
if (typeof Proxy !== 'undefined') { | ||
getters = new Proxy({}, { | ||
get: function get$$1(target, prop) { | ||
if (typeof prop !== 'string') return undefined; | ||
var boxedGetter = getGetterValue(prop); | ||
trackedDependencies[prop] = boxedGetter && boxedGetter.id; | ||
return boxedGetter && boxedGetter.value; | ||
}, | ||
get listeners() { | ||
return that.$listeners; | ||
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, prop) { | ||
return { configurable: true, enumerable: true, value: this.get(target, prop) }; | ||
}, | ||
get slots() { | ||
return that.$slots; | ||
}, | ||
get scopedSlots() { | ||
return that.$scopedSlots; | ||
ownKeys: function ownKeys() { | ||
return pluginHost.knownKeys('Getter'); | ||
} | ||
}; | ||
}, | ||
computedTemplates: function computedTemplates() { | ||
var _this3 = this; | ||
return this.name ? this.pluginHost.collect(this.name + 'Template').filter(function (template) { | ||
return template.predicate(_this3.computedParams); | ||
}).reverse() : this.templateHost.templates; | ||
}); | ||
} else { | ||
getters = pluginHost.knownKeys('Getter').reduce(function (acc, getterName) { | ||
Object.defineProperty(acc, getterName, { | ||
get: function get$$1() { | ||
var boxedGetter = getGetterValue(getterName); | ||
trackedDependencies[getterName] = boxedGetter && boxedGetter.id; | ||
return boxedGetter && boxedGetter.value; | ||
} | ||
}); | ||
return acc; | ||
}, {}); | ||
} | ||
}, | ||
render: function render() { | ||
var template = this.computedTemplates[0]; | ||
var content = template ? template.children() : null; | ||
if (content && typeof content === 'function') { | ||
content = content(this.computedParams); | ||
} | ||
if (this.$scopedSlots.default) { | ||
content = this.$scopedSlots.default(content); | ||
} | ||
return content && content.length ? content[0] : content; | ||
}, | ||
destroyed: function destroyed() { | ||
this.pluginHost.unregisterSubscription(this.subscription); | ||
} | ||
}; | ||
return { getters: getters, trackedDependencies: trackedDependencies }; | ||
}; | ||
var DxPluginHost = { | ||
name: 'DxPluginHost', | ||
beforeCreate: function beforeCreate() { | ||
this.pluginHost = new dxCore.PluginHost(); | ||
}, | ||
provide: function provide() { | ||
return defineProperty({}, PLUGIN_HOST_CONTEXT, this.pluginHost); | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
var isTrackedDependenciesChanged = function isTrackedDependenciesChanged(pluginHost, prevTrackedDependencies) { | ||
var getGetterValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (getterName) { | ||
return pluginHost.get(getterName + 'Getter'); | ||
}; | ||
return h('div', [h(PluginIndexer, [this.$slots.default]), h(DxTemplatePlaceholder, { | ||
attrs: { name: 'root' } | ||
})]); | ||
} | ||
}; | ||
var trackedDependencies = Object.keys(prevTrackedDependencies).reduce(function (acc, getterName) { | ||
var boxedGetter = getGetterValue(getterName); | ||
return Object.assign(acc, defineProperty({}, getterName, boxedGetter && boxedGetter.id)); | ||
}, {}); | ||
return !dxCore.shallowEqual(prevTrackedDependencies, trackedDependencies); | ||
}; | ||
var DxPlugin = { | ||
name: 'DxPlugin', | ||
props: { | ||
name: { | ||
type: String, | ||
default: '' | ||
}, | ||
dependencies: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
} | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
beforeMount: function beforeMount() { | ||
var pluginHost = this.pluginHost, | ||
position = this.position, | ||
name = this.name, | ||
dependencies = this.dependencies; | ||
this.plugin = { | ||
position: position, | ||
name: name, | ||
dependencies: dependencies, | ||
container: true | ||
var getAvailableActions = function getAvailableActions(pluginHost) { | ||
var getAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (actionName) { | ||
return pluginHost.collect(actionName + 'Action').slice().reverse()[0]; | ||
}; | ||
pluginHost.registerPlugin(this.plugin); | ||
}, | ||
beforeUpdate: function beforeUpdate() { | ||
this.pluginHost.ensureDependencies(); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
return h(PluginIndexer, [this.$slots.default]); | ||
} | ||
}; | ||
var getAvailableGetters = function getAvailableGetters(pluginHost) { | ||
var getGetterValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (getterName) { | ||
return pluginHost.get(getterName + 'Getter'); | ||
var actions = void 0; | ||
if (typeof Proxy !== 'undefined') { | ||
actions = new Proxy({}, { | ||
get: function get$$1(target, prop) { | ||
if (typeof prop !== 'string') return undefined; | ||
return getAction(prop); | ||
}, | ||
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, prop) { | ||
return { configurable: true, enumerable: true, value: this.get(target, prop) }; | ||
}, | ||
ownKeys: function ownKeys() { | ||
return pluginHost.knownKeys('Action'); | ||
} | ||
}); | ||
} else { | ||
actions = pluginHost.knownKeys('Action').reduce(function (acc, actionName) { | ||
Object.defineProperty(acc, actionName, { | ||
get: function get$$1() { | ||
return getAction(actionName); | ||
} | ||
}); | ||
return acc; | ||
}, {}); | ||
} | ||
return actions; | ||
}; | ||
var trackedDependencies = {}; | ||
var getters = void 0; | ||
if (typeof Proxy !== 'undefined') { | ||
getters = new Proxy({}, { | ||
get: function get$$1(target, prop) { | ||
if (typeof prop !== 'string') return undefined; | ||
var boxedGetter = getGetterValue(prop); | ||
trackedDependencies[prop] = boxedGetter && boxedGetter.id; | ||
return boxedGetter && boxedGetter.value; | ||
var DxAction = { | ||
name: 'DxAction', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, prop) { | ||
return { configurable: true, enumerable: true, value: this.get(target, prop) }; | ||
}, | ||
ownKeys: function ownKeys() { | ||
return pluginHost.knownKeys('Getter'); | ||
action: { | ||
type: Function, | ||
required: true | ||
} | ||
}); | ||
} else { | ||
getters = pluginHost.knownKeys('Getter').reduce(function (acc, getterName) { | ||
Object.defineProperty(acc, getterName, { | ||
get: function get$$1() { | ||
var boxedGetter = getGetterValue(getterName); | ||
trackedDependencies[getterName] = boxedGetter && boxedGetter.id; | ||
return boxedGetter && boxedGetter.value; | ||
} | ||
}); | ||
return acc; | ||
}, {}); | ||
} | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
beforeMount: function beforeMount() { | ||
var _this = this; | ||
return { getters: getters, trackedDependencies: trackedDependencies }; | ||
}; | ||
var pluginHost = this.pluginHost, | ||
name = this.name; | ||
var isTrackedDependenciesChanged = function isTrackedDependenciesChanged(pluginHost, prevTrackedDependencies) { | ||
var getGetterValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (getterName) { | ||
return pluginHost.get(getterName + 'Getter'); | ||
}; | ||
var trackedDependencies = Object.keys(prevTrackedDependencies).reduce(function (acc, getterName) { | ||
var boxedGetter = getGetterValue(getterName); | ||
return Object.assign(acc, defineProperty({}, getterName, boxedGetter && boxedGetter.id)); | ||
}, {}); | ||
return !dxCore.shallowEqual(prevTrackedDependencies, trackedDependencies); | ||
}; | ||
this.plugin = defineProperty({ | ||
position: function position() { | ||
return _this.position(); | ||
} | ||
}, name + 'Action', function undefined(params) { | ||
var action = _this.action; | ||
var getAvailableActions = function getAvailableActions(pluginHost) { | ||
var getAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (actionName) { | ||
return pluginHost.collect(actionName + 'Action').slice().reverse()[0]; | ||
}; | ||
var _getAvailableGetters = getAvailableGetters(pluginHost, function (getterName) { | ||
return pluginHost.get(getterName + 'Getter', _this.plugin); | ||
}), | ||
getters = _getAvailableGetters.getters; | ||
var actions = void 0; | ||
if (typeof Proxy !== 'undefined') { | ||
actions = new Proxy({}, { | ||
get: function get$$1(target, prop) { | ||
if (typeof prop !== 'string') return undefined; | ||
return getAction(prop); | ||
}, | ||
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, prop) { | ||
return { configurable: true, enumerable: true, value: this.get(target, prop) }; | ||
}, | ||
ownKeys: function ownKeys() { | ||
return pluginHost.knownKeys('Action'); | ||
} | ||
}); | ||
} else { | ||
actions = pluginHost.knownKeys('Action').reduce(function (acc, actionName) { | ||
Object.defineProperty(acc, actionName, { | ||
get: function get$$1() { | ||
return getAction(actionName); | ||
var nextParams = params; | ||
var actions = getAvailableActions(pluginHost, function (actionName) { | ||
return actionName === name ? function (newParams) { | ||
nextParams = newParams; | ||
} : pluginHost.collect(actionName + 'Action', _this.plugin).slice().reverse()[0]; | ||
}); | ||
action(params, getters, actions); | ||
var nextAction = pluginHost.collect(name + 'Action', _this.plugin).slice().reverse()[0]; | ||
if (nextAction) { | ||
nextAction(nextParams); | ||
} | ||
}); | ||
return acc; | ||
}, {}); | ||
} | ||
return actions; | ||
}; | ||
var DxAction = { | ||
name: 'DxAction', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true | ||
pluginHost.registerPlugin(this.plugin); | ||
}, | ||
action: { | ||
type: Function, | ||
required: true | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
return null; | ||
} | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
beforeMount: function beforeMount() { | ||
var _this = this; | ||
}; | ||
var pluginHost = this.pluginHost, | ||
name = this.name; | ||
var GLOBAL_SHIFT = 0xffff; | ||
this.plugin = defineProperty({ | ||
position: function position() { | ||
return _this.position(); | ||
var globalGetterId = 0; | ||
var DxGetter = { | ||
name: 'DxGetter', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
value: null, | ||
computed: { | ||
type: Function, | ||
default: undefined | ||
} | ||
}, name + 'Action', function undefined(params) { | ||
var action = _this.action; | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
created: function created() { | ||
this.globalId = globalGetterId; | ||
globalGetterId += 1; | ||
this.internalId = 0; | ||
this.generateId(); | ||
}, | ||
beforeMount: function beforeMount() { | ||
var _this = this; | ||
var _getAvailableGetters = getAvailableGetters(pluginHost, function (getterName) { | ||
return pluginHost.get(getterName + 'Getter', _this.plugin); | ||
}), | ||
getters = _getAvailableGetters.getters; | ||
var pluginHost = this.pluginHost, | ||
name = this.name; | ||
var nextParams = params; | ||
var actions = getAvailableActions(pluginHost, function (actionName) { | ||
return actionName === name ? function (newParams) { | ||
nextParams = newParams; | ||
} : pluginHost.collect(actionName + 'Action', _this.plugin).slice().reverse()[0]; | ||
}); | ||
action(params, getters, actions); | ||
var nextAction = pluginHost.collect(name + 'Action', _this.plugin).slice().reverse()[0]; | ||
if (nextAction) { | ||
nextAction(nextParams); | ||
} | ||
}); | ||
pluginHost.registerPlugin(this.plugin); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
return null; | ||
} | ||
}; | ||
var lastComputed = void 0; | ||
var lastTrackedDependencies = {}; | ||
var lastResult = void 0; | ||
var unwatch = void 0; | ||
var GLOBAL_SHIFT = 0xffff; | ||
this.plugin = defineProperty({ | ||
position: function position() { | ||
return _this.position(); | ||
} | ||
}, name + 'Getter', function (_undefined) { | ||
function undefined(_x) { | ||
return _undefined.apply(this, arguments); | ||
} | ||
var globalGetterId = 0; | ||
var DxGetter = { | ||
name: 'DxGetter', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
value: null, | ||
computed: { | ||
type: Function, | ||
default: undefined | ||
} | ||
}, | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
created: function created() { | ||
this.globalId = globalGetterId; | ||
globalGetterId += 1; | ||
this.internalId = 0; | ||
this.generateId(); | ||
}, | ||
beforeMount: function beforeMount() { | ||
var _this = this; | ||
undefined.toString = function () { | ||
return _undefined.toString(); | ||
}; | ||
var pluginHost = this.pluginHost, | ||
name = this.name; | ||
return undefined; | ||
}(function (original) { | ||
var value = _this.value, | ||
computed = _this.computed; | ||
if (computed === undefined) return { id: _this.id, value: value }; | ||
var lastComputed = void 0; | ||
var lastTrackedDependencies = {}; | ||
var lastResult = void 0; | ||
var unwatch = void 0; | ||
var getGetterValue = function getGetterValue(getterName) { | ||
return getterName === name ? original : pluginHost.get(getterName + 'Getter', _this.plugin); | ||
}; | ||
this.plugin = defineProperty({ | ||
position: function position() { | ||
return _this.position(); | ||
} | ||
}, name + 'Getter', function (_undefined) { | ||
function undefined(_x) { | ||
return _undefined.apply(this, arguments); | ||
} | ||
if (computed === lastComputed && !isTrackedDependenciesChanged(pluginHost, lastTrackedDependencies, getGetterValue)) { | ||
return { id: _this.id, value: lastResult }; | ||
} | ||
undefined.toString = function () { | ||
return _undefined.toString(); | ||
}; | ||
var _getAvailableGetters = getAvailableGetters(pluginHost, getGetterValue), | ||
getters = _getAvailableGetters.getters, | ||
trackedDependencies = _getAvailableGetters.trackedDependencies; | ||
return undefined; | ||
}(function (original) { | ||
var value = _this.value, | ||
computed = _this.computed; | ||
var actions = getAvailableActions(pluginHost); | ||
if (computed === undefined) return { id: _this.id, value: value }; | ||
lastComputed = computed; | ||
lastTrackedDependencies = trackedDependencies; | ||
if (unwatch) unwatch(); | ||
unwatch = _this.$watch(function () { | ||
return computed(getters, actions); | ||
}, function (newValue) { | ||
_this.generateId(); | ||
lastResult = newValue; | ||
}, { immediate: true }); | ||
return { id: _this.id, value: lastResult }; | ||
})); | ||
var getGetterValue = function getGetterValue(getterName) { | ||
return getterName === name ? original : pluginHost.get(getterName + 'Getter', _this.plugin); | ||
}; | ||
pluginHost.registerPlugin(this.plugin); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
return null; | ||
}, | ||
if (computed === lastComputed && !isTrackedDependenciesChanged(pluginHost, lastTrackedDependencies, getGetterValue)) { | ||
return { id: _this.id, value: lastResult }; | ||
methods: { | ||
generateId: function generateId() { | ||
this.internalId = this.internalId + 1 < GLOBAL_SHIFT ? this.internalId + 1 : 0; | ||
// eslint-disable-next-line no-bitwise | ||
this.id = (this.globalId << GLOBAL_SHIFT) + this.internalId; | ||
} | ||
}, | ||
watch: { | ||
value: function value() { | ||
this.generateId(); | ||
this.pluginHost.broadcast(UPDATE_CONNECTION_EVENT); | ||
} | ||
} | ||
}; | ||
var _getAvailableGetters = getAvailableGetters(pluginHost, getGetterValue), | ||
getters = _getAvailableGetters.getters, | ||
trackedDependencies = _getAvailableGetters.trackedDependencies; | ||
var globalTemplateId = 0; | ||
var DxTemplate = { | ||
name: 'DxTemplate', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
predicate: { | ||
type: Function | ||
} | ||
}, | ||
beforeCreate: function beforeCreate() { | ||
globalTemplateId += 1; | ||
this.id = globalTemplateId; | ||
}, | ||
var actions = getAvailableActions(pluginHost); | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
created: function created() { | ||
var _this = this; | ||
lastComputed = computed; | ||
lastTrackedDependencies = trackedDependencies; | ||
if (unwatch) unwatch(); | ||
unwatch = _this.$watch(function () { | ||
return computed(getters, actions); | ||
}, function (newValue) { | ||
_this.generateId(); | ||
lastResult = newValue; | ||
}, { immediate: true }); | ||
return { id: _this.id, value: lastResult }; | ||
})); | ||
pluginHost.registerPlugin(this.plugin); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
return null; | ||
}, | ||
methods: { | ||
generateId: function generateId() { | ||
this.internalId = this.internalId + 1 < GLOBAL_SHIFT ? this.internalId + 1 : 0; | ||
// eslint-disable-next-line no-bitwise | ||
this.id = (this.globalId << GLOBAL_SHIFT) + this.internalId; | ||
this.plugin = defineProperty({ | ||
position: function position() { | ||
return _this.position(); | ||
} | ||
}, this.name + 'Template', { | ||
id: this.id, | ||
predicate: function predicate(params) { | ||
return _this.predicate ? _this.predicate(params) : true; | ||
}, | ||
children: function children() { | ||
return _this.$scopedSlots.default || _this.$slots.default; | ||
} | ||
}); | ||
}, | ||
beforeMount: function beforeMount() { | ||
this.pluginHost.registerPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
return null; | ||
}, | ||
updated: function updated() { | ||
this.pluginHost.broadcast(RERENDER_TEMPLATE_EVENT, this.id); | ||
}, | ||
destroyed: function destroyed() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
} | ||
}, | ||
watch: { | ||
value: function value() { | ||
this.generateId(); | ||
this.pluginHost.broadcast(UPDATE_CONNECTION_EVENT); | ||
} | ||
} | ||
}; | ||
}; | ||
var globalTemplateId = 0; | ||
var DxTemplate = { | ||
name: 'DxTemplate', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true | ||
var DxTemplateConnector = { | ||
name: 'DxTemplateConnector', | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT } | ||
}, | ||
predicate: { | ||
type: Function | ||
} | ||
}, | ||
beforeCreate: function beforeCreate() { | ||
globalTemplateId += 1; | ||
this.id = globalTemplateId; | ||
}, | ||
beforeMount: function beforeMount() { | ||
var _this = this; | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT }, | ||
position: { from: POSITION_CONTEXT } | ||
}, | ||
created: function created() { | ||
var _this = this; | ||
this.trackedDependencies = {}; | ||
this.subscription = defineProperty({}, UPDATE_CONNECTION_EVENT, function () { | ||
return _this.updateConnection(); | ||
}); | ||
this.pluginHost.registerSubscription(this.subscription); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterSubscription(this.subscription); | ||
}, | ||
this.plugin = defineProperty({ | ||
position: function position() { | ||
return _this.position(); | ||
methods: { | ||
updateConnection: function updateConnection() { | ||
if (isTrackedDependenciesChanged(this.pluginHost, this.trackedDependencies)) { | ||
this.$forceUpdate(); | ||
} | ||
} | ||
}, this.name + 'Template', { | ||
id: this.id, | ||
predicate: function predicate(params) { | ||
return _this.predicate ? _this.predicate(params) : true; | ||
}, | ||
children: function children() { | ||
return _this.$scopedSlots.default || _this.$slots.default; | ||
} | ||
}); | ||
}, | ||
beforeMount: function beforeMount() { | ||
this.pluginHost.registerPlugin(this.plugin); | ||
}, | ||
render: function render() { | ||
return null; | ||
}, | ||
updated: function updated() { | ||
this.pluginHost.broadcast(RERENDER_TEMPLATE_EVENT, this.id); | ||
}, | ||
destroyed: function destroyed() { | ||
this.pluginHost.unregisterPlugin(this.plugin); | ||
} | ||
}; | ||
}, | ||
render: function render() { | ||
var _getAvailableGetters = getAvailableGetters(this.pluginHost), | ||
getters = _getAvailableGetters.getters, | ||
trackedDependencies = _getAvailableGetters.trackedDependencies; | ||
var DxTemplateConnector = { | ||
name: 'DxTemplateConnector', | ||
inject: { | ||
pluginHost: { from: PLUGIN_HOST_CONTEXT } | ||
}, | ||
beforeMount: function beforeMount() { | ||
var _this = this; | ||
this.trackedDependencies = trackedDependencies; | ||
var actions = getAvailableActions(this.pluginHost); | ||
this.trackedDependencies = {}; | ||
this.subscription = defineProperty({}, UPDATE_CONNECTION_EVENT, function () { | ||
return _this.updateConnection(); | ||
}); | ||
this.pluginHost.registerSubscription(this.subscription); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
this.pluginHost.unregisterSubscription(this.subscription); | ||
}, | ||
return this.$scopedSlots.default({ getters: getters, actions: actions }); | ||
} | ||
}; | ||
methods: { | ||
updateConnection: function updateConnection() { | ||
if (isTrackedDependenciesChanged(this.pluginHost, this.trackedDependencies)) { | ||
this.$forceUpdate(); | ||
} | ||
var styles = { | ||
root: { | ||
position: 'relative' | ||
}, | ||
triggers: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
height: '100%', | ||
width: '100%', | ||
overflow: 'hidden', | ||
zIndex: -1, | ||
visibility: 'hidden', | ||
opacity: 0 | ||
}, | ||
expand: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
height: '100%', | ||
width: '100%', | ||
overflow: 'auto' | ||
}, | ||
contract: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
height: '100%', | ||
width: '100%', | ||
overflow: 'auto' | ||
}, | ||
contractTrigger: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
width: '200%', | ||
height: '200%' | ||
} | ||
}, | ||
render: function render() { | ||
var _getAvailableGetters = getAvailableGetters(this.pluginHost), | ||
getters = _getAvailableGetters.getters, | ||
trackedDependencies = _getAvailableGetters.trackedDependencies; | ||
}; | ||
this.trackedDependencies = trackedDependencies; | ||
var actions = getAvailableActions(this.pluginHost); | ||
var DxSizer = { | ||
name: 'DxSizer', | ||
inheritAttrs: false, | ||
data: function data() { | ||
return { | ||
width: 0, | ||
height: 0 | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
this.setupListeners(); | ||
}, | ||
return this.$scopedSlots.default({ getters: getters, actions: actions }); | ||
} | ||
}; | ||
methods: { | ||
setupListeners: function setupListeners() { | ||
var size = { height: this.$refs.root.offsetHeight, width: this.$refs.root.offsetWidth }; | ||
var styles = { | ||
root: { | ||
position: 'relative' | ||
}, | ||
triggers: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
height: '100%', | ||
width: '100%', | ||
overflow: 'hidden', | ||
zIndex: -1, | ||
visibility: 'hidden', | ||
opacity: 0 | ||
}, | ||
expand: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
height: '100%', | ||
width: '100%', | ||
overflow: 'auto' | ||
}, | ||
contract: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
height: '100%', | ||
width: '100%', | ||
overflow: 'auto' | ||
}, | ||
contractTrigger: { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
width: '200%', | ||
height: '200%' | ||
} | ||
}; | ||
this.$refs.contract.scrollTop = size.height; | ||
this.$refs.contract.scrollLeft = size.width; | ||
var DxSizer = { | ||
name: 'DxSizer', | ||
inheritAttrs: false, | ||
data: function data() { | ||
return { | ||
width: 0, | ||
height: 0 | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
this.setupListeners(); | ||
}, | ||
this.$refs.expandTrigger.style.width = size.width + 1 + 'px'; | ||
this.$refs.expandTrigger.style.height = size.height + 1 + 'px'; | ||
this.$refs.expand.scrollTop = 1; | ||
this.$refs.expand.scrollLeft = 1; | ||
methods: { | ||
setupListeners: function setupListeners() { | ||
var size = { height: this.$refs.root.offsetHeight, width: this.$refs.root.offsetWidth }; | ||
if (this.width === size.width && this.height === size.height) return; | ||
this.$refs.contract.scrollTop = size.height; | ||
this.$refs.contract.scrollLeft = size.width; | ||
this.width = size.width; | ||
this.height = size.height; | ||
} | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
var width = this.width, | ||
height = this.height; | ||
this.$refs.expandTrigger.style.width = size.width + 1 + 'px'; | ||
this.$refs.expandTrigger.style.height = size.height + 1 + 'px'; | ||
this.$refs.expand.scrollTop = 1; | ||
this.$refs.expand.scrollLeft = 1; | ||
if (this.width === size.width && this.height === size.height) return; | ||
this.width = size.width; | ||
this.height = size.height; | ||
} | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
var width = this.width, | ||
height = this.height; | ||
return h( | ||
'div', | ||
{ | ||
ref: 'root', | ||
style: styles.root | ||
}, | ||
[width && height && this.$scopedSlots.default({ width: width, height: height }), h( | ||
return h( | ||
'div', | ||
{ style: styles.triggers }, | ||
[h( | ||
{ | ||
ref: 'root', | ||
style: styles.root | ||
}, | ||
[width && height && this.$scopedSlots.default({ width: width, height: height }), h( | ||
'div', | ||
{ | ||
ref: 'expand', | ||
style: styles.expand, | ||
on: { | ||
'scroll': this.setupListeners | ||
} | ||
}, | ||
[h('div', { | ||
ref: 'expandTrigger' | ||
})] | ||
), h( | ||
'div', | ||
{ | ||
ref: 'contract', | ||
style: styles.contract, | ||
on: { | ||
'scroll': this.setupListeners | ||
} | ||
}, | ||
[h('div', { | ||
style: styles.contractTrigger | ||
})] | ||
{ style: styles.triggers }, | ||
[h( | ||
'div', | ||
{ | ||
ref: 'expand', | ||
style: styles.expand, | ||
on: { | ||
'scroll': this.setupListeners | ||
} | ||
}, | ||
[h('div', { | ||
ref: 'expandTrigger' | ||
})] | ||
), h( | ||
'div', | ||
{ | ||
ref: 'contract', | ||
style: styles.contract, | ||
on: { | ||
'scroll': this.setupListeners | ||
} | ||
}, | ||
[h('div', { | ||
style: styles.contractTrigger | ||
})] | ||
)] | ||
)] | ||
)] | ||
); | ||
} | ||
}; | ||
); | ||
} | ||
}; | ||
var DxRefHolder = { | ||
name: 'DxRefHolder', | ||
inheritAttrs: false, | ||
render: function render() { | ||
return this.$slots.default[0]; | ||
} | ||
}; | ||
var createRenderComponent = function createRenderComponent(Component, initialAdditionalProps) { | ||
var storedAdditionalProps = initialAdditionalProps; | ||
var components = new Set(); | ||
var RenderComponent = { | ||
name: 'RenderComponent', | ||
var DxRefHolder = { | ||
name: 'DxRefHolder', | ||
inheritAttrs: false, | ||
beforeMount: function beforeMount() { | ||
components.add(this); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
components.delete(this); | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
return h(Component, { attrs: _extends({}, this.$attrs, storedAdditionalProps), on: _extends({}, this.$listeners) }); | ||
return this.$slots.default[0]; | ||
} | ||
}; | ||
return { | ||
component: RenderComponent, | ||
update: function update(additionalProps) { | ||
storedAdditionalProps = additionalProps; | ||
Array.from(components.values()).forEach(function (component) { | ||
return component.$forceUpdate(); | ||
}); | ||
} | ||
var createRenderComponent = function createRenderComponent(Component, initialAdditionalProps) { | ||
var storedAdditionalProps = initialAdditionalProps; | ||
var components = new Set(); | ||
var RenderComponent = { | ||
name: 'RenderComponent', | ||
inheritAttrs: false, | ||
beforeMount: function beforeMount() { | ||
components.add(this); | ||
}, | ||
beforeDestroy: function beforeDestroy() { | ||
components.delete(this); | ||
}, | ||
render: function render() { | ||
var h = arguments[0]; | ||
return h(Component, { attrs: _extends({}, this.$attrs, storedAdditionalProps), on: _extends({}, this.$listeners) }); | ||
} | ||
}; | ||
return { | ||
component: RenderComponent, | ||
update: function update(additionalProps) { | ||
storedAdditionalProps = additionalProps; | ||
Array.from(components.values()).forEach(function (component) { | ||
return component.$forceUpdate(); | ||
}); | ||
} | ||
}; | ||
}; | ||
}; | ||
exports.DxPluginHost = DxPluginHost; | ||
exports.DxPlugin = DxPlugin; | ||
exports.DxAction = DxAction; | ||
exports.DxGetter = DxGetter; | ||
exports.DxTemplate = DxTemplate; | ||
exports.DxTemplatePlaceholder = DxTemplatePlaceholder; | ||
exports.DxTemplateConnector = DxTemplateConnector; | ||
exports.DxSizer = DxSizer; | ||
exports.DxRefHolder = DxRefHolder; | ||
exports.createRenderComponent = createRenderComponent; | ||
exports.DxPluginHost = DxPluginHost; | ||
exports.DxPlugin = DxPlugin; | ||
exports.DxAction = DxAction; | ||
exports.DxGetter = DxGetter; | ||
exports.DxTemplate = DxTemplate; | ||
exports.DxTemplatePlaceholder = DxTemplatePlaceholder; | ||
exports.DxTemplateConnector = DxTemplateConnector; | ||
exports.DxSizer = DxSizer; | ||
exports.DxRefHolder = DxRefHolder; | ||
exports.createRenderComponent = createRenderComponent; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
//# sourceMappingURL=dx-vue-core.umd.js.map |
{ | ||
"name": "@devexpress/dx-vue-core", | ||
"version": "1.8.0-beta.1", | ||
"version": "1.8.0", | ||
"description": "Core library for DevExtreme Vue Components", | ||
@@ -42,3 +42,3 @@ "author": { | ||
"devDependencies": { | ||
"@devexpress/dx-testing": "^1.8.0-beta.1", | ||
"@devexpress/dx-testing": "^1.8.0", | ||
"@vue/test-utils": "1.0.0-beta.12", | ||
@@ -54,14 +54,14 @@ "babel-core": "^6.26.3", | ||
"core-js": "^2.5.7", | ||
"eslint": "^5.4.0", | ||
"eslint": "^5.6.1", | ||
"eslint-config-airbnb-base": "^13.1.0", | ||
"eslint-plugin-filenames": "^1.3.2", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-jest": "^21.22.0", | ||
"eslint-plugin-jest": "^21.24.0", | ||
"eslint-plugin-vue": "^4.7.1", | ||
"jest": "^23.5.0", | ||
"rollup": "0.50.0", | ||
"jest": "^23.6.0", | ||
"rollup": "^0.66.2", | ||
"rollup-plugin-babel": "^3.0.4", | ||
"rollup-plugin-commonjs": "8.4.1", | ||
"rollup-plugin-license": "^0.6.0", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-commonjs": "^9.1.8", | ||
"rollup-plugin-license": "^0.7.0", | ||
"rollup-plugin-node-resolve": "^3.4.0", | ||
"vue": "^2.5.17", | ||
@@ -72,3 +72,3 @@ "vue-server-renderer": "^2.5.17", | ||
"dependencies": { | ||
"@devexpress/dx-core": "^1.8.0-beta.1" | ||
"@devexpress/dx-core": "^1.8.0" | ||
}, | ||
@@ -78,3 +78,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "8fb5dc5f32b4a02a8922917f07398b48902ecc5c" | ||
"gitHead": "30dd98f003c170e60ce6eb79d48fe4e3ac99338d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
0
-100%120498
-0.05%1351
-12.33%Updated