@progress/kendo-react-grid 5.10.0-dev.202301092204 → 5.10.0-dev.202301111405

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 (33) hide show
  1. package/dist/cdn/js/kendo-react-grid.js +1 -1
  2. package/dist/es/Grid.js +14 -13
  3. package/dist/es/VirtualScroll.js +9 -5
  4. package/dist/es/cells/GridFilterCell.js +3 -2
  5. package/dist/es/cells/GridGroupCell.js +4 -2
  6. package/dist/es/cells/GridHierarchyCell.js +4 -3
  7. package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +5 -4
  8. package/dist/es/columnMenu/GridColumnMenuFilter.js +2 -1
  9. package/dist/es/columnMenu/GridColumnMenuGroup.js +2 -2
  10. package/dist/es/columnMenu/GridColumnMenuItem.d.ts +5 -0
  11. package/dist/es/columnMenu/GridColumnMenuItem.js +3 -2
  12. package/dist/es/columnMenu/GridColumnMenuSort.js +3 -2
  13. package/dist/es/columnMenu/GridColumnMenuWrapper.js +3 -1
  14. package/dist/es/drag/GroupingIndicator.js +5 -3
  15. package/dist/es/header/HeaderRow.js +3 -2
  16. package/dist/es/package-metadata.js +1 -1
  17. package/dist/npm/Grid.js +14 -13
  18. package/dist/npm/VirtualScroll.js +9 -5
  19. package/dist/npm/cells/GridFilterCell.js +3 -2
  20. package/dist/npm/cells/GridGroupCell.js +3 -1
  21. package/dist/npm/cells/GridHierarchyCell.js +3 -2
  22. package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +4 -3
  23. package/dist/npm/columnMenu/GridColumnMenuFilter.js +2 -1
  24. package/dist/npm/columnMenu/GridColumnMenuGroup.js +2 -2
  25. package/dist/npm/columnMenu/GridColumnMenuItem.d.ts +5 -0
  26. package/dist/npm/columnMenu/GridColumnMenuItem.js +3 -2
  27. package/dist/npm/columnMenu/GridColumnMenuSort.js +3 -2
  28. package/dist/npm/columnMenu/GridColumnMenuWrapper.js +3 -1
  29. package/dist/npm/drag/GroupingIndicator.js +4 -2
  30. package/dist/npm/header/HeaderRow.js +2 -1
  31. package/dist/npm/package-metadata.js +1 -1
  32. package/dist/systemjs/kendo-react-grid.js +1 -1
  33. package/package.json +20 -18
package/dist/es/Grid.js CHANGED
@@ -633,19 +633,20 @@ var Grid = /** @class */ (function (_super) {
633
633
  header,
634
634
  React.createElement("div", { className: "k-grid-container", role: "presentation" },
635
635
  React.createElement("div", { ref: this.vs.containerRef, className: "k-grid-content k-virtual-content", onScroll: this.scrollHandler, role: "presentation" },
636
- React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
637
- _this.vs.table = table;
638
- _this.tableElement = table;
639
- } },
640
- React.createElement("table", { className: classNames('k-table k-grid-table', (_c = {
641
- 'k-grid-md': !this.props.size
642
- },
643
- _c["k-table-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
644
- _c), this.props.className), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
645
- colGroups,
646
- React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: function (tableBody) {
647
- _this.vs.tableBody = tableBody;
648
- }, role: 'rowgroup' }, tableKeyboardNavigationBodyAttributes), body))),
636
+ React.createElement("div", { className: 'k-grid-table-wrap', role: "presentation" },
637
+ React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
638
+ _this.vs.table = table;
639
+ _this.tableElement = table;
640
+ } },
641
+ React.createElement("table", { className: classNames('k-table k-grid-table', (_c = {
642
+ 'k-grid-md': !this.props.size
643
+ },
644
+ _c["k-table-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
645
+ _c), this.props.className), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
646
+ colGroups,
647
+ React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: function (tableBody) {
648
+ _this.vs.tableBody = tableBody;
649
+ }, role: 'rowgroup' }, tableKeyboardNavigationBodyAttributes), body)))),
649
650
  React.createElement("div", { className: "k-height-container", role: "presentation" },
650
651
  React.createElement("div", { style: this.props.scrollable === 'virtual' ?
651
652
  { 'height': (this.vs.containerHeight) + 'px' } : {} })))),
