@syncfusion/ej2-vue-base
Advanced tools
Comparing version 20.1.57 to 20.1.61
@@ -9,2 +9,10 @@ # Changelog | ||
- `#I343901`, `#I362728` - "The routing and i18n are not working within the Vue 3 template components" issue has been resolved. | ||
## 20.1.57 (2022-05-24) | ||
### Common | ||
#### Bug Fixes | ||
- `#I362337` - The issue with the "Row template in the Grid does not work properly in vue 3" has been resolved. | ||
@@ -18,5 +26,5 @@ | ||
- `#SF-377536` - The issue with "Facing an Warning error while running in development mode in Vue 3" has been resolved. | ||
- `#I377536` - The issue with "Facing an Warning error while running in development mode in Vue 3" has been resolved. | ||
## 20.1.51 (2022-04-26) | ||
## 20.1.52 (2022-05-04) | ||
@@ -49,3 +57,3 @@ ### Common | ||
- `F140652`, `F138394`, `F148391`, `I309881`, `F167735`, `I228458` - Provided slot template support for the Vue components. | ||
- `#F140652`, `#F138394`, `#F148391`, `#I309881`, `#F167735`, `#I228458` - Provided slot template support for the Vue components. | ||
@@ -58,3 +66,3 @@ ## 19.4.53 (2022-02-22) | ||
- `I364613` - Object property templates are not working in production mode issue has been resolved. | ||
- `#I364613` - Object property templates are not working in production mode issue has been resolved. | ||
@@ -67,3 +75,3 @@ ## 19.4.52 (2022-02-15) | ||
- `I362388` - Modules in provider section not works properly issue has been resolved. | ||
- `#I362388` - Modules in provider section not works properly issue has been resolved. | ||
@@ -76,3 +84,3 @@ ## 19.4.47 (2022-01-25) | ||
- `F171693` - The issue with "Vue components are not rendered with node version 16" has been resolved. | ||
- `#F171693` - The issue with "Vue components are not rendered with node version 16" has been resolved. | ||
@@ -85,3 +93,3 @@ ## 19.4.40 (2021-12-28) | ||
- `I334904`, `I347008` - Compatability support for Vue components in Vite js has been resolved. | ||
- `#I334904`, `#I347008` - Compatability support for Vue components in Vite js has been resolved. | ||
@@ -94,3 +102,3 @@ ## 19.4.38 (2021-12-17) | ||
- `I348114` - Peer dependencies issue has been resolved. | ||
- `#I348114` - Peer dependencies issue has been resolved. | ||
@@ -103,3 +111,3 @@ ## 19.3.47 (2021-10-26) | ||
- `I345561` - Resolved the data loading issue in the external template. | ||
- `#I345561` - Resolved the data loading issue in the external template. | ||
@@ -112,3 +120,3 @@ ## 17.4.47 (2020-02-05) | ||
- `I260681`, `#I261593` - Resolved the peer dependency warning issues. | ||
- `#I260681`, `#I261593` - Resolved the peer dependency warning issues. | ||
@@ -115,0 +123,0 @@ ## 17.4.41 (2020-01-07) |
/*! | ||
* filename: ej2-vue-base.umd.min.js | ||
* version : 20.1.57 | ||
* version : 20.1.61 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
@@ -203,6 +203,4 @@ import { createElement, detach, extend, getTemplateEngine, getUniqueID, getValue, isNullOrUndefined, setTemplateEngine } from '@syncfusion/ej2-base'; | ||
} | ||
else if (this && this.$) { | ||
if (this.$.slots) { | ||
propRef = this.$.slots.default(); | ||
} | ||
else if (this && this.$ && this.$.slots && this.$.slots.default) { | ||
propRef = this.$.slots.default(); | ||
} | ||
@@ -614,2 +612,3 @@ if (propRef) { | ||
if (context) { | ||
let plugins = context.vueInstance ? context.vueInstance.plugins : null; | ||
let pid = getUniqueID("templateParentDiv"); | ||
@@ -623,12 +622,16 @@ let id = getUniqueID("templateDiv"); | ||
if (gh && typeof templateElement === "string") { | ||
let vue3Slots = getVue3Slot(context.vueInstance, templateElement, root); | ||
if (vue3Slots) { | ||
let vueSlot = getCurrentVueSlot(context.vueInstance, templateElement, root); | ||
if (vueSlot) { | ||
// Compilation for Vue 3 slot template | ||
allVue | ||
.createApp({ | ||
let app = allVue.createApp({ | ||
render() { | ||
return vue3Slots[templateElement]({ data: data }); | ||
return vueSlot[templateElement]({ data: data }); | ||
} | ||
}) | ||
.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
}); | ||
if (plugins) { | ||
for (let i = 0; i < plugins.length; i++) { | ||
app.use(plugins[i]); | ||
} | ||
} | ||
app.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
returnEle = ele.childNodes; | ||
@@ -684,5 +687,9 @@ detach(ele); | ||
templateCompRef.data = function () { return tempRef; }; | ||
allVue | ||
.createApp(templateCompRef) | ||
.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
let app = allVue.createApp(templateCompRef); | ||
if (plugins) { | ||
for (let i = 0; i < plugins.length; i++) { | ||
app.use(plugins[i]); | ||
} | ||
} | ||
app.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
returnEle = ele.childNodes; | ||
@@ -692,8 +699,8 @@ detach(ele); | ||
else if (typeof templateElement === "string") { | ||
let vue2Slots = getVue2Slot(context.vueInstance, templateElement, root); | ||
if (vue2Slots) { | ||
let vueSlot = getVueSlot(context.vueInstance, templateElement, root); | ||
if (vueSlot) { | ||
// Compilation for Vue 2 slot template | ||
let vueTemplate = new Vue$1__default({ | ||
render() { | ||
return vue2Slots[templateElement]({ data: data }); | ||
return vueSlot[templateElement]({ data: data }); | ||
} | ||
@@ -753,3 +760,3 @@ }); | ||
// Get the Vue2 slot template from the root or current Vue component. | ||
function getVue2Slot(vueInstance, templateElement, root) { | ||
function getVueSlot(vueInstance, templateElement, root) { | ||
if (!vueInstance && !(root && root.vueInstance)) { | ||
@@ -759,5 +766,5 @@ return undefined; | ||
let instance = (root && root.vueInstance) ? root.vueInstance : vueInstance; | ||
return getVue2ChildSlot(instance, templateElement); | ||
return getVueChildSlot(instance, templateElement); | ||
} | ||
function getVue2ChildSlot(vueInstance, templateElement) { | ||
function getVueChildSlot(vueInstance, templateElement) { | ||
if (!vueInstance) { | ||
@@ -776,3 +783,3 @@ return undefined; | ||
for (let i = 0; i < childSlots.length; i++) { | ||
let slot = getVue2ChildSlot(getSlot(childSlots[i]), templateElement); | ||
let slot = getVueChildSlot(getSlot(childSlots[i]), templateElement); | ||
if (slot) { | ||
@@ -788,3 +795,3 @@ return slot; | ||
for (let i = 0; i < children.length; i++) { | ||
let slot = getVue2ChildSlot(getSlot(children[i]), templateElement); | ||
let slot = getVueChildSlot(getSlot(children[i]), templateElement); | ||
if (slot) { | ||
@@ -802,3 +809,3 @@ return slot; | ||
// Get the Vue3 slot template from the root or current Vue component. | ||
function getVue3Slot(vueInstance, templateElement, root) { | ||
function getCurrentVueSlot(vueInstance, templateElement, root) { | ||
if (!vueInstance && !(root && root.vueInstance)) { | ||
@@ -808,5 +815,5 @@ return undefined; | ||
let slots = (root && root.vueInstance) ? root.vueInstance.$slots : vueInstance.$slots; | ||
return getVue3ChildSlot(slots, templateElement); | ||
return getChildVueSlot(slots, templateElement); | ||
} | ||
function getVue3ChildSlot(slots, templateElement) { | ||
function getChildVueSlot(slots, templateElement) { | ||
if (slots && slots[templateElement]) { | ||
@@ -818,3 +825,3 @@ return slots; | ||
for (let i = 0; i < childSlots.length; i++) { | ||
let slot = getVue3ChildSlot(childSlots[i].children, templateElement); | ||
let slot = getChildVueSlot(childSlots[i].children, templateElement); | ||
if (slot) { | ||
@@ -821,0 +828,0 @@ return slot; |
@@ -227,6 +227,4 @@ import { createElement, detach, extend, getTemplateEngine, getUniqueID, getValue, isNullOrUndefined, setTemplateEngine } from '@syncfusion/ej2-base'; | ||
} | ||
else if (this && this.$) { | ||
if (this.$.slots) { | ||
propRef = this.$.slots.default(); | ||
} | ||
else if (this && this.$ && this.$.slots && this.$.slots.default) { | ||
propRef = this.$.slots.default(); | ||
} | ||
@@ -669,2 +667,3 @@ if (propRef) { | ||
if (context) { | ||
var plugins = context.vueInstance ? context.vueInstance.plugins : null; | ||
var pid = getUniqueID("templateParentDiv"); | ||
@@ -678,12 +677,16 @@ var id = getUniqueID("templateDiv"); | ||
if (gh && typeof templateElement === "string") { | ||
var vue3Slots_1 = getVue3Slot(context.vueInstance, templateElement, root); | ||
if (vue3Slots_1) { | ||
var vueSlot_1 = getCurrentVueSlot(context.vueInstance, templateElement, root); | ||
if (vueSlot_1) { | ||
// Compilation for Vue 3 slot template | ||
allVue | ||
.createApp({ | ||
var app = allVue.createApp({ | ||
render: function () { | ||
return vue3Slots_1[templateElement]({ data: data }); | ||
return vueSlot_1[templateElement]({ data: data }); | ||
} | ||
}) | ||
.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
}); | ||
if (plugins) { | ||
for (var i = 0; i < plugins.length; i++) { | ||
app.use(plugins[i]); | ||
} | ||
} | ||
app.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
returnEle = ele.childNodes; | ||
@@ -743,5 +746,9 @@ detach(ele); | ||
templateCompRef.data = function () { return tempRef_1; }; | ||
allVue | ||
.createApp(templateCompRef) | ||
.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
var app = allVue.createApp(templateCompRef); | ||
if (plugins) { | ||
for (var i = 0; i < plugins.length; i++) { | ||
app.use(plugins[i]); | ||
} | ||
} | ||
app.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
returnEle = ele.childNodes; | ||
@@ -751,8 +758,8 @@ detach(ele); | ||
else if (typeof templateElement === "string") { | ||
var vue2Slots_1 = getVue2Slot(context.vueInstance, templateElement, root); | ||
if (vue2Slots_1) { | ||
var vueSlot_2 = getVueSlot(context.vueInstance, templateElement, root); | ||
if (vueSlot_2) { | ||
// Compilation for Vue 2 slot template | ||
var vueTemplate = new Vue$1__default({ | ||
render: function () { | ||
return vue2Slots_1[templateElement]({ data: data }); | ||
return vueSlot_2[templateElement]({ data: data }); | ||
} | ||
@@ -812,3 +819,3 @@ }); | ||
// Get the Vue2 slot template from the root or current Vue component. | ||
function getVue2Slot(vueInstance, templateElement, root) { | ||
function getVueSlot(vueInstance, templateElement, root) { | ||
if (!vueInstance && !(root && root.vueInstance)) { | ||
@@ -818,5 +825,5 @@ return undefined; | ||
var instance = (root && root.vueInstance) ? root.vueInstance : vueInstance; | ||
return getVue2ChildSlot(instance, templateElement); | ||
return getVueChildSlot(instance, templateElement); | ||
} | ||
function getVue2ChildSlot(vueInstance, templateElement) { | ||
function getVueChildSlot(vueInstance, templateElement) { | ||
if (!vueInstance) { | ||
@@ -835,3 +842,3 @@ return undefined; | ||
for (var i = 0; i < childSlots.length; i++) { | ||
var slot = getVue2ChildSlot(getSlot(childSlots[i]), templateElement); | ||
var slot = getVueChildSlot(getSlot(childSlots[i]), templateElement); | ||
if (slot) { | ||
@@ -847,3 +854,3 @@ return slot; | ||
for (var i = 0; i < children.length; i++) { | ||
var slot = getVue2ChildSlot(getSlot(children[i]), templateElement); | ||
var slot = getVueChildSlot(getSlot(children[i]), templateElement); | ||
if (slot) { | ||
@@ -861,3 +868,3 @@ return slot; | ||
// Get the Vue3 slot template from the root or current Vue component. | ||
function getVue3Slot(vueInstance, templateElement, root) { | ||
function getCurrentVueSlot(vueInstance, templateElement, root) { | ||
if (!vueInstance && !(root && root.vueInstance)) { | ||
@@ -867,5 +874,5 @@ return undefined; | ||
var slots = (root && root.vueInstance) ? root.vueInstance.$slots : vueInstance.$slots; | ||
return getVue3ChildSlot(slots, templateElement); | ||
return getChildVueSlot(slots, templateElement); | ||
} | ||
function getVue3ChildSlot(slots, templateElement) { | ||
function getChildVueSlot(slots, templateElement) { | ||
if (slots && slots[templateElement]) { | ||
@@ -877,3 +884,3 @@ return slots; | ||
for (var i = 0; i < childSlots.length; i++) { | ||
var slot = getVue3ChildSlot(childSlots[i].children, templateElement); | ||
var slot = getChildVueSlot(childSlots[i].children, templateElement); | ||
if (slot) { | ||
@@ -880,0 +887,0 @@ return slot; |
/*! | ||
* filename: ej2-vue-base.min.js | ||
* version : 20.1.57 | ||
* version : 20.1.61 | ||
* 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(e,t,n,r){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function s(e){if(void 0===e&&(e={}),e.props)for(var t=0,n=e.props;t<n.length;t++)!function(t){(e.newprops||(e.newprops={}))[t]={},(e.watch||(e.watch={}))[t]=function(n){this.ej2Instances[t]=n,this.dataBind&&"DateRangePickerComponent"!==e.name&&this.dataBind()}}(n[t]);return[e.newprops,e.watch]}function i(e,t){if(t)return function(t){return a(t,e)}}function a(e,t){void 0===t&&(t={}),t.name=t.name||e._componentTag||e.name;var n=e.prototype;if(t.props)for(var r=0,o=t.props;r<o.length;r++)!function(e){(t.props||(t.props={}))[e]={},(t.watch||(t.watch={}))[e]=function(n){this.ej2Instances[e]=n,this.dataBind&&"DateRangePickerComponent"!==t.name&&this.dataBind()}}(o[r]);Object.getOwnPropertyNames(n).forEach(function(e){if("constructor"!==e){if($.indexOf(e)>-1)return void(t[e]=n[e]);var r=Object.getOwnPropertyDescriptor(n,e);"function"==typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}}),Object.getOwnPropertyNames(b.prototype).forEach(function(e){if($.indexOf(e)>-1)return void(t[e]=n[e])}),(t.mixins||(t.mixins=[])).push({data:function(){return p(this,e)}});var s=e.__decorators__;s&&(s.forEach(Function(t)),delete e.__decorators__);var i=Object.getPrototypeOf(e.prototype);return(i instanceof g?i.constructor:g).extend(t)}function p(e,t){t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);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,r={};return Object.keys(n).forEach(function(e){void 0!==n[e]&&(r[e]=n[e])}),r}function c(e,n){var r=this;return function(o,s,i,a,p){var c;if(s){var h=t.getUniqueID("templateParentDiv"),d=t.getUniqueID("templateDiv"),f=t.createElement("div",{id:h,innerHTML:'<div id="'+d+'"></div>'});if(document.body.appendChild(f),O&&"string"==typeof e){var v=u(s.vueInstance,e,p);if(!v)return t.detach(f),D(e,n)(o);j.createApp({render:function(){return v[e]({data:o})}}).mount("grid"===s.getModuleName()?"#"+h:"#"+d),c=f.childNodes,t.detach(f)}else if(O){var m=P=e.call(r,{}),y=t.getValue("template.propsData",P),I={data:{data:t.extend(P.data||{},o)},parent:s.vueInstance};m.template||(m.template=m[Object.keys(m)[0]]);var b=void 0;if(m.template.extends)b=m.template.extends._context.components.template;else if(!(b=m.template._context.components[e.name])){var $=Object.keys(m.template._context.components)[0];b=m.template._context.components[$]}var x;if(y)x=Object.assign(b.data(),y);else if(x=Object.assign(b.data(),I.data),b.components)for(var C=0,V=Object.keys(b.components)||[];C<V.length;C++)!function(e){var t=b.components[e];if(t&&t.data){var n=Object.assign(t.data(),I.data);t.data=function(){return n}}}(V[C]);b.data=function(){return x},j.createApp(b).mount("grid"===s.getModuleName()?"#"+h:"#"+d),c=f.childNodes,t.detach(f)}else if("string"==typeof e){var _=l(s.vueInstance,e,p);if(!_)return t.detach(f),D(e,n)(o);new g({render:function(){return _[e]({data:o})}}).$mount("#"+d),c=f.childNodes,t.detach(f)}else{var P=e.call(r,{}),M=P.template,y=t.getValue("template.propsData",P),I={data:{data:t.extend(P.data||{},o)},parent:s.vueInstance};if(y&&(M=P.template.extends,I.propsData=y),"function"!=typeof M&&(M=g.extend(M)),new M(I).$mount("#"+d),c=f.childNodes,s.vueInstance){var N=s.vueInstance.templateCollection;N||(s.vueInstance.templateCollection={},N=s.vueInstance.templateCollection),i&&(N[i]||(N[i]=[]),N[i].push(c[0]))}t.detach(f)}}return c||[]}}function l(e,t,n){if(e||n&&n.vueInstance)return h(n&&n.vueInstance?n.vueInstance:e,t)}function h(e,t){if(e){var n=e.$slots,r=e.$scopedSlots,o=e.scopedSlots,s=e.children;if(r&&r[t])return r;if(n&&n.default){for(var i=n.default,a=0;a<i.length;a++)if(p=h(d(i[a]),t))return p}else{if(o&&o[t])return o;if(s)for(a=0;a<s.length;a++){var p=h(d(s[a]),t);if(p)return p}}}}function d(e){var t=e.componentOptions&&e.componentOptions.children?e.componentOptions:e.data;return e.componentInstance?e.componentInstance:t}function u(e,t,n){if(e||n&&n.vueInstance)return f(n&&n.vueInstance?n.vueInstance.$slots:e.$slots,t)}function f(e,t){if(e&&e[t])return e;if(e&&e.default)for(var n=e.default(),r=0;r<n.length;r++){var o=f(n[r].children,t);if(o)return o}}var v,g=r.default,m=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=o(r),j=y,O=j.h,I=!O,b=function(e){function n(){var t=e.call(this,arguments)||this;return t.hasInjectedModules=!1,t.hasChildDirective=!1,t.childDirObjects="",t.isDecorator=!1,t}return m(n,e),n.prototype.created=function(){var e=this;if(this.propKeys){for(var n=this,r=0,o=this.propKeys;r<o.length;r++)!function(t){n.ej2Instances.addEventListener(t,function(n){e.$emit(t,n)})}(o[r]);var s=t.getValue("$root.$options.provide",this),i=t.getValue("$parent.$options.provide",this);if(this.hasInjectedModules&&!I){var a=[];s&&s.managed?(this.isDecorator=!0,a=this.getInjectedServices()||[]):s?a=s[this.ej2Instances.getModuleName()]||[]:i&&(a=this.getInjectedServices()||[]);for(var p=0,c=this.ej2Instances.getInjectedModules()||[];p<c.length;p++){var l=c[p];-1===a.indexOf(l)&&a.push(l)}this.ej2Instances.injectedModules=a}}},n.prototype.mounted=function(){var e=this.$el?this.$el.querySelectorAll("div.e-directive"):null;if(O&&e)for(var t=0;t<e.length;t++)e[t].parentElement&&e[t].parentElement.removeChild(e[t]);this.ej2Instances.isVue=!0,this.ej2Instances.isVue3=this.isVue3,this.ej2Instances.vueInstance=this,this.isVue3&&(this.ej2Instances.ej2Instances=this.ej2Instances,this.ej2Instances.referModels=this.models),this.ej2Instances.appendTo(this.$el)},n.prototype.getInjectedServices=function(){var e,n=[];if(this.$root&&this.isDecorator?e=t.getValue("$root.$options.provide",this):this.$vnode?e=t.getValue("$vnode.context.$options.provide",this):this.$parent&&(e=t.getValue("$parent.$options.provide",this)),e){var r=e;if("function"==typeof e)if(e.managed){var o=e.managed,s=Object.keys(o),i=void 0;this.$root&&this.isDecorator?i=Object.keys(this.$root):this.$vnode?i=Object.keys(this.$vnode.context):this.$parent&&(i=Object.keys(this.$parent));for(var a=0;a<s.length;a++)for(var p=0;p<i.length;p++)-1!==i[p].indexOf(s[a])&&(this.$root&&this.isDecorator?o[s[p]]=this.$root[i[a]]:this.$vnode?o[s[a]]=this.$vnode.context[i[p]]:this.$parent&&(o[s[a]]=this.$parent[i[p]]),r=o)}else this.$vnode?r=this.$vnode.context.$options.provide():this.$parent&&(r=this.$parent.$options.provide());n=r[this.ej2Instances.getModuleName()]||[]}return this.isDecorator=!1,n},n.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))}},n.prototype.beforeDestroy=function(){var e=this;e.ej2Instances.destroy(),e.$el.style.visibility="hidden",e=null},n.prototype.bindProperties=function(){for(var e={},n=0,r=this.propKeys;n<r.length;n++){var o=r[n];(!t.isNullOrUndefined(this[o])&&!this.isVue3||this[0]&&!t.isNullOrUndefined(this[0][0])&&!t.isNullOrUndefined(this[0][0][o]))&&(e[o]=this.isVue3?this[0][0][o]:this[o])}if(this.hasChildDirective&&this.fetchChildPropValues(e),this.hasInjectedModules){for(var s=this.getInjectedServices()||[],i=0,a=this.ej2Instances.getInjectedModules()||[];i<a.length;i++){var p=a[i];-1===s.indexOf(p)&&s.push(p)}this.ej2Instances.injectedModules=s}this.assignValueToWrapper(e)},n.prototype.assignValueToWrapper=function(e,n){this.ej2Instances.setProperties(t.extend({},{},e,!0),!!t.isNullOrUndefined(n)||n)},n.prototype.fetchChildPropValues=function(e){var t={};if(this.isVue3){var n=void 0;if(this[0]&&this[0][1].slots.default?n=this[0][1].slots.default():this&&this.$&&this.$.slots&&(n=this.$.slots.default()),!n)return;for(var r=0;r<n.length;r++)if(n[r].type.methods){var o=n[r].type.methods.getTag().replace("e-",""),s=this.resolveArrayDirectives(n[r].children,o),i=o.split("-"),a=this.ej2Instances.getModuleName().toLowerCase(),p=i.length>1&&a.indexOf(i[0])>-1?i[1]:i[0];p=p.replace(a,""),"splitter"==a&&"panes"==p?p="paneSettings":"bulletchart"==a&&"range"==p?p="ranges":"schedule"==a&&"header"==p&&(p="headerRows"),t[p]=s[o]}}else t=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(t));for(var c=0,l=Object.keys(t);c<l.length;c++){var h=l[c];e[h]=t[h]}},n.prototype.resolveArrayDirectives=function(e,t){var n,r=[];r=e.default?e.default():e;var o={};o[t]=[];for(var s=this,i=0,a=r;i<a.length;i++)!function(e){var r={},i=e.type.methods?e.type.methods.getTag():t;if(e.children){var a=void 0;if((n=s.resolveComplexDirs(e.children,s.tagMapper["e-"+t],i)).length)r=n;else for(var p=0;p<Object.keys(n).length;p++)a=Object.keys(n)[p],r[a]=n[a]}e.props&&Object.keys(e.props).forEach(function(t){r[t]=e.props[t]}),/[s]\b/.test(i)&&n&&(!/[s]\b/.test(t)||n.length)?o[t]=r:o[t].push(r)}(a[i]);return o},n.prototype.resolveComplexDirs=function(e,t,n){for(var r,o=[],s={},i=this,a=0,p=o=e.default?e.default():e;a<p.length;a++)!function(e){var a=void 0;t[n]&&(a=(a=Object.keys(t[n]).find(function(r){return t[n][r]===e.type.methods.getTag().replace(/[s]\b/,"")}))?a.replace("e-",""):e.type.methods.getTag().replace("e-",""),"diagram"==i.ej2Instances.getModuleName().toLowerCase()&&-1!=a.indexOf("annotations")&&(a="annotations")),e.children&&(r=i.resolveComplexInnerDirs(e.children,t[n],e.type.methods.getTag()),s[a]||(s[a]=[]),r.length>1?s[a]=r:s[a].push(r)),o.length>1?(s=0!=Object.keys(s).length||s.length?s:[],e.props&&s.push(e.props)):s=e.props?Object.assign(s,e.props):s}(p[a]);return s},n.prototype.resolveComplexInnerDirs=function(e,t,n){for(var r,o=[],s=(o=e.default?e.default():e).length>1?[]:{},i=0,a=o;i<a.length;i++){var p=a[i],c=p.type.methods.getTag().replace("e-","");p.children&&(r=this.resolveMultilevelComplexInnerDirs(p.children,t[n],p.type.methods.getTag()),/[s]\b/.test(c)||o.length>1?/[s]\b/.test(c)?(s[c]=s[c]?s[c]:[],r.length?s[c]=r:s[c].push(r)):r&&s.push(r):s=r||s),o.length>1&&p.props&&s.length>=0?s.push(p.props):s=p.props?Object.assign(s,p.props):s}return s},n.prototype.resolveMultilevelComplexInnerDirs=function(e,t,n){for(var r,o=[],s=(o=e.default?e.default():e).length>1?[]:{},i=0,a=o;i<a.length;i++){var p=a[i],c=p.type.methods.getTag().replace("e-","");p.children&&(r=this.resolveComplexInnerDirs(p.children,t[n],p.type.methods.getTag())),/[s]\b/.test(c)?(s[c]=s[c]?s[c]:[],r.length?s[c]=r:s[c].push(r),p.props&&s[c].push(p.props)):(s=r,s=p.props?Object.assign(s,p.props):s)}return s},n.prototype.getDirectiveValues=function(e,t,n){var r=Object.keys(t),o={};if(e)for(var s=0,i=e;s<i.length;s++){var a=i[s];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var p=a.componentOptions.tag;if(-1!==r.indexOf(p)){var c=n[p]?n[p]:p;o[c.replace("e-","")]=[];for(var l=0,h=a.componentOptions.children;l<h.length;l++){var d=h[l],u=this.getVNodeValue(d,t[p],n);0!==Object.keys(u).length&&o[c.replace("e-","")].push(u)}}}}return o},n.prototype.getMultiLevelDirValue=function(e,t,n){for(var r={},o=0,s=e;o<s.length;o++){var i=s[o];if(i.componentOptions){var a=i.componentOptions.tag,p=n[a]?n[a]:a;if(r[p.replace("e-","")]=[],i.componentOptions&&i.componentOptions.children)for(var c=0,l=i.componentOptions.children;c<l.length;c++){var h=l[c],d=this.getVNodeValue(h,t[a],n);0!==Object.keys(d).length&&r[p.replace("e-","")].push(d)}}}return r},n.prototype.getVNodeValue=function(e,n,r){var o={};if(e.componentOptions){var s=e.componentOptions.tag;"string"==typeof n&&s===n&&e.data?o=e.data.attrs?this.getCamelCaseProps(e.data.attrs):this.getCamelCaseProps(e.data):"object"==typeof n&&(e.componentOptions.children&&-1!==Object.keys(n).indexOf(s)&&(o=this.getMultiLevelDirValue(e.componentOptions.children,n[s],r)),e.data&&e.data.attrs&&(o=t.extend(o,this.getCamelCaseProps(e.data.attrs))))}return o},n.prototype.getCamelCaseProps=function(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];t[o.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})]=e[o]}return t},n.prototype.dataBind=function(){this.ej2Instances.dataBind()},n.prototype.setProperties=function(e,t){return this.ej2Instances.setProperties(e,t)},n}(v=!I||parseInt(j.version)<3?n.Vue:g),$=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],D=t.getTemplateEngine();return t.setTemplateEngine({compile:c}),e.aVue=y,e._interopRequireWildcard=o,e.allVue=j,e.gh=O,e.isExecute=I,e.ComponentBase=b,e.$internalHooks=$,e.getProps=s,e.EJComponentDecorator=i,e.EJcomponentFactory=a,e.compile=c,e}({},ej.base,Vue3,Vue$1),this.ejs=ej; | ||
this.ej=this.ej||{},this.ej.vuebase=function(e,t,n,r){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function s(e){if(void 0===e&&(e={}),e.props)for(var t=0,n=e.props;t<n.length;t++)!function(t){(e.newprops||(e.newprops={}))[t]={},(e.watch||(e.watch={}))[t]=function(n){this.ej2Instances[t]=n,this.dataBind&&"DateRangePickerComponent"!==e.name&&this.dataBind()}}(n[t]);return[e.newprops,e.watch]}function i(e,t){if(t)return function(t){return a(t,e)}}function a(e,t){void 0===t&&(t={}),t.name=t.name||e._componentTag||e.name;var n=e.prototype;if(t.props)for(var r=0,o=t.props;r<o.length;r++)!function(e){(t.props||(t.props={}))[e]={},(t.watch||(t.watch={}))[e]=function(n){this.ej2Instances[e]=n,this.dataBind&&"DateRangePickerComponent"!==t.name&&this.dataBind()}}(o[r]);Object.getOwnPropertyNames(n).forEach(function(e){if("constructor"!==e){if($.indexOf(e)>-1)return void(t[e]=n[e]);var r=Object.getOwnPropertyDescriptor(n,e);"function"==typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}}),Object.getOwnPropertyNames(b.prototype).forEach(function(e){if($.indexOf(e)>-1)return void(t[e]=n[e])}),(t.mixins||(t.mixins=[])).push({data:function(){return p(this,e)}});var s=e.__decorators__;s&&(s.forEach(Function(t)),delete e.__decorators__);var i=Object.getPrototypeOf(e.prototype);return(i instanceof g?i.constructor:g).extend(t)}function p(e,t){t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);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,r={};return Object.keys(n).forEach(function(e){void 0!==n[e]&&(r[e]=n[e])}),r}function c(e,n){var r=this;return function(o,s,i,a,p){var c;if(s){var h=s.vueInstance?s.vueInstance.plugins:null,u=t.getUniqueID("templateParentDiv"),f=t.getUniqueID("templateDiv"),v=t.createElement("div",{id:u,innerHTML:'<div id="'+f+'"></div>'});if(document.body.appendChild(v),O&&"string"==typeof e){var m=d(s.vueInstance,e,p);if(!m)return t.detach(v),D(e,n)(o);P=j.createApp({render:function(){return m[e]({data:o})}});if(h)for(M=0;M<h.length;M++)P.use(h[M]);P.mount("grid"===s.getModuleName()?"#"+u:"#"+f),c=v.childNodes,t.detach(v)}else if(O){var y=k=e.call(r,{}),I=t.getValue("template.propsData",k),b={data:{data:t.extend(k.data||{},o)},parent:s.vueInstance};y.template||(y.template=y[Object.keys(y)[0]]);var $=void 0;if(y.template.extends)$=y.template.extends._context.components.template;else if(!($=y.template._context.components[e.name])){var x=Object.keys(y.template._context.components)[0];$=y.template._context.components[x]}var C;if(I)C=Object.assign($.data(),I);else if(C=Object.assign($.data(),b.data),$.components)for(var V=0,_=Object.keys($.components)||[];V<_.length;V++)!function(e){var t=$.components[e];if(t&&t.data){var n=Object.assign(t.data(),b.data);t.data=function(){return n}}}(_[V]);$.data=function(){return C};var P=j.createApp($);if(h)for(var M=0;M<h.length;M++)P.use(h[M]);P.mount("grid"===s.getModuleName()?"#"+u:"#"+f),c=v.childNodes,t.detach(v)}else if("string"==typeof e){var N=l(s.vueInstance,e,p);if(!N)return t.detach(v),D(e,n)(o);new g({render:function(){return N[e]({data:o})}}).$mount("#"+f),c=v.childNodes,t.detach(v)}else{var k=e.call(r,{}),w=k.template,I=t.getValue("template.propsData",k),b={data:{data:t.extend(k.data||{},o)},parent:s.vueInstance};if(I&&(w=k.template.extends,b.propsData=I),"function"!=typeof w&&(w=g.extend(w)),new w(b).$mount("#"+f),c=v.childNodes,s.vueInstance){var T=s.vueInstance.templateCollection;T||(s.vueInstance.templateCollection={},T=s.vueInstance.templateCollection),i&&(T[i]||(T[i]=[]),T[i].push(c[0]))}t.detach(v)}}return c||[]}}function l(e,t,n){if(e||n&&n.vueInstance)return h(n&&n.vueInstance?n.vueInstance:e,t)}function h(e,t){if(e){var n=e.$slots,r=e.$scopedSlots,o=e.scopedSlots,s=e.children;if(r&&r[t])return r;if(n&&n.default){for(var i=n.default,a=0;a<i.length;a++)if(p=h(u(i[a]),t))return p}else{if(o&&o[t])return o;if(s)for(a=0;a<s.length;a++){var p=h(u(s[a]),t);if(p)return p}}}}function u(e){var t=e.componentOptions&&e.componentOptions.children?e.componentOptions:e.data;return e.componentInstance?e.componentInstance:t}function d(e,t,n){if(e||n&&n.vueInstance)return f(n&&n.vueInstance?n.vueInstance.$slots:e.$slots,t)}function f(e,t){if(e&&e[t])return e;if(e&&e.default)for(var n=e.default(),r=0;r<n.length;r++){var o=f(n[r].children,t);if(o)return o}}var v,g=r.default,m=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=o(r),j=y,O=j.h,I=!O,b=function(e){function n(){var t=e.call(this,arguments)||this;return t.hasInjectedModules=!1,t.hasChildDirective=!1,t.childDirObjects="",t.isDecorator=!1,t}return m(n,e),n.prototype.created=function(){var e=this;if(this.propKeys){for(var n=this,r=0,o=this.propKeys;r<o.length;r++)!function(t){n.ej2Instances.addEventListener(t,function(n){e.$emit(t,n)})}(o[r]);var s=t.getValue("$root.$options.provide",this),i=t.getValue("$parent.$options.provide",this);if(this.hasInjectedModules&&!I){var a=[];s&&s.managed?(this.isDecorator=!0,a=this.getInjectedServices()||[]):s?a=s[this.ej2Instances.getModuleName()]||[]:i&&(a=this.getInjectedServices()||[]);for(var p=0,c=this.ej2Instances.getInjectedModules()||[];p<c.length;p++){var l=c[p];-1===a.indexOf(l)&&a.push(l)}this.ej2Instances.injectedModules=a}}},n.prototype.mounted=function(){var e=this.$el?this.$el.querySelectorAll("div.e-directive"):null;if(O&&e)for(var t=0;t<e.length;t++)e[t].parentElement&&e[t].parentElement.removeChild(e[t]);this.ej2Instances.isVue=!0,this.ej2Instances.isVue3=this.isVue3,this.ej2Instances.vueInstance=this,this.isVue3&&(this.ej2Instances.ej2Instances=this.ej2Instances,this.ej2Instances.referModels=this.models),this.ej2Instances.appendTo(this.$el)},n.prototype.getInjectedServices=function(){var e,n=[];if(this.$root&&this.isDecorator?e=t.getValue("$root.$options.provide",this):this.$vnode?e=t.getValue("$vnode.context.$options.provide",this):this.$parent&&(e=t.getValue("$parent.$options.provide",this)),e){var r=e;if("function"==typeof e)if(e.managed){var o=e.managed,s=Object.keys(o),i=void 0;this.$root&&this.isDecorator?i=Object.keys(this.$root):this.$vnode?i=Object.keys(this.$vnode.context):this.$parent&&(i=Object.keys(this.$parent));for(var a=0;a<s.length;a++)for(var p=0;p<i.length;p++)-1!==i[p].indexOf(s[a])&&(this.$root&&this.isDecorator?o[s[p]]=this.$root[i[a]]:this.$vnode?o[s[a]]=this.$vnode.context[i[p]]:this.$parent&&(o[s[a]]=this.$parent[i[p]]),r=o)}else this.$vnode?r=this.$vnode.context.$options.provide():this.$parent&&(r=this.$parent.$options.provide());n=r[this.ej2Instances.getModuleName()]||[]}return this.isDecorator=!1,n},n.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))}},n.prototype.beforeDestroy=function(){var e=this;e.ej2Instances.destroy(),e.$el.style.visibility="hidden",e=null},n.prototype.bindProperties=function(){for(var e={},n=0,r=this.propKeys;n<r.length;n++){var o=r[n];(!t.isNullOrUndefined(this[o])&&!this.isVue3||this[0]&&!t.isNullOrUndefined(this[0][0])&&!t.isNullOrUndefined(this[0][0][o]))&&(e[o]=this.isVue3?this[0][0][o]:this[o])}if(this.hasChildDirective&&this.fetchChildPropValues(e),this.hasInjectedModules){for(var s=this.getInjectedServices()||[],i=0,a=this.ej2Instances.getInjectedModules()||[];i<a.length;i++){var p=a[i];-1===s.indexOf(p)&&s.push(p)}this.ej2Instances.injectedModules=s}this.assignValueToWrapper(e)},n.prototype.assignValueToWrapper=function(e,n){this.ej2Instances.setProperties(t.extend({},{},e,!0),!!t.isNullOrUndefined(n)||n)},n.prototype.fetchChildPropValues=function(e){var t={};if(this.isVue3){var n=void 0;if(this[0]&&this[0][1].slots.default?n=this[0][1].slots.default():this&&this.$&&this.$.slots&&this.$.slots.default&&(n=this.$.slots.default()),!n)return;for(var r=0;r<n.length;r++)if(n[r].type.methods){var o=n[r].type.methods.getTag().replace("e-",""),s=this.resolveArrayDirectives(n[r].children,o),i=o.split("-"),a=this.ej2Instances.getModuleName().toLowerCase(),p=i.length>1&&a.indexOf(i[0])>-1?i[1]:i[0];p=p.replace(a,""),"splitter"==a&&"panes"==p?p="paneSettings":"bulletchart"==a&&"range"==p?p="ranges":"schedule"==a&&"header"==p&&(p="headerRows"),t[p]=s[o]}}else t=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(t));for(var c=0,l=Object.keys(t);c<l.length;c++){var h=l[c];e[h]=t[h]}},n.prototype.resolveArrayDirectives=function(e,t){var n,r=[];r=e.default?e.default():e;var o={};o[t]=[];for(var s=this,i=0,a=r;i<a.length;i++)!function(e){var r={},i=e.type.methods?e.type.methods.getTag():t;if(e.children){var a=void 0;if((n=s.resolveComplexDirs(e.children,s.tagMapper["e-"+t],i)).length)r=n;else for(var p=0;p<Object.keys(n).length;p++)a=Object.keys(n)[p],r[a]=n[a]}e.props&&Object.keys(e.props).forEach(function(t){r[t]=e.props[t]}),/[s]\b/.test(i)&&n&&(!/[s]\b/.test(t)||n.length)?o[t]=r:o[t].push(r)}(a[i]);return o},n.prototype.resolveComplexDirs=function(e,t,n){for(var r,o=[],s={},i=this,a=0,p=o=e.default?e.default():e;a<p.length;a++)!function(e){var a=void 0;t[n]&&(a=(a=Object.keys(t[n]).find(function(r){return t[n][r]===e.type.methods.getTag().replace(/[s]\b/,"")}))?a.replace("e-",""):e.type.methods.getTag().replace("e-",""),"diagram"==i.ej2Instances.getModuleName().toLowerCase()&&-1!=a.indexOf("annotations")&&(a="annotations")),e.children&&(r=i.resolveComplexInnerDirs(e.children,t[n],e.type.methods.getTag()),s[a]||(s[a]=[]),r.length>1?s[a]=r:s[a].push(r)),o.length>1?(s=0!=Object.keys(s).length||s.length?s:[],e.props&&s.push(e.props)):s=e.props?Object.assign(s,e.props):s}(p[a]);return s},n.prototype.resolveComplexInnerDirs=function(e,t,n){for(var r,o=[],s=(o=e.default?e.default():e).length>1?[]:{},i=0,a=o;i<a.length;i++){var p=a[i],c=p.type.methods.getTag().replace("e-","");p.children&&(r=this.resolveMultilevelComplexInnerDirs(p.children,t[n],p.type.methods.getTag()),/[s]\b/.test(c)||o.length>1?/[s]\b/.test(c)?(s[c]=s[c]?s[c]:[],r.length?s[c]=r:s[c].push(r)):r&&s.push(r):s=r||s),o.length>1&&p.props&&s.length>=0?s.push(p.props):s=p.props?Object.assign(s,p.props):s}return s},n.prototype.resolveMultilevelComplexInnerDirs=function(e,t,n){for(var r,o=[],s=(o=e.default?e.default():e).length>1?[]:{},i=0,a=o;i<a.length;i++){var p=a[i],c=p.type.methods.getTag().replace("e-","");p.children&&(r=this.resolveComplexInnerDirs(p.children,t[n],p.type.methods.getTag())),/[s]\b/.test(c)?(s[c]=s[c]?s[c]:[],r.length?s[c]=r:s[c].push(r),p.props&&s[c].push(p.props)):(s=r,s=p.props?Object.assign(s,p.props):s)}return s},n.prototype.getDirectiveValues=function(e,t,n){var r=Object.keys(t),o={};if(e)for(var s=0,i=e;s<i.length;s++){var a=i[s];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var p=a.componentOptions.tag;if(-1!==r.indexOf(p)){var c=n[p]?n[p]:p;o[c.replace("e-","")]=[];for(var l=0,h=a.componentOptions.children;l<h.length;l++){var u=h[l],d=this.getVNodeValue(u,t[p],n);0!==Object.keys(d).length&&o[c.replace("e-","")].push(d)}}}}return o},n.prototype.getMultiLevelDirValue=function(e,t,n){for(var r={},o=0,s=e;o<s.length;o++){var i=s[o];if(i.componentOptions){var a=i.componentOptions.tag,p=n[a]?n[a]:a;if(r[p.replace("e-","")]=[],i.componentOptions&&i.componentOptions.children)for(var c=0,l=i.componentOptions.children;c<l.length;c++){var h=l[c],u=this.getVNodeValue(h,t[a],n);0!==Object.keys(u).length&&r[p.replace("e-","")].push(u)}}}return r},n.prototype.getVNodeValue=function(e,n,r){var o={};if(e.componentOptions){var s=e.componentOptions.tag;"string"==typeof n&&s===n&&e.data?o=e.data.attrs?this.getCamelCaseProps(e.data.attrs):this.getCamelCaseProps(e.data):"object"==typeof n&&(e.componentOptions.children&&-1!==Object.keys(n).indexOf(s)&&(o=this.getMultiLevelDirValue(e.componentOptions.children,n[s],r)),e.data&&e.data.attrs&&(o=t.extend(o,this.getCamelCaseProps(e.data.attrs))))}return o},n.prototype.getCamelCaseProps=function(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];t[o.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})]=e[o]}return t},n.prototype.dataBind=function(){this.ej2Instances.dataBind()},n.prototype.setProperties=function(e,t){return this.ej2Instances.setProperties(e,t)},n}(v=!I||parseInt(j.version)<3?n.Vue:g),$=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],D=t.getTemplateEngine();return t.setTemplateEngine({compile:c}),e.aVue=y,e._interopRequireWildcard=o,e.allVue=j,e.gh=O,e.isExecute=I,e.ComponentBase=b,e.$internalHooks=$,e.getProps=s,e.EJComponentDecorator=i,e.EJcomponentFactory=a,e.compile=c,e}({},ej.base,Vue3,Vue$1),this.ejs=ej; | ||
//# sourceMappingURL=ej2-vue-base.min.js.map |
/*! | ||
* filename: index.d.ts | ||
* version : 20.1.57 | ||
* version : 20.1.61 | ||
* 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@20.1.56", | ||
"_id": "@syncfusion/ej2-vue-base@20.1.57", | ||
"_inBundle": false, | ||
"_integrity": "sha512-LOLjDTRepCC7X915uqlXEMMB2+q77fP3970HJGUPnPI9Bzb+XHe46CjF3+uDK2vdzh3nHSNGXj1XVobcCDZhng==", | ||
"_integrity": "sha512-wlUNkm9CZXhcNumhnYFE4XrCj37hptT+ZruTtwdgFyK9za1l1FkIlpfqpvgZTac+Y4T7rpPtMrw7I+neJqX5BQ==", | ||
"_location": "/@syncfusion/ej2-vue-base", | ||
@@ -21,22 +21,20 @@ "_phantomChildren": {}, | ||
"/", | ||
"/@syncfusion/ej2-vue-calendars", | ||
"/@syncfusion/ej2-vue-buttons", | ||
"/@syncfusion/ej2-vue-charts", | ||
"/@syncfusion/ej2-vue-circulargauge", | ||
"/@syncfusion/ej2-vue-diagrams", | ||
"/@syncfusion/ej2-vue-documenteditor", | ||
"/@syncfusion/ej2-vue-dropdowns", | ||
"/@syncfusion/ej2-vue-filemanager", | ||
"/@syncfusion/ej2-vue-grids", | ||
"/@syncfusion/ej2-vue-inputs", | ||
"/@syncfusion/ej2-vue-layouts", | ||
"/@syncfusion/ej2-vue-navigations", | ||
"/@syncfusion/ej2-vue-notifications", | ||
"/@syncfusion/ej2-vue-pdfviewer", | ||
"/@syncfusion/ej2-vue-pivotview", | ||
"/@syncfusion/ej2-vue-popups", | ||
"/@syncfusion/ej2-vue-progressbar", | ||
"/@syncfusion/ej2-vue-richtexteditor", | ||
"/@syncfusion/ej2-vue-schedule", | ||
"/@syncfusion/ej2-vue-splitbuttons", | ||
"/@syncfusion/ej2-vue-spreadsheet" | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-vue-base/-/ej2-vue-base-20.1.56.tgz", | ||
"_shasum": "592b1fae4d310a4e2ac831c38f2ae546b1254f81", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-vue-base/-/ej2-vue-base-20.1.57.tgz", | ||
"_shasum": "56274be40f6a8ccb3fee82037cd20e1815b6f257", | ||
"_spec": "@syncfusion/ej2-vue-base@*", | ||
@@ -52,3 +50,3 @@ "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~20.1.56", | ||
"@syncfusion/ej2-base": "~20.1.61", | ||
"glob": "^7.0.5" | ||
@@ -83,4 +81,4 @@ }, | ||
"typings": "index.d.ts", | ||
"version": "20.1.57", | ||
"version": "20.1.61", | ||
"sideEffects": true | ||
} |
@@ -226,6 +226,4 @@ /** | ||
} | ||
else if (this && this.$) { | ||
if (this.$.slots) { | ||
propRef = this.$.slots.default(); | ||
} | ||
else if (this && this.$ && this.$.slots && this.$.slots.default) { | ||
propRef = this.$.slots.default(); | ||
} | ||
@@ -232,0 +230,0 @@ if (propRef) { |
@@ -11,2 +11,3 @@ import Vue from "vue"; | ||
if (context) { | ||
var plugins = context.vueInstance ? context.vueInstance.plugins : null; | ||
var pid = getUniqueID("templateParentDiv"); | ||
@@ -20,12 +21,16 @@ var id = getUniqueID("templateDiv"); | ||
if (gh && typeof templateElement === "string") { | ||
var vue3Slots_1 = getVue3Slot(context.vueInstance, templateElement, root); | ||
if (vue3Slots_1) { | ||
var vueSlot_1 = getCurrentVueSlot(context.vueInstance, templateElement, root); | ||
if (vueSlot_1) { | ||
// Compilation for Vue 3 slot template | ||
allVue | ||
.createApp({ | ||
var app = allVue.createApp({ | ||
render: function () { | ||
return vue3Slots_1[templateElement]({ data: data }); | ||
return vueSlot_1[templateElement]({ data: data }); | ||
} | ||
}) | ||
.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
}); | ||
if (plugins) { | ||
for (var i = 0; i < plugins.length; i++) { | ||
app.use(plugins[i]); | ||
} | ||
} | ||
app.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
returnEle = ele.childNodes; | ||
@@ -85,5 +90,9 @@ detach(ele); | ||
templateCompRef.data = function () { return tempRef_1; }; | ||
allVue | ||
.createApp(templateCompRef) | ||
.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
var app = allVue.createApp(templateCompRef); | ||
if (plugins) { | ||
for (var i = 0; i < plugins.length; i++) { | ||
app.use(plugins[i]); | ||
} | ||
} | ||
app.mount((context.getModuleName() === 'grid') ? ("#" + pid) : ("#" + id)); | ||
returnEle = ele.childNodes; | ||
@@ -93,8 +102,8 @@ detach(ele); | ||
else if (typeof templateElement === "string") { | ||
var vue2Slots_1 = getVue2Slot(context.vueInstance, templateElement, root); | ||
if (vue2Slots_1) { | ||
var vueSlot_2 = getVueSlot(context.vueInstance, templateElement, root); | ||
if (vueSlot_2) { | ||
// Compilation for Vue 2 slot template | ||
var vueTemplate = new Vue({ | ||
render: function () { | ||
return vue2Slots_1[templateElement]({ data: data }); | ||
return vueSlot_2[templateElement]({ data: data }); | ||
} | ||
@@ -154,3 +163,3 @@ }); | ||
// Get the Vue2 slot template from the root or current Vue component. | ||
function getVue2Slot(vueInstance, templateElement, root) { | ||
function getVueSlot(vueInstance, templateElement, root) { | ||
if (!vueInstance && !(root && root.vueInstance)) { | ||
@@ -160,5 +169,5 @@ return undefined; | ||
var instance = (root && root.vueInstance) ? root.vueInstance : vueInstance; | ||
return getVue2ChildSlot(instance, templateElement); | ||
return getVueChildSlot(instance, templateElement); | ||
} | ||
function getVue2ChildSlot(vueInstance, templateElement) { | ||
function getVueChildSlot(vueInstance, templateElement) { | ||
if (!vueInstance) { | ||
@@ -177,3 +186,3 @@ return undefined; | ||
for (var i = 0; i < childSlots.length; i++) { | ||
var slot = getVue2ChildSlot(getSlot(childSlots[i]), templateElement); | ||
var slot = getVueChildSlot(getSlot(childSlots[i]), templateElement); | ||
if (slot) { | ||
@@ -189,3 +198,3 @@ return slot; | ||
for (var i = 0; i < children.length; i++) { | ||
var slot = getVue2ChildSlot(getSlot(children[i]), templateElement); | ||
var slot = getVueChildSlot(getSlot(children[i]), templateElement); | ||
if (slot) { | ||
@@ -203,3 +212,3 @@ return slot; | ||
// Get the Vue3 slot template from the root or current Vue component. | ||
function getVue3Slot(vueInstance, templateElement, root) { | ||
function getCurrentVueSlot(vueInstance, templateElement, root) { | ||
if (!vueInstance && !(root && root.vueInstance)) { | ||
@@ -209,5 +218,5 @@ return undefined; | ||
var slots = (root && root.vueInstance) ? root.vueInstance.$slots : vueInstance.$slots; | ||
return getVue3ChildSlot(slots, templateElement); | ||
return getChildVueSlot(slots, templateElement); | ||
} | ||
function getVue3ChildSlot(slots, templateElement) { | ||
function getChildVueSlot(slots, templateElement) { | ||
if (slots && slots[templateElement]) { | ||
@@ -219,3 +228,3 @@ return slots; | ||
for (var i = 0; i < childSlots.length; i++) { | ||
var slot = getVue3ChildSlot(childSlots[i].children, templateElement); | ||
var slot = getChildVueSlot(childSlots[i].children, templateElement); | ||
if (slot) { | ||
@@ -222,0 +231,0 @@ return slot; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360093
2886