UNPKG

@syncfusion/ej2-vue-lists

Version:

The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views. for Vue

12 lines (11 loc) 4.51 kB
/*! * filename: ej2-vue-lists.umd.min.js * version : 32.2.3 * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-vue-base"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-lists","@syncfusion/ej2-vue-base","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Lists,e.ej2VueBase,e.ej2Base)}(this,function(t,s,n,i){"use strict";var e=["isLazyUpdate","plugins","animation","checkBoxPosition","cssClass","dataSource","enable","enableHtmlSanitizer","enablePersistence","enableRtl","enableVirtualization","enabled","fields","groupTemplate","headerTemplate","headerTitle","height","htmlAttributes","locale","query","showCheckBox","showHeader","showIcon","sortOrder","template","width","actionBegin","actionComplete","actionFailure","scroll","select"],c=[],r=n.getProps({props:e}),o=r[0],r=r[1],a=Object.keys(r);a.push("modelchanged","update:modelValue");for(var u=0,l=c;u<l.length;u++)a.push("update:"+l[u]);var h=n.vueDefineComponent({name:"ListViewComponent",mixins:[n.ComponentBase],props:o,watch:r,emits:a,provide:function(){return{custom:this.custom}},data:function(){return{ej2Instances:new s.ListView({}),propKeys:e,models:c,hasChildDirective:!1,hasInjectedModules:!0,tagMapper:{},tagNameMapper:{},isVue3:!n.isExecute,templateCollection:{}}},created:function(){this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(n.isExecute?e:n.gh)("div",t=i.isNullOrUndefined(this.$slots.default)?t:n.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,s=e;t<s.length;t++){var n=s[t],i=this.templateCollection[n];if(i&&i.length){for(var c=0,r=i;c<r.length;c++){var o=r[c];this.destroyPortals(o)}delete this.templateCollection[n]}}},setProperties:function(s,e){var n=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(s,e),s&&this.models&&this.models.length&&Object.keys(s).map(function(t){n.models.map(function(e){t!==e||/datasource/i.test(t)||(n.isVue3?n.ej2Instances.vueInstance.$emit("update:"+t,s[t]):(n.$emit("update:"+t,s[t]),n.$emit("modelchanged",s[t])))})})},custom:function(){this.updated()},addItem:function(e,t,s){return this.ej2Instances.addItem(e,t,s)},back:function(){return this.ej2Instances.back()},checkAllItems:function(){return this.ej2Instances.checkAllItems()},checkItem:function(e){return this.ej2Instances.checkItem(e)},destroy:function(){return this.ej2Instances.destroy()},disableItem:function(e){return this.ej2Instances.disableItem(e)},enableItem:function(e){return this.ej2Instances.enableItem(e)},findItem:function(e){return this.ej2Instances.findItem(e)},getSelectedItems:function(){return this.ej2Instances.getSelectedItems()},hideItem:function(e){return this.ej2Instances.hideItem(e)},refreshItemHeight:function(){return this.ej2Instances.refreshItemHeight()},removeItem:function(e){return this.ej2Instances.removeItem(e)},removeMultipleItems:function(e){return this.ej2Instances.removeMultipleItems(e)},requiredModules:function(){return this.ej2Instances.requiredModules()},selectItem:function(e){return this.ej2Instances.selectItem(e)},selectMultipleItems:function(e){return this.ej2Instances.selectMultipleItems(e)},showItem:function(e){return this.ej2Instances.showItem(e)},uncheckAllItems:function(){return this.ej2Instances.uncheckAllItems()},uncheckItem:function(e){return this.ej2Instances.uncheckItem(e)},unselectItem:function(e){return this.ej2Instances.unselectItem(e)}}}),m={name:"ejs-listview",install:function(e){e.component(m.name,h)}};Object.keys(s).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}),t.ListViewComponent=h,t.ListViewPlugin=m,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=ej2-vue-lists.umd.min.js.map