@progress/kendo-vue-grid 3.0.3 → 3.0.5-dev.202202071439

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 (40) hide show
  1. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  2. package/dist/es/Grid.d.ts +1 -0
  3. package/dist/es/Grid.js +99 -23
  4. package/dist/es/VirtualScroll.d.ts +3 -1
  5. package/dist/es/VirtualScroll.js +16 -4
  6. package/dist/es/cells/GridCell.js +1 -1
  7. package/dist/es/columnMenu/ColumnMenuContent.js +2 -1
  8. package/dist/es/columnMenu/GridColumnMenuFilterCell.js +2 -1
  9. package/dist/es/columnMenu/GridColumnMenuFilterUI.js +3 -1
  10. package/dist/es/interfaces/GridCellProps.d.ts +6 -6
  11. package/dist/es/interfaces/GridColumnMenuExtendedFilterProps.d.ts +1 -1
  12. package/dist/es/interfaces/GridColumnMenuFilterProps.d.ts +1 -1
  13. package/dist/es/interfaces/GridColumnMenuFilterUIProps.d.ts +1 -1
  14. package/dist/es/interfaces/GridProps.d.ts +33 -21
  15. package/dist/es/interfaces/events.d.ts +4 -0
  16. package/dist/es/main.d.ts +1 -0
  17. package/dist/es/main.js +1 -0
  18. package/dist/es/package-metadata.js +1 -1
  19. package/dist/es/utils/index.d.ts +4 -0
  20. package/dist/es/utils/index.js +34 -0
  21. package/dist/npm/Grid.d.ts +1 -0
  22. package/dist/npm/Grid.js +99 -23
  23. package/dist/npm/VirtualScroll.d.ts +3 -1
  24. package/dist/npm/VirtualScroll.js +16 -4
  25. package/dist/npm/cells/GridCell.js +1 -1
  26. package/dist/npm/columnMenu/ColumnMenuContent.js +2 -1
  27. package/dist/npm/columnMenu/GridColumnMenuFilterCell.js +2 -1
  28. package/dist/npm/columnMenu/GridColumnMenuFilterUI.js +3 -1
  29. package/dist/npm/interfaces/GridCellProps.d.ts +6 -6
  30. package/dist/npm/interfaces/GridColumnMenuExtendedFilterProps.d.ts +1 -1
  31. package/dist/npm/interfaces/GridColumnMenuFilterProps.d.ts +1 -1
  32. package/dist/npm/interfaces/GridColumnMenuFilterUIProps.d.ts +1 -1
  33. package/dist/npm/interfaces/GridProps.d.ts +33 -21
  34. package/dist/npm/interfaces/events.d.ts +4 -0
  35. package/dist/npm/main.d.ts +1 -0
  36. package/dist/npm/main.js +11 -0
  37. package/dist/npm/package-metadata.js +1 -1
  38. package/dist/npm/utils/index.d.ts +4 -0
  39. package/dist/npm/utils/index.js +36 -1
  40. package/package.json +13 -13