@@ -34,7 +34,11 @@ var VirtualScroll = /** @class */ (function () {
34
34
  for (var i = 0; i < topItemsCount; i++) {
35
35
  topItemsHeight += heights[i].line + heights[i].acc;
36
36
  }
37
- return { topItemsCount: topItemsCount, topItemsHeight: topItemsHeight };
37
+ return {
38
+ topItemsCount: topItemsCount,
39
+ topItemsHeight: topItemsHeight,
40
+ itemsNeededOnScreen: itemsOnScreen + itemsOnScreen / 2
41
+ };
38
42
  };
39
43
  this.horizontalScrollbarHeight = function () {
40
44
  if (!_this.container) {
@@ -117,9 +121,9 @@ var VirtualScroll = /** @class */ (function () {
117
121
  var scrollTop = this.container.scrollTop;
118
122
  var targetTranslate = this.tableTranslate;
119
123
  var rowsCount = 0;
120
- var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
124
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight, itemsNeededOnScreen = _a.itemsNeededOnScreen;
121
125
  var additionalOnTop = scrollTop - targetTranslate;
122
- if (additionalOnTop > topItemsHeight) {
126
+ if ((additionalOnTop > topItemsHeight) || heights.length <= itemsNeededOnScreen) {
123
127
  return;
124
128
  }
125
129
  while ((rowsCount < this.topCacheCount + this.attendedSkip - this.realSkip + topItemsCount)
@@ -161,13 +165,13 @@ var VirtualScroll = /** @class */ (function () {
161
165
  var scrollTop = this.container.scrollTop;
162
166
  var targetTranslate = this.tableTranslate;
163
167
  var rowsCount = 0;
164
- var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
168
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight, itemsNeededOnScreen = _a.itemsNeededOnScreen;
165
169
  while (rowsCount < heights.length - this.topCacheCount &&
166
170
  !(targetTranslate + heights[rowsCount].line + heights[rowsCount].acc > scrollTop)) {
167
171
  targetTranslate += heights[rowsCount].line + heights[rowsCount].acc;
168
172
  rowsCount++;
169
173
  }
170
- if (topItemsCount > this.propsSkip + rowsCount) {
174
+ if ((topItemsCount > this.propsSkip + rowsCount) || heights.length <= itemsNeededOnScreen) {
171
175
  return;
172
176
  }
173
177
  if (rowsCount >= heights.length - this.topCacheCount && this.propsSkip + rowsCount >= this.total) {
@@ -20,6 +20,7 @@ import { NumericTextBox, TextBox } from '@progress/kendo-react-inputs';
20
20
  import { DatePicker } from '@progress/kendo-react-dateinputs';
21
21
  import { messages, filterClearButton, filterChooseOperator } from '../messages';
22
22
  import { registerForLocalization, provideLocalizationService } from '@progress/kendo-react-intl';
23
+ import { filterClearIcon, filterIcon } from '@progress/kendo-svg-icons';
23
24
  import { cellBoolDropdownChange, cellInputChange, cellOperatorChange } from '../filterCommon';
24
25
  import { classNames } from '@progress/kendo-react-common';
25
26
  var GridFilterCell = /** @class */ (function (_super) {
@@ -31,7 +32,7 @@ var GridFilterCell = /** @class */ (function (_super) {
31
32
  return;
32
33
  }
33
34
  var value = _this.props.operators.find(function (item) { return item.operator === _this.props.operator; }) || null;
34
- return (React.createElement(DropDownList, { size: _this.props.size, value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", data: _this.props.operators, textField: "text", title: localization.toLanguageString(filterChooseOperator, messages[filterChooseOperator]), popupSettings: {
35
+ return (React.createElement(DropDownList, { size: _this.props.size, value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", svgIcon: filterIcon, data: _this.props.operators, textField: "text", title: localization.toLanguageString(filterChooseOperator, messages[filterChooseOperator]), popupSettings: {
35
36
  width: ''
36
37
  } }));
37
38
  };
@@ -53,7 +54,7 @@ var GridFilterCell = /** @class */ (function (_super) {
53
54
  React.createElement("div", { className: "k-filtercell-operator" },
54
55
  this.renderOperatorEditor(localizationService),
55
56
  "\u00A0",
56
- React.createElement(Button, { size: this.props.size, icon: 'filter-clear', className: classNames((_a = {},
57
+ React.createElement(Button, { size: this.props.size, icon: 'filter-clear', svgIcon: filterClearIcon, className: classNames((_a = {},
57
58
  _a['k-clear-button-visible'] = Boolean(!(this.props.value === null || this.props.value === '') || this.props.operator),
58
59
  _a)), title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton]), type: "button", onClick: this.clear, disabled: !(!(this.props.value === null || this.props.value === '') || this.props.operator) })))));
59
60
  if (this.props.render) {
@@ -9,9 +9,10 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { classNames, Keys } from '@progress/kendo-react-common';
12
+ import { classNames, IconWrap, Keys } from '@progress/kendo-react-common';
13
13
  import { useTableKeyboardNavigation } from '@progress/kendo-react-data-tools';
14
14
  import { useLocalization } from '@progress/kendo-react-intl';
15
+ import { caretAltDownIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
15
16
  import * as React from 'react';
16
17
  import { messages, groupCollapse, groupExpand } from '../messages';
17
18
  /**
@@ -54,7 +55,8 @@ export var GridGroupCell = function (props) {
54
55
  value: !expanded
55
56
  });
56
57
  }
57
- }, href: "#", tabIndex: -1, "aria-label": message, className: expanded ? 'k-i-caret-alt-down k-icon' : 'k-i-caret-alt-right k-icon' }),
58
+ }, href: "#", tabIndex: -1, "aria-label": message },
59
+ React.createElement(IconWrap, { name: expanded ? 'caret-alt-down' : 'caret-alt-right', icon: expanded ? caretAltDownIcon : caretAltRightIcon })),
58
60
  ((dataItem[definedField] instanceof Date) && dataItem[definedField].toString) ?
59
61
  dataItem[definedField].toString() :
60
62
  dataItem[definedField])));
@@ -13,8 +13,9 @@ import * as React from 'react';
13
13
  import { getNestedValue } from './../utils';
14
14
  import { useTableKeyboardNavigation } from '@progress/kendo-react-data-tools';
15
15
  import { useLocalization } from '@progress/kendo-react-intl';
16
- import { Keys } from '@progress/kendo-react-common';
16
+ import { IconWrap, Keys } from '@progress/kendo-react-common';
17
17
  import { detailCollapse, detailExpand, messages } from '../messages';
18
+ import { minusIcon, plusIcon } from '@progress/kendo-svg-icons';
18
19
  /**
19
20
  * @hidden
20
21
  */
@@ -43,7 +44,6 @@ export var GridHierarchyCell = function (props) {
43
44
  React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell", role: 'gridcell' }, navigationAttributes));
44
45
  }
45
46
  else if (props.rowType !== 'groupHeader') {
46
- var className = expanded ? 'k-icon k-i-minus' : 'k-icon k-i-plus';
47
47
  var baseMessage = expanded ? detailCollapse : detailExpand;
48
48
  var message = localization.toLanguageString(baseMessage, messages[baseMessage]);
49
49
  defaultRendering = (React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell", onKeyDown: onKeyDownHandler, "aria-expanded": expanded ? 'true' : 'false', role: 'gridcell', "aria-colindex": props.ariaColumnIndex }, navigationAttributes),
@@ -58,7 +58,8 @@ export var GridHierarchyCell = function (props) {
58
58
  value: !expanded
59
59
  });
60
60
  }
61
- }, "aria-label": message, className: className, href: "#", tabIndex: -1 })));
61
+ }, "aria-label": message, href: "#", tabIndex: -1 },
62
+ React.createElement(IconWrap, { name: expanded ? 'minus' : 'plus', icon: expanded ? minusIcon : plusIcon }))));
62
63
  }
63
64
  return props.render ?
64
65
  props.render.call(undefined, defaultRendering, props) :
@@ -41,9 +41,10 @@ import { Checkbox, Input } from '@progress/kendo-react-inputs';
41
41
  import { provideLocalizationService, registerForLocalization } from '@progress/kendo-react-intl';
42
42
  import { messages, filterClearButton, filterSubmitButton, filterTitle, searchPlaceholder, filterCheckAll, filterSelectedItems } from '../messages';
43
43
  import { filterBy } from '@progress/kendo-data-query';
44
- import { clone } from '@progress/kendo-react-common';
44
+ import { clone, IconWrap } from '@progress/kendo-react-common';
45
45
  import { Button } from '@progress/kendo-react-buttons';
46
46
  import { getNestedValue } from '../utils';
47
+ import { filterIcon, searchIcon, xIcon } from '@progress/kendo-svg-icons';
47
48
  /**
48
49
  * @hidden
49
50
  */
@@ -292,12 +293,12 @@ var GridColumnMenuCheckboxFilter = /** @class */ (function (_super) {
292
293
  var searchBox = this.props.searchBox ?
293
294
  React.createElement(this.props.searchBox, { value: this.state.value, onChange: this.handleSearchChange }) :
294
295
  (React.createElement("div", { className: "k-searchbox k-textbox k-input k-input-md k-input-solid" },
295
- React.createElement("span", { className: "k-input-icon k-icon k-i-search" }),
296
+ React.createElement(IconWrap, { className: "k-input-icon", name: 'search', icon: searchIcon }),
296
297
  React.createElement(Input, { className: "k-input-inner", type: "text", placeholder: localizationService.toLanguageString(searchPlaceholder, messages[searchPlaceholder]), value: this.state.value, onChange: function (e) { return _this.handleSearchChange(e.nativeEvent); } }),
297
- React.createElement(Button, { type: "button", rounded: null, className: "k-input-button", onClick: this.handleClear, icon: "close" })));
298
+ React.createElement(Button, { type: "button", rounded: null, className: "k-input-button", onClick: this.handleClear, icon: "x", svgIcon: xIcon })));
298
299
  var uniqueFilterValues = filterValues.filter(function (item, index) { return filterValues.indexOf(item) === index; });
299
300
  return (React.createElement(GridColumnMenuItemGroup, null,
300
- React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(filterTitle, messages[filterTitle]), iconClass: "k-i-filter", onClick: this.onFilterExpand }),
301
+ React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(filterTitle, messages[filterTitle]), iconClass: "k-i-filter", svgIcon: filterIcon, onClick: this.onFilterExpand }),
301
302
  React.createElement(GridColumnMenuItemContent, { show: !!expandState },
302
303
  React.createElement("div", { className: "kendo-grid-filter-menu-container" },
303
304
  React.createElement("form", { className: "k-filter-menu k-group k-reset k-state-border-up", onSubmit: this.submit, onReset: this.clear },
@@ -43,6 +43,7 @@ import { operatorMap, getDefaultOperator, filterLogicList, defaultHideSecondFilt
43
43
  import { messages, filterClearButton, filterSubmitButton, filterTitle } from '../messages';
44
44
  import { GridColumnMenuFilterUI } from './GridColumnMenuFilterUI';
45
45
  import { Button } from '@progress/kendo-react-buttons';
46
+ import { filterIcon } from '@progress/kendo-svg-icons';
46
47
  /**
47
48
  * @hidden
48
49
  */
@@ -349,7 +350,7 @@ var GridColumnMenuFilter = /** @class */ (function (_super) {
349
350
  IsUnaryFilter(filters[1].operator);
350
351
  var expandState = this.isControlled() ? this.props.expanded : this.state.expanded;
351
352
  return (React.createElement(GridColumnMenuItemGroup, null,
352
- React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(filterTitle, messages[filterTitle]), iconClass: 'k-i-filter', onClick: this.onFilterExpand }),
353
+ React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(filterTitle, messages[filterTitle]), iconClass: 'k-i-filter', svgIcon: filterIcon, onClick: this.onFilterExpand }),
353
354
  React.createElement(GridColumnMenuItemContent, { show: !!expandState },
354
355
  React.createElement("div", { className: 'kendo-grid-filter-menu-container' },
355
356
  React.createElement("form", { className: 'k-filter-menu k-group k-reset k-state-border-up', onSubmit: this.submit, onReset: this.clear, onKeyDown: function (e) { return e.stopPropagation(); } },
@@ -18,6 +18,7 @@ import { provideLocalizationService, registerForIntl, registerForLocalization }
18
18
  import { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';
19
19
  import { GridColumnMenuItem } from './GridColumnMenuItem';
20
20
  import { groupColumn, ungroupColumn, messages } from '../messages';
21
+ import { groupIcon, ungroupIcon } from '@progress/kendo-svg-icons';
21
22
  /**
22
23
  * @example
23
24
  * ```jsx-no-run
@@ -114,9 +115,8 @@ var GridColumnMenuGroup = /** @class */ (function (_super) {
114
115
  var localizationService = provideLocalizationService(this);
115
116
  var isGrouped = Boolean(group && column.field && group.find(function (currentGroup) { return currentGroup.field === column.field; }));
116
117
  var message = !isGrouped ? groupColumn : ungroupColumn;
117
- var iconClass = !isGrouped ? 'k-i-group' : 'k-i-ungroup';
118
118
  return (React.createElement(GridColumnMenuItemGroup, null,
119
- React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(message, messages[message]), iconClass: iconClass, onClick: this.onGroupClick })));
119
+ React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(message, messages[message]), iconClass: !isGrouped ? 'k-i-group' : 'k-i-ungroup', svgIcon: !isGrouped ? groupIcon : ungroupIcon, onClick: this.onGroupClick })));
120
120
  };
121
121
  return GridColumnMenuGroup;
122
122
  }(React.Component));
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  /**
3
4
  * The props of the GridColumnMenuItem component.
4
5
  */
@@ -15,6 +16,10 @@ export interface GridColumnMenuItemProps {
15
16
  * The class of the icon that is rendered next to the title.
16
17
  */
17
18
  iconClass: string;
19
+ /**
20
+ * The SVG icon that is rendered next to the title.
21
+ */
22
+ svgIcon?: SVGIcon;
18
23
  /**
19
24
  * The selected state of the component.
20
25
  */
@@ -14,6 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  };
15
15
  })();
16
16
  import * as React from 'react';
17
+ import { IconWrap, toIconName } from '@progress/kendo-react-common';
17
18
  /**
18
19
  * The GridColumnMenuItem component that is used inside the Grid ColumnMenu.
19
20
  */
@@ -32,9 +33,9 @@ var GridColumnMenuItem = /** @class */ (function (_super) {
32
33
  * @hidden
33
34
  */
34
35
  GridColumnMenuItem.prototype.render = function () {
35
- var _a = this.props, title = _a.title, iconClass = _a.iconClass, selected = _a.selected;
36
+ var _a = this.props, title = _a.title, iconClass = _a.iconClass, svgIcon = _a.svgIcon, selected = _a.selected;
36
37
  return (React.createElement("div", { onClick: this.onClick, className: "k-columnmenu-item ".concat(selected ? 'k-selected' : '') },
37
- iconClass && React.createElement("span", { className: "k-icon ".concat(iconClass) }),
38
+ (iconClass || svgIcon) && React.createElement(IconWrap, { name: iconClass ? toIconName(iconClass) : iconClass, icon: svgIcon }),
38
39
  title));
39
40
  };
40
41
  return GridColumnMenuItem;
@@ -19,6 +19,7 @@ import { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';
19
19
  import { normalize } from '../interfaces/GridSortSettings';
20
20
  import { provideLocalizationService, registerForIntl, registerForLocalization } from '@progress/kendo-react-intl';
21
21
  import { messages, sortAscending, sortDescending } from '../messages';
22
+ import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
22
23
  /**
23
24
  * @hidden
24
25
  */
@@ -169,8 +170,8 @@ var GridColumnMenuSort = /** @class */ (function (_super) {
169
170
  var currentSortIndex = sortIndex(column.field, sort);
170
171
  var localizationService = provideLocalizationService(this);
171
172
  return (React.createElement(GridColumnMenuItemGroup, null,
172
- React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(sortAscending, messages[sortAscending]), iconClass: 'k-i-sort-asc-sm', selected: sortedAsc(currentSortIndex, sort), onClick: this.onAscClick }),
173
- React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(sortDescending, messages[sortDescending]), iconClass: 'k-i-sort-desc-sm', selected: sortedDesc(currentSortIndex, sort), onClick: this.onDescClick })));
173
+ React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(sortAscending, messages[sortAscending]), iconClass: 'k-i-sort-asc-sm', svgIcon: sortAscSmallIcon, selected: sortedAsc(currentSortIndex, sort), onClick: this.onAscClick }),
174
+ React.createElement(GridColumnMenuItem, { title: localizationService.toLanguageString(sortDescending, messages[sortDescending]), iconClass: 'k-i-sort-desc-sm', svgIcon: sortDescSmallIcon, selected: sortedDesc(currentSortIndex, sort), onClick: this.onDescClick })));
174
175
  };
