@progress/kendo-react-data-tools 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-data-tools.js +1 -1
- package/dist/es/columnmenu/ColumnMenu.js +17 -6
- package/dist/es/columnmenu/ColumnMenuFilterForm.d.ts +1 -0
- package/dist/es/columnmenu/ColumnMenuFilterLogic.js +1 -1
- package/dist/es/columnmenu/ColumnMenuFilters.js +4 -4
- package/dist/es/columnmenu/ColumnMenuItem.js +1 -1
- package/dist/es/columnmenu/ColumnMenuOperators.d.ts +4 -4
- package/dist/es/columnmenu/ColumnMenuOperators.js +17 -8
- package/dist/es/drag/ColumnDraggable.d.ts +1 -0
- package/dist/es/drag/ColumnDraggable.js +4 -1
- package/dist/es/drag/ColumnResize.d.ts +5 -4
- package/dist/es/drag/ColumnResize.js +3 -0
- package/dist/es/drag/ColumnResizer.js +4 -1
- package/dist/es/drag/CommonDragLogic.d.ts +9 -8
- package/dist/es/drag/CommonDragLogic.js +1 -0
- package/dist/es/drag/DragClue.d.ts +2 -2
- package/dist/es/drag/DragClue.js +4 -2
- package/dist/es/drag/DropClue.d.ts +1 -1
- package/dist/es/drag/DropClue.js +3 -1
- package/dist/es/filter/Expression.js +11 -7
- package/dist/es/filter/FieldSettings.js +1 -0
- package/dist/es/filter/Filter.d.ts +1 -1
- package/dist/es/filter/Filter.js +8 -6
- package/dist/es/filter/Group.js +51 -24
- package/dist/es/filter/filters/BooleanFilter.d.ts +2 -2
- package/dist/es/filter/filters/BooleanFilter.js +3 -1
- package/dist/es/filter/filters/DateFilter.js +4 -2
- package/dist/es/filter/filters/EnumFilter.d.ts +2 -2
- package/dist/es/filter/filters/EnumFilter.js +5 -3
- package/dist/es/filter/filters/NumericFilter.js +4 -2
- package/dist/es/filter/filters/TextFilter.d.ts +1 -2
- package/dist/es/filter/filters/TextFilter.js +4 -2
- package/dist/es/filter/index.js +1 -0
- package/dist/es/filter/operators.d.ts +4 -4
- package/dist/es/filter/operators.js +17 -8
- package/dist/es/filteringCells/BooleanFilter.js +13 -2
- package/dist/es/filteringCells/DateFilter.js +3 -1
- package/dist/es/filteringCells/FilterCellProps.js +1 -0
- package/dist/es/filteringCells/FilterComponent.js +15 -4
- package/dist/es/filteringCells/FilterComponentProps.js +1 -0
- package/dist/es/filteringCells/FilterOperator.js +1 -0
- package/dist/es/filteringCells/NumericFilter.js +3 -1
- package/dist/es/filteringCells/TextFilter.js +3 -1
- package/dist/es/filteringCells/index.js +3 -0
- package/dist/es/header/CellProps.js +1 -0
- package/dist/es/header/ColumnProps.d.ts +8 -8
- package/dist/es/header/FilterRow.js +1 -1
- package/dist/es/header/Header.js +3 -1
- package/dist/es/header/HeaderCell.d.ts +1 -1
- package/dist/es/header/HeaderCell.js +2 -2
- package/dist/es/header/HeaderRow.d.ts +9 -7
- package/dist/es/header/HeaderRow.js +3 -1
- package/dist/es/header/HeaderSelectionCell.d.ts +2 -1
- package/dist/es/header/HeaderSelectionCell.js +2 -2
- package/dist/es/header/HeaderThElement.d.ts +10 -10
- package/dist/es/header/SortSettings.d.ts +1 -38
- package/dist/es/header/SortSettings.js +10 -1
- package/dist/es/header/index.js +1 -0
- package/dist/es/header/utils/index.d.ts +5 -2
- package/dist/es/header/utils/index.js +1 -1
- package/dist/es/main.js +4 -0
- package/dist/es/messages/index.d.ts +62 -62
- package/dist/es/navigation/TableKeyboardNavigation.d.ts +8 -8
- package/dist/es/navigation/TableKeyboardNavigation.js +10 -1
- package/dist/es/navigation/TableKeyboardNavigationContext.d.ts +1 -1
- package/dist/es/navigation/TableKeyboardNavigationContextType.js +1 -0
- package/dist/es/navigation/TableKeyboardNavigationStateType.js +1 -0
- package/dist/es/navigation/constants.d.ts +3 -3
- package/dist/es/navigation/constants.js +11 -2
- package/dist/es/navigation/hooks.d.ts +2 -3
- package/dist/es/navigation/utils.d.ts +26 -26
- package/dist/es/navigation/utils.js +10 -10
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/pager/Pager.d.ts +4 -3
- package/dist/es/pager/Pager.js +23 -4
- package/dist/es/pager/PagerInput.js +5 -3
- package/dist/es/pager/PagerNumericButtons.d.ts +2 -2
- package/dist/es/pager/PagerNumericButtons.js +5 -3
- package/dist/es/pager/PagerPageSizes.d.ts +1 -1
- package/dist/es/pager/PagerPageSizes.js +3 -1
- package/dist/es/selection/TableSelectableSettings.js +1 -0
- package/dist/es/selection/TableSelection.js +1 -1
- package/dist/es/selection/events.js +1 -0
- package/dist/es/selection/utils.d.ts +5 -5
- package/dist/es/selection/utils.js +21 -5
- package/dist/es/utils/data-operations.js +13 -4
- package/dist/es/utils/group-operations.d.ts +1 -1
- package/dist/es/utils/group-operations.js +1 -1
- package/dist/es/virtualization/columns.js +10 -1
- package/dist/npm/columnmenu/ColumnMenu.js +29 -13
- package/dist/npm/columnmenu/ColumnMenuFilterForm.d.ts +1 -0
- package/dist/npm/columnmenu/ColumnMenuFilterForm.js +6 -3
- package/dist/npm/columnmenu/ColumnMenuFilterLogic.js +5 -3
- package/dist/npm/columnmenu/ColumnMenuFilters.js +15 -10
- package/dist/npm/columnmenu/ColumnMenuItem.js +5 -3
- package/dist/npm/columnmenu/ColumnMenuOperators.d.ts +4 -4
- package/dist/npm/columnmenu/ColumnMenuOperators.js +18 -8
- package/dist/npm/columnmenu/index.js +20 -9
- package/dist/npm/drag/ColumnDraggable.d.ts +1 -0
- package/dist/npm/drag/ColumnDraggable.js +5 -1
- package/dist/npm/drag/ColumnResize.d.ts +5 -4
- package/dist/npm/drag/ColumnResize.js +4 -0
- package/dist/npm/drag/ColumnResizer.js +5 -1
- package/dist/npm/drag/CommonDragLogic.d.ts +9 -8
- package/dist/npm/drag/CommonDragLogic.js +4 -2
- package/dist/npm/drag/DragClue.d.ts +2 -2
- package/dist/npm/drag/DragClue.js +6 -3
- package/dist/npm/drag/DropClue.d.ts +1 -1
- package/dist/npm/drag/DropClue.js +5 -2
- package/dist/npm/filter/Expression.js +18 -13
- package/dist/npm/filter/Filter.d.ts +1 -1
- package/dist/npm/filter/Filter.js +10 -7
- package/dist/npm/filter/Group.js +56 -28
- package/dist/npm/filter/filters/BooleanFilter.d.ts +2 -2
- package/dist/npm/filter/filters/BooleanFilter.js +4 -1
- package/dist/npm/filter/filters/DateFilter.js +5 -2
- package/dist/npm/filter/filters/EnumFilter.d.ts +2 -2
- package/dist/npm/filter/filters/EnumFilter.js +8 -5
- package/dist/npm/filter/filters/NumericFilter.js +5 -2
- package/dist/npm/filter/filters/TextFilter.d.ts +1 -2
- package/dist/npm/filter/filters/TextFilter.js +5 -2
- package/dist/npm/filter/filters/index.js +19 -8
- package/dist/npm/filter/index.js +20 -8
- package/dist/npm/filter/operators.d.ts +4 -4
- package/dist/npm/filter/operators.js +22 -10
- package/dist/npm/filteringCells/BooleanFilter.js +15 -3
- package/dist/npm/filteringCells/DateFilter.js +5 -2
- package/dist/npm/filteringCells/FilterComponent.js +19 -6
- package/dist/npm/filteringCells/NumericFilter.js +5 -2
- package/dist/npm/filteringCells/TextFilter.js +5 -2
- package/dist/npm/filteringCells/index.js +22 -8
- package/dist/npm/header/ColumnProps.d.ts +8 -8
- package/dist/npm/header/ColumnProps.js +1 -0
- package/dist/npm/header/FilterRow.js +6 -4
- package/dist/npm/header/Header.js +5 -2
- package/dist/npm/header/HeaderCell.d.ts +1 -1
- package/dist/npm/header/HeaderCell.js +3 -2
- package/dist/npm/header/HeaderRow.d.ts +9 -7
- package/dist/npm/header/HeaderRow.js +8 -5
- package/dist/npm/header/HeaderSelectionCell.d.ts +2 -1
- package/dist/npm/header/HeaderSelectionCell.js +3 -2
- package/dist/npm/header/HeaderThElement.d.ts +10 -10
- package/dist/npm/header/HeaderThElement.js +4 -2
- package/dist/npm/header/SortSettings.d.ts +1 -38
- package/dist/npm/header/SortSettings.js +13 -2
- package/dist/npm/header/index.js +24 -12
- package/dist/npm/header/utils/index.d.ts +5 -2
- package/dist/npm/header/utils/index.js +2 -1
- package/dist/npm/main.js +40 -24
- package/dist/npm/messages/index.d.ts +62 -62
- package/dist/npm/messages/index.js +3 -1
- package/dist/npm/navigation/TableKeyboardNavigation.d.ts +8 -8
- package/dist/npm/navigation/TableKeyboardNavigation.js +19 -9
- package/dist/npm/navigation/TableKeyboardNavigationContext.d.ts +1 -1
- package/dist/npm/navigation/TableKeyboardNavigationContext.js +1 -0
- package/dist/npm/navigation/constants.d.ts +3 -3
- package/dist/npm/navigation/constants.js +13 -3
- package/dist/npm/navigation/hooks.d.ts +2 -3
- package/dist/npm/navigation/hooks.js +3 -1
- package/dist/npm/navigation/utils.d.ts +26 -26
- package/dist/npm/navigation/utils.js +54 -33
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/pager/Pager.d.ts +4 -3
- package/dist/npm/pager/Pager.js +30 -10
- package/dist/npm/pager/PagerInput.js +9 -6
- package/dist/npm/pager/PagerNumericButtons.d.ts +2 -2
- package/dist/npm/pager/PagerNumericButtons.js +8 -5
- package/dist/npm/pager/PagerPageSizes.d.ts +1 -1
- package/dist/npm/pager/PagerPageSizes.js +6 -3
- package/dist/npm/selection/TableSelection.js +19 -17
- package/dist/npm/selection/constants.js +1 -0
- package/dist/npm/selection/utils.d.ts +5 -5
- package/dist/npm/selection/utils.js +50 -24
- package/dist/npm/utils/data-operations.js +17 -7
- package/dist/npm/utils/group-operations.d.ts +1 -1
- package/dist/npm/utils/group-operations.js +11 -7
- package/dist/npm/virtualization/columns.js +11 -1
- package/dist/npm/virtualization/index.js +15 -4
- package/dist/systemjs/kendo-react-data-tools.js +1 -1
- package/package.json +10 -10
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DragClue = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var react_dom_1 = require("react-dom");
|
|
18
21
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -38,12 +41,12 @@ var DragClue = /** @class */ (function (_super) {
|
|
|
38
41
|
get: function () {
|
|
39
42
|
return this.elementRef.current;
|
|
40
43
|
},
|
|
41
|
-
enumerable:
|
|
44
|
+
enumerable: false,
|
|
42
45
|
configurable: true
|
|
43
46
|
});
|
|
44
47
|
DragClue.prototype.render = function () {
|
|
45
48
|
var hiddenElement = this.hiddenElementRef.current;
|
|
46
|
-
var dragClue = this.state.visible && kendo_react_common_1.canUseDOM && react_dom_1.createPortal((React.createElement("div", { ref: this.elementRef, className: "k-header k-drag-clue", style: {
|
|
49
|
+
var dragClue = this.state.visible && kendo_react_common_1.canUseDOM && (0, react_dom_1.createPortal)((React.createElement("div", { ref: this.elementRef, className: "k-header k-drag-clue", style: {
|
|
47
50
|
display: 'block',
|
|
48
51
|
position: 'absolute',
|
|
49
52
|
zIndex: 20000,
|
|
@@ -11,7 +11,7 @@ export interface DropClueState {
|
|
|
11
11
|
/**
|
|
12
12
|
* @hidden
|
|
13
13
|
*/
|
|
14
|
-
export declare class DropClue extends React.PureComponent<
|
|
14
|
+
export declare class DropClue extends React.PureComponent<any, DropClueState> {
|
|
15
15
|
readonly state: DropClueState;
|
|
16
16
|
hiddenElementRef: React.RefObject<HTMLDivElement>;
|
|
17
17
|
constructor(props: any);
|
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DropClue = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var react_dom_1 = require("react-dom");
|
|
18
21
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -34,7 +37,7 @@ var DropClue = /** @class */ (function (_super) {
|
|
|
34
37
|
}
|
|
35
38
|
DropClue.prototype.render = function () {
|
|
36
39
|
var hiddenElement = this.hiddenElementRef.current;
|
|
37
|
-
var dropClue = this.state.visible && kendo_react_common_1.canUseDOM && react_dom_1.createPortal((React.createElement("div", { className: "k-grouping-dropclue", style: {
|
|
40
|
+
var dropClue = this.state.visible && kendo_react_common_1.canUseDOM && (0, react_dom_1.createPortal)((React.createElement("div", { className: "k-grouping-dropclue", style: {
|
|
38
41
|
zIndex: 10000,
|
|
39
42
|
display: 'block',
|
|
40
43
|
top: this.state.top + 'px',
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -28,11 +30,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
28
30
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
29
31
|
t[p] = s[p];
|
|
30
32
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
31
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
32
|
-
|
|
33
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
+
t[p[i]] = s[p[i]];
|
|
36
|
+
}
|
|
33
37
|
return t;
|
|
34
38
|
};
|
|
35
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.Expression = void 0;
|
|
36
41
|
var React = require("react");
|
|
37
42
|
var PropTypes = require("prop-types");
|
|
38
43
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
@@ -41,8 +46,8 @@ var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
|
41
46
|
var operators_1 = require("./operators");
|
|
42
47
|
var messages_1 = require("../messages");
|
|
43
48
|
var setInitialValue = function (filter) {
|
|
44
|
-
if (filter.value === undefined && !operators_1.unaryOperator(filter.operator)) {
|
|
45
|
-
filter.value = operators_1.stringOperator(filter.operator) ? '' : null;
|
|
49
|
+
if (filter.value === undefined && !(0, operators_1.unaryOperator)(filter.operator)) {
|
|
50
|
+
filter.value = (0, operators_1.stringOperator)(filter.operator) ? '' : null;
|
|
46
51
|
}
|
|
47
52
|
};
|
|
48
53
|
/**
|
|
@@ -69,12 +74,12 @@ var Expression = /** @class */ (function (_super) {
|
|
|
69
74
|
var operator = event.value.operator;
|
|
70
75
|
var prevFilter = _this.props.filter;
|
|
71
76
|
var nextFilter;
|
|
72
|
-
if (operators_1.unaryOperator(operator)) {
|
|
77
|
+
if ((0, operators_1.unaryOperator)(operator)) {
|
|
73
78
|
var value = prevFilter.value, prevFilterNoValue = __rest(prevFilter, ["value"]);
|
|
74
|
-
nextFilter = __assign({}, prevFilterNoValue, { operator: operator });
|
|
79
|
+
nextFilter = __assign(__assign({}, prevFilterNoValue), { operator: operator });
|
|
75
80
|
}
|
|
76
81
|
else {
|
|
77
|
-
nextFilter = __assign({}, prevFilter, { operator: operator });
|
|
82
|
+
nextFilter = __assign(__assign({}, prevFilter), { operator: operator });
|
|
78
83
|
}
|
|
79
84
|
setInitialValue(nextFilter);
|
|
80
85
|
_this.triggerOnFilterChange(prevFilter, nextFilter, event);
|
|
@@ -82,9 +87,9 @@ var Expression = /** @class */ (function (_super) {
|
|
|
82
87
|
_this.onInputChange = function (event) {
|
|
83
88
|
var prevFilter = _this.props.filter;
|
|
84
89
|
var nextFilter = event.nextFilter;
|
|
85
|
-
if (operators_1.unaryOperator(nextFilter.operator)) {
|
|
90
|
+
if ((0, operators_1.unaryOperator)(nextFilter.operator)) {
|
|
86
91
|
var field = _this.props.fields.find(function (f) { return f.name === nextFilter.field; });
|
|
87
|
-
nextFilter = __assign({}, nextFilter, { operator: (field && field.operators[0].operator) || nextFilter.operator });
|
|
92
|
+
nextFilter = __assign(__assign({}, nextFilter), { operator: (field && field.operators[0].operator) || nextFilter.operator });
|
|
88
93
|
}
|
|
89
94
|
_this.triggerOnFilterChange(prevFilter, nextFilter, event);
|
|
90
95
|
};
|
|
@@ -112,9 +117,9 @@ var Expression = /** @class */ (function (_super) {
|
|
|
112
117
|
Expression.prototype.render = function () {
|
|
113
118
|
var _a = this.props, fields = _a.fields, filter = _a.filter;
|
|
114
119
|
var field = fields.find(function (f) { return f.name === filter.field; });
|
|
115
|
-
var locService = kendo_react_intl_1.provideLocalizationService(this);
|
|
120
|
+
var locService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
116
121
|
var operators = ((field && field.operators) || [])
|
|
117
|
-
.map(function (o) { return (__assign({}, o, { text: locService.toLanguageString(o.text, messages_1.messages[o.text] || o.text) })); });
|
|
122
|
+
.map(function (o) { return (__assign(__assign({}, o), { text: locService.toLanguageString(o.text, messages_1.messages[o.text] || o.text) })); });
|
|
118
123
|
return (React.createElement("div", { className: "k-filter-toolbar" },
|
|
119
124
|
React.createElement(kendo_react_buttons_1.Toolbar, { keyboardNavigation: false },
|
|
120
125
|
React.createElement(kendo_react_buttons_1.ToolbarItem, { className: "k-filter-field" },
|
|
@@ -134,4 +139,4 @@ var Expression = /** @class */ (function (_super) {
|
|
|
134
139
|
return Expression;
|
|
135
140
|
}(React.Component));
|
|
136
141
|
exports.Expression = Expression;
|
|
137
|
-
kendo_react_intl_1.registerForLocalization(Expression);
|
|
142
|
+
(0, kendo_react_intl_1.registerForLocalization)(Expression);
|
|
@@ -51,7 +51,7 @@ export declare class Filter extends React.Component<FilterProps> {
|
|
|
51
51
|
static propTypes: {
|
|
52
52
|
className: PropTypes.Requireable<string>;
|
|
53
53
|
style: PropTypes.Requireable<object>;
|
|
54
|
-
fields: (props: FilterProps, propName: string) => Error;
|
|
54
|
+
fields: (props: FilterProps, propName: string) => Error | null;
|
|
55
55
|
value: PropTypes.Validator<object>;
|
|
56
56
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
57
57
|
};
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Filter = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var Group_1 = require("./Group");
|
|
@@ -47,14 +50,14 @@ var Filter = /** @class */ (function (_super) {
|
|
|
47
50
|
};
|
|
48
51
|
_this.onGroupRemove = function (event) {
|
|
49
52
|
var changeEvent = {
|
|
50
|
-
filter: __assign({}, _this.props.value, { filters: [] }),
|
|
53
|
+
filter: __assign(__assign({}, _this.props.value), { filters: [] }),
|
|
51
54
|
syntheticEvent: event.syntheticEvent,
|
|
52
55
|
nativeEvent: event.nativeEvent,
|
|
53
56
|
target: _this
|
|
54
57
|
};
|
|
55
58
|
_this.props.onChange.call(undefined, changeEvent);
|
|
56
59
|
};
|
|
57
|
-
kendo_react_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
60
|
+
(0, kendo_react_common_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
58
61
|
return _this;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
@@ -75,16 +78,16 @@ var Filter = /** @class */ (function (_super) {
|
|
|
75
78
|
fields: function (props, propName) {
|
|
76
79
|
var prop = props[propName];
|
|
77
80
|
if (prop === undefined) {
|
|
78
|
-
return new Error("Property '"
|
|
81
|
+
return new Error("Property '".concat(propName, "' is missing."));
|
|
79
82
|
}
|
|
80
83
|
else if (!Array.isArray(prop)) {
|
|
81
|
-
return new Error("Property '"
|
|
84
|
+
return new Error("Property '".concat(propName, "' needs to be Array<FieldSettings>."));
|
|
82
85
|
}
|
|
83
86
|
else if (Object.keys(prop.reduce(function (acc, cur) {
|
|
84
87
|
var _a;
|
|
85
|
-
return (__assign({}, acc, (_a = {}, _a[cur.name] = 1, _a)));
|
|
88
|
+
return (__assign(__assign({}, acc), (_a = {}, _a[cur.name] = 1, _a)));
|
|
86
89
|
}, {})).length !== prop.length) {
|
|
87
|
-
return new Error("Property '"
|
|
90
|
+
return new Error("Property '".concat(propName, "' needs to contain objects with unique 'name' field."));
|
|
88
91
|
}
|
|
89
92
|
return null;
|
|
90
93
|
},
|
package/dist/npm/filter/Group.js
CHANGED
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -23,7 +25,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
23
25
|
};
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
26
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.Group = void 0;
|
|
27
39
|
var React = require("react");
|
|
28
40
|
var PropTypes = require("prop-types");
|
|
29
41
|
var kendo_data_query_1 = require("@progress/kendo-data-query");
|
|
@@ -39,43 +51,59 @@ var Group = /** @class */ (function (_super) {
|
|
|
39
51
|
__extends(Group, _super);
|
|
40
52
|
function Group() {
|
|
41
53
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
42
|
-
_this.onGroupRemove = function () {
|
|
43
|
-
|
|
44
|
-
filter: _this.props.filter
|
|
45
|
-
|
|
54
|
+
_this.onGroupRemove = function (event) {
|
|
55
|
+
var ev = {
|
|
56
|
+
filter: _this.props.filter,
|
|
57
|
+
target: _this,
|
|
58
|
+
syntheticEvent: event,
|
|
59
|
+
nativeEvent: event.nativeEvent
|
|
60
|
+
};
|
|
61
|
+
_this.props.onRemove.call(undefined, ev);
|
|
46
62
|
};
|
|
47
|
-
_this.onAddExpression = function () {
|
|
63
|
+
_this.onAddExpression = function (event) {
|
|
48
64
|
var prevFilter = _this.props.filter;
|
|
49
65
|
var firstField = _this.props.fields[0];
|
|
50
66
|
var newExpression = { field: firstField.name, operator: firstField.operators[0].operator };
|
|
51
|
-
newExpression.value = operators_1.stringOperator(newExpression.operator) ? '' : null;
|
|
52
|
-
|
|
53
|
-
nextFilter: __assign({}, prevFilter, { filters: prevFilter.filters
|
|
54
|
-
prevFilter: prevFilter
|
|
55
|
-
|
|
67
|
+
newExpression.value = (0, operators_1.stringOperator)(newExpression.operator) ? '' : null;
|
|
68
|
+
var ev = {
|
|
69
|
+
nextFilter: __assign(__assign({}, prevFilter), { filters: __spreadArray(__spreadArray([], prevFilter.filters, true), [newExpression], false) }),
|
|
70
|
+
prevFilter: prevFilter,
|
|
71
|
+
target: _this,
|
|
72
|
+
syntheticEvent: event,
|
|
73
|
+
nativeEvent: event.nativeEvent
|
|
74
|
+
};
|
|
75
|
+
_this.props.onChange.call(undefined, ev);
|
|
56
76
|
};
|
|
57
|
-
_this.onAddGroup = function () {
|
|
77
|
+
_this.onAddGroup = function (event) {
|
|
58
78
|
var prevFilter = _this.props.filter;
|
|
59
|
-
|
|
60
|
-
nextFilter: __assign({}, prevFilter, { filters: prevFilter.filters
|
|
61
|
-
prevFilter: prevFilter
|
|
62
|
-
|
|
79
|
+
var ev = {
|
|
80
|
+
nextFilter: __assign(__assign({}, prevFilter), { filters: __spreadArray(__spreadArray([], prevFilter.filters, true), [__assign({}, _this.props.defaultGroupFilter)], false) }),
|
|
81
|
+
prevFilter: prevFilter,
|
|
82
|
+
target: _this,
|
|
83
|
+
syntheticEvent: event,
|
|
84
|
+
nativeEvent: event.nativeEvent
|
|
85
|
+
};
|
|
86
|
+
_this.props.onChange.call(undefined, ev);
|
|
63
87
|
};
|
|
64
|
-
_this.onLogicAnd = function () { return _this.changeLogic('and'); };
|
|
65
|
-
_this.onLogicOr = function () { return _this.changeLogic('or'); };
|
|
66
|
-
_this.changeLogic = function (logic) {
|
|
88
|
+
_this.onLogicAnd = function (event) { return _this.changeLogic('and', event); };
|
|
89
|
+
_this.onLogicOr = function (event) { return _this.changeLogic('or', event); };
|
|
90
|
+
_this.changeLogic = function (logic, event) {
|
|
67
91
|
var prevFilter = _this.props.filter;
|
|
68
92
|
if (prevFilter.logic !== logic) {
|
|
69
|
-
|
|
70
|
-
nextFilter: __assign({}, prevFilter, { logic: logic }),
|
|
71
|
-
prevFilter: prevFilter
|
|
72
|
-
|
|
93
|
+
var ev = {
|
|
94
|
+
nextFilter: __assign(__assign({}, prevFilter), { logic: logic }),
|
|
95
|
+
prevFilter: prevFilter,
|
|
96
|
+
target: _this,
|
|
97
|
+
syntheticEvent: event,
|
|
98
|
+
nativeEvent: event.nativeEvent
|
|
99
|
+
};
|
|
100
|
+
_this.props.onChange.call(undefined, ev);
|
|
73
101
|
}
|
|
74
102
|
};
|
|
75
103
|
_this.replaceFilter = function (prevFilter, nextFilter) {
|
|
76
104
|
var filter = _this.props.filter;
|
|
77
105
|
var filters = filter.filters.map(function (f) { return f === prevFilter ? nextFilter : f; });
|
|
78
|
-
return __assign({}, filter, { filters: filters });
|
|
106
|
+
return __assign(__assign({}, filter), { filters: filters });
|
|
79
107
|
};
|
|
80
108
|
_this.onChange = function (event) {
|
|
81
109
|
var nextFilter = _this.replaceFilter(event.prevFilter, event.nextFilter);
|
|
@@ -92,7 +120,7 @@ var Group = /** @class */ (function (_super) {
|
|
|
92
120
|
var prevFilter = _this.props.filter;
|
|
93
121
|
var filters = prevFilter.filters.filter(function (f) { return f !== event.filter; });
|
|
94
122
|
var changeEvent = {
|
|
95
|
-
nextFilter: __assign({}, prevFilter, { filters: filters }),
|
|
123
|
+
nextFilter: __assign(__assign({}, prevFilter), { filters: filters }),
|
|
96
124
|
prevFilter: prevFilter,
|
|
97
125
|
syntheticEvent: event.syntheticEvent,
|
|
98
126
|
nativeEvent: event.nativeEvent,
|
|
@@ -105,7 +133,7 @@ var Group = /** @class */ (function (_super) {
|
|
|
105
133
|
Group.prototype.render = function () {
|
|
106
134
|
var _this = this;
|
|
107
135
|
var _a = this.props, fields = _a.fields, filter = _a.filter;
|
|
108
|
-
var locService = kendo_react_intl_1.provideLocalizationService(this);
|
|
136
|
+
var locService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
109
137
|
return (React.createElement(React.Fragment, null,
|
|
110
138
|
React.createElement("div", { className: "k-filter-toolbar" },
|
|
111
139
|
React.createElement(kendo_react_buttons_1.Toolbar, { keyboardNavigation: false },
|
|
@@ -120,7 +148,7 @@ var Group = /** @class */ (function (_super) {
|
|
|
120
148
|
React.createElement(kendo_react_buttons_1.ToolbarItem, null,
|
|
121
149
|
React.createElement(kendo_react_buttons_1.Button, { title: locService.toLanguageString(messages_1.filterClose, messages_1.messages[messages_1.filterClose]), icon: "close", fillMode: "flat", type: "button", onClick: this.onGroupRemove })))),
|
|
122
150
|
filter.filters.length > 0 && (React.createElement("ul", { className: "k-filter-lines" }, filter.filters.map(function (f, idx) {
|
|
123
|
-
return (React.createElement("li", { key: idx, className: "k-filter-item" }, kendo_data_query_1.isCompositeFilterDescriptor(f) ?
|
|
151
|
+
return (React.createElement("li", { key: idx, className: "k-filter-item" }, (0, kendo_data_query_1.isCompositeFilterDescriptor)(f) ?
|
|
124
152
|
React.createElement(Group, { filter: f, fields: fields, onChange: _this.onChange, onRemove: _this.onRemove, defaultGroupFilter: _this.props.defaultGroupFilter })
|
|
125
153
|
:
|
|
126
154
|
React.createElement(Expression_1.Expression, { filter: f, fields: fields, onChange: _this.onChange, onRemove: _this.onRemove })));
|
|
@@ -136,4 +164,4 @@ var Group = /** @class */ (function (_super) {
|
|
|
136
164
|
return Group;
|
|
137
165
|
}(React.Component));
|
|
138
166
|
exports.Group = Group;
|
|
139
|
-
kendo_react_intl_1.registerForLocalization(Group);
|
|
167
|
+
(0, kendo_react_intl_1.registerForLocalization)(Group);
|
|
@@ -28,10 +28,10 @@ export declare class BooleanFilter extends React.Component<BooleanFilterProps> {
|
|
|
28
28
|
static propTypes: {
|
|
29
29
|
filter: PropTypes.Validator<object>;
|
|
30
30
|
onFilterChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
-
data: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
|
+
data: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
32
32
|
text: PropTypes.Requireable<string>;
|
|
33
33
|
value: PropTypes.Requireable<any>;
|
|
34
|
-
}>[]>;
|
|
34
|
+
}> | null | undefined)[]>;
|
|
35
35
|
defaultItem: PropTypes.Requireable<any>;
|
|
36
36
|
};
|
|
37
37
|
private data;
|
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BooleanFilter = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var PropTypes = require("prop-types");
|
|
18
21
|
var EnumFilter_1 = require("./EnumFilter");
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.DateFilter = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_dateinputs_1 = require("@progress/kendo-react-dateinputs");
|
|
@@ -36,7 +39,7 @@ var DateFilter = /** @class */ (function (_super) {
|
|
|
36
39
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
37
40
|
_this.onChange = function (event) {
|
|
38
41
|
_this.props.onFilterChange.call(undefined, {
|
|
39
|
-
nextFilter: __assign({}, _this.props.filter, { value: event.value })
|
|
42
|
+
nextFilter: __assign(__assign({}, _this.props.filter), { value: event.value })
|
|
40
43
|
});
|
|
41
44
|
};
|
|
42
45
|
return _this;
|
|
@@ -28,10 +28,10 @@ export declare class EnumFilter extends React.Component<EnumFilterProps> {
|
|
|
28
28
|
static propTypes: {
|
|
29
29
|
filter: PropTypes.Validator<object>;
|
|
30
30
|
onFilterChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
-
data: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
|
+
data: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
32
32
|
text: PropTypes.Requireable<string>;
|
|
33
33
|
value: PropTypes.Requireable<any>;
|
|
34
|
-
}>[]>;
|
|
34
|
+
}> | null | undefined)[]>;
|
|
35
35
|
defaultItem: PropTypes.Requireable<any>;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.EnumFilter = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_dropdowns_1 = require("@progress/kendo-react-dropdowns");
|
|
@@ -39,7 +42,7 @@ var EnumFilter = /** @class */ (function (_super) {
|
|
|
39
42
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
40
43
|
_this.onChange = function (event) {
|
|
41
44
|
_this.props.onFilterChange.call(undefined, {
|
|
42
|
-
nextFilter: __assign({}, _this.props.filter, { value: event.value.value })
|
|
45
|
+
nextFilter: __assign(__assign({}, _this.props.filter), { value: event.value.value })
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
48
|
return _this;
|
|
@@ -48,9 +51,9 @@ var EnumFilter = /** @class */ (function (_super) {
|
|
|
48
51
|
* @hidden
|
|
49
52
|
*/
|
|
50
53
|
EnumFilter.prototype.render = function () {
|
|
51
|
-
var locService = kendo_react_intl_1.provideLocalizationService(this);
|
|
54
|
+
var locService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
52
55
|
var _a = this.props, filter = _a.filter, _b = _a.data, data = _b === void 0 ? [] : _b, defaultItem = _a.defaultItem;
|
|
53
|
-
var locData = data.map(function (item) { return (__assign({}, item, { text: locService.toLanguageString(item.text, messages_1.messages[item.text] || item.text) })); });
|
|
56
|
+
var locData = data.map(function (item) { return (__assign(__assign({}, item), { text: locService.toLanguageString(item.text, messages_1.messages[item.text] || item.text) })); });
|
|
54
57
|
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { value: locData.find(function (i) { return i.value === filter.value; }) || null, onChange: this.onChange, defaultItem: defaultItem, data: locData, textField: "text" }));
|
|
55
58
|
};
|
|
56
59
|
/**
|
|
@@ -65,4 +68,4 @@ var EnumFilter = /** @class */ (function (_super) {
|
|
|
65
68
|
return EnumFilter;
|
|
66
69
|
}(React.Component));
|
|
67
70
|
exports.EnumFilter = EnumFilter;
|
|
68
|
-
kendo_react_intl_1.registerForLocalization(EnumFilter);
|
|
71
|
+
(0, kendo_react_intl_1.registerForLocalization)(EnumFilter);
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.NumericFilter = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
|
@@ -36,7 +39,7 @@ var NumericFilter = /** @class */ (function (_super) {
|
|
|
36
39
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
37
40
|
_this.onChange = function (event) {
|
|
38
41
|
_this.props.onFilterChange.call(undefined, {
|
|
39
|
-
nextFilter: __assign({}, _this.props.filter, { value: event.value })
|
|
42
|
+
nextFilter: __assign(__assign({}, _this.props.filter), { value: event.value })
|
|
40
43
|
});
|
|
41
44
|
};
|
|
42
45
|
return _this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { FilterOperator } from '../../filteringCells';
|
|
4
3
|
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
5
4
|
/**
|
|
6
5
|
* The props of the TextFilter component.
|
|
@@ -14,7 +13,7 @@ export interface TextFilterProps {
|
|
|
14
13
|
* The FilterChange event, triggered while editing the FilterOperator.
|
|
15
14
|
*/
|
|
16
15
|
onFilterChange: (event: {
|
|
17
|
-
nextFilter:
|
|
16
|
+
nextFilter: FilterDescriptor;
|
|
18
17
|
}) => void;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.TextFilter = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
|
@@ -36,7 +39,7 @@ var TextFilter = /** @class */ (function (_super) {
|
|
|
36
39
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
37
40
|
_this.onChange = function (event) {
|
|
38
41
|
_this.props.onFilterChange.call(undefined, {
|
|
39
|
-
nextFilter: __assign({}, _this.props.filter, { value: event.value })
|
|
42
|
+
nextFilter: __assign(__assign({}, _this.props.filter), { value: event.value })
|
|
40
43
|
});
|
|
41
44
|
};
|
|
42
45
|
return _this;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
__exportStar(require("./TextFilter"), exports);
|
|
18
|
+
__exportStar(require("./NumericFilter"), exports);
|
|
19
|
+
__exportStar(require("./DateFilter"), exports);
|
|
20
|
+
__exportStar(require("./BooleanFilter"), exports);
|
|
21
|
+
__exportStar(require("./EnumFilter"), exports);
|