dhx-suite 8.4.6 → 9.0.0
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/codebase/suite.min.css +1 -1
- package/codebase/suite.min.js +3 -3
- package/codebase/suite.min.js.map +1 -1
- package/codebase/types/ts-all/sources/entry.d.ts +1 -1
- package/codebase/types/ts-common/core.d.ts +1 -0
- package/codebase/types/ts-common/html.d.ts +1 -0
- package/codebase/types/ts-common/input.d.ts +24 -0
- package/codebase/types/ts-data/index.d.ts +1 -0
- package/codebase/types/ts-data/sources/DragManager.d.ts +12 -1
- package/codebase/types/ts-data/sources/datacollection/group.d.ts +42 -0
- package/codebase/types/ts-data/sources/datacollection.d.ts +6 -1
- package/codebase/types/ts-data/sources/methods.d.ts +11 -0
- package/codebase/types/ts-data/sources/types.d.ts +30 -11
- package/codebase/types/ts-form/sources/elements/input.d.ts +7 -0
- package/codebase/types/ts-form/sources/elements/textarea.d.ts +4 -3
- package/codebase/types/ts-grid/index.d.ts +1 -1
- package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +23 -0
- package/codebase/types/ts-grid/sources/Grid.d.ts +18 -8
- package/codebase/types/ts-grid/sources/ProGrid.d.ts +50 -14
- package/codebase/types/ts-grid/sources/Selection.d.ts +28 -2
- package/codebase/types/ts-grid/sources/columnsResizer.d.ts +2 -2
- package/codebase/types/ts-grid/sources/helpers/data.d.ts +3 -3
- package/codebase/types/ts-grid/sources/helpers/default.d.ts +2 -0
- package/codebase/types/ts-grid/sources/helpers/keys.d.ts +3 -2
- package/codebase/types/ts-grid/sources/locales/en.d.ts +7 -0
- package/codebase/types/ts-grid/sources/types.d.ts +378 -338
- package/codebase/types/ts-grid/sources/ui/Cells.d.ts +4 -2
- package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +2 -0
- package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +5 -3
- package/codebase/types/ts-grid/sources/ui/editors/TextAreaEditor.d.ts +3 -1
- package/codebase/types/ts-grid/sources/ui/group/panel.d.ts +12 -0
- package/codebase/types/ts-treegrid/index.d.ts +3 -0
- package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +28 -0
- package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +20 -0
- package/codebase/types/ts-treegrid/sources/types.d.ts +34 -0
- package/package.json +1 -1
- package/readme.txt +1 -1
- package/whatsnew.txt +60 -0
|
@@ -8,47 +8,110 @@ import { IHandlers, Id } from "../../ts-common/types";
|
|
|
8
8
|
import { ScrollView } from "../../ts-common/ScrollView";
|
|
9
9
|
import { ICalendarConfig } from "../../ts-calendar";
|
|
10
10
|
import { VNode } from "../../ts-common/dom";
|
|
11
|
+
import { INumberMask, IPatternMask } from "../../ts-common/input";
|
|
12
|
+
import { IGroupOrder, TDisplayMode } from "../../ts-data/sources/datacollection/group";
|
|
13
|
+
import { IGroupItem } from "./ui/group/panel";
|
|
14
|
+
import { ITreeGrid, ITreeGridConfig } from "../../ts-treegrid";
|
|
15
|
+
import { ISelection } from "./Selection";
|
|
16
|
+
export interface IGrid {
|
|
17
|
+
data: IDataCollection;
|
|
18
|
+
name: "grid" | string;
|
|
19
|
+
config: IGridConfig;
|
|
20
|
+
events: IEventSystem<GridEvents, IEventHandlersMap>;
|
|
21
|
+
selection: ISelection;
|
|
22
|
+
content: IContentList;
|
|
23
|
+
keyManager: IKeyManager;
|
|
24
|
+
export: any;
|
|
25
|
+
paint(): void;
|
|
26
|
+
destructor(): void;
|
|
27
|
+
setColumns(col: ICol[]): void;
|
|
28
|
+
addRowCss(rowId: Id, css: string): void;
|
|
29
|
+
removeRowCss(rowId: Id, css: string): void;
|
|
30
|
+
addCellCss(rowId: Id, colId: Id, css: string): void;
|
|
31
|
+
removeCellCss(rowId: Id, colId: Id, css: string): void;
|
|
32
|
+
getRootView(): any;
|
|
33
|
+
showColumn(colId: Id): void;
|
|
34
|
+
hideColumn(colId: Id): void;
|
|
35
|
+
isColumnHidden(colId: Id): boolean;
|
|
36
|
+
showRow(rowId: Id): void;
|
|
37
|
+
hideRow(rowId: Id): void;
|
|
38
|
+
isRowHidden(rowId: Id): boolean;
|
|
39
|
+
scroll(x?: number, y?: number): void;
|
|
40
|
+
scrollTo(rowId: Id, colId: Id): void;
|
|
41
|
+
getScrollState(): ICoords;
|
|
42
|
+
adjustColumnWidth(colId: Id, adjust?: IAdjustBy): void;
|
|
43
|
+
getCellRect(rowId: Id, colId: Id): ICellRect;
|
|
44
|
+
getColumn(colId: Id): ICol;
|
|
45
|
+
addSpan(spanObj: ISpan): void;
|
|
46
|
+
getSpan(rowId: Id, colId: Id): ISpan;
|
|
47
|
+
removeSpan(rowId: Id, colId: Id): void;
|
|
48
|
+
editCell(rowId: Id, colId: Id, editorType?: EditorType): void;
|
|
49
|
+
editEnd(withoutSave?: boolean): void;
|
|
50
|
+
getSortingState(): ISortingState;
|
|
51
|
+
getHeaderFilter(colId: Id): IHeaderFilter;
|
|
52
|
+
getRootNode(): HTMLElement;
|
|
53
|
+
getSummary(colId?: Id): ISummaryList;
|
|
54
|
+
}
|
|
55
|
+
export interface IExtendedGrid extends IGrid {
|
|
56
|
+
name: "progrid" | string;
|
|
57
|
+
scrollView: ScrollView;
|
|
58
|
+
config: IExtendedGridConfig;
|
|
59
|
+
}
|
|
60
|
+
export interface IProGrid extends ITreeGrid {
|
|
61
|
+
config: IProGridConfig;
|
|
62
|
+
}
|
|
11
63
|
export interface IGridConfig extends IDragConfig {
|
|
12
64
|
columns?: ICol[];
|
|
13
65
|
spans?: ISpan[];
|
|
14
|
-
data?:
|
|
15
|
-
type?: "tree";
|
|
66
|
+
data?: IRow[];
|
|
16
67
|
width?: number;
|
|
17
68
|
height?: number | "auto";
|
|
18
|
-
|
|
19
|
-
|
|
69
|
+
autoWidth?: boolean;
|
|
70
|
+
rowHeight?: number;
|
|
71
|
+
headerRowHeight?: number;
|
|
72
|
+
footerRowHeight?: number;
|
|
20
73
|
leftSplit?: number;
|
|
21
74
|
topSplit?: number;
|
|
22
75
|
rightSplit?: number;
|
|
23
76
|
bottomSplit?: number;
|
|
77
|
+
sortable?: boolean;
|
|
78
|
+
editable?: boolean;
|
|
79
|
+
resizable?: boolean;
|
|
80
|
+
groupable?: boolean;
|
|
81
|
+
closable?: boolean;
|
|
82
|
+
css?: string;
|
|
83
|
+
rowCss?: (row: IRow) => string;
|
|
84
|
+
exportStyles?: boolean | string[];
|
|
24
85
|
selection?: ISelectionType;
|
|
25
86
|
multiselection?: boolean;
|
|
26
87
|
dragItem?: IDragType;
|
|
27
|
-
keyNavigation?: boolean;
|
|
28
|
-
hotkeys?: IHandlers;
|
|
29
|
-
css?: string;
|
|
30
|
-
editable?: boolean;
|
|
31
|
-
autoEmptyRow?: boolean;
|
|
32
|
-
resizable?: boolean;
|
|
33
|
-
htmlEnable?: boolean;
|
|
34
88
|
tooltip?: boolean | IGridTooltipConfig;
|
|
35
89
|
headerTooltip?: boolean | IGridTooltipConfig;
|
|
36
90
|
footerTooltip?: boolean | IGridTooltipConfig;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
autoWidth?: boolean;
|
|
41
|
-
autoHeight?: boolean;
|
|
42
|
-
headerAutoHeight?: boolean;
|
|
43
|
-
footerAutoHeight?: boolean;
|
|
91
|
+
keyNavigation?: boolean;
|
|
92
|
+
autoEmptyRow?: boolean;
|
|
93
|
+
htmlEnable?: boolean;
|
|
44
94
|
adjust?: IAdjustBy;
|
|
45
95
|
eventHandlers?: {
|
|
46
96
|
[eventName: string]: {
|
|
47
97
|
[className: string]: (event: Event, item: ICellObj) => void;
|
|
48
98
|
};
|
|
49
99
|
};
|
|
50
|
-
|
|
100
|
+
summary?: ISummary;
|
|
101
|
+
hotkeys?: IHandlers;
|
|
51
102
|
rootParent?: Id;
|
|
103
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
104
|
+
groupTitleTemplate?: (groupName: string, groupItems: IDataItem[]) => string;
|
|
105
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
106
|
+
editing?: boolean;
|
|
107
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
108
|
+
headerSort?: boolean;
|
|
109
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
110
|
+
columnsAutoWidth?: boolean;
|
|
111
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
112
|
+
fitToContainer?: boolean;
|
|
113
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
114
|
+
splitAt?: number;
|
|
52
115
|
$width?: number;
|
|
53
116
|
$height?: number;
|
|
54
117
|
$headerHeight?: number;
|
|
@@ -70,7 +133,218 @@ export interface IGridConfig extends IDragConfig {
|
|
|
70
133
|
$resizing?: string | number;
|
|
71
134
|
$scrollBarWidth?: IScrollBarWidth;
|
|
72
135
|
$data?: any[];
|
|
73
|
-
|
|
136
|
+
$grouped?: IGroupItem[];
|
|
137
|
+
}
|
|
138
|
+
export type IProGridConfig = IExtendedGridConfig & ITreeGridConfig;
|
|
139
|
+
export interface IExtendedGridConfig extends IGridConfig {
|
|
140
|
+
height?: number | "auto";
|
|
141
|
+
autoHeight?: boolean;
|
|
142
|
+
headerAutoHeight?: boolean;
|
|
143
|
+
footerAutoHeight?: boolean;
|
|
144
|
+
group?: boolean | IGroup;
|
|
145
|
+
dragItem?: IDragType;
|
|
146
|
+
}
|
|
147
|
+
export interface IRendererConfig extends Required<IProGridConfig> {
|
|
148
|
+
scroll?: IScrollState;
|
|
149
|
+
datacollection: any;
|
|
150
|
+
filteredColumns?: ICol[];
|
|
151
|
+
currentColumns?: ICol[];
|
|
152
|
+
currentRows?: IRow[];
|
|
153
|
+
currentSpans?: ISpan[];
|
|
154
|
+
fixedColumns?: IFixedColumns;
|
|
155
|
+
fixedRows?: IFixedRows;
|
|
156
|
+
firstColId?: Id;
|
|
157
|
+
headerHeight?: number;
|
|
158
|
+
footerHeight?: number;
|
|
159
|
+
events?: IEventSystem<GridEvents, IEventHandlersMap>;
|
|
160
|
+
selection: any;
|
|
161
|
+
sortBy?: Id;
|
|
162
|
+
sortDir?: string;
|
|
163
|
+
filterLocation?: string;
|
|
164
|
+
content?: IContentList;
|
|
165
|
+
gridId?: string;
|
|
166
|
+
commonSummary: ISummaryList;
|
|
167
|
+
colSummary: {
|
|
168
|
+
[colId: string]: ISummaryList;
|
|
169
|
+
};
|
|
170
|
+
$renderFrom?: RenderFrom;
|
|
171
|
+
_events?: IEventSystem<GridSystemEvents>;
|
|
172
|
+
}
|
|
173
|
+
export declare enum GridEvents {
|
|
174
|
+
scroll = "scroll",
|
|
175
|
+
expand = "expand",
|
|
176
|
+
filterChange = "filterChange",
|
|
177
|
+
beforeFilter = "beforeFilter",
|
|
178
|
+
beforeResizeStart = "beforeResizeStart",
|
|
179
|
+
resize = "resize",
|
|
180
|
+
afterResizeEnd = "afterResizeEnd",
|
|
181
|
+
cellClick = "cellClick",
|
|
182
|
+
cellRightClick = "cellRightClick",
|
|
183
|
+
cellMouseOver = "cellMouseOver",
|
|
184
|
+
cellMouseDown = "cellMouseDown",
|
|
185
|
+
cellDblClick = "cellDblClick",
|
|
186
|
+
headerCellClick = "headerCellClick",
|
|
187
|
+
footerCellClick = "footerCellClick",
|
|
188
|
+
headerCellMouseOver = "headerCellMouseOver",
|
|
189
|
+
footerCellMouseOver = "footerCellMouseOver",
|
|
190
|
+
headerCellMouseDown = "headerCellMouseDown",
|
|
191
|
+
footerCellMouseDown = "footerCellMouseDown",
|
|
192
|
+
headerCellDblClick = "headerCellDblClick",
|
|
193
|
+
footerCellDblClick = "footerCellDblClick",
|
|
194
|
+
headerCellRightClick = "headerCellRightClick",
|
|
195
|
+
footerCellRightClick = "footerCellRightClick",
|
|
196
|
+
beforeEditStart = "beforeEditStart",
|
|
197
|
+
afterEditStart = "afterEditStart",
|
|
198
|
+
beforeEditEnd = "beforeEditEnd",
|
|
199
|
+
afterEditEnd = "afterEditEnd",
|
|
200
|
+
beforeKeyDown = "beforeKeyDown",
|
|
201
|
+
afterKeyDown = "afterKeyDown",
|
|
202
|
+
beforeColumnHide = "beforeColumnHide",
|
|
203
|
+
afterColumnHide = "afterColumnHide",
|
|
204
|
+
beforeColumnShow = "beforeColumnShow",
|
|
205
|
+
afterColumnShow = "afterColumnShow",
|
|
206
|
+
beforeRowHide = "beforeRowHide",
|
|
207
|
+
afterRowHide = "afterRowHide",
|
|
208
|
+
beforeRowShow = "beforeRowShow",
|
|
209
|
+
afterRowShow = "afterRowShow",
|
|
210
|
+
beforeRowDrag = "beforeRowDrag",
|
|
211
|
+
dragRowStart = "dragRowStart",
|
|
212
|
+
dragRowOut = "dragRowOut",
|
|
213
|
+
dragRowIn = "dragRowIn",
|
|
214
|
+
canRowDrop = "canRowDrop",
|
|
215
|
+
cancelRowDrop = "cancelRowDrop",
|
|
216
|
+
beforeRowDrop = "beforeRowDrop",
|
|
217
|
+
afterRowDrop = "afterRowDrop",
|
|
218
|
+
afterRowDrag = "afterRowDrag",
|
|
219
|
+
beforeColumnDrag = "beforeColumnDrag",
|
|
220
|
+
dragColumnStart = "dragColumnStart",
|
|
221
|
+
dragColumnOut = "dragColumnOut",
|
|
222
|
+
dragColumnIn = "dragColumnIn",
|
|
223
|
+
canColumnDrop = "canColumnDrop",
|
|
224
|
+
cancelColumnDrop = "cancelColumnDrop",
|
|
225
|
+
beforeColumnDrop = "beforeColumnDrop",
|
|
226
|
+
afterColumnDrop = "afterColumnDrop",
|
|
227
|
+
afterColumnDrag = "afterColumnDrag",
|
|
228
|
+
beforeRowResize = "beforeRowResize",
|
|
229
|
+
afterRowResize = "afterRowResize",
|
|
230
|
+
beforeSort = "beforeSort",
|
|
231
|
+
afterSort = "afterSort",
|
|
232
|
+
groupPanelItemClick = "groupPanelItemClick",
|
|
233
|
+
groupPanelItemMouseDown = "groupPanelItemMouseDown"
|
|
234
|
+
}
|
|
235
|
+
export interface IEventHandlersMap {
|
|
236
|
+
[key: string]: (...args: any[]) => any;
|
|
237
|
+
[GridEvents.scroll]: (scrollState: ICoords) => void;
|
|
238
|
+
[GridEvents.beforeSort]: (column: ICol, dir: Dirs) => void | boolean;
|
|
239
|
+
[GridEvents.afterSort]: (column: ICol, dir: Dirs) => void;
|
|
240
|
+
[GridEvents.filterChange]: (value: string | string[], colId: Id, filterId: TContentFilter, silent?: boolean) => void;
|
|
241
|
+
[GridEvents.beforeFilter]: (value: string, colId: Id) => void | boolean;
|
|
242
|
+
[GridEvents.beforeResizeStart]: (column: ICol, event: MouseEvent) => boolean | void;
|
|
243
|
+
[GridEvents.resize]: (column: ICol, event: MouseEvent) => void;
|
|
244
|
+
[GridEvents.afterResizeEnd]: (column: ICol, event: MouseEvent) => void;
|
|
245
|
+
[GridEvents.cellClick]: (row: IRow, column: ICol, event: MouseEvent) => void;
|
|
246
|
+
[GridEvents.cellRightClick]: (row: IRow, column: ICol, event: MouseEvent) => void;
|
|
247
|
+
[GridEvents.cellMouseOver]: (row: IRow, column: ICol, event: MouseEvent) => void;
|
|
248
|
+
[GridEvents.cellMouseDown]: (row: IRow, column: ICol, event: MouseEvent & TouchEvent) => void;
|
|
249
|
+
[GridEvents.cellDblClick]: (row: IRow, column: ICol, event: MouseEvent) => void;
|
|
250
|
+
[GridEvents.headerCellClick]: (cell: IHeader, column: ICol, event: MouseEvent) => void;
|
|
251
|
+
[GridEvents.footerCellClick]: (cell: IFooter, column: ICol, event: MouseEvent) => void;
|
|
252
|
+
[GridEvents.headerCellMouseOver]: (cell: IHeader, column: ICol, event: MouseEvent) => void;
|
|
253
|
+
[GridEvents.footerCellMouseOver]: (cell: IFooter, column: ICol, event: MouseEvent) => void;
|
|
254
|
+
[GridEvents.headerCellMouseDown]: (cell: IHeader, column: ICol, event: MouseEvent & TouchEvent) => void;
|
|
255
|
+
[GridEvents.footerCellMouseDown]: (cell: IFooter, column: ICol, event: MouseEvent & TouchEvent) => void;
|
|
256
|
+
[GridEvents.headerCellDblClick]: (cell: IHeader, column: ICol, event: MouseEvent) => void;
|
|
257
|
+
[GridEvents.footerCellDblClick]: (cell: IFooter, column: ICol, event: MouseEvent) => void;
|
|
258
|
+
[GridEvents.headerCellRightClick]: (cell: IHeader, column: ICol, event: MouseEvent) => void;
|
|
259
|
+
[GridEvents.footerCellRightClick]: (cell: IFooter, column: ICol, event: MouseEvent) => void;
|
|
260
|
+
[GridEvents.beforeEditStart]: (row: IRow, col: ICol, editorType: EditorType) => boolean | void;
|
|
261
|
+
[GridEvents.afterEditStart]: (row: IRow, col: ICol, editorType: EditorType) => void;
|
|
262
|
+
[GridEvents.beforeEditEnd]: (value: string | number | boolean | Date, row: IRow, column: ICol) => boolean | void;
|
|
263
|
+
[GridEvents.afterEditEnd]: (value: string | number | boolean | Date, row: IRow, column: ICol) => void;
|
|
264
|
+
[GridEvents.beforeKeyDown]: (event: Event) => boolean | void;
|
|
265
|
+
[GridEvents.afterKeyDown]: (event: Event) => void;
|
|
266
|
+
[GridEvents.beforeColumnHide]: (column: ICol) => boolean | void;
|
|
267
|
+
[GridEvents.afterColumnHide]: (column: ICol) => void;
|
|
268
|
+
[GridEvents.beforeColumnShow]: (column: ICol) => boolean | void;
|
|
269
|
+
[GridEvents.afterColumnShow]: (column: ICol) => void;
|
|
270
|
+
[GridEvents.beforeRowHide]: (row: IRow) => boolean | void;
|
|
271
|
+
[GridEvents.afterRowHide]: (row: IRow) => void;
|
|
272
|
+
[GridEvents.beforeRowShow]: (row: IRow) => boolean | void;
|
|
273
|
+
[GridEvents.afterRowShow]: (row: IRow) => void;
|
|
274
|
+
[GridEvents.beforeRowDrag]: (data: IDragInfo, event: MouseEvent) => void | boolean;
|
|
275
|
+
[GridEvents.dragRowStart]: (data: IDragInfo, event: MouseEvent) => void;
|
|
276
|
+
[GridEvents.dragRowOut]: (data: IDragInfo, event: MouseEvent) => void;
|
|
277
|
+
[GridEvents.dragRowIn]: (data: IDragInfo, event: MouseEvent) => void;
|
|
278
|
+
[GridEvents.canRowDrop]: (data: IDragInfo, event: MouseEvent) => void;
|
|
279
|
+
[GridEvents.cancelRowDrop]: (data: IDragInfo, event: MouseEvent) => void;
|
|
280
|
+
[GridEvents.beforeRowDrop]: (data: IDragInfo, event: MouseEvent) => void | boolean;
|
|
281
|
+
[GridEvents.afterRowDrop]: (data: IDragInfo, event: MouseEvent) => void;
|
|
282
|
+
[GridEvents.afterRowDrag]: (data: IDragInfo, event: MouseEvent) => void;
|
|
283
|
+
[GridEvents.beforeColumnDrag]: (data: IDragInfo, event: MouseEvent) => void | boolean;
|
|
284
|
+
[GridEvents.dragColumnStart]: (data: IDragInfo, event: MouseEvent) => void;
|
|
285
|
+
[GridEvents.dragColumnOut]: (data: IDragInfo, event: MouseEvent) => void;
|
|
286
|
+
[GridEvents.dragColumnIn]: (data: IDragInfo, event: MouseEvent) => void;
|
|
287
|
+
[GridEvents.canColumnDrop]: (data: IDragInfo, event: MouseEvent) => void;
|
|
288
|
+
[GridEvents.cancelColumnDrop]: (data: IDragInfo, event: MouseEvent) => void;
|
|
289
|
+
[GridEvents.beforeColumnDrop]: (data: IDragInfo, event: MouseEvent) => void | boolean;
|
|
290
|
+
[GridEvents.afterColumnDrop]: (data: IDragInfo, event: MouseEvent) => void;
|
|
291
|
+
[GridEvents.afterColumnDrag]: (data: IDragInfo, event: MouseEvent) => void;
|
|
292
|
+
[GridEvents.beforeRowResize]: (row: IRow, event: Event, currentHeight: number) => boolean;
|
|
293
|
+
[GridEvents.afterRowResize]: (row: IRow, event: Event, currentHeight: number) => void;
|
|
294
|
+
[GridEvents.groupPanelItemClick]: (id: string, event: Event) => void;
|
|
295
|
+
[GridEvents.groupPanelItemMouseDown]: (id: string, event: MouseEvent | TouchEvent) => void;
|
|
296
|
+
[GridEvents.expand]: (rowId: Id) => void;
|
|
297
|
+
}
|
|
298
|
+
export declare enum GridSystemEvents {
|
|
299
|
+
cellTouchMove = "cellTouchMove",
|
|
300
|
+
cellTouchEnd = "cellTouchEnd",
|
|
301
|
+
headerCellTouchMove = "headerCellTouchMove",
|
|
302
|
+
headerCellTouchEnd = "headerCellTouchEnd",
|
|
303
|
+
groupPanelItemTouchMove = "groupPanelItemTouchMove",
|
|
304
|
+
groupPanelItemItemTouchEnd = "groupPanelItemItemTouchEnd"
|
|
305
|
+
}
|
|
306
|
+
export interface ISystemEventHandlersMap {
|
|
307
|
+
[key: string]: (...args: any[]) => any;
|
|
308
|
+
[GridSystemEvents.cellTouchMove]: (row: IRow, col: ICol, event: TouchEvent) => void;
|
|
309
|
+
[GridSystemEvents.cellTouchEnd]: (row: IRow, col: ICol, event: TouchEvent) => void;
|
|
310
|
+
[GridSystemEvents.headerCellTouchMove]: (cell: IHeader, col: ICol, event: TouchEvent) => void;
|
|
311
|
+
[GridSystemEvents.headerCellTouchEnd]: (cell: IHeader, col: ICol, event: TouchEvent) => void;
|
|
312
|
+
[GridSystemEvents.groupPanelItemTouchMove]: (id: string, event: TouchEvent) => void;
|
|
313
|
+
[GridSystemEvents.groupPanelItemItemTouchEnd]: (id: string, event: TouchEvent) => void;
|
|
314
|
+
}
|
|
315
|
+
export interface ICol {
|
|
316
|
+
id: Id;
|
|
317
|
+
type?: colType;
|
|
318
|
+
header?: IHeader[];
|
|
319
|
+
footer?: IFooter[];
|
|
320
|
+
width?: number;
|
|
321
|
+
minWidth?: number;
|
|
322
|
+
maxWidth?: number;
|
|
323
|
+
autoWidth?: boolean;
|
|
324
|
+
adjust?: IAdjustBy;
|
|
325
|
+
align?: IAlign;
|
|
326
|
+
mark?: IMark | MarkFunction;
|
|
327
|
+
numberMask?: INumberMask | boolean;
|
|
328
|
+
patternMask?: IPatternMask | string;
|
|
329
|
+
template?: (cellValue: any, row: IRow, col: ICol) => string;
|
|
330
|
+
editorType?: EditorType;
|
|
331
|
+
editorConfig?: IComboEditorConfig | IDatePickerConfig | IInputEditorConfig;
|
|
332
|
+
options?: ((col: ICol, row?: IRow) => TOption[]) | TOption[];
|
|
333
|
+
editable?: boolean;
|
|
334
|
+
resizable?: boolean;
|
|
335
|
+
sortable?: boolean;
|
|
336
|
+
draggable?: boolean;
|
|
337
|
+
groupable?: boolean;
|
|
338
|
+
closable?: boolean;
|
|
339
|
+
htmlEnable?: boolean;
|
|
340
|
+
hidden?: boolean;
|
|
341
|
+
tooltip?: boolean | IGridTooltipConfig;
|
|
342
|
+
tooltipTemplate?: (cellValue: any, row: IRow, col: ICol) => string;
|
|
343
|
+
dateFormat?: string;
|
|
344
|
+
summary?: TSummary;
|
|
345
|
+
gravity?: number;
|
|
346
|
+
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
347
|
+
format?: string;
|
|
74
348
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
75
349
|
editing?: boolean;
|
|
76
350
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
@@ -79,8 +353,84 @@ export interface IGridConfig extends IDragConfig {
|
|
|
79
353
|
columnsAutoWidth?: boolean;
|
|
80
354
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
81
355
|
fitToContainer?: boolean;
|
|
82
|
-
|
|
83
|
-
|
|
356
|
+
$cellCss?: {
|
|
357
|
+
[key: string]: string;
|
|
358
|
+
};
|
|
359
|
+
$uniqueData?: any[];
|
|
360
|
+
$activeFilterData?: any[];
|
|
361
|
+
$width?: number;
|
|
362
|
+
$fixedWidth?: boolean;
|
|
363
|
+
$customOptions?: any;
|
|
364
|
+
$target?: "left" | "right";
|
|
365
|
+
}
|
|
366
|
+
export interface IRow {
|
|
367
|
+
id?: Id;
|
|
368
|
+
height?: number;
|
|
369
|
+
hidden?: boolean;
|
|
370
|
+
[key: string]: any;
|
|
371
|
+
$height?: number;
|
|
372
|
+
}
|
|
373
|
+
export interface ISpan {
|
|
374
|
+
row: Id;
|
|
375
|
+
column: Id;
|
|
376
|
+
rowspan?: number;
|
|
377
|
+
colspan?: number;
|
|
378
|
+
text?: string | ((args: ISummaryList) => string);
|
|
379
|
+
css?: string;
|
|
380
|
+
tooltip?: boolean | IGridTooltipConfig;
|
|
381
|
+
tooltipTemplate?: (content: {
|
|
382
|
+
value: string;
|
|
383
|
+
} & ISummaryList, span: ISpan) => string | boolean;
|
|
384
|
+
$rowsVisibility?: number[];
|
|
385
|
+
$colsVisibility?: number[];
|
|
386
|
+
$renderFrom?: RenderFrom[];
|
|
387
|
+
}
|
|
388
|
+
export interface IContent {
|
|
389
|
+
id?: string;
|
|
390
|
+
text?: string | ((args: ISummaryList) => string);
|
|
391
|
+
colspan?: number;
|
|
392
|
+
rowspan?: number;
|
|
393
|
+
css?: string;
|
|
394
|
+
align?: IAlign;
|
|
395
|
+
tooltip?: boolean | IGridTooltipConfig;
|
|
396
|
+
htmlEnable?: boolean;
|
|
397
|
+
}
|
|
398
|
+
export interface IHeader extends IContent {
|
|
399
|
+
content?: TContentFilter;
|
|
400
|
+
filterConfig?: IComboFilterConfig;
|
|
401
|
+
customFilter?: (item: any, input: string) => boolean;
|
|
402
|
+
headerSort?: boolean;
|
|
403
|
+
sortAs?: SortFunction;
|
|
404
|
+
tooltipTemplate?: (content: {
|
|
405
|
+
value: string;
|
|
406
|
+
} & ISummaryList, header: IHeader, column: ICol) => string | boolean;
|
|
407
|
+
}
|
|
408
|
+
export interface IFooter extends IContent {
|
|
409
|
+
tooltipTemplate?: (content: {
|
|
410
|
+
value: string;
|
|
411
|
+
} & ISummaryList, header: IFooter, column: ICol) => string | boolean;
|
|
412
|
+
}
|
|
413
|
+
export interface ISummaryList {
|
|
414
|
+
[key: string]: string | number | null;
|
|
415
|
+
}
|
|
416
|
+
export type TSummaryMethod = (row: IRow[]) => string | number;
|
|
417
|
+
export interface ISummary {
|
|
418
|
+
[key: string]: string | [string, string] | TSummaryMethod;
|
|
419
|
+
}
|
|
420
|
+
export type TSummary = ISummary | string;
|
|
421
|
+
export type TGroupType = TDisplayMode;
|
|
422
|
+
export type IGroupOrderItem = string | IGroupOrder | ((row: IRow) => string);
|
|
423
|
+
export interface IGroup {
|
|
424
|
+
type?: TGroupType;
|
|
425
|
+
panel?: boolean;
|
|
426
|
+
panelHeight: number;
|
|
427
|
+
hideableColumns?: boolean;
|
|
428
|
+
showMissed?: boolean | string;
|
|
429
|
+
fields?: {
|
|
430
|
+
[colId: string]: Omit<IGroupOrder, "by">;
|
|
431
|
+
};
|
|
432
|
+
order?: IGroupOrderItem[];
|
|
433
|
+
column?: string | ICol;
|
|
84
434
|
}
|
|
85
435
|
export interface IGridTooltipConfig {
|
|
86
436
|
force?: boolean;
|
|
@@ -116,75 +466,10 @@ interface IFixedRows {
|
|
|
116
466
|
bottom: IRow[];
|
|
117
467
|
}
|
|
118
468
|
type RenderFrom = "leftFixedCols" | "rightFixedCols" | "topFixedRows" | "bottomFixedRows" | "render";
|
|
119
|
-
export interface IRendererConfig extends Required<IGridConfig> {
|
|
120
|
-
scroll?: IScrollState;
|
|
121
|
-
datacollection: any;
|
|
122
|
-
filteredColumns?: ICol[];
|
|
123
|
-
currentColumns?: ICol[];
|
|
124
|
-
currentRows?: IRow[];
|
|
125
|
-
currentSpans?: ISpan[];
|
|
126
|
-
fixedColumns?: IFixedColumns;
|
|
127
|
-
fixedRows?: IFixedRows;
|
|
128
|
-
firstColId?: Id;
|
|
129
|
-
headerHeight?: number;
|
|
130
|
-
footerHeight?: number;
|
|
131
|
-
events?: IEventSystem<GridEvents, IEventHandlersMap>;
|
|
132
|
-
selection: any;
|
|
133
|
-
sortBy?: Id;
|
|
134
|
-
sortDir?: string;
|
|
135
|
-
filterLocation?: string;
|
|
136
|
-
content?: IContentList;
|
|
137
|
-
gridId?: string;
|
|
138
|
-
$renderFrom?: RenderFrom;
|
|
139
|
-
_events?: IEventSystem<GridSystemEvents>;
|
|
140
|
-
}
|
|
141
469
|
export interface ISortingState {
|
|
142
470
|
dir: Dirs;
|
|
143
471
|
by: Id;
|
|
144
472
|
}
|
|
145
|
-
export interface IGrid {
|
|
146
|
-
data: IDataCollection;
|
|
147
|
-
export: any;
|
|
148
|
-
name: "grid";
|
|
149
|
-
config: IGridConfig;
|
|
150
|
-
events: IEventSystem<GridEvents, IEventHandlersMap>;
|
|
151
|
-
selection: ISelection;
|
|
152
|
-
content: IContentList;
|
|
153
|
-
keyManager: IKeyManager;
|
|
154
|
-
paint(): void;
|
|
155
|
-
destructor(): void;
|
|
156
|
-
setColumns(col: ICol[]): void;
|
|
157
|
-
addRowCss(rowId: Id, css: string): void;
|
|
158
|
-
removeRowCss(rowId: Id, css: string): void;
|
|
159
|
-
addCellCss(rowId: Id, colId: Id, css: string): void;
|
|
160
|
-
removeCellCss(rowId: Id, colId: Id, css: string): void;
|
|
161
|
-
getRootView(): any;
|
|
162
|
-
showColumn(colId: Id): void;
|
|
163
|
-
hideColumn(colId: Id): void;
|
|
164
|
-
isColumnHidden(colId: Id): boolean;
|
|
165
|
-
showRow(rowId: Id): void;
|
|
166
|
-
hideRow(rowId: Id): void;
|
|
167
|
-
isRowHidden(rowId: Id): boolean;
|
|
168
|
-
scroll(x?: number, y?: number): void;
|
|
169
|
-
scrollTo(rowId: Id, colId: Id): void;
|
|
170
|
-
getScrollState(): ICoords;
|
|
171
|
-
adjustColumnWidth(colId: Id, adjust?: IAdjustBy): void;
|
|
172
|
-
getCellRect(rowId: Id, colId: Id): ICellRect;
|
|
173
|
-
getColumn(colId: Id): ICol;
|
|
174
|
-
addSpan(spanObj: ISpan): void;
|
|
175
|
-
getSpan(rowId: Id, colId: Id): ISpan;
|
|
176
|
-
removeSpan(rowId: Id, colId: Id): void;
|
|
177
|
-
editCell(rowId: Id, colId: Id, editorType?: EditorType): void;
|
|
178
|
-
editEnd(withoutSave?: boolean): void;
|
|
179
|
-
getSortingState(): ISortingState;
|
|
180
|
-
getHeaderFilter(colId: Id): IHeaderFilter;
|
|
181
|
-
getRootNode(): HTMLElement;
|
|
182
|
-
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
183
|
-
edit(rowId: Id, colId: Id, editorType?: EditorType): void;
|
|
184
|
-
}
|
|
185
|
-
export interface IProGrid extends IGrid {
|
|
186
|
-
scrollView: ScrollView;
|
|
187
|
-
}
|
|
188
473
|
export type EditorType = "input" | "select" | "datePicker" | "checkbox" | "combobox" | "multiselect" | "textarea";
|
|
189
474
|
export interface IComboEditorConfig {
|
|
190
475
|
newOptions?: boolean;
|
|
@@ -203,6 +488,9 @@ export interface IInputEditorConfig {
|
|
|
203
488
|
min?: number;
|
|
204
489
|
max?: number;
|
|
205
490
|
}
|
|
491
|
+
export interface IDatePickerConfig extends ICalendarConfig {
|
|
492
|
+
asDateObject?: boolean;
|
|
493
|
+
}
|
|
206
494
|
export interface IBaseHandlersMap {
|
|
207
495
|
[key: string]: (...args: any[]) => any;
|
|
208
496
|
}
|
|
@@ -225,81 +513,13 @@ export interface IHeaderFilter {
|
|
|
225
513
|
}
|
|
226
514
|
export interface ICellRect extends ICoords, ISizes {
|
|
227
515
|
}
|
|
228
|
-
export type colType = "string" | "number" | "boolean" | "date"
|
|
516
|
+
export type colType = "string" | "number" | "boolean" | "date";
|
|
229
517
|
export interface IOption {
|
|
230
518
|
id: Id;
|
|
231
519
|
value: string;
|
|
232
520
|
}
|
|
233
521
|
export type TOption = IOption | string;
|
|
234
|
-
export
|
|
235
|
-
id: Id;
|
|
236
|
-
width?: number;
|
|
237
|
-
header?: IHeader[];
|
|
238
|
-
footer?: IFooter[];
|
|
239
|
-
minWidth?: number;
|
|
240
|
-
maxWidth?: number;
|
|
241
|
-
mark?: IMark | MarkFunction;
|
|
242
|
-
type?: colType;
|
|
243
|
-
format?: string;
|
|
244
|
-
editorType?: EditorType;
|
|
245
|
-
editorConfig?: IComboEditorConfig | ICalendarConfig | IInputEditorConfig;
|
|
246
|
-
editable?: boolean;
|
|
247
|
-
resizable?: boolean;
|
|
248
|
-
sortable?: boolean;
|
|
249
|
-
options?: ((col: ICol, row?: IRow) => TOption[]) | TOption[];
|
|
250
|
-
draggable?: boolean;
|
|
251
|
-
htmlEnable?: boolean;
|
|
252
|
-
template?: (cellValue: any, row: IRow, col: ICol) => string;
|
|
253
|
-
hidden?: boolean;
|
|
254
|
-
adjust?: IAdjustBy;
|
|
255
|
-
autoWidth?: boolean;
|
|
256
|
-
align?: IAlign;
|
|
257
|
-
tooltip?: boolean | IGridTooltipConfig;
|
|
258
|
-
tooltipTemplate?: (cellValue: any, row: IRow, col: ICol) => string;
|
|
259
|
-
gravity?: number;
|
|
260
|
-
$cellCss?: {
|
|
261
|
-
[key: string]: string;
|
|
262
|
-
};
|
|
263
|
-
$uniqueData?: any[];
|
|
264
|
-
$activeFilterData?: any[];
|
|
265
|
-
$width?: number;
|
|
266
|
-
$fixedWidth?: boolean;
|
|
267
|
-
$customOptions?: any;
|
|
268
|
-
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
269
|
-
dateFormat?: string;
|
|
270
|
-
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
271
|
-
editing?: boolean;
|
|
272
|
-
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
273
|
-
headerSort?: boolean;
|
|
274
|
-
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
275
|
-
columnsAutoWidth?: boolean;
|
|
276
|
-
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
277
|
-
fitToContainer?: boolean;
|
|
278
|
-
}
|
|
279
|
-
export type fixedRowContent = "inputFilter" | "selectFilter" | "comboFilter";
|
|
280
|
-
export type footerMethods = "avg" | "sum" | "max" | "min" | "count";
|
|
281
|
-
export interface IContent {
|
|
282
|
-
id?: string;
|
|
283
|
-
text?: string;
|
|
284
|
-
colspan?: number;
|
|
285
|
-
rowspan?: number;
|
|
286
|
-
css?: string;
|
|
287
|
-
align?: IAlign;
|
|
288
|
-
tooltip?: boolean | IGridTooltipConfig;
|
|
289
|
-
htmlEnable?: boolean;
|
|
290
|
-
}
|
|
291
|
-
export interface IHeader extends IContent {
|
|
292
|
-
content?: fixedRowContent | footerMethods;
|
|
293
|
-
filterConfig?: IComboFilterConfig;
|
|
294
|
-
customFilter?: (item: any, input: string) => boolean;
|
|
295
|
-
headerSort?: boolean;
|
|
296
|
-
sortAs?: SortFunction;
|
|
297
|
-
tooltipTemplate?: (value: string | undefined, header: IHeader, col: ICol) => string | boolean;
|
|
298
|
-
}
|
|
299
|
-
export interface IFooter extends IContent {
|
|
300
|
-
content?: footerMethods;
|
|
301
|
-
tooltipTemplate?: (value: string | undefined, header: IFooter, col: ICol) => string | boolean;
|
|
302
|
-
}
|
|
522
|
+
export type TContentFilter = "inputFilter" | "selectFilter" | "comboFilter";
|
|
303
523
|
export interface IComboFilterConfig {
|
|
304
524
|
data?: DataCollection<any> | any[];
|
|
305
525
|
readonly?: boolean;
|
|
@@ -309,19 +529,6 @@ export interface IComboFilterConfig {
|
|
|
309
529
|
virtual?: boolean;
|
|
310
530
|
multiselection?: boolean;
|
|
311
531
|
}
|
|
312
|
-
export interface ISpan {
|
|
313
|
-
row: Id;
|
|
314
|
-
column: Id;
|
|
315
|
-
rowspan?: number;
|
|
316
|
-
colspan?: number;
|
|
317
|
-
text?: string | number;
|
|
318
|
-
css?: string;
|
|
319
|
-
tooltip?: boolean | IGridTooltipConfig;
|
|
320
|
-
tooltipTemplate?: (spanValue: any, span: ISpan) => string;
|
|
321
|
-
$rowsVisibility?: number[];
|
|
322
|
-
$colsVisibility?: number[];
|
|
323
|
-
$renderFrom?: RenderFrom[];
|
|
324
|
-
}
|
|
325
532
|
export interface IComboFilterConfig {
|
|
326
533
|
data?: DataCollection<any> | any[];
|
|
327
534
|
readonly?: boolean;
|
|
@@ -362,140 +569,6 @@ export interface IExportData {
|
|
|
362
569
|
};
|
|
363
570
|
};
|
|
364
571
|
}
|
|
365
|
-
export declare enum GridEvents {
|
|
366
|
-
scroll = "scroll",
|
|
367
|
-
expand = "expand",
|
|
368
|
-
filterChange = "filterChange",
|
|
369
|
-
beforeFilter = "beforeFilter",
|
|
370
|
-
beforeResizeStart = "beforeResizeStart",
|
|
371
|
-
resize = "resize",
|
|
372
|
-
afterResizeEnd = "afterResizeEnd",
|
|
373
|
-
cellClick = "cellClick",
|
|
374
|
-
cellRightClick = "cellRightClick",
|
|
375
|
-
cellMouseOver = "cellMouseOver",
|
|
376
|
-
cellMouseDown = "cellMouseDown",
|
|
377
|
-
cellDblClick = "cellDblClick",
|
|
378
|
-
headerCellClick = "headerCellClick",
|
|
379
|
-
footerCellClick = "footerCellClick",
|
|
380
|
-
headerCellMouseOver = "headerCellMouseOver",
|
|
381
|
-
footerCellMouseOver = "footerCellMouseOver",
|
|
382
|
-
headerCellMouseDown = "headerCellMouseDown",
|
|
383
|
-
footerCellMouseDown = "footerCellMouseDown",
|
|
384
|
-
headerCellDblClick = "headerCellDblClick",
|
|
385
|
-
footerCellDblClick = "footerCellDblClick",
|
|
386
|
-
headerCellRightClick = "headerCellRightClick",
|
|
387
|
-
footerCellRightClick = "footerCellRightClick",
|
|
388
|
-
beforeEditStart = "beforeEditStart",
|
|
389
|
-
afterEditStart = "afterEditStart",
|
|
390
|
-
beforeEditEnd = "beforeEditEnd",
|
|
391
|
-
afterEditEnd = "afterEditEnd",
|
|
392
|
-
beforeKeyDown = "beforeKeyDown",
|
|
393
|
-
afterKeyDown = "afterKeyDown",
|
|
394
|
-
beforeColumnHide = "beforeColumnHide",
|
|
395
|
-
afterColumnHide = "afterColumnHide",
|
|
396
|
-
beforeColumnShow = "beforeColumnShow",
|
|
397
|
-
afterColumnShow = "afterColumnShow",
|
|
398
|
-
beforeRowHide = "beforeRowHide",
|
|
399
|
-
afterRowHide = "afterRowHide",
|
|
400
|
-
beforeRowShow = "beforeRowShow",
|
|
401
|
-
afterRowShow = "afterRowShow",
|
|
402
|
-
beforeRowDrag = "beforeRowDrag",
|
|
403
|
-
dragRowStart = "dragRowStart",
|
|
404
|
-
dragRowOut = "dragRowOut",
|
|
405
|
-
dragRowIn = "dragRowIn",
|
|
406
|
-
canRowDrop = "canRowDrop",
|
|
407
|
-
cancelRowDrop = "cancelRowDrop",
|
|
408
|
-
beforeRowDrop = "beforeRowDrop",
|
|
409
|
-
afterRowDrop = "afterRowDrop",
|
|
410
|
-
afterRowDrag = "afterRowDrag",
|
|
411
|
-
beforeColumnDrag = "beforeColumnDrag",
|
|
412
|
-
dragColumnStart = "dragColumnStart",
|
|
413
|
-
dragColumnOut = "dragColumnOut",
|
|
414
|
-
dragColumnIn = "dragColumnIn",
|
|
415
|
-
canColumnDrop = "canColumnDrop",
|
|
416
|
-
cancelColumnDrop = "cancelColumnDrop",
|
|
417
|
-
beforeColumnDrop = "beforeColumnDrop",
|
|
418
|
-
afterColumnDrop = "afterColumnDrop",
|
|
419
|
-
afterColumnDrag = "afterColumnDrag",
|
|
420
|
-
beforeRowResize = "beforeRowResize",
|
|
421
|
-
afterRowResize = "afterRowResize",
|
|
422
|
-
beforeSort = "beforeSort",
|
|
423
|
-
afterSort = "afterSort"
|
|
424
|
-
}
|
|
425
|
-
export interface IEventHandlersMap {
|
|
426
|
-
[key: string]: (...args: any[]) => any;
|
|
427
|
-
[GridEvents.scroll]: (scrollState: ICoords) => void;
|
|
428
|
-
[GridEvents.beforeSort]: (col: ICol, dir: Dirs) => void | boolean;
|
|
429
|
-
[GridEvents.afterSort]: (col: ICol, dir: Dirs) => void;
|
|
430
|
-
[GridEvents.filterChange]: (value: string | string[], colId: Id, filterId: fixedRowContent, silent?: boolean) => void;
|
|
431
|
-
[GridEvents.beforeFilter]: (value: string, colId: Id) => void | boolean;
|
|
432
|
-
[GridEvents.beforeResizeStart]: (col: ICol, e: MouseEvent) => boolean | void;
|
|
433
|
-
[GridEvents.resize]: (col: ICol, e: MouseEvent) => void;
|
|
434
|
-
[GridEvents.afterResizeEnd]: (col: ICol, e: MouseEvent) => void;
|
|
435
|
-
[GridEvents.cellClick]: (row: IRow, col: ICol, e: MouseEvent) => void;
|
|
436
|
-
[GridEvents.cellRightClick]: (row: IRow, col: ICol, e: MouseEvent) => void;
|
|
437
|
-
[GridEvents.cellMouseOver]: (row: IRow, col: ICol, e: MouseEvent) => void;
|
|
438
|
-
[GridEvents.cellMouseDown]: (row: IRow, col: ICol, e: MouseEvent & TouchEvent) => void;
|
|
439
|
-
[GridEvents.cellDblClick]: (row: IRow, col: ICol, e: MouseEvent) => void;
|
|
440
|
-
[GridEvents.headerCellClick]: (col: ICol, e: MouseEvent) => void;
|
|
441
|
-
[GridEvents.footerCellClick]: (col: ICol, e: MouseEvent) => void;
|
|
442
|
-
[GridEvents.headerCellMouseOver]: (col: ICol, e: MouseEvent) => void;
|
|
443
|
-
[GridEvents.footerCellMouseOver]: (col: ICol, e: MouseEvent) => void;
|
|
444
|
-
[GridEvents.headerCellMouseDown]: (col: ICol, e: MouseEvent & TouchEvent) => void;
|
|
445
|
-
[GridEvents.footerCellMouseDown]: (col: ICol, e: MouseEvent & TouchEvent) => void;
|
|
446
|
-
[GridEvents.headerCellDblClick]: (col: ICol, e: MouseEvent) => void;
|
|
447
|
-
[GridEvents.footerCellDblClick]: (col: ICol, e: MouseEvent) => void;
|
|
448
|
-
[GridEvents.headerCellRightClick]: (col: ICol, e: MouseEvent) => void;
|
|
449
|
-
[GridEvents.footerCellRightClick]: (col: ICol, e: MouseEvent) => void;
|
|
450
|
-
[GridEvents.beforeEditStart]: (row: IRow, col: ICol, editorType: EditorType) => boolean | void;
|
|
451
|
-
[GridEvents.afterEditStart]: (row: IRow, col: ICol, editorType: EditorType) => void;
|
|
452
|
-
[GridEvents.beforeEditEnd]: (value: string | number | boolean, row: IRow, col: ICol) => boolean | void;
|
|
453
|
-
[GridEvents.afterEditEnd]: (value: string | number | boolean, row: IRow, col: ICol) => void;
|
|
454
|
-
[GridEvents.beforeKeyDown]: (e: Event) => boolean | void;
|
|
455
|
-
[GridEvents.afterKeyDown]: (e: Event) => void;
|
|
456
|
-
[GridEvents.beforeColumnHide]: (col: ICol) => boolean | void;
|
|
457
|
-
[GridEvents.afterColumnHide]: (col: ICol) => void;
|
|
458
|
-
[GridEvents.beforeColumnShow]: (col: ICol) => boolean | void;
|
|
459
|
-
[GridEvents.afterColumnShow]: (col: ICol) => void;
|
|
460
|
-
[GridEvents.beforeRowHide]: (row: IRow) => boolean | void;
|
|
461
|
-
[GridEvents.afterRowHide]: (row: IRow) => void;
|
|
462
|
-
[GridEvents.beforeRowShow]: (row: IRow) => boolean | void;
|
|
463
|
-
[GridEvents.afterRowShow]: (row: IRow) => void;
|
|
464
|
-
[GridEvents.beforeRowDrag]: (data: IDragInfo, events: MouseEvent) => void | boolean;
|
|
465
|
-
[GridEvents.dragRowStart]: (data: IDragInfo, events: MouseEvent) => void;
|
|
466
|
-
[GridEvents.dragRowOut]: (data: IDragInfo, events: MouseEvent) => void;
|
|
467
|
-
[GridEvents.dragRowIn]: (data: IDragInfo, events: MouseEvent) => void;
|
|
468
|
-
[GridEvents.canRowDrop]: (data: IDragInfo, events: MouseEvent) => void;
|
|
469
|
-
[GridEvents.cancelRowDrop]: (data: IDragInfo, events: MouseEvent) => void;
|
|
470
|
-
[GridEvents.beforeRowDrop]: (data: IDragInfo, events: MouseEvent) => void | boolean;
|
|
471
|
-
[GridEvents.afterRowDrop]: (data: IDragInfo, events: MouseEvent) => void;
|
|
472
|
-
[GridEvents.afterRowDrag]: (data: IDragInfo, events: MouseEvent) => void;
|
|
473
|
-
[GridEvents.beforeColumnDrag]: (data: IDragInfo, events: MouseEvent) => void | boolean;
|
|
474
|
-
[GridEvents.dragColumnStart]: (data: IDragInfo, events: MouseEvent) => void;
|
|
475
|
-
[GridEvents.dragColumnOut]: (data: IDragInfo, events: MouseEvent) => void;
|
|
476
|
-
[GridEvents.dragColumnIn]: (data: IDragInfo, events: MouseEvent) => void;
|
|
477
|
-
[GridEvents.canColumnDrop]: (data: IDragInfo, events: MouseEvent) => void;
|
|
478
|
-
[GridEvents.cancelColumnDrop]: (data: IDragInfo, events: MouseEvent) => void;
|
|
479
|
-
[GridEvents.beforeColumnDrop]: (data: IDragInfo, events: MouseEvent) => void | boolean;
|
|
480
|
-
[GridEvents.afterColumnDrop]: (data: IDragInfo, events: MouseEvent) => void;
|
|
481
|
-
[GridEvents.afterColumnDrag]: (data: IDragInfo, events: MouseEvent) => void;
|
|
482
|
-
[GridEvents.beforeRowResize]: (row: IRow, events: Event, currentHeight: number) => boolean;
|
|
483
|
-
[GridEvents.afterRowResize]: (row: IRow, events: Event, currentHeight: number) => void;
|
|
484
|
-
[GridEvents.expand]: (rowId: Id) => void;
|
|
485
|
-
}
|
|
486
|
-
export declare enum GridSystemEvents {
|
|
487
|
-
cellTouchMove = "cellTouchMove",
|
|
488
|
-
cellTouchEnd = "cellTouchEnd",
|
|
489
|
-
headerCellTouchMove = "headerCellTouchMove",
|
|
490
|
-
headerCellTouchEnd = "headerCellTouchEnd"
|
|
491
|
-
}
|
|
492
|
-
export interface ISystemEventHandlersMap {
|
|
493
|
-
[key: string]: (...args: any[]) => any;
|
|
494
|
-
[GridSystemEvents.cellTouchMove]: (row: IRow, col: ICol, e: TouchEvent) => void;
|
|
495
|
-
[GridSystemEvents.cellTouchEnd]: (row: IRow, col: ICol, e: TouchEvent) => void;
|
|
496
|
-
[GridSystemEvents.headerCellTouchMove]: (col: ICol, e: TouchEvent) => void;
|
|
497
|
-
[GridSystemEvents.headerCellTouchEnd]: (col: ICol, e: TouchEvent) => void;
|
|
498
|
-
}
|
|
499
572
|
export interface ICellContent {
|
|
500
573
|
element?: any;
|
|
501
574
|
toHtml: (column: ICol, config: IRendererConfig) => any;
|
|
@@ -549,13 +622,6 @@ export interface ICell {
|
|
|
549
622
|
row: IRow;
|
|
550
623
|
column: ICol;
|
|
551
624
|
}
|
|
552
|
-
export interface IRow {
|
|
553
|
-
id?: Id;
|
|
554
|
-
height?: number;
|
|
555
|
-
hidden?: boolean;
|
|
556
|
-
$height?: number;
|
|
557
|
-
[key: string]: any;
|
|
558
|
-
}
|
|
559
625
|
export interface IEditor {
|
|
560
626
|
toHTML(text?: string): any;
|
|
561
627
|
endEdit(withoutSave?: boolean): void;
|
|
@@ -571,32 +637,6 @@ export interface IAdjustColumns {
|
|
|
571
637
|
totalCols?: ICol[];
|
|
572
638
|
adjust?: IAdjustBy;
|
|
573
639
|
}
|
|
574
|
-
export interface ISelectionConfig {
|
|
575
|
-
disabled?: boolean;
|
|
576
|
-
}
|
|
577
|
-
export interface ISelection {
|
|
578
|
-
config?: ISelectionConfig;
|
|
579
|
-
setCell(rowId?: IRow | Id, colId?: ICol | Id, ctrlUp?: boolean, shiftUp?: boolean): void;
|
|
580
|
-
getCell(): ICell | void;
|
|
581
|
-
getCells(): ICell[];
|
|
582
|
-
removeCell(rowId?: Id, colId?: Id): void;
|
|
583
|
-
disable(): void;
|
|
584
|
-
enable(): void;
|
|
585
|
-
toHTML(): VNode | VNode[];
|
|
586
|
-
}
|
|
587
|
-
export declare enum GridSelectionEvents {
|
|
588
|
-
beforeUnSelect = "beforeUnSelect",
|
|
589
|
-
afterUnSelect = "afterUnSelect",
|
|
590
|
-
beforeSelect = "beforeSelect",
|
|
591
|
-
afterSelect = "afterSelect"
|
|
592
|
-
}
|
|
593
|
-
export interface IGridSelectionEventsHandlersMap {
|
|
594
|
-
[key: string]: (...args: any[]) => any;
|
|
595
|
-
[GridSelectionEvents.afterSelect]: (row: IRow, col: ICol) => void;
|
|
596
|
-
[GridSelectionEvents.afterUnSelect]: (row: IRow, col: ICol) => void;
|
|
597
|
-
[GridSelectionEvents.beforeSelect]: (row: IRow, col: ICol) => boolean | void;
|
|
598
|
-
[GridSelectionEvents.beforeUnSelect]: (row: IRow, col: ICol) => boolean | void;
|
|
599
|
-
}
|
|
600
640
|
export type TRowStatus = "firstFilledRow" | "firstEmptyRow";
|
|
601
641
|
export declare enum Split {
|
|
602
642
|
left = "leftSplit",
|
|
@@ -605,7 +645,7 @@ export declare enum Split {
|
|
|
605
645
|
bottom = "bottomSplit"
|
|
606
646
|
}
|
|
607
647
|
export interface INormalizeColumnsParams {
|
|
608
|
-
config: IGridConfig;
|
|
648
|
+
config: IGridConfig & IProGridConfig;
|
|
609
649
|
columns: ICol[];
|
|
610
650
|
configChanged?: boolean;
|
|
611
651
|
}
|