@progress/kendo-react-grid 4.11.0 → 4.13.0-dev.202111231559
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/Grid.d.ts +2 -1
- package/dist/es/Grid.js +10 -7
- package/dist/es/VirtualScroll.d.ts +3 -2
- package/dist/es/VirtualScroll.js +9 -0
- package/dist/es/columnMenu/GridColumnMenuWrapper.d.ts +8 -0
- package/dist/es/columnMenu/GridColumnMenuWrapper.js +6 -0
- package/dist/es/drag/ColumnDraggable.d.ts +5 -0
- package/dist/es/drag/ColumnDraggable.js +1 -1
- package/dist/es/drag/CommonDragLogic.d.ts +7 -4
- package/dist/es/drag/CommonDragLogic.js +31 -8
- package/dist/es/header/Header.d.ts +2 -1
- package/dist/es/header/Header.js +9 -2
- package/dist/es/header/HeaderRow.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/Grid.d.ts +2 -1
- package/dist/npm/Grid.js +10 -7
- package/dist/npm/VirtualScroll.d.ts +3 -2
- package/dist/npm/VirtualScroll.js +9 -0
- package/dist/npm/columnMenu/GridColumnMenuWrapper.d.ts +8 -0
- package/dist/npm/columnMenu/GridColumnMenuWrapper.js +6 -0
- package/dist/npm/drag/ColumnDraggable.d.ts +5 -0
- package/dist/npm/drag/ColumnDraggable.js +1 -1
- package/dist/npm/drag/CommonDragLogic.d.ts +7 -4
- package/dist/npm/drag/CommonDragLogic.js +31 -8
- package/dist/npm/header/Header.d.ts +2 -1
- package/dist/npm/header/Header.js +9 -2
- package/dist/npm/header/HeaderRow.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var React = require("react");
|
|
3
4
|
var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
|
|
4
5
|
/**
|
|
5
6
|
* @hidden
|
|
@@ -7,24 +8,18 @@ var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
|
|
|
7
8
|
var CommonDragLogic = /** @class */ (function () {
|
|
8
9
|
function CommonDragLogic(columnReorder, groupReorder, columnToGroup) {
|
|
9
10
|
var _this = this;
|
|
11
|
+
this.refDragElementClue = React.createRef();
|
|
12
|
+
this.refDropElementClue = React.createRef();
|
|
10
13
|
this.reorderable = false;
|
|
11
14
|
this.groupable = false;
|
|
12
15
|
this.startColumn = -1;
|
|
13
16
|
this.startGroup = -1;
|
|
14
17
|
this.currentColumn = -1;
|
|
15
18
|
this.currentGroup = -1;
|
|
16
|
-
this.dropElementClue = null;
|
|
17
|
-
this.dragElementClue = null;
|
|
18
19
|
this.groupPanelDivElement = null;
|
|
19
20
|
this.refGroupPanelDiv = function (e) {
|
|
20
21
|
_this.groupPanelDivElement = e;
|
|
21
22
|
};
|
|
22
|
-
this.refDropElementClue = function (e) {
|
|
23
|
-
_this.dropElementClue = e;
|
|
24
|
-
};
|
|
25
|
-
this.refDragElementClue = function (e) {
|
|
26
|
-
_this.dragElementClue = e;
|
|
27
|
-
};
|
|
28
23
|
this.pressHandler = function (event, element) {
|
|
29
24
|
var startColumn = _this.getColumnIndex(event, element);
|
|
30
25
|
_this.startGroup = _this.getGroupIndex(event);
|
|
@@ -90,6 +85,34 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
90
85
|
this.groupReorder = groupReorder;
|
|
91
86
|
this.columnToGroup = columnToGroup;
|
|
92
87
|
}
|
|
88
|
+
Object.defineProperty(CommonDragLogic.prototype, "dragClueRef", {
|
|
89
|
+
get: function () {
|
|
90
|
+
return this.refDragElementClue;
|
|
91
|
+
},
|
|
92
|
+
enumerable: true,
|
|
93
|
+
configurable: true
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(CommonDragLogic.prototype, "dropClueRef", {
|
|
96
|
+
get: function () {
|
|
97
|
+
return this.refDropElementClue;
|
|
98
|
+
},
|
|
99
|
+
enumerable: true,
|
|
100
|
+
configurable: true
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(CommonDragLogic.prototype, "dragElementClue", {
|
|
103
|
+
get: function () {
|
|
104
|
+
return this.refDragElementClue.current;
|
|
105
|
+
},
|
|
106
|
+
enumerable: true,
|
|
107
|
+
configurable: true
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(CommonDragLogic.prototype, "dropElementClue", {
|
|
110
|
+
get: function () {
|
|
111
|
+
return this.refDropElementClue.current;
|
|
112
|
+
},
|
|
113
|
+
enumerable: true,
|
|
114
|
+
configurable: true
|
|
115
|
+
});
|
|
93
116
|
CommonDragLogic.prototype.getColumnIndex = function (event, parent) {
|
|
94
117
|
if (!parent || (parent.parentElement === this.groupPanelDivElement)) {
|
|
95
118
|
return -1;
|
|
@@ -18,11 +18,12 @@ export interface HeaderProps {
|
|
|
18
18
|
* @hidden
|
|
19
19
|
*/
|
|
20
20
|
export declare class Header extends React.Component<HeaderProps, {}> {
|
|
21
|
-
private
|
|
21
|
+
private elementRef;
|
|
22
22
|
private headerWrap;
|
|
23
23
|
private table;
|
|
24
24
|
private syncScroll;
|
|
25
25
|
private scrollbarWidth;
|
|
26
|
+
readonly element: HTMLDivElement | null;
|
|
26
27
|
componentDidMount(): void;
|
|
27
28
|
/**
|
|
28
29
|
*
|
|
@@ -34,7 +34,7 @@ var Header = /** @class */ (function (_super) {
|
|
|
34
34
|
__extends(Header, _super);
|
|
35
35
|
function Header() {
|
|
36
36
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
37
|
-
_this.
|
|
37
|
+
_this.elementRef = React.createRef();
|
|
38
38
|
_this.headerWrap = null;
|
|
39
39
|
_this.table = null;
|
|
40
40
|
_this.syncScroll = false;
|
|
@@ -55,6 +55,13 @@ var Header = /** @class */ (function (_super) {
|
|
|
55
55
|
};
|
|
56
56
|
return _this;
|
|
57
57
|
}
|
|
58
|
+
Object.defineProperty(Header.prototype, "element", {
|
|
59
|
+
get: function () {
|
|
60
|
+
return this.elementRef.current;
|
|
61
|
+
},
|
|
62
|
+
enumerable: true,
|
|
63
|
+
configurable: true
|
|
64
|
+
});
|
|
58
65
|
Header.prototype.componentDidMount = function () {
|
|
59
66
|
var rtl = kendo_react_data_tools_1.isRtl(this.element);
|
|
60
67
|
if (this.props.columnResize) {
|
|
@@ -88,7 +95,7 @@ var Header = /** @class */ (function (_super) {
|
|
|
88
95
|
this.props.headerRow,
|
|
89
96
|
this.props.filterRow));
|
|
90
97
|
}
|
|
91
|
-
return (React.createElement("div", { ref:
|
|
98
|
+
return (React.createElement("div", { ref: this.elementRef, className: kendo_react_common_1.classNames('k-grid-header', { 'k-grid-draggable-header': this.props.draggable }), role: "presentation" },
|
|
92
99
|
React.createElement("div", { ref: function (div) { _this.headerWrap = div; }, className: "k-grid-header-wrap", style: this.scrollbarWidth ? {} : { borderWidth: 0 }, onScroll: this.onScroll, role: "presentation" },
|
|
93
100
|
React.createElement("table", { ref: function (table) { _this.table = table; }, role: "presentation" },
|
|
94
101
|
React.createElement("colgroup", { ref: function (e) { _this.props.columnResize.colGroupHeader = e; }, role: "presentation" }, this.props.cols),
|
|
@@ -164,7 +164,7 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
164
164
|
this.serviceIndex = 0;
|
|
165
165
|
this.index = -1;
|
|
166
166
|
return this.props.columnsMap.map(function (rowIndexes, i) {
|
|
167
|
-
return _this.props.pressHandler && (React.createElement(ColumnDraggable_1.ColumnDraggable, { key: i, pressHandler: _this.props.pressHandler, dragHandler: _this.props.dragHandler, releaseHandler: _this.props.releaseHandler, ariaRowIndex: i + 1 }, _this.cells(rowIndexes))) || React.createElement("tr", { role: "row", "aria-rowindex": i + 1 }, _this.cells(rowIndexes));
|
|
167
|
+
return _this.props.pressHandler && (React.createElement(ColumnDraggable_1.ColumnDraggable, { key: i, pressHandler: _this.props.pressHandler, dragHandler: _this.props.dragHandler, releaseHandler: _this.props.releaseHandler, ariaRowIndex: i + 1, dragClue: _this.props.dragClue, headerRef: _this.props.headerRef, containerRef: _this.props.containerRef }, _this.cells(rowIndexes))) || React.createElement("tr", { role: "row", "aria-rowindex": i + 1 }, _this.cells(rowIndexes));
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
170
|
return HeaderRow;
|
|
@@ -7,7 +7,7 @@ exports.packageMetadata = {
|
|
|
7
7
|
name: '@progress/kendo-react-grid',
|
|
8
8
|
productName: 'KendoReact',
|
|
9
9
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
10
|
+
publishDate: 1637682566,
|
|
11
11
|
version: '',
|
|
12
12
|
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'
|
|
13
13
|
};
|