@syncfusion/ej2-treegrid 32.2.9 → 33.1.44
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 +192 -66
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +195 -67
- 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 +5 -5
- package/src/treegrid/actions/rowdragdrop.js +8 -2
- package/src/treegrid/base/data.js +2 -33
- package/src/treegrid/base/treegrid-model.d.ts +1 -1
- package/src/treegrid/base/treegrid.d.ts +34 -0
- package/src/treegrid/base/treegrid.js +124 -4
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +4 -5
- package/src/treegrid/renderer/virtual-tree-content-render.js +62 -29
- package/styles/fluent2.css +1 -0
- package/styles/material3-dark-lite.css +2 -2
- package/styles/material3-dark.css +2 -2
- package/styles/material3-lite.css +2 -2
- package/styles/material3.css +2 -2
- package/styles/treegrid/_bigger.scss +3 -0
- package/styles/treegrid/fluent2.css +1 -0
- package/styles/treegrid/icons/_material3.scss +2 -2
- package/styles/treegrid/material3-dark.css +2 -2
- package/styles/treegrid/material3.css +2 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 33.1.44
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-treegrid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "33.1.44",
|
|
4
4
|
"description": "Essential JS 2 TreeGrid Component",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-treegrid.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-data": "~
|
|
13
|
-
"@syncfusion/ej2-grids": "~
|
|
14
|
-
"@syncfusion/ej2-popups": "~
|
|
11
|
+
"@syncfusion/ej2-base": "~33.1.44",
|
|
12
|
+
"@syncfusion/ej2-data": "~33.1.44",
|
|
13
|
+
"@syncfusion/ej2-grids": "~33.1.44",
|
|
14
|
+
"@syncfusion/ej2-popups": "~33.1.44"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {},
|
|
17
17
|
"keywords": [
|
|
@@ -1308,10 +1308,16 @@ var RowDD = /** @class */ (function () {
|
|
|
1308
1308
|
var droppedRecord = void 0;
|
|
1309
1309
|
if (isNullOrUndefined(args.dropIndex)) {
|
|
1310
1310
|
var primaryKeyField = this.parent.getPrimaryKeyFieldNames()[0];
|
|
1311
|
-
var
|
|
1311
|
+
var rowIndex_1 = tObj.selectedRowIndex === -1 ?
|
|
1312
1312
|
(this.parent.grid.getRowIndexByPrimaryKey(args.data[0]["" + primaryKeyField])) - 1
|
|
1313
1313
|
: tObj.getSelectedRowIndexes()[0] - 1;
|
|
1314
|
-
var record =
|
|
1314
|
+
var record = void 0;
|
|
1315
|
+
if (this.parent.enableVirtualization) {
|
|
1316
|
+
record = tObj.getCurrentViewRecords().find(function (e) { return e.index === rowIndex_1; });
|
|
1317
|
+
}
|
|
1318
|
+
else {
|
|
1319
|
+
record = tObj.getCurrentViewRecords()[parseInt(rowIndex_1.toString(), 10)];
|
|
1320
|
+
}
|
|
1315
1321
|
this.getParentData(record, args.data);
|
|
1316
1322
|
}
|
|
1317
1323
|
else {
|
|
@@ -773,7 +773,6 @@ var DataManipulation = /** @class */ (function () {
|
|
|
773
773
|
var results = dataObj instanceof DataManager ? dataObj.dataSource.json : dataObj;
|
|
774
774
|
var count = isCountRequired(this.parent) ? getValue('count', this.parent.dataSource)
|
|
775
775
|
: results.length;
|
|
776
|
-
var qry = new Query();
|
|
777
776
|
var gridQuery = getObject('query', args);
|
|
778
777
|
var filterQuery;
|
|
779
778
|
var searchQuery;
|
|
@@ -789,11 +788,7 @@ var DataManipulation = /** @class */ (function () {
|
|
|
789
788
|
gridQuery = getValue('grid.renderModule.data', this.parent).filterQuery(gridQuery);
|
|
790
789
|
gridQuery = getValue('grid.renderModule.data', this.parent).searchQuery(gridQuery);
|
|
791
790
|
}
|
|
792
|
-
|
|
793
|
-
var srchQuery = gridQuery.queries.filter(function (q) { return q.fn === 'onSearch'; });
|
|
794
|
-
qry.queries = fltrQuery.concat(srchQuery);
|
|
795
|
-
var filteredData = new DataManager(results).executeLocal(qry);
|
|
796
|
-
this.parent.notify('updateFilterRecs', { data: filteredData });
|
|
791
|
+
this.parent.getData({ query: gridQuery, isFilter: true });
|
|
797
792
|
results = this.dataResults.result;
|
|
798
793
|
this.dataResults.result = null;
|
|
799
794
|
if (this.parent.grid.aggregates.length > 0) {
|
|
@@ -818,34 +813,8 @@ var DataManipulation = /** @class */ (function () {
|
|
|
818
813
|
}
|
|
819
814
|
if (this.parent.grid.sortSettings.columns.length > 0 || this.isSortAction) {
|
|
820
815
|
this.isSortAction = false;
|
|
821
|
-
var parentData = this.parent.parentData;
|
|
822
816
|
var query = getObject('query', args);
|
|
823
|
-
|
|
824
|
-
for (var srt = this.parent.grid.sortSettings.columns.length - 1; srt >= 0; srt--) {
|
|
825
|
-
var getColumnByField = 'getColumnByField';
|
|
826
|
-
var col = this.parent.grid.renderModule.data["" + getColumnByField](this.parent.grid.
|
|
827
|
-
sortSettings.columns[parseInt(srt.toString(), 10)].field);
|
|
828
|
-
var compFun = col.sortComparer && isOffline(this.parent) ?
|
|
829
|
-
col.sortComparer.bind(col) :
|
|
830
|
-
this.parent.grid.sortSettings.columns[parseInt(srt.toString(), 10)].direction;
|
|
831
|
-
srtQry.sortBy(this.parent.grid.sortSettings.columns[parseInt(srt.toString(), 10)].field, compFun);
|
|
832
|
-
}
|
|
833
|
-
var modifiedData = new DataManager(parentData).executeLocal(srtQry);
|
|
834
|
-
if (this.parent.allowRowDragAndDrop && !isNullOrUndefined(this.parent.rowDragAndDropModule['draggedRecord']) &&
|
|
835
|
-
this.parent.rowDragAndDropModule['droppedRecord'].hasChildRecords && this.parent.rowDragAndDropModule['dropPosition'] !== 'middleSegment') {
|
|
836
|
-
var dragdIndex = modifiedData.indexOf(this.parent.rowDragAndDropModule['draggedRecord']);
|
|
837
|
-
modifiedData.splice(dragdIndex, 1);
|
|
838
|
-
var dropdIndex = modifiedData.indexOf(this.parent.rowDragAndDropModule['droppedRecord']);
|
|
839
|
-
if (this.parent.rowDragAndDropModule['droppedRecord'].hasChildRecords && this.parent.rowDragAndDropModule['dropPosition'] === 'topSegment') {
|
|
840
|
-
modifiedData.splice(dropdIndex, 0, this.parent.rowDragAndDropModule['draggedRecord']);
|
|
841
|
-
}
|
|
842
|
-
else if (this.parent.rowDragAndDropModule['dropPosition'] === 'bottomSegment') {
|
|
843
|
-
modifiedData.splice(dropdIndex + 1, 0, this.parent.rowDragAndDropModule['draggedRecord']);
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
var sortArgs = { modifiedData: modifiedData, filteredData: results, srtQry: srtQry };
|
|
847
|
-
this.parent.notify('createSort', sortArgs);
|
|
848
|
-
results = sortArgs.modifiedData;
|
|
817
|
+
results = this.parent.getData({ query: query, isSort: true });
|
|
849
818
|
this.dataResults.result = null;
|
|
850
819
|
this.sortedData = results;
|
|
851
820
|
this.parent.notify('updateModel', {});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat, RowSelectable } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs, AggregateQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor, Middlewares } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties, ActionEventArgs } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';import { ColumnChooserSettings } from '../models/column-chooser-settings';import { ColumnChooserSettingsModel } from '../models/column-chooser-settings-model';
|
|
1
|
+
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat, RowSelectable, LoadEventArgs, setEnableSeamlessScrolling } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs, AggregateQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor, Middlewares, QueryOptions, Predicate } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties, ActionEventArgs } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';import { ColumnChooserSettings } from '../models/column-chooser-settings';import { ColumnChooserSettingsModel } from '../models/column-chooser-settings-model';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -142,6 +142,8 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
142
142
|
isLocalData: boolean;
|
|
143
143
|
/** @hidden */
|
|
144
144
|
parentData: Object[];
|
|
145
|
+
/** @hidden */
|
|
146
|
+
enableSeamlessScrolling: boolean;
|
|
145
147
|
/**
|
|
146
148
|
* @hidden
|
|
147
149
|
*/
|
|
@@ -1490,6 +1492,38 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
1490
1492
|
private ignoreInArrays;
|
|
1491
1493
|
private ignoreInColumn;
|
|
1492
1494
|
private mouseClickHandler;
|
|
1495
|
+
/**
|
|
1496
|
+
* Retrieves all records that match the current search criteria and are sorted according to the active sort settings.
|
|
1497
|
+
*
|
|
1498
|
+
* This method processes the data source by applying search filters and sort operations,
|
|
1499
|
+
* returning the searched and sorted records excluding summary rows.
|
|
1500
|
+
*
|
|
1501
|
+
* @param {Object} args - Optional arguments object to control query execution behavior.
|
|
1502
|
+
* @param {Query} args.query - Optional custom Query object to override the default generated query.
|
|
1503
|
+
* @param {boolean} args.isFilter - Optional flag to include only filtered records without sorting (default: false).
|
|
1504
|
+
* @param {boolean} args.isSort - Optional flag to apply only sorting without filtering (default: false).
|
|
1505
|
+
*
|
|
1506
|
+
* @returns {ITreeData[]} - Array of searched and sorted TreeGrid records with summary rows excluded.
|
|
1507
|
+
* @hidden
|
|
1508
|
+
*/
|
|
1509
|
+
getData(args?: {
|
|
1510
|
+
query?: Query;
|
|
1511
|
+
isFilter?: boolean;
|
|
1512
|
+
isSort?: boolean;
|
|
1513
|
+
}): ITreeData[];
|
|
1514
|
+
/**
|
|
1515
|
+
* Retrieves the processed Tree Grid data based on current operations such as
|
|
1516
|
+
* sorting, filtering, and searching. Maintains hierarchy and current structure.
|
|
1517
|
+
*
|
|
1518
|
+
* For local data: when skipPage is true (the default), it returns all available records;
|
|
1519
|
+
* when skipPage is false, it returns only the records for the current page.
|
|
1520
|
+
* For remote data: it always returns only the records for the current page.
|
|
1521
|
+
*
|
|
1522
|
+
* @param {boolean} skipPage - if set to false, returns only the records for the current page.
|
|
1523
|
+
* @returns {ITreeData[]} - Array of tree records (summary rows excluded).
|
|
1524
|
+
* @hidden
|
|
1525
|
+
*/
|
|
1526
|
+
getProcessedRecords(skipPage?: boolean): ITreeData[];
|
|
1493
1527
|
/**
|
|
1494
1528
|
* Retrieves all the TreeGrid row elements.
|
|
1495
1529
|
*
|
|
@@ -21,7 +21,7 @@ import { Component, addClass, createElement, EventHandler, isNullOrUndefined, ex
|
|
|
21
21
|
import { removeClass, Complex, Collection, getValue } from '@syncfusion/ej2-base';
|
|
22
22
|
import { Event, Property, NotifyPropertyChanges, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';
|
|
23
23
|
import { Column } from '../models/column';
|
|
24
|
-
import { getNumberFormat } from '@syncfusion/ej2-grids';
|
|
24
|
+
import { getNumberFormat, setEnableSeamlessScrolling } from '@syncfusion/ej2-grids';
|
|
25
25
|
import { Freeze as FreezeColumn } from '@syncfusion/ej2-grids';
|
|
26
26
|
import { RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';
|
|
27
27
|
import { LoadingIndicator } from '../models/loading-indicator';
|
|
@@ -35,7 +35,7 @@ import * as events from '../base/constant';
|
|
|
35
35
|
import { SearchSettings } from '../models/search-settings';
|
|
36
36
|
import { SelectionSettings } from '../models/selection-settings';
|
|
37
37
|
import { getActualProperties, getObject } from '@syncfusion/ej2-grids';
|
|
38
|
-
import { DataManager, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';
|
|
38
|
+
import { DataManager, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor, Predicate } from '@syncfusion/ej2-data';
|
|
39
39
|
import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
40
40
|
import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';
|
|
41
41
|
import { Grid, Logger } from '@syncfusion/ej2-grids';
|
|
@@ -83,6 +83,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
83
83
|
_this.isComponentRefresh = false;
|
|
84
84
|
_this.isVirtualExpandCollapse = false;
|
|
85
85
|
_this.isInfiniteCollapse = false;
|
|
86
|
+
/** @hidden */
|
|
87
|
+
_this.enableSeamlessScrolling = false;
|
|
86
88
|
_this.objectEqualityChecker = function (old, current) {
|
|
87
89
|
if (old) {
|
|
88
90
|
var keys = Object.keys(old);
|
|
@@ -830,7 +832,15 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
830
832
|
this.renderModule = new Render(this);
|
|
831
833
|
this.dataModule = new DataManipulation(this);
|
|
832
834
|
this.printModule = new Print(this);
|
|
833
|
-
this.
|
|
835
|
+
if (this.enableVirtualization || this.enableColumnVirtualization) {
|
|
836
|
+
var args = { enableSeamlessScrolling: this.enableSeamlessScrolling };
|
|
837
|
+
this.trigger(events.load, args);
|
|
838
|
+
this.enableSeamlessScrolling = args.enableSeamlessScrolling;
|
|
839
|
+
setEnableSeamlessScrolling(this.enableSeamlessScrolling);
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
this.trigger(events.load);
|
|
843
|
+
}
|
|
834
844
|
this.autoGenerateColumns();
|
|
835
845
|
this.initialRender = true;
|
|
836
846
|
if (!isNullOrUndefined(this.dataSource)) {
|
|
@@ -1103,6 +1113,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1103
1113
|
this.grid.clipMode = getActualProperties(this.clipMode);
|
|
1104
1114
|
this.grid.enableColumnSpan = this.enableColumnSpan;
|
|
1105
1115
|
this.grid.enableRowSpan = this.enableRowSpan;
|
|
1116
|
+
this.grid.enableSeamlessScrolling = this.enableSeamlessScrolling;
|
|
1106
1117
|
var templateInstance = 'templateDotnetInstance';
|
|
1107
1118
|
this.grid["" + templateInstance] = this["" + templateInstance];
|
|
1108
1119
|
var isJsComponent = 'isJsComponent';
|
|
@@ -1580,7 +1591,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1580
1591
|
}
|
|
1581
1592
|
_this.notify('updateGridActions', args);
|
|
1582
1593
|
_this.isVirtualExpandCollapse = false;
|
|
1583
|
-
if (args.requestType === 'save' && _this.aggregates.
|
|
1594
|
+
if (args.requestType === 'save' && _this.aggregates.some(function (ag) { return ag.showChildSummary === true; })) {
|
|
1584
1595
|
_this.grid.refresh();
|
|
1585
1596
|
}
|
|
1586
1597
|
if ((args.action === 'clearFilter' || args.action === 'clear-filter' || args.requestType === 'sorting') && _this.enableInfiniteScrolling) {
|
|
@@ -2326,6 +2337,115 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2326
2337
|
}
|
|
2327
2338
|
}
|
|
2328
2339
|
};
|
|
2340
|
+
/**
|
|
2341
|
+
* Retrieves all records that match the current search criteria and are sorted according to the active sort settings.
|
|
2342
|
+
*
|
|
2343
|
+
* This method processes the data source by applying search filters and sort operations,
|
|
2344
|
+
* returning the searched and sorted records excluding summary rows.
|
|
2345
|
+
*
|
|
2346
|
+
* @param {Object} args - Optional arguments object to control query execution behavior.
|
|
2347
|
+
* @param {Query} args.query - Optional custom Query object to override the default generated query.
|
|
2348
|
+
* @param {boolean} args.isFilter - Optional flag to include only filtered records without sorting (default: false).
|
|
2349
|
+
* @param {boolean} args.isSort - Optional flag to apply only sorting without filtering (default: false).
|
|
2350
|
+
*
|
|
2351
|
+
* @returns {ITreeData[]} - Array of searched and sorted TreeGrid records with summary rows excluded.
|
|
2352
|
+
* @hidden
|
|
2353
|
+
*/
|
|
2354
|
+
TreeGrid.prototype.getData = function (args) {
|
|
2355
|
+
var dataObj = isCountRequired(this) ? getValue('result', this.grid.dataSource)
|
|
2356
|
+
: this.grid.dataSource;
|
|
2357
|
+
var results = dataObj instanceof DataManager ? dataObj.dataSource.json : dataObj;
|
|
2358
|
+
var gridQuery = (!isNullOrUndefined(args) && args.query) ? args.query : this.getDataModule().baseModule.generateQuery();
|
|
2359
|
+
var filterQuery;
|
|
2360
|
+
var searchQuery;
|
|
2361
|
+
if (!isNullOrUndefined(gridQuery)) {
|
|
2362
|
+
filterQuery = gridQuery.queries.filter(function (q) { return q.fn === 'onWhere'; });
|
|
2363
|
+
searchQuery = gridQuery.queries.filter(function (q) { return q.fn === 'onSearch'; });
|
|
2364
|
+
}
|
|
2365
|
+
var skipFilterSearch = (!isNullOrUndefined(args) && args.isSort);
|
|
2366
|
+
if (!skipFilterSearch && (this.grid.allowFiltering && this.grid.filterSettings.columns.length) ||
|
|
2367
|
+
(this.grid.searchSettings.key.length > 0) && (!isNullOrUndefined(gridQuery))
|
|
2368
|
+
|| ((filterQuery && filterQuery.length > 0) || (searchQuery && searchQuery.length > 0))) {
|
|
2369
|
+
var filterQuery_1 = gridQuery.queries.filter(function (q) { return q.fn === 'onWhere'; });
|
|
2370
|
+
var searchQuery_1 = gridQuery.queries.filter(function (q) { return q.fn === 'onSearch'; });
|
|
2371
|
+
var query = new Query();
|
|
2372
|
+
query.queries = filterQuery_1.concat(searchQuery_1);
|
|
2373
|
+
var filteredData = new DataManager(results).executeLocal(query);
|
|
2374
|
+
this.notify('updateFilterRecs', { data: filteredData });
|
|
2375
|
+
results = isRemoteData(this) ? this.dataResults : this.filterModule.filteredResult;
|
|
2376
|
+
if (!isNullOrUndefined(args) && args.isFilter) {
|
|
2377
|
+
return isRemoteData(this) ? results.result.filter(function (item) { return !item.isSummaryRow; })
|
|
2378
|
+
: results.filter(function (item) { return !item.isSummaryRow; });
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
var sortQuery = gridQuery.queries.filter(function (q) { return q.fn === 'onSortBy'; });
|
|
2382
|
+
if (this.grid.sortSettings.columns.length > 0 || sortQuery.length) {
|
|
2383
|
+
var parentData = this.parentData;
|
|
2384
|
+
var query = new Query();
|
|
2385
|
+
query.queries = sortQuery;
|
|
2386
|
+
var modifiedData = new DataManager(parentData).executeLocal(query);
|
|
2387
|
+
if (this.allowRowDragAndDrop && !isNullOrUndefined(this.rowDragAndDropModule['draggedRecord']) &&
|
|
2388
|
+
this.rowDragAndDropModule['droppedRecord'].hasChildRecords && this.rowDragAndDropModule['dropPosition'] !== 'middleSegment') {
|
|
2389
|
+
var dragdIndex = modifiedData.indexOf(this.rowDragAndDropModule['draggedRecord']);
|
|
2390
|
+
modifiedData.splice(dragdIndex, 1);
|
|
2391
|
+
var dropdIndex = modifiedData.indexOf(this.rowDragAndDropModule['droppedRecord']);
|
|
2392
|
+
if (this.rowDragAndDropModule['droppedRecord'].hasChildRecords && this.rowDragAndDropModule['dropPosition'] === 'topSegment') {
|
|
2393
|
+
modifiedData.splice(dropdIndex, 0, this.rowDragAndDropModule['draggedRecord']);
|
|
2394
|
+
}
|
|
2395
|
+
else if (this.rowDragAndDropModule['dropPosition'] === 'bottomSegment') {
|
|
2396
|
+
modifiedData.splice(dropdIndex + 1, 0, this.rowDragAndDropModule['draggedRecord']);
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
var sortArgs = { modifiedData: modifiedData, filteredData: results, srtQry: query };
|
|
2400
|
+
this.notify('createSort', sortArgs);
|
|
2401
|
+
results = isRemoteData(this) ? this.dataResults : sortArgs.modifiedData;
|
|
2402
|
+
}
|
|
2403
|
+
return isRemoteData(this) ? this.dataResults.result.filter(function (item) { return !item.isSummaryRow; })
|
|
2404
|
+
: results.filter(function (item) { return !item.isSummaryRow; });
|
|
2405
|
+
};
|
|
2406
|
+
/**
|
|
2407
|
+
* Retrieves the processed Tree Grid data based on current operations such as
|
|
2408
|
+
* sorting, filtering, and searching. Maintains hierarchy and current structure.
|
|
2409
|
+
*
|
|
2410
|
+
* For local data: when skipPage is true (the default), it returns all available records;
|
|
2411
|
+
* when skipPage is false, it returns only the records for the current page.
|
|
2412
|
+
* For remote data: it always returns only the records for the current page.
|
|
2413
|
+
*
|
|
2414
|
+
* @param {boolean} skipPage - if set to false, returns only the records for the current page.
|
|
2415
|
+
* @returns {ITreeData[]} - Array of tree records (summary rows excluded).
|
|
2416
|
+
* @hidden
|
|
2417
|
+
*/
|
|
2418
|
+
TreeGrid.prototype.getProcessedRecords = function (skipPage) {
|
|
2419
|
+
var _this = this;
|
|
2420
|
+
var result;
|
|
2421
|
+
if (skipPage !== true || isRemoteData(this)) {
|
|
2422
|
+
result = this.getData();
|
|
2423
|
+
var dm = new DataManager(result);
|
|
2424
|
+
var expanded = new Predicate('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
|
|
2425
|
+
var parents_1 = dm.executeLocal(new Query().where(expanded));
|
|
2426
|
+
var visualData = parents_1.filter(function (e) {
|
|
2427
|
+
return getExpandStatus(_this, e, parents_1);
|
|
2428
|
+
});
|
|
2429
|
+
var query = new Query();
|
|
2430
|
+
if (this.allowPaging || this.enableVirtualization || this.enableInfiniteScrolling) {
|
|
2431
|
+
var pageSize = this.grid.pageSettings.pageSize;
|
|
2432
|
+
var currentPage = this.grid.pageSettings.currentPage;
|
|
2433
|
+
if (visualData.length < (currentPage * pageSize)) {
|
|
2434
|
+
currentPage = (Math.floor(visualData.length / pageSize)) + ((visualData.length % pageSize) ? 1 : 0);
|
|
2435
|
+
currentPage = currentPage ? currentPage : 1;
|
|
2436
|
+
this.grid.setProperties({ pageSettings: { currentPage: currentPage } }, true);
|
|
2437
|
+
}
|
|
2438
|
+
var skip = pageSize * (currentPage - 1);
|
|
2439
|
+
query = query.skip(skip).take(pageSize);
|
|
2440
|
+
}
|
|
2441
|
+
dm.dataSource.json = visualData;
|
|
2442
|
+
result = dm.executeLocal(query);
|
|
2443
|
+
}
|
|
2444
|
+
else {
|
|
2445
|
+
result = this.getData();
|
|
2446
|
+
}
|
|
2447
|
+
return result;
|
|
2448
|
+
};
|
|
2329
2449
|
/**
|
|
2330
2450
|
* Retrieves all the TreeGrid row elements.
|
|
2331
2451
|
*
|
|
@@ -96,6 +96,7 @@ export declare class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
96
96
|
* @returns {void}
|
|
97
97
|
*/
|
|
98
98
|
private cellFocus;
|
|
99
|
+
private updateScrollbar;
|
|
99
100
|
/**
|
|
100
101
|
* Handles the data ready event for the virtual tree grid content renderer.
|
|
101
102
|
*
|
|
@@ -317,16 +318,14 @@ export declare class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
317
318
|
* @returns {void}
|
|
318
319
|
*/
|
|
319
320
|
removeEventListener(): void;
|
|
321
|
+
destroy(): void;
|
|
320
322
|
}
|
|
321
323
|
export declare class TreeInterSectionObserver extends InterSectionObserver {
|
|
322
324
|
private isWheeling;
|
|
323
325
|
private newPos;
|
|
324
326
|
private lastPos;
|
|
325
327
|
private timer;
|
|
326
|
-
private
|
|
327
|
-
private movableContainerEl;
|
|
328
|
-
private containerScrollHandler;
|
|
329
|
-
private movableScrollHandler;
|
|
328
|
+
private onWheelEvent;
|
|
330
329
|
/**
|
|
331
330
|
* Sets up observers to monitor scroll events on a given container
|
|
332
331
|
* and its movable companion within a virtual grid setup.
|
|
@@ -337,7 +336,7 @@ export declare class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
337
336
|
* @returns {void}
|
|
338
337
|
*/
|
|
339
338
|
observes(callback: Function, onEnterCallback: Function, instance: IGrid): void;
|
|
340
|
-
|
|
339
|
+
private onVirtualContentScrolling;
|
|
341
340
|
/**
|
|
342
341
|
* Clears the last known position.
|
|
343
342
|
*
|
|
@@ -188,7 +188,11 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
188
188
|
&& this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
|
|
189
189
|
this.parent["" + action]('data-ready', this.onDataReady, this);
|
|
190
190
|
this.parent["" + action]('refresh-virtual-block', this.refreshContentRows, this);
|
|
191
|
+
this.parent.on(events.destroy, this.destroy, this);
|
|
191
192
|
this.fn = function () {
|
|
193
|
+
if (_this.parent.root.enableSeamlessScrolling) {
|
|
194
|
+
window.addEventListener('resize', _this.updateScrollbar.bind(_this));
|
|
195
|
+
}
|
|
192
196
|
_this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction(), _this.parent);
|
|
193
197
|
var gObj = _this.parent;
|
|
194
198
|
if (gObj.root.enablePersistence && gObj.root.scrollPosition) {
|
|
@@ -238,6 +242,10 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
238
242
|
var virtualCellFocus = 'virtualCellFocus';
|
|
239
243
|
_super.prototype["" + virtualCellFocus].call(this, e);
|
|
240
244
|
};
|
|
245
|
+
VirtualTreeContentRenderer.prototype.updateScrollbar = function () {
|
|
246
|
+
var updateScrollbarOnResize = 'updateScrollbarOnResize';
|
|
247
|
+
_super.prototype["" + updateScrollbarOnResize].call(this);
|
|
248
|
+
};
|
|
241
249
|
/**
|
|
242
250
|
* Handles the data ready event for the virtual tree grid content renderer.
|
|
243
251
|
*
|
|
@@ -278,9 +286,6 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
278
286
|
_super.prototype.renderTable.call(this);
|
|
279
287
|
if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
280
288
|
&& this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
|
|
281
|
-
if (this.observers) {
|
|
282
|
-
this.observers.disconnect();
|
|
283
|
-
}
|
|
284
289
|
getValue('observer', this).options.debounceEvent = false;
|
|
285
290
|
this.observers = new TreeInterSectionObserver(getValue('observer', this).element, getValue('observer', this).options);
|
|
286
291
|
this.contents = this.getPanel().firstChild;
|
|
@@ -361,7 +366,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
361
366
|
}
|
|
362
367
|
var treeGridParent = this.parent.clipboardModule['treeGridParent'];
|
|
363
368
|
if (isNullOrUndefined(treeGridParent.editModule) ||
|
|
364
|
-
isNullOrUndefined(treeGridParent.editModule['addRowIndex']) || args.selectedIndex !==
|
|
369
|
+
isNullOrUndefined(treeGridParent.editModule['addRowIndex']) || args.selectedIndex !== -1) {
|
|
365
370
|
if (!isNullOrUndefined(treeGridParent.grid.sortModule) && treeGridParent.grid.sortModule['sortedColumns'].length > 0) {
|
|
366
371
|
var sortedData = treeGridParent.dataModule['sortedData'];
|
|
367
372
|
if (!isNullOrUndefined(sortedData) && sortedData.length > 0) {
|
|
@@ -661,16 +666,28 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
661
666
|
var maxLeft = _this.vgenerator.cOffsets[idx - 1];
|
|
662
667
|
x = x > maxLeft ? maxLeft : x; //TODO: This fix horizontal scrollbar jumping issue in column virtualization.
|
|
663
668
|
}
|
|
664
|
-
var
|
|
669
|
+
var isRowScrollAction = _this.prevInfo && _this.prevInfo.page === 1 &&
|
|
670
|
+
(direction !== _this.prevInfo.direction || direction !== _this.prevInfo.direction);
|
|
671
|
+
var translateY = _this.getTranslateY(e.top, height, xAxis && top_1 === e.top ? _this.prevInfo : undefined, isRowScrollAction ? false : true);
|
|
665
672
|
if (!_this.parent.isFrozenGrid() || _this.parent.enableVirtualMaskRow) {
|
|
666
673
|
if (_this.parent.enableVirtualMaskRow) {
|
|
667
674
|
var upScroll = (e.top - _this.translateY) < 0;
|
|
668
|
-
|
|
669
|
-
_this.virtualEle.adjustTable(x,
|
|
675
|
+
translateY = (Math.round(_this.translateY) > translateY && !upScroll) ? Math.round(_this.translateY) : translateY;
|
|
676
|
+
_this.virtualEle.adjustTable(x, translateY);
|
|
670
677
|
}
|
|
671
678
|
else {
|
|
672
679
|
_this.virtualEle.adjustTable(x, _this.translateY);
|
|
673
680
|
}
|
|
681
|
+
var wrapperBottom = _this.virtualEle.wrapper.getBoundingClientRect().bottom;
|
|
682
|
+
var contentBottom = _this.virtualEle.content.getBoundingClientRect().bottom;
|
|
683
|
+
if (direction === 'up' && _this.prevInfo.page === Math.ceil(_this.getTotalBlocks() / 2) &&
|
|
684
|
+
Math.round(wrapperBottom) < Math.round(contentBottom)) {
|
|
685
|
+
var bottomGap = Math.round(contentBottom) - Math.round(wrapperBottom);
|
|
686
|
+
var adjustedTranslateY = Math.min(translateY + bottomGap, _this.offsets[_this['maxBlock']]);
|
|
687
|
+
if (adjustedTranslateY !== translateY) {
|
|
688
|
+
_this.virtualEle.adjustTable(x, adjustedTranslateY);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
674
691
|
if (_this.parent.enableColumnVirtualization) {
|
|
675
692
|
_this.header.virtualEle.adjustTable(x, 0);
|
|
676
693
|
if (_this.parent.isFrozenGrid()) {
|
|
@@ -999,10 +1016,17 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
999
1016
|
this.parent.off('refresh-virtual-editform-cells', this.refreshCell);
|
|
1000
1017
|
this.parent.off('virtaul-cell-focus', this.cellFocus);
|
|
1001
1018
|
this.parent.off('virtual-scroll-edit', this.restoreEditState);
|
|
1002
|
-
|
|
1003
|
-
|
|
1019
|
+
this.parent.off(events.destroy, this.destroy);
|
|
1020
|
+
if (this.parent.root.enableSeamlessScrolling) {
|
|
1021
|
+
window.removeEventListener('resize', this.updateScrollbar);
|
|
1004
1022
|
}
|
|
1005
1023
|
};
|
|
1024
|
+
VirtualTreeContentRenderer.prototype.destroy = function () {
|
|
1025
|
+
if (this.parent.isDestroyed) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
this.removeEventListener();
|
|
1029
|
+
};
|
|
1006
1030
|
return VirtualTreeContentRenderer;
|
|
1007
1031
|
}(VirtualContentRenderer));
|
|
1008
1032
|
export { VirtualTreeContentRenderer };
|
|
@@ -1016,6 +1040,9 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
|
|
|
1016
1040
|
_this.timer = 0;
|
|
1017
1041
|
return _this;
|
|
1018
1042
|
}
|
|
1043
|
+
TreeInterSectionObserver.prototype.onWheelEvent = function () {
|
|
1044
|
+
this.isWheeling = true;
|
|
1045
|
+
};
|
|
1019
1046
|
/**
|
|
1020
1047
|
* Sets up observers to monitor scroll events on a given container
|
|
1021
1048
|
* and its movable companion within a virtual grid setup.
|
|
@@ -1028,28 +1055,28 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
|
|
|
1028
1055
|
TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback, instance) {
|
|
1029
1056
|
var containerRect = 'containerRect';
|
|
1030
1057
|
_super.prototype["" + containerRect] = getValue('options', this).container.getBoundingClientRect();
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
_super.prototype["" + movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
|
|
1037
|
-
this.movableContainerEl = getValue('options', this).movableContainer;
|
|
1038
|
-
this.movableScrollHandler = this.virtualScrollHandlers(callback, onEnterCallback, instance);
|
|
1039
|
-
EventHandler.add(this.movableContainerEl, 'scroll', this.movableScrollHandler, this);
|
|
1058
|
+
var options = getValue('options', this);
|
|
1059
|
+
EventHandler.add(options.container, 'wheel', this.onWheelEvent, this);
|
|
1060
|
+
if (!isNullOrUndefined(options.horizontalScrollbar)) {
|
|
1061
|
+
EventHandler.add(options.horizontalScrollbar, 'wheel', this.onWheelEvent, this);
|
|
1062
|
+
EventHandler.add(options.horizontalScrollbar, 'scroll', this.onVirtualContentScrolling(), this);
|
|
1040
1063
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
EventHandler.remove(this.containerEl, 'scroll', this.containerScrollHandler);
|
|
1045
|
-
this.containerScrollHandler = null;
|
|
1046
|
-
}
|
|
1047
|
-
if (this.movableContainerEl && this.movableScrollHandler) {
|
|
1048
|
-
EventHandler.remove(this.movableContainerEl, 'scroll', this.movableScrollHandler);
|
|
1049
|
-
this.movableScrollHandler = null;
|
|
1064
|
+
if (!isNullOrUndefined(options.verticalScrollbar)) {
|
|
1065
|
+
EventHandler.add(options.verticalScrollbar, 'wheel', this.onWheelEvent, this);
|
|
1066
|
+
EventHandler.add(options.verticalScrollbar, 'scroll', this.onVirtualContentScrolling(), this);
|
|
1050
1067
|
}
|
|
1051
|
-
this.
|
|
1052
|
-
|
|
1068
|
+
EventHandler.add(options.container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
|
|
1069
|
+
};
|
|
1070
|
+
TreeInterSectionObserver.prototype.onVirtualContentScrolling = function () {
|
|
1071
|
+
var _this = this;
|
|
1072
|
+
return function (e) {
|
|
1073
|
+
if (e.target.classList.contains('e-virtual-vertical-scrollbar')) {
|
|
1074
|
+
getValue('options', _this).container.scrollTop = e.target.scrollTop;
|
|
1075
|
+
}
|
|
1076
|
+
if (e.target.classList.contains('e-virtual-horizontal-scrollbar')) {
|
|
1077
|
+
getValue('options', _this).container.scrollLeft = e.target.scrollLeft;
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1053
1080
|
};
|
|
1054
1081
|
/**
|
|
1055
1082
|
* Clears the last known position.
|
|
@@ -1095,6 +1122,12 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
|
|
|
1095
1122
|
direction = _this["" + options].prevLeft === left ? direction : _this["" + options].prevLeft < left ? 'right' : 'left';
|
|
1096
1123
|
_this["" + options].prevTop = top;
|
|
1097
1124
|
_this["" + options].prevLeft = left;
|
|
1125
|
+
if (!isNullOrUndefined(_this["" + options].verticalScrollbar)) {
|
|
1126
|
+
_this["" + options].verticalScrollbar.scrollTop = _this["" + options].container.scrollTop;
|
|
1127
|
+
}
|
|
1128
|
+
if (!isNullOrUndefined(_this["" + options].horizontalScrollbar)) {
|
|
1129
|
+
_this["" + options].horizontalScrollbar.scrollLeft = _this["" + options].container.scrollLeft;
|
|
1130
|
+
}
|
|
1098
1131
|
var current = _this.sentinelInfo["" + direction];
|
|
1099
1132
|
var delta = 0;
|
|
1100
1133
|
_this.newPos = top;
|
package/styles/fluent2.css
CHANGED
|
@@ -311,11 +311,11 @@
|
|
|
311
311
|
/* stylelint-disable */
|
|
312
312
|
.e-treegrid .e-indent::before,
|
|
313
313
|
.e-grid-menu .e-indent::before {
|
|
314
|
-
content: "\
|
|
314
|
+
content: "\e810";
|
|
315
315
|
}
|
|
316
316
|
.e-treegrid .e-outdent::before,
|
|
317
317
|
.e-grid-menu .e-outdent::before {
|
|
318
|
-
content: "\
|
|
318
|
+
content: "\e72a";
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.e-treegrid .e-toolbar-item .e-expand::before {
|
|
@@ -311,11 +311,11 @@
|
|
|
311
311
|
/* stylelint-disable */
|
|
312
312
|
.e-treegrid .e-indent::before,
|
|
313
313
|
.e-grid-menu .e-indent::before {
|
|
314
|
-
content: "\
|
|
314
|
+
content: "\e810";
|
|
315
315
|
}
|
|
316
316
|
.e-treegrid .e-outdent::before,
|
|
317
317
|
.e-grid-menu .e-outdent::before {
|
|
318
|
-
content: "\
|
|
318
|
+
content: "\e72a";
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.e-treegrid .e-toolbar-item .e-expand::before {
|
|
@@ -313,11 +313,11 @@
|
|
|
313
313
|
/* stylelint-disable */
|
|
314
314
|
.e-treegrid .e-indent::before,
|
|
315
315
|
.e-grid-menu .e-indent::before {
|
|
316
|
-
content: "\
|
|
316
|
+
content: "\e810";
|
|
317
317
|
}
|
|
318
318
|
.e-treegrid .e-outdent::before,
|
|
319
319
|
.e-grid-menu .e-outdent::before {
|
|
320
|
-
content: "\
|
|
320
|
+
content: "\e72a";
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
.e-treegrid .e-toolbar-item .e-expand::before {
|