@progress/kendo-react-grid 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230
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 +8 -7
- package/dist/es/Grid.js +46 -32
- package/dist/es/GridColumn.d.ts +1 -1
- package/dist/es/GridColumn.js +1 -1
- package/dist/es/GridNoRecords.js +3 -1
- package/dist/es/GridToolbar.js +3 -1
- package/dist/es/ScrollMode.js +1 -0
- package/dist/es/VirtualScroll.d.ts +4 -4
- package/dist/es/VirtualScroll.js +11 -6
- package/dist/es/cells/GridCell.d.ts +2 -1
- package/dist/es/cells/GridEditCell.d.ts +2 -1
- package/dist/es/cells/GridFilterCell.d.ts +1 -1
- package/dist/es/cells/GridFilterCell.js +3 -1
- package/dist/es/cells/GridGroupCell.d.ts +2 -1
- package/dist/es/cells/GridHierarchyCell.d.ts +2 -1
- package/dist/es/cells/GridSelectionCell.d.ts +2 -1
- package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.d.ts +2 -2
- package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +15 -4
- package/dist/es/columnMenu/GridColumnMenuFilter.d.ts +4 -4
- package/dist/es/columnMenu/GridColumnMenuFilter.js +25 -14
- package/dist/es/columnMenu/GridColumnMenuFilterCell.js +3 -1
- package/dist/es/columnMenu/GridColumnMenuFilterUI.js +3 -1
- package/dist/es/columnMenu/GridColumnMenuGroup.d.ts +1 -1
- package/dist/es/columnMenu/GridColumnMenuGroup.js +3 -1
- package/dist/es/columnMenu/GridColumnMenuItem.js +5 -3
- package/dist/es/columnMenu/GridColumnMenuItemContent.js +3 -1
- package/dist/es/columnMenu/GridColumnMenuItemGroup.js +3 -1
- package/dist/es/columnMenu/GridColumnMenuSort.d.ts +1 -1
- package/dist/es/columnMenu/GridColumnMenuSort.js +3 -1
- package/dist/es/columnMenu/GridColumnMenuWrapper.js +11 -3
- package/dist/es/drag/ColumnDraggable.d.ts +2 -2
- package/dist/es/drag/ColumnDraggable.js +4 -1
- package/dist/es/drag/ColumnResize.d.ts +1 -2
- package/dist/es/drag/ColumnResize.js +3 -0
- package/dist/es/drag/ColumnResizer.js +5 -1
- package/dist/es/drag/CommonDragLogic.d.ts +7 -7
- package/dist/es/drag/CommonDragLogic.js +5 -4
- package/dist/es/drag/GroupingIndicator.d.ts +2 -2
- package/dist/es/drag/GroupingIndicator.js +4 -1
- package/dist/es/filterCommon.d.ts +3 -3
- package/dist/es/footer/Footer.js +3 -1
- package/dist/es/footer/FooterRow.d.ts +1 -1
- package/dist/es/footer/FooterRow.js +4 -2
- package/dist/es/header/FilterRow.js +4 -2
- package/dist/es/header/GridHeaderCell.d.ts +1 -1
- package/dist/es/header/GridHeaderCell.js +3 -1
- package/dist/es/header/GridHeaderSelectionCell.d.ts +1 -1
- package/dist/es/header/GridHeaderSelectionCell.js +3 -1
- package/dist/es/header/GroupPanel.d.ts +2 -2
- package/dist/es/header/GroupPanel.js +3 -1
- package/dist/es/header/Header.d.ts +2 -2
- package/dist/es/header/Header.js +6 -5
- package/dist/es/header/HeaderRow.d.ts +1 -1
- package/dist/es/header/HeaderRow.js +3 -1
- package/dist/es/interfaces/GridCellProps.d.ts +1 -1
- package/dist/es/interfaces/GridCellProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuBaseProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuColumnProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuFilterBaseProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuFilterUIProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuGroupBaseProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuProps.js +1 -0
- package/dist/es/interfaces/GridColumnMenuSortBaseProps.js +1 -0
- package/dist/es/interfaces/GridColumnProps.d.ts +1 -1
- package/dist/es/interfaces/GridColumnProps.js +1 -0
- package/dist/es/interfaces/GridDetailRowProps.js +1 -0
- package/dist/es/interfaces/GridFilterCellProps.js +1 -0
- package/dist/es/interfaces/GridFilterOperator.js +1 -0
- package/dist/es/interfaces/GridFilterOperators.js +1 -0
- package/dist/es/interfaces/GridFooterCellProps.js +1 -0
- package/dist/es/interfaces/GridGroupableSettings.js +1 -0
- package/dist/es/interfaces/GridHeaderCellProps.d.ts +1 -1
- package/dist/es/interfaces/GridHeaderCellProps.js +1 -0
- package/dist/es/interfaces/GridNoRecordsProps.js +1 -0
- package/dist/es/interfaces/GridProps.js +1 -0
- package/dist/es/interfaces/GridRowProps.js +1 -0
- package/dist/es/interfaces/GridRowType.js +1 -0
- package/dist/es/interfaces/GridSelectableSettings.js +1 -0
- package/dist/es/interfaces/GridSortSettings.d.ts +1 -11
- package/dist/es/interfaces/GridSortSettings.js +10 -1
- package/dist/es/interfaces/GridToolbarProps.js +1 -0
- package/dist/es/interfaces/events.js +1 -0
- package/dist/es/main.js +1 -0
- package/dist/es/messages/index.d.ts +28 -28
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/paging/Page.js +1 -0
- package/dist/es/rows/GridDetailRow.js +3 -1
- package/dist/es/rows/GridRow.d.ts +1 -1
- package/dist/es/rows/GridRow.js +3 -1
- package/dist/es/utils/index.js +8 -6
- package/dist/npm/Grid.d.ts +8 -7
- package/dist/npm/Grid.js +67 -52
- package/dist/npm/GridColumn.d.ts +1 -1
- package/dist/npm/GridColumn.js +4 -2
- package/dist/npm/GridNoRecords.js +6 -3
- package/dist/npm/GridToolbar.js +4 -1
- package/dist/npm/VirtualScroll.d.ts +4 -4
- package/dist/npm/VirtualScroll.js +12 -6
- package/dist/npm/cells/GridCell.d.ts +2 -1
- package/dist/npm/cells/GridCell.js +7 -5
- package/dist/npm/cells/GridDetailCell.js +4 -2
- package/dist/npm/cells/GridDetailHierarchyCell.js +4 -2
- package/dist/npm/cells/GridEditCell.d.ts +2 -1
- package/dist/npm/cells/GridEditCell.js +7 -5
- package/dist/npm/cells/GridFilterCell.d.ts +1 -1
- package/dist/npm/cells/GridFilterCell.js +10 -7
- package/dist/npm/cells/GridGroupCell.d.ts +2 -1
- package/dist/npm/cells/GridGroupCell.js +5 -3
- package/dist/npm/cells/GridHierarchyCell.d.ts +2 -1
- package/dist/npm/cells/GridHierarchyCell.js +6 -4
- package/dist/npm/cells/GridSelectionCell.d.ts +2 -1
- package/dist/npm/cells/GridSelectionCell.js +6 -4
- package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.d.ts +2 -2
- package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +23 -11
- package/dist/npm/columnMenu/GridColumnMenuFilter.d.ts +4 -4
- package/dist/npm/columnMenu/GridColumnMenuFilter.js +51 -37
- package/dist/npm/columnMenu/GridColumnMenuFilterCell.js +7 -4
- package/dist/npm/columnMenu/GridColumnMenuFilterUI.js +4 -1
- package/dist/npm/columnMenu/GridColumnMenuGroup.d.ts +1 -1
- package/dist/npm/columnMenu/GridColumnMenuGroup.js +7 -4
- package/dist/npm/columnMenu/GridColumnMenuItem.js +6 -3
- package/dist/npm/columnMenu/GridColumnMenuItemContent.js +5 -2
- package/dist/npm/columnMenu/GridColumnMenuItemGroup.js +5 -2
- package/dist/npm/columnMenu/GridColumnMenuSort.d.ts +1 -1
- package/dist/npm/columnMenu/GridColumnMenuSort.js +8 -5
- package/dist/npm/columnMenu/GridColumnMenuWrapper.js +12 -3
- package/dist/npm/constants/index.js +1 -0
- package/dist/npm/drag/ColumnDraggable.d.ts +2 -2
- package/dist/npm/drag/ColumnDraggable.js +5 -1
- package/dist/npm/drag/ColumnResize.d.ts +1 -2
- package/dist/npm/drag/ColumnResize.js +4 -0
- package/dist/npm/drag/ColumnResizer.js +6 -1
- package/dist/npm/drag/CommonDragLogic.d.ts +7 -7
- package/dist/npm/drag/CommonDragLogic.js +8 -6
- package/dist/npm/drag/GroupingIndicator.d.ts +2 -2
- package/dist/npm/drag/GroupingIndicator.js +5 -1
- package/dist/npm/filterCommon.d.ts +3 -3
- package/dist/npm/filterCommon.js +21 -13
- package/dist/npm/footer/Footer.js +5 -2
- package/dist/npm/footer/FooterRow.d.ts +1 -1
- package/dist/npm/footer/FooterRow.js +6 -3
- package/dist/npm/header/FilterRow.js +10 -7
- package/dist/npm/header/GridHeaderCell.d.ts +1 -1
- package/dist/npm/header/GridHeaderCell.js +4 -1
- package/dist/npm/header/GridHeaderSelectionCell.d.ts +1 -1
- package/dist/npm/header/GridHeaderSelectionCell.js +5 -2
- package/dist/npm/header/GroupPanel.d.ts +2 -2
- package/dist/npm/header/GroupPanel.js +6 -3
- package/dist/npm/header/Header.d.ts +2 -2
- package/dist/npm/header/Header.js +10 -8
- package/dist/npm/header/HeaderRow.d.ts +1 -1
- package/dist/npm/header/HeaderRow.js +8 -5
- package/dist/npm/interfaces/GridCellProps.d.ts +1 -1
- package/dist/npm/interfaces/GridColumnProps.d.ts +1 -1
- package/dist/npm/interfaces/GridHeaderCellProps.d.ts +1 -1
- package/dist/npm/interfaces/GridSortSettings.d.ts +1 -11
- package/dist/npm/interfaces/GridSortSettings.js +13 -2
- package/dist/npm/main.js +43 -27
- package/dist/npm/messages/index.d.ts +28 -28
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/paging/GridPagerSettings.js +3 -1
- package/dist/npm/rows/GridDetailRow.js +4 -1
- package/dist/npm/rows/GridRow.d.ts +1 -1
- package/dist/npm/rows/GridRow.js +5 -2
- package/dist/npm/utils/index.js +14 -9
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +19 -19
package/dist/es/Grid.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare class Grid extends React.Component<GridProps, {}> {
|
|
|
65
65
|
buttonCount: PropTypes.Requireable<number>;
|
|
66
66
|
info: PropTypes.Requireable<boolean>;
|
|
67
67
|
type: PropTypes.Requireable<string>;
|
|
68
|
-
pageSizes: PropTypes.Requireable<boolean | number[]>;
|
|
68
|
+
pageSizes: PropTypes.Requireable<boolean | (number | null | undefined)[]>;
|
|
69
69
|
previousNext: PropTypes.Requireable<boolean>;
|
|
70
70
|
}>>;
|
|
71
71
|
pageSize: PropTypes.Requireable<number>;
|
|
@@ -102,7 +102,7 @@ export declare class Grid extends React.Component<GridProps, {}> {
|
|
|
102
102
|
navigatable: PropTypes.Requireable<boolean>;
|
|
103
103
|
};
|
|
104
104
|
/** @hidden */
|
|
105
|
-
static contextType: React.Context<TableKeyboardNavigationContextType>;
|
|
105
|
+
static contextType: React.Context<TableKeyboardNavigationContextType | undefined>;
|
|
106
106
|
protected dragLogic: CommonDragLogic;
|
|
107
107
|
private _columns;
|
|
108
108
|
private _columnsMap;
|
|
@@ -148,13 +148,14 @@ export declare class Grid extends React.Component<GridProps, {}> {
|
|
|
148
148
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
149
149
|
* ```
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
get columns(): GridColumnProps[];
|
|
152
152
|
/**
|
|
153
153
|
* Returns the HTML element of the Grid component.
|
|
154
154
|
*/
|
|
155
|
-
|
|
156
|
-
private
|
|
155
|
+
get element(): HTMLDivElement | null;
|
|
156
|
+
private get document();
|
|
157
157
|
private headerRef;
|
|
158
|
+
private headerElementRef;
|
|
158
159
|
private _element;
|
|
159
160
|
private tableElement;
|
|
160
161
|
private vs;
|
|
@@ -163,7 +164,7 @@ export declare class Grid extends React.Component<GridProps, {}> {
|
|
|
163
164
|
private forceUpdateTimeout;
|
|
164
165
|
private isRtl;
|
|
165
166
|
private _gridId;
|
|
166
|
-
private
|
|
167
|
+
private get _header();
|
|
167
168
|
constructor(props: GridProps);
|
|
168
169
|
/**
|
|
169
170
|
* Method to allow the scroll to be set to a specific row index.
|
|
@@ -186,7 +187,7 @@ export declare class Grid extends React.Component<GridProps, {}> {
|
|
|
186
187
|
/**
|
|
187
188
|
* @hidden
|
|
188
189
|
*/
|
|
189
|
-
getSnapshotBeforeUpdate():
|
|
190
|
+
getSnapshotBeforeUpdate(): null;
|
|
190
191
|
/**
|
|
191
192
|
* @hidden
|
|
192
193
|
*/
|
package/dist/es/Grid.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -22,6 +24,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
22
24
|
};
|
|
23
25
|
return __assign.apply(this, arguments);
|
|
24
26
|
};
|
|
27
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
28
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
29
|
+
if (ar || !(i in from)) {
|
|
30
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
31
|
+
ar[i] = from[i];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
35
|
+
};
|
|
25
36
|
import * as React from 'react';
|
|
26
37
|
import * as PropTypes from 'prop-types';
|
|
27
38
|
import { dispatchEvent, classNames, getter, guid, setScrollbarWidth, canUseDOM } from '@progress/kendo-react-common';
|
|
@@ -90,8 +101,10 @@ var Grid = /** @class */ (function (_super) {
|
|
|
90
101
|
_this._columnsMap = [[]];
|
|
91
102
|
_this.contextStateRef = { current: undefined };
|
|
92
103
|
_this.navigationStateRef = { current: undefined };
|
|
104
|
+
_this._data = [];
|
|
93
105
|
_this.wrapperScrollTop = 0;
|
|
94
106
|
_this.headerRef = React.createRef();
|
|
107
|
+
_this.headerElementRef = React.createRef();
|
|
95
108
|
_this._element = null;
|
|
96
109
|
_this.tableElement = null;
|
|
97
110
|
_this._footer = null;
|
|
@@ -114,8 +127,8 @@ var Grid = /** @class */ (function (_super) {
|
|
|
114
127
|
}
|
|
115
128
|
else if (_this.element) {
|
|
116
129
|
var selectedRow = rowIndex < 1
|
|
117
|
-
? _this.element.querySelector("tbody > tr:nth-child("
|
|
118
|
-
: _this.element.querySelector("tbody > tr:nth-child("
|
|
130
|
+
? _this.element.querySelector("tbody > tr:nth-child(".concat(1, ")"))
|
|
131
|
+
: _this.element.querySelector("tbody > tr:nth-child(".concat(rowIndex, ")"));
|
|
119
132
|
if (selectedRow) {
|
|
120
133
|
selectedRow.scrollIntoView(true);
|
|
121
134
|
}
|
|
@@ -159,8 +172,8 @@ var Grid = /** @class */ (function (_super) {
|
|
|
159
172
|
});
|
|
160
173
|
if (_this.props.onKeyDown) {
|
|
161
174
|
var _a = getSelectionOptions(_this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
162
|
-
|
|
163
|
-
|
|
175
|
+
var ev = __assign({ dataItems: _this.getLeafDataItems(), mode: mode, cell: cell, componentId: _this._gridId, selectedField: _this.props.selectedField }, _this.getArguments(event));
|
|
176
|
+
_this.props.onKeyDown.call(undefined, ev);
|
|
164
177
|
}
|
|
165
178
|
};
|
|
166
179
|
_this.onFocus = function (event) {
|
|
@@ -170,7 +183,8 @@ var Grid = /** @class */ (function (_super) {
|
|
|
170
183
|
};
|
|
171
184
|
_this.onNavigationAction = function (options) {
|
|
172
185
|
if (_this.props.onNavigationAction) {
|
|
173
|
-
|
|
186
|
+
var ev = __assign({ focusElement: options.focusElement }, _this.getArguments(options.event));
|
|
187
|
+
_this.props.onNavigationAction.call(undefined, ev);
|
|
174
188
|
}
|
|
175
189
|
};
|
|
176
190
|
_this.rowClick = function (e, item) {
|
|
@@ -188,12 +202,12 @@ var Grid = /** @class */ (function (_super) {
|
|
|
188
202
|
if (event.field === _this.props.expandField || _this.props.group && event.field === undefined) {
|
|
189
203
|
var expandChange = _this.props.onExpandChange;
|
|
190
204
|
if (expandChange) {
|
|
191
|
-
expandChange.call(undefined, __assign({}, _this.getArguments(event.syntheticEvent), { dataItem: event.dataItem, dataIndex: event.dataIndex, value: event.value }));
|
|
205
|
+
expandChange.call(undefined, __assign(__assign({}, _this.getArguments(event.syntheticEvent)), { dataItem: event.dataItem, dataIndex: event.dataIndex, value: event.value }));
|
|
192
206
|
}
|
|
193
207
|
return;
|
|
194
208
|
}
|
|
195
209
|
if (itemChange) {
|
|
196
|
-
itemChange.call(undefined, __assign({}, _this.getArguments(event.syntheticEvent), { dataItem: event.dataItem, field: event.field, value: event.value }));
|
|
210
|
+
itemChange.call(undefined, __assign(__assign({}, _this.getArguments(event.syntheticEvent)), { dataItem: event.dataItem, field: event.field, value: event.value }));
|
|
197
211
|
}
|
|
198
212
|
};
|
|
199
213
|
_this.onHeaderSelectionChange = function (event) {
|
|
@@ -224,7 +238,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
224
238
|
_this.raiseDataEvent(_this.props.onSortChange, { sort: sort }, { sort: sort }, syntheticEvent);
|
|
225
239
|
};
|
|
226
240
|
_this.filterChange = function (filter, syntheticEvent) {
|
|
227
|
-
_this.raiseDataEvent(_this.props.onFilterChange, { filter: filter }, { filter: filter, skip: 0 }, syntheticEvent);
|
|
241
|
+
_this.raiseDataEvent(_this.props.onFilterChange, { filter: filter }, { filter: filter || undefined, skip: 0 }, syntheticEvent);
|
|
228
242
|
};
|
|
229
243
|
_this.groupChange = function (groups, event) {
|
|
230
244
|
var syntheticEvent = event.nativeEvent ?
|
|
@@ -313,7 +327,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
313
327
|
var shuffledColumns = this._columns.filter(function (q) { return q.declarationIndex >= 0 && q.parentIndex === -1; });
|
|
314
328
|
return sanitizeColumns(shuffledColumns);
|
|
315
329
|
},
|
|
316
|
-
enumerable:
|
|
330
|
+
enumerable: false,
|
|
317
331
|
configurable: true
|
|
318
332
|
});
|
|
319
333
|
Object.defineProperty(Grid.prototype, "element", {
|
|
@@ -323,7 +337,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
323
337
|
get: function () {
|
|
324
338
|
return this._element;
|
|
325
339
|
},
|
|
326
|
-
enumerable:
|
|
340
|
+
enumerable: false,
|
|
327
341
|
configurable: true
|
|
328
342
|
});
|
|
329
343
|
Object.defineProperty(Grid.prototype, "document", {
|
|
@@ -334,14 +348,14 @@ var Grid = /** @class */ (function (_super) {
|
|
|
334
348
|
// useful only for user actions
|
|
335
349
|
return (this.element && this.element.ownerDocument) || document;
|
|
336
350
|
},
|
|
337
|
-
enumerable:
|
|
351
|
+
enumerable: false,
|
|
338
352
|
configurable: true
|
|
339
353
|
});
|
|
340
354
|
Object.defineProperty(Grid.prototype, "_header", {
|
|
341
355
|
get: function () {
|
|
342
356
|
return this.headerRef.current;
|
|
343
357
|
},
|
|
344
|
-
enumerable:
|
|
358
|
+
enumerable: false,
|
|
345
359
|
configurable: true
|
|
346
360
|
});
|
|
347
361
|
/**
|
|
@@ -436,15 +450,15 @@ var Grid = /** @class */ (function (_super) {
|
|
|
436
450
|
this._data = [];
|
|
437
451
|
var resolvedGroupsCount = flatData(this._data, propsData, groupingFooter, { index: this.props.skip || 0 }, this.props.group !== undefined, this.props.expandField);
|
|
438
452
|
var children = React.Children.toArray(this.props.children);
|
|
439
|
-
this.initColumns(children.filter(function (child) { return child &&
|
|
453
|
+
this.initColumns(children.filter(function (child) { return child && child.type &&
|
|
440
454
|
child.type.displayName === 'KendoReactGridColumn'; }), resolvedGroupsCount);
|
|
441
|
-
var toolbar = children.filter(function (child) { return child &&
|
|
455
|
+
var toolbar = children.filter(function (child) { return child && child.type &&
|
|
442
456
|
child.type.displayName === 'KendoReactGridToolbar'; });
|
|
443
|
-
var noRecords = children.filter(function (child) { return child &&
|
|
457
|
+
var noRecords = children.filter(function (child) { return child && child.type &&
|
|
444
458
|
child.type.displayName === 'KendoReactGridNoRecords'; });
|
|
445
459
|
var leafColumns = this._columns.filter(function (c) { return c.children.length === 0; });
|
|
446
460
|
var groupingPanel = groupable && (React.createElement(GroupPanel, { group: this.props.group || [], groupChange: this.groupChange, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, refCallback: this.dragLogic.refGroupPanelDiv, resolveTitle: this.resolveTitle }));
|
|
447
|
-
var header = (React.createElement(Header, { columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, headerRow: React.createElement(HeaderRow, { sort: this.props.sort, sortable: this.props.sortable, sortChange: this.sortChange, group: this.props.group || [], groupable: groupable, groupChange: this.groupChange, filter: this.props.filter, filterable: this.props.filterable, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, columnMenu: this.props.columnMenu, selectionChange: this.onHeaderSelectionChange, columns: this._columns, columnResize: this.columnResize, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, columnsMap: this._columnsMap, cellRender: this.props.headerCellRender, isRtl: this.isRtl, dragClue: this.dragLogic.dragClueRef, headerRef: this.
|
|
461
|
+
var header = (React.createElement(Header, { columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: React.createElement(HeaderRow, { sort: this.props.sort, sortable: this.props.sortable, sortChange: this.sortChange, group: this.props.group || [], groupable: groupable, groupChange: this.groupChange, filter: this.props.filter, filterable: this.props.filterable, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, columnMenu: this.props.columnMenu, selectionChange: this.onHeaderSelectionChange, columns: this._columns, columnResize: this.columnResize, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, columnsMap: this._columnsMap, cellRender: this.props.headerCellRender, isRtl: this.isRtl, dragClue: this.dragLogic.dragClueRef, headerRef: this.headerElementRef, containerRef: this.vs.containerRef }), filterRow: this.props.filterable && React.createElement(FilterRow, { columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
|
|
448
462
|
Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) }));
|
|
449
463
|
var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;
|
|
450
464
|
var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
|
|
@@ -463,15 +477,15 @@ var Grid = /** @class */ (function (_super) {
|
|
|
463
477
|
return null;
|
|
464
478
|
}
|
|
465
479
|
var columnKey = column.id ? column.id : columnIndex;
|
|
466
|
-
var className = ""
|
|
467
|
-
+
|
|
480
|
+
var className = "".concat(column.className ? column.className + ' ' : '')
|
|
481
|
+
+ "".concat(column.locked ? 'k-grid-content-sticky' : '');
|
|
468
482
|
var style = column.left !== undefined
|
|
469
483
|
? !_this.isRtl
|
|
470
484
|
? { left: column.left, right: column.right }
|
|
471
485
|
: { left: column.right, right: column.left }
|
|
472
486
|
: {};
|
|
473
487
|
var cellProps = {
|
|
474
|
-
id: navigationTools.generateNavigatableId(rowId
|
|
488
|
+
id: navigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix),
|
|
475
489
|
colSpan: colSpans[columnIndex],
|
|
476
490
|
dataItem: item.dataItem,
|
|
477
491
|
field: column.field,
|
|
@@ -534,7 +548,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
534
548
|
var absoluteDataIndex = this.vs.propsSkip || 0;
|
|
535
549
|
var body = [];
|
|
536
550
|
var rowIndexStart = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
|
|
537
|
-
var currentAriaRowIndex;
|
|
551
|
+
var currentAriaRowIndex = 0;
|
|
538
552
|
if (this._data.length) {
|
|
539
553
|
var dataIndex_1 = -1;
|
|
540
554
|
var detailRowCount_1 = 0;
|
|
@@ -562,8 +576,8 @@ var Grid = /** @class */ (function (_super) {
|
|
|
562
576
|
return (React.createElement(GridGroupCell, { id: '', dataIndex: item.dataIndex, field: group.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false }));
|
|
563
577
|
}),
|
|
564
578
|
_this.props.expandField &&
|
|
565
|
-
React.createElement(GridDetailHierarchyCell, { id: navigationTools.generateNavigatableId(detailRowId
|
|
566
|
-
React.createElement(GridDetailCell, { dataItem: item.dataItem, dataIndex: item.dataIndex, colSpan: detailColspan, ariaColIndex: 2 + (_this.props.group ? _this.props.group.length : 0), detail: _this.props.detail, id: navigationTools.generateNavigatableId(detailRowId
|
|
579
|
+
React.createElement(GridDetailHierarchyCell, { id: navigationTools.generateNavigatableId("".concat(detailRowId, "-dhcell"), idPrefix) }),
|
|
580
|
+
React.createElement(GridDetailCell, { dataItem: item.dataItem, dataIndex: item.dataIndex, colSpan: detailColspan, ariaColIndex: 2 + (_this.props.group ? _this.props.group.length : 0), detail: _this.props.detail, id: navigationTools.generateNavigatableId("".concat(detailRowId, "-dcell"), idPrefix) }))));
|
|
567
581
|
}
|
|
568
582
|
});
|
|
569
583
|
}
|
|
@@ -646,23 +660,23 @@ var Grid = /** @class */ (function (_super) {
|
|
|
646
660
|
if (this.props.onSelectionChange) {
|
|
647
661
|
var event_1 = options.event, dataItem = options.dataItem, dataIndex = options.dataIndex, columnIndex = options.columnIndex;
|
|
648
662
|
var _a = getSelectionOptions(this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
649
|
-
var selectionEvent = __assign({}, this.getArguments(event_1.syntheticEvent), { dataItem: dataItem, startColIndex: columnIndex, endColIndex: columnIndex, startRowIndex: dataIndex, endRowIndex: dataIndex, dataItems: this.getLeafDataItems(), altKey: false, ctrlKey: false, shiftKey: false, metaKey: false, mode: mode,
|
|
650
|
-
cell: cell, isDrag: false, componentId: this._gridId, selectedField: this.props.selectedField || '' });
|
|
663
|
+
var selectionEvent = __assign(__assign({}, this.getArguments(event_1.syntheticEvent)), { dataItem: dataItem, startColIndex: columnIndex, endColIndex: columnIndex, startRowIndex: dataIndex, endRowIndex: dataIndex, dataItems: this.getLeafDataItems(), altKey: false, ctrlKey: false, shiftKey: false, metaKey: false, mode: mode, cell: cell, isDrag: false, componentId: this._gridId, selectedField: this.props.selectedField || '' });
|
|
651
664
|
this.props.onSelectionChange.call(undefined, selectionEvent);
|
|
652
665
|
}
|
|
653
666
|
};
|
|
654
667
|
Grid.prototype.raiseDataEvent = function (handler, data, moreData, syntheticEvent) {
|
|
655
668
|
var dataStateChange = this.props.onDataStateChange;
|
|
656
669
|
if (handler) {
|
|
657
|
-
|
|
670
|
+
var ev = __assign(__assign({}, this.getArguments(syntheticEvent)), data);
|
|
671
|
+
handler.call(undefined, ev);
|
|
658
672
|
}
|
|
659
673
|
else if (dataStateChange) {
|
|
660
|
-
dataStateChange.call(undefined, __assign({}, this.getArguments(syntheticEvent), { dataState: __assign({}, this.getDataState(), moreData) }));
|
|
674
|
+
dataStateChange.call(undefined, __assign(__assign({}, this.getArguments(syntheticEvent)), { dataState: __assign(__assign({}, this.getDataState()), moreData) }));
|
|
661
675
|
}
|
|
662
676
|
};
|
|
663
677
|
Grid.prototype.columnReorder = function (prev, next, nativeEvent) {
|
|
664
|
-
var _this = this;
|
|
665
678
|
var _a;
|
|
679
|
+
var _this = this;
|
|
666
680
|
var depth = this._columns[prev].depth;
|
|
667
681
|
var end = function (index) {
|
|
668
682
|
do {
|
|
@@ -671,7 +685,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
671
685
|
return index;
|
|
672
686
|
};
|
|
673
687
|
var spliced = this._columns.splice(prev, end(prev) - prev);
|
|
674
|
-
(_a = this._columns).splice.apply(_a, [prev < next ? end(next - spliced.length) : next, 0]
|
|
688
|
+
(_a = this._columns).splice.apply(_a, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced, false));
|
|
675
689
|
this._columns.filter(function (q) { return q.declarationIndex >= 0; }).forEach(function (c, i) { return c.orderIndex = i; });
|
|
676
690
|
var eventColumnProps = this.columns;
|
|
677
691
|
this.forceUpdate();
|
|
@@ -688,7 +702,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
688
702
|
return;
|
|
689
703
|
}
|
|
690
704
|
var group = this.props.group.slice();
|
|
691
|
-
group.splice.apply(group, [nextIndex, 0]
|
|
705
|
+
group.splice.apply(group, __spreadArray([nextIndex, 0], group.splice(prevIndex, 1), false));
|
|
692
706
|
this.groupChange(group, nativeEvent);
|
|
693
707
|
};
|
|
694
708
|
Grid.prototype.columnToGroup = function (columnIndex, groupIndex, nativeEvent) {
|
|
@@ -759,11 +773,11 @@ var Grid = /** @class */ (function (_super) {
|
|
|
759
773
|
};
|
|
760
774
|
var columnIndexOffset = 0;
|
|
761
775
|
if (this.props.expandField && (this.props.onExpandChange) && this.props.detail) {
|
|
762
|
-
this._columns.unshift(__assign({}, defaultServiceProps, { cell: GridHierarchyCell, field: this.props.expandField, headerClassName: 'k-hierarchy-cell k-header', id: navigationTools.generateNavigatableId(""
|
|
776
|
+
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') }));
|
|
763
777
|
columnIndexOffset++;
|
|
764
778
|
}
|
|
765
779
|
for (var i = 0; i < groupCount; i++) {
|
|
766
|
-
this._columns.unshift(__assign({}, defaultServiceProps, { isAccessible: false, cell: GridGroupCell, field: 'value' }));
|
|
780
|
+
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell, field: 'value' }));
|
|
767
781
|
columnIndexOffset++;
|
|
768
782
|
}
|
|
769
783
|
this._columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
package/dist/es/GridColumn.d.ts
CHANGED
package/dist/es/GridColumn.js
CHANGED
package/dist/es/GridNoRecords.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/dist/es/GridToolbar.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/dist/es/ScrollMode.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,13 +13,13 @@ export declare class VirtualScroll {
|
|
|
13
13
|
scrollableVirtual: boolean;
|
|
14
14
|
realSkip: number;
|
|
15
15
|
pageSize: number;
|
|
16
|
-
PageChange: (event: Page, syntheticEvent: React.SyntheticEvent<any>) => void;
|
|
16
|
+
PageChange: ((event: Page, syntheticEvent: React.SyntheticEvent<any>) => void) | null;
|
|
17
17
|
tableBody: HTMLTableSectionElement | null;
|
|
18
|
-
heightContainer:
|
|
18
|
+
heightContainer: null;
|
|
19
19
|
fixedScroll: boolean;
|
|
20
20
|
askedSkip: number | undefined;
|
|
21
21
|
containerRef: React.RefObject<HTMLDivElement>;
|
|
22
|
-
|
|
22
|
+
get container(): HTMLDivElement | null;
|
|
23
23
|
private prevScrollPos;
|
|
24
24
|
private syncTimeout;
|
|
25
25
|
private tableTranslate;
|
|
@@ -28,7 +28,7 @@ export declare class VirtualScroll {
|
|
|
28
28
|
/**
|
|
29
29
|
* @return - The row heights in an array.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
get rowHeights(): Array<{
|
|
32
32
|
line: number;
|
|
33
33
|
acc: number;
|
|
34
34
|
}>;
|
package/dist/es/VirtualScroll.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
*/
|
|
5
5
|
var VirtualScroll = /** @class */ (function () {
|
|
6
6
|
function VirtualScroll(cached) {
|
|
7
|
+
this.table = null;
|
|
7
8
|
this.containerHeight = 0;
|
|
8
9
|
this.topCacheCount = 0; // 4;
|
|
9
10
|
this.attendedSkip = 0; // -4;
|
|
@@ -12,6 +13,8 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
12
13
|
this.scrollableVirtual = false;
|
|
13
14
|
this.realSkip = 0;
|
|
14
15
|
this.pageSize = 0;
|
|
16
|
+
this.PageChange = null;
|
|
17
|
+
this.tableBody = null;
|
|
15
18
|
this.heightContainer = null;
|
|
16
19
|
this.fixedScroll = false;
|
|
17
20
|
this.askedSkip = undefined;
|
|
@@ -29,7 +32,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
29
32
|
get: function () {
|
|
30
33
|
return this.containerRef.current;
|
|
31
34
|
},
|
|
32
|
-
enumerable:
|
|
35
|
+
enumerable: false,
|
|
33
36
|
configurable: true
|
|
34
37
|
});
|
|
35
38
|
Object.defineProperty(VirtualScroll.prototype, "rowHeights", {
|
|
@@ -58,15 +61,17 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
58
61
|
}
|
|
59
62
|
return result;
|
|
60
63
|
},
|
|
61
|
-
enumerable:
|
|
64
|
+
enumerable: false,
|
|
62
65
|
configurable: true
|
|
63
66
|
});
|
|
64
67
|
VirtualScroll.prototype.changePage = function (skip, e) {
|
|
65
68
|
this.attendedSkip = skip - this.topCacheCount;
|
|
66
|
-
this.PageChange
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
if (this.PageChange) {
|
|
70
|
+
this.PageChange({
|
|
71
|
+
skip: Math.max(0, skip - this.topCacheCount),
|
|
72
|
+
take: this.pageSize
|
|
73
|
+
}, e);
|
|
74
|
+
}
|
|
70
75
|
};
|
|
71
76
|
VirtualScroll.prototype.translate = function (dY) {
|
|
72
77
|
this.tableTranslate = dY;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
2
|
-
export declare const GridCell: (props: GridCellProps) => any;
|
|
3
|
+
export declare const GridCell: (props: GridCellProps) => React.ReactElement<HTMLTableCellElement, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
2
3
|
/**
|
|
3
4
|
* @hidden
|
|
4
5
|
*/
|
|
5
|
-
export declare const GridEditCell: (props: GridCellProps) => any;
|
|
6
|
+
export declare const GridEditCell: (props: GridCellProps) => React.ReactElement<HTMLTableCellElement, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -5,7 +5,7 @@ export declare class GridFilterCell extends React.Component<GridFilterCellProps,
|
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
8
|
-
render():
|
|
8
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
9
9
|
private renderOperatorEditor;
|
|
10
10
|
private inputChange;
|
|
11
11
|
private operatorChange;
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
2
3
|
/**
|
|
3
4
|
* @hidden
|
|
4
5
|
*/
|
|
5
|
-
export declare const GridGroupCell: (props: GridCellProps) => any;
|
|
6
|
+
export declare const GridGroupCell: (props: GridCellProps) => React.ReactElement<HTMLTableCellElement, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
2
3
|
/**
|
|
3
4
|
* @hidden
|
|
4
5
|
*/
|
|
5
|
-
export declare const GridHierarchyCell: (props: GridCellProps) => any;
|
|
6
|
+
export declare const GridHierarchyCell: (props: GridCellProps) => React.ReactElement<HTMLTableCellElement, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
2
3
|
/**
|
|
3
4
|
* @hidden
|
|
4
5
|
*/
|
|
5
|
-
export declare const GridSelectionCell: (props: GridCellProps) =>
|
|
6
|
+
export declare const GridSelectionCell: (props: GridCellProps) => JSX.Element | null;
|
|
@@ -98,11 +98,11 @@ export declare class GridColumnMenuCheckboxFilter extends React.Component<GridCo
|
|
|
98
98
|
/**
|
|
99
99
|
* @hidden
|
|
100
100
|
*/
|
|
101
|
-
clear: (e: React.SyntheticEvent<any
|
|
101
|
+
clear: (e: React.SyntheticEvent<any>) => void;
|
|
102
102
|
/**
|
|
103
103
|
* @hidden
|
|
104
104
|
*/
|
|
105
|
-
submit: (e: React.SyntheticEvent<any
|
|
105
|
+
submit: (e: React.SyntheticEvent<any>) => void;
|
|
106
106
|
/**
|
|
107
107
|
* @hidden
|
|
108
108
|
*/
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -22,6 +24,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
22
24
|
};
|
|
23
25
|
return __assign.apply(this, arguments);
|
|
24
26
|
};
|
|
27
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
28
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
29
|
+
if (ar || !(i in from)) {
|
|
30
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
31
|
+
ar[i] = from[i];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
35
|
+
};
|
|
25
36
|
import * as React from 'react';
|
|
26
37
|
import { GridColumnMenuItem } from './GridColumnMenuItem';
|
|
27
38
|
import { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';
|
|
@@ -170,7 +181,7 @@ var GridColumnMenuCheckboxFilter = /** @class */ (function (_super) {
|
|
|
170
181
|
_this.handleCheckBoxChange = function (e, value) {
|
|
171
182
|
var field = _this.props.column.field || '';
|
|
172
183
|
var newFilter = __assign({}, _this.state.currentFilter);
|
|
173
|
-
var filters = _this.state.currentFilter.filters
|
|
184
|
+
var filters = __spreadArray([], _this.state.currentFilter.filters, true) || [];
|
|
174
185
|
var fieldFilters = [];
|
|
175
186
|
if (_this.compositeFilterIndex !== -1 && newFilter.filters[_this.compositeFilterIndex].filters && value !== 'all') {
|
|
176
187
|
fieldFilters = newFilter.filters[_this.compositeFilterIndex].filters;
|
|
@@ -212,7 +223,7 @@ var GridColumnMenuCheckboxFilter = /** @class */ (function (_super) {
|
|
|
212
223
|
_this.isAllSelected = function () {
|
|
213
224
|
var isAllChecked = false;
|
|
214
225
|
if (_this.state.currentFilter) {
|
|
215
|
-
var filters_1 = _this.state.currentFilter.filters
|
|
226
|
+
var filters_1 = __spreadArray([], _this.state.currentFilter.filters, true);
|
|
216
227
|
if (_this.compositeFilterIndex === -1) {
|
|
217
228
|
return false;
|
|
218
229
|
}
|
|
@@ -263,7 +274,7 @@ var GridColumnMenuCheckboxFilter = /** @class */ (function (_super) {
|
|
|
263
274
|
var expandState = this.isControlled() ? this.props.expanded : this.state.expanded;
|
|
264
275
|
var filterValues = [];
|
|
265
276
|
if (this.state.currentFilter) {
|
|
266
|
-
var currentFilter = this.state.currentFilter.filters
|
|
277
|
+
var currentFilter = __spreadArray([], this.state.currentFilter.filters, true);
|
|
267
278
|
this.compositeFilterIndex = currentFilter.findIndex(function (filter) {
|
|
268
279
|
if (filter.filters && filter.filters.length > 0) {
|
|
269
280
|
return filter.filters[0].field === column.field;
|
|
@@ -6,11 +6,11 @@ import { ComponentType } from 'react';
|
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
export declare const rootFilterOrDefault: (rootFilter: CompositeFilterDescriptor) => CompositeFilterDescriptor;
|
|
9
|
+
export declare const rootFilterOrDefault: (rootFilter: CompositeFilterDescriptor | undefined) => CompositeFilterDescriptor;
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
13
|
-
export declare const filterGroupByField: (field: string, filter: CompositeFilterDescriptor) => CompositeFilterDescriptor;
|
|
13
|
+
export declare const filterGroupByField: (field: string, filter: CompositeFilterDescriptor | undefined) => CompositeFilterDescriptor | null;
|
|
14
14
|
/**
|
|
15
15
|
* The props of the GridColumnMenuFilter component.
|
|
16
16
|
*/
|
|
@@ -141,7 +141,7 @@ export declare class GridColumnMenuFilter extends React.Component<GridColumnMenu
|
|
|
141
141
|
/**
|
|
142
142
|
* @hidden
|
|
143
143
|
*/
|
|
144
|
-
clear: (event: React.SyntheticEvent<any
|
|
144
|
+
clear: (event: React.SyntheticEvent<any>) => void;
|
|
145
145
|
/**
|
|
146
146
|
* @hidden
|
|
147
147
|
*/
|
|
@@ -149,7 +149,7 @@ export declare class GridColumnMenuFilter extends React.Component<GridColumnMenu
|
|
|
149
149
|
/**
|
|
150
150
|
* @hidden
|
|
151
151
|
*/
|
|
152
|
-
submit: (event: React.SyntheticEvent<any
|
|
152
|
+
submit: (event: React.SyntheticEvent<any>) => void;
|
|
153
153
|
/**
|
|
154
154
|
* @hidden
|
|
155
155
|
*/
|