175
176
  /* eslint-disable max-len */
176
177
  /**
@@ -37,6 +37,8 @@ var __rest = (this && this.__rest) || function (s, e) {
37
37
  };
38
38
  import * as React from 'react';
39
39
  import { Popup } from '@progress/kendo-react-popup';
40
+ import { IconWrap } from '@progress/kendo-react-common';
41
+ import { moreVerticalIcon } from '@progress/kendo-svg-icons';
40
42
  /**
41
43
  * The GridColumnMenuWrapper component.
42
44
  */
@@ -88,7 +90,7 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
88
90
  var _a = this.props, ColumnMenu = _a.columnMenu, others = __rest(_a, ["columnMenu"]);
89
91
  return (React.createElement(React.Fragment, null,
90
92
  React.createElement("a", { className: 'k-grid-header-menu k-grid-column-menu', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick, onMouseDown: this.onAnchorMouseDown, href: "#" },
91
- React.createElement("span", { className: 'k-icon k-i-more-vertical' })),
93
+ React.createElement(IconWrap, { name: 'more-vertical', icon: moreVerticalIcon })),
92
94
  React.createElement(Popup, { anchor: this._anchor, show: this.state.show },
93
95
  React.createElement("div", { ref: function (e) { return _this._content = e; }, className: 'k-grid-columnmenu-popup', tabIndex: 0, onBlur: this.blur, onFocus: this.focus, style: { outline: 'none' } }, ColumnMenu && (React.createElement(ColumnMenu, __assign({}, others, { onCloseMenu: this.closeMenu })))))));
