@progress/kendo-react-grid 5.11.0-dev.202301311203 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/dist/es/Grid.d.ts +1 -0
- package/dist/es/Grid.js +39 -37
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/Grid.d.ts +1 -0
- package/dist/npm/Grid.js +39 -37
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
package/dist/es/Grid.d.ts
CHANGED
package/dist/es/Grid.js
CHANGED
|
@@ -272,6 +272,44 @@ var Grid = /** @class */ (function (_super) {
|
|
|
272
272
|
_this.mapColumns = memoizeOne(function (columns) {
|
|
273
273
|
return mapColumns(columns);
|
|
274
274
|
});
|
|
275
|
+
_this.configureColumns = memoizeOne(function (columns, groupCount, idPrefix) {
|
|
276
|
+
if (_this.props.selectedField) {
|
|
277
|
+
columns.filter(function (c) { return c.field === _this.props.selectedField; }).forEach(function (c) {
|
|
278
|
+
c.width = c.width || '50px';
|
|
279
|
+
c.cell = c.cell || GridSelectionCell;
|
|
280
|
+
c.headerCell = c.headerCell || GridHeaderSelectionCell;
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
var defaultServiceProps = {
|
|
284
|
+
id: '',
|
|
285
|
+
resizable: true,
|
|
286
|
+
width: '32px',
|
|
287
|
+
title: ' ',
|
|
288
|
+
declarationIndex: -1,
|
|
289
|
+
orderIndex: -1,
|
|
290
|
+
children: [],
|
|
291
|
+
parentIndex: -1,
|
|
292
|
+
depth: 0,
|
|
293
|
+
colSpan: 0,
|
|
294
|
+
rowSpan: 0,
|
|
295
|
+
left: 0,
|
|
296
|
+
right: 0,
|
|
297
|
+
index: 0,
|
|
298
|
+
rightBorder: false,
|
|
299
|
+
ariaColumnIndex: 0,
|
|
300
|
+
isAccessible: true
|
|
301
|
+
};
|
|
302
|
+
var columnIndexOffset = 0;
|
|
303
|
+
if (_this.props.expandField && (_this.props.onExpandChange) && _this.props.detail) {
|
|
304
|
+
columns.unshift(__assign(__assign({}, defaultServiceProps), { cell: GridHierarchyCell, field: _this.props.expandField, headerClassName: 'k-hierarchy-cell k-header', id: navigationTools.generateNavigatableId("".concat(_this._columns.length), idPrefix, 'column') }));
|
|
305
|
+
columnIndexOffset++;
|
|
306
|
+
}
|
|
307
|
+
for (var i = 0; i < groupCount; i++) {
|
|
308
|
+
columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell, field: 'value', locked: _this.props.lockGroups }));
|
|
309
|
+
columnIndexOffset++;
|
|
310
|
+
}
|
|
311
|
+
columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
312
|
+
});
|
|
275
313
|
_this.getHeaderRow = memoizeOne(function (sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, columns, columnsMap) {
|
|
276
314
|
return (React.createElement(HeaderRow, { sort: sort, sortable: sortable, sortChange: _this.sortChange, group: group || [], groupable: groupable, groupChange: _this.groupChange, filter: filter, filterable: filterable, filterOperators: filterOperators, filterChange: _this.filterChange, columnMenu: columnMenu, selectionChange: _this.onHeaderSelectionChange, columns: columns, columnResize: _this.columnResize, pressHandler: _this.dragLogic.pressHandler, dragHandler: _this.dragLogic.dragHandler, releaseHandler: _this.dragLogic.releaseHandler, columnsMap: columnsMap, cellRender: headerCellRender, isRtl: _this.isRtl, dragClue: _this.dragLogic.dragClueRef, headerRef: _this.headerElementRef, containerRef: _this.vs.containerRef }));
|
|
277
315
|
});
|
|
@@ -750,48 +788,12 @@ var Grid = /** @class */ (function (_super) {
|
|
|
750
788
|
}
|
|
751
789
|
};
|
|
752
790
|
Grid.prototype.initColumns = function (children, groupCount) {
|
|
753
|
-
var _this = this;
|
|
754
791
|
var idPrefix = navigationTools.getIdPrefix(this.navigationStateRef);
|
|
755
792
|
this._columns = this.readColumns(children, idPrefix, this._columnsMutations);
|
|
756
793
|
if (this._columns.length === 0) {
|
|
757
794
|
this._columns = autoGenerateColumns(this.props.data, this.props.group, this.props.expandField, { prevId: 0, idPrefix: idPrefix });
|
|
758
795
|
}
|
|
759
|
-
|
|
760
|
-
this._columns.filter(function (c) { return c.field === _this.props.selectedField; }).forEach(function (c) {
|
|
761
|
-
c.width = c.width || '50px';
|
|
762
|
-
c.cell = c.cell || GridSelectionCell;
|
|
763
|
-
c.headerCell = c.headerCell || GridHeaderSelectionCell;
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
var defaultServiceProps = {
|
|
767
|
-
id: '',
|
|
768
|
-
resizable: true,
|
|
769
|
-
width: '32px',
|
|
770
|
-
title: ' ',
|
|
771
|
-
declarationIndex: -1,
|
|
772
|
-
orderIndex: -1,
|
|
773
|
-
children: [],
|
|
774
|
-
parentIndex: -1,
|
|
775
|
-
depth: 0,
|
|
776
|
-
colSpan: 0,
|
|
777
|
-
rowSpan: 0,
|
|
778
|
-
left: 0,
|
|
779
|
-
right: 0,
|
|
780
|
-
index: 0,
|
|
781
|
-
rightBorder: false,
|
|
782
|
-
ariaColumnIndex: 0,
|
|
783
|
-
isAccessible: true
|
|
784
|
-
};
|
|
785
|
-
var columnIndexOffset = 0;
|
|
786
|
-
if (this.props.expandField && (this.props.onExpandChange) && this.props.detail) {
|
|
787
|
-
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { cell: GridHierarchyCell, field: this.props.expandField, headerClassName: 'k-hierarchy-cell k-header', id: navigationTools.generateNavigatableId("".concat(this._columns.length), idPrefix, 'column') }));
|
|
788
|
-
columnIndexOffset++;
|
|
789
|
-
}
|
|
790
|
-
for (var i = 0; i < groupCount; i++) {
|
|
791
|
-
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell, field: 'value', locked: this.props.lockGroups }));
|
|
792
|
-
columnIndexOffset++;
|
|
793
|
-
}
|
|
794
|
-
this._columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
796
|
+
this.configureColumns(this._columns, groupCount, idPrefix);
|
|
795
797
|
this._columnsMap = this.mapColumns(this._columns);
|
|
796
798
|
this.columnResize.columns = this._columns;
|
|
797
799
|
this.dragLogic.columns = this._columns;
|
|
@@ -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: 1675429179,
|
|
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.d.ts
CHANGED
package/dist/npm/Grid.js
CHANGED
|
@@ -275,6 +275,44 @@ var Grid = /** @class */ (function (_super) {
|
|
|
275
275
|
_this.mapColumns = (0, kendo_react_common_1.memoizeOne)(function (columns) {
|
|
276
276
|
return (0, kendo_react_data_tools_1.mapColumns)(columns);
|
|
277
277
|
});
|
|
278
|
+
_this.configureColumns = (0, kendo_react_common_1.memoizeOne)(function (columns, groupCount, idPrefix) {
|
|
279
|
+
if (_this.props.selectedField) {
|
|
280
|
+
columns.filter(function (c) { return c.field === _this.props.selectedField; }).forEach(function (c) {
|
|
281
|
+
c.width = c.width || '50px';
|
|
282
|
+
c.cell = c.cell || GridSelectionCell_1.GridSelectionCell;
|
|
283
|
+
c.headerCell = c.headerCell || GridHeaderSelectionCell_1.GridHeaderSelectionCell;
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
var defaultServiceProps = {
|
|
287
|
+
id: '',
|
|
288
|
+
resizable: true,
|
|
289
|
+
width: '32px',
|
|
290
|
+
title: ' ',
|
|
291
|
+
declarationIndex: -1,
|
|
292
|
+
orderIndex: -1,
|
|
293
|
+
children: [],
|
|
294
|
+
parentIndex: -1,
|
|
295
|
+
depth: 0,
|
|
296
|
+
colSpan: 0,
|
|
297
|
+
rowSpan: 0,
|
|
298
|
+
left: 0,
|
|
299
|
+
right: 0,
|
|
300
|
+
index: 0,
|
|
301
|
+
rightBorder: false,
|
|
302
|
+
ariaColumnIndex: 0,
|
|
303
|
+
isAccessible: true
|
|
304
|
+
};
|
|
305
|
+
var columnIndexOffset = 0;
|
|
306
|
+
if (_this.props.expandField && (_this.props.onExpandChange) && _this.props.detail) {
|
|
307
|
+
columns.unshift(__assign(__assign({}, defaultServiceProps), { cell: GridHierarchyCell_1.GridHierarchyCell, field: _this.props.expandField, headerClassName: 'k-hierarchy-cell k-header', id: kendo_react_data_tools_1.tableKeyboardNavigationTools.generateNavigatableId("".concat(_this._columns.length), idPrefix, 'column') }));
|
|
308
|
+
columnIndexOffset++;
|
|
309
|
+
}
|
|
310
|
+
for (var i = 0; i < groupCount; i++) {
|
|
311
|
+
columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell_1.GridGroupCell, field: 'value', locked: _this.props.lockGroups }));
|
|
312
|
+
columnIndexOffset++;
|
|
313
|
+
}
|
|
314
|
+
columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
315
|
+
});
|
|
278
316
|
_this.getHeaderRow = (0, kendo_react_common_1.memoizeOne)(function (sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, columns, columnsMap) {
|
|
279
317
|
return (React.createElement(HeaderRow_1.HeaderRow, { sort: sort, sortable: sortable, sortChange: _this.sortChange, group: group || [], groupable: groupable, groupChange: _this.groupChange, filter: filter, filterable: filterable, filterOperators: filterOperators, filterChange: _this.filterChange, columnMenu: columnMenu, selectionChange: _this.onHeaderSelectionChange, columns: columns, columnResize: _this.columnResize, pressHandler: _this.dragLogic.pressHandler, dragHandler: _this.dragLogic.dragHandler, releaseHandler: _this.dragLogic.releaseHandler, columnsMap: columnsMap, cellRender: headerCellRender, isRtl: _this.isRtl, dragClue: _this.dragLogic.dragClueRef, headerRef: _this.headerElementRef, containerRef: _this.vs.containerRef }));
|
|
280
318
|
});
|
|
@@ -753,48 +791,12 @@ var Grid = /** @class */ (function (_super) {
|
|
|
753
791
|
}
|
|
754
792
|
};
|
|
755
793
|
Grid.prototype.initColumns = function (children, groupCount) {
|
|
756
|
-
var _this = this;
|
|
757
794
|
var idPrefix = kendo_react_data_tools_1.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);
|
|
758
795
|
this._columns = this.readColumns(children, idPrefix, this._columnsMutations);
|
|
759
796
|
if (this._columns.length === 0) {
|
|
760
797
|
this._columns = (0, index_1.autoGenerateColumns)(this.props.data, this.props.group, this.props.expandField, { prevId: 0, idPrefix: idPrefix });
|
|
761
798
|
}
|
|
762
|
-
|
|
763
|
-
this._columns.filter(function (c) { return c.field === _this.props.selectedField; }).forEach(function (c) {
|
|
764
|
-
c.width = c.width || '50px';
|
|
765
|
-
c.cell = c.cell || GridSelectionCell_1.GridSelectionCell;
|
|
766
|
-
c.headerCell = c.headerCell || GridHeaderSelectionCell_1.GridHeaderSelectionCell;
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
var defaultServiceProps = {
|
|
770
|
-
id: '',
|
|
771
|
-
resizable: true,
|
|
772
|
-
width: '32px',
|
|
773
|
-
title: ' ',
|
|
774
|
-
declarationIndex: -1,
|
|
775
|
-
orderIndex: -1,
|
|
776
|
-
children: [],
|
|
777
|
-
parentIndex: -1,
|
|
778
|
-
depth: 0,
|
|
779
|
-
colSpan: 0,
|
|
780
|
-
rowSpan: 0,
|
|
781
|
-
left: 0,
|
|
782
|
-
right: 0,
|
|
783
|
-
index: 0,
|
|
784
|
-
rightBorder: false,
|
|
785
|
-
ariaColumnIndex: 0,
|
|
786
|
-
isAccessible: true
|
|
787
|
-
};
|
|
788
|
-
var columnIndexOffset = 0;
|
|
789
|
-
if (this.props.expandField && (this.props.onExpandChange) && this.props.detail) {
|
|
790
|
-
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { cell: GridHierarchyCell_1.GridHierarchyCell, field: this.props.expandField, headerClassName: 'k-hierarchy-cell k-header', id: kendo_react_data_tools_1.tableKeyboardNavigationTools.generateNavigatableId("".concat(this._columns.length), idPrefix, 'column') }));
|
|
791
|
-
columnIndexOffset++;
|
|
792
|
-
}
|
|
793
|
-
for (var i = 0; i < groupCount; i++) {
|
|
794
|
-
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell_1.GridGroupCell, field: 'value', locked: this.props.lockGroups }));
|
|
795
|
-
columnIndexOffset++;
|
|
796
|
-
}
|
|
797
|
-
this._columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
799
|
+
this.configureColumns(this._columns, groupCount, idPrefix);
|
|
798
800
|
this._columnsMap = this.mapColumns(this._columns);
|
|
799
801
|
this.columnResize.columns = this._columns;
|
|
800
802
|
this.dragLogic.columns = this._columns;
|
|
@@ -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: 1675429179,
|
|
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
|
};
|