package/dist/es/Grid.d.ts CHANGED
@@ -131,6 +131,7 @@ export interface GridState {
131
131
  export interface GridComputed {
132
132
  [key: string]: any;
133
133
  getCorrectHeight: any;
134
+ currentGroupable: boolean;
134
135
  }
135
136
  /**
136
137
  * @hidden
package/dist/es/Grid.js CHANGED
@@ -69,14 +69,11 @@ import { ColumnResize } from './drag/ColumnResize';
69
69
  import { CommonDragLogic } from './drag/CommonDragLogic';
70
70
  import { DragClue } from './drag/DragClue';
71
71
  import { DropClue } from './drag/DropClue';
72
- import { getNestedValue, flatData, mapColumns, readColumns, autoGenerateColumns } from './utils/index'; // import { GridCellProps } from './interfaces/GridCellProps';
73
-
74
- import { GridCell } from './cells/GridCell'; // import { GridToolbar } from './GridToolbar';
75
-
72
+ import { getNestedValue, flatData, mapColumns, readColumns, autoGenerateColumns, applyExpandedState } from './utils/index';
73
+ import { GridCell } from './cells/GridCell';
76
74
  import { GridGroupCell } from './cells/GridGroupCell';
77
75
  import { GridRow } from './rows/GridRow';
78
- import { GridHeaderSelectionCell } from './header/GridHeaderSelectionCell'; // import { ScrollMode } from './ScrollMode';
79
-
76
+ import { GridHeaderSelectionCell } from './header/GridHeaderSelectionCell';
80
77
  import { GridNoRecords } from './GridNoRecords';
81
78
  import { packageMetadata } from './package-metadata';
82
79
  import { pagerMessagesMap } from './messages';
@@ -87,6 +84,12 @@ import { pagerMessagesMap } from './messages';
87
84
  var GridVue2 = {
88
85
  name: 'KendoGrid',
89
86
  props: {
87
+ topCacheCount: {
88
+ type: Number,
89
+ default: 4
90
+ },
91
+ totalGroupedHeight: Number,
92
+ allGroupedItems: Object,
90
93
  alternatePerGroup: Boolean,
91
94
  columns: Array,
92
95
  columnVirtualization: Boolean,
@@ -157,8 +160,8 @@ var GridVue2 = {
157
160
  validatePackage(packageMetadata);
158
161
  this.initialHeight = null;
159
162
  this._columns = [];
160
- var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
161
- this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);
163
+ var groupable = this.currentGroupable;
164
+ this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0, this.$props.topCacheCount);
162
165
  this.dragLogic = new CommonDragLogic(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this));
163
166
  this.columnResize = new ColumnResize(this.onResize.bind(this));
164
167
  this._columnsMap = [[]];
@@ -195,6 +198,9 @@ var GridVue2 = {
195
198
  return null;
196
199
  }
197
200
  }
201
+ },
202
+ currentGroupable: function currentGroupable() {
203
+ return this.$props.groupable === true && this.$props.group && this.$props.group.length || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
198
204
  }
199
205
  },
200
206
  methods: {
@@ -270,6 +276,7 @@ var GridVue2 = {
270
276
  this.dragLogic.dropElementClue.$el.remove();
271
277
  }
272
278
 
279
+ this.currentData = [];
273
280
  this._columns = [];
274
281
  },
275
282
  resetVirtual: function resetVirtual() {
@@ -287,16 +294,16 @@ var GridVue2 = {
287
294
  }
288
295
  },
289
296
  onTotalChanged: function onTotalChanged(_value, _oldValue) {
290
- var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
297
+ var groupable = this.currentGroupable;
291
298
  this.vs.reset();
292
- this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);
299
+ this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0, this.$props.topCacheCount);
293
300
  this.resetVirtual();
294
301
  this.setRefs();
295
302
  },
296
303
  onRowHeightChanged: function onRowHeightChanged(_value, _oldValue) {
297
- var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
304
+ var groupable = this.currentGroupable;
298
305
  this.vs.reset();
299
- this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);
306
+ this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0, this.$props.topCacheCount);
300
307
  this.resetVirtual();
301
308
  this.setRefs();
302
309
  },
@@ -339,6 +346,32 @@ var GridVue2 = {
339
346
  }, this.getArguments(e)));
340
347
  }
341
348
  },
349
+ updateGroupCollapsed: function updateGroupCollapsed(event) {
350
+ var groupToUpdate = this.$props.group.find(function (g) {
351
+ return g.field === event.dataItem.field;
352
+ });
353
+ var collapsed = groupToUpdate.collapsed ? __spreadArrays(groupToUpdate.collapsed) : [];
354
+
355
+ if (event.value) {
356
+ if (collapsed.length) {
357
+ var expandedIndex = collapsed.indexOf(event.dataItem.value);
358
+
359
+ if (expandedIndex > -1) {
360
+ collapsed.splice(expandedIndex, 1);
361
+ }
362
+ }
363
+ } else {
364
+ if (collapsed) {
365
+ if (!collapsed.includes(event.dataItem.value)) {
366
+ collapsed.push(event.dataItem.value);
367
+ }
368
+ } else {
369
+ collapsed = [event.dataItem.value];
370
+ }
371
+ }
372
+
373
+ return collapsed;
374
+ },
342
375
  itemChange: function itemChange(event) {
343
376
  var itemChange = hasListener.call(this, 'itemchange');
344
377
 
@@ -346,7 +379,9 @@ var GridVue2 = {
346
379
  var expandChange = hasListener.call(this, 'expandchange');
347
380
 
348
381
  if (expandChange) {
382
+ var collapsed = this.updateGroupCollapsed(event);
349
383
  this.$emit('expandchange', __assign(__assign({}, this.getArguments(event.event)), {
384
+ collapsed: collapsed,
350
385
  dataItem: event.dataItem,
351
386
  value: event.value
352
387
  }));
@@ -694,6 +729,31 @@ var GridVue2 = {
694
729
  }).map(function (item) {
695
730
  return item.dataItem;
696
731
  });
732
+ },
733
+ totalGroupedRows: function totalGroupedRows(gridData) {
734
+ var allRowsCount = 0;
735
+
736
+ if (gridData) {
737
+ allRowsCount = this.addSubItems(gridData, allRowsCount);
738
+ }
739
+
740
+ return allRowsCount;
741
+ },
742
+ addSubItems: function addSubItems(gridData, allRowsCount) {
743
+ var _this = this;
744
+
745
+ gridData.forEach(function (item) {
746
+ allRowsCount++;
747
+
748
+ if (item.expanded !== false && item.items) {
749
+ allRowsCount = _this.addSubItems(item.items, allRowsCount);
750
+ }
751
+
752
+ if (_this.$props.groupable.footer === 'always' || item.expanded !== false && _this.$props.groupable.footer === 'visible') {
753
+ allRowsCount++;
754
+ }
755
+ });
756
+ return allRowsCount;
697
757
  }
698
758
  },
699
759
  // @ts-ignore
@@ -738,7 +798,7 @@ var GridVue2 = {
738
798
  if (Array.isArray(this.$props.dataItems)) {
739
799
  gridData = this.$props.dataItems;
740
800
  } else if (this.$props.dataItems) {
741
- gridData = this.$props.dataItems.data;
801
+ gridData = applyExpandedState(this.$props.dataItems, this.$props.group).data;
742
802
  total = total || this.$props.dataItems.total;
743
803
  }
744
804
 
@@ -749,10 +809,17 @@ var GridVue2 = {
749
809
  this.resetVirtual();
750
810
  this.vs.total = total;
751
811
 
752
- if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !groupable) {
812
+ if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !this.currentGroupable) {
753
813
  this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * (total || 0));
754
814
  } else {
755
- this.vs.containerHeight = 1533915;
815
+ if (this.$props.totalGroupedHeight) {
816
+ this.vs.containerHeight = Math.min(1533915, this.$props.totalGroupedHeight);
817
+ } else if (this.$props.allGroupedItems) {
818
+ var allGroupedItems = this.totalGroupedRows(applyExpandedState(this.$props.allGroupedItems, this.$props.group).data);
819
+ this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * allGroupedItems);
820
+ } else {
821
+ this.vs.containerHeight = 1533915;
822
+ }
756
823
  }
757
824
 
758
825
  var children = defaultSlot || [];
@@ -1151,6 +1218,13 @@ var GridVue2 = {
1151
1218
  columnCellRenderFunction = templateRendering.call(this, column.cell, getListeners.call(this));
1152
1219
  }
1153
1220
 
1221
+ var isCollapsed = this.group && this.group.some(function (gr) {
1222
+ return gr.field === column.field && gr.collapsed && gr.collapsed.some(function (c) {
1223
+ return c === item.dataItem[column.field || ''];
1224
+ });
1225
+ });
1226
+ var isExpanded = isCollapsed ? !isCollapsed : item.expanded;
1227
+
1154
1228
  if (column.internalCell) {
1155
1229
  return h(column.internalCell, {
1156
1230
  key: index,
@@ -1171,7 +1245,7 @@ var GridVue2 = {
1171
1245
  }).length,
1172
1246
  rowType: item.rowType,
1173
1247
  level: item.level,
1174
- expanded: item.expanded,
1248
+ expanded: isExpanded,
1175
1249
  dataIndex: item.dataIndex,
1176
1250
  ariaColumnIndex: column.ariaColumnIndex,
1177
1251
  isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(index) > -1
@@ -1210,7 +1284,7 @@ var GridVue2 = {
1210
1284
  }).length,
1211
1285
  rowType: item.rowType,
1212
1286
  level: item.level,
1213
- expanded: item.expanded,
1287
+ expanded: isExpanded,
1214
1288
  dataIndex: item.dataIndex,
1215
1289
  style: style,
1216
1290
  ariaColumnIndex: column.ariaColumnIndex,
@@ -1239,7 +1313,7 @@ var GridVue2 = {
1239
1313
  }).length,
1240
1314
  rowType: item.rowType,
1241
1315
  level: item.level,
1242
- expanded: item.expanded,
1316
+ expanded: isExpanded,
1243
1317
  dataIndex: item.dataIndex
1244
1318
  },
1245
1319
  key: index,
@@ -1269,7 +1343,7 @@ var GridVue2 = {
1269
1343
  }).length,
1270
1344
  rowType: item.rowType,
1271
1345
  level: item.level,
1272
- expanded: item.expanded,
1346
+ expanded: isExpanded,
1273
1347
  dataIndex: item.dataIndex,
1274
1348
  style: style
1275
1349
  });
@@ -1296,7 +1370,7 @@ var GridVue2 = {
1296
1370
  }).length,
1297
1371
  rowType: item.rowType,
1298
1372
  level: item.level,
1299
- expanded: item.expanded,
1373
+ expanded: isExpanded,
1300
1374
  dataIndex: item.dataIndex
1301
1375
  },
1302
1376
  colSpan: colSpans[index],
@@ -1345,7 +1419,7 @@ var GridVue2 = {
1345
1419
  }).length,
1346
1420
  rowType: item.rowType,
1347
1421
  level: item.level,
1348
- expanded: item.expanded,
1422
+ expanded: isExpanded,
1349
1423
  dataIndex: item.dataIndex,
1350
1424
  style: style
1351
1425
  });
@@ -1358,8 +1432,10 @@ var GridVue2 = {
1358
1432
 
1359
1433
  var hiddenRows = 0;
1360
1434
 
1361
- if (this.$props.scrollable === 'virtual') {
1362
- for (var i = 0; i < this.vs.topCacheCount + this.vs.attendedSkip - (this.$props.skip || 0); i++) {
1435
+ if (this.$props.scrollable === 'virtual' && this.totalGroupedRows(this.currentData) > this.$props.take) {
1436
+ var topIndex = this.vs.topCacheCount + this.vs.attendedSkip - (this.$props.skip || 0);
1437
+
1438
+ for (var i = 0; i < topIndex; i++) {
1363
1439
  var item = this.currentData.shift();
1364
1440
 
1365
1441
  if (item) {
@@ -16,11 +16,13 @@ export declare class VirtualScroll {
16
16
  PageChange: (page: Page, event: any) => void;
17
17
  tableBody: any;
18
18
  heightContainer: any;
19
+ fixedScroll: boolean;
20
+ askedSkip: number | undefined;
19
21
  private prevScrollPos;
20
22
  private syncTimeout;
21
23
  private tableTranslate;
22
24
  private scrollSyncing;
23
- constructor(cached: boolean);
25
+ constructor(cached: boolean, topCacheCount: number);
24
26
  /**
25
27
  * @return - The row heights in an array.
26
28
  */
@@ -2,7 +2,7 @@
2
2
  * @hidden
3
3
  */
4
4
  var VirtualScroll = /** @class */ (function () {
5
- function VirtualScroll(cached) {
5
+ function VirtualScroll(cached, topCacheCount) {
6
6
  this.containerHeight = 0;
7
7
  this.topCacheCount = 0; // 4;
8
8
  this.attendedSkip = 0; // -4;
@@ -12,11 +12,13 @@ var VirtualScroll = /** @class */ (function () {
12
12
  this.realSkip = 0;
13
13
  this.pageSize = 0;
14
14
  this.heightContainer = null;
15
+ this.fixedScroll = false;
16
+ this.askedSkip = undefined;
15
17
  this.prevScrollPos = 0;
16
18
  this.tableTranslate = 0;
17
19
  this.scrollSyncing = false;
18
20
  if (cached) {
19
- this.topCacheCount = 4;
21
+ this.topCacheCount = topCacheCount;
20
22
  this.attendedSkip = -this.topCacheCount;
21
23
  }
22
24
  this.scrollHandler = this.scrollHandler.bind(this);
@@ -59,7 +61,7 @@ var VirtualScroll = /** @class */ (function () {
59
61
  };
60
62
  VirtualScroll.prototype.translate = function (dY) {
61
63
  this.tableTranslate = dY;
62
- if (this.table) {
64
+ if (this.scrollableVirtual && this.table) {
63
65
  this.table.style.transform = 'translateY(' + dY + 'px)';
64
66
  }
65
67
  };
@@ -81,6 +83,9 @@ var VirtualScroll = /** @class */ (function () {
81
83
  };
82
84
  VirtualScroll.prototype.reset = function () {
83
85
  this.scrollSyncing = true;
86
+ if (this.fixedScroll) {
87
+ return;
88
+ }
84
89
  if (this.container) {
85
90
  this.container.scrollTop = 0;
86
91
  }
@@ -179,10 +184,17 @@ var VirtualScroll = /** @class */ (function () {
179
184
  }
180
185
  var grid = this;
181
186
  clearTimeout(this.syncTimeout);
182
- this.syncTimeout = setTimeout(function () { grid.syncScroll(); }, 200);
187
+ this.syncTimeout = window.setTimeout(function () { grid.syncScroll(); }, 200);
183
188
  var scrollTop = this.container.scrollTop;
184
189
  var prev = this.prevScrollPos;
185
190
  this.prevScrollPos = scrollTop;
191
+ if (this.askedSkip !== undefined) {
192
+ this.translate(this.containerHeight * this.askedSkip / this.total);
193
+ this.changePage(this.askedSkip, e);
194
+ this.prevScrollPos = scrollTop;
195
+ this.askedSkip = undefined;
196
+ return;
197
+ }
186
198
  if (scrollTop - prev < 0 && scrollTop > this.tableTranslate - this.table.scrollHeight / 10) {
187
199
  this.localScrollUp(e);
188
200
  }
@@ -102,7 +102,7 @@ var GridCellVue2 = {
102
102
  var dataAsString = '';
103
103
 
104
104
  if (data !== undefined && data !== null) {
105
- dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, parsers[this.$props.type](data, this._intl)) : this._intl.format(this.$props.format, data) : data.toString();
105
+ dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, parsers[this.$props.type](data, this._intl, this.$props.format)) : this._intl.format(this.$props.format, data) : data.toString();
106
106
  }
107
107
 
108
108
  defaultRendering = h("td", {
@@ -108,7 +108,8 @@ var ColumnMenuContentVue2 = {
108
108
  closemenu: this.closeMenu,
109
109
  filterchange: this.filterChange,
110
110
  sortchange: this.sortChange,
111
- expandchange: this.expandChange
111
+ expandchange: this.expandChange,
112
+ contentfocus: this.handleFocus
112
113
  }
113
114
  });
114
115
  }
@@ -21,7 +21,8 @@ var GridColumnMenuFilterCellVue2 = {
21
21
  },
22
22
  // @ts-ignore
23
23
  emits: {
24
- change: null
24
+ change: null,
25
+ filtercellfocus: null
25
26
  },
26
27
  methods: {
27
28
  handleFocus: function handleFocus(e) {
@@ -21,7 +21,9 @@ var GridColumnMenuFilterUIVue2 = {
21
21
  },
22
22
  // @ts-ignore
23
23
  emits: {
24
- change: null
24
+ change: null,
25
+ filteruifocus: null,
26
+ logicChange: null
25
27
  },
26
28
  methods: {
27
29
  handleFocus: function handleFocus(e) {
@@ -84,7 +84,7 @@ export interface GridCellProps {
84
84
  /**
85
85
  * The event that is fired when the cell value is changed.
86
86
  */
87
- change?: (event: {
87
+ onChange?: (event: {
88
88
  dataItem: any;
89
89
  event: any;
90
90
  field?: string;
@@ -93,7 +93,7 @@ export interface GridCellProps {
93
93
  /**
94
94
  * The event that is fired when the keydown event of the cell is triggered.
95
95
  */
96
- cellkeydown?: (event: {
96
+ onCellkeydown?: (event: {
97
97
  event: any;
98
98
  dataItem: any;
99
99
  field: string;
@@ -101,20 +101,20 @@ export interface GridCellProps {
101
101
  /**
102
102
  * The event that is fired when the cell is clicked.
103
103
  */
104
- cellclick?: (event: {
104
+ onCellclick?: (event: {
105
105
  dataItem: any;
106
106
  field: string;
107
107
  }) => void;
108
108
  /**
109
109
  * The event that is fired when the cell is about to be added.
110
110
  */
111
- add?: (event: {
111
+ onAdd?: (event: {
112
112
  dataItem: any;
113
113
  }) => void;
114
114
  /**
115
115
  * The event that is fired when the cell is about to be edited.
116
116
  */
117
- edit?: (event: {
117
+ onEdit?: (event: {
118
118
  dataItem: any;
119
119
  }) => void;
120
120
  /**
@@ -132,7 +132,7 @@ export interface GridCellProps {
132
132
  /**
133
133
  * The event that is fired when the cell is about to be canceled.
134
134
  */
135
- cancel?: (event: {
135
+ onCancel?: (event: {
136
136
  dataItem: any;
137
137
  }) => void;
138
138
  /**
@@ -10,7 +10,7 @@ export interface GridColumnMenuExtendedFilterProps extends GridColumnMenuFilterP
10
10
  /**
11
11
  * Triggered on each subsequent expand state of the filter component.
12
12
  */
13
- onExpandChange?: (nextExpandState: boolean) => void;
13
+ onExpandchange?: (nextExpandState: boolean) => void;
14
14
  /**
15
15
  * If set to `false`, the second filter operator and the input will be hidden.
16
16
  */
@@ -23,5 +23,5 @@ export interface GridColumnMenuFilterProps {
23
23
  /**
24
24
  * The method that will be called to notify the parent Grid about a filter change.
25
25
  */
26
- onFilterChange?: (filter: CompositeFilterDescriptor | null, event: any) => any;
26
+ onFilterchange?: (filter: CompositeFilterDescriptor | null, event: any) => any;
27
27
  }
@@ -28,7 +28,7 @@ export interface GridColumnMenuFilterUIProps {
28
28
  /**
29
29
  * The method that will be called to notify the parent about a change in the filter logic.
30
30
  */
31
- onLogicChange?: (e: any) => void;
31
+ onLogicchange?: (e: any) => void;
32
32
  /**
33
33
  * The method that will be called to notify the parent about a change in the filter.
34
34
  */
@@ -43,7 +43,7 @@ export interface GridProps {
43
43
  * Fires when the sorting of the Grid is changed ([see example]({% slug sorting_grid_native %})).
44
44
  * You have to handle the event yourself and sort the data.
45
45
  */
46
- sortchange?: (event: GridSortChangeEvent) => void;
46
+ onSortchange?: (event: GridSortChangeEvent) => void;
47
47
  /**
48
48
  * The descriptors by which the data is sorted.
49
49
  * Applies the sorting styles and buttons to the affected columns.
@@ -69,7 +69,7 @@ export interface GridProps {
69
69
  * ([more information and examples]({% slug filtering_grid_native %})).
70
70
  * You have to handle the event yourself and filter the data.
71
71
  */
72
- filterchange?: (event: GridFilterChangeEvent) => void;
72
+ onFilterchange?: (event: GridFilterChangeEvent) => void;
73
73
  /**
74
74
  * Defines if the column menu will be shown for the column.
75
75
  * Accepts Boolean, a Vue component, a `render` function, or a slot name
@@ -88,7 +88,7 @@ export interface GridProps {
88
88
  * Fires when the grouping of the Grid is changed. You have to handle the event yourself and group the data
89
89
  * ([more information and examples]({% slug groupingbasics_grid_native %})).
90
90
  */
91
- groupchange?: (event: GridGroupChangeEvent) => void;
91
+ onGroupchange?: (event: GridGroupChangeEvent) => void;
92
92
  /**
93
93
  * Configures the pager of the Grid ([see example]({% slug paging_grid_native %})).
94
94
  *
@@ -114,7 +114,7 @@ export interface GridProps {
114
114
  * Fires when the page of the Grid is changed ([see example]({% slug paging_grid_native %})).
115
115
  * You have to handle the event yourself and page the data.
116
116
  */
117
- pagechange?: (event: GridPageChangeEvent) => void;
117
+ onPagechange?: (event: GridPageChangeEvent) => void;
118
118
  /**
119
119
  * Defines the total number of data items in all pages
120
120
  * ([see example]({% slug paging_grid_native %})). Required by the paging functionality.
@@ -128,7 +128,7 @@ export interface GridProps {
128
128
  /**
129
129
  * Fires when the user tries to expand or collapse a row.
130
130
  */
131
- expandchange?: (event: GridExpandChangeEvent) => void;
131
+ onExpandchange?: (event: GridExpandChangeEvent) => void;
132
132
  /**
133
133
  * Specifies the name of the field which will provide a Boolean representation
134
134
  * of the expanded state of the item ([see example]({% slug detailrow_grid_native %}).
@@ -143,50 +143,50 @@ export interface GridProps {
143
143
  * Fires when the user tries to select or deselect a row
144
144
  * ([see example]({% slug selection_grid_native %})).
145
145
  */
146
- selectionchange?: (event: GridSelectionChangeEvent) => void;
146
+ onSelectionchange?: (event: GridSelectionChangeEvent) => void;
147
147
  /**
148
148
  * Fires when the user clicks the checkbox of a column header whose `field` matches `selectedField`.
149
149
  * ([see example]({% slug selection_grid_native %})).
150
150
  */
151
- headerselectionchange?: (event: GridHeaderSelectionChangeEvent) => void;
151
+ onHeaderselectionchange?: (event: GridHeaderSelectionChangeEvent) => void;
152
152
  /**
153
153
  * Fires when the user clicks a row.
154
154
  */
155
- rowclick?: (event: GridRowClickEvent) => void;
155
+ onRowclick?: (event: GridRowClickEvent) => void;
156
156
  /**
157
157
  * Fires when the user double clicks a row.
158
158
  */
159
- rowdblclick?: (event: GridRowClickEvent) => void;
159
+ onRowdblclick?: (event: GridRowClickEvent) => void;
160
160
  /**
161
161
  * Fires when the user clicks a cell.
162
162
  */
163
- cellclick?: (event: any) => void;
163
+ onCellclick?: (event: any) => void;
164
164
  /**
165
165
  * Fires when Grid is scrolled.
166
166
  */
167
- scroll?: (event: any) => void;
167
+ onScroll?: (event: any) => void;
168
168
  /**
169
169
  * Fires when the user triggers an edit operation from a cell.
170
170
  */
171
- edit?: (event: GridEditEvent) => void;
171
+ onEdit?: (event: GridEditEvent) => void;
172
172
  /**
173
173
  * Fires when the user triggers a removal operation from a cell.
174
174
  */
175
- remove?: (event: GridRemoveEvent) => void;
175
+ onRemove?: (event: GridRemoveEvent) => void;
176
176
  /**
177
177
  * Fires when the user triggers a saving operation from a cell.
178
178
  */
179
- save?: (event: GridSaveEvent) => void;
179
+ onSave?: (event: GridSaveEvent) => void;
180
180
  /**
181
181
  * Fires when the user triggers a canceling operation from a cell.
182
182
  */
183
- cancel?: (event: GridCancelEvent) => void;
183
+ onCancel?: (event: GridCancelEvent) => void;
184
184
  /**
185
185
  * Fires when the user changes the values of the item.
186
186
  * The event is not debounced and fires on every `onChange` event of the input in the current `EditCell`.
187
187
  * ([more information and examples]({% slug editing_inline_grid_native %})).
188
188
  */
189
- itemchange?: (event: GridItemChangeEvent) => void;
189
+ onItemchange?: (event: GridItemChangeEvent) => void;
190
190
  /**
191
191
  * Specifies the name of the field which will provide a Boolean representation of the edit state of the current
192
192
  * item ([more information and examples]({% slug editing_inline_grid_native %})).
@@ -221,7 +221,7 @@ export interface GridProps {
221
221
  /**
222
222
  * Fires when the data state of the Grid is changed.
223
223
  */
224
- datastatechange?: (event: GridDataStateChangeEvent) => void;
224
+ onDatastatechange?: (event: GridDataStateChangeEvent) => void;
225
225
  /**
226
226
  * If set to `true`, the user can resize columns by dragging the edges (resize handles) of their
227
227
  * header cells ([see example]({% slug resizing_columns_grid_native %}).
@@ -240,11 +240,11 @@ export interface GridProps {
240
240
  /**
241
241
  * Fires when a column is resized
242
242
  */
243
- columnresize?: (event: GridColumnResizeEvent) => void;
243
+ onColumnresize?: (event: GridColumnResizeEvent) => void;
244
244
  /**
245
245
  * Fires when columns are reordered.
246
246
  */
247
- columnreorder?: (event: GridColumnReorderEvent) => void;
247
+ onColumnreorder?: (event: GridColumnReorderEvent) => void;
248
248
  /**
249
249
  * Defines the custom rendering of the row. Accepts a Vue component, a `render` function, or a slot name.
250
250
  */
@@ -276,12 +276,24 @@ export interface GridProps {
276
276
  * By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
277
277
  */
278
278
  navigatable?: boolean;
279
+ /**
280
+ * Passes the number of cached top items needed for the grouping virtualization scenario. Defaults to 4.
281
+ */
282
+ topCacheCount?: Number;
283
+ /**
284
+ * Passes the calculated height of all the items in the Grid grouped hierarchy.
285
+ */
286
+ totalGroupedHeight?: Number;
287
+ /**
288
+ * Passes the collection of all grouped items that is needed for the virtualization scenario.
289
+ */
290
+ allGroupedItems?: any[];
279
291
  /**
280
292
  * Fires when Grid keyboard navigation position is changed.
281
293
  */
282
- navigationaction?: (event: GridNavigationActionEvent) => void;
294
+ onNavigationaction?: (event: GridNavigationActionEvent) => void;
283
295
  /**
284
296
  * Fires when the user press keyboard key.
285
297
  */
286
- keydown?: (event: GridKeyDownEvent) => void;
298
+ onKeydown?: (event: GridKeyDownEvent) => void;
287
299
  }
@@ -62,6 +62,10 @@ export interface GridGroupChangeEvent extends GridEvent {
62
62
  * Represents the object of the `onExpandChange` event.
63
63
  */
64
64
  export interface GridExpandChangeEvent extends GridEvent {
65
+ /**
66
+ * The array with collapsed groups.
67
+ */
68
+ collapsed?: string[];
65
69
  /**
66
70
  * The data item that is expanded or collapsed.
67
71
  */
package/dist/es/main.d.ts CHANGED
@@ -34,4 +34,5 @@ import { GridGroupableSettings } from './interfaces/GridGroupableSettings';
34
34
  import { GridColumnMenuItem, GridColumnMenuItemVue2 } from './columnMenu/GridColumnMenuItem';
35
35
  import { GridColumnMenuItemContent, GridColumnMenuItemContentVue2 } from './columnMenu/GridColumnMenuItemContent';
36
36
  import { GridColumnMenuItemGroup, GridColumnMenuItemGroupVue2 } from './columnMenu/GridColumnMenuItemGroup';
37
+ export * from './utils/index';
37
38
  export { Grid, GridVue2, GridProps, GridColumnProps, GridCellProps, GridCell, GridCellVue2, GridEditCell, GridEditCellVue2, GridGroupCell, GridHierarchyCell, GridGroupCellVue2, GridHierarchyCellVue2, GridDetailRow, GridDetailRowVue2, GridDetailRowProps, GridRow, GridRowVue2, GridRowProps, GridFilterCell, GridFilterCellVue2, GridFilterCellProps, GridHeaderCell, GridHeaderCellVue2, GridHeaderCellProps, Footer, FooterRow, FooterVue2, FooterRowVue2, GridFooterCellProps, GridColumnMenuProps, GridColumnMenuSort, GridColumnMenuSortVue2, sortGroupByField, GridColumnMenuFilter, GridColumnMenuFilterVue2, filterGroupByField, GridColumnMenuItem, GridColumnMenuItemVue2, GridColumnMenuItemContent, GridColumnMenuItemContentVue2, GridColumnMenuItemGroup, GridColumnMenuItemGroupVue2, GridColumnMenuFilterUI, GridColumnMenuFilterUIVue2, GridColumnMenuFilterCell, GridColumnMenuFilterCellVue2, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterVue2, GridColumnMenuCheckboxFilterProps, GridToolbar, GridToolbarVue2, GridToolbarProps, GridNoRecords, GridNoRecordsVue2, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridPageChangeEvent, GridDataStateChangeEvent, GridFilterChangeEvent, GridSortChangeEvent, GridExpandChangeEvent, GridSelectionChangeEvent, GridItemChangeEvent, GridHeaderSelectionChangeEvent, GridRowClickEvent, GridColumnResizeEvent, GridColumnReorderEvent, GridGroupChangeEvent };
package/dist/es/main.js CHANGED
@@ -19,6 +19,7 @@ import { GridNoRecords, GridNoRecordsVue2 } from './GridNoRecords';
19
19
  import { GridColumnMenuItem, GridColumnMenuItemVue2 } from './columnMenu/GridColumnMenuItem';
20
20
  import { GridColumnMenuItemContent, GridColumnMenuItemContentVue2 } from './columnMenu/GridColumnMenuItemContent';
21
21
  import { GridColumnMenuItemGroup, GridColumnMenuItemGroupVue2 } from './columnMenu/GridColumnMenuItemGroup';
22
+ export * from './utils/index';
22
23
  export { Grid, GridVue2, GridCell, GridCellVue2, GridEditCell, GridEditCellVue2, GridGroupCell, GridHierarchyCell, GridGroupCellVue2, GridHierarchyCellVue2, GridDetailRow, GridDetailRowVue2, GridRow, GridRowVue2, GridFilterCell, GridFilterCellVue2, GridHeaderCell, GridHeaderCellVue2, Footer, FooterRow, FooterVue2, FooterRowVue2, GridColumnMenuSort, GridColumnMenuSortVue2, sortGroupByField, GridColumnMenuFilter, GridColumnMenuFilterVue2, filterGroupByField, GridColumnMenuItem, GridColumnMenuItemVue2, GridColumnMenuItemContent, GridColumnMenuItemContentVue2, GridColumnMenuItemGroup, GridColumnMenuItemGroupVue2, GridColumnMenuFilterUI, GridColumnMenuFilterUIVue2, GridColumnMenuFilterCell, GridColumnMenuFilterCellVue2, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterVue2, GridToolbar, GridToolbarVue2, GridNoRecords, GridNoRecordsVue2 };
23
24
  // Automatic installation if Vue has been added to the global scope.
24
25
  var vue = 'Vue';
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-grid',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1643353798,
8
+ publishDate: 1644244547,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };