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