@progress/kendo-react-data-tools 5.17.0-dev.202308110815 → 5.17.0-dev.202308171144
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/filter/Expression.js +1 -2
- package/dist/es/filter/Filter.js +2 -1
- package/dist/es/filter/Group.js +7 -11
- package/dist/es/header/utils/index.d.ts +46 -0
- package/dist/es/header/utils/index.js +20 -4
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/filter/Expression.js +1 -2
- package/dist/npm/filter/Filter.js +4 -3
- package/dist/npm/filter/Group.js +6 -10
- package/dist/npm/header/utils/index.d.ts +46 -0
- package/dist/npm/header/utils/index.js +24 -5
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-data-tools.js +1 -1
- package/package.json +10 -10
|
@@ -125,8 +125,7 @@ var Expression = /** @class */ (function (_super) {
|
|
|
125
125
|
React.createElement(ToolbarItem, { className: "k-filter-operator" },
|
|
126
126
|
React.createElement(DropDownList, { data: operators, textField: "text", value: operators.find(function (o) { return o.operator === filter.operator; }), onChange: this.onOperatorChange, ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel]) })),
|
|
127
127
|
React.createElement(ToolbarItem, { className: "k-filter-value" }, field && React.createElement(field.filter, { filter: filter, onFilterChange: this.onInputChange, min: field.min, max: field.max })),
|
|
128
|
-
React.createElement(
|
|
129
|
-
React.createElement(Button, { title: locService.toLanguageString(filterClose, messages[filterClose]), icon: "x", svgIcon: xIcon, fillMode: "flat", type: "button", onClick: this.onFilterRemove })))));
|
|
128
|
+
React.createElement(Button, { title: locService.toLanguageString(filterClose, messages[filterClose]), icon: "x", svgIcon: xIcon, fillMode: "flat", type: "button", onClick: this.onFilterRemove }))));
|
|
130
129
|
};
|
|
131
130
|
Expression.propTypes = {
|
|
132
131
|
filter: PropTypes.object.isRequired,
|
package/dist/es/filter/Filter.js
CHANGED
|
@@ -26,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
26
26
|
};
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import * as PropTypes from 'prop-types';
|
|
29
|
+
import { classNames } from '@progress/kendo-react-common';
|
|
29
30
|
import { Group } from './Group';
|
|
30
31
|
import { validatePackage } from '@progress/kendo-react-common';
|
|
31
32
|
import { packageMetadata } from '../package-metadata';
|
|
@@ -61,7 +62,7 @@ var Filter = /** @class */ (function (_super) {
|
|
|
61
62
|
* @hidden
|
|
62
63
|
*/
|
|
63
64
|
Filter.prototype.render = function () {
|
|
64
|
-
return (React.createElement("div", { className: 'k-
|
|
65
|
+
return (React.createElement("div", { className: classNames('k-filter', this.props.className), style: this.props.style },
|
|
65
66
|
React.createElement("ul", { role: 'tree', className: "k-filter-container", "aria-label": this.props.ariaLabel },
|
|
66
67
|
React.createElement("li", { role: 'treeitem', className: "k-filter-group-main" },
|
|
67
68
|
React.createElement(Group, { filter: this.props.value, fields: this.props.fields, ariaLabel: this.props.ariaLabelGroup, ariaLabelExpression: this.props.ariaLabelExpression, onChange: this.onFilterChange, onRemove: this.onGroupRemove, defaultGroupFilter: this.props.defaultGroupFilter || { logic: 'and', filters: [] } })))));
|
package/dist/es/filter/Group.js
CHANGED
|
@@ -36,7 +36,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
36
36
|
import * as React from 'react';
|
|
37
37
|
import * as PropTypes from 'prop-types';
|
|
38
38
|
import { isCompositeFilterDescriptor } from '@progress/kendo-data-query';
|
|
39
|
-
import { Button, Toolbar,
|
|
39
|
+
import { Button, Toolbar, ButtonGroup } from '@progress/kendo-react-buttons';
|
|
40
40
|
import { provideLocalizationService, registerForLocalization } from '@progress/kendo-react-intl';
|
|
41
41
|
import { filterAddExpressionIcon, filterAddGroupIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
42
42
|
import { Expression } from './Expression';
|
|
@@ -135,16 +135,12 @@ var Group = /** @class */ (function (_super) {
|
|
|
135
135
|
return (React.createElement(React.Fragment, null,
|
|
136
136
|
React.createElement("div", { className: "k-filter-toolbar" },
|
|
137
137
|
React.createElement(Toolbar, { keyboardNavigation: false, role: "toolbar", ariaLabel: ariaLabel },
|
|
138
|
-
React.createElement(
|
|
139
|
-
React.createElement(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
React.createElement(
|
|
143
|
-
|
|
144
|
-
React.createElement(ToolbarItem, null,
|
|
145
|
-
React.createElement(Button, { title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]), icon: "filter-add-group", svgIcon: filterAddGroupIcon, type: "button", onClick: this.onAddGroup })),
|
|
146
|
-
React.createElement(ToolbarItem, null,
|
|
147
|
-
React.createElement(Button, { title: locService.toLanguageString(filterClose, messages[filterClose]), icon: "x", svgIcon: xIcon, fillMode: "flat", type: "button", onClick: this.onGroupRemove })))),
|
|
138
|
+
React.createElement(ButtonGroup, { className: 'k-toolbar-button-group' },
|
|
139
|
+
React.createElement(Button, { className: 'k-toolbar-button', togglable: true, onClick: this.onLogicAnd, selected: filter.logic === 'and', type: "button" }, locService.toLanguageString(filterAndLogic, messages[filterAndLogic])),
|
|
140
|
+
React.createElement(Button, { className: 'k-toolbar-button', togglable: true, onClick: this.onLogicOr, selected: filter.logic === 'or', type: "button" }, locService.toLanguageString(filterOrLogic, messages[filterOrLogic]))),
|
|
141
|
+
React.createElement(Button, { className: 'k-toolbar-button', title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]), icon: "filter-add-expression", svgIcon: filterAddExpressionIcon, type: "button", onClick: this.onAddExpression }),
|
|
142
|
+
React.createElement(Button, { className: 'k-toolbar-button', title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]), icon: "filter-add-group", svgIcon: filterAddGroupIcon, type: "button", onClick: this.onAddGroup }),
|
|
143
|
+
React.createElement(Button, { className: 'k-toolbar-button', title: locService.toLanguageString(filterClose, messages[filterClose]), icon: "x", svgIcon: xIcon, fillMode: "flat", type: "button", onClick: this.onGroupRemove }))),
|
|
148
144
|
filter.filters.length > 0 && (React.createElement("ul", { role: 'group', className: "k-filter-lines" }, filter.filters.map(function (f, idx) {
|
|
149
145
|
return (React.createElement("li", { role: 'treeitem', key: idx, className: "k-filter-item" }, isCompositeFilterDescriptor(f) ?
|
|
150
146
|
React.createElement(Group, { filter: f, fields: fields, onChange: _this.onChange, onRemove: _this.onRemove, defaultGroupFilter: _this.props.defaultGroupFilter, ariaLabel: _this.props.ariaLabel, ariaLabelExpression: _this.props.ariaLabelExpression })
|
|
@@ -2,6 +2,16 @@ import { FilterCellProps } from '../../filteringCells';
|
|
|
2
2
|
import { CellProps } from '../CellProps';
|
|
3
3
|
import { ExtendedColumnProps, TreeColumnBaseProps } from '../ColumnProps';
|
|
4
4
|
import { HeaderCellProps } from '../HeaderCell';
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export declare function nextColumn(columns: {
|
|
9
|
+
depth: number;
|
|
10
|
+
locked?: boolean;
|
|
11
|
+
}[], current: number): {
|
|
12
|
+
depth: number;
|
|
13
|
+
locked?: boolean | undefined;
|
|
14
|
+
} | null;
|
|
5
15
|
/**
|
|
6
16
|
* @hidden
|
|
7
17
|
*/
|
|
@@ -20,6 +30,42 @@ export declare function mapColumns(columns: Array<{
|
|
|
20
30
|
rightBorder: boolean;
|
|
21
31
|
ariaColumnIndex: number;
|
|
22
32
|
}>): number[][];
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export declare function updateLeft(columnsMap: number[][], columns: Array<{
|
|
37
|
+
parentIndex: number;
|
|
38
|
+
colSpan: number;
|
|
39
|
+
rowSpan: number;
|
|
40
|
+
depth: number;
|
|
41
|
+
kFirst?: boolean;
|
|
42
|
+
children: any[];
|
|
43
|
+
width?: string | number;
|
|
44
|
+
locked?: boolean;
|
|
45
|
+
index: number;
|
|
46
|
+
left: number;
|
|
47
|
+
right: number;
|
|
48
|
+
rightBorder: boolean;
|
|
49
|
+
ariaColumnIndex: number;
|
|
50
|
+
}>, generateLeft?: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
export declare function updateRight(columnsMap: number[][], columns: Array<{
|
|
55
|
+
parentIndex: number;
|
|
56
|
+
colSpan: number;
|
|
57
|
+
rowSpan: number;
|
|
58
|
+
depth: number;
|
|
59
|
+
kFirst?: boolean;
|
|
60
|
+
children: any[];
|
|
61
|
+
width?: string | number;
|
|
62
|
+
locked?: boolean;
|
|
63
|
+
index: number;
|
|
64
|
+
left: number;
|
|
65
|
+
right: number;
|
|
66
|
+
rightBorder: boolean;
|
|
67
|
+
ariaColumnIndex: number;
|
|
68
|
+
}>, generateRight?: boolean): void;
|
|
23
69
|
/**
|
|
24
70
|
* @hidden
|
|
25
71
|
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { generateNavigatableId } from '../../navigation/utils';
|
|
2
2
|
import { ColumnDefaultProps } from '../ColumnProps';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export function nextColumn(columns, current) {
|
|
4
7
|
var currentDepth = columns[current].depth;
|
|
5
8
|
var next = null;
|
|
6
9
|
for (var index = current + 1; index < columns.length; index++) {
|
|
@@ -57,11 +60,19 @@ export function mapColumns(columns) {
|
|
|
57
60
|
colIndexByLevel[ci] = (colIndexByLevel[ci] || 0) + column.colSpan;
|
|
58
61
|
}
|
|
59
62
|
});
|
|
63
|
+
updateLeft(columnsMap, columns);
|
|
64
|
+
updateRight(columnsMap, columns);
|
|
65
|
+
return columnsMap;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
export function updateLeft(columnsMap, columns, generateLeft) {
|
|
60
71
|
var stickyLeftWidth = new Array(columnsMap.length).fill(0);
|
|
61
72
|
var width = 0;
|
|
62
73
|
// set left AND create stickyLeftWidth
|
|
63
74
|
columns.forEach(function (column) {
|
|
64
|
-
if (column.locked) {
|
|
75
|
+
if (column.locked && (!column.left || generateLeft)) {
|
|
65
76
|
column.left = stickyLeftWidth[column.depth];
|
|
66
77
|
width = getColumnWidth(column);
|
|
67
78
|
if (column.children.length === 0) {
|
|
@@ -74,11 +85,17 @@ export function mapColumns(columns) {
|
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
87
|
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
*/
|
|
92
|
+
export function updateRight(columnsMap, columns, generateRight) {
|
|
93
|
+
var width = 0;
|
|
77
94
|
var stickyRightWidth = new Array(columnsMap.length).fill(0);
|
|
78
95
|
// set right, rightBorder AND create stickyRightWidth
|
|
79
96
|
for (var i = columns.length - 1; i >= 0; i--) {
|
|
80
97
|
var column = columns[i];
|
|
81
|
-
if (column.locked) {
|
|
98
|
+
if (column.locked && (!column.right || generateRight)) {
|
|
82
99
|
column.right = stickyRightWidth[column.depth];
|
|
83
100
|
width = getColumnWidth(column);
|
|
84
101
|
if (column.children.length === 0) {
|
|
@@ -93,7 +110,6 @@ export function mapColumns(columns) {
|
|
|
93
110
|
column.rightBorder = !(next && next.locked);
|
|
94
111
|
}
|
|
95
112
|
}
|
|
96
|
-
return columnsMap;
|
|
97
113
|
}
|
|
98
114
|
/**
|
|
99
115
|
* @hidden
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-data-tools',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1692271086,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -128,8 +128,7 @@ var Expression = /** @class */ (function (_super) {
|
|
|
128
128
|
React.createElement(kendo_react_buttons_1.ToolbarItem, { className: "k-filter-operator" },
|
|
129
129
|
React.createElement(kendo_react_dropdowns_1.DropDownList, { data: operators, textField: "text", value: operators.find(function (o) { return o.operator === filter.operator; }), onChange: this.onOperatorChange, ariaLabel: locService.toLanguageString(messages_1.filterExpressionOperatorDropdownAriaLabel, messages_1.messages[messages_1.filterExpressionOperatorDropdownAriaLabel]) })),
|
|
130
130
|
React.createElement(kendo_react_buttons_1.ToolbarItem, { className: "k-filter-value" }, field && React.createElement(field.filter, { filter: filter, onFilterChange: this.onInputChange, min: field.min, max: field.max })),
|
|
131
|
-
React.createElement(kendo_react_buttons_1.
|
|
132
|
-
React.createElement(kendo_react_buttons_1.Button, { title: locService.toLanguageString(messages_1.filterClose, messages_1.messages[messages_1.filterClose]), icon: "x", svgIcon: kendo_svg_icons_1.xIcon, fillMode: "flat", type: "button", onClick: this.onFilterRemove })))));
|
|
131
|
+
React.createElement(kendo_react_buttons_1.Button, { title: locService.toLanguageString(messages_1.filterClose, messages_1.messages[messages_1.filterClose]), icon: "x", svgIcon: kendo_svg_icons_1.xIcon, fillMode: "flat", type: "button", onClick: this.onFilterRemove }))));
|
|
133
132
|
};
|
|
134
133
|
Expression.propTypes = {
|
|
135
134
|
filter: PropTypes.object.isRequired,
|
|
@@ -29,8 +29,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Filter = void 0;
|
|
30
30
|
var React = require("react");
|
|
31
31
|
var PropTypes = require("prop-types");
|
|
32
|
-
var Group_1 = require("./Group");
|
|
33
32
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
33
|
+
var Group_1 = require("./Group");
|
|
34
|
+
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
34
35
|
var package_metadata_1 = require("../package-metadata");
|
|
35
36
|
/**
|
|
36
37
|
* Represents the [KendoReact Filter component]({% slug overview_filter %}).
|
|
@@ -57,14 +58,14 @@ var Filter = /** @class */ (function (_super) {
|
|
|
57
58
|
};
|
|
58
59
|
_this.props.onChange.call(undefined, changeEvent);
|
|
59
60
|
};
|
|
60
|
-
(0,
|
|
61
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
61
62
|
return _this;
|
|
62
63
|
}
|
|
63
64
|
/**
|
|
64
65
|
* @hidden
|
|
65
66
|
*/
|
|
66
67
|
Filter.prototype.render = function () {
|
|
67
|
-
return (React.createElement("div", { className: 'k-
|
|
68
|
+
return (React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-filter', this.props.className), style: this.props.style },
|
|
68
69
|
React.createElement("ul", { role: 'tree', className: "k-filter-container", "aria-label": this.props.ariaLabel },
|
|
69
70
|
React.createElement("li", { role: 'treeitem', className: "k-filter-group-main" },
|
|
70
71
|
React.createElement(Group_1.Group, { filter: this.props.value, fields: this.props.fields, ariaLabel: this.props.ariaLabelGroup, ariaLabelExpression: this.props.ariaLabelExpression, onChange: this.onFilterChange, onRemove: this.onGroupRemove, defaultGroupFilter: this.props.defaultGroupFilter || { logic: 'and', filters: [] } })))));
|
package/dist/npm/filter/Group.js
CHANGED
|
@@ -138,16 +138,12 @@ var Group = /** @class */ (function (_super) {
|
|
|
138
138
|
return (React.createElement(React.Fragment, null,
|
|
139
139
|
React.createElement("div", { className: "k-filter-toolbar" },
|
|
140
140
|
React.createElement(kendo_react_buttons_1.Toolbar, { keyboardNavigation: false, role: "toolbar", ariaLabel: ariaLabel },
|
|
141
|
-
React.createElement(kendo_react_buttons_1.
|
|
142
|
-
React.createElement(kendo_react_buttons_1.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
React.createElement(kendo_react_buttons_1.
|
|
146
|
-
|
|
147
|
-
React.createElement(kendo_react_buttons_1.ToolbarItem, null,
|
|
148
|
-
React.createElement(kendo_react_buttons_1.Button, { title: locService.toLanguageString(messages_1.filterAddGroup, messages_1.messages[messages_1.filterAddGroup]), icon: "filter-add-group", svgIcon: kendo_svg_icons_1.filterAddGroupIcon, type: "button", onClick: this.onAddGroup })),
|
|
149
|
-
React.createElement(kendo_react_buttons_1.ToolbarItem, null,
|
|
150
|
-
React.createElement(kendo_react_buttons_1.Button, { title: locService.toLanguageString(messages_1.filterClose, messages_1.messages[messages_1.filterClose]), icon: "x", svgIcon: kendo_svg_icons_1.xIcon, fillMode: "flat", type: "button", onClick: this.onGroupRemove })))),
|
|
141
|
+
React.createElement(kendo_react_buttons_1.ButtonGroup, { className: 'k-toolbar-button-group' },
|
|
142
|
+
React.createElement(kendo_react_buttons_1.Button, { className: 'k-toolbar-button', togglable: true, onClick: this.onLogicAnd, selected: filter.logic === 'and', type: "button" }, locService.toLanguageString(messages_1.filterAndLogic, messages_1.messages[messages_1.filterAndLogic])),
|
|
143
|
+
React.createElement(kendo_react_buttons_1.Button, { className: 'k-toolbar-button', togglable: true, onClick: this.onLogicOr, selected: filter.logic === 'or', type: "button" }, locService.toLanguageString(messages_1.filterOrLogic, messages_1.messages[messages_1.filterOrLogic]))),
|
|
144
|
+
React.createElement(kendo_react_buttons_1.Button, { className: 'k-toolbar-button', title: locService.toLanguageString(messages_1.filterAddExpression, messages_1.messages[messages_1.filterAddExpression]), icon: "filter-add-expression", svgIcon: kendo_svg_icons_1.filterAddExpressionIcon, type: "button", onClick: this.onAddExpression }),
|
|
145
|
+
React.createElement(kendo_react_buttons_1.Button, { className: 'k-toolbar-button', title: locService.toLanguageString(messages_1.filterAddGroup, messages_1.messages[messages_1.filterAddGroup]), icon: "filter-add-group", svgIcon: kendo_svg_icons_1.filterAddGroupIcon, type: "button", onClick: this.onAddGroup }),
|
|
146
|
+
React.createElement(kendo_react_buttons_1.Button, { className: 'k-toolbar-button', title: locService.toLanguageString(messages_1.filterClose, messages_1.messages[messages_1.filterClose]), icon: "x", svgIcon: kendo_svg_icons_1.xIcon, fillMode: "flat", type: "button", onClick: this.onGroupRemove }))),
|
|
151
147
|
filter.filters.length > 0 && (React.createElement("ul", { role: 'group', className: "k-filter-lines" }, filter.filters.map(function (f, idx) {
|
|
152
148
|
return (React.createElement("li", { role: 'treeitem', key: idx, className: "k-filter-item" }, (0, kendo_data_query_1.isCompositeFilterDescriptor)(f) ?
|
|
153
149
|
React.createElement(Group, { filter: f, fields: fields, onChange: _this.onChange, onRemove: _this.onRemove, defaultGroupFilter: _this.props.defaultGroupFilter, ariaLabel: _this.props.ariaLabel, ariaLabelExpression: _this.props.ariaLabelExpression })
|
|
@@ -2,6 +2,16 @@ import { FilterCellProps } from '../../filteringCells';
|
|
|
2
2
|
import { CellProps } from '../CellProps';
|
|
3
3
|
import { ExtendedColumnProps, TreeColumnBaseProps } from '../ColumnProps';
|
|
4
4
|
import { HeaderCellProps } from '../HeaderCell';
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export declare function nextColumn(columns: {
|
|
9
|
+
depth: number;
|
|
10
|
+
locked?: boolean;
|
|
11
|
+
}[], current: number): {
|
|
12
|
+
depth: number;
|
|
13
|
+
locked?: boolean | undefined;
|
|
14
|
+
} | null;
|
|
5
15
|
/**
|
|
6
16
|
* @hidden
|
|
7
17
|
*/
|
|
@@ -20,6 +30,42 @@ export declare function mapColumns(columns: Array<{
|
|
|
20
30
|
rightBorder: boolean;
|
|
21
31
|
ariaColumnIndex: number;
|
|
22
32
|
}>): number[][];
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export declare function updateLeft(columnsMap: number[][], columns: Array<{
|
|
37
|
+
parentIndex: number;
|
|
38
|
+
colSpan: number;
|
|
39
|
+
rowSpan: number;
|
|
40
|
+
depth: number;
|
|
41
|
+
kFirst?: boolean;
|
|
42
|
+
children: any[];
|
|
43
|
+
width?: string | number;
|
|
44
|
+
locked?: boolean;
|
|
45
|
+
index: number;
|
|
46
|
+
left: number;
|
|
47
|
+
right: number;
|
|
48
|
+
rightBorder: boolean;
|
|
49
|
+
ariaColumnIndex: number;
|
|
50
|
+
}>, generateLeft?: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
export declare function updateRight(columnsMap: number[][], columns: Array<{
|
|
55
|
+
parentIndex: number;
|
|
56
|
+
colSpan: number;
|
|
57
|
+
rowSpan: number;
|
|
58
|
+
depth: number;
|
|
59
|
+
kFirst?: boolean;
|
|
60
|
+
children: any[];
|
|
61
|
+
width?: string | number;
|
|
62
|
+
locked?: boolean;
|
|
63
|
+
index: number;
|
|
64
|
+
left: number;
|
|
65
|
+
right: number;
|
|
66
|
+
rightBorder: boolean;
|
|
67
|
+
ariaColumnIndex: number;
|
|
68
|
+
}>, generateRight?: boolean): void;
|
|
23
69
|
/**
|
|
24
70
|
* @hidden
|
|
25
71
|
*/
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIndex = exports.isRtl = exports.readColumns = exports.mapColumns = void 0;
|
|
3
|
+
exports.getIndex = exports.isRtl = exports.readColumns = exports.updateRight = exports.updateLeft = exports.mapColumns = exports.nextColumn = void 0;
|
|
4
4
|
var utils_1 = require("../../navigation/utils");
|
|
5
5
|
var ColumnProps_1 = require("../ColumnProps");
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
6
9
|
function nextColumn(columns, current) {
|
|
7
10
|
var currentDepth = columns[current].depth;
|
|
8
11
|
var next = null;
|
|
@@ -14,6 +17,7 @@ function nextColumn(columns, current) {
|
|
|
14
17
|
}
|
|
15
18
|
return next;
|
|
16
19
|
}
|
|
20
|
+
exports.nextColumn = nextColumn;
|
|
17
21
|
var getColumnWidth = function (column) {
|
|
18
22
|
var width = column.width ? parseFloat(column.width.toString()) : 0;
|
|
19
23
|
if (!width && column.children && column.children.length) {
|
|
@@ -60,11 +64,20 @@ function mapColumns(columns) {
|
|
|
60
64
|
colIndexByLevel[ci] = (colIndexByLevel[ci] || 0) + column.colSpan;
|
|
61
65
|
}
|
|
62
66
|
});
|
|
67
|
+
updateLeft(columnsMap, columns);
|
|
68
|
+
updateRight(columnsMap, columns);
|
|
69
|
+
return columnsMap;
|
|
70
|
+
}
|
|
71
|
+
exports.mapColumns = mapColumns;
|
|
72
|
+
/**
|
|
73
|
+
* @hidden
|
|
74
|
+
*/
|
|
75
|
+
function updateLeft(columnsMap, columns, generateLeft) {
|
|
63
76
|
var stickyLeftWidth = new Array(columnsMap.length).fill(0);
|
|
64
77
|
var width = 0;
|
|
65
78
|
// set left AND create stickyLeftWidth
|
|
66
79
|
columns.forEach(function (column) {
|
|
67
|
-
if (column.locked) {
|
|
80
|
+
if (column.locked && (!column.left || generateLeft)) {
|
|
68
81
|
column.left = stickyLeftWidth[column.depth];
|
|
69
82
|
width = getColumnWidth(column);
|
|
70
83
|
if (column.children.length === 0) {
|
|
@@ -77,11 +90,18 @@ function mapColumns(columns) {
|
|
|
77
90
|
}
|
|
78
91
|
}
|
|
79
92
|
});
|
|
93
|
+
}
|
|
94
|
+
exports.updateLeft = updateLeft;
|
|
95
|
+
/**
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
function updateRight(columnsMap, columns, generateRight) {
|
|
99
|
+
var width = 0;
|
|
80
100
|
var stickyRightWidth = new Array(columnsMap.length).fill(0);
|
|
81
101
|
// set right, rightBorder AND create stickyRightWidth
|
|
82
102
|
for (var i = columns.length - 1; i >= 0; i--) {
|
|
83
103
|
var column = columns[i];
|
|
84
|
-
if (column.locked) {
|
|
104
|
+
if (column.locked && (!column.right || generateRight)) {
|
|
85
105
|
column.right = stickyRightWidth[column.depth];
|
|
86
106
|
width = getColumnWidth(column);
|
|
87
107
|
if (column.children.length === 0) {
|
|
@@ -96,9 +116,8 @@ function mapColumns(columns) {
|
|
|
96
116
|
column.rightBorder = !(next && next.locked);
|
|
97
117
|
}
|
|
98
118
|
}
|
|
99
|
-
return columnsMap;
|
|
100
119
|
}
|
|
101
|
-
exports.
|
|
120
|
+
exports.updateRight = updateRight;
|
|
102
121
|
/**
|
|
103
122
|
* @hidden
|
|
104
123
|
*/
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-data-tools',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1692271086,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|