@syncfusion/ej2-treegrid 20.4.54 → 21.1.37
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 +2 -45
- 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 +43 -15
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +42 -14
- 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/freeze-column.js +3 -0
- package/src/treegrid/actions/rowdragdrop.js +8 -6
- package/src/treegrid/base/treegrid-model.d.ts +27 -16
- package/src/treegrid/base/treegrid.d.ts +33 -15
- package/src/treegrid/base/treegrid.js +29 -6
- package/src/treegrid/enum.d.ts +79 -138
- package/src/treegrid/models/column.d.ts +10 -8
- 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/page-settings-model.d.ts +1 -1
- package/src/treegrid/models/page-settings.d.ts +1 -1
- 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/models/summary-model.d.ts +2 -2
- package/src/treegrid/models/summary.d.ts +2 -2
- package/src/treegrid/renderer/render.js +2 -2
- 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.37
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@21.1.35",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-ouihoglEHJP/Rhe+MH3bJ7w4cGwaIWgWjNHU0oYD6Rr6n2K8DVYEpHS1oW4zVFzHCzEATAuuETu/6kPP5q9TCg==",
|
|
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-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.1.35.tgz",
|
|
28
|
+
"_shasum": "6c352cdb1bd29fff5724b93d39eeadfa68765d2a",
|
|
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.37",
|
|
40
|
+
"@syncfusion/ej2-data": "~21.1.37",
|
|
41
|
+
"@syncfusion/ej2-grids": "~21.1.37",
|
|
42
|
+
"@syncfusion/ej2-popups": "~21.1.37"
|
|
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.37",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -89,6 +89,9 @@ var Freeze = /** @class */ (function () {
|
|
|
89
89
|
row.style.height = row.parentElement.firstElementChild.clientHeight + 'px';
|
|
90
90
|
}
|
|
91
91
|
row.style.display = args.action;
|
|
92
|
+
if (freeze && frozenRightRows.length) {
|
|
93
|
+
frozenRightRows[parseInt(i.toString(), 10)].style.display = args.action;
|
|
94
|
+
}
|
|
92
95
|
var queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
|
|
93
96
|
: '.e-treecolumn-container .e-treegridexpand';
|
|
94
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');
|
|
@@ -995,13 +996,14 @@ var RowDD = /** @class */ (function () {
|
|
|
995
996
|
var childRecords = rec[0].childRecords;
|
|
996
997
|
var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
|
|
997
998
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord_2);
|
|
998
|
-
|
|
999
|
+
if (this_1.parent.enableImmutableMode || this_1.parent['isIndentEnabled'] && !this_1.parent.parentIdMapping) {
|
|
1000
|
+
draggedRecord_2.parentItem = droppedRecord.parentItem;
|
|
1001
|
+
draggedRecord_2.level = droppedRecord.level;
|
|
1002
|
+
}
|
|
999
1003
|
draggedRecord_2.parentUniqueID = droppedRecord.parentUniqueID;
|
|
1000
|
-
draggedRecord_2.level = droppedRecord.level;
|
|
1001
1004
|
if (this_1.parent.parentIdMapping) {
|
|
1002
1005
|
draggedRecord_2[this_1.parent.parentIdMapping] = droppedRecord[this_1.parent.parentIdMapping];
|
|
1003
|
-
draggedRecord_2.
|
|
1004
|
-
draggedRecord_2.level = droppedRecord.level;
|
|
1006
|
+
draggedRecord_2.parentUniqueID = droppedRecord.parentUniqueID;
|
|
1005
1007
|
}
|
|
1006
1008
|
}
|
|
1007
1009
|
if (draggedRecord_2.hasChildRecords) {
|
|
@@ -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
|
|
@@ -246,7 +248,7 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
246
248
|
|
|
247
249
|
/**
|
|
248
250
|
* Configures the TreeGrid aggregate rows.
|
|
249
|
-
* > Check the [`Aggregates`](../../treegrid/
|
|
251
|
+
* > Check the [`Aggregates`](../../treegrid/aggregates/aggregates) for its configuration.
|
|
250
252
|
*
|
|
251
253
|
* @default []
|
|
252
254
|
*/
|
|
@@ -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
|
|
@@ -390,7 +392,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
390
392
|
sortSettings: SortSettingsModel;
|
|
391
393
|
/**
|
|
392
394
|
* Configures the TreeGrid aggregate rows.
|
|
393
|
-
* > Check the [`Aggregates`](../../treegrid/
|
|
395
|
+
* > Check the [`Aggregates`](../../treegrid/aggregates/aggregates) for its configuration.
|
|
394
396
|
*
|
|
395
397
|
* @default []
|
|
396
398
|
*/
|
|
@@ -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);
|
|
@@ -760,7 +764,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
760
764
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
761
765
|
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
762
766
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
|
|
763
|
-
&& (!isNullOrUndefined(args.data) && args.data['hasChildRecords'])) {
|
|
767
|
+
&& (!isNullOrUndefined(args.data) && args.data['hasChildRecords']) && !this.selectionSettings.checkboxOnly) {
|
|
764
768
|
args.cancel = true;
|
|
765
769
|
return;
|
|
766
770
|
}
|
|
@@ -2259,13 +2263,15 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
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
|
}
|
|
2267
2272
|
else if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].field)) {
|
|
2268
|
-
var
|
|
2273
|
+
var fieldName = this.columns[parseInt(i.toString(), 10)].field;
|
|
2274
|
+
var currentColumn = this.grid.getColumnByField(fieldName);
|
|
2269
2275
|
this.columns[parseInt(i.toString(), 10)].width = currentColumn.width;
|
|
2270
2276
|
}
|
|
2271
2277
|
}
|
|
@@ -3198,8 +3204,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3198
3204
|
}
|
|
3199
3205
|
}
|
|
3200
3206
|
for (var i = 0; i < detailrows.length; i++) {
|
|
3201
|
-
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
3202
|
-
|
|
3207
|
+
if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization ||
|
|
3208
|
+
this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
3203
3209
|
gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
|
|
3204
3210
|
detailrows[parseInt(i.toString(), 10)].style.display = displayAction;
|
|
3205
3211
|
}
|
|
@@ -3300,6 +3306,20 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3300
3306
|
}
|
|
3301
3307
|
}
|
|
3302
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
|
+
};
|
|
3303
3323
|
/**
|
|
3304
3324
|
* Updates the rows and cells
|
|
3305
3325
|
*
|
|
@@ -3871,6 +3891,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3871
3891
|
__decorate([
|
|
3872
3892
|
Property(false)
|
|
3873
3893
|
], TreeGrid.prototype, "enableColumnVirtualization", void 0);
|
|
3894
|
+
__decorate([
|
|
3895
|
+
Property(false)
|
|
3896
|
+
], TreeGrid.prototype, "enableHtmlSanitizer", void 0);
|
|
3874
3897
|
__decorate([
|
|
3875
3898
|
Property(false)
|
|
3876
3899
|
], TreeGrid.prototype, "enableInfiniteScrolling", void 0);
|