94
96
  };
@@ -14,10 +14,11 @@ var __extends = (this && this.__extends) || (function () {
14
14
  };
15
15
  })();
16
16
  import * as React from 'react';
17
- import { Draggable } from '@progress/kendo-react-common';
17
+ import { Draggable, IconWrap } from '@progress/kendo-react-common';
18
18
  import { Button } from '@progress/kendo-react-buttons';
19
19
  import { ungroupColumn, messages } from '../messages';
20
20
  import { provideLocalizationService, registerForLocalization } from '@progress/kendo-react-intl';
21
+ import { sortAscSmallIcon, sortDescSmallIcon, xIcon } from '@progress/kendo-svg-icons';
21
22
  /**
22
23
  * @hidden
23
24
  */
@@ -71,13 +72,14 @@ var GroupingIndicator = /** @class */ (function (_super) {
71
72
  GroupingIndicator.prototype.render = function () {
72
73
  var _this = this;
73
74
  var localizationService = provideLocalizationService(this);
75
+ var dir = this.props.dir;
74
76
  return (React.createElement(Draggable, { onPress: this.onPress, onDrag: this.onDrag, onRelease: this.onRelease, ref: function (component) { _this.draggable = component; } },
75
77
  React.createElement("div", { className: "k-indicator-container", style: { touchAction: 'none' } },
76
78
  React.createElement("div", { className: "k-group-indicator", role: "button" },
77
79
  React.createElement("a", { className: "k-link", href: "#", tabIndex: -1, onClick: this.sortChange },
78
- React.createElement("span", { className: 'k-icon k-i-sort-' + this.props.dir + '-small' }),
80
+ React.createElement(IconWrap, { name: 'sort-' + dir + '-small', icon: dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon }),
79
81
  this.props.title),
80
- React.createElement(Button, { fillMode: 'flat', tabIndex: -1, onClick: this.groupRemove, icon: 'close', "aria-label": localizationService.toLanguageString(ungroupColumn, messages[ungroupColumn]) })))));
82
+ React.createElement(Button, { fillMode: 'flat', tabIndex: -1, onClick: this.groupRemove, icon: 'x', svgIcon: xIcon, "aria-label": localizationService.toLanguageString(ungroupColumn, messages[ungroupColumn]) })))));
81
83
  };
