@syncfusion/ej2-treegrid 20.4.49 → 21.1.35
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/CHANGELOG.md +1 -36
- 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 +45 -18
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +44 -17
- 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 +10 -10
- package/src/treegrid/actions/batch-edit.js +3 -3
- package/src/treegrid/actions/freeze-column.js +4 -5
- package/src/treegrid/actions/rowdragdrop.js +3 -2
- package/src/treegrid/base/data.js +2 -2
- package/src/treegrid/base/treegrid-model.d.ts +26 -15
- package/src/treegrid/base/treegrid.d.ts +32 -14
- package/src/treegrid/base/treegrid.js +32 -5
- package/src/treegrid/enum.d.ts +79 -138
- package/src/treegrid/models/column.d.ts +5 -3
- package/src/treegrid/models/edit-settings-model.d.ts +13 -9
- package/src/treegrid/models/edit-settings.d.ts +13 -9
- package/src/treegrid/models/filter-settings-model.d.ts +13 -8
- package/src/treegrid/models/filter-settings.d.ts +13 -8
- package/src/treegrid/models/loading-indicator-model.d.ts +4 -2
- package/src/treegrid/models/loading-indicator.d.ts +4 -2
- package/src/treegrid/models/search-settings-model.d.ts +9 -3
- package/src/treegrid/models/search-settings.d.ts +9 -3
- package/src/treegrid/models/selection-settings-model.d.ts +17 -8
- package/src/treegrid/models/selection-settings.d.ts +17 -8
- package/src/treegrid/renderer/render.js +1 -1
- package/styles/bootstrap-dark.css +2 -8
- package/styles/highcontrast-light.css +2 -8
- package/styles/treegrid/_bootstrap5-definition.scss +2 -2
- package/styles/treegrid/_fluent-definition.scss +2 -2
- package/styles/treegrid/_tailwind-definition.scss +2 -2
- package/styles/treegrid/bootstrap-dark.css +2 -8
- package/styles/treegrid/highcontrast-light.css +2 -8
- package/styles/treegrid/_material3-definition.scss +0 -28
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 21.1.35
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-treegrid@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-treegrid@20.
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@20.10.6",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-LwZ8Bk/n3qJ/XPtP5s+q96/nhnVitf0eG8bFH4vsCs7NOwgWv4QZFvRxCjhmkcJ8dkHERj63RQtJ5/UxWx2hlQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"/@syncfusion/ej2-react-treegrid",
|
|
25
25
|
"/@syncfusion/ej2-vue-treegrid"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.10.6.tgz",
|
|
28
|
+
"_shasum": "434d8ed4a3b80e39087ce9dcccd315ad607091ad",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
|
-
"_where": "/jenkins/workspace/
|
|
30
|
+
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Syncfusion Inc."
|
|
33
33
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~
|
|
40
|
-
"@syncfusion/ej2-data": "~
|
|
41
|
-
"@syncfusion/ej2-grids": "~
|
|
42
|
-
"@syncfusion/ej2-popups": "~
|
|
39
|
+
"@syncfusion/ej2-base": "~21.1.35",
|
|
40
|
+
"@syncfusion/ej2-data": "~21.1.35",
|
|
41
|
+
"@syncfusion/ej2-grids": "~21.1.35",
|
|
42
|
+
"@syncfusion/ej2-popups": "~21.1.35"
|
|
43
43
|
},
|
|
44
44
|
"deprecated": false,
|
|
45
45
|
"description": "Essential JS 2 TreeGrid Component",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
67
67
|
},
|
|
68
68
|
"typings": "index.d.ts",
|
|
69
|
-
"version": "
|
|
69
|
+
"version": "21.1.35",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -107,7 +107,7 @@ var BatchEdit = /** @class */ (function () {
|
|
|
107
107
|
this.batchAddedRecords = this.batchRecords = this.batchAddRowRecord = this.batchDeletedRecords = this.currentViewRecords = [];
|
|
108
108
|
};
|
|
109
109
|
BatchEdit.prototype.cellSaved = function (args) {
|
|
110
|
-
var actualCellIndex = args.
|
|
110
|
+
var actualCellIndex = args.column.index;
|
|
111
111
|
var frozenCols = this.parent.frozenColumns || this.parent.getFrozenColumns();
|
|
112
112
|
if (frozenCols && args.columnObject.index > frozenCols) {
|
|
113
113
|
actualCellIndex = actualCellIndex + frozenCols;
|
|
@@ -118,13 +118,13 @@ var BatchEdit = /** @class */ (function () {
|
|
|
118
118
|
var colCount = this.parent.getFrozenLeftColumnsCount() + actualCellIndex;
|
|
119
119
|
if (colCount === this.parent.treeColumnIndex) {
|
|
120
120
|
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
121
|
-
column: this.parent.grid.getColumnByIndex(args.
|
|
121
|
+
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
else if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
126
126
|
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
127
|
-
column: this.parent.grid.getColumnByIndex(args.
|
|
127
|
+
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
if (this.isAdd && this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.newRowPosition !== 'Bottom') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer,
|
|
1
|
+
import { ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, FreezeRender, parentsUntil, RenderType } from '@syncfusion/ej2-grids';
|
|
2
2
|
import { Grid, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { addClass, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
4
4
|
import { ColumnVirtualTreeFreezeRenderer, VirtualTreeFreezeRenderer, VirtualTreeFreezeHdrRenderer } from '../renderer/virtual-tree-freeze-render';
|
|
@@ -48,10 +48,6 @@ var Freeze = /** @class */ (function () {
|
|
|
48
48
|
getValue('addRenderer', renderer)
|
|
49
49
|
.apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
50
50
|
}
|
|
51
|
-
else {
|
|
52
|
-
getValue('addRenderer', renderer)
|
|
53
|
-
.apply(renderer, [RenderType.Content, new FreezeContentRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
54
|
-
}
|
|
55
51
|
}
|
|
56
52
|
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
|
|
57
53
|
getValue('addRenderer', renderer)
|
|
@@ -93,6 +89,9 @@ var Freeze = /** @class */ (function () {
|
|
|
93
89
|
row.style.height = row.parentElement.firstElementChild.clientHeight + 'px';
|
|
94
90
|
}
|
|
95
91
|
row.style.display = args.action;
|
|
92
|
+
if (freeze && frozenRightRows.length) {
|
|
93
|
+
frozenRightRows[parseInt(i.toString(), 10)].style.display = args.action;
|
|
94
|
+
}
|
|
96
95
|
var queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
|
|
97
96
|
: '.e-treecolumn-container .e-treegridexpand';
|
|
98
97
|
if (frozenrows[row.rowIndex].querySelector(queryselector)) {
|
|
@@ -590,6 +590,7 @@ var RowDD = /** @class */ (function () {
|
|
|
590
590
|
RowDD.prototype.addErrorElem = function () {
|
|
591
591
|
var dragelem = document.getElementsByClassName('e-cloneproperties')[0];
|
|
592
592
|
var errorelem = dragelem.querySelectorAll('.e-errorelem').length;
|
|
593
|
+
var sanitize = 'sanitize';
|
|
593
594
|
if (!errorelem && !this.parent.rowDropSettings.targetID) {
|
|
594
595
|
var ele = document.createElement('div');
|
|
595
596
|
classList(ele, ['e-errorcontainer'], []);
|
|
@@ -597,14 +598,14 @@ var RowDD = /** @class */ (function () {
|
|
|
597
598
|
var errorVal = dragelem.querySelector('.errorValue');
|
|
598
599
|
var content = dragelem.querySelector('.e-rowcell').innerHTML;
|
|
599
600
|
if (errorVal) {
|
|
600
|
-
content = errorVal.innerHTML;
|
|
601
|
+
content = this.parent["" + sanitize](errorVal.innerHTML);
|
|
601
602
|
errorVal.parentNode.removeChild(errorVal);
|
|
602
603
|
}
|
|
603
604
|
dragelem.querySelector('.e-rowcell').innerHTML = '';
|
|
604
605
|
var spanContent = document.createElement('span');
|
|
605
606
|
spanContent.className = 'errorValue';
|
|
606
607
|
spanContent.style.paddingLeft = '16px';
|
|
607
|
-
spanContent.innerHTML = content;
|
|
608
|
+
spanContent.innerHTML = this.parent["" + sanitize](content);
|
|
608
609
|
dragelem.querySelector('.e-rowcell').appendChild(ele);
|
|
609
610
|
dragelem.querySelector('.e-rowcell').appendChild(spanContent);
|
|
610
611
|
var dropItemSpan = document.querySelector('.e-dropitemscount');
|
|
@@ -342,13 +342,13 @@ var DataManipulation = /** @class */ (function () {
|
|
|
342
342
|
if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
|
|
343
343
|
qry.take(this.parent.pageSettings.pageSize);
|
|
344
344
|
var expandDetail = [];
|
|
345
|
-
expandDetail.push('ExpandingAction', rowDetails.record[this.parent.idMapping]);
|
|
345
|
+
expandDetail.push('ExpandingAction', parseInt(rowDetails.record[this.parent.idMapping], 10).toString());
|
|
346
346
|
qry.expand(expandDetail);
|
|
347
347
|
}
|
|
348
348
|
else if (this.parent.enableVirtualization && rowDetails.action === 'collapse') {
|
|
349
349
|
qry.take(this.parent.grid.pageSettings.pageSize);
|
|
350
350
|
var expandDetail = [];
|
|
351
|
-
expandDetail.push('CollapsingAction', rowDetails.record[this.parent.idMapping]);
|
|
351
|
+
expandDetail.push('CollapsingAction', parseInt(rowDetails.record[this.parent.idMapping], 10).toString());
|
|
352
352
|
qry.expand(expandDetail);
|
|
353
353
|
}
|
|
354
354
|
qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend, merge} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } 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 } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { ActionEventArgs, 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 } 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 } 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 } 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';
|
|
1
|
+
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } 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 } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { ActionEventArgs, 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 } 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 } 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 } 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';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -22,11 +22,12 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Defines the mode of clip. The available modes are,
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* ```props
|
|
26
|
+
* * Clip :- Truncates the cell content when it overflows its area.
|
|
27
|
+
* * Ellipsis :- Displays ellipsis when the cell content overflows its area.
|
|
28
|
+
* * EllipsisWithTooltip :- Displays ellipsis when the cell content overflows its area,
|
|
29
|
+
* ```
|
|
30
|
+
* also it will display the tooltip while hover on ellipsis is applied.
|
|
30
31
|
* @default Syncfusion.EJ2.Grids.ClipMode.Ellipsis
|
|
31
32
|
* @aspType Syncfusion.EJ2.Grids.ClipMode
|
|
32
33
|
* @isEnumeration true
|
|
@@ -126,9 +127,10 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
129
|
* Defines the print modes. The available print modes are
|
|
129
|
-
*
|
|
130
|
-
* *
|
|
131
|
-
*
|
|
130
|
+
* ```props
|
|
131
|
+
* * AllPages :- Prints all pages of the TreeGrid.
|
|
132
|
+
* * CurrentPage :- Prints the current page of the TreeGrid.
|
|
133
|
+
* ```
|
|
132
134
|
* @default Syncfusion.EJ2.Grids.PrintMode.AllPages
|
|
133
135
|
* @isEnumeration true
|
|
134
136
|
* @aspType Syncfusion.EJ2.Grids.PrintMode
|
|
@@ -320,12 +322,13 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
320
322
|
|
|
321
323
|
/**
|
|
322
324
|
* Defines the mode of TreeGrid lines. The available modes are,
|
|
323
|
-
*
|
|
324
|
-
* *
|
|
325
|
-
* *
|
|
326
|
-
* *
|
|
327
|
-
* *
|
|
328
|
-
*
|
|
325
|
+
* ```props
|
|
326
|
+
* * Both :- Displays both horizontal and vertical TreeGrid lines.
|
|
327
|
+
* * None :- No TreeGrid lines are displayed.
|
|
328
|
+
* * Horizontal :- Displays the horizontal TreeGrid lines only.
|
|
329
|
+
* * Vertical :- Displays the vertical TreeGrid lines only.
|
|
330
|
+
* * Default :- Displays TreeGrid lines based on the theme.
|
|
331
|
+
* ```
|
|
329
332
|
* @default Syncfusion.EJ2.Grids.GridLine.Default
|
|
330
333
|
* @isEnumeration true
|
|
331
334
|
* @aspType Syncfusion.EJ2.Grids.GridLine
|
|
@@ -501,6 +504,14 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
501
504
|
*/
|
|
502
505
|
enableColumnVirtualization?: boolean;
|
|
503
506
|
|
|
507
|
+
/**
|
|
508
|
+
* Specifies whether to display or remove the untrusted HTML values in the TreeGrid component.
|
|
509
|
+
* If `enableHtmlSanitizer` set to true, then it will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
510
|
+
*
|
|
511
|
+
* @default false
|
|
512
|
+
*/
|
|
513
|
+
enableHtmlSanitizer?: boolean;
|
|
514
|
+
|
|
504
515
|
/**
|
|
505
516
|
* If `enableInfiniteScrolling` set to true, then the data will be loaded in TreeGrid when the scrollbar reaches the end.
|
|
506
517
|
* This helps to load large dataset in TreeGrid.
|
|
@@ -168,11 +168,12 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
168
168
|
frozenColumns: number;
|
|
169
169
|
/**
|
|
170
170
|
* Defines the mode of clip. The available modes are,
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
171
|
+
* ```props
|
|
172
|
+
* * Clip :- Truncates the cell content when it overflows its area.
|
|
173
|
+
* * Ellipsis :- Displays ellipsis when the cell content overflows its area.
|
|
174
|
+
* * EllipsisWithTooltip :- Displays ellipsis when the cell content overflows its area,
|
|
175
|
+
* ```
|
|
176
|
+
* also it will display the tooltip while hover on ellipsis is applied.
|
|
176
177
|
* @default Syncfusion.EJ2.Grids.ClipMode.Ellipsis
|
|
177
178
|
* @aspType Syncfusion.EJ2.Grids.ClipMode
|
|
178
179
|
* @isEnumeration true
|
|
@@ -286,9 +287,10 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
286
287
|
cloneQuery: Query;
|
|
287
288
|
/**
|
|
288
289
|
* Defines the print modes. The available print modes are
|
|
289
|
-
*
|
|
290
|
-
* *
|
|
291
|
-
*
|
|
290
|
+
* ```props
|
|
291
|
+
* * AllPages :- Prints all pages of the TreeGrid.
|
|
292
|
+
* * CurrentPage :- Prints the current page of the TreeGrid.
|
|
293
|
+
* ```
|
|
292
294
|
* @default Syncfusion.EJ2.Grids.PrintMode.AllPages
|
|
293
295
|
* @isEnumeration true
|
|
294
296
|
* @aspType Syncfusion.EJ2.Grids.PrintMode
|
|
@@ -456,12 +458,13 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
456
458
|
toolbarTemplate: string;
|
|
457
459
|
/**
|
|
458
460
|
* Defines the mode of TreeGrid lines. The available modes are,
|
|
459
|
-
*
|
|
460
|
-
* *
|
|
461
|
-
* *
|
|
462
|
-
* *
|
|
463
|
-
* *
|
|
464
|
-
*
|
|
461
|
+
* ```props
|
|
462
|
+
* * Both :- Displays both horizontal and vertical TreeGrid lines.
|
|
463
|
+
* * None :- No TreeGrid lines are displayed.
|
|
464
|
+
* * Horizontal :- Displays the horizontal TreeGrid lines only.
|
|
465
|
+
* * Vertical :- Displays the vertical TreeGrid lines only.
|
|
466
|
+
* * Default :- Displays TreeGrid lines based on the theme.
|
|
467
|
+
* ```
|
|
465
468
|
* @default Syncfusion.EJ2.Grids.GridLine.Default
|
|
466
469
|
* @isEnumeration true
|
|
467
470
|
* @aspType Syncfusion.EJ2.Grids.GridLine
|
|
@@ -619,6 +622,13 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
619
622
|
* @default false
|
|
620
623
|
*/
|
|
621
624
|
enableColumnVirtualization: boolean;
|
|
625
|
+
/**
|
|
626
|
+
* Specifies whether to display or remove the untrusted HTML values in the TreeGrid component.
|
|
627
|
+
* If `enableHtmlSanitizer` set to true, then it will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
628
|
+
*
|
|
629
|
+
* @default false
|
|
630
|
+
*/
|
|
631
|
+
enableHtmlSanitizer: boolean;
|
|
622
632
|
/**
|
|
623
633
|
* If `enableInfiniteScrolling` set to true, then the data will be loaded in TreeGrid when the scrollbar reaches the end.
|
|
624
634
|
* This helps to load large dataset in TreeGrid.
|
|
@@ -1777,6 +1787,14 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
1777
1787
|
private updateAltRow;
|
|
1778
1788
|
private treeColumnRowTemplate;
|
|
1779
1789
|
private collapseRemoteChild;
|
|
1790
|
+
/**
|
|
1791
|
+
* Method to sanitize html element
|
|
1792
|
+
*
|
|
1793
|
+
* @param {any} value - Specifies the html value to sanitize
|
|
1794
|
+
* @returns {any} Returns the sanitized html value
|
|
1795
|
+
* @hidden
|
|
1796
|
+
*/
|
|
1797
|
+
private sanitize;
|
|
1780
1798
|
/**
|
|
1781
1799
|
* Updates the rows and cells
|
|
1782
1800
|
*
|
|
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
|
-
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, extend, merge } from '@syncfusion/ej2-base';
|
|
20
|
+
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, extend, merge, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
|
|
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';
|
|
@@ -589,6 +589,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
589
589
|
}
|
|
590
590
|
if (this.isVue) {
|
|
591
591
|
this.grid.isVue = true;
|
|
592
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
593
|
+
this.grid.vueInstance = this.vueInstance;
|
|
592
594
|
}
|
|
593
595
|
createSpinner({ target: this.element }, this.createElement);
|
|
594
596
|
this.log(['mapping_fields_missing']);
|
|
@@ -753,6 +755,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
753
755
|
this.grid["" + templateInstance] = this["" + templateInstance];
|
|
754
756
|
var isJsComponent = 'isJsComponent';
|
|
755
757
|
this.grid["" + isJsComponent] = true;
|
|
758
|
+
var enableHtmlSanitizer = 'enableHtmlSanitizer';
|
|
759
|
+
this.grid["" + enableHtmlSanitizer] = this.enableHtmlSanitizer;
|
|
756
760
|
};
|
|
757
761
|
TreeGrid.prototype.triggerEvents = function (args) {
|
|
758
762
|
this.trigger(getObject('name', args), args);
|
|
@@ -2255,15 +2259,21 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2255
2259
|
if (this.grid.columns.length !== this.columnModel.length) {
|
|
2256
2260
|
this.stackedHeader = true;
|
|
2257
2261
|
}
|
|
2258
|
-
if (this.stackedHeader && this.
|
|
2262
|
+
if (this.stackedHeader && this.allowResizing) {
|
|
2259
2263
|
for (var i = 0; i < this.columns.length; i++) {
|
|
2260
2264
|
if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].columns)) {
|
|
2261
2265
|
for (var j = 0; j < this.columns[parseInt(i.toString(), 10)].columns.length; j++) {
|
|
2262
|
-
var stackedColumn = this.columns[parseInt(i.toString(), 10)]
|
|
2266
|
+
var stackedColumn = this.columns[parseInt(i.toString(), 10)]
|
|
2267
|
+
.columns[parseInt(j.toString(), 10)];
|
|
2263
2268
|
var currentColumn = this.grid.getColumnByField(stackedColumn.field);
|
|
2264
2269
|
stackedColumn.width = currentColumn.width;
|
|
2265
2270
|
}
|
|
2266
2271
|
}
|
|
2272
|
+
else if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].field)) {
|
|
2273
|
+
var fieldName = this.columns[parseInt(i.toString(), 10)].field;
|
|
2274
|
+
var currentColumn = this.grid.getColumnByField(fieldName);
|
|
2275
|
+
this.columns[parseInt(i.toString(), 10)].width = currentColumn.width;
|
|
2276
|
+
}
|
|
2267
2277
|
}
|
|
2268
2278
|
}
|
|
2269
2279
|
if (!this.stackedHeader) {
|
|
@@ -3194,8 +3204,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3194
3204
|
}
|
|
3195
3205
|
}
|
|
3196
3206
|
for (var i = 0; i < detailrows.length; i++) {
|
|
3197
|
-
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
3198
|
-
|
|
3207
|
+
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization ||
|
|
3208
|
+
this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
3199
3209
|
gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
|
|
3200
3210
|
detailrows[parseInt(i.toString(), 10)].style.display = displayAction;
|
|
3201
3211
|
}
|
|
@@ -3296,6 +3306,20 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3296
3306
|
}
|
|
3297
3307
|
}
|
|
3298
3308
|
};
|
|
3309
|
+
/**
|
|
3310
|
+
* Method to sanitize html element
|
|
3311
|
+
*
|
|
3312
|
+
* @param {any} value - Specifies the html value to sanitize
|
|
3313
|
+
* @returns {any} Returns the sanitized html value
|
|
3314
|
+
* @hidden
|
|
3315
|
+
*/
|
|
3316
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3317
|
+
TreeGrid.prototype.sanitize = function (value) {
|
|
3318
|
+
if (this.enableHtmlSanitizer && typeof (value) === 'string') {
|
|
3319
|
+
return SanitizeHtmlHelper.sanitize(value);
|
|
3320
|
+
}
|
|
3321
|
+
return value;
|
|
3322
|
+
};
|
|
3299
3323
|
/**
|
|
3300
3324
|
* Updates the rows and cells
|
|
3301
3325
|
*
|
|
@@ -3867,6 +3891,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3867
3891
|
__decorate([
|
|
3868
3892
|
Property(false)
|
|
3869
3893
|
], TreeGrid.prototype, "enableColumnVirtualization", void 0);
|
|
3894
|
+
__decorate([
|
|
3895
|
+
Property(false)
|
|
3896
|
+
], TreeGrid.prototype, "enableHtmlSanitizer", void 0);
|
|
3870
3897
|
__decorate([
|
|
3871
3898
|
Property(false)
|
|
3872
3899
|
], TreeGrid.prototype, "enableInfiniteScrolling", void 0);
|