@syncfusion/ej2-treegrid 30.2.4 → 31.1.17

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 (148) hide show
  1. package/dist/ej2-treegrid.min.js +2 -2
  2. package/dist/ej2-treegrid.umd.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-treegrid.es2015.js +263 -157
  5. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  6. package/dist/es6/ej2-treegrid.es5.js +291 -167
  7. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  8. package/dist/global/ej2-treegrid.min.js +2 -2
  9. package/dist/global/ej2-treegrid.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/dist/ts/index.d.ts +4 -0
  12. package/dist/ts/index.ts +4 -0
  13. package/dist/ts/treegrid/actions/batch-edit.d.ts +74 -0
  14. package/dist/ts/treegrid/actions/batch-edit.ts +627 -0
  15. package/dist/ts/treegrid/actions/clipboard.d.ts +36 -0
  16. package/dist/ts/treegrid/actions/clipboard.ts +174 -0
  17. package/dist/ts/treegrid/actions/column-chooser.d.ts +37 -0
  18. package/dist/ts/treegrid/actions/column-chooser.ts +55 -0
  19. package/dist/ts/treegrid/actions/column-menu.d.ts +24 -0
  20. package/dist/ts/treegrid/actions/column-menu.ts +39 -0
  21. package/dist/ts/treegrid/actions/command-column.d.ts +24 -0
  22. package/dist/ts/treegrid/actions/command-column.ts +32 -0
  23. package/dist/ts/treegrid/actions/context-menu.d.ts +42 -0
  24. package/dist/ts/treegrid/actions/context-menu.ts +149 -0
  25. package/dist/ts/treegrid/actions/crud-actions.d.ts +66 -0
  26. package/dist/ts/treegrid/actions/crud-actions.ts +388 -0
  27. package/dist/ts/treegrid/actions/detail-row.d.ts +39 -0
  28. package/dist/ts/treegrid/actions/detail-row.ts +124 -0
  29. package/dist/ts/treegrid/actions/edit.d.ts +121 -0
  30. package/dist/ts/treegrid/actions/edit.ts +1083 -0
  31. package/dist/ts/treegrid/actions/excel-export.d.ts +67 -0
  32. package/dist/ts/treegrid/actions/excel-export.ts +240 -0
  33. package/dist/ts/treegrid/actions/filter.d.ts +57 -0
  34. package/dist/ts/treegrid/actions/filter.ts +231 -0
  35. package/dist/ts/treegrid/actions/freeze-column.d.ts +28 -0
  36. package/dist/ts/treegrid/actions/freeze-column.ts +119 -0
  37. package/dist/ts/treegrid/actions/index.d.ts +24 -0
  38. package/dist/ts/treegrid/actions/index.ts +24 -0
  39. package/dist/ts/treegrid/actions/infinite-scroll.d.ts +96 -0
  40. package/dist/ts/treegrid/actions/infinite-scroll.ts +320 -0
  41. package/dist/ts/treegrid/actions/logger.d.ts +25 -0
  42. package/dist/ts/treegrid/actions/logger.ts +136 -0
  43. package/dist/ts/treegrid/actions/page.d.ts +67 -0
  44. package/dist/ts/treegrid/actions/page.ts +212 -0
  45. package/dist/ts/treegrid/actions/pdf-export.d.ts +63 -0
  46. package/dist/ts/treegrid/actions/pdf-export.ts +182 -0
  47. package/dist/ts/treegrid/actions/print.d.ts +37 -0
  48. package/dist/ts/treegrid/actions/print.ts +69 -0
  49. package/dist/ts/treegrid/actions/reorder.d.ts +36 -0
  50. package/dist/ts/treegrid/actions/reorder.ts +60 -0
  51. package/dist/ts/treegrid/actions/resize.d.ts +36 -0
  52. package/dist/ts/treegrid/actions/resize.ts +54 -0
  53. package/dist/ts/treegrid/actions/rowdragdrop.d.ts +405 -0
  54. package/dist/ts/treegrid/actions/rowdragdrop.ts +1896 -0
  55. package/dist/ts/treegrid/actions/selection.d.ts +51 -0
  56. package/dist/ts/treegrid/actions/selection.ts +530 -0
  57. package/dist/ts/treegrid/actions/sort.d.ts +63 -0
  58. package/dist/ts/treegrid/actions/sort.ts +149 -0
  59. package/dist/ts/treegrid/actions/summary.d.ts +47 -0
  60. package/dist/ts/treegrid/actions/summary.ts +231 -0
  61. package/dist/ts/treegrid/actions/toolbar.d.ts +52 -0
  62. package/dist/ts/treegrid/actions/toolbar.ts +154 -0
  63. package/dist/ts/treegrid/actions/virtual-scroll.d.ts +90 -0
  64. package/dist/ts/treegrid/actions/virtual-scroll.ts +306 -0
  65. package/dist/ts/treegrid/base/constant.d.ts +158 -0
  66. package/dist/ts/treegrid/base/constant.ts +158 -0
  67. package/dist/ts/treegrid/base/data.d.ts +90 -0
  68. package/dist/ts/treegrid/base/data.ts +904 -0
  69. package/dist/ts/treegrid/base/index.d.ts +11 -0
  70. package/dist/ts/treegrid/base/index.ts +11 -0
  71. package/dist/ts/treegrid/base/interface.d.ts +186 -0
  72. package/dist/ts/treegrid/base/interface.ts +191 -0
  73. package/dist/ts/treegrid/base/treegrid-model.d.ts +1100 -0
  74. package/dist/ts/treegrid/base/treegrid.d.ts +2422 -0
  75. package/dist/ts/treegrid/base/treegrid.ts +5962 -0
  76. package/dist/ts/treegrid/enum.d.ts +152 -0
  77. package/dist/ts/treegrid/enum.ts +217 -0
  78. package/dist/ts/treegrid/index.d.ts +9 -0
  79. package/dist/ts/treegrid/index.ts +9 -0
  80. package/dist/ts/treegrid/models/column-chooser-settings-model.d.ts +62 -0
  81. package/dist/ts/treegrid/models/column-chooser-settings.d.ts +53 -0
  82. package/dist/ts/treegrid/models/column-chooser-settings.ts +67 -0
  83. package/dist/ts/treegrid/models/column-model.d.ts +30 -0
  84. package/dist/ts/treegrid/models/column.d.ts +697 -0
  85. package/dist/ts/treegrid/models/column.ts +800 -0
  86. package/dist/ts/treegrid/models/edit-settings-model.d.ts +100 -0
  87. package/dist/ts/treegrid/models/edit-settings.d.ts +89 -0
  88. package/dist/ts/treegrid/models/edit-settings.ts +111 -0
  89. package/dist/ts/treegrid/models/filter-settings-model.d.ts +216 -0
  90. package/dist/ts/treegrid/models/filter-settings.d.ts +195 -0
  91. package/dist/ts/treegrid/models/filter-settings.ts +237 -0
  92. package/dist/ts/treegrid/models/index.d.ts +24 -0
  93. package/dist/ts/treegrid/models/index.ts +24 -0
  94. package/dist/ts/treegrid/models/infinite-scroll-settings-model.d.ts +29 -0
  95. package/dist/ts/treegrid/models/infinite-scroll-settings.d.ts +25 -0
  96. package/dist/ts/treegrid/models/infinite-scroll-settings.ts +31 -0
  97. package/dist/ts/treegrid/models/loading-indicator-model.d.ts +21 -0
  98. package/dist/ts/treegrid/models/loading-indicator.d.ts +19 -0
  99. package/dist/ts/treegrid/models/loading-indicator.ts +21 -0
  100. package/dist/ts/treegrid/models/page-settings-model.d.ts +66 -0
  101. package/dist/ts/treegrid/models/page-settings.d.ts +57 -0
  102. package/dist/ts/treegrid/models/page-settings.ts +73 -0
  103. package/dist/ts/treegrid/models/rowdrop-settings-model.d.ts +15 -0
  104. package/dist/ts/treegrid/models/rowdrop-settings.d.ts +34 -0
  105. package/dist/ts/treegrid/models/rowdrop-settings.ts +37 -0
  106. package/dist/ts/treegrid/models/search-settings-model.d.ts +79 -0
  107. package/dist/ts/treegrid/models/search-settings.d.ts +73 -0
  108. package/dist/ts/treegrid/models/search-settings.ts +83 -0
  109. package/dist/ts/treegrid/models/selection-settings-model.d.ts +76 -0
  110. package/dist/ts/treegrid/models/selection-settings.d.ts +68 -0
  111. package/dist/ts/treegrid/models/selection-settings.ts +82 -0
  112. package/dist/ts/treegrid/models/sort-settings-model.d.ts +49 -0
  113. package/dist/ts/treegrid/models/sort-settings.d.ts +43 -0
  114. package/dist/ts/treegrid/models/sort-settings.ts +51 -0
  115. package/dist/ts/treegrid/models/summary-model.d.ts +93 -0
  116. package/dist/ts/treegrid/models/summary.d.ts +126 -0
  117. package/dist/ts/treegrid/models/summary.ts +170 -0
  118. package/dist/ts/treegrid/models/textwrap-settings-model.d.ts +21 -0
  119. package/dist/ts/treegrid/models/textwrap-settings.d.ts +19 -0
  120. package/dist/ts/treegrid/models/textwrap-settings.ts +21 -0
  121. package/dist/ts/treegrid/renderer/index.d.ts +5 -0
  122. package/dist/ts/treegrid/renderer/index.ts +5 -0
  123. package/dist/ts/treegrid/renderer/render.d.ts +41 -0
  124. package/dist/ts/treegrid/renderer/render.ts +379 -0
  125. package/dist/ts/treegrid/renderer/virtual-row-model-generator.d.ts +16 -0
  126. package/dist/ts/treegrid/renderer/virtual-row-model-generator.ts +90 -0
  127. package/dist/ts/treegrid/renderer/virtual-tree-content-render.d.ts +353 -0
  128. package/dist/ts/treegrid/renderer/virtual-tree-content-render.ts +1125 -0
  129. package/dist/ts/treegrid/utils.d.ts +70 -0
  130. package/dist/ts/treegrid/utils.ts +217 -0
  131. package/package.json +51 -15
  132. package/src/treegrid/actions/context-menu.js +3 -1
  133. package/src/treegrid/actions/excel-export.d.ts +8 -0
  134. package/src/treegrid/actions/excel-export.js +12 -0
  135. package/src/treegrid/actions/freeze-column.js +1 -1
  136. package/src/treegrid/actions/pdf-export.d.ts +8 -0
  137. package/src/treegrid/actions/pdf-export.js +12 -0
  138. package/src/treegrid/actions/selection.js +1 -1
  139. package/src/treegrid/actions/virtual-scroll.js +2 -2
  140. package/src/treegrid/base/data.js +1 -1
  141. package/src/treegrid/base/treegrid-model.d.ts +32 -2
  142. package/src/treegrid/base/treegrid.d.ts +29 -2
  143. package/src/treegrid/base/treegrid.js +39 -2
  144. package/src/treegrid/models/column-chooser-settings-model.d.ts +62 -0
  145. package/src/treegrid/models/column-chooser-settings.d.ts +53 -0
  146. package/src/treegrid/models/column-chooser-settings.js +52 -0
  147. package/src/treegrid/renderer/virtual-tree-content-render.js +3 -8
  148. package/src/treegrid/utils.js +22 -6
