@syncfusion/ej2-vue-treegrid
Version:
Essential JS 2 TreeGrid Component for Vue
12 lines (11 loc) • 16.6 kB
JavaScript
/*!
* filename: ej2-vue-treegrid.umd.min.js
* version : 29.1.33
* Copyright Syncfusion Inc. 2001 - 2024. 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-treegrid"),require("@syncfusion/ej2-vue-base"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-treegrid","@syncfusion/ej2-vue-base","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Treegrid,e.ej2VueBase,e.ej2Base)}(this,function(t,n,i,r){"use strict";var s=i.vueDefineComponent({inject:{custom:{default:null}},render:function(e){var t;if(!i.isExecute)return t=null,(i.isExecute?e:i.gh)("div",{class:"e-directive"},t=r.isNullOrUndefined(this.$slots.default)?t:i.isExecute?this.$slots.default:this.$slots.default())},updated:function(){!i.isExecute&&this.custom&&this.custom()},methods:{getTag:function(){return"e-stacked-columns"}}}),o={name:"e-stacked-columns",install:function(e){e.component(o.name,s)}},c=i.vueDefineComponent({render:function(){},methods:{getTag:function(){return"e-stacked-column"}}}),a={name:"e-stacked-column",install:function(e){e.component(a.name,c)}},u=i.vueDefineComponent({inject:{custom:{default:null}},render:function(e){var t;if(!i.isExecute)return t=null,(i.isExecute?e:i.gh)("div",{class:"e-directive"},t=r.isNullOrUndefined(this.$slots.default)?t:i.isExecute?this.$slots.default:this.$slots.default())},updated:function(){!i.isExecute&&this.custom&&this.custom()},methods:{getTag:function(){return"e-columns"}}}),l={name:"e-columns",install:function(e){e.component(l.name,u)}},d=i.vueDefineComponent({render:function(){},methods:{getTag:function(){return"e-column"}}}),h={name:"e-column",install:function(e){e.component(h.name,d)}},g=i.vueDefineComponent({inject:{custom:{default:null}},render:function(e){var t;if(!i.isExecute)return t=null,(i.isExecute?e:i.gh)("div",{class:"e-directive"},t=r.isNullOrUndefined(this.$slots.default)?t:i.isExecute?this.$slots.default:this.$slots.default())},updated:function(){!i.isExecute&&this.custom&&this.custom()},methods:{getTag:function(){return"e-columns"}}}),f={name:"e-columns",install:function(e){e.component(f.name,g)}},m=i.vueDefineComponent({render:function(){},methods:{getTag:function(){return"e-column"}}}),p={name:"e-column",install:function(e){e.component(p.name,m)}},I=i.vueDefineComponent({inject:{custom:{default:null}},render:function(e){var t;if(!i.isExecute)return t=null,(i.isExecute?e:i.gh)("div",{class:"e-directive"},t=r.isNullOrUndefined(this.$slots.default)?t:i.isExecute?this.$slots.default:this.$slots.default())},updated:function(){!i.isExecute&&this.custom&&this.custom()},methods:{getTag:function(){return"e-aggregates"}}}),j={name:"e-aggregates",install:function(e){e.component(j.name,I)}},C=i.vueDefineComponent({render:function(){},methods:{getTag:function(){return"e-aggregate"}}}),x={name:"e-aggregate",install:function(e){e.component(x.name,C)}},e=["isLazyUpdate","plugins","aggregates","allowExcelExport","allowFiltering","allowMultiSorting","allowPaging","allowPdfExport","allowReordering","allowResizing","allowRowDragAndDrop","allowSelection","allowSorting","allowTextWrap","autoCheckHierarchy","childMapping","clipMode","columnMenuItems","columnQueryMode","columns","contextMenuItems","copyHierarchyMode","currencyCode","dataSource","detailTemplate","editSettings","enableAdaptiveUI","enableAltRow","enableAutoFill","enableCollapseAll","enableColumnVirtualization","enableHover","enableHtmlSanitizer","enableImmutableMode","enableInfiniteScrolling","enablePersistence","enableRtl","enableVirtualMaskRow","enableVirtualization","expandStateMapping","filterSettings","frozenColumns","frozenRows","gridLines","hasChildMapping","height","idMapping","infiniteScrollSettings","loadChildOnDemand","loadingIndicator","locale","pageSettings","parentIdMapping","printMode","query","rowDropSettings","rowHeight","rowTemplate","searchSettings","selectedRowIndex","selectionSettings","showColumnChooser","showColumnMenu","sortSettings","textWrapSettings","toolbar","treeColumnIndex","width","actionBegin","actionComplete","actionFailure","batchAdd","batchCancel","batchDelete","beforeBatchAdd","beforeBatchDelete","beforeBatchSave","beforeCopy","beforeDataBound","beforeExcelExport","beforePaste","beforePdfExport","beforePrint","beginEdit","cellDeselected","cellDeselecting","cellEdit","cellSave","cellSaved","cellSelected","cellSelecting","checkboxChange","collapsed","collapsing","columnDrag","columnDragStart","columnDrop","columnMenuClick","columnMenuOpen","contextMenuClick","contextMenuOpen","created","dataBound","dataSourceChanged","dataStateChange","detailDataBound","excelExportComplete","excelHeaderQueryCellInfo","excelQueryCellInfo","expanded","expanding","headerCellInfo","load","pdfExportComplete","pdfHeaderQueryCellInfo","pdfQueryCellInfo","printComplete","queryCellInfo","recordDoubleClick","resizeStart","resizeStop","resizing","rowDataBound","rowDeselected","rowDeselecting","rowDrag","rowDragStart","rowDragStartHelper","rowDrop","rowSelected","rowSelecting","toolbarClick"],v=["dataSource"],w=i.getProps({props:e}),y=w[0],w=w[1],R=Object.keys(w);R.push("modelchanged","update:modelValue");for(var b=0,E=v;b<E.length;b++)R.push("update:"+E[b]);var S=i.vueDefineComponent({name:"TreeGridComponent",mixins:[i.ComponentBase],props:y,watch:w,emits:R,model:{event:"modelchanged"},provide:function(){return{custom:this.custom}},data:function(){return{ej2Instances:new n.TreeGrid({}),propKeys:e,models:v,hasChildDirective:!0,hasInjectedModules:!0,tagMapper:{"e-columns":{"e-column":{"e-stacked-columns":"e-stacked-column"}},"e-aggregates":{"e-aggregate":{"e-columns":"e-column"}}},tagNameMapper:{"e-stacked-columns":"e-columns"},isVue3:!i.isExecute,templateCollection:{}}},created:function(){this.ej2Instances._trigger=this.ej2Instances.trigger,this.ej2Instances.trigger=this.trigger,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(i.isExecute?e:i.gh)("div",t=r.isNullOrUndefined(this.$slots.default)?t:i.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,n=e;t<n.length;t++){var s=n[t],o=this.templateCollection[s];if(o&&o.length){for(var i=0,r=o;i<r.length;i++){var c=r[i];this.destroyPortals(c)}delete this.templateCollection[s]}}},setProperties:function(n,e){var s=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(n,e),n&&this.models&&this.models.length&&Object.keys(n).map(function(t){s.models.map(function(e){t!==e||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,n[t]):(s.$emit("update:"+t,n[t]),s.$emit("modelchanged",n[t])))})})},trigger:function(e,t,n){var s,o;i.isExecute||(this.models=this.models||this.ej2Instances.referModels),"change"!==e&&"input"!==e||!this.models||0===this.models.length?"actionBegin"===e&&"dateNavigate"===t.requestType&&this.models&&0!==this.models.length&&(o=(s=this.models.toString().match(/currentView|selectedDate/)||[])[0],t)&&s&&!r.isUndefined(t[o])&&(i.isExecute?(this.$emit("update:"+o,t[o]),this):(this.ej2Instances.vueInstance.$emit("update:"+o,t[o]),this.ej2Instances.vueInstance)).$emit("modelchanged",t[o]):(o=(s=this.models.toString().match(/checked|value/)||[])[0],t&&s&&!r.isUndefined(t[o])&&(i.isExecute?("change"===e||this.$props&&!this.$props.isLazyUpdate)&&(this.$emit("update:"+o,t[o]),this.$emit("modelchanged",t[o])):(this.ej2Instances.vueInstance.$emit("update:"+o,t[o]),this.ej2Instances.vueInstance.$emit("modelchanged",t[o]),this.ej2Instances.vueInstance.$emit("update:modelValue",t[o])))),this.ej2Instances&&this.ej2Instances._trigger&&this.ej2Instances._trigger(e,t,n)},custom:function(){this.updated()},addRecord:function(e,t,n){return this.ej2Instances.addRecord(e,t,n)},autoFitColumns:function(e){return this.ej2Instances.autoFitColumns(e)},clearFiltering:function(){return this.ej2Instances.clearFiltering()},clearSelection:function(){return this.ej2Instances.clearSelection()},clearSorting:function(){return this.ej2Instances.clearSorting()},closeEdit:function(){return this.ej2Instances.closeEdit()},collapseAll:function(){return this.ej2Instances.collapseAll()},collapseAtLevel:function(e){return this.ej2Instances.collapseAtLevel(e)},collapseByKey:function(e){return this.ej2Instances.collapseByKey(e)},collapseRow:function(e,t,n){return this.ej2Instances.collapseRow(e,t,n)},copy:function(e){return this.ej2Instances.copy(e)},csvExport:function(e,t,n,s){return this.ej2Instances.csvExport(e,t,n,s)},deleteRecord:function(e,t){return this.ej2Instances.deleteRecord(e,t)},deleteRow:function(e){return this.ej2Instances.deleteRow(e)},destroy:function(){return this.ej2Instances.destroy()},editCell:function(e,t){return this.ej2Instances.editCell(e,t)},enableToolbarItems:function(e,t){return this.ej2Instances.enableToolbarItems(e,t)},endEdit:function(){return this.ej2Instances.endEdit()},excelExport:function(e,t,n,s){return this.ej2Instances.excelExport(e,t,n,s)},expandAll:function(){return this.ej2Instances.expandAll()},expandAtLevel:function(e){return this.ej2Instances.expandAtLevel(e)},expandByKey:function(e){return this.ej2Instances.expandByKey(e)},expandRow:function(e,t,n,s){return this.ej2Instances.expandRow(e,t,n,s)},extendRequiredModules:function(e){return this.ej2Instances.extendRequiredModules(e)},filterByColumn:function(e,t,n,s,o,i,r,c){return this.ej2Instances.filterByColumn(e,t,n,s,o,i,r,c)},getBatchChanges:function(){return this.ej2Instances.getBatchChanges()},getCellFromIndex:function(e,t){return this.ej2Instances.getCellFromIndex(e,t)},getCheckedRecords:function(){return this.ej2Instances.getCheckedRecords()},getCheckedRowIndexes:function(){return this.ej2Instances.getCheckedRowIndexes()},getColumnByField:function(e){return this.ej2Instances.getColumnByField(e)},getColumnByUid:function(e){return this.ej2Instances.getColumnByUid(e)},getColumnFieldNames:function(){return this.ej2Instances.getColumnFieldNames()},getColumnHeaderByField:function(e){return this.ej2Instances.getColumnHeaderByField(e)},getColumnHeaderByIndex:function(e){return this.ej2Instances.getColumnHeaderByIndex(e)},getColumnHeaderByUid:function(e){return this.ej2Instances.getColumnHeaderByUid(e)},getColumnIndexByField:function(e){return this.ej2Instances.getColumnIndexByField(e)},getColumnIndexByUid:function(e){return this.ej2Instances.getColumnIndexByUid(e)},getColumns:function(e){return this.ej2Instances.getColumns(e)},getContent:function(){return this.ej2Instances.getContent()},getContentTable:function(){return this.ej2Instances.getContentTable()},getCurrentViewRecords:function(){return this.ej2Instances.getCurrentViewRecords()},getDataModule:function(){return this.ej2Instances.getDataModule()},getDataRows:function(){return this.ej2Instances.getDataRows()},getFooterContent:function(){return this.ej2Instances.getFooterContent()},getFooterContentTable:function(){return this.ej2Instances.getFooterContentTable()},getFrozenLeftColumnHeaderByIndex:function(e){return this.ej2Instances.getFrozenLeftColumnHeaderByIndex(e)},getFrozenRightCellFromIndex:function(e,t){return this.ej2Instances.getFrozenRightCellFromIndex(e,t)},getFrozenRightColumnHeaderByIndex:function(e){return this.ej2Instances.getFrozenRightColumnHeaderByIndex(e)},getFrozenRightDataRows:function(){return this.ej2Instances.getFrozenRightDataRows()},getFrozenRightRowByIndex:function(e){return this.ej2Instances.getFrozenRightRowByIndex(e)},getFrozenRightRows:function(){return this.ej2Instances.getFrozenRightRows()},getHeaderContent:function(){return this.ej2Instances.getHeaderContent()},getHeaderTable:function(){return this.ej2Instances.getHeaderTable()},getMovableCellFromIndex:function(e,t){return this.ej2Instances.getMovableCellFromIndex(e,t)},getMovableColumnHeaderByIndex:function(e){return this.ej2Instances.getMovableColumnHeaderByIndex(e)},getMovableDataRows:function(){return this.ej2Instances.getMovableDataRows()},getMovableRowByIndex:function(e){return this.ej2Instances.getMovableRowByIndex(e)},getMovableRows:function(){return this.ej2Instances.getMovableRows()},getPager:function(){return this.ej2Instances.getPager()},getPrimaryKeyFieldNames:function(){return this.ej2Instances.getPrimaryKeyFieldNames()},getRowByIndex:function(e){return this.ej2Instances.getRowByIndex(e)},getRowInfo:function(e){return this.ej2Instances.getRowInfo(e)},getRows:function(){return this.ej2Instances.getRows()},getSelectedRecords:function(){return this.ej2Instances.getSelectedRecords()},getSelectedRowCellIndexes:function(){return this.ej2Instances.getSelectedRowCellIndexes()},getSelectedRowIndexes:function(){return this.ej2Instances.getSelectedRowIndexes()},getSelectedRows:function(){return this.ej2Instances.getSelectedRows()},getUidByColumnField:function(e){return this.ej2Instances.getUidByColumnField(e)},getVisibleColumns:function(){return this.ej2Instances.getVisibleColumns()},getVisibleRecords:function(){return this.ej2Instances.getVisibleRecords()},goToPage:function(e){return this.ej2Instances.goToPage(e)},hideColumns:function(e,t){return this.ej2Instances.hideColumns(e,t)},hideSpinner:function(){return this.ej2Instances.hideSpinner()},indent:function(e){return this.ej2Instances.indent(e)},openColumnChooser:function(e,t){return this.ej2Instances.openColumnChooser(e,t)},outdent:function(e){return this.ej2Instances.outdent(e)},paste:function(e,t,n){return this.ej2Instances.paste(e,t,n)},pdfExport:function(e,t,n,s){return this.ej2Instances.pdfExport(e,t,n,s)},print:function(){return this.ej2Instances.print()},refresh:function(){return this.ej2Instances.refresh()},refreshColumns:function(e){return this.ej2Instances.refreshColumns(e)},refreshHeader:function(){return this.ej2Instances.refreshHeader()},reorderColumns:function(e,t){return this.ej2Instances.reorderColumns(e,t)},reorderRows:function(e,t,n){return this.ej2Instances.reorderRows(e,t,n)},saveCell:function(){return this.ej2Instances.saveCell()},search:function(e){return this.ej2Instances.search(e)},selectCell:function(e,t){return this.ej2Instances.selectCell(e,t)},selectCheckboxes:function(e){return this.ej2Instances.selectCheckboxes(e)},selectRow:function(e,t){return this.ej2Instances.selectRow(e,t)},selectRows:function(e){return this.ej2Instances.selectRows(e)},serverCsvExport:function(e){return this.ej2Instances.serverCsvExport(e)},serverExcelExport:function(e){return this.ej2Instances.serverExcelExport(e)},serverPdfExport:function(e){return this.ej2Instances.serverPdfExport(e)},setCellValue:function(e,t,n){return this.ej2Instances.setCellValue(e,t,n)},setRowData:function(e,t){return this.ej2Instances.setRowData(e,t)},showColumns:function(e,t){return this.ej2Instances.showColumns(e,t)},showSpinner:function(){return this.ej2Instances.showSpinner()},sortByColumn:function(e,t,n){return this.ej2Instances.sortByColumn(e,t,n)},startEdit:function(e){return this.ej2Instances.startEdit(e)},updateCell:function(e,t,n){return this.ej2Instances.updateCell(e,t,n)},updateExternalMessage:function(e){return this.ej2Instances.updateExternalMessage(e)},updateRow:function(e,t){return this.ej2Instances.updateRow(e,t)}}}),B={name:"ejs-treegrid",install:function(e){e.component(B.name,S),e.component(h.name,d),e.component(l.name,u),e.component(a.name,c),e.component(o.name,s),e.component(x.name,C),e.component(j.name,I),e.component(p.name,m),e.component(f.name,g)}};Object.keys(n).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),t.AggregateColumnDirective=m,t.AggregateColumnPlugin=p,t.AggregateColumnsDirective=g,t.AggregateColumnsPlugin=f,t.AggregateDirective=C,t.AggregatePlugin=x,t.AggregatesDirective=I,t.AggregatesPlugin=j,t.ColumnDirective=d,t.ColumnPlugin=h,t.ColumnsDirective=u,t.ColumnsPlugin=l,t.StackedColumnDirective=c,t.StackedColumnPlugin=a,t.StackedColumnsDirective=s,t.StackedColumnsPlugin=o,t.TreeGridComponent=S,t.TreeGridPlugin=B,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-vue-treegrid.umd.min.js.map