82
84
  return GroupingIndicator;
83
85
  }(React.Component));
@@ -29,10 +29,11 @@ import { normalize } from '../interfaces/GridSortSettings';
29
29
  import { ColumnResizer } from '../drag/ColumnResizer';
30
30
  import { ColumnDraggable } from '../drag/ColumnDraggable';
31
31
  import { GridHeaderCell } from './GridHeaderCell';
32
- import { classNames, Keys } from '@progress/kendo-react-common';
32
+ import { classNames, IconWrap, Keys } from '@progress/kendo-react-common';
33
33
  import { HeaderThElement } from '@progress/kendo-react-data-tools';
34
34
  import { registerForLocalization, provideLocalizationService as intl } from '@progress/kendo-react-intl';
35
35
  import { messages, sortAriaLabel } from '../messages';
36
+ import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
36
37
  /**
37
38
  * @hidden
38
39
  */
@@ -147,7 +148,7 @@ var HeaderRow = /** @class */ (function (_super) {
147
148
  }
148
149
  return sortIndex >= 0 && [
149
150
  React.createElement("span", { key: 1, className: 'k-sort-icon' },
150
- React.createElement("span", { className: 'k-icon k-i-sort-' + this.props.sort[sortIndex].dir + '-small' })),
151
+ React.createElement(IconWrap, { name: 'sort-' + this.props.sort[sortIndex].dir + '-small', icon: this.props.sort[sortIndex].dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon })),
151
152
  this.props.sort.length > 1 &&
152
153
  React.createElement("span", { key: 2, className: 'k-sort-icon' },
153
154
  React.createElement("span", { className: "k-sort-order" }, sortIndex + 1))
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-grid',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1673301088,
8
+ publishDate: 1673445141,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
package/dist/npm/Grid.js CHANGED
@@ -636,19 +636,20 @@ var Grid = /** @class */ (function (_super) {
636
636
  header,
637
637
  React.createElement("div", { className: "k-grid-container", role: "presentation" },
638
638
  React.createElement("div", { ref: this.vs.containerRef, className: "k-grid-content k-virtual-content", onScroll: this.scrollHandler, role: "presentation" },
639
- React.createElement(kendo_react_data_tools_1.TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
640
- _this.vs.table = table;
641
- _this.tableElement = table;
642
- } },
643
- React.createElement("table", { className: (0, kendo_react_common_1.classNames)('k-table k-grid-table', (_c = {
644
- 'k-grid-md': !this.props.size
645
- },
646
- _c["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
647
- _c), this.props.className), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
648
- colGroups,
649
- React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: function (tableBody) {
650
- _this.vs.tableBody = tableBody;
651
- }, role: 'rowgroup' }, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body))),
639
+ React.createElement("div", { className: 'k-grid-table-wrap', role: "presentation" },
640
+ React.createElement(kendo_react_data_tools_1.TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
641
+ _this.vs.table = table;
642
+ _this.tableElement = table;
643
+ } },
644
+ React.createElement("table", { className: (0, kendo_react_common_1.classNames)('k-table k-grid-table', (_c = {
645
+ 'k-grid-md': !this.props.size
646
+ },
647
+ _c["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
648
+ _c), this.props.className), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
649
+ colGroups,
650
+ React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: function (tableBody) {
651
+ _this.vs.tableBody = tableBody;
652
+ }, role: 'rowgroup' }, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body)))),
652
653
  React.createElement("div", { className: "k-height-container", role: "presentation" },
653
654
  React.createElement("div", { style: this.props.scrollable === 'virtual' ?
654
655
  { 'height': (this.vs.containerHeight) + 'px' } : {} })))),
