@progress/kendo-react-grid 6.0.3-dev.202310161841 → 6.0.3-dev.202310260856
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/dist/es/columnMenu/GridColumnMenuWrapper.d.ts +1 -1
- package/dist/es/columnMenu/GridColumnMenuWrapper.js +10 -8
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/columnMenu/GridColumnMenuWrapper.d.ts +1 -1
- package/dist/npm/columnMenu/GridColumnMenuWrapper.js +9 -7
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
|
@@ -40,6 +40,6 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
|
|
|
40
40
|
/** @hidden */
|
|
41
41
|
onAnchorMouseDown: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
42
42
|
/** @hidden */
|
|
43
|
-
|
|
43
|
+
onAnchorKeyDown: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
44
44
|
render(): JSX.Element;
|
|
45
45
|
}
|
|
@@ -37,7 +37,7 @@ 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';
|
|
40
|
+
import { IconWrap, Keys } from '@progress/kendo-react-common';
|
|
41
41
|
import { moreVerticalIcon } from '@progress/kendo-svg-icons';
|
|
42
42
|
import { columnMenu, messages } from '../messages';
|
|
43
43
|
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
@@ -89,13 +89,15 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
|
|
|
89
89
|
_this.willBlur = _this.state.show && event.currentTarget === _this._anchor;
|
|
90
90
|
};
|
|
91
91
|
/** @hidden */
|
|
92
|
-
_this.
|
|
92
|
+
_this.onAnchorKeyDown = function (event) {
|
|
93
93
|
var _a;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
if (event.keyCode === Keys.tab) {
|
|
95
|
+
var elementToFocus = event.target;
|
|
96
|
+
var parentScroll = elementToFocus && ((_a = elementToFocus.closest('.k-grid')) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('k-grid-content')[0]);
|
|
97
|
+
var hasHorizontalScrollbar = parentScroll && (parentScroll.scrollWidth > parentScroll.clientWidth);
|
|
98
|
+
if (hasHorizontalScrollbar) {
|
|
99
|
+
elementToFocus.scrollIntoView({ inline: 'center' });
|
|
100
|
+
}
|
|
99
101
|
}
|
|
100
102
|
};
|
|
101
103
|
return _this;
|
|
@@ -108,7 +110,7 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
|
|
|
108
110
|
var fieldMessage = column.title || column.field;
|
|
109
111
|
var field = fieldMessage ? "".concat(fieldMessage, " ") : '';
|
|
110
112
|
return (React.createElement(React.Fragment, null,
|
|
111
|
-
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,
|
|
113
|
+
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, onKeyDown: this.onAnchorKeyDown, href: "#", "aria-label": "".concat(field).concat(localizationService.toLanguageString(columnMenu, messages[columnMenu])) },
|
|
112
114
|
React.createElement(IconWrap, { name: 'more-vertical', icon: moreVerticalIcon })),
|
|
113
115
|
React.createElement(Popup, { anchor: this._anchor, show: this.state.show },
|
|
114
116
|
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 })))))));
|
|
@@ -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:
|
|
8
|
+
publishDate: 1698309110,
|
|
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
|
};
|
|
@@ -40,6 +40,6 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
|
|
|
40
40
|
/** @hidden */
|
|
41
41
|
onAnchorMouseDown: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
42
42
|
/** @hidden */
|
|
43
|
-
|
|
43
|
+
onAnchorKeyDown: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
44
44
|
render(): JSX.Element;
|
|
45
45
|
}
|
|
@@ -92,13 +92,15 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
|
|
|
92
92
|
_this.willBlur = _this.state.show && event.currentTarget === _this._anchor;
|
|
93
93
|
};
|
|
94
94
|
/** @hidden */
|
|
95
|
-
_this.
|
|
95
|
+
_this.onAnchorKeyDown = function (event) {
|
|
96
96
|
var _a;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
if (event.keyCode === kendo_react_common_1.Keys.tab) {
|
|
98
|
+
var elementToFocus = event.target;
|
|
99
|
+
var parentScroll = elementToFocus && ((_a = elementToFocus.closest('.k-grid')) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('k-grid-content')[0]);
|
|
100
|
+
var hasHorizontalScrollbar = parentScroll && (parentScroll.scrollWidth > parentScroll.clientWidth);
|
|
101
|
+
if (hasHorizontalScrollbar) {
|
|
102
|
+
elementToFocus.scrollIntoView({ inline: 'center' });
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
};
|
|
104
106
|
return _this;
|
|
@@ -111,7 +113,7 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
|
|
|
111
113
|
var fieldMessage = column.title || column.field;
|
|
112
114
|
var field = fieldMessage ? "".concat(fieldMessage, " ") : '';
|
|
113
115
|
return (React.createElement(React.Fragment, null,
|
|
114
|
-
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,
|
|
116
|
+
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, onKeyDown: this.onAnchorKeyDown, href: "#", "aria-label": "".concat(field).concat(localizationService.toLanguageString(messages_1.columnMenu, messages_1.messages[messages_1.columnMenu])) },
|
|
115
117
|
React.createElement(kendo_react_common_1.IconWrap, { name: 'more-vertical', icon: kendo_svg_icons_1.moreVerticalIcon })),
|
|
116
118
|
React.createElement(kendo_react_popup_1.Popup, { anchor: this._anchor, show: this.state.show },
|
|
117
119
|
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 })))))));
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-grid',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1698309110,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|