@syncfusion/ej2-treegrid 20.4.54 → 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.
Files changed (38) hide show
  1. package/CHANGELOG.md +1 -46
  2. package/dist/ej2-treegrid.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js +2 -2
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +37 -10
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +36 -9
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +2 -2
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +10 -10
  13. package/src/treegrid/actions/freeze-column.js +3 -0
  14. package/src/treegrid/actions/rowdragdrop.js +3 -2
  15. package/src/treegrid/base/treegrid-model.d.ts +26 -15
  16. package/src/treegrid/base/treegrid.d.ts +32 -14
  17. package/src/treegrid/base/treegrid.js +28 -5
  18. package/src/treegrid/enum.d.ts +79 -138
  19. package/src/treegrid/models/column.d.ts +5 -3
  20. package/src/treegrid/models/edit-settings-model.d.ts +13 -9
  21. package/src/treegrid/models/edit-settings.d.ts +13 -9
  22. package/src/treegrid/models/filter-settings-model.d.ts +13 -8
  23. package/src/treegrid/models/filter-settings.d.ts +13 -8
  24. package/src/treegrid/models/loading-indicator-model.d.ts +4 -2
  25. package/src/treegrid/models/loading-indicator.d.ts +4 -2
  26. package/src/treegrid/models/search-settings-model.d.ts +9 -3
  27. package/src/treegrid/models/search-settings.d.ts +9 -3
  28. package/src/treegrid/models/selection-settings-model.d.ts +17 -8
  29. package/src/treegrid/models/selection-settings.d.ts +17 -8
  30. package/src/treegrid/renderer/render.js +2 -2
  31. package/styles/bootstrap-dark.css +2 -8
  32. package/styles/highcontrast-light.css +2 -8
  33. package/styles/treegrid/_bootstrap5-definition.scss +2 -2
  34. package/styles/treegrid/_fluent-definition.scss +2 -2
  35. package/styles/treegrid/_tailwind-definition.scss +2 -2
  36. package/styles/treegrid/bootstrap-dark.css +2 -8
  37. package/styles/treegrid/highcontrast-light.css +2 -8
  38. package/styles/treegrid/_material3-definition.scss +0 -28
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.54
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.4.49",
3
+ "_id": "@syncfusion/ej2-treegrid@20.10.6",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-E6GBrixReTSh5GUj05zdOX531xJA0oKLhNOJm6lfbEZAEingUnUpxBtZIVdl9I2EXhMaKdOn/IRVjqNMJhlPcw==",
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-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.4.49.tgz",
28
- "_shasum": "56a1c00a6fd2d3df97ef71db6dc3297e653ef6ec",
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/ease-automation_release_19.1.0.1/packages/included",
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": "~20.4.51",
40
- "@syncfusion/ej2-data": "~20.4.48",
41
- "@syncfusion/ej2-grids": "~20.4.54",
42
- "@syncfusion/ej2-popups": "~20.4.53"
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": "20.4.54",
69
+ "version": "21.1.35",
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');
@@ -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
- * `Clip`: Truncates the cell content when it overflows its area.
26
- * `Ellipsis`: Displays ellipsis when the cell content overflows its area.
27
- * `EllipsisWithTooltip`: Displays ellipsis when the cell content overflows its area,
28
- * also it will display the tooltip while hover on ellipsis is applied..
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
- * * `AllPages`: Prints all pages of the TreeGrid.
130
- * * `CurrentPage`: Prints the current page of the TreeGrid.
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
- * * `Both`: Displays both horizontal and vertical TreeGrid lines.
324
- * * `None`: No TreeGrid lines are displayed.
325
- * * `Horizontal`: Displays the horizontal TreeGrid lines only.
326
- * * `Vertical`: Displays the vertical TreeGrid lines only.
327
- * * `Default`: Displays TreeGrid lines based on the theme.
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
- * `Clip`: Truncates the cell content when it overflows its area.
172
- * `Ellipsis`: Displays ellipsis when the cell content overflows its area.
173
- * `EllipsisWithTooltip`: Displays ellipsis when the cell content overflows its area,
174
- * also it will display the tooltip while hover on ellipsis is applied..
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
- * * `AllPages`: Prints all pages of the TreeGrid.
290
- * * `CurrentPage`: Prints the current page of the TreeGrid.
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
- * * `Both`: Displays both horizontal and vertical TreeGrid lines.
460
- * * `None`: No TreeGrid lines are displayed.
461
- * * `Horizontal`: Displays the horizontal TreeGrid lines only.
462
- * * `Vertical`: Displays the vertical TreeGrid lines only.
463
- * * `Default`: Displays TreeGrid lines based on the theme.
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);
@@ -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)].columns[parseInt(j.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 currentColumn = this.grid.getColumnByField(this.columns[parseInt(i.toString(), 10)].field);
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
- || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
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);
@@ -1,49 +1,32 @@
1
1
  /**
2
- * Defines types of Filter Hierarchy
3
- * * Parent - Specifies the filter type as Parent.
4
- * * Child - Specifies the filter type as excel.
5
- * * Both - Specifies the filter type as filter bar
6
- * * None - Specifies the filter type as check box.
2
+ * Defines modes of Filter Hierarchy
3
+ * ```props
4
+ * * Parent :- Shows filtered records with its Parent records.
5
+ * * Child :- Shows filtered records with its Child records.
6
+ * * Both :- Shows filtered records with its Parent and Child records.
7
+ * * None :- Shows only the filetred records.
8
+ * ```
7
9
  */
8
- export declare type FilterHierarchyMode =
9
- /** Shows filtered records with its Parent records */
10
- 'Parent' |
11
- /** Shows filtered records with its Child records */
12
- 'Child' |
13
- /** Shows filtered records with its Parent and Child records */
14
- 'Both' |
15
- /** Shows only filetred records */
16
- 'None';
10
+ export declare type FilterHierarchyMode = 'Parent' | 'Child' | 'Both' | 'None';
17
11
  /**
18
12
  * Defines Predefined toolbar items.
19
- *
13
+ * ```props
14
+ * * Add :- Add new record.
15
+ * * Edit :- Edit the selected record.
16
+ * * Update :- Update the edited record.
17
+ * * Delete :- Delete the selected record.
18
+ * * Cancel :- Cancel the edited state.
19
+ * * Search :- Searches the TreeGrid records by given key.
20
+ * * ExpandAll :- Expands all the rows in TreeGrid.
21
+ * * CollapseAll :- Collapses all the rows in TreeGrid.
22
+ * * ExcelExport :- Export the TreeGrid to Excel.
23
+ * * PdfExport :- Export the TreeGrid to Pdf.
24
+ * * CsvExport :- Export the TreeGrid to Csv.
25
+ * * Print :- Print the TreeGrid.
26
+ * ```
20
27
  * @hidden
21
28
  */
22
- export declare type ToolbarItems =
23
- /** Add new record */
24
- 'Add' |
25
- /** Delete selected record */
26
- 'Delete' |
27
- /** Update edited record */
28
- 'Update' |
29
- /** Cancel the edited state */
30
- 'Cancel' |
31
- /** Edit the selected record */
32
- 'Edit' |
33
- /** Searches the TreeGrid records by given key */
34
- 'Search' |
35
- /** Expands all the rows in TreeGrid */
36
- 'ExpandAll' |
37
- /** Collapses all the rows in TreeGrid */
38
- 'CollapseAll' |
39
- /** Export the TreeGrid to Excel */
40
- 'ExcelExport' |
41
- /** Export the TreeGrid to Pdf */
42
- 'PdfExport' |
43
- /** Export the TreeGrid to Csv */
44
- 'CsvExport' |
45
- /** Print the TreeGrid */
46
- 'Print';
29
+ export declare type ToolbarItems = 'Add' | 'Delete' | 'Update' | 'Cancel' | 'Edit' | 'Search' | 'ExpandAll' | 'CollapseAll' | 'ExcelExport' | 'PdfExport' | 'CsvExport' | 'Print';
47
30
  /**
48
31
  * Defines Predefined toolbar items.
49
32
  *
@@ -67,56 +50,34 @@ export declare enum ToolbarItem {
67
50
  }
68
51
  /**
69
52
  * Defines different PageSizeMode
70
- * * All - Specifies the PageSizeMode as All
71
- * * Root - Specifies the PageSizeMode as Root
53
+ * ```props
54
+ * * All :- Defines the pageSizeMode as All
55
+ * * Root :- Defines the pageSizeMode as Root
56
+ * ```
72
57
  */
73
- export declare type PageSizeMode =
74
- /** Defines the pageSizeMode as All */
75
- 'All' |
76
- /** Defines the pageSizeMode as Root */
77
- 'Root';
58
+ export declare type PageSizeMode = 'All' | 'Root';
78
59
  /**
79
60
  * Defines predefined contextmenu items.
80
- *
61
+ * ```props
62
+ * * AutoFitAll :- Auto fit the size of all columns.
63
+ * * AutoFit :- Auto fit the current column.
64
+ * * SortAscending :- Sort the current column in ascending order.
65
+ * * SortDescending :- Sort the current column in descending order.
66
+ * * Edit :- Edit the current record.
67
+ * * Delete :- Delete the current record.
68
+ * * Save :- Save the edited record.
69
+ * * Cancel :- Cancel the edited state.
70
+ * * PdfExport :- Export the TreeGrid as Pdf format.
71
+ * * ExcelExport :- Export the TreeGrid as Excel format.
72
+ * * CsvExport :- Export the TreeGrid as CSV format.
73
+ * * FirstPage :- Go to the first page.
74
+ * * PrevPage :- Go to the previous page.
75
+ * * LastPage :- Go to the last page.
76
+ * * NextPage :- Go to the next page.
77
+ * ```
81
78
  * @hidden
82
79
  */
83
- export declare type ContextMenuItem =
84
- /** `AutoFitAll` - Auto fit the size of all columns. */
85
- 'AutoFitAll' |
86
- /** `AutoFit` - Auto fit the current column. */
87
- 'AutoFit' |
88
- /** `SortAscending` - Sort the current column in ascending order. */
89
- 'SortAscending' |
90
- /** `SortDescending` - Sort the current column in descending order. */
91
- 'SortDescending' |
92
- /** `Edit` - Edit the current record. */
93
- 'Edit' |
94
- /** `Delete` - Delete the current record. */
95
- 'Delete' |
96
- /** `Save` - Save the edited record. */
97
- 'Save' |
98
- /** `Cancel` - Cancel the edited state. */
99
- 'Cancel' |
100
- /** `PdfExport` - Export the TreeGrid as Pdf format. */
101
- 'PdfExport' |
102
- /** `ExcelExport` - Export the TreeGrid as Excel format. */
103
- 'ExcelExport' |
104
- /** `CsvExport` - Export the TreeGrid as CSV format. */
105
- 'CsvExport' |
106
- /** `FirstPage` - Go to the first page. */
107
- 'FirstPage' |
108
- /** `PrevPage` - Go to the previous page. */
109
- 'PrevPage' |
110
- /** `LastPage` - Go to the last page. */
111
- 'LastPage' |
112
- /** `NextPage` - Go to the next page. */
113
- 'NextPage' |
114
- /** AddRow to the TreeGrid */
115
- 'AddRow' |
116
- /** `Indent` - Indents the record to one level of hierarchy */
117
- 'Indent' |
118
- /** `Outdent` - Outdent the record to one level of hierarchy */
119
- 'Outdent';
80
+ export declare type ContextMenuItem = 'AutoFitAll' | 'AutoFit' | 'SortAscending' | 'SortDescending' | 'Edit' | 'Delete' | 'Save' | 'Cancel' | 'PdfExport' | 'ExcelExport' | 'CsvExport' | 'FirstPage' | 'PrevPage' | 'LastPage' | 'NextPage' | 'AddRow' | 'Indent' | 'Outdent';
120
81
  /**
121
82
  * Defines predefined contextmenu items.
122
83
  *
@@ -144,69 +105,49 @@ export declare enum ContextMenuItems {
144
105
  }
145
106
  /**
146
107
  * Defines modes of editing.
108
+ * ```props
109
+ * * Cell :- Defines the editing mode as Cell.
110
+ * * Row :- Defines the editing mode as Row.
111
+ * * Dialog :- Defines the editing mode as Dialog.
112
+ * * Batch :- Defines the editing mode as Batch.
113
+ * ```
147
114
  */
148
- export declare type EditMode =
149
- /** Defines EditMode as Cell */
150
- 'Cell' |
151
- /** Defines EditMode as Row */
152
- 'Row' |
153
- /** Defines EditMode as Dialog */
154
- 'Dialog' |
155
- /** Defines EditMode as Batch */
156
- 'Batch';
115
+ export declare type EditMode = 'Cell' | 'Row' | 'Dialog' | 'Batch';
157
116
  /**
158
117
  * Defines the position where the new row has to be added.
118
+ * ```props
119
+ * * Top :- Defines new row position as top of all rows.
120
+ * * Bottom :- Defines new row position as bottom of all rows.
121
+ * * Above :- Defines new row position as above the selected row.
122
+ * * Below :- Defines new row position as below the selected row.
123
+ * * Child :- Defines new row position as child to the selected row.
124
+ * ```
159
125
  */
160
- export declare type RowPosition =
161
- /** Defines new row position as top of all rows */
162
- 'Top' |
163
- /** Defines new row position as bottom of all rows */
164
- 'Bottom' |
165
- /** Defines new row position as above the selected row */
166
- 'Above' |
167
- /** Defines new row position as below the selected row */
168
- 'Below' |
169
- /** Defines new row position as child to the selected row */
170
- 'Child';
126
+ export declare type RowPosition = 'Top' | 'Bottom' | 'Above' | 'Below' | 'Child';
171
127
  /**
172
128
  * Defines types of Filter
173
- * * Menu - Specifies the filter type as menu.
174
- * * Excel - Specifies the filter type as excel.
175
- * * FilterBar - Specifies the filter type as filter bar.
129
+ * ```props
130
+ * * Menu :- Defines the filter type as Menu.
131
+ * * Excel :- Defines the filter type as Excel.
132
+ * * FilterBar :- Defines the filter type as FilterBar.
133
+ * ```
176
134
  */
177
- export declare type FilterType =
178
- /** Defines FilterType as filterbar */
179
- 'FilterBar' |
180
- /** Defines FilterType as excel */
181
- 'Excel' |
182
- /** Defines FilterType as menu */
183
- 'Menu';
135
+ export declare type FilterType = 'FilterBar' | 'Excel' | 'Menu';
184
136
  /**
185
137
  * Defines the wrap mode.
186
- * * Both - Wraps both header and content.
187
- * * Header - Wraps header alone.
188
- * * Content - Wraps content alone.
138
+ * ```props
139
+ * * Both :- Wraps both header and content.
140
+ * * Header :- Wraps header alone.
141
+ * * Content :- Wraps content alone.
189
142
  */
190
- export declare type WrapMode =
191
- /** Wraps both header and content */
192
- 'Both' |
193
- /** Wraps header alone */
194
- 'Header' |
195
- /** Wraps content alone */
196
- 'Content';
143
+ export declare type WrapMode = 'Both' | 'Header' | 'Content';
197
144
  /**
198
145
  * Defines types of CopyHierarchyMode. They are
199
- * * Parent
200
- * * Child
201
- * * Both
202
- * * None
146
+ * ```props
147
+ * * Parent :- Defines CopyHiearchyMode as Parent.
148
+ * * Child :- Defines CopyHiearchyMode as Child.
149
+ * * Both :- Defines CopyHiearchyMode as Both.
150
+ * * None :- Defines CopyHiearchyMode as None.
151
+ * ```
203
152
  */
204
- export declare type CopyHierarchyType =
205
- /** Defines CopyHiearchyMode as Parent */
206
- 'Parent' |
207
- /** Defines CopyHiearchyMode as Child */
208
- 'Child' |
209
- /** Defines CopyHiearchyMode as Both */
210
- 'Both' |
211
- /** Defines CopyHiearchyMode as None */
212
- 'None';
153
+ export declare type CopyHierarchyType = 'Parent' | 'Child' | 'Both' | 'None';
@@ -403,9 +403,11 @@ export interface ColumnModel {
403
403
  columns?: Column[] | string[] | ColumnModel[];
404
404
  /**
405
405
  * Defines the cell content's overflow mode. The available modes are
406
- * * `Clip` - Truncates the cell content when it overflows its area.
407
- * * `Ellipsis` - Displays ellipsis when the cell content overflows its area.
408
- * * `EllipsisWithTooltip` - Displays ellipsis when the cell content overflows its area
406
+ * ```props
407
+ * * Clip :- Truncates the cell content when it overflows its area.
408
+ * * Ellipsis :- Displays ellipsis when the cell content overflows its area.
409
+ * * EllipsisWithTooltip :- Displays ellipsis when the cell content overflows its area also it will display tooltip while hover on ellipsis applied cell.
410
+ * ```
409
411
  * also it will display tooltip while hover on ellipsis applied cell.
410
412
  *
411
413
  * @default Syncfusion.EJ2.Grids.ClipMode.Ellipsis