@syncfusion/ej2-vue-base
Advanced tools
Comparing version 18.4.30 to 18.4.34
@@ -5,2 +5,8 @@ # Changelog | ||
### Common | ||
#### Bug Fixes | ||
- `I307971` - Resolved data accessing issue in templates. | ||
## 17.4.47 (2020-02-05) | ||
@@ -7,0 +13,0 @@ |
/*! | ||
* filename: ej2-vue-base.umd.min.js | ||
* version : 18.4.30 | ||
* version : 18.4.34 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","vue","@syncfusion/ej2-base"],t):t(e.ej={},e.Vue,e.ej2Base)}(this,function(e,t,n){"use strict";function o(e,n){void 0===n&&(n={}),n.name=n.name||e._componentTag||e.name;var o=e.prototype;if(n.props)for(var r=function(e){(n.props||(n.props={}))[e]={},(n.watch||(n.watch={}))[e]=function(t){this.ej2Instances[e]=t,this.dataBind&&this.dataBind()}},i=0,p=n.props;i<p.length;i++){r(p[i])}Object.getOwnPropertyNames(o).forEach(function(e){if("constructor"!==e)if(a.indexOf(e)>-1)n[e]=o[e];else{var t=Object.getOwnPropertyDescriptor(o,e);"function"==typeof t.value?(n.methods||(n.methods={}))[e]=t.value:(t.get||t.set)&&((n.computed||(n.computed={}))[e]={get:t.get,set:t.set})}}),Object.getOwnPropertyNames(s.prototype).forEach(function(e){a.indexOf(e)>-1&&(n[e]=o[e])}),(n.mixins||(n.mixins=[])).push({data:function(){return function(e,t){t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var o in e.$options.props)e.hasOwnProperty(o)||n.push(o);n.forEach(function(n){"_"!==n.charAt(0)&&Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){return e[n]=t}})})};var n=new t,o={};return Object.keys(n).forEach(function(e){void 0!==n[e]&&(o[e]=n[e])}),o}(this,e)}});var c=e.__decorators__;c&&(c.forEach(Function(n)),delete e.__decorators__);var u=Object.getPrototypeOf(e.prototype);return(u instanceof t?u.constructor:t).extend(n)}function r(e,o){var r=this;return"string"==typeof e?p(e,o):function(o,i){var s=n.getUniqueID("templateParentDiv"),a=n.getUniqueID("templateDiv"),p=n.createElement("div",{id:s,innerHTML:'<div id="'+a+'"></div>'});document.body.appendChild(p);var c,u=e.call(r,{});if(i){var d=u.template,f=n.getValue("template.propsData",u),h={data:{data:o},parent:i.vueInstance};f&&(d=u.template.extends,h.propsData=f),"function"!=typeof d&&(d=t.extend(d));new d(h).$mount("#"+a),c=p.childNodes,n.detach(p)}return c||[]}}t=t&&t.hasOwnProperty("default")?t.default:t;var i=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasInjectedModules=!1,t.hasChildDirective=!1,t.childDirObjects="",t}return i(t,e),t.prototype.created=function(){for(var e=this,t=function(t){n.ej2Instances.addEventListener(t,function(n){e.$emit(t,n)})},n=this,o=0,r=this.propKeys;o<r.length;o++){t(r[o])}},t.prototype.mounted=function(){this.ej2Instances.isVue=!0,this.ej2Instances.vueInstance=this,this.ej2Instances.appendTo(this.$el)},t.prototype.getInjectedServices=function(){var e=[],t=n.getValue("$vnode.context.$options.provide",this);if(t){var o=t;"function"==typeof t&&(o=this.$vnode.context.$options.provide()),e=o[this.ej2Instances.getModuleName()]||[]}return e},t.prototype.updated=function(){if(this.hasChildDirective){var e={};this.fetchChildPropValues(e);var t=JSON.stringify(e);this.childDirObjects!==t&&(this.childDirObjects=t,this.assignValueToWrapper(e,!1))}},t.prototype.beforeDestroy=function(){var e=this;e.ej2Instances.destroy(),e.$el.style.visibility="hidden",e=null},t.prototype.bindProperties=function(){for(var e={},t=0,o=this.propKeys;t<o.length;t++){var r=o[t];n.isNullOrUndefined(this[r])||(e[r]=this[r])}if(this.hasChildDirective&&this.fetchChildPropValues(e),this.hasInjectedModules){for(var i=this.getInjectedServices()||[],s=0,a=this.ej2Instances.getInjectedModules()||[];s<a.length;s++){var p=a[s];-1===i.indexOf(p)&&i.push(p)}this.ej2Instances.injectedModules=i}this.assignValueToWrapper(e)},t.prototype.assignValueToWrapper=function(e,t){this.ej2Instances.setProperties(n.extend({},{},e,!0),!!n.isNullOrUndefined(t)||t)},t.prototype.fetchChildPropValues=function(e){var t=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(t));for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];e[r]=t[r]}},t.prototype.getDirectiveValues=function(e,t,n){var o=Object.keys(t),r={};if(e)for(var i=0,s=e;i<s.length;i++){var a=s[i];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var p=a.componentOptions.tag;if(-1!==o.indexOf(p)){var c=n[p]?n[p]:p;r[c.replace("e-","")]=[];for(var u=0,d=a.componentOptions.children;u<d.length;u++){var f=d[u],h=this.getVNodeValue(f,t[p],n);0!==Object.keys(h).length&&r[c.replace("e-","")].push(h)}}}}return r},t.prototype.getMultiLevelDirValue=function(e,t,n){for(var o={},r=0,i=e;r<i.length;r++){var s=i[r];if(s.componentOptions){var a=s.componentOptions.tag,p=n[a]?n[a]:a;if(o[p.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var c=0,u=s.componentOptions.children;c<u.length;c++){var d=u[c],f=this.getVNodeValue(d,t[a],n);0!==Object.keys(f).length&&o[p.replace("e-","")].push(f)}}}return o},t.prototype.getVNodeValue=function(e,t,o){var r={};if(e.componentOptions){var i=e.componentOptions.tag;"string"==typeof t&&i===t&&e.data?r=e.data.attrs?this.getCamelCaseProps(e.data.attrs):this.getCamelCaseProps(e.data):"object"==typeof t&&(e.componentOptions.children&&-1!==Object.keys(t).indexOf(i)&&(r=this.getMultiLevelDirValue(e.componentOptions.children,t[i],o)),e.data&&e.data.attrs&&(r=n.extend(r,this.getCamelCaseProps(e.data.attrs))))}return r},t.prototype.getCamelCaseProps=function(e){for(var t={},n=0,o=Object.keys(e);n<o.length;n++){var r=o[n];t[r.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})]=e[r]}return t},t.prototype.dataBind=function(){this.ej2Instances.dataBind()},t.prototype.setProperties=function(e,t){return this.ej2Instances.setProperties(e,t)},t}(t),a=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],p=n.getTemplateEngine();n.setTemplateEngine({compile:r}),e.ComponentBase=s,e.$internalHooks=a,e.EJComponentDecorator=function(e){return function(t){return o(t,e)}},e.EJcomponentFactory=o,e.compile=r,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","vue","@syncfusion/ej2-base"],t):t(e.ej={},e.Vue,e.ej2Base)}(this,function(e,t,n){"use strict";function o(e,n){void 0===n&&(n={}),n.name=n.name||e._componentTag||e.name;var o=e.prototype;if(n.props)for(var r=function(e){(n.props||(n.props={}))[e]={},(n.watch||(n.watch={}))[e]=function(t){this.ej2Instances[e]=t,this.dataBind&&this.dataBind()}},i=0,p=n.props;i<p.length;i++){r(p[i])}Object.getOwnPropertyNames(o).forEach(function(e){if("constructor"!==e)if(a.indexOf(e)>-1)n[e]=o[e];else{var t=Object.getOwnPropertyDescriptor(o,e);"function"==typeof t.value?(n.methods||(n.methods={}))[e]=t.value:(t.get||t.set)&&((n.computed||(n.computed={}))[e]={get:t.get,set:t.set})}}),Object.getOwnPropertyNames(s.prototype).forEach(function(e){a.indexOf(e)>-1&&(n[e]=o[e])}),(n.mixins||(n.mixins=[])).push({data:function(){return function(e,t){t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var o in e.$options.props)e.hasOwnProperty(o)||n.push(o);n.forEach(function(n){"_"!==n.charAt(0)&&Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){return e[n]=t}})})};var n=new t,o={};return Object.keys(n).forEach(function(e){void 0!==n[e]&&(o[e]=n[e])}),o}(this,e)}});var c=e.__decorators__;c&&(c.forEach(Function(n)),delete e.__decorators__);var u=Object.getPrototypeOf(e.prototype);return(u instanceof t?u.constructor:t).extend(n)}function r(e,o){var r=this;return"string"==typeof e?p(e,o):function(o,i){var s=n.getUniqueID("templateParentDiv"),a=n.getUniqueID("templateDiv"),p=n.createElement("div",{id:s,innerHTML:'<div id="'+a+'"></div>'});document.body.appendChild(p);var c,u=e.call(r,{});if(i){var d=u.template,f=n.getValue("template.propsData",u),h={data:{data:n.extend(u.data||{},o)},parent:i.vueInstance};f&&(d=u.template.extends,h.propsData=f),"function"!=typeof d&&(d=t.extend(d));new d(h).$mount("#"+a),c=p.childNodes,n.detach(p)}return c||[]}}t=t&&t.hasOwnProperty("default")?t.default:t;var i=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasInjectedModules=!1,t.hasChildDirective=!1,t.childDirObjects="",t}return i(t,e),t.prototype.created=function(){for(var e=this,t=function(t){n.ej2Instances.addEventListener(t,function(n){e.$emit(t,n)})},n=this,o=0,r=this.propKeys;o<r.length;o++){t(r[o])}},t.prototype.mounted=function(){this.ej2Instances.isVue=!0,this.ej2Instances.vueInstance=this,this.ej2Instances.appendTo(this.$el)},t.prototype.getInjectedServices=function(){var e=[],t=n.getValue("$vnode.context.$options.provide",this);if(t){var o=t;"function"==typeof t&&(o=this.$vnode.context.$options.provide()),e=o[this.ej2Instances.getModuleName()]||[]}return e},t.prototype.updated=function(){if(this.hasChildDirective){var e={};this.fetchChildPropValues(e);var t=JSON.stringify(e);this.childDirObjects!==t&&(this.childDirObjects=t,this.assignValueToWrapper(e,!1))}},t.prototype.beforeDestroy=function(){var e=this;e.ej2Instances.destroy(),e.$el.style.visibility="hidden",e=null},t.prototype.bindProperties=function(){for(var e={},t=0,o=this.propKeys;t<o.length;t++){var r=o[t];n.isNullOrUndefined(this[r])||(e[r]=this[r])}if(this.hasChildDirective&&this.fetchChildPropValues(e),this.hasInjectedModules){for(var i=this.getInjectedServices()||[],s=0,a=this.ej2Instances.getInjectedModules()||[];s<a.length;s++){var p=a[s];-1===i.indexOf(p)&&i.push(p)}this.ej2Instances.injectedModules=i}this.assignValueToWrapper(e)},t.prototype.assignValueToWrapper=function(e,t){this.ej2Instances.setProperties(n.extend({},{},e,!0),!!n.isNullOrUndefined(t)||t)},t.prototype.fetchChildPropValues=function(e){var t=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(t));for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];e[r]=t[r]}},t.prototype.getDirectiveValues=function(e,t,n){var o=Object.keys(t),r={};if(e)for(var i=0,s=e;i<s.length;i++){var a=s[i];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var p=a.componentOptions.tag;if(-1!==o.indexOf(p)){var c=n[p]?n[p]:p;r[c.replace("e-","")]=[];for(var u=0,d=a.componentOptions.children;u<d.length;u++){var f=d[u],h=this.getVNodeValue(f,t[p],n);0!==Object.keys(h).length&&r[c.replace("e-","")].push(h)}}}}return r},t.prototype.getMultiLevelDirValue=function(e,t,n){for(var o={},r=0,i=e;r<i.length;r++){var s=i[r];if(s.componentOptions){var a=s.componentOptions.tag,p=n[a]?n[a]:a;if(o[p.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var c=0,u=s.componentOptions.children;c<u.length;c++){var d=u[c],f=this.getVNodeValue(d,t[a],n);0!==Object.keys(f).length&&o[p.replace("e-","")].push(f)}}}return o},t.prototype.getVNodeValue=function(e,t,o){var r={};if(e.componentOptions){var i=e.componentOptions.tag;"string"==typeof t&&i===t&&e.data?r=e.data.attrs?this.getCamelCaseProps(e.data.attrs):this.getCamelCaseProps(e.data):"object"==typeof t&&(e.componentOptions.children&&-1!==Object.keys(t).indexOf(i)&&(r=this.getMultiLevelDirValue(e.componentOptions.children,t[i],o)),e.data&&e.data.attrs&&(r=n.extend(r,this.getCamelCaseProps(e.data.attrs))))}return r},t.prototype.getCamelCaseProps=function(e){for(var t={},n=0,o=Object.keys(e);n<o.length;n++){var r=o[n];t[r.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})]=e[r]}return t},t.prototype.dataBind=function(){this.ej2Instances.dataBind()},t.prototype.setProperties=function(e,t){return this.ej2Instances.setProperties(e,t)},t}(t),a=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],p=n.getTemplateEngine();n.setTemplateEngine({compile:r}),e.ComponentBase=s,e.$internalHooks=a,e.EJComponentDecorator=function(e){return function(t){return o(t,e)}},e.EJcomponentFactory=o,e.compile=r,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ej2-vue-base.umd.min.js.map |
@@ -301,3 +301,3 @@ import Vue from 'vue'; | ||
let propsData = getValue('template.propsData', tempObj); | ||
let dataObj = { 'data': { data: data }, parent: context.vueInstance }; | ||
let dataObj = { 'data': { data: extend(tempObj.data || {}, data) }, parent: context.vueInstance }; | ||
if (propsData) { | ||
@@ -304,0 +304,0 @@ templateFunction = tempObj.template.extends; |
@@ -336,3 +336,3 @@ import Vue from 'vue'; | ||
var propsData = getValue('template.propsData', tempObj); | ||
var dataObj = { 'data': { data: data }, parent: context.vueInstance }; | ||
var dataObj = { 'data': { data: extend(tempObj.data || {}, data) }, parent: context.vueInstance }; | ||
if (propsData) { | ||
@@ -339,0 +339,0 @@ templateFunction = tempObj.template.extends; |
/*! | ||
* filename: ej2-vue-base.min.js | ||
* version : 18.4.30 | ||
* version : 18.4.34 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
this.ej=this.ej||{},this.ej.vuebase=function(t,e,n){"use strict";function o(t){return function(e){return r(e,t)}}function r(t,n){void 0===n&&(n={}),n.name=n.name||t._componentTag||t.name;var o=t.prototype;if(n.props)for(var r=0,s=n.props;r<s.length;r++)!function(t){(n.props||(n.props={}))[t]={},(n.watch||(n.watch={}))[t]=function(e){this.ej2Instances[t]=e,this.dataBind&&this.dataBind()}}(s[r]);Object.getOwnPropertyNames(o).forEach(function(t){if("constructor"!==t){if(c.indexOf(t)>-1)return void(n[t]=o[t]);var e=Object.getOwnPropertyDescriptor(o,t);"function"==typeof e.value?(n.methods||(n.methods={}))[t]=e.value:(e.get||e.set)&&((n.computed||(n.computed={}))[t]={get:e.get,set:e.set})}}),Object.getOwnPropertyNames(p.prototype).forEach(function(t){if(c.indexOf(t)>-1)return void(n[t]=o[t])}),(n.mixins||(n.mixins=[])).push({data:function(){return i(this,t)}});var a=t.__decorators__;a&&(a.forEach(Function(n)),delete t.__decorators__);var u=Object.getPrototypeOf(t.prototype);return(u instanceof e?u.constructor:e).extend(n)}function i(t,e){e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var o in t.$options.props)t.hasOwnProperty(o)||n.push(o);n.forEach(function(n){"_"!==n.charAt(0)&&Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){return t[n]=e}})})};var n=new e,o={};return Object.keys(n).forEach(function(t){void 0!==n[t]&&(o[t]=n[t])}),o}function s(t,o){var r=this;return"string"==typeof t?u(t,o):function(o,i){var s=n.getUniqueID("templateParentDiv"),a=n.getUniqueID("templateDiv"),p=n.createElement("div",{id:s,innerHTML:'<div id="'+a+'"></div>'});document.body.appendChild(p);var c,u=t.call(r,{});if(i){var d=u.template,h=n.getValue("template.propsData",u),f={data:{data:o},parent:i.vueInstance};h&&(d=u.template.extends,f.propsData=h),"function"!=typeof d&&(d=e.extend(d)),new d(f).$mount("#"+a),c=p.childNodes,n.detach(p)}return c||[]}}e=e&&e.hasOwnProperty("default")?e.default:e;var a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasInjectedModules=!1,e.hasChildDirective=!1,e.childDirObjects="",e}return a(e,t),e.prototype.created=function(){for(var t=this,e=this,n=0,o=this.propKeys;n<o.length;n++)!function(n){e.ej2Instances.addEventListener(n,function(e){t.$emit(n,e)})}(o[n])},e.prototype.mounted=function(){this.ej2Instances.isVue=!0,this.ej2Instances.vueInstance=this,this.ej2Instances.appendTo(this.$el)},e.prototype.getInjectedServices=function(){var t=[],e=n.getValue("$vnode.context.$options.provide",this);if(e){var o=e;"function"==typeof e&&(o=this.$vnode.context.$options.provide()),t=o[this.ej2Instances.getModuleName()]||[]}return t},e.prototype.updated=function(){if(this.hasChildDirective){var t={};this.fetchChildPropValues(t);var e=JSON.stringify(t);this.childDirObjects!==e&&(this.childDirObjects=e,this.assignValueToWrapper(t,!1))}},e.prototype.beforeDestroy=function(){var t=this;t.ej2Instances.destroy(),t.$el.style.visibility="hidden",t=null},e.prototype.bindProperties=function(){for(var t={},e=0,o=this.propKeys;e<o.length;e++){var r=o[e];n.isNullOrUndefined(this[r])||(t[r]=this[r])}if(this.hasChildDirective&&this.fetchChildPropValues(t),this.hasInjectedModules){for(var i=this.getInjectedServices()||[],s=0,a=this.ej2Instances.getInjectedModules()||[];s<a.length;s++){var p=a[s];-1===i.indexOf(p)&&i.push(p)}this.ej2Instances.injectedModules=i}this.assignValueToWrapper(t)},e.prototype.assignValueToWrapper=function(t,e){this.ej2Instances.setProperties(n.extend({},{},t,!0),!!n.isNullOrUndefined(e)||e)},e.prototype.fetchChildPropValues=function(t){var e=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(e));for(var n=0,o=Object.keys(e);n<o.length;n++){var r=o[n];t[r]=e[r]}},e.prototype.getDirectiveValues=function(t,e,n){var o=Object.keys(e),r={};if(t)for(var i=0,s=t;i<s.length;i++){var a=s[i];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var p=a.componentOptions.tag;if(-1!==o.indexOf(p)){var c=n[p]?n[p]:p;r[c.replace("e-","")]=[];for(var u=0,d=a.componentOptions.children;u<d.length;u++){var h=d[u],f=this.getVNodeValue(h,e[p],n);0!==Object.keys(f).length&&r[c.replace("e-","")].push(f)}}}}return r},e.prototype.getMultiLevelDirValue=function(t,e,n){for(var o={},r=0,i=t;r<i.length;r++){var s=i[r];if(s.componentOptions){var a=s.componentOptions.tag,p=n[a]?n[a]:a;if(o[p.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var c=0,u=s.componentOptions.children;c<u.length;c++){var d=u[c],h=this.getVNodeValue(d,e[a],n);0!==Object.keys(h).length&&o[p.replace("e-","")].push(h)}}}return o},e.prototype.getVNodeValue=function(t,e,o){var r={};if(t.componentOptions){var i=t.componentOptions.tag;"string"==typeof e&&i===e&&t.data?r=t.data.attrs?this.getCamelCaseProps(t.data.attrs):this.getCamelCaseProps(t.data):"object"==typeof e&&(t.componentOptions.children&&-1!==Object.keys(e).indexOf(i)&&(r=this.getMultiLevelDirValue(t.componentOptions.children,e[i],o)),t.data&&t.data.attrs&&(r=n.extend(r,this.getCamelCaseProps(t.data.attrs))))}return r},e.prototype.getCamelCaseProps=function(t){for(var e={},n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];e[r.replace(/-[a-z]/g,function(t){return t[1].toUpperCase()})]=t[r]}return e},e.prototype.dataBind=function(){this.ej2Instances.dataBind()},e.prototype.setProperties=function(t,e){return this.ej2Instances.setProperties(t,e)},e}(e),c=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],u=n.getTemplateEngine();return n.setTemplateEngine({compile:s}),t.ComponentBase=p,t.$internalHooks=c,t.EJComponentDecorator=o,t.EJcomponentFactory=r,t.compile=s,t}({},Vue,ej.base),this.ejs=ej; | ||
this.ej=this.ej||{},this.ej.vuebase=function(t,e,n){"use strict";function o(t){return function(e){return r(e,t)}}function r(t,n){void 0===n&&(n={}),n.name=n.name||t._componentTag||t.name;var o=t.prototype;if(n.props)for(var r=0,s=n.props;r<s.length;r++)!function(t){(n.props||(n.props={}))[t]={},(n.watch||(n.watch={}))[t]=function(e){this.ej2Instances[t]=e,this.dataBind&&this.dataBind()}}(s[r]);Object.getOwnPropertyNames(o).forEach(function(t){if("constructor"!==t){if(c.indexOf(t)>-1)return void(n[t]=o[t]);var e=Object.getOwnPropertyDescriptor(o,t);"function"==typeof e.value?(n.methods||(n.methods={}))[t]=e.value:(e.get||e.set)&&((n.computed||(n.computed={}))[t]={get:e.get,set:e.set})}}),Object.getOwnPropertyNames(p.prototype).forEach(function(t){if(c.indexOf(t)>-1)return void(n[t]=o[t])}),(n.mixins||(n.mixins=[])).push({data:function(){return i(this,t)}});var a=t.__decorators__;a&&(a.forEach(Function(n)),delete t.__decorators__);var u=Object.getPrototypeOf(t.prototype);return(u instanceof e?u.constructor:e).extend(n)}function i(t,e){e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var o in t.$options.props)t.hasOwnProperty(o)||n.push(o);n.forEach(function(n){"_"!==n.charAt(0)&&Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){return t[n]=e}})})};var n=new e,o={};return Object.keys(n).forEach(function(t){void 0!==n[t]&&(o[t]=n[t])}),o}function s(t,o){var r=this;return"string"==typeof t?u(t,o):function(o,i){var s=n.getUniqueID("templateParentDiv"),a=n.getUniqueID("templateDiv"),p=n.createElement("div",{id:s,innerHTML:'<div id="'+a+'"></div>'});document.body.appendChild(p);var c,u=t.call(r,{});if(i){var d=u.template,h=n.getValue("template.propsData",u),f={data:{data:n.extend(u.data||{},o)},parent:i.vueInstance};h&&(d=u.template.extends,f.propsData=h),"function"!=typeof d&&(d=e.extend(d)),new d(f).$mount("#"+a),c=p.childNodes,n.detach(p)}return c||[]}}e=e&&e.hasOwnProperty("default")?e.default:e;var a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasInjectedModules=!1,e.hasChildDirective=!1,e.childDirObjects="",e}return a(e,t),e.prototype.created=function(){for(var t=this,e=this,n=0,o=this.propKeys;n<o.length;n++)!function(n){e.ej2Instances.addEventListener(n,function(e){t.$emit(n,e)})}(o[n])},e.prototype.mounted=function(){this.ej2Instances.isVue=!0,this.ej2Instances.vueInstance=this,this.ej2Instances.appendTo(this.$el)},e.prototype.getInjectedServices=function(){var t=[],e=n.getValue("$vnode.context.$options.provide",this);if(e){var o=e;"function"==typeof e&&(o=this.$vnode.context.$options.provide()),t=o[this.ej2Instances.getModuleName()]||[]}return t},e.prototype.updated=function(){if(this.hasChildDirective){var t={};this.fetchChildPropValues(t);var e=JSON.stringify(t);this.childDirObjects!==e&&(this.childDirObjects=e,this.assignValueToWrapper(t,!1))}},e.prototype.beforeDestroy=function(){var t=this;t.ej2Instances.destroy(),t.$el.style.visibility="hidden",t=null},e.prototype.bindProperties=function(){for(var t={},e=0,o=this.propKeys;e<o.length;e++){var r=o[e];n.isNullOrUndefined(this[r])||(t[r]=this[r])}if(this.hasChildDirective&&this.fetchChildPropValues(t),this.hasInjectedModules){for(var i=this.getInjectedServices()||[],s=0,a=this.ej2Instances.getInjectedModules()||[];s<a.length;s++){var p=a[s];-1===i.indexOf(p)&&i.push(p)}this.ej2Instances.injectedModules=i}this.assignValueToWrapper(t)},e.prototype.assignValueToWrapper=function(t,e){this.ej2Instances.setProperties(n.extend({},{},t,!0),!!n.isNullOrUndefined(e)||e)},e.prototype.fetchChildPropValues=function(t){var e=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(e));for(var n=0,o=Object.keys(e);n<o.length;n++){var r=o[n];t[r]=e[r]}},e.prototype.getDirectiveValues=function(t,e,n){var o=Object.keys(e),r={};if(t)for(var i=0,s=t;i<s.length;i++){var a=s[i];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var p=a.componentOptions.tag;if(-1!==o.indexOf(p)){var c=n[p]?n[p]:p;r[c.replace("e-","")]=[];for(var u=0,d=a.componentOptions.children;u<d.length;u++){var h=d[u],f=this.getVNodeValue(h,e[p],n);0!==Object.keys(f).length&&r[c.replace("e-","")].push(f)}}}}return r},e.prototype.getMultiLevelDirValue=function(t,e,n){for(var o={},r=0,i=t;r<i.length;r++){var s=i[r];if(s.componentOptions){var a=s.componentOptions.tag,p=n[a]?n[a]:a;if(o[p.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var c=0,u=s.componentOptions.children;c<u.length;c++){var d=u[c],h=this.getVNodeValue(d,e[a],n);0!==Object.keys(h).length&&o[p.replace("e-","")].push(h)}}}return o},e.prototype.getVNodeValue=function(t,e,o){var r={};if(t.componentOptions){var i=t.componentOptions.tag;"string"==typeof e&&i===e&&t.data?r=t.data.attrs?this.getCamelCaseProps(t.data.attrs):this.getCamelCaseProps(t.data):"object"==typeof e&&(t.componentOptions.children&&-1!==Object.keys(e).indexOf(i)&&(r=this.getMultiLevelDirValue(t.componentOptions.children,e[i],o)),t.data&&t.data.attrs&&(r=n.extend(r,this.getCamelCaseProps(t.data.attrs))))}return r},e.prototype.getCamelCaseProps=function(t){for(var e={},n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];e[r.replace(/-[a-z]/g,function(t){return t[1].toUpperCase()})]=t[r]}return e},e.prototype.dataBind=function(){this.ej2Instances.dataBind()},e.prototype.setProperties=function(t,e){return this.ej2Instances.setProperties(t,e)},e}(e),c=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],u=n.getTemplateEngine();return n.setTemplateEngine({compile:s}),t.ComponentBase=p,t.$internalHooks=c,t.EJComponentDecorator=o,t.EJcomponentFactory=r,t.compile=s,t}({},Vue,ej.base),this.ejs=ej; | ||
//# sourceMappingURL=ej2-vue-base.min.js.map |
/*! | ||
* filename: index.d.ts | ||
* version : 18.4.30 | ||
* version : 18.4.34 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-vue-base@*", | ||
"_id": "@syncfusion/ej2-vue-base@17.4.51", | ||
"_id": "@syncfusion/ej2-vue-base@18.4.30", | ||
"_inBundle": false, | ||
"_integrity": "sha512-kuGI61s8rudaUdo8rY4tNLHE4J4QGaKI4XBuWYd4oTGP1z0IWhwoiHnwL3TKdSpJMvXkk1dBYtHthJRcc9RNnA==", | ||
"_integrity": "sha512-Gc/LMEgzW0BC0fNPzdGUW77pgfcG63C7nQq4sl8bxkQa8THu207AW/9gZSLfVbUio7YBOxlDgiZgJW1KiabVeg==", | ||
"_location": "/@syncfusion/ej2-vue-base", | ||
@@ -21,4 +21,2 @@ "_phantomChildren": {}, | ||
"/", | ||
"/@syncfusion/ej2-vue-barcode-generator", | ||
"/@syncfusion/ej2-vue-buttons", | ||
"/@syncfusion/ej2-vue-calendars", | ||
@@ -30,13 +28,3 @@ "/@syncfusion/ej2-vue-charts", | ||
"/@syncfusion/ej2-vue-dropdowns", | ||
"/@syncfusion/ej2-vue-filemanager", | ||
"/@syncfusion/ej2-vue-gantt", | ||
"/@syncfusion/ej2-vue-grids", | ||
"/@syncfusion/ej2-vue-heatmap", | ||
"/@syncfusion/ej2-vue-inplace-editor", | ||
"/@syncfusion/ej2-vue-inputs", | ||
"/@syncfusion/ej2-vue-kanban", | ||
"/@syncfusion/ej2-vue-layouts", | ||
"/@syncfusion/ej2-vue-lineargauge", | ||
"/@syncfusion/ej2-vue-lists", | ||
"/@syncfusion/ej2-vue-maps", | ||
"/@syncfusion/ej2-vue-navigations", | ||
@@ -46,14 +34,9 @@ "/@syncfusion/ej2-vue-notifications", | ||
"/@syncfusion/ej2-vue-pivotview", | ||
"/@syncfusion/ej2-vue-popups", | ||
"/@syncfusion/ej2-vue-progressbar", | ||
"/@syncfusion/ej2-vue-querybuilder", | ||
"/@syncfusion/ej2-vue-richtexteditor", | ||
"/@syncfusion/ej2-vue-schedule", | ||
"/@syncfusion/ej2-vue-splitbuttons", | ||
"/@syncfusion/ej2-vue-spreadsheet", | ||
"/@syncfusion/ej2-vue-treegrid", | ||
"/@syncfusion/ej2-vue-treemap" | ||
"/@syncfusion/ej2-vue-treegrid" | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-vue-base/-/ej2-vue-base-17.4.51.tgz", | ||
"_shasum": "af93792e35608a2fb5e8fa24b09b4edeb88f2b3e", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-vue-base/-/ej2-vue-base-18.4.30.tgz", | ||
"_shasum": "9cef2dcbe245e2c0e0385fb84fc58f048ceaeb92", | ||
"_spec": "@syncfusion/ej2-vue-base@*", | ||
@@ -69,3 +52,3 @@ "_where": "/jenkins/workspace/automation_release_18.4.0.1-WOJ6QVY6EU5ONBWOYGQFKS2VU2UW7E67MOXUPKCE5AX7QQX7M5JQ/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~18.4.30" | ||
"@syncfusion/ej2-base": "~18.4.34" | ||
}, | ||
@@ -99,4 +82,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "18.4.30", | ||
"version": "18.4.34", | ||
"sideEffects": true | ||
} |
import Vue from 'vue'; | ||
import { setTemplateEngine, getTemplateEngine, getUniqueID, createElement, detach, getValue } from "@syncfusion/ej2-base"; | ||
import { setTemplateEngine, getTemplateEngine, getUniqueID, createElement, detach, extend, getValue } from "@syncfusion/ej2-base"; | ||
// tslint:disable:no-any | ||
@@ -21,3 +21,3 @@ var stringCompiler = getTemplateEngine(); | ||
var propsData = getValue('template.propsData', tempObj); | ||
var dataObj = { 'data': { data: data }, parent: context.vueInstance }; | ||
var dataObj = { 'data': { data: extend(tempObj.data || {}, data) }, parent: context.vueInstance }; | ||
if (propsData) { | ||
@@ -24,0 +24,0 @@ templateFunction = tempObj.template.extends; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
163662