@@ -37,7 +37,11 @@ var VirtualScroll = /** @class */ (function () {
37
37
  for (var i = 0; i < topItemsCount; i++) {
38
38
  topItemsHeight += heights[i].line + heights[i].acc;
39
39
  }
40
- return { topItemsCount: topItemsCount, topItemsHeight: topItemsHeight };
40
+ return {
41
+ topItemsCount: topItemsCount,
42
+ topItemsHeight: topItemsHeight,
43
+ itemsNeededOnScreen: itemsOnScreen + itemsOnScreen / 2
44
+ };
41
45
  };
42
46
  this.horizontalScrollbarHeight = function () {
43
47
  if (!_this.container) {
@@ -120,9 +124,9 @@ var VirtualScroll = /** @class */ (function () {
120
124
  var scrollTop = this.container.scrollTop;
121
125
  var targetTranslate = this.tableTranslate;
122
126
  var rowsCount = 0;
123
- var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
127
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight, itemsNeededOnScreen = _a.itemsNeededOnScreen;
124
128
  var additionalOnTop = scrollTop - targetTranslate;
125
- if (additionalOnTop > topItemsHeight) {
129
+ if ((additionalOnTop > topItemsHeight) || heights.length <= itemsNeededOnScreen) {
126
130
  return;
127
131
  }
128
132
  while ((rowsCount < this.topCacheCount + this.attendedSkip - this.realSkip + topItemsCount)
@@ -164,13 +168,13 @@ var VirtualScroll = /** @class */ (function () {
164
168
  var scrollTop = this.container.scrollTop;
165
169
  var targetTranslate = this.tableTranslate;
166
170
  var rowsCount = 0;
167
- var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
171
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight, itemsNeededOnScreen = _a.itemsNeededOnScreen;
168
172
  while (rowsCount < heights.length - this.topCacheCount &&
169
173
  !(targetTranslate + heights[rowsCount].line + heights[rowsCount].acc > scrollTop)) {
170
174
  targetTranslate += heights[rowsCount].line + heights[rowsCount].acc;
171
175
  rowsCount++;
172
176
  }
173
- if (topItemsCount > this.propsSkip + rowsCount) {
177
+ if ((topItemsCount > this.propsSkip + rowsCount) || heights.length <= itemsNeededOnScreen) {
174
178
  return;
175
179
  }
176
180
  if (rowsCount >= heights.length - this.topCacheCount && this.propsSkip + rowsCount >= this.total) {
@@ -23,6 +23,7 @@ var kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
23
23
  var kendo_react_dateinputs_1 = require("@progress/kendo-react-dateinputs");
24
24
  var messages_1 = require("../messages");
25
25
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
26
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
26
27
  var filterCommon_1 = require("../filterCommon");
27
28
  var kendo_react_common_1 = require("@progress/kendo-react-common");
28
29
  var GridFilterCell = /** @class */ (function (_super) {
@@ -34,7 +35,7 @@ var GridFilterCell = /** @class */ (function (_super) {
34
35
  return;
35
36
  }
36
37
  var value = _this.props.operators.find(function (item) { return item.operator === _this.props.operator; }) || null;
37
- return (React.createElement(kendo_react_dropdowns_1.DropDownList, { size: _this.props.size, value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", data: _this.props.operators, textField: "text", title: localization.toLanguageString(messages_1.filterChooseOperator, messages_1.messages[messages_1.filterChooseOperator]), popupSettings: {
38
+ return (React.createElement(kendo_react_dropdowns_1.DropDownList, { size: _this.props.size, value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", svgIcon: kendo_svg_icons_1.filterIcon, data: _this.props.operators, textField: "text", title: localization.toLanguageString(messages_1.filterChooseOperator, messages_1.messages[messages_1.filterChooseOperator]), popupSettings: {
38
39
  width: ''
39
40
  } }));
40
41
  };
@@ -56,7 +57,7 @@ var GridFilterCell = /** @class */ (function (_super) {
56
57
  React.createElement("div", { className: "k-filtercell-operator" },
57
58
  this.renderOperatorEditor(localizationService),
58
59
  "\u00A0",
59
- React.createElement(kendo_react_buttons_1.Button, { size: this.props.size, icon: 'filter-clear', className: (0, kendo_react_common_1.classNames)((_a = {},
60
+ React.createElement(kendo_react_buttons_1.Button, { size: this.props.size, icon: 'filter-clear', svgIcon: kendo_svg_icons_1.filterClearIcon, className: (0, kendo_react_common_1.classNames)((_a = {},
60
61
  _a['k-clear-button-visible'] = Boolean(!(this.props.value === null || this.props.value === '') || this.props.operator),
61
62
  _a)), title: localizationService.toLanguageString(messages_1.filterClearButton, messages_1.messages[messages_1.filterClearButton]), type: "button", onClick: this.clear, disabled: !(!(this.props.value === null || this.props.value === '') || this.props.operator) })))));
62
63
  if (this.props.render) {
@@ -15,6 +15,7 @@ exports.GridGroupCell = void 0;
15
15
  var kendo_react_common_1 = require("@progress/kendo-react-common");
16
16
  var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
17
17
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
18
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
18
19
  var React = require("react");
19
20
  var messages_1 = require("../messages");
20
21
  /**
@@ -57,7 +58,8 @@ var GridGroupCell = function (props) {
57
58
  value: !expanded
58
59
  });
59
60
  }
60
- }, href: "#", tabIndex: -1, "aria-label": message, className: expanded ? 'k-i-caret-alt-down k-icon' : 'k-i-caret-alt-right k-icon' }),
61
+ }, href: "#", tabIndex: -1, "aria-label": message },
62
+ React.createElement(kendo_react_common_1.IconWrap, { name: expanded ? 'caret-alt-down' : 'caret-alt-right', icon: expanded ? kendo_svg_icons_1.caretAltDownIcon : kendo_svg_icons_1.caretAltRightIcon })),
61
63
  ((dataItem[definedField] instanceof Date) && dataItem[definedField].toString) ?
62
64
  dataItem[definedField].toString() :
63
65
  dataItem[definedField])));
@@ -18,6 +18,7 @@ var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
18
18
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
19
19
  var kendo_react_common_1 = require("@progress/kendo-react-common");
20
20
  var messages_1 = require("../messages");
21
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
21
22
  /**
22
23
  * @hidden
23
24
  */
@@ -46,7 +47,6 @@ var GridHierarchyCell = function (props) {
46
47
  React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell", role: 'gridcell' }, navigationAttributes));
47
48
  }
48
49
  else if (props.rowType !== 'groupHeader') {
49
- var className = expanded ? 'k-icon k-i-minus' : 'k-icon k-i-plus';
50
50
  var baseMessage = expanded ? messages_1.detailCollapse : messages_1.detailExpand;
51
51
  var message = localization.toLanguageString(baseMessage, messages_1.messages[baseMessage]);
52
52
  defaultRendering = (React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell", onKeyDown: onKeyDownHandler, "aria-expanded": expanded ? 'true' : 'false', role: 'gridcell', "aria-colindex": props.ariaColumnIndex }, navigationAttributes),
@@ -61,7 +61,8 @@ var GridHierarchyCell = function (props) {
61
61
  value: !expanded
62
62
  });
63
63
  }
64
- }, "aria-label": message, className: className, href: "#", tabIndex: -1 })));
64
+ }, "aria-label": message, href: "#", tabIndex: -1 },
65
+ React.createElement(kendo_react_common_1.IconWrap, { name: expanded ? 'minus' : 'plus', icon: expanded ? kendo_svg_icons_1.minusIcon : kendo_svg_icons_1.plusIcon }))));
65
66
  }
66
67
  return props.render ?
67
68
  props.render.call(undefined, defaultRendering, props) :
@@ -47,6 +47,7 @@ var kendo_data_query_1 = require("@progress/kendo-data-query");
47
47
  var kendo_react_common_1 = require("@progress/kendo-react-common");
48
48
  var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
49
49
  var utils_1 = require("../utils");
50
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
50
51
  /**
51
52
  * @hidden
52
53
  */
@@ -295,12 +296,12 @@ var GridColumnMenuCheckboxFilter = /** @class */ (function (_super) {
295
296
  var searchBox = this.props.searchBox ?
296
297
  React.createElement(this.props.searchBox, { value: this.state.value, onChange: this.handleSearchChange }) :
297
298
  (React.createElement("div", { className: "k-searchbox k-textbox k-input k-input-md k-input-solid" },
298
- React.createElement("span", { className: "k-input-icon k-icon k-i-search" }),
299
+ React.createElement(kendo_react_common_1.IconWrap, { className: "k-input-icon", name: 'search', icon: kendo_svg_icons_1.searchIcon }),
299
300
  React.createElement(kendo_react_inputs_1.Input, { className: "k-input-inner", type: "text", placeholder: localizationService.toLanguageString(messages_1.searchPlaceholder, messages_1.messages[messages_1.searchPlaceholder]), value: this.state.value, onChange: function (e) { return _this.handleSearchChange(e.nativeEvent); } }),
300
- React.createElement(kendo_react_buttons_1.Button, { type: "button", rounded: null, className: "k-input-button", onClick: this.handleClear, icon: "close" })));
301
+ React.createElement(kendo_react_buttons_1.Button, { type: "button", rounded: null, className: "k-input-button", onClick: this.handleClear, icon: "x", svgIcon: kendo_svg_icons_1.xIcon })));
301
302
  var uniqueFilterValues = filterValues.filter(function (item, index) { return filterValues.indexOf(item) === index; });
302
303
  return (React.createElement(GridColumnMenuItemGroup_1.GridColumnMenuItemGroup, null,
303
- React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(messages_1.filterTitle, messages_1.messages[messages_1.filterTitle]), iconClass: "k-i-filter", onClick: this.onFilterExpand }),
304
+ React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(messages_1.filterTitle, messages_1.messages[messages_1.filterTitle]), iconClass: "k-i-filter", svgIcon: kendo_svg_icons_1.filterIcon, onClick: this.onFilterExpand }),
304
305
  React.createElement(GridColumnMenuItemContent_1.GridColumnMenuItemContent, { show: !!expandState },
305
306
  React.createElement("div", { className: "kendo-grid-filter-menu-container" },
306
307
  React.createElement("form", { className: "k-filter-menu k-group k-reset k-state-border-up", onSubmit: this.submit, onReset: this.clear },
@@ -46,6 +46,7 @@ var filterCommon_1 = require("../filterCommon");
46
46
  var messages_1 = require("../messages");
47
47
  var GridColumnMenuFilterUI_1 = require("./GridColumnMenuFilterUI");
48
48
  var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
49
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
49
50
  /**
50
51
  * @hidden
51
52
  */
@@ -354,7 +355,7 @@ var GridColumnMenuFilter = /** @class */ (function (_super) {
354
355
  (0, filterCommon_1.IsUnaryFilter)(filters[1].operator);
355
356
  var expandState = this.isControlled() ? this.props.expanded : this.state.expanded;
356
357
  return (React.createElement(GridColumnMenuItemGroup_1.GridColumnMenuItemGroup, null,
357
- React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(messages_1.filterTitle, messages_1.messages[messages_1.filterTitle]), iconClass: 'k-i-filter', onClick: this.onFilterExpand }),
358
+ React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(messages_1.filterTitle, messages_1.messages[messages_1.filterTitle]), iconClass: 'k-i-filter', svgIcon: kendo_svg_icons_1.filterIcon, onClick: this.onFilterExpand }),
358
359
  React.createElement(GridColumnMenuItemContent_1.GridColumnMenuItemContent, { show: !!expandState },
359
360
  React.createElement("div", { className: 'kendo-grid-filter-menu-container' },
360
361
  React.createElement("form", { className: 'k-filter-menu k-group k-reset k-state-border-up', onSubmit: this.submit, onReset: this.clear, onKeyDown: function (e) { return e.stopPropagation(); } },
@@ -21,6 +21,7 @@ var kendo_react_intl_1 = require("@progress/kendo-react-intl");
21
21
  var GridColumnMenuItemGroup_1 = require("./GridColumnMenuItemGroup");
22
22
  var GridColumnMenuItem_1 = require("./GridColumnMenuItem");
23
23
  var messages_1 = require("../messages");
24
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
24
25
  /**
25
26
  * @example
26
27
  * ```jsx-no-run
@@ -117,9 +118,8 @@ var GridColumnMenuGroup = /** @class */ (function (_super) {
117
118
  var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
118
119
  var isGrouped = Boolean(group && column.field && group.find(function (currentGroup) { return currentGroup.field === column.field; }));
119
120
  var message = !isGrouped ? messages_1.groupColumn : messages_1.ungroupColumn;
120
- var iconClass = !isGrouped ? 'k-i-group' : 'k-i-ungroup';
121
121
  return (React.createElement(GridColumnMenuItemGroup_1.GridColumnMenuItemGroup, null,
122
- React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(message, messages_1.messages[message]), iconClass: iconClass, onClick: this.onGroupClick })));
122
+ React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(message, messages_1.messages[message]), iconClass: !isGrouped ? 'k-i-group' : 'k-i-ungroup', svgIcon: !isGrouped ? kendo_svg_icons_1.groupIcon : kendo_svg_icons_1.ungroupIcon, onClick: this.onGroupClick })));
123
123
  };
124
124
  return GridColumnMenuGroup;
125
125
  }(React.Component));
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { SVGIcon } from '@progress/kendo-react-common';
2
3
  /**
3
4
  * The props of the GridColumnMenuItem component.
4
5
  */
@@ -15,6 +16,10 @@ export interface GridColumnMenuItemProps {
15
16
  * The class of the icon that is rendered next to the title.
16
17
  */
17
18
  iconClass: string;
19
+ /**
20
+ * The SVG icon that is rendered next to the title.
21
+ */
22
+ svgIcon?: SVGIcon;
18
23
  /**
19
24
  * The selected state of the component.
20
25
  */