@progress/kendo-react-grid 6.1.1 → 7.0.0-develop.10
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/es/Grid.d.ts → Grid.d.ts} +5 -1
- package/{dist/npm/GridColumn.d.ts → GridColumn.d.ts} +4 -0
- package/{dist/npm/GridNoRecords.d.ts → GridNoRecords.d.ts} +4 -0
- package/{dist/npm/GridToolbar.d.ts → GridToolbar.d.ts} +5 -1
- package/LICENSE.md +1 -1
- package/ScrollMode.d.ts +5 -0
- package/{dist/es/StatusBar.d.ts → StatusBar.d.ts} +4 -0
- package/{dist/npm/VirtualScroll.d.ts → VirtualScroll.d.ts} +4 -0
- package/{dist/es/VirtualScrollFixed.d.ts → VirtualScrollFixed.d.ts} +4 -0
- package/cells/GridCell.d.ts +6 -0
- package/{dist/es/cells → cells}/GridDetailCell.d.ts +5 -1
- package/cells/GridDetailHierarchyCell.d.ts +10 -0
- package/cells/GridEditCell.d.ts +9 -0
- package/cells/GridFilterCell.d.ts +20 -0
- package/cells/GridGroupCell.d.ts +9 -0
- package/cells/GridHierarchyCell.d.ts +9 -0
- package/cells/GridSelectionCell.d.ts +9 -0
- package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuCheckboxFilter.d.ts +5 -1
- package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuColumnsList.d.ts +4 -0
- package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuFilter.d.ts +5 -1
- package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuFilterCell.d.ts +5 -1
- package/columnMenu/GridColumnMenuFilterUI.d.ts +12 -0
- package/{dist/es/columnMenu → columnMenu}/GridColumnMenuGroup.d.ts +5 -1
- package/{dist/es/columnMenu → columnMenu}/GridColumnMenuItem.d.ts +5 -1
- package/{dist/es/columnMenu → columnMenu}/GridColumnMenuItemContent.d.ts +5 -1
- package/{dist/es/columnMenu → columnMenu}/GridColumnMenuItemGroup.d.ts +5 -1
- package/{dist/es/columnMenu → columnMenu}/GridColumnMenuSort.d.ts +5 -1
- package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuWrapper.d.ts +5 -1
- package/{dist/es/constants → constants}/index.d.ts +4 -0
- package/dist/cdn/js/kendo-react-grid.js +5 -1
- package/{dist/npm/drag → drag}/ColumnDraggable.d.ts +5 -1
- package/{dist/es/drag → drag}/ColumnResize.d.ts +4 -0
- package/{dist/es/drag → drag}/CommonDragLogic.d.ts +5 -1
- package/{dist/npm/drag → drag}/GroupingIndicator.d.ts +5 -1
- package/{dist/es/filterCommon.d.ts → filterCommon.d.ts} +5 -1
- package/{dist/npm/footer → footer}/Footer.d.ts +5 -1
- package/{dist/npm/footer → footer}/FooterRow.d.ts +5 -1
- package/{dist/npm/header → header}/FilterRow.d.ts +5 -1
- package/{dist/npm/header → header}/GridHeaderCell.d.ts +5 -1
- package/header/GridHeaderSelectionCell.d.ts +13 -0
- package/{dist/npm/header → header}/GroupPanel.d.ts +5 -1
- package/{dist/es/header → header}/Header.d.ts +5 -1
- package/{dist/npm/header → header}/HeaderRow.d.ts +6 -2
- package/{dist/es/main.d.ts → index.d.ts} +31 -27
- package/index.js +5 -0
- package/index.mjs +3814 -0
- package/{dist/npm/interfaces → interfaces}/GridCellProps.d.ts +4 -1
- package/{dist/es/interfaces → interfaces}/GridCellsSettings.d.ts +4 -0
- package/interfaces/GridColumnMenuBaseProps.d.ts +18 -0
- package/{dist/es/interfaces → interfaces}/GridColumnMenuColumnProps.d.ts +4 -0
- package/{dist/es/interfaces → interfaces}/GridColumnMenuFilterBaseProps.d.ts +4 -1
- package/{dist/es/interfaces → interfaces}/GridColumnMenuFilterUIProps.d.ts +4 -0
- package/{dist/npm/interfaces → interfaces}/GridColumnMenuGroupBaseProps.d.ts +4 -1
- package/{dist/es/interfaces → interfaces}/GridColumnMenuProps.d.ts +4 -0
- package/{dist/npm/interfaces → interfaces}/GridColumnMenuSortBaseProps.d.ts +4 -1
- package/{dist/es/interfaces → interfaces}/GridColumnProps.d.ts +4 -0
- package/interfaces/GridDetailRowProps.d.ts +17 -0
- package/{dist/npm/interfaces → interfaces}/GridFilterCellProps.d.ts +4 -1
- package/interfaces/GridFilterOperator.d.ts +10 -0
- package/{dist/es/interfaces → interfaces}/GridFilterOperators.d.ts +4 -0
- package/{dist/npm/interfaces → interfaces}/GridFooterCellProps.d.ts +4 -1
- package/{dist/es/interfaces → interfaces}/GridGroupableSettings.d.ts +4 -0
- package/{dist/npm/interfaces → interfaces}/GridHeaderCellProps.d.ts +4 -1
- package/interfaces/GridNoRecordsProps.d.ts +13 -0
- package/{dist/npm/interfaces → interfaces}/GridProps.d.ts +4 -0
- package/{dist/es/interfaces → interfaces}/GridRowProps.d.ts +4 -1
- package/interfaces/GridRowType.d.ts +13 -0
- package/{dist/npm/interfaces → interfaces}/GridSelectableSettings.d.ts +5 -1
- package/interfaces/GridSortSettings.d.ts +17 -0
- package/{dist/es/interfaces → interfaces}/GridToolbarProps.d.ts +4 -1
- package/{dist/es/interfaces → interfaces}/VirtualScrollInterface.d.ts +4 -0
- package/{dist/npm/interfaces → interfaces}/events.d.ts +4 -1
- package/{dist/npm/messages → messages}/index.d.ts +4 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +36 -59
- package/{dist/es/paging → paging}/GridPagerSettings.d.ts +6 -2
- package/paging/Page.d.ts +17 -0
- package/{dist/npm/rows → rows}/GridDetailRow.d.ts +4 -0
- package/rows/GridRow.d.ts +15 -0
- package/{dist/es/utils → utils}/index.d.ts +11 -7
- package/about.md +0 -3
- package/dist/es/Grid.js +0 -1042
- package/dist/es/GridColumn.d.ts +0 -24
- package/dist/es/GridColumn.js +0 -54
- package/dist/es/GridNoRecords.d.ts +0 -36
- package/dist/es/GridNoRecords.js +0 -63
- package/dist/es/GridToolbar.d.ts +0 -50
- package/dist/es/GridToolbar.js +0 -78
- package/dist/es/ScrollMode.d.ts +0 -1
- package/dist/es/ScrollMode.js +0 -1
- package/dist/es/StatusBar.js +0 -109
- package/dist/es/VirtualScroll.d.ts +0 -47
- package/dist/es/VirtualScroll.js +0 -243
- package/dist/es/VirtualScrollFixed.js +0 -153
- package/dist/es/cells/GridCell.d.ts +0 -3
- package/dist/es/cells/GridCell.js +0 -59
- package/dist/es/cells/GridDetailCell.js +0 -25
- package/dist/es/cells/GridDetailHierarchyCell.d.ts +0 -7
- package/dist/es/cells/GridDetailHierarchyCell.js +0 -18
- package/dist/es/cells/GridEditCell.d.ts +0 -6
- package/dist/es/cells/GridEditCell.js +0 -96
- package/dist/es/cells/GridFilterCell.d.ts +0 -16
- package/dist/es/cells/GridFilterCell.js +0 -102
- package/dist/es/cells/GridGroupCell.d.ts +0 -6
- package/dist/es/cells/GridGroupCell.js +0 -114
- package/dist/es/cells/GridHierarchyCell.d.ts +0 -6
- package/dist/es/cells/GridHierarchyCell.js +0 -77
- package/dist/es/cells/GridSelectionCell.d.ts +0 -6
- package/dist/es/cells/GridSelectionCell.js +0 -44
- package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.d.ts +0 -118
- package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +0 -328
- package/dist/es/columnMenu/GridColumnMenuColumnsList.d.ts +0 -27
- package/dist/es/columnMenu/GridColumnMenuColumnsList.js +0 -57
- package/dist/es/columnMenu/GridColumnMenuFilter.d.ts +0 -161
- package/dist/es/columnMenu/GridColumnMenuFilter.js +0 -377
- package/dist/es/columnMenu/GridColumnMenuFilterCell.d.ts +0 -33
- package/dist/es/columnMenu/GridColumnMenuFilterCell.js +0 -72
- package/dist/es/columnMenu/GridColumnMenuFilterUI.d.ts +0 -8
- package/dist/es/columnMenu/GridColumnMenuFilterUI.js +0 -48
- package/dist/es/columnMenu/GridColumnMenuGroup.js +0 -125
- package/dist/es/columnMenu/GridColumnMenuItem.js +0 -37
- package/dist/es/columnMenu/GridColumnMenuItemContent.js +0 -36
- package/dist/es/columnMenu/GridColumnMenuItemGroup.js +0 -35
- package/dist/es/columnMenu/GridColumnMenuSort.js +0 -189
- package/dist/es/columnMenu/GridColumnMenuWrapper.d.ts +0 -45
- package/dist/es/columnMenu/GridColumnMenuWrapper.js +0 -120
- package/dist/es/constants/index.js +0 -7
- package/dist/es/drag/ColumnDraggable.d.ts +0 -34
- package/dist/es/drag/ColumnDraggable.js +0 -62
- package/dist/es/drag/ColumnResize.js +0 -234
- package/dist/es/drag/CommonDragLogic.js +0 -209
- package/dist/es/drag/GroupingIndicator.d.ts +0 -37
- package/dist/es/drag/GroupingIndicator.js +0 -107
- package/dist/es/filterCommon.js +0 -165
- package/dist/es/footer/Footer.d.ts +0 -34
- package/dist/es/footer/Footer.js +0 -70
- package/dist/es/footer/FooterRow.d.ts +0 -21
- package/dist/es/footer/FooterRow.js +0 -75
- package/dist/es/header/FilterRow.d.ts +0 -34
- package/dist/es/header/FilterRow.js +0 -139
- package/dist/es/header/GridHeaderCell.d.ts +0 -52
- package/dist/es/header/GridHeaderCell.js +0 -101
- package/dist/es/header/GridHeaderSelectionCell.d.ts +0 -9
- package/dist/es/header/GridHeaderSelectionCell.js +0 -59
- package/dist/es/header/GroupPanel.d.ts +0 -22
- package/dist/es/header/GroupPanel.js +0 -57
- package/dist/es/header/Header.js +0 -112
- package/dist/es/header/HeaderRow.d.ts +0 -47
- package/dist/es/header/HeaderRow.js +0 -180
- package/dist/es/interfaces/GridCellProps.d.ts +0 -70
- package/dist/es/interfaces/GridCellProps.js +0 -2
- package/dist/es/interfaces/GridCellsSettings.js +0 -1
- package/dist/es/interfaces/GridColumnMenuBaseProps.d.ts +0 -14
- package/dist/es/interfaces/GridColumnMenuBaseProps.js +0 -1
- package/dist/es/interfaces/GridColumnMenuColumnProps.js +0 -1
- package/dist/es/interfaces/GridColumnMenuFilterBaseProps.js +0 -1
- package/dist/es/interfaces/GridColumnMenuFilterUIProps.js +0 -1
- package/dist/es/interfaces/GridColumnMenuGroupBaseProps.d.ts +0 -20
- package/dist/es/interfaces/GridColumnMenuGroupBaseProps.js +0 -1
- package/dist/es/interfaces/GridColumnMenuProps.js +0 -1
- package/dist/es/interfaces/GridColumnMenuSortBaseProps.d.ts +0 -21
- package/dist/es/interfaces/GridColumnMenuSortBaseProps.js +0 -1
- package/dist/es/interfaces/GridColumnProps.js +0 -2
- package/dist/es/interfaces/GridDetailRowProps.d.ts +0 -13
- package/dist/es/interfaces/GridDetailRowProps.js +0 -1
- package/dist/es/interfaces/GridFilterCellProps.d.ts +0 -65
- package/dist/es/interfaces/GridFilterCellProps.js +0 -1
- package/dist/es/interfaces/GridFilterOperator.d.ts +0 -6
- package/dist/es/interfaces/GridFilterOperator.js +0 -1
- package/dist/es/interfaces/GridFilterOperators.js +0 -1
- package/dist/es/interfaces/GridFooterCellProps.d.ts +0 -23
- package/dist/es/interfaces/GridFooterCellProps.js +0 -1
- package/dist/es/interfaces/GridGroupableSettings.js +0 -1
- package/dist/es/interfaces/GridHeaderCellProps.d.ts +0 -17
- package/dist/es/interfaces/GridHeaderCellProps.js +0 -1
- package/dist/es/interfaces/GridNoRecordsProps.d.ts +0 -10
- package/dist/es/interfaces/GridNoRecordsProps.js +0 -1
- package/dist/es/interfaces/GridProps.d.ts +0 -317
- package/dist/es/interfaces/GridProps.js +0 -2
- package/dist/es/interfaces/GridRowProps.js +0 -2
- package/dist/es/interfaces/GridRowType.d.ts +0 -9
- package/dist/es/interfaces/GridRowType.js +0 -1
- package/dist/es/interfaces/GridSelectableSettings.d.ts +0 -18
- package/dist/es/interfaces/GridSelectableSettings.js +0 -2
- package/dist/es/interfaces/GridSortSettings.d.ts +0 -13
- package/dist/es/interfaces/GridSortSettings.js +0 -19
- package/dist/es/interfaces/GridToolbarProps.js +0 -1
- package/dist/es/interfaces/VirtualScrollInterface.js +0 -1
- package/dist/es/interfaces/events.d.ts +0 -229
- package/dist/es/interfaces/events.js +0 -1
- package/dist/es/main.js +0 -33
- package/dist/es/messages/index.d.ts +0 -190
- package/dist/es/messages/index.js +0 -191
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/paging/GridPagerSettings.js +0 -21
- package/dist/es/paging/Page.d.ts +0 -13
- package/dist/es/paging/Page.js +0 -1
- package/dist/es/rows/GridDetailRow.d.ts +0 -51
- package/dist/es/rows/GridDetailRow.js +0 -75
- package/dist/es/rows/GridRow.d.ts +0 -11
- package/dist/es/rows/GridRow.js +0 -64
- package/dist/es/utils/index.js +0 -263
- package/dist/npm/Grid.d.ts +0 -255
- package/dist/npm/Grid.js +0 -1045
- package/dist/npm/GridColumn.js +0 -58
- package/dist/npm/GridNoRecords.js +0 -66
- package/dist/npm/GridToolbar.js +0 -81
- package/dist/npm/ScrollMode.d.ts +0 -1
- package/dist/npm/ScrollMode.js +0 -2
- package/dist/npm/StatusBar.d.ts +0 -47
- package/dist/npm/StatusBar.js +0 -115
- package/dist/npm/VirtualScroll.js +0 -246
- package/dist/npm/VirtualScrollFixed.d.ts +0 -49
- package/dist/npm/VirtualScrollFixed.js +0 -156
- package/dist/npm/cells/GridCell.d.ts +0 -3
- package/dist/npm/cells/GridCell.js +0 -63
- package/dist/npm/cells/GridDetailCell.d.ts +0 -14
- package/dist/npm/cells/GridDetailCell.js +0 -29
- package/dist/npm/cells/GridDetailHierarchyCell.d.ts +0 -7
- package/dist/npm/cells/GridDetailHierarchyCell.js +0 -22
- package/dist/npm/cells/GridEditCell.d.ts +0 -6
- package/dist/npm/cells/GridEditCell.js +0 -100
- package/dist/npm/cells/GridFilterCell.d.ts +0 -16
- package/dist/npm/cells/GridFilterCell.js +0 -105
- package/dist/npm/cells/GridGroupCell.d.ts +0 -6
- package/dist/npm/cells/GridGroupCell.js +0 -118
- package/dist/npm/cells/GridHierarchyCell.d.ts +0 -6
- package/dist/npm/cells/GridHierarchyCell.js +0 -81
- package/dist/npm/cells/GridSelectionCell.d.ts +0 -6
- package/dist/npm/cells/GridSelectionCell.js +0 -48
- package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +0 -331
- package/dist/npm/columnMenu/GridColumnMenuColumnsList.js +0 -61
- package/dist/npm/columnMenu/GridColumnMenuFilter.js +0 -382
- package/dist/npm/columnMenu/GridColumnMenuFilterCell.js +0 -75
- package/dist/npm/columnMenu/GridColumnMenuFilterUI.d.ts +0 -8
- package/dist/npm/columnMenu/GridColumnMenuFilterUI.js +0 -51
- package/dist/npm/columnMenu/GridColumnMenuGroup.d.ts +0 -73
- package/dist/npm/columnMenu/GridColumnMenuGroup.js +0 -128
- package/dist/npm/columnMenu/GridColumnMenuItem.d.ts +0 -36
- package/dist/npm/columnMenu/GridColumnMenuItem.js +0 -40
- package/dist/npm/columnMenu/GridColumnMenuItemContent.d.ts +0 -20
- package/dist/npm/columnMenu/GridColumnMenuItemContent.js +0 -39
- package/dist/npm/columnMenu/GridColumnMenuItemGroup.d.ts +0 -16
- package/dist/npm/columnMenu/GridColumnMenuItemGroup.js +0 -38
- package/dist/npm/columnMenu/GridColumnMenuSort.d.ts +0 -85
- package/dist/npm/columnMenu/GridColumnMenuSort.js +0 -192
- package/dist/npm/columnMenu/GridColumnMenuWrapper.js +0 -123
- package/dist/npm/constants/index.d.ts +0 -6
- package/dist/npm/constants/index.js +0 -10
- package/dist/npm/drag/ColumnDraggable.js +0 -65
- package/dist/npm/drag/ColumnResize.d.ts +0 -33
- package/dist/npm/drag/ColumnResize.js +0 -237
- package/dist/npm/drag/CommonDragLogic.d.ts +0 -40
- package/dist/npm/drag/CommonDragLogic.js +0 -212
- package/dist/npm/drag/GroupingIndicator.js +0 -110
- package/dist/npm/filterCommon.d.ts +0 -69
- package/dist/npm/filterCommon.js +0 -175
- package/dist/npm/footer/Footer.js +0 -73
- package/dist/npm/footer/FooterRow.js +0 -78
- package/dist/npm/header/FilterRow.js +0 -142
- package/dist/npm/header/GridHeaderCell.js +0 -104
- package/dist/npm/header/GridHeaderSelectionCell.d.ts +0 -9
- package/dist/npm/header/GridHeaderSelectionCell.js +0 -62
- package/dist/npm/header/GroupPanel.js +0 -60
- package/dist/npm/header/Header.d.ts +0 -42
- package/dist/npm/header/Header.js +0 -115
- package/dist/npm/header/HeaderRow.js +0 -183
- package/dist/npm/interfaces/GridCellProps.js +0 -3
- package/dist/npm/interfaces/GridCellsSettings.d.ts +0 -111
- package/dist/npm/interfaces/GridCellsSettings.js +0 -3
- package/dist/npm/interfaces/GridColumnMenuBaseProps.d.ts +0 -14
- package/dist/npm/interfaces/GridColumnMenuBaseProps.js +0 -2
- package/dist/npm/interfaces/GridColumnMenuColumnProps.d.ts +0 -25
- package/dist/npm/interfaces/GridColumnMenuColumnProps.js +0 -2
- package/dist/npm/interfaces/GridColumnMenuFilterBaseProps.d.ts +0 -25
- package/dist/npm/interfaces/GridColumnMenuFilterBaseProps.js +0 -2
- package/dist/npm/interfaces/GridColumnMenuFilterUIProps.d.ts +0 -31
- package/dist/npm/interfaces/GridColumnMenuFilterUIProps.js +0 -2
- package/dist/npm/interfaces/GridColumnMenuGroupBaseProps.js +0 -2
- package/dist/npm/interfaces/GridColumnMenuProps.d.ts +0 -8
- package/dist/npm/interfaces/GridColumnMenuProps.js +0 -2
- package/dist/npm/interfaces/GridColumnMenuSortBaseProps.js +0 -2
- package/dist/npm/interfaces/GridColumnProps.d.ts +0 -88
- package/dist/npm/interfaces/GridColumnProps.js +0 -3
- package/dist/npm/interfaces/GridDetailRowProps.d.ts +0 -13
- package/dist/npm/interfaces/GridDetailRowProps.js +0 -2
- package/dist/npm/interfaces/GridFilterCellProps.js +0 -2
- package/dist/npm/interfaces/GridFilterOperator.d.ts +0 -6
- package/dist/npm/interfaces/GridFilterOperator.js +0 -2
- package/dist/npm/interfaces/GridFilterOperators.d.ts +0 -49
- package/dist/npm/interfaces/GridFilterOperators.js +0 -2
- package/dist/npm/interfaces/GridFooterCellProps.js +0 -2
- package/dist/npm/interfaces/GridGroupableSettings.d.ts +0 -13
- package/dist/npm/interfaces/GridGroupableSettings.js +0 -2
- package/dist/npm/interfaces/GridHeaderCellProps.js +0 -2
- package/dist/npm/interfaces/GridNoRecordsProps.d.ts +0 -10
- package/dist/npm/interfaces/GridNoRecordsProps.js +0 -2
- package/dist/npm/interfaces/GridProps.js +0 -3
- package/dist/npm/interfaces/GridRowProps.d.ts +0 -64
- package/dist/npm/interfaces/GridRowProps.js +0 -3
- package/dist/npm/interfaces/GridRowType.d.ts +0 -9
- package/dist/npm/interfaces/GridRowType.js +0 -2
- package/dist/npm/interfaces/GridSelectableSettings.js +0 -3
- package/dist/npm/interfaces/GridSortSettings.d.ts +0 -13
- package/dist/npm/interfaces/GridSortSettings.js +0 -23
- package/dist/npm/interfaces/GridToolbarProps.d.ts +0 -34
- package/dist/npm/interfaces/GridToolbarProps.js +0 -2
- package/dist/npm/interfaces/VirtualScrollInterface.d.ts +0 -27
- package/dist/npm/interfaces/VirtualScrollInterface.js +0 -2
- package/dist/npm/interfaces/events.js +0 -2
- package/dist/npm/main.d.ts +0 -51
- package/dist/npm/main.js +0 -90
- package/dist/npm/messages/index.js +0 -195
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/paging/GridPagerSettings.d.ts +0 -67
- package/dist/npm/paging/GridPagerSettings.js +0 -25
- package/dist/npm/paging/Page.d.ts +0 -13
- package/dist/npm/paging/Page.js +0 -2
- package/dist/npm/rows/GridDetailRow.js +0 -78
- package/dist/npm/rows/GridRow.d.ts +0 -11
- package/dist/npm/rows/GridRow.js +0 -67
- package/dist/npm/utils/index.d.ts +0 -69
- package/dist/npm/utils/index.js +0 -275
- package/dist/systemjs/kendo-react-grid.js +0 -1
- package/e2e-legacy/snapshots/column-menu.png +0 -0
- package/e2e-next/basic.tests.ts +0 -25
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.GridColumnMenuGroup = void 0;
|
|
19
|
-
var React = require("react");
|
|
20
|
-
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
21
|
-
var GridColumnMenuItemGroup_1 = require("./GridColumnMenuItemGroup");
|
|
22
|
-
var GridColumnMenuItem_1 = require("./GridColumnMenuItem");
|
|
23
|
-
var messages_1 = require("../messages");
|
|
24
|
-
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
25
|
-
/**
|
|
26
|
-
* @example
|
|
27
|
-
* ```jsx-no-run
|
|
28
|
-
* class TextColumnMenu extends React.Component {
|
|
29
|
-
* render() {
|
|
30
|
-
* return (
|
|
31
|
-
* <div>
|
|
32
|
-
* <GridColumnMenuSort {...this.props} />
|
|
33
|
-
* <GridColumnMenuGroup {...this.props} />
|
|
34
|
-
* </div>);
|
|
35
|
-
* }
|
|
36
|
-
* }
|
|
37
|
-
*
|
|
38
|
-
* class App extends React.PureComponent {
|
|
39
|
-
* constructor(props) {
|
|
40
|
-
* super(props);
|
|
41
|
-
*
|
|
42
|
-
* this.state = this.createAppState({
|
|
43
|
-
* take: 10,
|
|
44
|
-
* skip: 0
|
|
45
|
-
* });
|
|
46
|
-
* }
|
|
47
|
-
*
|
|
48
|
-
* createAppState(dataState) {
|
|
49
|
-
* return {
|
|
50
|
-
* result: process(products.slice(0), dataState),
|
|
51
|
-
* dataState: dataState
|
|
52
|
-
* };
|
|
53
|
-
* }
|
|
54
|
-
*
|
|
55
|
-
* dataStateChange = (event) => {
|
|
56
|
-
* this.setState(this.createAppState(event.dataState));
|
|
57
|
-
* }
|
|
58
|
-
*
|
|
59
|
-
* render() {
|
|
60
|
-
* return (
|
|
61
|
-
* <div>
|
|
62
|
-
* <Grid
|
|
63
|
-
* data={this.state.result}
|
|
64
|
-
* {...this.state.dataState}
|
|
65
|
-
* onDataStateChange={this.dataStateChange}
|
|
66
|
-
* sortable={true}
|
|
67
|
-
* pageable={true}
|
|
68
|
-
* >
|
|
69
|
-
* <Column field="ProductID" title="Product ID" />
|
|
70
|
-
* <Column field="ProductName" columnMenu={TextColumnMenu} />
|
|
71
|
-
* </Grid>
|
|
72
|
-
* <br />
|
|
73
|
-
* </div>
|
|
74
|
-
* );
|
|
75
|
-
* }
|
|
76
|
-
* }
|
|
77
|
-
*
|
|
78
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
var GridColumnMenuGroup = /** @class */ (function (_super) {
|
|
82
|
-
__extends(GridColumnMenuGroup, _super);
|
|
83
|
-
function GridColumnMenuGroup() {
|
|
84
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
85
|
-
/**
|
|
86
|
-
* @hidden
|
|
87
|
-
*/
|
|
88
|
-
_this.onGroupClick = function (event) {
|
|
89
|
-
event.preventDefault();
|
|
90
|
-
if (_this.props.onGroupChange) {
|
|
91
|
-
var column_1 = _this.props.column;
|
|
92
|
-
if (!column_1.field) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
var newGroup = (_this.props.group || []).slice();
|
|
96
|
-
var groupIndex = newGroup.findIndex(function (group) { return group.field === column_1.field; });
|
|
97
|
-
if (groupIndex > -1) {
|
|
98
|
-
newGroup.splice(groupIndex, 1);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
newGroup.push({
|
|
102
|
-
field: column_1.field
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
_this.props.onGroupChange(newGroup, event);
|
|
106
|
-
}
|
|
107
|
-
if (_this.props.onCloseMenu) {
|
|
108
|
-
_this.props.onCloseMenu();
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
return _this;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @hidden
|
|
115
|
-
*/
|
|
116
|
-
GridColumnMenuGroup.prototype.render = function () {
|
|
117
|
-
var _a = this.props, group = _a.group, column = _a.column;
|
|
118
|
-
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
119
|
-
var isGrouped = Boolean(group && column.field && group.find(function (currentGroup) { return currentGroup.field === column.field; }));
|
|
120
|
-
var message = !isGrouped ? messages_1.groupColumn : messages_1.ungroupColumn;
|
|
121
|
-
return (React.createElement(GridColumnMenuItemGroup_1.GridColumnMenuItemGroup, null,
|
|
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
|
-
};
|
|
124
|
-
return GridColumnMenuGroup;
|
|
125
|
-
}(React.Component));
|
|
126
|
-
exports.GridColumnMenuGroup = GridColumnMenuGroup;
|
|
127
|
-
(0, kendo_react_intl_1.registerForIntl)(GridColumnMenuGroup);
|
|
128
|
-
(0, kendo_react_intl_1.registerForLocalization)(GridColumnMenuGroup);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SVGIcon } from '@progress/kendo-react-common';
|
|
3
|
-
/**
|
|
4
|
-
* The props of the GridColumnMenuItem component.
|
|
5
|
-
*/
|
|
6
|
-
export interface GridColumnMenuItemProps {
|
|
7
|
-
/**
|
|
8
|
-
* Triggered each time the title is clicked.
|
|
9
|
-
*/
|
|
10
|
-
onClick: React.MouseEventHandler<HTMLElement>;
|
|
11
|
-
/**
|
|
12
|
-
* The title of the GridColumnMenuItem component.
|
|
13
|
-
*/
|
|
14
|
-
title: string;
|
|
15
|
-
/**
|
|
16
|
-
* The class of the icon that is rendered next to the title.
|
|
17
|
-
*/
|
|
18
|
-
iconClass: string;
|
|
19
|
-
/**
|
|
20
|
-
* The SVG icon that is rendered next to the title.
|
|
21
|
-
*/
|
|
22
|
-
svgIcon?: SVGIcon;
|
|
23
|
-
/**
|
|
24
|
-
* The selected state of the component.
|
|
25
|
-
*/
|
|
26
|
-
selected?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The GridColumnMenuItem component that is used inside the Grid ColumnMenu.
|
|
30
|
-
*/
|
|
31
|
-
export declare class GridColumnMenuItem extends React.Component<GridColumnMenuItemProps, {}> {
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
render(): JSX.Element;
|
|
36
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.GridColumnMenuItem = void 0;
|
|
19
|
-
var React = require("react");
|
|
20
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
21
|
-
/**
|
|
22
|
-
* The GridColumnMenuItem component that is used inside the Grid ColumnMenu.
|
|
23
|
-
*/
|
|
24
|
-
var GridColumnMenuItem = /** @class */ (function (_super) {
|
|
25
|
-
__extends(GridColumnMenuItem, _super);
|
|
26
|
-
function GridColumnMenuItem() {
|
|
27
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
GridColumnMenuItem.prototype.render = function () {
|
|
33
|
-
var _a = this.props, title = _a.title, iconClass = _a.iconClass, svgIcon = _a.svgIcon, selected = _a.selected;
|
|
34
|
-
return (React.createElement("div", { onClick: this.props.onClick, className: "k-columnmenu-item ".concat(selected ? 'k-selected' : '') },
|
|
35
|
-
(iconClass || svgIcon) && React.createElement(kendo_react_common_1.IconWrap, { name: iconClass ? (0, kendo_react_common_1.toIconName)(iconClass) : iconClass, icon: svgIcon }),
|
|
36
|
-
title));
|
|
37
|
-
};
|
|
38
|
-
return GridColumnMenuItem;
|
|
39
|
-
}(React.Component));
|
|
40
|
-
exports.GridColumnMenuItem = GridColumnMenuItem;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
3
|
-
/**
|
|
4
|
-
* The props of the GridColumnMenuItemContent component.
|
|
5
|
-
*/
|
|
6
|
-
export interface GridColumnMenuItemContentProps extends KendoReactComponentBaseProps {
|
|
7
|
-
/**
|
|
8
|
-
* The `show` state of the component. Each change is animated with the Reveal animation.
|
|
9
|
-
*/
|
|
10
|
-
show: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The GridColumnMenuItemContent that will be used inside the Grid ColumnMenu.
|
|
14
|
-
*/
|
|
15
|
-
export declare class GridColumnMenuItemContent extends React.Component<GridColumnMenuItemContentProps, {}> {
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
render(): JSX.Element;
|
|
20
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.GridColumnMenuItemContent = void 0;
|
|
19
|
-
var React = require("react");
|
|
20
|
-
var kendo_react_animation_1 = require("@progress/kendo-react-animation");
|
|
21
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
22
|
-
/**
|
|
23
|
-
* The GridColumnMenuItemContent that will be used inside the Grid ColumnMenu.
|
|
24
|
-
*/
|
|
25
|
-
var GridColumnMenuItemContent = /** @class */ (function (_super) {
|
|
26
|
-
__extends(GridColumnMenuItemContent, _super);
|
|
27
|
-
function GridColumnMenuItemContent() {
|
|
28
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
GridColumnMenuItemContent.prototype.render = function () {
|
|
34
|
-
return (React.createElement("div", { id: this.props.id, className: (0, kendo_react_common_1.classNames)('k-columnmenu-item-content', this.props.className), style: this.props.style },
|
|
35
|
-
React.createElement(kendo_react_animation_1.Reveal, { style: { position: 'relative', display: 'block' } }, this.props.show ? this.props.children : null)));
|
|
36
|
-
};
|
|
37
|
-
return GridColumnMenuItemContent;
|
|
38
|
-
}(React.Component));
|
|
39
|
-
exports.GridColumnMenuItemContent = GridColumnMenuItemContent;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* The props of the GridColumnMenuItemGroup component.
|
|
5
|
-
*/
|
|
6
|
-
export interface GridColumnMenuItemGroupProps extends KendoReactComponentBaseProps {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The GridColumnMenuItemGroup that will be used inside the Grid ColumnMenu.
|
|
10
|
-
*/
|
|
11
|
-
export declare class GridColumnMenuItemGroup extends React.Component<GridColumnMenuItemGroupProps, {}> {
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
render(): JSX.Element;
|
|
16
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.GridColumnMenuItemGroup = void 0;
|
|
19
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
20
|
-
var React = require("react");
|
|
21
|
-
/**
|
|
22
|
-
* The GridColumnMenuItemGroup that will be used inside the Grid ColumnMenu.
|
|
23
|
-
*/
|
|
24
|
-
var GridColumnMenuItemGroup = /** @class */ (function (_super) {
|
|
25
|
-
__extends(GridColumnMenuItemGroup, _super);
|
|
26
|
-
function GridColumnMenuItemGroup() {
|
|
27
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
GridColumnMenuItemGroup.prototype.render = function () {
|
|
33
|
-
var children = this.props.children;
|
|
34
|
-
return (React.createElement("div", { id: this.props.id, className: (0, kendo_react_common_1.classNames)('k-columnmenu-item-wrapper', this.props.className), style: this.props.style }, children));
|
|
35
|
-
};
|
|
36
|
-
return GridColumnMenuItemGroup;
|
|
37
|
-
}(React.Component));
|
|
38
|
-
exports.GridColumnMenuItemGroup = GridColumnMenuItemGroup;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SortDescriptor } from '@progress/kendo-data-query';
|
|
3
|
-
import { GridColumnMenuSortBaseProps } from '../interfaces/GridColumnMenuSortBaseProps';
|
|
4
|
-
/**
|
|
5
|
-
* The props of the GridColumnMenuSort component.
|
|
6
|
-
*/
|
|
7
|
-
export interface GridColumnMenuSortProps extends GridColumnMenuSortBaseProps {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @example
|
|
11
|
-
* ```jsx-no-run
|
|
12
|
-
* class ColumnMenu extends React.Component {
|
|
13
|
-
* render() {
|
|
14
|
-
* return (
|
|
15
|
-
* <div>
|
|
16
|
-
* <GridColumnMenuSort {...this.props} />
|
|
17
|
-
* </div>);
|
|
18
|
-
* }
|
|
19
|
-
* }
|
|
20
|
-
*
|
|
21
|
-
* class App extends React.PureComponent {
|
|
22
|
-
* constructor(props) {
|
|
23
|
-
* super(props);
|
|
24
|
-
*
|
|
25
|
-
* this.state = this.createAppState({
|
|
26
|
-
* take: 10,
|
|
27
|
-
* skip: 0
|
|
28
|
-
* });
|
|
29
|
-
* }
|
|
30
|
-
*
|
|
31
|
-
* createAppState(dataState) {
|
|
32
|
-
* return {
|
|
33
|
-
* result: process(products.slice(0), dataState),
|
|
34
|
-
* dataState: dataState
|
|
35
|
-
* };
|
|
36
|
-
* }
|
|
37
|
-
*
|
|
38
|
-
* dataStateChange = (event) => {
|
|
39
|
-
* this.setState(this.createAppState(event.dataState));
|
|
40
|
-
* }
|
|
41
|
-
*
|
|
42
|
-
* render() {
|
|
43
|
-
* return (
|
|
44
|
-
* <div>
|
|
45
|
-
* <Grid
|
|
46
|
-
* data={this.state.result}
|
|
47
|
-
* {...this.state.dataState}
|
|
48
|
-
* onDataStateChange={this.dataStateChange}
|
|
49
|
-
* sortable={true}
|
|
50
|
-
* pageable={true}
|
|
51
|
-
* >
|
|
52
|
-
* <Column field="ProductID" title="Product ID" columnMenu={ColumnMenu}/>
|
|
53
|
-
* <Column field="ProductName" />
|
|
54
|
-
* </Grid>
|
|
55
|
-
* <br />
|
|
56
|
-
* </div>
|
|
57
|
-
* );
|
|
58
|
-
* }
|
|
59
|
-
* }
|
|
60
|
-
*
|
|
61
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export declare class GridColumnMenuSort extends React.Component<GridColumnMenuSortProps, {}> {
|
|
65
|
-
/**
|
|
66
|
-
* Can be used to check if sorting is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active sort indicators.
|
|
67
|
-
*/
|
|
68
|
-
static active: (field: string, sort?: SortDescriptor[]) => boolean;
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
onAscClick: (event: any) => void;
|
|
73
|
-
/**
|
|
74
|
-
* @hidden
|
|
75
|
-
*/
|
|
76
|
-
onDescClick: (event: any) => void;
|
|
77
|
-
/**
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
onSort: (event: React.MouseEvent<HTMLAnchorElement>, selectedDir: 'asc' | 'desc') => void;
|
|
81
|
-
/**
|
|
82
|
-
* @hidden
|
|
83
|
-
*/
|
|
84
|
-
render(): JSX.Element;
|
|
85
|
-
}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.GridColumnMenuSort = void 0;
|
|
19
|
-
var React = require("react");
|
|
20
|
-
var GridColumnMenuItem_1 = require("./GridColumnMenuItem");
|
|
21
|
-
var GridColumnMenuItemGroup_1 = require("./GridColumnMenuItemGroup");
|
|
22
|
-
var GridSortSettings_1 = require("../interfaces/GridSortSettings");
|
|
23
|
-
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
24
|
-
var messages_1 = require("../messages");
|
|
25
|
-
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
var ASC_DIR = 'asc';
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
var DESC_DIR = 'desc';
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
var sortSeqMap = {
|
|
38
|
-
true: {
|
|
39
|
-
'asc': { 'asc': '', 'desc': 'desc' },
|
|
40
|
-
'desc': { 'asc': 'asc', 'desc': '' },
|
|
41
|
-
'': { 'asc': 'asc', 'desc': 'desc' }
|
|
42
|
-
},
|
|
43
|
-
false: {
|
|
44
|
-
'asc': { 'asc': 'asc', 'desc': 'desc' },
|
|
45
|
-
'desc': { 'asc': 'asc', 'desc': 'desc' },
|
|
46
|
-
'': { 'asc': 'asc', 'desc': 'desc' }
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
52
|
-
var sortIndex = function (field, sort) {
|
|
53
|
-
if (!sort) {
|
|
54
|
-
return -1;
|
|
55
|
-
}
|
|
56
|
-
return sort.findIndex(function (s) { return s.field === field; });
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
var sortedAsc = function (sortedIndex, sort) {
|
|
62
|
-
return !!(sort && sortedIndex > -1 && sort[sortedIndex].dir === ASC_DIR);
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
var sortedDesc = function (sortedIndex, sort) {
|
|
68
|
-
return !!(sort && sortedIndex > -1 && sort[sortedIndex].dir === DESC_DIR);
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* @example
|
|
72
|
-
* ```jsx-no-run
|
|
73
|
-
* class ColumnMenu extends React.Component {
|
|
74
|
-
* render() {
|
|
75
|
-
* return (
|
|
76
|
-
* <div>
|
|
77
|
-
* <GridColumnMenuSort {...this.props} />
|
|
78
|
-
* </div>);
|
|
79
|
-
* }
|
|
80
|
-
* }
|
|
81
|
-
*
|
|
82
|
-
* class App extends React.PureComponent {
|
|
83
|
-
* constructor(props) {
|
|
84
|
-
* super(props);
|
|
85
|
-
*
|
|
86
|
-
* this.state = this.createAppState({
|
|
87
|
-
* take: 10,
|
|
88
|
-
* skip: 0
|
|
89
|
-
* });
|
|
90
|
-
* }
|
|
91
|
-
*
|
|
92
|
-
* createAppState(dataState) {
|
|
93
|
-
* return {
|
|
94
|
-
* result: process(products.slice(0), dataState),
|
|
95
|
-
* dataState: dataState
|
|
96
|
-
* };
|
|
97
|
-
* }
|
|
98
|
-
*
|
|
99
|
-
* dataStateChange = (event) => {
|
|
100
|
-
* this.setState(this.createAppState(event.dataState));
|
|
101
|
-
* }
|
|
102
|
-
*
|
|
103
|
-
* render() {
|
|
104
|
-
* return (
|
|
105
|
-
* <div>
|
|
106
|
-
* <Grid
|
|
107
|
-
* data={this.state.result}
|
|
108
|
-
* {...this.state.dataState}
|
|
109
|
-
* onDataStateChange={this.dataStateChange}
|
|
110
|
-
* sortable={true}
|
|
111
|
-
* pageable={true}
|
|
112
|
-
* >
|
|
113
|
-
* <Column field="ProductID" title="Product ID" columnMenu={ColumnMenu}/>
|
|
114
|
-
* <Column field="ProductName" />
|
|
115
|
-
* </Grid>
|
|
116
|
-
* <br />
|
|
117
|
-
* </div>
|
|
118
|
-
* );
|
|
119
|
-
* }
|
|
120
|
-
* }
|
|
121
|
-
*
|
|
122
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
var GridColumnMenuSort = /** @class */ (function (_super) {
|
|
126
|
-
__extends(GridColumnMenuSort, _super);
|
|
127
|
-
function GridColumnMenuSort() {
|
|
128
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
129
|
-
/**
|
|
130
|
-
* @hidden
|
|
131
|
-
*/
|
|
132
|
-
_this.onAscClick = function (event) {
|
|
133
|
-
_this.onSort(event, ASC_DIR);
|
|
134
|
-
if (_this.props.onCloseMenu) {
|
|
135
|
-
_this.props.onCloseMenu();
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* @hidden
|
|
140
|
-
*/
|
|
141
|
-
_this.onDescClick = function (event) {
|
|
142
|
-
_this.onSort(event, DESC_DIR);
|
|
143
|
-
if (_this.props.onCloseMenu) {
|
|
144
|
-
_this.props.onCloseMenu();
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* @hidden
|
|
149
|
-
*/
|
|
150
|
-
_this.onSort = function (event, selectedDir) {
|
|
151
|
-
event.preventDefault();
|
|
152
|
-
if (!_this.props.onSortChange) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
var _a = _this.props, column = _a.column, sortable = _a.sortable, sort = _a.sort;
|
|
156
|
-
var _b = (0, GridSortSettings_1.normalize)(sortable || false, false), allowUnsort = _b.allowUnsort, mode = _b.mode;
|
|
157
|
-
var oldDescriptor = (sort || []).filter(function (d) { return d.field === column.field; })[0];
|
|
158
|
-
var dir = sortSeqMap[allowUnsort][oldDescriptor && oldDescriptor.dir || ''][selectedDir];
|
|
159
|
-
var newDescriptor = (mode === 'single') ?
|
|
160
|
-
[] : (_this.props.sort || []).filter(function (d) { return d.field !== column.field; });
|
|
161
|
-
if (dir !== '' && column.field) {
|
|
162
|
-
newDescriptor.push({ field: column.field, dir: dir });
|
|
163
|
-
}
|
|
164
|
-
_this.props.onSortChange(newDescriptor, event);
|
|
165
|
-
};
|
|
166
|
-
return _this;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* @hidden
|
|
170
|
-
*/
|
|
171
|
-
GridColumnMenuSort.prototype.render = function () {
|
|
172
|
-
var _a = this.props, sort = _a.sort, column = _a.column;
|
|
173
|
-
var currentSortIndex = sortIndex(column.field, sort);
|
|
174
|
-
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
175
|
-
return (React.createElement(GridColumnMenuItemGroup_1.GridColumnMenuItemGroup, null,
|
|
176
|
-
React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(messages_1.sortAscending, messages_1.messages[messages_1.sortAscending]), iconClass: 'k-i-sort-asc-sm', svgIcon: kendo_svg_icons_1.sortAscSmallIcon, selected: sortedAsc(currentSortIndex, sort), onClick: this.onAscClick }),
|
|
177
|
-
React.createElement(GridColumnMenuItem_1.GridColumnMenuItem, { title: localizationService.toLanguageString(messages_1.sortDescending, messages_1.messages[messages_1.sortDescending]), iconClass: 'k-i-sort-desc-sm', svgIcon: kendo_svg_icons_1.sortDescSmallIcon, selected: sortedDesc(currentSortIndex, sort), onClick: this.onDescClick })));
|
|
178
|
-
};
|
|
179
|
-
/* eslint-disable max-len */
|
|
180
|
-
/**
|
|
181
|
-
* Can be used to check if sorting is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active sort indicators.
|
|
182
|
-
*/
|
|
183
|
-
// tslint:enable:max-line-length
|
|
184
|
-
GridColumnMenuSort.active = function (field, sort) {
|
|
185
|
-
var currentSortIndex = sortIndex(field, sort);
|
|
186
|
-
return sortedDesc(currentSortIndex, sort) || sortedAsc(currentSortIndex, sort);
|
|
187
|
-
};
|
|
188
|
-
return GridColumnMenuSort;
|
|
189
|
-
}(React.Component));
|
|
190
|
-
exports.GridColumnMenuSort = GridColumnMenuSort;
|
|
191
|
-
(0, kendo_react_intl_1.registerForIntl)(GridColumnMenuSort);
|
|
192
|
-
(0, kendo_react_intl_1.registerForLocalization)(GridColumnMenuSort);
|