@syncfusion/ej2-treegrid 26.1.35 → 26.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +31 -8
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +31 -8
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/treegrid/actions/excel-export.js +14 -3
- package/src/treegrid/base/data.js +6 -2
- package/src/treegrid/base/treegrid.js +8 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +4 -2
- package/styles/fluent2.css +35 -43
- package/styles/treegrid/fluent2.css +35 -43
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Property, merge, ChildProperty, Collection, isNullOrUndefined, Browser, removeClass, addClass, getValue, createElement, setValue, extend as extend$1, Internationalization, getEnumValue, compile, L10n, EventHandler, KeyboardEvents, SanitizeHtmlHelper, Complex, Event, NotifyPropertyChanges, Component, closest, classList, setStyleAttribute, select, debounce, remove } from '@syncfusion/ej2-base';
|
|
2
|
-
import { Grid, Logger as Logger$1, detailLists, Clipboard, getObject, parentsUntil, Print as Print$1, templateCompiler, appendChildren, extend, CellRenderer, getUid, CellType, Freeze as Freeze$1, getNumberFormat, getActualProperties, iterateArrayOrObject, RowDropSettings as RowDropSettings$1, Reorder as Reorder$1, Resize as Resize$1, Scroll, RowDD as RowDD$1, VirtualRowModelGenerator, Filter as Filter$1, ExcelExport as ExcelExport$1, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, calculateAggregate, Aggregate as Aggregate$1, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, resetRowIndex, Edit as Edit$1, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, Cell, VirtualContentRenderer, InterSectionObserver, getTransformValues, RenderType, VirtualHeaderRenderer, VirtualScroll as VirtualScroll$1, ColumnChooser as ColumnChooser$1, RowRenderer, InfiniteScroll as InfiniteScroll$1 } from '@syncfusion/ej2-grids';
|
|
2
|
+
import { Grid, Logger as Logger$1, detailLists, Clipboard, getObject, parentsUntil, Print as Print$1, templateCompiler, appendChildren, extend, CellRenderer, getUid, CellType, Freeze as Freeze$1, getNumberFormat, getActualProperties, iterateArrayOrObject, RowDropSettings as RowDropSettings$1, Reorder as Reorder$1, Resize as Resize$1, Scroll, RowDD as RowDD$1, VirtualRowModelGenerator, Filter as Filter$1, Data, ExportHelper, ExcelExport as ExcelExport$1, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, calculateAggregate, Aggregate as Aggregate$1, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, resetRowIndex, Edit as Edit$1, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, Cell, VirtualContentRenderer, InterSectionObserver, getTransformValues, RenderType, VirtualHeaderRenderer, VirtualScroll as VirtualScroll$1, ColumnChooser as ColumnChooser$1, RowRenderer, InfiniteScroll as InfiniteScroll$1 } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { createCheckBox } from '@syncfusion/ej2-buttons';
|
|
4
4
|
import { DataManager, ODataAdaptor, WebApiAdaptor, WebMethodAdaptor, CacheAdaptor, UrlAdaptor, Query, DataUtil, RemoteSaveAdaptor, Deferred, JsonAdaptor, Predicate as Predicate$1 } from '@syncfusion/ej2-data';
|
|
5
5
|
import { showSpinner, hideSpinner, createSpinner } from '@syncfusion/ej2-popups';
|
|
@@ -2373,16 +2373,20 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2373
2373
|
var clonequries = qry.queries.filter(function (e) { return e.fn !== 'onPage' && e.fn !== 'onWhere'; });
|
|
2374
2374
|
qry.queries = clonequries;
|
|
2375
2375
|
qry.isCountRequired = true;
|
|
2376
|
+
var idMappingValue = parseInt(rowDetails.record[this.parent.idMapping], 10);
|
|
2377
|
+
if (isNaN(idMappingValue)) {
|
|
2378
|
+
idMappingValue = rowDetails.record[this.parent.idMapping].toString();
|
|
2379
|
+
}
|
|
2376
2380
|
if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
|
|
2377
2381
|
qry.take(this.parent.pageSettings.pageSize);
|
|
2378
2382
|
var expandDetail = [];
|
|
2379
|
-
expandDetail.push('ExpandingAction',
|
|
2383
|
+
expandDetail.push('ExpandingAction', idMappingValue.toString());
|
|
2380
2384
|
qry.expand(expandDetail);
|
|
2381
2385
|
}
|
|
2382
2386
|
else if (this.parent.enableVirtualization && rowDetails.action === 'collapse') {
|
|
2383
2387
|
qry.take(this.parent.grid.pageSettings.pageSize);
|
|
2384
2388
|
var expandDetail = [];
|
|
2385
|
-
expandDetail.push('CollapsingAction',
|
|
2389
|
+
expandDetail.push('CollapsingAction', idMappingValue.toString());
|
|
2386
2390
|
qry.expand(expandDetail);
|
|
2387
2391
|
}
|
|
2388
2392
|
qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
|
|
@@ -4196,7 +4200,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4196
4200
|
TreeGrid.prototype.requiredModules = function () {
|
|
4197
4201
|
var modules = [];
|
|
4198
4202
|
var splitFrozenCount = 'splitFrozenCount';
|
|
4199
|
-
this.
|
|
4203
|
+
if (!this.isReact && isNullOrUndefined(this['changedProperties'].columns)) {
|
|
4204
|
+
this.grid["" + splitFrozenCount](this.getColumns());
|
|
4205
|
+
}
|
|
4200
4206
|
if (this.isDestroyed) {
|
|
4201
4207
|
return modules;
|
|
4202
4208
|
}
|
|
@@ -5441,6 +5447,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5441
5447
|
TreeGrid.prototype.onPropertyChanged = function (newProp) {
|
|
5442
5448
|
var properties = Object.keys(newProp);
|
|
5443
5449
|
var requireRefresh = false;
|
|
5450
|
+
if (properties.indexOf('columns') > -1) {
|
|
5451
|
+
this.grid.columns = this.getGridColumns(newProp.columns);
|
|
5452
|
+
this.grid['updateColumnObject']();
|
|
5453
|
+
requireRefresh = true;
|
|
5454
|
+
}
|
|
5444
5455
|
for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {
|
|
5445
5456
|
var prop = properties_1[_i];
|
|
5446
5457
|
switch (prop) {
|
|
@@ -10212,14 +10223,19 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
|
|
|
10212
10223
|
isMultipleExport, workbook, isBlob, isCsv) {
|
|
10213
10224
|
var _this = this;
|
|
10214
10225
|
var dataSource = this.parent.dataSource;
|
|
10226
|
+
var data = new Data(this.parent.grid);
|
|
10215
10227
|
var property = Object();
|
|
10216
10228
|
setValue('isCsv', isCsv, property);
|
|
10217
10229
|
setValue('cancel', false, property);
|
|
10218
10230
|
if (!isNullOrUndefined(excelExportProperties)) {
|
|
10219
10231
|
this.isCollapsedStatePersist = excelExportProperties.isCollapsedStatePersist;
|
|
10220
10232
|
}
|
|
10221
|
-
if (!isNullOrUndefined(excelExportProperties)
|
|
10222
|
-
if (!excelExportProperties.dataSource['dataSource']) {
|
|
10233
|
+
if (!isNullOrUndefined(excelExportProperties)) {
|
|
10234
|
+
if (!isNullOrUndefined(excelExportProperties.dataSource) && !excelExportProperties.dataSource['dataSource']) {
|
|
10235
|
+
return this.parent.grid.excelExportModule.Map(this.parent.grid, excelExportProperties, isMultipleExport, workbook, isCsv, isBlob);
|
|
10236
|
+
}
|
|
10237
|
+
if (excelExportProperties.exportType === 'CurrentPage') {
|
|
10238
|
+
excelExportProperties.dataSource = this.parent.getCurrentViewRecords();
|
|
10223
10239
|
return this.parent.grid.excelExportModule.Map(this.parent.grid, excelExportProperties, isMultipleExport, workbook, isCsv, isBlob);
|
|
10224
10240
|
}
|
|
10225
10241
|
}
|
|
@@ -10230,6 +10246,11 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
|
|
|
10230
10246
|
if (!_this.isLocal()) {
|
|
10231
10247
|
query = _this.generateQuery(query);
|
|
10232
10248
|
query.queries = _this.parent.grid.getDataModule().generateQuery().queries;
|
|
10249
|
+
query = ExportHelper.getQuery(_this.parent.grid, data);
|
|
10250
|
+
if (isNullOrUndefined(_this.parent.filterModule)) {
|
|
10251
|
+
query.queries = query.queries.slice(1, 2);
|
|
10252
|
+
query.params = query.params.slice(0, 0);
|
|
10253
|
+
}
|
|
10233
10254
|
setValue('query', query, property);
|
|
10234
10255
|
}
|
|
10235
10256
|
_this.parent.trigger(beforeExcelExport, extend$1(property, excelExportProperties));
|
|
@@ -13441,6 +13462,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13441
13462
|
VirtualTreeContentRenderer.prototype.rowSelectedEvent = function (args) {
|
|
13442
13463
|
var rowSelected = 'rowSelected';
|
|
13443
13464
|
_super.prototype["" + rowSelected].call(this, args);
|
|
13465
|
+
this.parent.notify('virtualTransform', { requestType: 'transformChange' });
|
|
13444
13466
|
};
|
|
13445
13467
|
VirtualTreeContentRenderer.prototype.toSelectVirtualRow = function (args) {
|
|
13446
13468
|
if (this.parent.isEdit) {
|
|
@@ -13610,7 +13632,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13610
13632
|
var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
|
|
13611
13633
|
var content = this.parent.getContent().querySelector('.e-content');
|
|
13612
13634
|
var scrollHeight = outBuffer * rowHeight;
|
|
13613
|
-
var upScroll = (scrollArgs.offset.top - this.translateY)
|
|
13635
|
+
var upScroll = (scrollArgs.offset.top - this.translateY) <= 0;
|
|
13614
13636
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
13615
13637
|
var selectedRowIndex = 'selectedRowIndex';
|
|
13616
13638
|
var currentViewData = this.parent.currentViewData;
|
|
@@ -13622,7 +13644,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13622
13644
|
+ Math.ceil(vHeight / rowHeight))
|
|
13623
13645
|
- this.parent.pageSettings.pageSize;
|
|
13624
13646
|
index = (index > 0) ? index : 0;
|
|
13625
|
-
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex]
|
|
13647
|
+
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
|
|
13648
|
+
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
|
|
13626
13649
|
index = this["" + selectedRowIndex];
|
|
13627
13650
|
}
|
|
13628
13651
|
this.startIndex = index;
|