@@ -0,0 +1,697 @@
1
+ import { TextAlign, ClipMode, ValueAccessor, IFilter, IFilterUI, IEditCell, CommandModel, freezeDirection } from '@syncfusion/ej2-grids';
2
+ import { NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';
3
+ import { ITreeGridCellFormatter } from '../base/interface';
4
+ import { SortComparer } from '@syncfusion/ej2-grids';
5
+ /**
6
+ * Represents the "Column" model class for TreeGrid, defining essential properties and functionalities of a column.
7
+ */
8
+ export declare class Column {
9
+ /**
10
+ * Maps the column to a specific field name in the data source.
11
+ * Columns with a defined `field` can be used for sorting, filtering, etc.
12
+ * The `field` name should conform to valid JavaScript identifiers - starting with an alphabet, avoiding spaces and special characters.
13
+ *
14
+ * @default 'undefined'
15
+ */
16
+ field: string;
17
+ /**
18
+ * Specifies the text displayed in the column header. If not provided, the `field` value will be used.
19
+ *
20
+ * @default 'undefined'
21
+ */
22
+ headerText: string;
23
+ /**
24
+ * Unique identifier for the column, used to reference the column object.
25
+ *
26
+ * @default 'undefined'
27
+ */
28
+ uid: string;
29
+ /**
30
+ * Allows or disallows editing of the column. Set to `false` to make a column non-editable.
31
+ * By default, all columns are editable.
32
+ *
33
+ * @default true
34
+ */
35
+ allowEditing: boolean;
36
+ /**
37
+ * When set to `true`, checkboxes are displayed within the column.
38
+ *
39
+ * @default false
40
+ */
41
+ showCheckbox: boolean;
42
+ /**
43
+ * Custom sort comparer function for the column. Similar to the `Array.sort` comparer function.
44
+ */
45
+ sortComparer: SortComparer | string;
46
+ /**
47
+ * Designates this column as a primary key if set to `true`.
48
+ *
49
+ * @default false
50
+ */
51
+ isPrimaryKey: boolean;
52
+ /**
53
+ * @hidden
54
+ * Specifies a template for command buttons in column cells, either as an HTML element ID or a string.
55
+ *
56
+ * @aspType string
57
+ */
58
+ commandsTemplate: string | Function;
59
+ /**
60
+ * Options for displaying command buttons in each column cell.
61
+ * Built-in options include:
62
+ * * Edit - Modify the record.
63
+ * * Delete - Remove the record.
64
+ * * Save - Preserve changes to the record.
65
+ * * Cancel - Undo changes.
66
+ *
67
+ * @default null
68
+ */
69
+ commands: CommandModel[];
70
+ /**
71
+ * Specifies the column width in pixels or percentage.
72
+ *
73
+ * @default 'undefined'
74
+ */
75
+ width: string | number;
76
+ /**
77
+ * Defines the editor type for the column.
78
+ *
79
+ * @default 'stringedit'
80
+ */
81
+ editType: string;
82
+ /**
83
+ * Rules for validating data during creation and updation.
84
+ *
85
+ * @default null
86
+ */
87
+ validationRules: Object;
88
+ /**
89
+ * Default value to use when adding a new record to the TreeGrid.
90
+ *
91
+ * @default null
92
+ */
93
+ defaultValue: string;
94
+ /**
95
+ * Customization options for the edit cell.
96
+ *
97
+ * @default {}
98
+ */
99
+ edit: IEditCell;
100
+ /**
101
+ * Template for the cell editor of this column, either as a string or an HTML element ID.
102
+ *
103
+ * @default null
104
+ * @aspIgnore
105
+ */
106
+ editTemplate: string | Function;
107
+ /**
108
+ * Filter template/UI for the column, either as a string or an HTML element ID.
109
+ *
110
+ * @default null
111
+ * @aspIgnore
112
+ */
113
+ filterTemplate: string | Function;
114
+ /**
115
+ * Marks the column as an identity column if set to `true`.
116
+ *
117
+ * @default false
118
+ */
119
+ isIdentity: boolean;
120
+ /**
121
+ * Minimum width of the column in pixels or percentage.
122
+ *
123
+ * @default 'undefined'
124
+ */
125
+ minWidth: string | number;
126
+ /**
127
+ * Maximum width of the column in pixels or percentage, preventing resizing beyond this value.
128
+ *
129
+ * @default 'undefined'
130
+ */
131
+ maxWidth: string | number;
132
+ /**
133
+ * Alignment for the text in both header and content cells.
134
+ *
135
+ * @default Left
136
+ */
137
+ textAlign: TextAlign;
138
+ /**
139
+ * Sets how cell content should overflow:
140
+ * * `Clip` - Truncates overflow content.
141
+ * * `Ellipsis` - Shows ellipsis for overflow content.
142
+ * * `EllipsisWithTooltip` - Shows ellipsis with a tooltip on hover when content overflows.
143
+ *
144
+ * @default Ellipsis
145
+ */
146
+ clipMode: ClipMode;
147
+ /**
148
+ * Text alignment specifically for the column header.
149
+ *
150
+ * @default null
151
+ */
152
+ headerTextAlign: TextAlign;
153
+ /**
154
+ * When set to `true`, encodes HTML content in headers and cells to prevent HTML injection.
155
+ *
156
+ * @default true
157
+ */
158
+ disableHtmlEncode: boolean;
159
+ /**
160
+ * Specifies the data type of the column.
161
+ *
162
+ * @default null
163
+ */
164
+ type: string;
165
+ /**
166
+ * Allows display format customization, affecting only the display, not the actual data.
167
+ * Supported format options for numbers and dates can be provided.
168
+ *
169
+ * References for [number](https://ej2.syncfusion.com/documentation/common/internationalization/#supported-format-string)
170
+ * and [date](https://ej2.syncfusion.com/documentation/common/internationalization#date-formatting) formats.
171
+ *
172
+ * @default null
173
+ * @aspType string
174
+ */
175
+ format: string | NumberFormatOptions | DateFormatOptions;
176
+ /**
177
+ * Determines column visibility. When set to `false`, the column is hidden. By default, columns are visible.
178
+ *
179
+ * @default true
180
+ */
181
+ visible: boolean;
182
+ /**
183
+ * Custom element rendering in each column cell. Accepts template strings or HTML element IDs.
184
+ *
185
+ * @default null
186
+ * @aspType string
187
+ */
188
+ template: string | Function;
189
+ /**
190
+ * Template for a customized header element, either as a string or an HTML element ID.
191
+ *
192
+ * @default null
193
+ * @aspType string
194
+ */
195
+ headerTemplate: string | Function;
196
+ /**
197
+ * Freezes the column if set to `true`.
198
+ *
199
+ * @default false
200
+ */
201
+ isFrozen: boolean;
202
+ /**
203
+ * Custom styles and attributes for the content cells of the column.
204
+ *
205
+ * @default null
206
+ */
207
+ customAttributes: {
208
+ [x: string]: Object;
209
+ };
210
+ /**
211
+ * Displays column values as checkboxes if set to `true`, instead of Boolean values.
212
+ *
213
+ * @default false
214
+ */
215
+ displayAsCheckBox: boolean;
216
+ /**
217
+ * Disables column reordering if set to `false`. By default, columns can be reordered.
218
+ *
219
+ * @default true
220
+ */
221
+ allowReordering: boolean;
222
+ /**
223
+ * Disables column menu for the column if set to `false`. By default, column menus are enabled for all columns.
224
+ *
225
+ * @default true
226
+ */
227
+ showColumnMenu: boolean;
228
+ /**
229
+ * Disables filtering for the column if set to `false`. By default, columns are filterable.
230
+ *
231
+ * @default true
232
+ */
233
+ allowFiltering: boolean;
234
+ /**
235
+ * Disables sorting for the column if set to `false`. By default, columns are sortable.
236
+ *
237
+ * @default true
238
+ */
239
+ allowSorting: boolean;
240
+ /**
241
+ * Disables resizing for the column if set to `false`. By default, columns can be resized.
242
+ *
243
+ * @default true
244
+ */
245
+ allowResizing: boolean;
246
+ /**
247
+ * Method for applying custom formatting to cell content prior to rendering.
248
+ *
249
+ * @default null
250
+ */
251
+ formatter: {
252
+ new (): ITreeGridCellFormatter;
253
+ } | ITreeGridCellFormatter | Function;
254
+ /**
255
+ * Method for customizing cell values using an external function, applied during cell rendering.
256
+ *
257
+ * @default null
258
+ */
259
+ valueAccessor: ValueAccessor | string;
260
+ /**
261
+ * Facilitates multiple header rows (stacked headers) in the TreeGrid header.
262
+ *
263
+ * @default null
264
+ */
265
+ columns: Column[] | string[] | ColumnModel[];
266
+ /**
267
+ * Adjusts column visibility based on [Media Queries](http://cssmediaqueries.com/what-are-css-media-queries.html). Accepts valid media query strings.
268
+ *
269
+ * @default 'undefined'
270
+ */
271
+ hideAtMedia: string;
272
+ /**
273
+ * Excludes the column from the column chooser if set to `false`. By default, columns are included.
274
+ *
275
+ * @default true
276
+ */
277
+ showInColumnChooser?: boolean;
278
+ /**
279
+ * Replaces the default input component for the filter bar with a custom component. Contains `create` and `read` functions for component management.
280
+ *
281
+ * @default null
282
+ */
283
+ filterBarTemplate: IFilterUI;
284
+ /**
285
+ * Customize default filter options for a specific column, providing types and UI definitions for custom components.
286
+ *
287
+ * @default null
288
+ */
289
+ filter: IFilter;
290
+ /**
291
+ * Locks the column to its position, preventing reordering, if set to `true`. Locked columns appear first.
292
+ *
293
+ * @default false
294
+ */
295
+ lockColumn: boolean;
296
+ /**
297
+ * Dictates the column freeze position. Options include:
298
+ * * `Left` - Freeze the column on the left.
299
+ * * `Right` - Freeze the column on the right.
300
+ * * `Fixed` - Freeze the column in the center.
301
+ *
302
+ * @default null
303
+ */
304
+ freeze: freezeDirection;
305
+ private parent;
306
+ constructor(options: ColumnModel);
307
+ /**
308
+ * Reflects state changes for TreeGrid column directives, particularly in React.
309
+ *
310
+ * @param {Column} column - The column to update.
311
+ * @returns {void}
312
+ * @hidden
313
+ */
314
+ private setProperties;
315
+ }
316
+ /**
317
+ * Interface for a TreeGrid class Column
318
+ */
319
+ export interface ColumnModel {
320
+ /**
321
+ * Specifies the field name in the data source to which the column is bound. This field is used for operations like sorting and filtering.
322
+ * The field name must be a valid JavaScript identifier, beginning with a letter and avoiding spaces and special characters.
323
+ *
324
+ * @default 'undefined'
325
+ */
326
+ field?: string;
327
+ /**
328
+ * Retrieves the unique identifier for the column. This UID is used internally to reference and manipulate the column.
329
+ *
330
+ * @default 'undefined'
331
+ */
332
+ uid?: string;
333
+ /**
334
+ * Specifies the text displayed in the column header. If omitted, the `field` value is used as the header text.
335
+ *
336
+ * @default 'undefined'
337
+ */
338
+ headerText?: string;
339
+ /**
340
+ * Sets the column's width in pixels or as a percentage. This defines how the column will occupy space in the grid.
341
+ *
342
+ * @default 'undefined'
343
+ */
344
+ width?: string | number;
345
+ /**
346
+ * Determines the minimum width of the column in pixels or percentage. This ensures the column does not shrink below this size.
347
+ *
348
+ * @default 'undefined'
349
+ */
350
+ minWidth?: string | number;
351
+ /**
352
+ * Provides a custom sort comparer property to control how sorting is handled for this column's data.
353
+ *
354
+ * @default 'undefined'
355
+ */
356
+ sortComparer?: SortComparer | string;
357
+ /**
358
+ * Defines the maximum allowable width of the column in pixels or as a percentage, preventing resizing beyond this limit.
359
+ *
360
+ * @default 'undefined'
361
+ */
362
+ maxWidth?: string | number;
363
+ /**
364
+ * Specifies the horizontal alignment for the column content and header. Options include alignment to the left, center, or right.
365
+ *
366
+ * @default Syncfusion.EJ2.Grids.TextAlign.Left
367
+ * @isEnumeration true
368
+ * @aspType Syncfusion.EJ2.Grids.TextAlign
369
+ */
370
+ textAlign?: TextAlign;
371
+ /**
372
+ * Allows for the creation of stacked headers by using multiple rows in the grid's header.
373
+ *
374
+ * @default null
375
+ */
376
+ columns?: Column[] | string[] | ColumnModel[];
377
+ /**
378
+ * Determines how overflow content is handled within a cell. Options include:
379
+ * * `Clip`: Truncates the content.
380
+ * * `Ellipsis`: Shows ellipsis for overflow.
381
+ * * `EllipsisWithTooltip`: Shows ellipsis and tooltip on hover.
382
+ *
383
+ * @default Syncfusion.EJ2.Grids.ClipMode.Ellipsis
384
+ * @isEnumeration true
385
+ * @aspType Syncfusion.EJ2.Grids.ClipMode
386
+ */
387
+ clipMode?: ClipMode;
388
+ /**
389
+ * Aligns the text in the column header. By default, the alignment corresponds to other content alignments.
390
+ *
391
+ * @default null
392
+ * @aspDefaultValueIgnore
393
+ * @isEnumeration true
394
+ * @aspType Syncfusion.EJ2.Grids.TextAlign
395
+ */
396
+ headerTextAlign?: TextAlign;
397
+ /**
398
+ * If set to `true`, the HTML content within header and content cells is encoded to prevent injection attacks.
399
+ *
400
+ * @default true
401
+ */
402
+ disableHtmlEncode?: boolean;
403
+ /**
404
+ * Defines the type of data stored in the column, which may be string, number, date, or other types.
405
+ *
406
+ * @default null
407
+ */
408
+ type?: string;
409
+ /**
410
+ * Enables or disables the reordering of this column via drag-and-drop. Allows for dynamic column adjustments.
411
+ *
412
+ * @default true
413
+ */
414
+ allowReordering?: boolean;
415
+ /**
416
+ * Controls whether the column supports filtering. If set to false, users cannot filter data by this column.
417
+ *
418
+ * @default true
419
+ */
420
+ allowFiltering?: boolean;
421
+ /**
422
+ * Specifies whether sorting is enabled for this column. Set to false to prevent sort actions.
423
+ *
424
+ * @default true
425
+ */
426
+ allowSorting?: boolean;
427
+ /**
428
+ * Decides if the column menu should be available, providing options for column customization.
429
+ *
430
+ * @default true
431
+ */
432
+ showColumnMenu?: boolean;
433
+ /**
434
+ * Determines if this column can be resized. If false, the column size is fixed.
435
+ *
436
+ * @default true
437
+ */
438
+ allowResizing?: boolean;
439
+ /**
440
+ * Formats the displayed value of the column without affecting the underlying data. Supports standard and custom formats for numbers and dates.
441
+ *
442
+ * References for [number](https://ej2.syncfusion.com/documentation/common/internationalization/#supported-format-string)
443
+ * and [date](https://ej2.syncfusion.com/documentation/common/internationalization#date-formatting) formats.
444
+ * @default null
445
+ * @aspType string
446
+ */
447
+ format?: string | NumberFormatOptions | DateFormatOptions;
448
+ /**
449
+ * Toggles the visibility of the column. Set to false to hide the column from view. Columns are visible by default.
450
+ *
451
+ * @default true
452
+ */
453
+ visible?: boolean;
454
+ /**
455
+ * @hidden
456
+ * Specifies a string or HTML element ID for templates to add custom command buttons within cells.
457
+ *
458
+ * @aspType string
459
+ */
460
+ commandsTemplate?: string | Function;
461
+ /**
462
+ * Provides built-in command button options for cells. Options include Edit, Delete, Save, and Cancel.
463
+ * Custom command button implementations are possible.
464
+ *
465
+ * The following code example implements the custom command column.
466
+ * ```html
467
+ * <style type="text/css" class="cssStyles">
468
+ * .details-icon:before
469
+ * {
470
+ * content:"\e74d";
471
+ * }
472
+ * </style>
473
+ * <div id="TreeGrid"></div>
474
+ * ```
475
+ * ```typescript
476
+ * var gridObj = new TreeGrid({
477
+ * datasource: window.gridData,
478
+ * columns : [
479
+ * { field: 'CustomerID', headerText: 'Customer ID' },
480
+ * { field: 'CustomerName', headerText: 'Customer Name' },
481
+ * {commands: [{buttonOption:{content: 'Details', click: onClick, cssClass: details-icon}}], headerText: 'Customer Details'}
482
+ * ]
483
+ * gridObj.appendTo("#TreeGrid");
484
+ * ```
485
+ *
486
+ * @default null
487
+ */
488
+ commands?: CommandModel[];
489
+ /**
490
+ * Customizes the rendering of cell content using either a template string or HTML element ID.
491
+ *
492
+ * @default null
493
+ * @aspType string
494
+ */
495
+ template?: string | Function;
496
+ /**
497
+ * Customizes the header content with a template, defined as a string or an HTML element ID.
498
+ *
499
+ * @default null
500
+ * @aspType string
501
+ */
502
+ headerTemplate?: string | Function;
503
+ /**
504
+ * Allows the column to be frozen, keeping it stationary while scrolling horizontally through the grid.
505
+ *
506
+ * @default false
507
+ */
508
+ isFrozen?: boolean;
509
+ /**
510
+ * Enables the addition of CSS styles and attributes for the content cells in a particular column.
511
+ *
512
+ * @default null
513
+ */
514
+ customAttributes?: {
515
+ [x: string]: Object;
516
+ };
517
+ /**
518
+ * Displays the column value as a checkbox instead of a Boolean value when set to `true`.
519
+ *
520
+ * @default false
521
+ */
522
+ displayAsCheckBox?: boolean;
523
+ /**
524
+ * Allows for custom cell content formatting using an external method, executed prior to rendering.
525
+ *
526
+ * @default null
527
+ */
528
+ formatter?: {
529
+ new (): ITreeGridCellFormatter;
530
+ } | ITreeGridCellFormatter | Function;
531
+ /**
532
+ * Determines whether the column should appear in the Column Chooser. Set to false to exclude it.
533
+ *
534
+ * @default true
535
+ */
536
+ showInColumnChooser?: boolean;
537
+ /**
538
+ * Applies custom cell values using an external function, allowing for dynamic display adjustments.
539
+ *
540
+ * @default null
541
+ */
542
+ valueAccessor?: ValueAccessor | string;
543
+ /**
544
+ * Adjusts column visibility based on [Media Queries](http://cssmediaqueries.com/what-are-css-media-queries.html). Accepts valid CSS media query strings for responsive adjustments.
545
+ *
546
+ * @default 'undefined'
547
+ */
548
+ hideAtMedia?: string;
549
+ /**
550
+ * Allows for a custom component within the filter bar, facilitating advanced filter interfaces.
551
+ * Includes create and read functions for custom component management.
552
+ *
553
+ * ```html
554
+ * <div id="TreeGrid"></div>
555
+ * ```
556
+ * ```typescript
557
+ * let gridObj: TreeGrid = new TreeGrid({
558
+ * dataSource: filterData,
559
+ * columns: [
560
+ * { field: 'OrderID', headerText: 'Order ID' },
561
+ * {
562
+ * field: 'EmployeeID', filterBarTemplate: {
563
+ * create: (args: { element: Element, column: Column }) => {
564
+ * let input: HTMLInputElement = document.createElement('input');
565
+ * input.id = 'EmployeeID';
566
+ * input.type = 'text';
567
+ * return input;
568
+ * },
569
+ * write: (args: { element: Element, column: Column }) => {
570
+ * args.element.addEventListener('input', args.column.filterBarTemplate.read as EventListener);
571
+ * },
572
+ * read: (args: { element: HTMLInputElement, columnIndex: number, column: Column }) => {
573
+ * gridObj.filterByColumn(args.element.id, 'equal', args.element.value);
574
+ * }
575
+ * }
576
+ * }],
577
+ * allowFiltering: true
578
+ * });
579
+ * gridObj.appendTo('#TreeGrid');
580
+ * ```
581
+ *
582
+ * @default null
583
+ */
584
+ filterBarTemplate?: IFilterUI;
585
+ /**
586
+ * Customizes filter options for the column, enabling specialized filtering functionality.
587
+ *
588
+ * @default null
589
+ */
590
+ filter?: IFilter;
591
+ /**
592
+ * Identifies the column as a primary key if set to `true`, enforcing uniqueness.
593
+ *
594
+ * @default false
595
+ */
596
+ isPrimaryKey?: boolean;
597
+ /**
598
+ * Displays checkboxes in the column when enabled, allowing for selections and certain operations.
599
+ *
600
+ * @default false
601
+ */
602
+ showCheckbox?: boolean;
603
+ /**
604
+ * Specifies the component type used for editing cells within this column.
605
+ *
606
+ * @default 'stringedit'
607
+ */
608
+ editType?: string;
609
+ /**
610
+ * Sets default values when new records are added to the TreeGrid involving this column.
611
+ *
612
+ * @default null
613
+ */
614
+ defaultValue?: string;
615
+ /**
616
+ * Allows customizing the default edit cell through the `IEditCell` object for more control over editing.
617
+ *
618
+ * @default {}
619
+ */
620
+ edit?: IEditCell;
621
+ /**
622
+ * Provides a template for editing cells in this column, supporting either a template string or an HTML element ID.
623
+ *
624
+ * @aspIgnore
625
+ */
626
+ editTemplate?: string | Function;
627
+ /**
628
+ * Specifies a custom template or UI for filtering within this column, utilizing either string templates or HTML element IDs.
629
+ *
630
+ * @aspIgnore
631
+ */
632
+ filterTemplate?: string | Function;
633
+ /**
634
+ * Identifies the column as an identity column in database terms, if set to `true`.
635
+ *
636
+ * @default false
637
+ */
638
+ isIdentity?: boolean;
639
+ /**
640
+ * Establishes validation rules to ensure data integrity during creation and updates.
641
+ *
642
+ * @default null
643
+ */
644
+ validationRules?: Object;
645
+ /**
646
+ * Controls whether editing is permitted for the column. By default, all columns are editable.
647
+ *
648
+ * @default true
649
+ */
650
+ allowEditing?: boolean;
651
+ /**
652
+ * Prevents column reordering when set to true, locking the column into a set position.
653
+ *
654
+ * @default false
655
+ */
656
+ lockColumn?: boolean;
657
+ /**
658
+ * Determines which side (left, right, or center) the column should be frozen on.
659
+ *
660
+ * @default Syncfusion.EJ2.Grids.FreezeDirection.None
661
+ * @isEnumeration true
662
+ * @aspType Syncfusion.EJ2.Grids.FreezeDirection
663
+ */
664
+ freeze?: freezeDirection;
665
+ }
666
+ /**
667
+ * Defines TreeGrid column
668
+ */
669
+ export declare class TreeGridColumn extends Column {
670
+ /**
671
+ * Defines stacked columns
672
+ *
673
+ * @default null
674
+ */
675
+ columns: string[] | ColumnModel[];
676
+ }
677
+ /**
678
+ * Interface for a class TreeGridColumn
679
+ */
680
+ export interface TreeGridColumnModel extends ColumnModel {
681
+ /**
682
+ * Defines stacked columns
683
+ *
684
+ * @default null
685
+ */
686
+ columns?: string[] | ColumnModel[];
687
+ }
688
+ /**
689
+ * Defines stacked tree grid column
690
+ */
691
+ export declare class StackedColumn extends TreeGridColumn {
692
+ }
693
+ /**
694
+ * Interface for a class stacked tree grid column
695
+ */
696
+ export interface StackedColumnModel extends TreeGridColumnModel {
697
+ }