@progress/kendo-react-data-tools 7.2.4-develop.3 → 7.3.0-develop.1
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/clipboard/clipboard.service.js +8 -0
- package/clipboard/clipboard.service.mjs +27 -0
- package/clipboard/common.js +13 -0
- package/clipboard/common.mjs +64 -0
- package/columnmenu/ColumnMenu.js +8 -0
- package/columnmenu/ColumnMenu.mjs +256 -0
- package/columnmenu/ColumnMenuFilterForm.js +8 -0
- package/columnmenu/ColumnMenuFilterForm.mjs +47 -0
- package/columnmenu/ColumnMenuFilterLogic.js +8 -0
- package/columnmenu/ColumnMenuFilterLogic.mjs +29 -0
- package/columnmenu/ColumnMenuFilters.js +8 -0
- package/columnmenu/ColumnMenuFilters.mjs +98 -0
- package/columnmenu/ColumnMenuItem.js +8 -0
- package/columnmenu/ColumnMenuItem.mjs +26 -0
- package/columnmenu/ColumnMenuOperators.js +8 -0
- package/columnmenu/ColumnMenuOperators.mjs +109 -0
- package/dist/cdn/js/kendo-react-datatools.js +8 -10
- package/drag/ColumnDraggable.js +8 -0
- package/drag/ColumnDraggable.mjs +40 -0
- package/drag/ColumnResize.js +8 -0
- package/drag/ColumnResize.mjs +58 -0
- package/drag/ColumnResizer.js +8 -0
- package/drag/ColumnResizer.mjs +56 -0
- package/drag/CommonDragLogic.js +8 -0
- package/drag/CommonDragLogic.mjs +89 -0
- package/drag/DragClue.js +8 -0
- package/drag/DragClue.mjs +52 -0
- package/drag/DropClue.js +8 -0
- package/drag/DropClue.mjs +43 -0
- package/filter/Expression.js +8 -0
- package/filter/Expression.mjs +113 -0
- package/filter/Filter.js +8 -0
- package/filter/Filter.mjs +84 -0
- package/filter/Group.js +8 -0
- package/filter/Group.mjs +163 -0
- package/filter/filters/BooleanFilter.js +8 -0
- package/filter/filters/BooleanFilter.mjs +43 -0
- package/filter/filters/DateFilter.js +8 -0
- package/filter/filters/DateFilter.mjs +43 -0
- package/filter/filters/EnumFilter.js +8 -0
- package/filter/filters/EnumFilter.mjs +59 -0
- package/filter/filters/NumericFilter.js +8 -0
- package/filter/filters/NumericFilter.mjs +54 -0
- package/filter/filters/TextFilter.js +8 -0
- package/filter/filters/TextFilter.mjs +46 -0
- package/filter/operators.js +8 -0
- package/filter/operators.mjs +114 -0
- package/filteringCells/BooleanFilter.js +8 -0
- package/filteringCells/BooleanFilter.mjs +49 -0
- package/filteringCells/DateFilter.js +8 -0
- package/filteringCells/DateFilter.mjs +22 -0
- package/filteringCells/FilterComponent.js +8 -0
- package/filteringCells/FilterComponent.mjs +81 -0
- package/filteringCells/NumericFilter.js +8 -0
- package/filteringCells/NumericFilter.mjs +22 -0
- package/filteringCells/TextFilter.js +8 -0
- package/filteringCells/TextFilter.mjs +22 -0
- package/header/ColumnProps.js +8 -0
- package/header/ColumnProps.mjs +19 -0
- package/header/FilterRow.js +8 -0
- package/header/FilterRow.mjs +54 -0
- package/header/Header.js +8 -0
- package/header/Header.mjs +36 -0
- package/header/HeaderCell.js +8 -0
- package/header/HeaderCell.mjs +18 -0
- package/header/HeaderRow.js +8 -0
- package/header/HeaderRow.mjs +132 -0
- package/header/HeaderSelectionCell.js +8 -0
- package/header/HeaderSelectionCell.mjs +32 -0
- package/header/HeaderThElement.js +8 -0
- package/header/HeaderThElement.mjs +47 -0
- package/header/SortSettings.js +8 -0
- package/header/SortSettings.mjs +12 -0
- package/header/utils/index.js +8 -0
- package/header/utils/index.mjs +130 -0
- package/index.d.mts +2398 -5
- package/index.d.ts +2398 -32
- package/index.js +8 -10
- package/index.mjs +152 -2987
- package/messages/index.js +8 -0
- package/messages/index.mjs +167 -0
- package/navigation/TableKeyboardNavigation.js +8 -0
- package/navigation/TableKeyboardNavigation.mjs +142 -0
- package/navigation/TableKeyboardNavigationContext.js +8 -0
- package/navigation/TableKeyboardNavigationContext.mjs +14 -0
- package/navigation/constants.js +8 -0
- package/navigation/constants.mjs +43 -0
- package/navigation/hooks.js +8 -0
- package/navigation/hooks.mjs +22 -0
- package/navigation/utils.js +8 -0
- package/navigation/utils.mjs +107 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +9 -9
- package/pager/Pager.js +8 -0
- package/pager/Pager.mjs +234 -0
- package/pager/PagerInput.js +8 -0
- package/pager/PagerInput.mjs +38 -0
- package/pager/PagerNumericButtons.js +8 -0
- package/pager/PagerNumericButtons.mjs +103 -0
- package/pager/PagerPageSizes.js +8 -0
- package/pager/PagerPageSizes.mjs +38 -0
- package/selection/TableSelection.js +8 -0
- package/selection/TableSelection.mjs +123 -0
- package/selection/constants.js +8 -0
- package/selection/constants.mjs +14 -0
- package/selection/utils.js +8 -0
- package/selection/utils.mjs +155 -0
- package/utils/data-operations.js +8 -0
- package/utils/data-operations.mjs +127 -0
- package/utils/group-operations.js +8 -0
- package/utils/group-operations.mjs +32 -0
- package/virtualization/columns.js +8 -0
- package/virtualization/columns.mjs +43 -0
- package/clipboard/clipboard.service.d.ts +0 -17
- package/clipboard/common.d.ts +0 -129
- package/columnmenu/ColumnMenu.d.ts +0 -83
- package/columnmenu/ColumnMenuFilterForm.d.ts +0 -17
- package/columnmenu/ColumnMenuFilterLogic.d.ts +0 -7
- package/columnmenu/ColumnMenuFilters.d.ts +0 -23
- package/columnmenu/ColumnMenuItem.d.ts +0 -15
- package/columnmenu/ColumnMenuOperators.d.ts +0 -69
- package/columnmenu/index.d.ts +0 -10
- package/drag/ColumnDraggable.d.ts +0 -34
- package/drag/ColumnResize.d.ts +0 -36
- package/drag/ColumnResizer.d.ts +0 -32
- package/drag/CommonDragLogic.d.ts +0 -42
- package/drag/DragClue.d.ts +0 -26
- package/drag/DropClue.d.ts +0 -23
- package/filter/Expression.d.ts +0 -50
- package/filter/FieldSettings.d.ts +0 -34
- package/filter/Filter.d.ts +0 -83
- package/filter/Group.d.ts +0 -58
- package/filter/filters/BooleanFilter.d.ts +0 -47
- package/filter/filters/DateFilter.d.ts +0 -30
- package/filter/filters/EnumFilter.d.ts +0 -47
- package/filter/filters/NumericFilter.d.ts +0 -37
- package/filter/filters/TextFilter.d.ts +0 -44
- package/filter/filters/index.d.ts +0 -9
- package/filter/index.d.ts +0 -10
- package/filter/operators.d.ts +0 -77
- package/filteringCells/BooleanFilter.d.ts +0 -12
- package/filteringCells/DateFilter.d.ts +0 -12
- package/filteringCells/FilterCellProps.d.ts +0 -39
- package/filteringCells/FilterComponent.d.ts +0 -21
- package/filteringCells/FilterComponentProps.d.ts +0 -27
- package/filteringCells/FilterOperator.d.ts +0 -17
- package/filteringCells/NumericFilter.d.ts +0 -12
- package/filteringCells/TextFilter.d.ts +0 -12
- package/filteringCells/index.d.ts +0 -12
- package/header/CellProps.d.ts +0 -72
- package/header/ColumnProps.d.ts +0 -157
- package/header/FilterRow.d.ts +0 -29
- package/header/Header.d.ts +0 -22
- package/header/HeaderCell.d.ts +0 -51
- package/header/HeaderRow.d.ts +0 -41
- package/header/HeaderSelectionCell.d.ts +0 -15
- package/header/HeaderThElement.d.ts +0 -26
- package/header/SortSettings.d.ts +0 -30
- package/header/index.d.ts +0 -14
- package/header/utils/index.d.ts +0 -87
- package/messages/index.d.ts +0 -394
- package/navigation/TableKeyboardNavigation.d.ts +0 -72
- package/navigation/TableKeyboardNavigationContext.d.ts +0 -10
- package/navigation/TableKeyboardNavigationContextType.d.ts +0 -11
- package/navigation/TableKeyboardNavigationStateType.d.ts +0 -14
- package/navigation/constants.d.ts +0 -58
- package/navigation/hooks.d.ts +0 -16
- package/navigation/utils.d.ts +0 -149
- package/package-metadata.d.ts +0 -9
- package/pager/Pager.d.ts +0 -208
- package/pager/PagerInput.d.ts +0 -29
- package/pager/PagerNumericButtons.d.ts +0 -32
- package/pager/PagerPageSizes.d.ts +0 -30
- package/selection/TableSelectableSettings.d.ts +0 -35
- package/selection/TableSelection.d.ts +0 -15
- package/selection/constants.d.ts +0 -10
- package/selection/events.d.ts +0 -98
- package/selection/utils.d.ts +0 -70
- package/utils/DataItemWrapper.d.ts +0 -14
- package/utils/data-operations.d.ts +0 -98
- package/utils/group-operations.d.ts +0 -33
- package/virtualization/columns.d.ts +0 -19
- package/virtualization/index.d.ts +0 -5
package/index.mjs
CHANGED
|
@@ -1,2990 +1,155 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
5
8
|
"use client";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[hn]: "Is true",
|
|
55
|
-
[gn]: "Is false",
|
|
56
|
-
[fn]: "Is after or equal to",
|
|
57
|
-
[mn]: "Is after",
|
|
58
|
-
[vn]: "Is before",
|
|
59
|
-
[En]: "Is before or equal to",
|
|
60
|
-
[Ue]: "And",
|
|
61
|
-
[je]: "Or",
|
|
62
|
-
[ae]: "Add Expression",
|
|
63
|
-
[ie]: "Add Group",
|
|
64
|
-
[ce]: "Remove",
|
|
65
|
-
[Xe]: "Filter toolbar",
|
|
66
|
-
[Ze]: "Filter expression row",
|
|
67
|
-
[Je]: "Filter dropdown",
|
|
68
|
-
[Qe]: "Filter operator dropdown",
|
|
69
|
-
[et]: "Select True/False",
|
|
70
|
-
[tt]: "Enter number",
|
|
71
|
-
[nt]: "Enter text",
|
|
72
|
-
[rt]: "Clear",
|
|
73
|
-
[st]: "Filter",
|
|
74
|
-
[ot]: "Filter",
|
|
75
|
-
[at]: "Sort Ascending",
|
|
76
|
-
[it]: "Sort Descending",
|
|
77
|
-
[we]: "Is equal to",
|
|
78
|
-
[Oe]: "Is not equal to",
|
|
79
|
-
[Ne]: "Is null",
|
|
80
|
-
[Ae]: "Is not null",
|
|
81
|
-
[Cn]: "Is empty",
|
|
82
|
-
[xn]: "Is not empty",
|
|
83
|
-
[bn]: "Starts with",
|
|
84
|
-
[yn]: "Contains",
|
|
85
|
-
[In]: "Does not contain",
|
|
86
|
-
[kn]: "Ends with",
|
|
87
|
-
[Sn]: "Is greater than or equal to",
|
|
88
|
-
[Fn]: "Is greater than",
|
|
89
|
-
[Mn]: "Is less than or equal to",
|
|
90
|
-
[Rn]: "Is less than",
|
|
91
|
-
[Ln]: "Is true",
|
|
92
|
-
[Dn]: "Is after or equal to",
|
|
93
|
-
[wn]: "Is after",
|
|
94
|
-
[On]: "Is before",
|
|
95
|
-
[Nn]: "Is before or equal to",
|
|
96
|
-
[An]: "And",
|
|
97
|
-
[Pn]: "Or"
|
|
98
|
-
}, Pt = "...";
|
|
99
|
-
class Dr extends a.Component {
|
|
100
|
-
constructor() {
|
|
101
|
-
super(...arguments), this.handlePageChange = (t, n) => {
|
|
102
|
-
t.preventDefault(), this.props.pageChange(n, t);
|
|
103
|
-
}, this.handleSelectPageChange = (t) => {
|
|
104
|
-
t.preventDefault(), this.props.pageChange(t.target.value, t);
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
render() {
|
|
108
|
-
const t = q(this), n = this.props.messagesMap ? this.props.messagesMap(Ie) : { messageKey: Ie, defaultMessage: v[Ie] }, r = this.props.messagesMap ? this.props.messagesMap(_) : { messageKey: _, defaultMessage: v[_] }, s = this.props.messagesMap ? this.props.messagesMap(ke) : { messageKey: ke, defaultMessage: v[ke] }, o = t.toLanguageString(s.messageKey, s.defaultMessage), i = this.start > 1 && this.renderDots(this.start - 1, o), l = this.end < this.props.totalPages && this.renderDots(this.end + 1, o), c = this.start > 1 && this.renderOptionDots(this.start - 1), u = this.end < this.props.totalPages && this.renderOptionDots(this.end + 1), d = [];
|
|
109
|
-
for (let g = this.start; g <= this.end; g++)
|
|
110
|
-
d.push(g);
|
|
111
|
-
const h = d.map((g) => /* @__PURE__ */ a.createElement(
|
|
112
|
-
B,
|
|
113
|
-
{
|
|
114
|
-
className: H({ "k-selected": this.props.currentPage === g }),
|
|
115
|
-
key: g,
|
|
116
|
-
fillMode: "flat",
|
|
117
|
-
themeColor: "primary",
|
|
118
|
-
size: this.props.size,
|
|
119
|
-
rounded: null,
|
|
120
|
-
role: "button",
|
|
121
|
-
"aria-label": t.toLanguageString(r.messageKey, r.defaultMessage) + " " + g,
|
|
122
|
-
"aria-current": this.props.currentPage === g ? !0 : void 0,
|
|
123
|
-
onClick: (E) => this.handlePageChange(E, g)
|
|
124
|
-
},
|
|
125
|
-
g
|
|
126
|
-
)), m = d.map((g) => /* @__PURE__ */ a.createElement("option", { key: g }, g));
|
|
127
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
128
|
-
"select",
|
|
129
|
-
{
|
|
130
|
-
style: { width: "5em", margin: "0px 1em", display: this.props.type === "dropdown" ? "inline-flex" : "none" },
|
|
131
|
-
className: H(
|
|
132
|
-
"k-picker k-dropdown-list k-dropdown k-rounded-md",
|
|
133
|
-
{
|
|
134
|
-
[`k-picker-${Ht.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
"aria-label": t.toLanguageString(n.messageKey, n.defaultMessage),
|
|
138
|
-
value: this.props.currentPage,
|
|
139
|
-
onChange: (g) => this.handleSelectPageChange(g)
|
|
140
|
-
},
|
|
141
|
-
c,
|
|
142
|
-
m,
|
|
143
|
-
u
|
|
144
|
-
), /* @__PURE__ */ a.createElement(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
className: "k-pager-numbers",
|
|
148
|
-
style: { display: this.props.type === "numbers" ? "" : "none" }
|
|
149
|
-
},
|
|
150
|
-
i,
|
|
151
|
-
h,
|
|
152
|
-
l
|
|
153
|
-
));
|
|
154
|
-
}
|
|
155
|
-
get end() {
|
|
156
|
-
return Math.min(this.start + this.props.buttonCount - 1, this.props.totalPages);
|
|
157
|
-
}
|
|
158
|
-
get start() {
|
|
159
|
-
const t = this.props.currentPage, n = this.props.buttonCount;
|
|
160
|
-
if (t > n) {
|
|
161
|
-
const r = t % n;
|
|
162
|
-
return r === 0 ? t - n + 1 : t - r + 1;
|
|
163
|
-
}
|
|
164
|
-
return 1;
|
|
165
|
-
}
|
|
166
|
-
renderDots(t, n) {
|
|
167
|
-
return /* @__PURE__ */ a.createElement(
|
|
168
|
-
B,
|
|
169
|
-
{
|
|
170
|
-
fillMode: "flat",
|
|
171
|
-
themeColor: "primary",
|
|
172
|
-
size: this.props.size,
|
|
173
|
-
rounded: null,
|
|
174
|
-
role: "button",
|
|
175
|
-
"aria-label": n,
|
|
176
|
-
onClick: (r) => this.handlePageChange(r, t)
|
|
177
|
-
},
|
|
178
|
-
Pt
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
renderOptionDots(t) {
|
|
182
|
-
return /* @__PURE__ */ a.createElement("option", { value: t }, Pt);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
class Tn extends a.Component {
|
|
186
|
-
constructor() {
|
|
187
|
-
super(...arguments), this.state = { page: this.props.currentPage }, this.handleOnChange = (t) => {
|
|
188
|
-
this.setState({ page: t.target.value }), t.target.value && this.props.pageChange(t.target.value, t);
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
render() {
|
|
192
|
-
const t = Ut(this), n = q(this), r = this.props.messagesMap ? this.props.messagesMap(_) : { messageKey: _, defaultMessage: v[_] }, s = this.props.messagesMap ? this.props.messagesMap(X) : { messageKey: X, defaultMessage: v[X] }, o = this.props.messagesMap ? this.props.messagesMap(U) : { messageKey: U, defaultMessage: v[U] }, i = this.props.messagesMap ? this.props.messagesMap(U) : { messageKey: Ye, defaultMessage: v[Ye] };
|
|
193
|
-
return /* @__PURE__ */ a.createElement("span", { className: "k-pager-input" }, /* @__PURE__ */ a.createElement("span", null, n.toLanguageString(r.messageKey, r.defaultMessage)), /* @__PURE__ */ a.createElement(
|
|
194
|
-
Re,
|
|
195
|
-
{
|
|
196
|
-
value: this.props.currentPage !== void 0 ? this.props.currentPage : this.state.page,
|
|
197
|
-
onChange: this.handleOnChange,
|
|
198
|
-
min: 1,
|
|
199
|
-
spinners: !1,
|
|
200
|
-
ariaLabel: n.toLanguageString(i.messageKey, i.defaultMessage)
|
|
201
|
-
}
|
|
202
|
-
), /* @__PURE__ */ a.createElement("span", null, `${n.toLanguageString(s.messageKey, s.defaultMessage)} ${t.format(n.toLanguageString(o.messageKey, o.defaultMessage), [
|
|
203
|
-
this.props.totalPages
|
|
204
|
-
])}`));
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
W(Tn);
|
|
208
|
-
class Kn extends a.Component {
|
|
209
|
-
constructor() {
|
|
210
|
-
super(...arguments), this.pageSizeChange = (t) => {
|
|
211
|
-
this.props.pageChange && this.props.pageChange({ skip: 0, take: parseInt(t.target.value, 10) }, t);
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
render() {
|
|
215
|
-
const { value: t, pageSizes: n, pageSize: r, messagesMap: s } = this.props, o = n.slice();
|
|
216
|
-
t === void 0 && o.filter((c) => c === r).length === 0 && o.unshift(r);
|
|
217
|
-
const i = s ? s(xe) : { messageKey: xe, defaultMessage: v[xe] }, l = s ? s(ye) : { messageKey: ye, defaultMessage: v[ye] };
|
|
218
|
-
return /* @__PURE__ */ a.createElement("span", { className: "k-pager-sizes" }, /* @__PURE__ */ a.createElement(
|
|
219
|
-
$,
|
|
220
|
-
{
|
|
221
|
-
value: t !== void 0 ? t : r,
|
|
222
|
-
data: o,
|
|
223
|
-
onChange: this.pageSizeChange,
|
|
224
|
-
ariaLabel: q(this).toLanguageString(l.messageKey, l.defaultMessage),
|
|
225
|
-
size: this.props.size
|
|
226
|
-
}
|
|
227
|
-
), /* @__PURE__ */ a.createElement("span", null, q(this).toLanguageString(i.messageKey, i.defaultMessage)));
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
W(Kn);
|
|
231
|
-
const Et = {
|
|
232
|
-
name: "@progress/kendo-react-data-tools",
|
|
233
|
-
productName: "KendoReact",
|
|
234
|
-
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
235
|
-
publishDate: 1709631906,
|
|
236
|
-
version: "",
|
|
237
|
-
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
238
|
-
}, Tt = 600, wr = 768;
|
|
239
|
-
class Pe extends a.Component {
|
|
240
|
-
constructor(t) {
|
|
241
|
-
super(t), this._element = null, this.onPageChange = (n, r) => {
|
|
242
|
-
const s = {
|
|
243
|
-
target: this,
|
|
244
|
-
syntheticEvent: r.syntheticEvent,
|
|
245
|
-
nativeEvent: r.nativeEvent,
|
|
246
|
-
targetEvent: r,
|
|
247
|
-
...n
|
|
248
|
-
};
|
|
249
|
-
this.props.onPageChange && this.props.onPageChange.call(void 0, s);
|
|
250
|
-
}, this.changePage = (n, r) => {
|
|
251
|
-
this.props.onPageChange && n > 0 && n <= this.totalPages && this.props.onPageChange({
|
|
252
|
-
target: this,
|
|
253
|
-
skip: (n - 1) * this.props.take,
|
|
254
|
-
take: this.props.take,
|
|
255
|
-
syntheticEvent: r,
|
|
256
|
-
nativeEvent: r.nativeEvent,
|
|
257
|
-
targetEvent: r
|
|
258
|
-
});
|
|
259
|
-
}, this.onWindowResize = () => {
|
|
260
|
-
const n = this.element;
|
|
261
|
-
if (!n || !this.props.responsive)
|
|
262
|
-
return;
|
|
263
|
-
const r = n.offsetWidth;
|
|
264
|
-
r < Tt ? this.setState({ showPagerSizes: !1 }) : r >= Tt && r < wr ? this.setState({ showPagerInfo: !1, showPagerSizes: !0 }) : this.setState({ showPagerInfo: !0, showPagerSizes: !0 });
|
|
265
|
-
}, gt(Et), this.state = { showPagerSizes: !0, showPagerInfo: !0 };
|
|
266
|
-
}
|
|
267
|
-
get isRtl() {
|
|
268
|
-
return this.props.dir === "rtl";
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Returns the HTML element of the Pager component.
|
|
272
|
-
*/
|
|
273
|
-
get element() {
|
|
274
|
-
return this._element;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @hidden
|
|
278
|
-
*/
|
|
279
|
-
componentDidMount() {
|
|
280
|
-
window.addEventListener("resize", this.onWindowResize), this.onWindowResize();
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* @hidden
|
|
284
|
-
*/
|
|
285
|
-
componentWillUnmount() {
|
|
286
|
-
window.removeEventListener("resize", this.onWindowResize);
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* @hidden
|
|
290
|
-
*/
|
|
291
|
-
render() {
|
|
292
|
-
const { showPagerSizes: t, showPagerInfo: n } = this.state, { skip: r, take: s, total: o, pageSizes: i, size: l, responsive: c, messagesMap: u, pageSizeValue: d } = this.props, h = q(this), m = Ut(this), g = Math.floor(r / s) + 1, E = this.props.type === "numeric" ? /* @__PURE__ */ a.createElement(
|
|
293
|
-
Dr,
|
|
294
|
-
{
|
|
295
|
-
type: c && !t ? "dropdown" : "numbers",
|
|
296
|
-
buttonCount: this.props.buttonCount || 0,
|
|
297
|
-
totalPages: this.totalPages,
|
|
298
|
-
currentPage: g,
|
|
299
|
-
pageChange: this.changePage,
|
|
300
|
-
messagesMap: this.props.messagesMap,
|
|
301
|
-
size: l
|
|
302
|
-
}
|
|
303
|
-
) : /* @__PURE__ */ a.createElement(
|
|
304
|
-
Tn,
|
|
305
|
-
{
|
|
306
|
-
buttonCount: this.props.buttonCount || 0,
|
|
307
|
-
totalPages: this.totalPages,
|
|
308
|
-
currentPage: g,
|
|
309
|
-
pageChange: this.changePage,
|
|
310
|
-
messagesMap: u,
|
|
311
|
-
size: l
|
|
312
|
-
}
|
|
313
|
-
), b = u ? u(me) : { messageKey: me, defaultMessage: v[me] }, C = u ? u(ve) : { messageKey: ve, defaultMessage: v[ve] }, f = u ? u(Ee) : { messageKey: Ee, defaultMessage: v[Ee] }, I = u ? u(Ce) : { messageKey: Ce, defaultMessage: v[Ce] }, F = u ? u(fe) : { messageKey: fe, defaultMessage: v[fe] }, S = u ? u(be) : { messageKey: be, defaultMessage: v[be] }, x = u ? u(_) : { messageKey: _, defaultMessage: v[_] }, y = u ? u(X) : { messageKey: X, defaultMessage: v[X] }, k = u ? u(U) : { messageKey: U, defaultMessage: v[U] }, A = `${h.toLanguageString(
|
|
314
|
-
x.messageKey,
|
|
315
|
-
x.defaultMessage
|
|
316
|
-
)} ${m.format(
|
|
317
|
-
h.toLanguageString(
|
|
318
|
-
k.messageKey,
|
|
319
|
-
k.defaultMessage
|
|
320
|
-
),
|
|
321
|
-
[g]
|
|
322
|
-
)} ${h.toLanguageString(
|
|
323
|
-
y.messageKey,
|
|
324
|
-
y.defaultMessage
|
|
325
|
-
)} ${m.format(
|
|
326
|
-
h.toLanguageString(
|
|
327
|
-
k.messageKey,
|
|
328
|
-
k.defaultMessage
|
|
329
|
-
),
|
|
330
|
-
[this.totalPages]
|
|
331
|
-
)}`;
|
|
332
|
-
let P, T, G, D;
|
|
333
|
-
this.props.previousNext && (P = this.renderButton(
|
|
334
|
-
1,
|
|
335
|
-
"k-pager-nav k-pager-first" + (g === 1 ? " k-disabled" : ""),
|
|
336
|
-
h.toLanguageString(b.messageKey, b.defaultMessage),
|
|
337
|
-
this.isRtl ? "caret-alt-to-right" : "caret-alt-to-left",
|
|
338
|
-
this.isRtl ? wt : Ot,
|
|
339
|
-
g === 1 ? !0 : void 0
|
|
340
|
-
), T = this.renderButton(
|
|
341
|
-
g - 1,
|
|
342
|
-
"k-pager-nav" + (g === 1 ? " k-disabled" : ""),
|
|
343
|
-
h.toLanguageString(C.messageKey, C.defaultMessage),
|
|
344
|
-
this.isRtl ? "caret-alt-right" : "caret-alt-left",
|
|
345
|
-
this.isRtl ? Nt : At,
|
|
346
|
-
g === 1 ? !0 : void 0
|
|
347
|
-
), G = this.renderButton(
|
|
348
|
-
g + 1,
|
|
349
|
-
"k-pager-nav" + (g >= this.totalPages ? " k-disabled" : ""),
|
|
350
|
-
h.toLanguageString(f.messageKey, f.defaultMessage),
|
|
351
|
-
this.isRtl ? "caret-alt-left" : "caret-alt-right",
|
|
352
|
-
this.isRtl ? At : Nt,
|
|
353
|
-
g >= this.totalPages ? !0 : void 0
|
|
354
|
-
), D = this.renderButton(
|
|
355
|
-
this.totalPages,
|
|
356
|
-
"k-pager-nav k-pager-last" + (g >= this.totalPages ? " k-disabled" : ""),
|
|
357
|
-
h.toLanguageString(I.messageKey, I.defaultMessage),
|
|
358
|
-
this.isRtl ? "caret-alt-to-left" : "caret-alt-to-right",
|
|
359
|
-
this.isRtl ? Ot : wt,
|
|
360
|
-
g >= this.totalPages ? !0 : void 0
|
|
361
|
-
));
|
|
362
|
-
const L = i && /* @__PURE__ */ a.createElement(
|
|
363
|
-
Kn,
|
|
364
|
-
{
|
|
365
|
-
pageChange: this.onPageChange,
|
|
366
|
-
pageSize: s,
|
|
367
|
-
pageSizes: i,
|
|
368
|
-
value: d,
|
|
369
|
-
messagesMap: u,
|
|
370
|
-
size: l
|
|
371
|
-
}
|
|
372
|
-
), V = this.props.info && /* @__PURE__ */ a.createElement("span", { className: "k-pager-info" }, m.format(h.toLanguageString(F.messageKey, F.defaultMessage), [
|
|
373
|
-
Math.min(r + 1, o),
|
|
374
|
-
Math.min(r + s, o),
|
|
375
|
-
o
|
|
376
|
-
]));
|
|
377
|
-
return /* @__PURE__ */ a.createElement(
|
|
378
|
-
"div",
|
|
379
|
-
{
|
|
380
|
-
className: H(
|
|
381
|
-
"k-pager",
|
|
382
|
-
{
|
|
383
|
-
[`k-pager-${Ht.sizeMap[l] || l}`]: l
|
|
384
|
-
},
|
|
385
|
-
this.props.className
|
|
386
|
-
),
|
|
387
|
-
style: this.props.style,
|
|
388
|
-
role: "application",
|
|
389
|
-
"aria-roledescription": "pager",
|
|
390
|
-
dir: this.props.dir,
|
|
391
|
-
"aria-keyshortcuts": h.toLanguageString(S.messageKey, S.defaultMessage),
|
|
392
|
-
"aria-label": A,
|
|
393
|
-
ref: (Z) => this._element = Z
|
|
394
|
-
},
|
|
395
|
-
/* @__PURE__ */ a.createElement("div", { className: H("k-pager-numbers-wrap") }, P, T, E, G, D),
|
|
396
|
-
c ? t && L : L,
|
|
397
|
-
c ? n && V : V
|
|
398
|
-
);
|
|
399
|
-
}
|
|
400
|
-
renderButton(t, n, r, s, o, i) {
|
|
401
|
-
return /* @__PURE__ */ a.createElement(
|
|
402
|
-
B,
|
|
403
|
-
{
|
|
404
|
-
fillMode: "flat",
|
|
405
|
-
themeColor: "base",
|
|
406
|
-
size: this.props.size,
|
|
407
|
-
rounded: null,
|
|
408
|
-
className: n,
|
|
409
|
-
icon: s,
|
|
410
|
-
svgIcon: o,
|
|
411
|
-
title: r,
|
|
412
|
-
role: "button",
|
|
413
|
-
"aria-disabled": i,
|
|
414
|
-
onClick: (l) => {
|
|
415
|
-
l.preventDefault(), this.changePage(t, l);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
get totalPages() {
|
|
421
|
-
return Math.ceil((this.props.total || 0) / this.props.take);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
Pe.propTypes = {
|
|
425
|
-
className: p.string,
|
|
426
|
-
style: p.object,
|
|
427
|
-
total: p.number.isRequired,
|
|
428
|
-
skip: p.number.isRequired,
|
|
429
|
-
take: p.number.isRequired,
|
|
430
|
-
buttonCount: p.number,
|
|
431
|
-
info: p.bool,
|
|
432
|
-
type: p.oneOf(["numeric", "input"]),
|
|
433
|
-
pageSizes: p.arrayOf(p.oneOfType([
|
|
434
|
-
p.string,
|
|
435
|
-
p.number
|
|
436
|
-
])),
|
|
437
|
-
previousNext: p.bool,
|
|
438
|
-
onPageChange: p.func,
|
|
439
|
-
messagesMap: p.func,
|
|
440
|
-
size: p.oneOf([null, "small", "medium", "large"]),
|
|
441
|
-
dir: p.string
|
|
442
|
-
};
|
|
443
|
-
Pe.defaultProps = {
|
|
444
|
-
buttonCount: 10,
|
|
445
|
-
info: !0,
|
|
446
|
-
type: "numeric",
|
|
447
|
-
size: "medium"
|
|
448
|
-
};
|
|
449
|
-
fr(Pe);
|
|
450
|
-
W(Pe);
|
|
451
|
-
const Te = (e) => class extends a.Component {
|
|
452
|
-
constructor() {
|
|
453
|
-
super(...arguments), this.filterChange = (r) => {
|
|
454
|
-
this.props.onFilterChange && this.props.onFilterChange(r);
|
|
455
|
-
}, this.inputChange = (r) => {
|
|
456
|
-
const s = r.target.value, { filter: o = [], field: i = "" } = this.props, l = this.findCellFilter(), c = l ? o.map((u) => u.field === i ? { ...l, value: s } : u) : [...o, { ...e.emptyFilter, value: s, field: i }];
|
|
457
|
-
this.filterChange({
|
|
458
|
-
filter: c,
|
|
459
|
-
field: i,
|
|
460
|
-
syntheticEvent: r.syntheticEvent
|
|
461
|
-
});
|
|
462
|
-
}, this.operatorChange = (r) => {
|
|
463
|
-
const { operator: s } = r.target.value, { filter: o = [], field: i = "" } = this.props, l = this.findCellFilter(), c = l ? o.map((u) => u.field === i ? { ...l, operator: s } : u) : [...o, { ...e.emptyFilter, field: i, operator: s }];
|
|
464
|
-
this.filterChange({
|
|
465
|
-
filter: c,
|
|
466
|
-
field: i,
|
|
467
|
-
syntheticEvent: r.syntheticEvent
|
|
468
|
-
});
|
|
469
|
-
}, this.clearButtonClick = (r) => {
|
|
470
|
-
const { filter: s = [], field: o = "" } = this.props;
|
|
471
|
-
this.filterChange({
|
|
472
|
-
filter: s.filter((i) => i.field !== o),
|
|
473
|
-
field: o,
|
|
474
|
-
syntheticEvent: r
|
|
475
|
-
});
|
|
476
|
-
}, this.findCellFilter = () => {
|
|
477
|
-
const { filter: r = [], field: s } = this.props;
|
|
478
|
-
return r.find((o) => o.field === s);
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
render() {
|
|
482
|
-
const { clearButtonTitle: r = "", operators: s = [] } = this.props, o = this.findCellFilter() || { ...e.emptyFilter, operator: "" }, { operator: i, value: l } = o, c = {
|
|
483
|
-
ariaLabel: "filter",
|
|
484
|
-
value: s.find((u) => u.operator === i) || null,
|
|
485
|
-
onChange: this.operatorChange,
|
|
486
|
-
className: "k-dropdown-operator",
|
|
487
|
-
iconClassName: "k-i-filter",
|
|
488
|
-
svgIcon: Ve,
|
|
489
|
-
data: s,
|
|
490
|
-
textField: "text",
|
|
491
|
-
popupSettings: { width: "" },
|
|
492
|
-
components: this.props.components
|
|
493
|
-
};
|
|
494
|
-
return /* @__PURE__ */ a.createElement("div", { className: "k-filtercell" }, /* @__PURE__ */ a.createElement("span", null, e.inputComponent({
|
|
495
|
-
value: l,
|
|
496
|
-
onChange: this.inputChange,
|
|
497
|
-
components: this.props.components,
|
|
498
|
-
ariaLabel: this.props.ariaLabel,
|
|
499
|
-
min: this.props.min,
|
|
500
|
-
max: this.props.max
|
|
501
|
-
}), /* @__PURE__ */ a.createElement("div", { className: "k-filtercell-operator" }, e.operatorComponent(c, this.props), " ", /* @__PURE__ */ a.createElement(
|
|
502
|
-
B,
|
|
503
|
-
{
|
|
504
|
-
className: H({
|
|
505
|
-
["k-clear-button-visible"]: !(l === null || l === "") || i
|
|
506
|
-
}),
|
|
507
|
-
title: r,
|
|
508
|
-
type: "button",
|
|
509
|
-
onClick: this.clearButtonClick,
|
|
510
|
-
icon: "filter-clear",
|
|
511
|
-
svgIcon: Er,
|
|
512
|
-
disabled: !(!(l === null || l === "") || i)
|
|
513
|
-
}
|
|
514
|
-
))));
|
|
515
|
-
}
|
|
516
|
-
}, Kt = "eq", Or = {
|
|
517
|
-
emptyFilter: { operator: Kt, value: "" },
|
|
518
|
-
inputComponent: (e) => null,
|
|
519
|
-
operatorComponent: function(e, t) {
|
|
520
|
-
const { filter: n = [], field: r } = t, s = n.find((o) => o.field === r);
|
|
521
|
-
return /* @__PURE__ */ a.createElement(
|
|
522
|
-
$,
|
|
523
|
-
{
|
|
524
|
-
...e,
|
|
525
|
-
value: e.data.find((o) => o.operator === (s ? s.value : "")),
|
|
526
|
-
onChange: (o) => {
|
|
527
|
-
if (!t.onFilterChange)
|
|
528
|
-
return;
|
|
529
|
-
const i = o.target.value.operator;
|
|
530
|
-
if (i === "") {
|
|
531
|
-
s && t.onFilterChange.call(void 0, {
|
|
532
|
-
filter: n.filter((c) => c.field !== s.field),
|
|
533
|
-
field: r,
|
|
534
|
-
syntheticEvent: o.syntheticEvent
|
|
535
|
-
});
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
let l = s ? n.map((c) => c.field === r ? { ...s, value: i } : c) : [...n, { value: i, field: r, operator: Kt }];
|
|
539
|
-
t.onFilterChange.call(void 0, {
|
|
540
|
-
filter: l,
|
|
541
|
-
field: r,
|
|
542
|
-
syntheticEvent: o.syntheticEvent
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
);
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
class co extends Te(Or) {
|
|
550
|
-
}
|
|
551
|
-
const Nr = {
|
|
552
|
-
inputComponent: (e) => /* @__PURE__ */ a.createElement(vt, { ...e }),
|
|
553
|
-
operatorComponent: (e) => /* @__PURE__ */ a.createElement($, { ...e }),
|
|
554
|
-
emptyFilter: { operator: "eq", value: null }
|
|
555
|
-
};
|
|
556
|
-
class uo extends Te(Nr) {
|
|
557
|
-
}
|
|
558
|
-
const Ar = {
|
|
559
|
-
inputComponent: (e) => /* @__PURE__ */ a.createElement(Re, { ...e }),
|
|
560
|
-
operatorComponent: (e) => /* @__PURE__ */ a.createElement($, { ...e }),
|
|
561
|
-
emptyFilter: { operator: "eq", value: null }
|
|
562
|
-
};
|
|
563
|
-
class po extends Te(Ar) {
|
|
564
|
-
}
|
|
565
|
-
const Pr = {
|
|
566
|
-
inputComponent: (e) => /* @__PURE__ */ a.createElement(jt, { ...e }),
|
|
567
|
-
operatorComponent: (e) => /* @__PURE__ */ a.createElement($, { ...e }),
|
|
568
|
-
emptyFilter: { operator: "contains", value: "" }
|
|
569
|
-
};
|
|
570
|
-
class ho extends Te(Pr) {
|
|
571
|
-
}
|
|
572
|
-
const Tr = {
|
|
573
|
-
filterable: !0,
|
|
574
|
-
editable: !0,
|
|
575
|
-
sortable: !0,
|
|
576
|
-
resizable: !0,
|
|
577
|
-
reorderable: !0,
|
|
578
|
-
groupable: !0
|
|
579
|
-
}, ee = "data-keyboardnavlevel", Bn = "data-keyboardnavscope", qn = "data-keyboardnavheader", Gn = "data-keyboardnavbody", Ke = "data-keyboardnavid", go = "data-keyboardnavzone", Kr = "_filter", zn = [
|
|
580
|
-
"input:not([disabled]):not([type=hidden])",
|
|
581
|
-
"select:not([disabled])",
|
|
582
|
-
"textarea:not([disabled])",
|
|
583
|
-
"button:not([disabled])",
|
|
584
|
-
"a[href]",
|
|
585
|
-
"area[href]",
|
|
586
|
-
"summary",
|
|
587
|
-
"iframe",
|
|
588
|
-
"object",
|
|
589
|
-
"embed",
|
|
590
|
-
"audio[controls]",
|
|
591
|
-
"video[controls]",
|
|
592
|
-
"[contenteditable]"
|
|
593
|
-
], Ct = [...zn, "[tabindex]"], Br = [...zn, "[tabindex]"].map((e) => e + ':not([tabindex="-1"])'), fo = {
|
|
594
|
-
[Bn]: !0
|
|
595
|
-
}, qr = {
|
|
596
|
-
[qn]: !0
|
|
597
|
-
}, mo = {
|
|
598
|
-
[Gn]: !0
|
|
599
|
-
}, _n = a.createContext(void 0);
|
|
600
|
-
_n.displayName = "KendoReactTableKeyboardNavigationContext";
|
|
601
|
-
const Gr = (e, t) => {
|
|
602
|
-
const n = a.useContext(_n);
|
|
603
|
-
return !n || !e || t === !1 ? {} : {
|
|
604
|
-
tabIndex: n && n.activeId && n.activeId === e ? 0 : -1,
|
|
605
|
-
[ee]: n.level,
|
|
606
|
-
[Ke]: e
|
|
607
|
-
};
|
|
608
|
-
}, xt = (e) => {
|
|
609
|
-
const {
|
|
610
|
-
ariaSort: t,
|
|
611
|
-
colSpan: n,
|
|
612
|
-
rowSpan: r,
|
|
613
|
-
className: s,
|
|
614
|
-
style: o,
|
|
615
|
-
columnId: i,
|
|
616
|
-
onKeyDown: l,
|
|
617
|
-
navigatable: c,
|
|
618
|
-
ariaColumnIndex: u,
|
|
619
|
-
ariaLabel: d,
|
|
620
|
-
role: h,
|
|
621
|
-
ariaSelected: m
|
|
622
|
-
} = e, g = Gr(i, c);
|
|
623
|
-
return /* @__PURE__ */ a.createElement(
|
|
624
|
-
"th",
|
|
625
|
-
{
|
|
626
|
-
"aria-sort": t,
|
|
627
|
-
"aria-label": d,
|
|
628
|
-
"aria-colindex": u,
|
|
629
|
-
"aria-selected": m,
|
|
630
|
-
colSpan: n,
|
|
631
|
-
rowSpan: r,
|
|
632
|
-
className: s,
|
|
633
|
-
style: o,
|
|
634
|
-
onKeyDown: l,
|
|
635
|
-
role: h,
|
|
636
|
-
...g
|
|
637
|
-
},
|
|
638
|
-
e.children
|
|
639
|
-
);
|
|
640
|
-
};
|
|
641
|
-
xt.displayName = "KendoReactHeaderThElement";
|
|
642
|
-
const $n = (e, t, n = "cell") => `${t}_${e}_${n}`, zr = (e) => {
|
|
643
|
-
if (e)
|
|
644
|
-
return parseInt(e.getAttribute(ee) || "", 10);
|
|
645
|
-
}, bt = (e) => {
|
|
646
|
-
if (!e)
|
|
647
|
-
return;
|
|
648
|
-
const t = e.getAttribute(Ke);
|
|
649
|
-
return t || void 0;
|
|
650
|
-
}, ut = (e) => e ? !!e.getAttribute(Ke) : !1, _r = (e, t = { level: 0 }) => e.querySelector(`[${ee}='${t.level}']`), $r = (e) => e.parentElement && e.parentElement.closest(`[${ee}]`), Hr = (e, t) => e.querySelector(`[${Ke}='${t}']`), Wr = (e) => e.parentElement && e.parentElement.closest(`[${Bn}]`), Hn = (e) => e.querySelector(`[${qn}]`), Wn = (e) => e.querySelector(`[${Gn}]`), Vr = (e, t = { focusable: !1 }) => {
|
|
651
|
-
let n = t.focusable ? Ct : Br;
|
|
652
|
-
return Array.from(e.querySelectorAll(n.join(",")));
|
|
653
|
-
}, Yr = (e, t = { level: 0 }) => {
|
|
654
|
-
if (!e)
|
|
655
|
-
return [];
|
|
656
|
-
let n = Ct.map((r) => r + `[${ee}='${t.level}']`).join(",");
|
|
657
|
-
return Array.from(e.querySelectorAll(n));
|
|
658
|
-
}, Ur = (e = { level: 0 }) => {
|
|
659
|
-
let t = Ct.map(
|
|
660
|
-
(n) => n + `[${ee}='${e.level}']`
|
|
661
|
-
).join(",");
|
|
662
|
-
return (n) => n.matches(t);
|
|
663
|
-
}, jr = (e) => {
|
|
664
|
-
const { elementForFocus: t, event: n, contextStateRef: r, prevElement: s } = e;
|
|
665
|
-
r.current && t && t.focus && (n.preventDefault(), t.focus(), ut(t) && (t.setAttribute("tabIndex", "0"), r.current.activeId = bt(t)), s && ut(s) && s.setAttribute("tabIndex", "-1"));
|
|
666
|
-
}, Xr = (e) => e.current ? e.current.idPrefix : "", Vn = (e, t, n, r, s) => {
|
|
667
|
-
if (!n)
|
|
668
|
-
return [];
|
|
669
|
-
let o = e + (s ? -1 : 1);
|
|
670
|
-
for (; o >= 0 && o < r.length; ) {
|
|
671
|
-
const i = r[o][t];
|
|
672
|
-
if (i !== n)
|
|
673
|
-
return [i, [o, t]];
|
|
674
|
-
o = o + (s ? -1 : 1);
|
|
675
|
-
}
|
|
676
|
-
return [];
|
|
677
|
-
}, Yn = (e, t, n, r, s) => {
|
|
678
|
-
if (!n)
|
|
679
|
-
return [];
|
|
680
|
-
let o = t + (s ? -1 : 1);
|
|
681
|
-
for (; o >= 0 && o < r[e].length; ) {
|
|
682
|
-
const i = r[e][o];
|
|
683
|
-
if (i !== n)
|
|
684
|
-
return [i, [e, o]];
|
|
685
|
-
o = o + (s ? -1 : 1);
|
|
686
|
-
}
|
|
687
|
-
return [];
|
|
688
|
-
}, dt = (e, t) => {
|
|
689
|
-
if (t) {
|
|
690
|
-
for (let n = 0; n < e.length; n++)
|
|
691
|
-
for (let r = 0; r < e[n].length; r++)
|
|
692
|
-
if (e[n][r] === t)
|
|
693
|
-
return [n, r];
|
|
694
|
-
}
|
|
695
|
-
}, Zr = (e) => e.current ? e.current.navigationMatrix.length : 0, Un = (e) => e ? `${e}${Kr}` : "", R = {
|
|
696
|
-
generateNavigatableId: $n,
|
|
697
|
-
getNavigatableId: bt,
|
|
698
|
-
getNavigatableLevel: zr,
|
|
699
|
-
getNavigatableElement: _r,
|
|
700
|
-
getClosestNavigatableElement: $r,
|
|
701
|
-
getActiveElement: Hr,
|
|
702
|
-
getClosestScope: Wr,
|
|
703
|
-
getHeaderElement: Hn,
|
|
704
|
-
getBodyElement: Wn,
|
|
705
|
-
getFocusableElements: Vr,
|
|
706
|
-
getNavigatableElements: Yr,
|
|
707
|
-
filterNavigatableElements: Ur,
|
|
708
|
-
focusElement: jr,
|
|
709
|
-
getIdPrefix: Xr,
|
|
710
|
-
isNavigatable: ut,
|
|
711
|
-
findNextIdByRowIndex: Vn,
|
|
712
|
-
findNextIdByCellIndex: Yn,
|
|
713
|
-
findId: dt,
|
|
714
|
-
getNextNavigationIndex: Zr,
|
|
715
|
-
getFilterColumnId: Un
|
|
716
|
-
}, Jr = "k-table-row k-filter-row", Qr = (e, t, n) => {
|
|
717
|
-
let r = `${n ? "k-grid-header-sticky" : ""}`;
|
|
718
|
-
return e.some((s) => s.field === t) && (r += " k-sorted"), r;
|
|
719
|
-
}, vo = function(e) {
|
|
720
|
-
const { columns: t, filter: n, filterChange: r, sort: s = [], ariaRowIndex: o } = e, i = Q();
|
|
721
|
-
return /* @__PURE__ */ a.createElement("tr", { className: Jr, "aria-rowindex": o, role: "row" }, t.map((l, c) => {
|
|
722
|
-
const u = l.locked !== void 0 ? {
|
|
723
|
-
left: l.left,
|
|
724
|
-
right: l.right,
|
|
725
|
-
borderRightWidth: l.rightBorder ? "1px" : ""
|
|
726
|
-
} : {}, d = l.filterCell || l.filter;
|
|
727
|
-
return /* @__PURE__ */ a.createElement(
|
|
728
|
-
xt,
|
|
729
|
-
{
|
|
730
|
-
columnId: Un(l.id),
|
|
731
|
-
navigatable: l.navigatable,
|
|
732
|
-
style: u,
|
|
733
|
-
key: c,
|
|
734
|
-
ariaColumnIndex: l.ariaColumnIndex,
|
|
735
|
-
ariaLabel: d ? i.toLanguageString(ct, v[ct]) : void 0,
|
|
736
|
-
className: H(
|
|
737
|
-
"k-table-th k-header",
|
|
738
|
-
Qr(s, l.field, l.locked)
|
|
739
|
-
)
|
|
740
|
-
},
|
|
741
|
-
d && /* @__PURE__ */ a.createElement(
|
|
742
|
-
d,
|
|
743
|
-
{
|
|
744
|
-
field: l.field,
|
|
745
|
-
filter: n,
|
|
746
|
-
onFilterChange: r
|
|
747
|
-
}
|
|
748
|
-
)
|
|
749
|
-
);
|
|
750
|
-
}));
|
|
751
|
-
};
|
|
752
|
-
function es(e, t) {
|
|
753
|
-
const n = e[t].depth;
|
|
754
|
-
let r = null;
|
|
755
|
-
for (let s = t + 1; s < e.length; s++)
|
|
756
|
-
if (e[s].depth === n) {
|
|
757
|
-
r = e[s];
|
|
758
|
-
break;
|
|
759
|
-
}
|
|
760
|
-
return r;
|
|
761
|
-
}
|
|
762
|
-
const yt = (e) => {
|
|
763
|
-
let t = e.width ? parseFloat(e.width.toString()) : 0;
|
|
764
|
-
return !t && e.children && e.children.length && (t = e.children.reduce((n, r) => yt(r) + n, 0)), t;
|
|
765
|
-
};
|
|
766
|
-
function Eo(e) {
|
|
767
|
-
const t = [[]];
|
|
768
|
-
let n = 0;
|
|
769
|
-
for (let o = e.length - 1; o >= 0; o--)
|
|
770
|
-
n = Math.max(n, e[o].depth), e[o].colSpan = e[o].colSpan || 1, e[o].parentIndex !== -1 && (e[e[o].parentIndex].colSpan = (e[e[o].parentIndex].colSpan || 0) + e[o].colSpan);
|
|
771
|
-
const r = [];
|
|
772
|
-
let s = 1;
|
|
773
|
-
return e.forEach((o, i) => {
|
|
774
|
-
t[o.depth] = t[o.depth] || [];
|
|
775
|
-
let l = !1;
|
|
776
|
-
t[o.depth].length === 0 && (s <= 1 ? s = 1 + (o.children.length > 0 ? 0 : n - o.depth) : (s--, l = !0)), o.rowSpan = 1 + (o.children.length > 0 ? 0 : n - o.depth), o.kFirst = l, o.index = t[o.depth].length, t[o.depth].push(i), o.ariaColumnIndex = r[o.depth] ? r[o.depth] + 1 : 1;
|
|
777
|
-
for (let c = o.depth; c < o.depth + o.rowSpan; c++)
|
|
778
|
-
r[c] = (r[c] || 0) + o.colSpan;
|
|
779
|
-
}), ts(t, e), ns(t, e), t;
|
|
780
|
-
}
|
|
781
|
-
function ts(e, t, n) {
|
|
782
|
-
let r = new Array(e.length).fill(0), s = 0;
|
|
783
|
-
t.forEach((o) => {
|
|
784
|
-
if (o.locked && (!o.left || n))
|
|
785
|
-
if (o.left = r[o.depth], s = yt(o), o.children.length === 0)
|
|
786
|
-
for (let i = o.depth; i < r.length; i++)
|
|
787
|
-
r[i] += s;
|
|
788
|
-
else
|
|
789
|
-
r[o.depth] += s;
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
function ns(e, t, n) {
|
|
793
|
-
let r = 0, s = new Array(e.length).fill(0);
|
|
794
|
-
for (let o = t.length - 1; o >= 0; o--) {
|
|
795
|
-
const i = t[o];
|
|
796
|
-
if (i.locked && (!i.right || n)) {
|
|
797
|
-
if (i.right = s[i.depth], r = yt(i), i.children.length === 0)
|
|
798
|
-
for (let c = i.depth; c < s.length; c++)
|
|
799
|
-
s[c] += r;
|
|
800
|
-
else
|
|
801
|
-
s[i.depth] += r;
|
|
802
|
-
const l = es(t, o);
|
|
803
|
-
i.rightBorder = !(l && l.locked);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
function rs(e, t, n = 0) {
|
|
808
|
-
let r = [];
|
|
809
|
-
if (!e || !e.length)
|
|
810
|
-
return [];
|
|
811
|
-
e.forEach((o) => {
|
|
812
|
-
const i = rs(o.children || [], t, n + 1);
|
|
813
|
-
r.push(
|
|
814
|
-
Object.assign(
|
|
815
|
-
{},
|
|
816
|
-
{ depth: n },
|
|
817
|
-
Tr,
|
|
818
|
-
o,
|
|
819
|
-
{
|
|
820
|
-
id: o.id ? o.id : $n(`${t.prevId++}`, t.idPrefix, "column"),
|
|
821
|
-
declarationIndex: r.length,
|
|
822
|
-
children: i,
|
|
823
|
-
rowSpan: 0,
|
|
824
|
-
colSpan: 0,
|
|
825
|
-
isAccessible: !0
|
|
826
|
-
}
|
|
827
|
-
)
|
|
828
|
-
);
|
|
829
|
-
});
|
|
830
|
-
const s = (o, i) => o.orderIndex === i.orderIndex ? o.declarationIndex - i.declarationIndex : (o.orderIndex || 0) - (i.orderIndex || 0);
|
|
831
|
-
if (r.sort(s), n === 0) {
|
|
832
|
-
let o = [];
|
|
833
|
-
const i = (l, c) => l.forEach((u) => {
|
|
834
|
-
u.parentIndex = c, i(u.children, o.push(u) - 1);
|
|
835
|
-
});
|
|
836
|
-
return i(r, -1), o;
|
|
837
|
-
}
|
|
838
|
-
return r;
|
|
839
|
-
}
|
|
840
|
-
function ss(e) {
|
|
841
|
-
return !!(e && getComputedStyle(e).direction === "rtl");
|
|
842
|
-
}
|
|
843
|
-
function Bt(e, t) {
|
|
844
|
-
if (!t || !e || !e.originalEvent)
|
|
845
|
-
return -1;
|
|
846
|
-
const n = { x: e.clientX, y: e.originalEvent.clientY };
|
|
847
|
-
let r = t.ownerDocument ? t.ownerDocument.elementFromPoint(n.x, n.y) : null;
|
|
848
|
-
for (; r && r.parentElement !== t; )
|
|
849
|
-
r = r.parentElement;
|
|
850
|
-
if (!r && t.matches("tr")) {
|
|
851
|
-
const o = (i) => {
|
|
852
|
-
const l = i.getBoundingClientRect();
|
|
853
|
-
return n.x > l.left && n.x < l.left + l.width && n.y > l.top && n.y < l.top + l.height;
|
|
854
|
-
};
|
|
855
|
-
r = Array.from(t.children).find(o) || null;
|
|
856
|
-
}
|
|
857
|
-
const s = t.children;
|
|
858
|
-
for (let o = 0; o < s.length; o++)
|
|
859
|
-
if (s[o] === r)
|
|
860
|
-
return o;
|
|
861
|
-
return -1;
|
|
862
|
-
}
|
|
863
|
-
class Co extends a.Component {
|
|
864
|
-
constructor() {
|
|
865
|
-
super(...arguments), this.element = null;
|
|
866
|
-
}
|
|
867
|
-
componentDidMount() {
|
|
868
|
-
const { columnResize: t } = this.props;
|
|
869
|
-
t && t.resizable && t.setIsRtl(ss(this.element));
|
|
870
|
-
}
|
|
871
|
-
render() {
|
|
872
|
-
return /* @__PURE__ */ a.createElement(
|
|
873
|
-
"thead",
|
|
874
|
-
{
|
|
875
|
-
className: "k-table-thead k-grid-header",
|
|
876
|
-
role: "presentation",
|
|
877
|
-
ref: (t) => this.element = t,
|
|
878
|
-
...qr
|
|
879
|
-
},
|
|
880
|
-
this.props.headerRow,
|
|
881
|
-
this.props.filterRow
|
|
882
|
-
);
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
function os(e) {
|
|
886
|
-
const t = e.onClick ? {
|
|
887
|
-
onClick: e.onClick
|
|
888
|
-
} : {}, n = /* @__PURE__ */ a.createElement("span", { className: "k-link", ...t }, /* @__PURE__ */ a.createElement("span", { className: "k-column-title" }, e.title || e.field || " "), e.children);
|
|
889
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, e.render ? e.render.call(void 0, n, e) : n);
|
|
890
|
-
}
|
|
891
|
-
const as = (...e) => Object.assign({ allowUnsort: !0, mode: "single" }, ...e);
|
|
892
|
-
class is extends a.Component {
|
|
893
|
-
constructor() {
|
|
894
|
-
super(...arguments), this.draggable = null, this.isDragged = !1, this.onDrag = (t) => {
|
|
895
|
-
this.isDragged = !0;
|
|
896
|
-
const n = this.draggable && this.draggable.element;
|
|
897
|
-
n && this.props.resize(t.event, n, !1);
|
|
898
|
-
}, this.onRelease = (t) => {
|
|
899
|
-
if (!this.isDragged)
|
|
900
|
-
return;
|
|
901
|
-
const n = this.draggable && this.draggable.element;
|
|
902
|
-
n && this.props.resize(t.event, n, !0), this.isDragged = !1;
|
|
903
|
-
}, this.onDoubleClick = (t) => {
|
|
904
|
-
if (this.isDragged)
|
|
905
|
-
return;
|
|
906
|
-
const n = this.draggable && this.draggable.element;
|
|
907
|
-
n && this.props.autofit && this.props.autofit(t, n);
|
|
908
|
-
};
|
|
909
|
-
}
|
|
910
|
-
render() {
|
|
911
|
-
return /* @__PURE__ */ a.createElement(
|
|
912
|
-
ft,
|
|
913
|
-
{
|
|
914
|
-
onPress: (t) => {
|
|
915
|
-
t.event.originalEvent.stopPropagation();
|
|
916
|
-
},
|
|
917
|
-
onDrag: this.onDrag,
|
|
918
|
-
onRelease: this.onRelease,
|
|
919
|
-
ref: (t) => {
|
|
920
|
-
this.draggable = t;
|
|
921
|
-
}
|
|
922
|
-
},
|
|
923
|
-
/* @__PURE__ */ a.createElement(
|
|
924
|
-
"span",
|
|
925
|
-
{
|
|
926
|
-
className: "k-column-resizer",
|
|
927
|
-
style: { touchAction: "none" },
|
|
928
|
-
draggable: !1,
|
|
929
|
-
onDoubleClick: this.onDoubleClick
|
|
930
|
-
}
|
|
931
|
-
)
|
|
932
|
-
);
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
class ls extends a.PureComponent {
|
|
936
|
-
constructor() {
|
|
937
|
-
super(...arguments), this.draggable = null, this.onPress = (t) => {
|
|
938
|
-
const n = this.draggable && this.draggable.element;
|
|
939
|
-
n && this.props.pressHandler && this.props.pressHandler(t.event, n);
|
|
940
|
-
}, this.onDrag = (t) => {
|
|
941
|
-
const n = this.draggable && this.draggable.element;
|
|
942
|
-
n && this.props.dragHandler && this.props.dragHandler(t.event, n);
|
|
943
|
-
}, this.onRelease = (t) => {
|
|
944
|
-
this.draggable && this.draggable.element && this.props.releaseHandler && this.props.releaseHandler(t.event);
|
|
945
|
-
};
|
|
946
|
-
}
|
|
947
|
-
render() {
|
|
948
|
-
return /* @__PURE__ */ a.createElement(
|
|
949
|
-
ft,
|
|
950
|
-
{
|
|
951
|
-
onPress: this.onPress,
|
|
952
|
-
onDrag: this.onDrag,
|
|
953
|
-
onRelease: this.onRelease,
|
|
954
|
-
ref: (t) => {
|
|
955
|
-
this.draggable = t;
|
|
956
|
-
}
|
|
957
|
-
},
|
|
958
|
-
/* @__PURE__ */ a.createElement("tr", { className: "k-table-row", "aria-rowindex": this.props.ariaRowIndex, role: "row" }, this.props.children)
|
|
959
|
-
);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
const cs = {
|
|
963
|
-
true: { asc: "desc", desc: "", "": "asc" },
|
|
964
|
-
false: { asc: "desc", desc: "asc", "": "asc" }
|
|
965
|
-
}, us = {
|
|
966
|
-
none: "none",
|
|
967
|
-
asc: "ascending",
|
|
968
|
-
desc: "descending"
|
|
969
|
-
};
|
|
970
|
-
class ds extends a.Component {
|
|
971
|
-
constructor() {
|
|
972
|
-
super(...arguments), this.cellClick = (t, n) => {
|
|
973
|
-
if (t.preventDefault(), !this.props.sortChange)
|
|
974
|
-
return;
|
|
975
|
-
const { allowUnsort: r, mode: s } = as(this.props.sortable || !1, n.sortable || !1), o = (this.props.sort || []).filter((c) => c.field === n.field)[0], i = cs[r][o && o.dir || ""], l = s === "single" ? [] : (this.props.sort || []).filter((c) => c.field !== n.field);
|
|
976
|
-
i !== "" && n.field && l.push({ field: n.field, dir: i }), this.props.sortChange(t, l, n.field);
|
|
977
|
-
}, this.cellKeyDown = (t, n) => {
|
|
978
|
-
t.isDefaultPrevented() || t.keyCode === K.enter && this.cellClick(t, n);
|
|
979
|
-
}, this.cells = (t) => t.map((n, r) => {
|
|
980
|
-
const s = this.props.columns[n], { columnResize: o } = this.props, i = o && o.resizable && s.resizable, l = this.props.sortable && s.sortable, c = this.props.sort ? this.props.sort.findIndex((f) => f.field === s.field) : -1, u = c >= 0 && this.props.sort[c].dir || "none", d = {
|
|
981
|
-
sort: this.props.sort,
|
|
982
|
-
onSortChange: this.props.sortChange,
|
|
983
|
-
filter: this.props.columnMenuFilter,
|
|
984
|
-
onFilterChange: this.props.columnMenuFilterChange,
|
|
985
|
-
field: s.field
|
|
986
|
-
}, h = {
|
|
987
|
-
field: s.field,
|
|
988
|
-
onClick: l && ((f) => this.cellClick(f, s)) || void 0,
|
|
989
|
-
selectionChange: this.props.selectionChange,
|
|
990
|
-
title: s.title,
|
|
991
|
-
selectionValue: s.headerSelectionValue,
|
|
992
|
-
render: this.props.cellRender,
|
|
993
|
-
children: this.sortIcon(c),
|
|
994
|
-
sort: this.props.sort,
|
|
995
|
-
sortable: this.props.sortable,
|
|
996
|
-
sortChange: this.props.sortChange,
|
|
997
|
-
filterChange: this.props.filterChange,
|
|
998
|
-
columns: this.props.columns,
|
|
999
|
-
columnMenuWrapperProps: d
|
|
1000
|
-
}, m = s.columnMenu || this.props.columnMenu, g = H(
|
|
1001
|
-
"k-table-th",
|
|
1002
|
-
{
|
|
1003
|
-
"k-first": s.kFirst,
|
|
1004
|
-
"k-filterable": !!m,
|
|
1005
|
-
"k-header": !0,
|
|
1006
|
-
"k-grid-header-sticky": s.locked,
|
|
1007
|
-
"k-sorted": this.props.sort && this.props.sort.some((f) => f.field === s.field)
|
|
1008
|
-
},
|
|
1009
|
-
s.headerClassName
|
|
1010
|
-
), E = s.locked !== void 0 ? {
|
|
1011
|
-
left: s.left,
|
|
1012
|
-
right: s.right,
|
|
1013
|
-
borderRightWidth: s.rightBorder ? "1px" : ""
|
|
1014
|
-
} : {}, b = q(this).toLanguageString(lt, v[lt]);
|
|
1015
|
-
let C = s.isAccessible ? {
|
|
1016
|
-
ariaSort: l ? us[u] : void 0,
|
|
1017
|
-
role: "columnheader",
|
|
1018
|
-
ariaColumnIndex: s.ariaColumnIndex,
|
|
1019
|
-
ariaSelected: !1,
|
|
1020
|
-
ariaDescription: l ? b : ""
|
|
1021
|
-
} : {
|
|
1022
|
-
role: "presentation"
|
|
1023
|
-
};
|
|
1024
|
-
return /* @__PURE__ */ a.createElement(
|
|
1025
|
-
xt,
|
|
1026
|
-
{
|
|
1027
|
-
key: r,
|
|
1028
|
-
colSpan: s.colSpan,
|
|
1029
|
-
rowSpan: s.rowSpan,
|
|
1030
|
-
className: g,
|
|
1031
|
-
style: E,
|
|
1032
|
-
columnId: s.id,
|
|
1033
|
-
navigatable: s.navigatable,
|
|
1034
|
-
onKeyDown: l && ((f) => this.cellKeyDown(f, s)) || void 0,
|
|
1035
|
-
...C
|
|
1036
|
-
},
|
|
1037
|
-
s.headerCell && /* @__PURE__ */ a.createElement(s.headerCell, { ...h }),
|
|
1038
|
-
!s.headerCell && /* @__PURE__ */ a.createElement("span", { className: "k-cell-inner" }, /* @__PURE__ */ a.createElement(os, { ...h }), m && /* @__PURE__ */ a.createElement(m, { ...d })),
|
|
1039
|
-
o && i && /* @__PURE__ */ a.createElement(
|
|
1040
|
-
is,
|
|
1041
|
-
{
|
|
1042
|
-
key: "ColumnResizer",
|
|
1043
|
-
resize: (f, I, F) => o.dragHandler(f, s, I, F)
|
|
1044
|
-
}
|
|
1045
|
-
)
|
|
1046
|
-
);
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
sortIcon(t) {
|
|
1050
|
-
if (!this.props.sort || t < 0)
|
|
1051
|
-
return null;
|
|
1052
|
-
const n = this.props.sort[t].dir;
|
|
1053
|
-
return n ? [
|
|
1054
|
-
/* @__PURE__ */ a.createElement(Me, { key: 1, name: `sort-${n}-small`, icon: n === "asc" ? Xt : Zt }),
|
|
1055
|
-
this.props.sort.length > 1 && /* @__PURE__ */ a.createElement("span", { key: 2, className: "k-sort-order" }, t + 1)
|
|
1056
|
-
] : null;
|
|
1057
|
-
}
|
|
1058
|
-
render() {
|
|
1059
|
-
return this.props.columnsMap.map((t, n) => this.props.pressHandler && /* @__PURE__ */ a.createElement(
|
|
1060
|
-
ls,
|
|
1061
|
-
{
|
|
1062
|
-
key: n,
|
|
1063
|
-
pressHandler: this.props.pressHandler,
|
|
1064
|
-
dragHandler: this.props.dragHandler,
|
|
1065
|
-
releaseHandler: this.props.releaseHandler,
|
|
1066
|
-
ariaRowIndex: n + 1
|
|
1067
|
-
},
|
|
1068
|
-
this.cells(t)
|
|
1069
|
-
) || /* @__PURE__ */ a.createElement("tr", { className: "k-table-row", "aria-rowindex": n + 1, role: "row" }, this.cells(t)));
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
W(ds);
|
|
1073
|
-
function xo(e) {
|
|
1074
|
-
const t = [
|
|
1075
|
-
/* @__PURE__ */ a.createElement(
|
|
1076
|
-
"input",
|
|
1077
|
-
{
|
|
1078
|
-
key: 0,
|
|
1079
|
-
checked: e.selectionValue,
|
|
1080
|
-
id: e.inputId,
|
|
1081
|
-
type: "checkbox",
|
|
1082
|
-
className: "k-checkbox k-checkbox-md k-rounded-md",
|
|
1083
|
-
onChange: (n) => e.selectionChange({
|
|
1084
|
-
field: e.field,
|
|
1085
|
-
syntheticEvent: n
|
|
1086
|
-
})
|
|
1087
|
-
}
|
|
1088
|
-
),
|
|
1089
|
-
/* @__PURE__ */ a.createElement("label", { key: 1, className: "k-checkbox-label", htmlFor: e.inputId })
|
|
1090
|
-
];
|
|
1091
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, e.render ? e.render.call(void 0, t, e) : t);
|
|
1092
|
-
}
|
|
1093
|
-
function bo(e) {
|
|
1094
|
-
const { enabled: t, columns: n = [], tableViewPortWidth: r, scrollLeft: s } = e, o = n.map(() => 1), i = n.map(() => !1);
|
|
1095
|
-
if (!t)
|
|
1096
|
-
return { colSpans: o, hiddenColumns: i };
|
|
1097
|
-
const l = n.map((f) => parseFloat((f.width || "").toString()) || 10);
|
|
1098
|
-
let c = 0;
|
|
1099
|
-
for (let f = 0; f < n.length; f++) {
|
|
1100
|
-
if (n[f].locked)
|
|
1101
|
-
continue;
|
|
1102
|
-
const I = f < l.length - 1 ? l[f + 1] : 0;
|
|
1103
|
-
if (c + l[f] + I < s)
|
|
1104
|
-
i[f] = !0, c += l[f];
|
|
1105
|
-
else
|
|
1106
|
-
break;
|
|
1107
|
-
}
|
|
1108
|
-
const u = l.reduce((f, I) => f + I, 0);
|
|
1109
|
-
c = 0;
|
|
1110
|
-
for (let f = n.length - 1; f >= 0; f--)
|
|
1111
|
-
if (!n[f].locked)
|
|
1112
|
-
if (c + 2 * l[f] < u - r - s)
|
|
1113
|
-
i[f] = !0, c += l[f];
|
|
1114
|
-
else
|
|
1115
|
-
break;
|
|
1116
|
-
const d = [...i], h = (f) => f;
|
|
1117
|
-
let m = d.lastIndexOf(!1), g = d.some(h), E = d.every(h), b, C;
|
|
1118
|
-
for (; g && d.length && (m !== -1 || E); ) {
|
|
1119
|
-
for (m < d.length - 1 && (b = E ? d.length : d.length - m - 1, C = d.length - b, C === 0 && (C = b - 1), i[C] = !1, o[C] = b, d.splice(m + 1, b)); d.length && !d[d.length - 1]; )
|
|
1120
|
-
d.pop();
|
|
1121
|
-
m = d.lastIndexOf(!1), g = d.some(h), E = d.every(h);
|
|
1122
|
-
}
|
|
1123
|
-
return { colSpans: o, hiddenColumns: i };
|
|
1124
|
-
}
|
|
1125
|
-
class yo {
|
|
1126
|
-
constructor(t) {
|
|
1127
|
-
this.columns = [], this.resizable = !1, this.isRtl = !1, this.setIsRtl = (n) => {
|
|
1128
|
-
this.isRtl = n;
|
|
1129
|
-
}, this.onResize = t, this.dragHandler = this.dragHandler.bind(this);
|
|
1130
|
-
}
|
|
1131
|
-
dragHandler(t, n, r, s) {
|
|
1132
|
-
const o = t.originalEvent;
|
|
1133
|
-
s || (o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation());
|
|
1134
|
-
const i = r.parentElement;
|
|
1135
|
-
if (!i || !i.parentElement)
|
|
1136
|
-
return;
|
|
1137
|
-
const l = i.clientWidth;
|
|
1138
|
-
let c;
|
|
1139
|
-
if (this.isRtl ? (c = r.getBoundingClientRect().right - r.offsetWidth / 2 - t.clientX, c += l) : c = l + t.clientX - r.getBoundingClientRect().left - r.offsetWidth / 2, !s && Math.abs(c - l) < 1)
|
|
1140
|
-
return;
|
|
1141
|
-
this.setWidths(n, Math.floor(c) / l);
|
|
1142
|
-
const u = this.columns.filter((d) => !d.children.length).indexOf(n);
|
|
1143
|
-
this.onResize(u, l, c, o, s);
|
|
1144
|
-
}
|
|
1145
|
-
setWidths(t, n) {
|
|
1146
|
-
const r = this.columns.indexOf(t), s = [];
|
|
1147
|
-
let o = t.children.length;
|
|
1148
|
-
for (let i = r + 1; o > 0 && i < this.columns.length; i++, o--) {
|
|
1149
|
-
const l = this.columns[i];
|
|
1150
|
-
l.children.length ? o += l.children.length : s.push(l);
|
|
1151
|
-
}
|
|
1152
|
-
s.length === 0 && s.push(t), s.forEach((i) => {
|
|
1153
|
-
let l = i.width ? parseFloat(i.width.toString()) * n : 0;
|
|
1154
|
-
const c = i.minResizableWidth === void 0 ? 10 : i.minResizableWidth;
|
|
1155
|
-
l < c && (l = c), i.width = Math.floor(l);
|
|
1156
|
-
}), this.updateColElements(s);
|
|
1157
|
-
}
|
|
1158
|
-
updateColElements(t) {
|
|
1159
|
-
const n = this.columns.filter((s) => !s.children.length);
|
|
1160
|
-
let r = 1e-10;
|
|
1161
|
-
for (let s = 0; s < t.length; s++) {
|
|
1162
|
-
const o = n.indexOf(t[s]), i = parseFloat((t[s].width || 0).toString());
|
|
1163
|
-
r += i - Math.floor(i);
|
|
1164
|
-
const l = Math.floor(i) + Math.floor(r);
|
|
1165
|
-
r -= Math.floor(r), this.setColWidth(this.colGroupMain && this.colGroupMain.children[o], l), this.setColWidth(this.colGroupHeader && this.colGroupHeader.children[o], l), this.setColWidth(this.colGroupFooter && this.colGroupFooter.children[o], l);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
setColWidth(t, n) {
|
|
1169
|
-
t && (t.style.width = n + "px");
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
class Io {
|
|
1173
|
-
constructor(t, n, r) {
|
|
1174
|
-
this.columns = [], this.reorderable = !1, this.groupable = !1, this.startColumn = -1, this.startGroup = -1, this.currentColumn = -1, this.currentGroup = -1, this.dropElementClue = null, this.dragElementClue = null, this.groupPanelDivElement = null, this.refGroupPanelDiv = (s) => {
|
|
1175
|
-
this.groupPanelDivElement = s;
|
|
1176
|
-
}, this.refDropElementClue = (s) => {
|
|
1177
|
-
this.dropElementClue = s;
|
|
1178
|
-
}, this.refDragElementClue = (s) => {
|
|
1179
|
-
this.dragElementClue = s;
|
|
1180
|
-
}, this.pressHandler = (s, o) => {
|
|
1181
|
-
const i = this.getColumnIndex(s, o);
|
|
1182
|
-
if (this.startGroup = this.getGroupIndex(s), i >= 0) {
|
|
1183
|
-
const l = this.columns[i];
|
|
1184
|
-
(l.reorderable && this.reorderable || l.groupable && this.groupable) && (this.startColumn = i);
|
|
1185
|
-
}
|
|
1186
|
-
}, this.dragHandler = (s, o) => {
|
|
1187
|
-
if (s.isTouch || s.originalEvent.preventDefault(), s.originalEvent.stopPropagation(), this.startColumn === -1 && this.startGroup === -1)
|
|
1188
|
-
return;
|
|
1189
|
-
this.currentColumn = this.getColumnIndex(s, o), this.currentGroup = this.getGroupIndex(s), this.groupPanelDivElement && this.startGroup >= 0 && (this.currentGroup = Math.min(this.currentGroup, this.groupPanelDivElement.children.length - 2));
|
|
1190
|
-
const i = !this.isValid();
|
|
1191
|
-
i && (this.currentColumn = -1, this.currentGroup = -1);
|
|
1192
|
-
const l = this.currentColumn >= 0 ? o.children[this.columns[this.currentColumn].index] : this.groupPanelDivElement && this.groupPanelDivElement.children[this.currentGroup];
|
|
1193
|
-
this.updateDragElementClue(s, o, l, i), this.updateDropElementClue(s, o, l, i);
|
|
1194
|
-
}, this.releaseHandler = (s) => {
|
|
1195
|
-
const o = this.startColumn, i = this.currentColumn, l = this.startGroup, c = this.currentGroup;
|
|
1196
|
-
this.dropElementClue && this.dropElementClue.setState({ visible: !1 }), this.dragElementClue && this.dragElementClue.setState({ visible: !1 });
|
|
1197
|
-
const u = this.isValid();
|
|
1198
|
-
this.startColumn = this.startGroup = this.currentColumn = this.currentGroup = -1, u && (o >= 0 && i >= 0 ? this.columnReorder(o, i, s.originalEvent) : l >= 0 && c >= 0 ? this.groupReorder(l, c, s.originalEvent) : o >= 0 && c >= 0 && this.columnToGroup(o, c, s.originalEvent));
|
|
1199
|
-
}, this.columnReorder = t, this.groupReorder = n, this.columnToGroup = r;
|
|
1200
|
-
}
|
|
1201
|
-
getColumnIndex(t, n) {
|
|
1202
|
-
if (!n || n.parentElement === this.groupPanelDivElement)
|
|
1203
|
-
return -1;
|
|
1204
|
-
const r = Bt(t, n);
|
|
1205
|
-
if (r === -1)
|
|
1206
|
-
return -1;
|
|
1207
|
-
for (let s = 0; s < n.parentNode.children.length; s++)
|
|
1208
|
-
if (n.parentNode.children[s] === n)
|
|
1209
|
-
return this.columns.findIndex((o) => o.index === r && o.depth === s);
|
|
1210
|
-
return -1;
|
|
1211
|
-
}
|
|
1212
|
-
getGroupIndex(t) {
|
|
1213
|
-
return Bt(t, this.groupPanelDivElement);
|
|
1214
|
-
}
|
|
1215
|
-
isValid() {
|
|
1216
|
-
return this.startGroup >= 0 ? this.currentGroup >= 0 && this.currentGroup !== this.startGroup : this.startColumn === -1 ? !1 : this.currentGroup >= 0 ? this.columns[this.startColumn].groupable === !0 && this.groupable === !0 : this.reorderable === !0 && this.currentColumn >= 0 && this.currentColumn !== this.startColumn && this.columns[this.startColumn].reorderable === !0 && this.columns[this.currentColumn].parentIndex === this.columns[this.startColumn].parentIndex;
|
|
1217
|
-
}
|
|
1218
|
-
updateDragElementClue(t, n, r, s) {
|
|
1219
|
-
if (!this.dragElementClue)
|
|
1220
|
-
return;
|
|
1221
|
-
const o = this.startColumn >= 0 ? n.children[this.columns[this.startColumn].index].innerText : n.innerText;
|
|
1222
|
-
this.dragElementClue.setState({
|
|
1223
|
-
visible: !0,
|
|
1224
|
-
top: t.pageY + 10,
|
|
1225
|
-
left: t.pageX,
|
|
1226
|
-
innerText: o,
|
|
1227
|
-
status: s || !r ? "k-i-cancel" : "k-i-plus"
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
updateDropElementClue(t, n, r, s) {
|
|
1231
|
-
if (!this.dropElementClue)
|
|
1232
|
-
return;
|
|
1233
|
-
if (s || !r) {
|
|
1234
|
-
this.dropElementClue.setState({ visible: !1 });
|
|
1235
|
-
return;
|
|
1236
|
-
}
|
|
1237
|
-
const o = r.getBoundingClientRect();
|
|
1238
|
-
let i = o.left + t.pageX - t.clientX - 6;
|
|
1239
|
-
(this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) && (i += o.width);
|
|
1240
|
-
const l = o.top + t.pageY - t.clientY;
|
|
1241
|
-
this.dropElementClue.setState({
|
|
1242
|
-
visible: !0,
|
|
1243
|
-
top: l,
|
|
1244
|
-
left: i,
|
|
1245
|
-
height: this.currentColumn >= 0 ? n.clientHeight : o.height
|
|
1246
|
-
});
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
class ko extends a.PureComponent {
|
|
1250
|
-
constructor(t) {
|
|
1251
|
-
super(t), this.elementRef = a.createRef(), this.state = {
|
|
1252
|
-
visible: !1,
|
|
1253
|
-
top: 0,
|
|
1254
|
-
left: 0,
|
|
1255
|
-
innerText: "",
|
|
1256
|
-
status: "k-i-cancel"
|
|
1257
|
-
}, this.hiddenElementRef = a.createRef();
|
|
1258
|
-
}
|
|
1259
|
-
get element() {
|
|
1260
|
-
return this.elementRef.current;
|
|
1261
|
-
}
|
|
1262
|
-
render() {
|
|
1263
|
-
const t = this.hiddenElementRef.current, { status: n } = this.state, r = this.state.visible && Wt && Qt(
|
|
1264
|
-
/* @__PURE__ */ a.createElement(
|
|
1265
|
-
"div",
|
|
1266
|
-
{
|
|
1267
|
-
ref: this.elementRef,
|
|
1268
|
-
className: "k-header k-drag-clue",
|
|
1269
|
-
style: {
|
|
1270
|
-
display: "block",
|
|
1271
|
-
position: "absolute",
|
|
1272
|
-
zIndex: 2e4,
|
|
1273
|
-
padding: "8px 12px",
|
|
1274
|
-
top: this.state.top + "px",
|
|
1275
|
-
left: this.state.left + "px"
|
|
1276
|
-
}
|
|
1277
|
-
},
|
|
1278
|
-
/* @__PURE__ */ a.createElement(Me, { className: "k-drag-status", name: n, icon: n === "k-i-cancel" ? Cr : xr }),
|
|
1279
|
-
this.state.innerText
|
|
1280
|
-
),
|
|
1281
|
-
t && t.ownerDocument ? t.ownerDocument.body : document.body
|
|
1282
|
-
);
|
|
1283
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, r, /* @__PURE__ */ a.createElement("div", { ref: this.hiddenElementRef, style: { display: "none" } }));
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
class So extends a.PureComponent {
|
|
1287
|
-
constructor(t) {
|
|
1288
|
-
super(t), this.state = {
|
|
1289
|
-
height: 0,
|
|
1290
|
-
visible: !1,
|
|
1291
|
-
left: 0,
|
|
1292
|
-
top: 0
|
|
1293
|
-
}, this.hiddenElementRef = a.createRef();
|
|
1294
|
-
}
|
|
1295
|
-
render() {
|
|
1296
|
-
const t = this.hiddenElementRef.current, n = this.state.visible && Wt && Qt(
|
|
1297
|
-
/* @__PURE__ */ a.createElement(
|
|
1298
|
-
"div",
|
|
1299
|
-
{
|
|
1300
|
-
className: "k-grouping-dropclue",
|
|
1301
|
-
style: {
|
|
1302
|
-
zIndex: 1e4,
|
|
1303
|
-
display: "block",
|
|
1304
|
-
top: this.state.top + "px",
|
|
1305
|
-
left: this.state.left + "px",
|
|
1306
|
-
height: this.state.height + "px"
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
),
|
|
1310
|
-
t && t.ownerDocument ? t.ownerDocument.body : document.body
|
|
1311
|
-
);
|
|
1312
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, n, /* @__PURE__ */ a.createElement("div", { ref: this.hiddenElementRef, style: { display: "none" } }));
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
class jn extends a.Component {
|
|
1316
|
-
constructor() {
|
|
1317
|
-
super(...arguments), this.onChange = (t) => {
|
|
1318
|
-
this.props.onFilterChange.call(void 0, {
|
|
1319
|
-
nextFilter: { ...this.props.filter, value: t.value }
|
|
1320
|
-
});
|
|
1321
|
-
};
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* @hidden
|
|
1325
|
-
*/
|
|
1326
|
-
render() {
|
|
1327
|
-
const t = q(this), { ariaLabel: n = t.toLanguageString(nt, v[nt]) } = this.props;
|
|
1328
|
-
return /* @__PURE__ */ a.createElement(
|
|
1329
|
-
mr,
|
|
1330
|
-
{
|
|
1331
|
-
value: this.props.filter.value || "",
|
|
1332
|
-
onChange: this.onChange,
|
|
1333
|
-
"aria-label": n
|
|
1334
|
-
}
|
|
1335
|
-
);
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
jn.propTypes = {
|
|
1339
|
-
filter: p.object.isRequired,
|
|
1340
|
-
onFilterChange: p.func.isRequired,
|
|
1341
|
-
ariaLabel: p.string
|
|
1342
|
-
};
|
|
1343
|
-
W(jn);
|
|
1344
|
-
class Xn extends a.Component {
|
|
1345
|
-
constructor() {
|
|
1346
|
-
super(...arguments), this.onChange = (t) => {
|
|
1347
|
-
this.props.onFilterChange.call(void 0, {
|
|
1348
|
-
nextFilter: { ...this.props.filter, value: t.value }
|
|
1349
|
-
});
|
|
1350
|
-
};
|
|
1351
|
-
}
|
|
1352
|
-
/**
|
|
1353
|
-
* @hidden
|
|
1354
|
-
*/
|
|
1355
|
-
render() {
|
|
1356
|
-
const t = q(this), {
|
|
1357
|
-
min: n,
|
|
1358
|
-
max: r,
|
|
1359
|
-
filter: s,
|
|
1360
|
-
ariaLabel: o = t.toLanguageString(tt, v[tt])
|
|
1361
|
-
} = this.props;
|
|
1362
|
-
return /* @__PURE__ */ a.createElement(
|
|
1363
|
-
Re,
|
|
1364
|
-
{
|
|
1365
|
-
value: typeof s.value == "number" ? s.value : null,
|
|
1366
|
-
onChange: this.onChange,
|
|
1367
|
-
ariaLabel: o,
|
|
1368
|
-
"aria-valuemin": n,
|
|
1369
|
-
"aria-valuemax": r,
|
|
1370
|
-
min: n,
|
|
1371
|
-
max: r
|
|
1372
|
-
}
|
|
1373
|
-
);
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
Xn.propTypes = {
|
|
1377
|
-
filter: p.object.isRequired,
|
|
1378
|
-
onFilterChange: p.func.isRequired
|
|
1379
|
-
};
|
|
1380
|
-
W(Xn);
|
|
1381
|
-
class ps extends a.Component {
|
|
1382
|
-
constructor() {
|
|
1383
|
-
super(...arguments), this.onChange = (t) => {
|
|
1384
|
-
this.props.onFilterChange.call(void 0, {
|
|
1385
|
-
nextFilter: { ...this.props.filter, value: t.value }
|
|
1386
|
-
});
|
|
1387
|
-
};
|
|
1388
|
-
}
|
|
1389
|
-
/**
|
|
1390
|
-
* @hidden
|
|
1391
|
-
*/
|
|
1392
|
-
render() {
|
|
1393
|
-
const t = this.props.filter;
|
|
1394
|
-
return /* @__PURE__ */ a.createElement(
|
|
1395
|
-
vt,
|
|
1396
|
-
{
|
|
1397
|
-
value: t.value || null,
|
|
1398
|
-
onChange: this.onChange,
|
|
1399
|
-
ariaLabel: this.props.ariaLabel
|
|
1400
|
-
}
|
|
1401
|
-
);
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
ps.propTypes = {
|
|
1405
|
-
filter: p.object.isRequired,
|
|
1406
|
-
onFilterChange: p.func.isRequired,
|
|
1407
|
-
ariaLabel: p.string
|
|
1408
|
-
};
|
|
1409
|
-
class It extends a.Component {
|
|
1410
|
-
constructor() {
|
|
1411
|
-
super(...arguments), this.onChange = (t) => {
|
|
1412
|
-
this.props.onFilterChange.call(void 0, {
|
|
1413
|
-
nextFilter: { ...this.props.filter, value: t.value.value }
|
|
1414
|
-
});
|
|
1415
|
-
};
|
|
1416
|
-
}
|
|
1417
|
-
/**
|
|
1418
|
-
* @hidden
|
|
1419
|
-
*/
|
|
1420
|
-
render() {
|
|
1421
|
-
const t = q(this), {
|
|
1422
|
-
filter: n,
|
|
1423
|
-
data: r = [],
|
|
1424
|
-
defaultItem: s,
|
|
1425
|
-
ariaLabel: o = t.toLanguageString(et, v[et])
|
|
1426
|
-
} = this.props, i = r.map((l) => ({
|
|
1427
|
-
...l,
|
|
1428
|
-
text: t.toLanguageString(l.text, v[l.text] || l.text)
|
|
1429
|
-
}));
|
|
1430
|
-
return /* @__PURE__ */ a.createElement(
|
|
1431
|
-
$,
|
|
1432
|
-
{
|
|
1433
|
-
value: i.find((l) => l.value === n.value) || null,
|
|
1434
|
-
onChange: this.onChange,
|
|
1435
|
-
defaultItem: s,
|
|
1436
|
-
data: i,
|
|
1437
|
-
textField: "text",
|
|
1438
|
-
ariaLabel: o
|
|
1439
|
-
}
|
|
1440
|
-
);
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
It.propTypes = {
|
|
1444
|
-
filter: p.object.isRequired,
|
|
1445
|
-
onFilterChange: p.func.isRequired,
|
|
1446
|
-
data: p.arrayOf(p.shape({ text: p.string, value: p.any })),
|
|
1447
|
-
defaultItem: p.any,
|
|
1448
|
-
ariaLabel: p.string
|
|
1449
|
-
};
|
|
1450
|
-
W(It);
|
|
1451
|
-
class hs extends a.Component {
|
|
1452
|
-
constructor() {
|
|
1453
|
-
super(...arguments), this.data = [{ text: hn, value: !0 }, { text: gn, value: !1 }];
|
|
1454
|
-
}
|
|
1455
|
-
/**
|
|
1456
|
-
* @hidden
|
|
1457
|
-
*/
|
|
1458
|
-
render() {
|
|
1459
|
-
return /* @__PURE__ */ a.createElement(
|
|
1460
|
-
It,
|
|
1461
|
-
{
|
|
1462
|
-
filter: this.props.filter,
|
|
1463
|
-
onFilterChange: this.props.onFilterChange,
|
|
1464
|
-
data: this.props.data || this.data,
|
|
1465
|
-
defaultItem: this.props.defaultItem,
|
|
1466
|
-
ariaLabel: this.props.ariaLabel
|
|
1467
|
-
}
|
|
1468
|
-
);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
hs.propTypes = {
|
|
1472
|
-
filter: p.object.isRequired,
|
|
1473
|
-
onFilterChange: p.func.isRequired,
|
|
1474
|
-
data: p.arrayOf(p.shape({ text: p.string, value: p.any })),
|
|
1475
|
-
ariaLabel: p.string,
|
|
1476
|
-
defaultItem: p.any
|
|
1477
|
-
};
|
|
1478
|
-
const gs = [
|
|
1479
|
-
{ text: on, operator: "contains" },
|
|
1480
|
-
{ text: an, operator: "doesnotcontain" },
|
|
1481
|
-
{ text: de, operator: "eq" },
|
|
1482
|
-
{ text: pe, operator: "neq" },
|
|
1483
|
-
{ text: sn, operator: "startswith" },
|
|
1484
|
-
{ text: ln, operator: "endswith" },
|
|
1485
|
-
{ text: Le, operator: "isnull" },
|
|
1486
|
-
{ text: De, operator: "isnotnull" },
|
|
1487
|
-
{ text: nn, operator: "isempty" },
|
|
1488
|
-
{ text: rn, operator: "isnotempty" }
|
|
1489
|
-
], fs = [
|
|
1490
|
-
{ text: de, operator: "eq" },
|
|
1491
|
-
{ text: pe, operator: "neq" },
|
|
1492
|
-
{ text: cn, operator: "gte" },
|
|
1493
|
-
{ text: un, operator: "gt" },
|
|
1494
|
-
{ text: dn, operator: "lte" },
|
|
1495
|
-
{ text: pn, operator: "lt" },
|
|
1496
|
-
{ text: Le, operator: "isnull" },
|
|
1497
|
-
{ text: De, operator: "isnotnull" }
|
|
1498
|
-
], ms = [
|
|
1499
|
-
{ text: de, operator: "eq" },
|
|
1500
|
-
{ text: pe, operator: "neq" },
|
|
1501
|
-
{ text: fn, operator: "gte" },
|
|
1502
|
-
{ text: mn, operator: "gt" },
|
|
1503
|
-
{ text: vn, operator: "lt" },
|
|
1504
|
-
{ text: En, operator: "lte" },
|
|
1505
|
-
{ text: Le, operator: "isnull" },
|
|
1506
|
-
{ text: De, operator: "isnotnull" }
|
|
1507
|
-
], vs = [
|
|
1508
|
-
{ text: de, operator: "eq" },
|
|
1509
|
-
{ text: pe, operator: "neq" }
|
|
1510
|
-
];
|
|
1511
|
-
class Fo {
|
|
1512
|
-
/**
|
|
1513
|
-
* An array containing the operators for the TextFilter component.
|
|
1514
|
-
*
|
|
1515
|
-
* The operators are:
|
|
1516
|
-
*
|
|
1517
|
-
* - { text: 'filter.containsOperator', operator: 'contains' }
|
|
1518
|
-
* - { text: 'filter.notContainsOperator', operator: 'doesnotcontain' }
|
|
1519
|
-
* - { text: 'filter.eqOperator', operator: 'eq' }
|
|
1520
|
-
* - { text: 'filter.notEqOperator', operator: 'neq' }
|
|
1521
|
-
* - { text: 'filter.startsWithOperator', operator: 'startswith' }
|
|
1522
|
-
* - { text: 'filter.endsWithOperator', operator: 'endswith' }
|
|
1523
|
-
* - { text: 'filter.isNullOperator', operator: 'isnull' }
|
|
1524
|
-
* - { text: 'filter.isNotNullOperator', operator: 'isnotnull' }
|
|
1525
|
-
* - { text: 'filter.isEmptyOperator', operator: 'isempty' }
|
|
1526
|
-
* - { text: 'filter.isNotEmptyOperator', operator: 'isnotempty' }
|
|
1527
|
-
*/
|
|
1528
|
-
static get text() {
|
|
1529
|
-
return [...gs];
|
|
1530
|
-
}
|
|
1531
|
-
/**
|
|
1532
|
-
* An array containing the operators for the NumericFilter component.
|
|
1533
|
-
*
|
|
1534
|
-
* The operators are:
|
|
1535
|
-
*
|
|
1536
|
-
* - { text: 'filter.eqOperator', operator: 'eq' }
|
|
1537
|
-
* - { text: 'filter.notEqOperator', operator: 'neq' }
|
|
1538
|
-
* - { text: 'filter.gteOperator', operator: 'gte' }
|
|
1539
|
-
* - { text: 'filter.gtOperator', operator: 'gt' }
|
|
1540
|
-
* - { text: 'filter.lteOperator', operator: 'lte' }
|
|
1541
|
-
* - { text: 'filter.ltOperator', operator: 'lt' }
|
|
1542
|
-
* - { text: 'filter.isNullOperator', operator: 'isnull' }
|
|
1543
|
-
* - { text: 'filter.isNotNullOperator', operator: 'isnotnull' }
|
|
1544
|
-
*/
|
|
1545
|
-
static get numeric() {
|
|
1546
|
-
return [...fs];
|
|
1547
|
-
}
|
|
1548
|
-
/**
|
|
1549
|
-
* An array containing the operators for the DateFilter component.
|
|
1550
|
-
*
|
|
1551
|
-
* The operators are:
|
|
1552
|
-
*
|
|
1553
|
-
* - { text: 'filter.eqOperator', operator: 'eq' }
|
|
1554
|
-
* - { text: 'filter.notEqOperator', operator: 'neq' }
|
|
1555
|
-
* - { text: 'filter.afterOrEqualOperator', operator: 'gte' }
|
|
1556
|
-
* - { text: 'filter.afterOperator', operator: 'gt' }
|
|
1557
|
-
* - { text: 'filter.beforeOperator', operator: 'lt' }
|
|
1558
|
-
* - { text: 'filter.beforeOrEqualOperator', operator: 'lte' }
|
|
1559
|
-
* - { text: 'filter.isNullOperator', operator: 'isnull' }
|
|
1560
|
-
* - { text: 'filter.isNotNullOperator', operator: 'isnotnull' }
|
|
1561
|
-
*/
|
|
1562
|
-
static get date() {
|
|
1563
|
-
return [...ms];
|
|
1564
|
-
}
|
|
1565
|
-
/**
|
|
1566
|
-
* An array containing the operators for the BooleanFilter component.
|
|
1567
|
-
*
|
|
1568
|
-
* The operators are:
|
|
1569
|
-
*
|
|
1570
|
-
* - { text: 'filter.eqOperator', operator: 'eq' }
|
|
1571
|
-
* - { text: 'filter.notEqOperator', operator: 'neq' }
|
|
1572
|
-
*/
|
|
1573
|
-
static get boolean() {
|
|
1574
|
-
return [...vs];
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
const Zn = (e) => e === "contains" || e === "doesnotcontain" || e === "startswith" || e === "endswith", pt = (e) => e === "isnull" || e === "isnotnull" || e === "isempty" || e === "isnotempty", qt = (e) => {
|
|
1578
|
-
e.value === void 0 && !pt(e.operator) && (e.value = Zn(e.operator) ? "" : null);
|
|
1579
|
-
};
|
|
1580
|
-
class kt extends a.Component {
|
|
1581
|
-
constructor() {
|
|
1582
|
-
super(...arguments), this.onFieldChange = (t) => {
|
|
1583
|
-
const n = t.value.name, r = this.props.fields.find((l) => l.name === n), s = this.props.filter, o = r && !r.operators.some((l) => l.operator === s.operator) ? r.operators[0].operator : s.operator, i = {
|
|
1584
|
-
field: n,
|
|
1585
|
-
operator: o
|
|
1586
|
-
};
|
|
1587
|
-
qt(i), this.triggerOnFilterChange(s, i, t);
|
|
1588
|
-
}, this.onOperatorChange = (t) => {
|
|
1589
|
-
const n = t.value.operator, r = this.props.filter;
|
|
1590
|
-
let s;
|
|
1591
|
-
if (pt(n)) {
|
|
1592
|
-
let { value: o, ...i } = r;
|
|
1593
|
-
s = { ...i, operator: n };
|
|
1594
|
-
} else
|
|
1595
|
-
s = { ...r, operator: n };
|
|
1596
|
-
qt(s), this.triggerOnFilterChange(r, s, t);
|
|
1597
|
-
}, this.onInputChange = (t) => {
|
|
1598
|
-
const n = this.props.filter;
|
|
1599
|
-
let r = t.nextFilter;
|
|
1600
|
-
if (pt(r.operator)) {
|
|
1601
|
-
const s = this.props.fields.find((o) => o.name === r.field);
|
|
1602
|
-
r = { ...r, operator: s && s.operators[0].operator || r.operator };
|
|
1603
|
-
}
|
|
1604
|
-
this.triggerOnFilterChange(n, r, t);
|
|
1605
|
-
}, this.triggerOnFilterChange = (t, n, r) => {
|
|
1606
|
-
const s = {
|
|
1607
|
-
prevFilter: t,
|
|
1608
|
-
nextFilter: n,
|
|
1609
|
-
syntheticEvent: r.syntheticEvent,
|
|
1610
|
-
nativeEvent: r.nativeEvent,
|
|
1611
|
-
target: this
|
|
1612
|
-
};
|
|
1613
|
-
this.props.onChange.call(void 0, s);
|
|
1614
|
-
}, this.onFilterRemove = (t) => {
|
|
1615
|
-
const n = {
|
|
1616
|
-
filter: this.props.filter,
|
|
1617
|
-
syntheticEvent: t.syntheticEvent,
|
|
1618
|
-
nativeEvent: t.nativeEvent,
|
|
1619
|
-
target: this
|
|
1620
|
-
};
|
|
1621
|
-
this.props.onRemove.call(void 0, n);
|
|
1622
|
-
};
|
|
1623
|
-
}
|
|
1624
|
-
render() {
|
|
1625
|
-
const t = q(this), {
|
|
1626
|
-
fields: n,
|
|
1627
|
-
filter: r,
|
|
1628
|
-
ariaLabel: s = t.toLanguageString(Ze, v[Ze])
|
|
1629
|
-
} = this.props, o = n.find((l) => l.name === r.field), i = (o && o.operators || []).map((l) => ({ ...l, text: t.toLanguageString(l.text, v[l.text] || l.text) }));
|
|
1630
|
-
return /* @__PURE__ */ a.createElement("div", { className: "k-filter-toolbar" }, /* @__PURE__ */ a.createElement(Yt, { keyboardNavigation: !1, role: "toolbar", ariaLabel: s }, /* @__PURE__ */ a.createElement(He, { className: "k-filter-field" }, /* @__PURE__ */ a.createElement(
|
|
1631
|
-
$,
|
|
1632
|
-
{
|
|
1633
|
-
className: "k-filter-dropdown",
|
|
1634
|
-
data: n,
|
|
1635
|
-
textField: "label",
|
|
1636
|
-
value: n.find((l) => l.name === r.field),
|
|
1637
|
-
onChange: this.onFieldChange,
|
|
1638
|
-
ariaLabel: t.toLanguageString(Je, v[Je])
|
|
1639
|
-
}
|
|
1640
|
-
)), /* @__PURE__ */ a.createElement(He, { className: "k-filter-operator" }, /* @__PURE__ */ a.createElement(
|
|
1641
|
-
$,
|
|
1642
|
-
{
|
|
1643
|
-
data: i,
|
|
1644
|
-
textField: "text",
|
|
1645
|
-
value: i.find((l) => l.operator === r.operator),
|
|
1646
|
-
onChange: this.onOperatorChange,
|
|
1647
|
-
ariaLabel: t.toLanguageString(Qe, v[Qe])
|
|
1648
|
-
}
|
|
1649
|
-
)), /* @__PURE__ */ a.createElement(He, { className: "k-filter-value" }, o && /* @__PURE__ */ a.createElement(o.filter, { filter: r, onFilterChange: this.onInputChange, min: o.min, max: o.max })), /* @__PURE__ */ a.createElement(
|
|
1650
|
-
B,
|
|
1651
|
-
{
|
|
1652
|
-
className: "k-toolbar-button",
|
|
1653
|
-
title: t.toLanguageString(ce, v[ce]),
|
|
1654
|
-
icon: "x",
|
|
1655
|
-
svgIcon: Jt,
|
|
1656
|
-
fillMode: "flat",
|
|
1657
|
-
type: "button",
|
|
1658
|
-
onClick: this.onFilterRemove
|
|
1659
|
-
}
|
|
1660
|
-
)));
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
kt.propTypes = {
|
|
1664
|
-
filter: p.object.isRequired,
|
|
1665
|
-
fields: p.array.isRequired,
|
|
1666
|
-
ariaLabel: p.string,
|
|
1667
|
-
onChange: p.func.isRequired,
|
|
1668
|
-
onRemove: p.func.isRequired
|
|
1669
|
-
};
|
|
1670
|
-
W(kt);
|
|
1671
|
-
const Jn = class extends a.Component {
|
|
1672
|
-
constructor() {
|
|
1673
|
-
super(...arguments), this.onGroupRemove = (e) => {
|
|
1674
|
-
const t = {
|
|
1675
|
-
filter: this.props.filter,
|
|
1676
|
-
target: this,
|
|
1677
|
-
syntheticEvent: e,
|
|
1678
|
-
nativeEvent: e.nativeEvent
|
|
1679
|
-
};
|
|
1680
|
-
this.props.onRemove.call(void 0, t);
|
|
1681
|
-
}, this.onAddExpression = (e) => {
|
|
1682
|
-
const t = this.props.filter, n = this.props.fields[0], r = { field: n.name, operator: n.operators[0].operator };
|
|
1683
|
-
r.value = Zn(r.operator) ? "" : null;
|
|
1684
|
-
const s = {
|
|
1685
|
-
nextFilter: {
|
|
1686
|
-
...t,
|
|
1687
|
-
filters: [...t.filters, r]
|
|
1688
|
-
},
|
|
1689
|
-
prevFilter: t,
|
|
1690
|
-
target: this,
|
|
1691
|
-
syntheticEvent: e,
|
|
1692
|
-
nativeEvent: e.nativeEvent
|
|
1693
|
-
};
|
|
1694
|
-
this.props.onChange.call(void 0, s);
|
|
1695
|
-
}, this.onAddGroup = (e) => {
|
|
1696
|
-
const t = this.props.filter, n = {
|
|
1697
|
-
nextFilter: { ...t, filters: [...t.filters, { ...this.props.defaultGroupFilter }] },
|
|
1698
|
-
prevFilter: t,
|
|
1699
|
-
target: this,
|
|
1700
|
-
syntheticEvent: e,
|
|
1701
|
-
nativeEvent: e.nativeEvent
|
|
1702
|
-
};
|
|
1703
|
-
this.props.onChange.call(void 0, n);
|
|
1704
|
-
}, this.onLogicAnd = (e) => this.changeLogic("and", e), this.onLogicOr = (e) => this.changeLogic("or", e), this.changeLogic = (e, t) => {
|
|
1705
|
-
const n = this.props.filter;
|
|
1706
|
-
if (n.logic !== e) {
|
|
1707
|
-
const r = {
|
|
1708
|
-
nextFilter: { ...n, logic: e },
|
|
1709
|
-
prevFilter: n,
|
|
1710
|
-
target: this,
|
|
1711
|
-
syntheticEvent: t,
|
|
1712
|
-
nativeEvent: t.nativeEvent
|
|
1713
|
-
};
|
|
1714
|
-
this.props.onChange.call(void 0, r);
|
|
1715
|
-
}
|
|
1716
|
-
}, this.replaceFilter = (e, t) => {
|
|
1717
|
-
const n = this.props.filter, r = n.filters.map((s) => s === e ? t : s);
|
|
1718
|
-
return { ...n, filters: r };
|
|
1719
|
-
}, this.onChange = (e) => {
|
|
1720
|
-
const n = {
|
|
1721
|
-
nextFilter: this.replaceFilter(e.prevFilter, e.nextFilter),
|
|
1722
|
-
prevFilter: this.props.filter,
|
|
1723
|
-
syntheticEvent: e.syntheticEvent,
|
|
1724
|
-
nativeEvent: e.nativeEvent,
|
|
1725
|
-
target: this
|
|
1726
|
-
};
|
|
1727
|
-
this.props.onChange.call(void 0, n);
|
|
1728
|
-
}, this.onRemove = (e) => {
|
|
1729
|
-
const t = this.props.filter, n = t.filters.filter((s) => s !== e.filter), r = {
|
|
1730
|
-
nextFilter: { ...t, filters: n },
|
|
1731
|
-
prevFilter: t,
|
|
1732
|
-
syntheticEvent: e.syntheticEvent,
|
|
1733
|
-
nativeEvent: e.nativeEvent,
|
|
1734
|
-
target: this
|
|
1735
|
-
};
|
|
1736
|
-
this.props.onChange.call(void 0, r);
|
|
1737
|
-
};
|
|
1738
|
-
}
|
|
1739
|
-
render() {
|
|
1740
|
-
const e = q(this), {
|
|
1741
|
-
fields: t,
|
|
1742
|
-
filter: n,
|
|
1743
|
-
ariaLabel: r = e.toLanguageString(Xe, v[Xe])
|
|
1744
|
-
} = this.props;
|
|
1745
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", { className: "k-filter-toolbar" }, /* @__PURE__ */ a.createElement(Yt, { keyboardNavigation: !1, role: "toolbar", ariaLabel: r }, /* @__PURE__ */ a.createElement(gr, { className: "k-toolbar-button-group" }, /* @__PURE__ */ a.createElement(B, { className: "k-toolbar-button", togglable: !0, onClick: this.onLogicAnd, selected: n.logic === "and", type: "button" }, e.toLanguageString(Ue, v[Ue])), /* @__PURE__ */ a.createElement(B, { className: "k-toolbar-button", togglable: !0, onClick: this.onLogicOr, selected: n.logic === "or", type: "button" }, e.toLanguageString(je, v[je]))), /* @__PURE__ */ a.createElement(
|
|
1746
|
-
B,
|
|
1747
|
-
{
|
|
1748
|
-
className: "k-toolbar-button",
|
|
1749
|
-
title: e.toLanguageString(ae, v[ae]),
|
|
1750
|
-
icon: "filter-add-expression",
|
|
1751
|
-
svgIcon: br,
|
|
1752
|
-
type: "button",
|
|
1753
|
-
onClick: this.onAddExpression
|
|
1754
|
-
},
|
|
1755
|
-
e.toLanguageString(ae, v[ae])
|
|
1756
|
-
), /* @__PURE__ */ a.createElement(
|
|
1757
|
-
B,
|
|
1758
|
-
{
|
|
1759
|
-
className: "k-toolbar-button",
|
|
1760
|
-
title: e.toLanguageString(ie, v[ie]),
|
|
1761
|
-
icon: "filter-add-group",
|
|
1762
|
-
svgIcon: yr,
|
|
1763
|
-
type: "button",
|
|
1764
|
-
onClick: this.onAddGroup
|
|
1765
|
-
},
|
|
1766
|
-
e.toLanguageString(ie, v[ie])
|
|
1767
|
-
), /* @__PURE__ */ a.createElement(
|
|
1768
|
-
B,
|
|
1769
|
-
{
|
|
1770
|
-
className: "k-toolbar-button",
|
|
1771
|
-
title: e.toLanguageString(ce, v[ce]),
|
|
1772
|
-
icon: "x",
|
|
1773
|
-
svgIcon: Jt,
|
|
1774
|
-
fillMode: "flat",
|
|
1775
|
-
type: "button",
|
|
1776
|
-
onClick: this.onGroupRemove
|
|
1777
|
-
}
|
|
1778
|
-
))), n.filters.length > 0 && /* @__PURE__ */ a.createElement("ul", { role: "group", className: "k-filter-lines" }, n.filters.map(
|
|
1779
|
-
(s, o) => /* @__PURE__ */ a.createElement("li", { role: "treeitem", key: o, className: "k-filter-item" }, en(s) ? /* @__PURE__ */ a.createElement(
|
|
1780
|
-
Jn,
|
|
1781
|
-
{
|
|
1782
|
-
filter: s,
|
|
1783
|
-
fields: t,
|
|
1784
|
-
onChange: this.onChange,
|
|
1785
|
-
onRemove: this.onRemove,
|
|
1786
|
-
defaultGroupFilter: this.props.defaultGroupFilter,
|
|
1787
|
-
ariaLabel: this.props.ariaLabel,
|
|
1788
|
-
ariaLabelExpression: this.props.ariaLabelExpression
|
|
1789
|
-
}
|
|
1790
|
-
) : /* @__PURE__ */ a.createElement(
|
|
1791
|
-
kt,
|
|
1792
|
-
{
|
|
1793
|
-
filter: s,
|
|
1794
|
-
fields: t,
|
|
1795
|
-
ariaLabel: this.props.ariaLabelExpression,
|
|
1796
|
-
onChange: this.onChange,
|
|
1797
|
-
onRemove: this.onRemove
|
|
1798
|
-
}
|
|
1799
|
-
))
|
|
1800
|
-
)));
|
|
1801
|
-
}
|
|
1802
|
-
};
|
|
1803
|
-
let St = Jn;
|
|
1804
|
-
St.propTypes = {
|
|
1805
|
-
filter: p.object.isRequired,
|
|
1806
|
-
fields: p.array.isRequired,
|
|
1807
|
-
ariaLabel: p.string,
|
|
1808
|
-
ariaLabelExpression: p.string,
|
|
1809
|
-
onChange: p.func.isRequired,
|
|
1810
|
-
onRemove: p.func.isRequired,
|
|
1811
|
-
defaultGroupFilter: p.object.isRequired
|
|
1812
|
-
};
|
|
1813
|
-
W(St);
|
|
1814
|
-
class Es extends a.Component {
|
|
1815
|
-
constructor(t) {
|
|
1816
|
-
super(t), this.onFilterChange = (n) => {
|
|
1817
|
-
const r = {
|
|
1818
|
-
filter: n.nextFilter,
|
|
1819
|
-
syntheticEvent: n.syntheticEvent,
|
|
1820
|
-
nativeEvent: n.nativeEvent,
|
|
1821
|
-
target: this
|
|
1822
|
-
};
|
|
1823
|
-
this.props.onChange.call(void 0, r);
|
|
1824
|
-
}, this.onGroupRemove = (n) => {
|
|
1825
|
-
const r = {
|
|
1826
|
-
filter: { ...this.props.value, filters: [] },
|
|
1827
|
-
syntheticEvent: n.syntheticEvent,
|
|
1828
|
-
nativeEvent: n.nativeEvent,
|
|
1829
|
-
target: this
|
|
1830
|
-
};
|
|
1831
|
-
this.props.onChange.call(void 0, r);
|
|
1832
|
-
}, gt(Et);
|
|
1833
|
-
}
|
|
1834
|
-
/**
|
|
1835
|
-
* @hidden
|
|
1836
|
-
*/
|
|
1837
|
-
render() {
|
|
1838
|
-
return /* @__PURE__ */ a.createElement(
|
|
1839
|
-
"div",
|
|
1840
|
-
{
|
|
1841
|
-
className: H(
|
|
1842
|
-
"k-filter",
|
|
1843
|
-
this.props.className
|
|
1844
|
-
),
|
|
1845
|
-
style: this.props.style
|
|
1846
|
-
},
|
|
1847
|
-
/* @__PURE__ */ a.createElement("ul", { role: "tree", className: "k-filter-container", "aria-label": this.props.ariaLabel }, /* @__PURE__ */ a.createElement("li", { role: "treeitem", className: "k-filter-group-main" }, /* @__PURE__ */ a.createElement(
|
|
1848
|
-
St,
|
|
1849
|
-
{
|
|
1850
|
-
filter: this.props.value,
|
|
1851
|
-
fields: this.props.fields,
|
|
1852
|
-
ariaLabel: this.props.ariaLabelGroup,
|
|
1853
|
-
ariaLabelExpression: this.props.ariaLabelExpression,
|
|
1854
|
-
onChange: this.onFilterChange,
|
|
1855
|
-
onRemove: this.onGroupRemove,
|
|
1856
|
-
defaultGroupFilter: this.props.defaultGroupFilter || { logic: "and", filters: [] }
|
|
1857
|
-
}
|
|
1858
|
-
)))
|
|
1859
|
-
);
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
Es.propTypes = {
|
|
1863
|
-
className: p.string,
|
|
1864
|
-
style: p.object,
|
|
1865
|
-
fields: function(e, t) {
|
|
1866
|
-
const n = e[t];
|
|
1867
|
-
if (n === void 0)
|
|
1868
|
-
return new Error(`Property '${t}' is missing.`);
|
|
1869
|
-
if (Array.isArray(n)) {
|
|
1870
|
-
if (Object.keys(n.reduce((r, s) => ({ ...r, [s.name]: 1 }), {})).length !== n.length)
|
|
1871
|
-
return new Error(`Property '${t}' needs to contain objects with unique 'name' field.`);
|
|
1872
|
-
} else
|
|
1873
|
-
return new Error(`Property '${t}' needs to be Array<FieldSettings>.`);
|
|
1874
|
-
return null;
|
|
1875
|
-
},
|
|
1876
|
-
ariaLabelGroup: p.string,
|
|
1877
|
-
ariaLabelExpression: p.string,
|
|
1878
|
-
value: p.object.isRequired,
|
|
1879
|
-
onChange: p.func.isRequired
|
|
1880
|
-
};
|
|
1881
|
-
const We = (e) => /* @__PURE__ */ a.createElement(
|
|
1882
|
-
"div",
|
|
1883
|
-
{
|
|
1884
|
-
onClick: e.onClick,
|
|
1885
|
-
className: H(
|
|
1886
|
-
"k-columnmenu-item",
|
|
1887
|
-
{ "k-selected": e.selected },
|
|
1888
|
-
{ "k-disabled": e.disabled }
|
|
1889
|
-
)
|
|
1890
|
-
},
|
|
1891
|
-
(e.iconClass || e.svgIcon) && /* @__PURE__ */ a.createElement(Me, { name: e.iconClass ? ir(e.iconClass) : void 0, icon: e.svgIcon }),
|
|
1892
|
-
e.title
|
|
1893
|
-
), Cs = [
|
|
1894
|
-
{ text: yn, operator: "contains" },
|
|
1895
|
-
{ text: In, operator: "doesnotcontain" },
|
|
1896
|
-
{ text: we, operator: "eq" },
|
|
1897
|
-
{ text: Oe, operator: "neq" },
|
|
1898
|
-
{ text: bn, operator: "startswith" },
|
|
1899
|
-
{ text: kn, operator: "endswith" },
|
|
1900
|
-
{ text: Ne, operator: "isnull" },
|
|
1901
|
-
{ text: Ae, operator: "isnotnull" },
|
|
1902
|
-
{ text: Cn, operator: "isempty" },
|
|
1903
|
-
{ text: xn, operator: "isnotempty" }
|
|
1904
|
-
], xs = [
|
|
1905
|
-
{ text: we, operator: "eq" },
|
|
1906
|
-
{ text: Oe, operator: "neq" },
|
|
1907
|
-
{ text: Sn, operator: "gte" },
|
|
1908
|
-
{ text: Fn, operator: "gt" },
|
|
1909
|
-
{ text: Mn, operator: "lte" },
|
|
1910
|
-
{ text: Rn, operator: "lt" },
|
|
1911
|
-
{ text: Ne, operator: "isnull" },
|
|
1912
|
-
{ text: Ae, operator: "isnotnull" }
|
|
1913
|
-
], bs = [
|
|
1914
|
-
{ text: we, operator: "eq" },
|
|
1915
|
-
{ text: Oe, operator: "neq" },
|
|
1916
|
-
{ text: Dn, operator: "gte" },
|
|
1917
|
-
{ text: wn, operator: "gt" },
|
|
1918
|
-
{ text: On, operator: "lt" },
|
|
1919
|
-
{ text: Nn, operator: "lte" },
|
|
1920
|
-
{ text: Ne, operator: "isnull" },
|
|
1921
|
-
{ text: Ae, operator: "isnotnull" }
|
|
1922
|
-
], ys = [
|
|
1923
|
-
{ text: Ln, operator: "" }
|
|
1924
|
-
];
|
|
1925
|
-
class Be {
|
|
1926
|
-
/**
|
|
1927
|
-
* An array containing the operators for the ColumnMenuTextFilter component.
|
|
1928
|
-
*
|
|
1929
|
-
* The operators are:
|
|
1930
|
-
*
|
|
1931
|
-
* - { text: 'columnMenu.filterContainsOperator', operator: 'contains' }
|
|
1932
|
-
* - { text: 'columnMenu.filterNotContainsOperator', operator: 'doesnotcontain' }
|
|
1933
|
-
* - { text: 'columnMenu.filterEqOperator', operator: 'eq' }
|
|
1934
|
-
* - { text: 'columnMenu.filterNotEqOperator', operator: 'neq' }
|
|
1935
|
-
* - { text: 'columnMenu.filterStartsWithOperator', operator: 'startswith' }
|
|
1936
|
-
* - { text: 'columnMenu.filterEndsWithOperator', operator: 'endswith' }
|
|
1937
|
-
* - { text: 'columnMenu.filterIsNullOperator', operator: 'isnull' }
|
|
1938
|
-
* - { text: 'columnMenu.filterIsNotNullOperator', operator: 'isnotnull' }
|
|
1939
|
-
* - { text: 'columnMenu.filterIsEmptyOperator', operator: 'isempty' }
|
|
1940
|
-
* - { text: 'columnMenu.filterIsNotEmptyOperator', operator: 'isnotempty' }
|
|
1941
|
-
*/
|
|
1942
|
-
static get text() {
|
|
1943
|
-
return [...Cs];
|
|
1944
|
-
}
|
|
1945
|
-
/**
|
|
1946
|
-
* An array containing the operators for the ColumnMenuNumericFilter component.
|
|
1947
|
-
*
|
|
1948
|
-
* The operators are:
|
|
1949
|
-
*
|
|
1950
|
-
* - { text: 'columnMenu.filterEqOperator', operator: 'eq' }
|
|
1951
|
-
* - { text: 'columnMenu.filterNotEqOperator', operator: 'neq' }
|
|
1952
|
-
* - { text: 'columnMenu.filterGteOperator', operator: 'gte' }
|
|
1953
|
-
* - { text: 'columnMenu.filterGtOperator', operator: 'gt' }
|
|
1954
|
-
* - { text: 'columnMenu.filterLteOperator', operator: 'lte' }
|
|
1955
|
-
* - { text: 'columnMenu.filterLtOperator', operator: 'lt' }
|
|
1956
|
-
* - { text: 'columnMenu.filterIsNullOperator', operator: 'isnull' }
|
|
1957
|
-
* - { text: 'columnMenu.filterIsNotNullOperator', operator: 'isnotnull' }
|
|
1958
|
-
*/
|
|
1959
|
-
static get numeric() {
|
|
1960
|
-
return [...xs];
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* An array containing the operators for the ColumnMenuDateFilter component.
|
|
1964
|
-
*
|
|
1965
|
-
* The operators are:
|
|
1966
|
-
*
|
|
1967
|
-
* - { text: 'columnMenu.filterEqOperator', operator: 'eq' }
|
|
1968
|
-
* - { text: 'columnMenu.filterNotEqOperator', operator: 'neq' }
|
|
1969
|
-
* - { text: 'columnMenu.filterAfterOrEqualOperator', operator: 'gte' }
|
|
1970
|
-
* - { text: 'columnMenu.filterAfterOperator', operator: 'gt' }
|
|
1971
|
-
* - { text: 'columnMenu.filterBeforeOperator', operator: 'lt' }
|
|
1972
|
-
* - { text: 'columnMenu.filterBeforeOrEqualOperator', operator: 'lte' }
|
|
1973
|
-
* - { text: 'columnMenu.filterIsNullOperator', operator: 'isnull' }
|
|
1974
|
-
* - { text: 'columnMenu.filterIsNotNullOperator', operator: 'isnotnull' }
|
|
1975
|
-
*/
|
|
1976
|
-
static get date() {
|
|
1977
|
-
return [...bs];
|
|
1978
|
-
}
|
|
1979
|
-
/**
|
|
1980
|
-
* An array containing the operators for the ColumnMenuBooleanFilter component.
|
|
1981
|
-
*
|
|
1982
|
-
* The operators are:
|
|
1983
|
-
*
|
|
1984
|
-
* - { text: 'columnMenu.filterIsTrue', operator: '' }
|
|
1985
|
-
*/
|
|
1986
|
-
static get boolean() {
|
|
1987
|
-
return [...ys];
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
const Ft = (e) => {
|
|
1991
|
-
const { filter: t, onFilterChange: n, operators: r, initialFilter: s } = e, o = a.useCallback(
|
|
1992
|
-
(u) => {
|
|
1993
|
-
const d = t, h = u.target.value.operator, m = d ? { ...d, operator: h } : { value: s.value, operator: h };
|
|
1994
|
-
n.call(void 0, u.syntheticEvent, m, d);
|
|
1995
|
-
},
|
|
1996
|
-
[t, n, s]
|
|
1997
|
-
), i = a.useCallback(
|
|
1998
|
-
(u) => {
|
|
1999
|
-
const d = u.target.value, h = t, m = h ? { ...h, value: d } : { value: d, operator: r[0].operator };
|
|
2000
|
-
n.call(void 0, u, m, h);
|
|
2001
|
-
},
|
|
2002
|
-
[t, n, r]
|
|
2003
|
-
), l = Q(), c = r.map((u) => ({ ...u, text: l.toLanguageString(u.text, v[u.text]) }));
|
|
2004
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
2005
|
-
$,
|
|
2006
|
-
{
|
|
2007
|
-
value: c.find((u) => u.operator === t.operator) || null,
|
|
2008
|
-
onChange: o,
|
|
2009
|
-
data: c,
|
|
2010
|
-
textField: "text"
|
|
2011
|
-
}
|
|
2012
|
-
), /* @__PURE__ */ a.createElement(
|
|
2013
|
-
e.input,
|
|
2014
|
-
{
|
|
2015
|
-
value: t.value,
|
|
2016
|
-
onChange: i
|
|
2017
|
-
}
|
|
2018
|
-
));
|
|
2019
|
-
}, Is = (e) => {
|
|
2020
|
-
const { filter: t, onFilterChange: n } = e, r = a.useCallback(
|
|
2021
|
-
(o) => n.call(void 0, o.syntheticEvent, { ...t, value: o.value }, t),
|
|
2022
|
-
[t, n]
|
|
2023
|
-
), s = Be.boolean[0].text;
|
|
2024
|
-
return /* @__PURE__ */ a.createElement(
|
|
2025
|
-
vr,
|
|
2026
|
-
{
|
|
2027
|
-
onChange: r,
|
|
2028
|
-
checked: t.value,
|
|
2029
|
-
label: Q().toLanguageString(s, v[s]),
|
|
2030
|
-
labelPlacement: "after"
|
|
2031
|
-
}
|
|
2032
|
-
);
|
|
2033
|
-
}, Gt = (e) => {
|
|
2034
|
-
const t = a.useCallback((s) => /* @__PURE__ */ a.createElement(jt, { ...s, value: s.value || "" }), []), n = a.useRef(Be.text), r = a.useRef({ operator: "", value: "" });
|
|
2035
|
-
return /* @__PURE__ */ a.createElement(
|
|
2036
|
-
Ft,
|
|
2037
|
-
{
|
|
2038
|
-
initialFilter: r.current,
|
|
2039
|
-
input: t,
|
|
2040
|
-
operators: e.operators || n.current,
|
|
2041
|
-
...e
|
|
2042
|
-
}
|
|
2043
|
-
);
|
|
2044
|
-
}, zt = (e) => {
|
|
2045
|
-
const t = a.useCallback((s) => /* @__PURE__ */ a.createElement(Re, { ...s, value: s.value || null }), []), n = a.useRef(Be.numeric), r = a.useRef({ operator: "", value: null });
|
|
2046
|
-
return /* @__PURE__ */ a.createElement(
|
|
2047
|
-
Ft,
|
|
2048
|
-
{
|
|
2049
|
-
initialFilter: r.current,
|
|
2050
|
-
input: t,
|
|
2051
|
-
operators: e.operators || n.current,
|
|
2052
|
-
...e
|
|
2053
|
-
}
|
|
2054
|
-
);
|
|
2055
|
-
}, _t = (e) => {
|
|
2056
|
-
const t = a.useCallback((s) => /* @__PURE__ */ a.createElement(vt, { ...s, value: s.value || null }), []), n = a.useRef(Be.date), r = a.useRef({ operator: "", value: null });
|
|
2057
|
-
return /* @__PURE__ */ a.createElement(
|
|
2058
|
-
Ft,
|
|
2059
|
-
{
|
|
2060
|
-
initialFilter: r.current,
|
|
2061
|
-
input: t,
|
|
2062
|
-
operators: e.operators || n.current,
|
|
2063
|
-
...e
|
|
2064
|
-
}
|
|
2065
|
-
);
|
|
2066
|
-
}, ks = [{ text: An, logic: "and" }, { text: Pn, logic: "or" }], Mt = (e) => {
|
|
2067
|
-
const t = Q(), n = (e.data || ks).map((r) => ({ ...r, text: t.toLanguageString(r.text, v[r.text]) }));
|
|
2068
|
-
return /* @__PURE__ */ a.createElement(
|
|
2069
|
-
$,
|
|
2070
|
-
{
|
|
2071
|
-
onChange: e.onChange,
|
|
2072
|
-
className: "k-filter-and",
|
|
2073
|
-
textField: "text",
|
|
2074
|
-
...e,
|
|
2075
|
-
data: n,
|
|
2076
|
-
value: n.find((r) => r.logic === e.value)
|
|
2077
|
-
}
|
|
2078
|
-
);
|
|
2079
|
-
}, Ss = (e) => /* @__PURE__ */ a.createElement("div", { className: "k-columnmenu-item-content" }, /* @__PURE__ */ a.createElement(Fr, { style: { position: "relative", display: "block" } }, e.show && /* @__PURE__ */ a.createElement("div", { className: "kendo-grid-filter-menu-container" }, /* @__PURE__ */ a.createElement(
|
|
2080
|
-
"form",
|
|
2081
|
-
{
|
|
2082
|
-
className: "k-filter-menu",
|
|
2083
|
-
onSubmit: e.onSubmit,
|
|
2084
|
-
onReset: e.onReset
|
|
2085
|
-
},
|
|
2086
|
-
/* @__PURE__ */ a.createElement("div", { className: "k-filter-menu-container" }, e.children, /* @__PURE__ */ a.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, e.actions))
|
|
2087
|
-
)))), Fs = (e) => {
|
|
2088
|
-
const t = Q();
|
|
2089
|
-
return /* @__PURE__ */ a.createElement(
|
|
2090
|
-
Ss,
|
|
2091
|
-
{
|
|
2092
|
-
...e,
|
|
2093
|
-
actions: /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
2094
|
-
B,
|
|
2095
|
-
{
|
|
2096
|
-
type: "reset"
|
|
2097
|
-
},
|
|
2098
|
-
t.toLanguageString(rt, v[rt])
|
|
2099
|
-
), /* @__PURE__ */ a.createElement(
|
|
2100
|
-
B,
|
|
2101
|
-
{
|
|
2102
|
-
themeColor: "primary"
|
|
2103
|
-
},
|
|
2104
|
-
t.toLanguageString(st, v[st])
|
|
2105
|
-
))
|
|
2106
|
-
}
|
|
2107
|
-
);
|
|
2108
|
-
}, qe = (e) => {
|
|
2109
|
-
gt(Et);
|
|
2110
|
-
const t = a.useRef([]), {
|
|
2111
|
-
field: n,
|
|
2112
|
-
filter: r,
|
|
2113
|
-
sort: s = t.current,
|
|
2114
|
-
onSortChange: o,
|
|
2115
|
-
onFilterChange: i,
|
|
2116
|
-
initialFilter: l,
|
|
2117
|
-
sortAsc: c = !1,
|
|
2118
|
-
sortDesc: u = !1,
|
|
2119
|
-
filterContent: d = [],
|
|
2120
|
-
expandFilters: h = !1
|
|
2121
|
-
} = e, [m, g] = a.useState(!1), [E, b] = a.useState(h), [C, f] = a.useState(n && l ? l(n) : null), I = a.useRef(null), F = a.useRef(null), S = a.useRef(null), x = a.useRef(!1), y = a.useCallback(
|
|
2122
|
-
() => (r || []).find((M) => M.filters.every((w) => !en(w) && w.field === n)),
|
|
2123
|
-
[r, n]
|
|
2124
|
-
), k = a.useCallback(
|
|
2125
|
-
() => {
|
|
2126
|
-
g(!1);
|
|
2127
|
-
},
|
|
2128
|
-
[]
|
|
2129
|
-
), A = a.useCallback(
|
|
2130
|
-
() => {
|
|
2131
|
-
if (x.current) {
|
|
2132
|
-
x.current = !1;
|
|
2133
|
-
return;
|
|
2134
|
-
}
|
|
2135
|
-
clearTimeout(S.current), S.current = window.setTimeout(() => {
|
|
2136
|
-
k();
|
|
2137
|
-
});
|
|
2138
|
-
},
|
|
2139
|
-
[k]
|
|
2140
|
-
), P = a.useCallback(
|
|
2141
|
-
() => clearTimeout(S.current),
|
|
2142
|
-
[]
|
|
2143
|
-
), T = a.useCallback((M) => {
|
|
2144
|
-
x.current = m && M.currentTarget === I.current;
|
|
2145
|
-
}, [m]), G = a.useCallback(
|
|
2146
|
-
() => {
|
|
2147
|
-
g(!m), n && l && (b(m ? !1 : h), f(m ? C : y() || l(n)));
|
|
2148
|
-
},
|
|
2149
|
-
[y, n, m, C, l, h]
|
|
2150
|
-
);
|
|
2151
|
-
a.useEffect(
|
|
2152
|
-
() => {
|
|
2153
|
-
m && F.current && F.current.focus();
|
|
2154
|
-
},
|
|
2155
|
-
[m]
|
|
2156
|
-
);
|
|
2157
|
-
const D = a.useCallback(
|
|
2158
|
-
() => b(!E),
|
|
2159
|
-
[E]
|
|
2160
|
-
), L = a.useCallback(
|
|
2161
|
-
(M, w) => {
|
|
2162
|
-
const O = [...s], N = O.findIndex((ar) => ar.field === n), oe = { field: n, dir: w };
|
|
2163
|
-
N >= 0 ? O[N].dir !== oe.dir ? O.splice(N, 1, oe) : O.splice(N, 1) : O.push(oe), k(), o && o.call(void 0, M, O, n);
|
|
2164
|
-
},
|
|
2165
|
-
[s, n, o, k]
|
|
2166
|
-
), V = a.useCallback(
|
|
2167
|
-
(M, w, O) => {
|
|
2168
|
-
const N = { ...C, filters: [...C.filters] }, oe = N.filters.indexOf(O);
|
|
2169
|
-
N.filters.splice(oe, 1, w), f(N);
|
|
2170
|
-
},
|
|
2171
|
-
[C]
|
|
2172
|
-
), Z = a.useCallback(
|
|
2173
|
-
(M) => {
|
|
2174
|
-
M.preventDefault();
|
|
2175
|
-
const w = (r || []).slice(), O = y(), N = O ? w.indexOf(O) : -1;
|
|
2176
|
-
N >= 0 ? w.splice(N, 1, C) : w.push(C), k(), i && i.call(void 0, M, w, n);
|
|
2177
|
-
},
|
|
2178
|
-
[r, C, n, i, k, y]
|
|
2179
|
-
), he = a.useCallback(
|
|
2180
|
-
(M) => {
|
|
2181
|
-
const w = (r || []).slice(), O = y(), N = O ? w.indexOf(O) : -1;
|
|
2182
|
-
N >= 0 && w.splice(N, 1), l && f(l(n)), k(), i && i.call(void 0, M, w, n);
|
|
2183
|
-
},
|
|
2184
|
-
[r, n, i, l, k, y]
|
|
2185
|
-
), Ge = a.useCallback((M) => L(M, "asc"), [L]), ge = a.useCallback((M) => L(M, "desc"), [L]), ze = a.useCallback(
|
|
2186
|
-
(M) => C && f({ ...C, logic: M.value.logic }),
|
|
2187
|
-
[C]
|
|
2188
|
-
), te = s.find((M) => M.field === n) || { dir: "" }, [
|
|
2189
|
-
ne,
|
|
2190
|
-
re,
|
|
2191
|
-
se
|
|
2192
|
-
] = d, _e = Q(), nr = c || u ? /* @__PURE__ */ a.createElement("div", { className: "k-columnmenu-item-wrapper", key: "sorting" }, c && /* @__PURE__ */ a.createElement(
|
|
2193
|
-
We,
|
|
2194
|
-
{
|
|
2195
|
-
title: _e.toLanguageString(at, v[at]),
|
|
2196
|
-
iconClass: "k-i-sort-asc-small",
|
|
2197
|
-
svgIcon: Xt,
|
|
2198
|
-
selected: te.dir === "asc",
|
|
2199
|
-
onClick: Ge
|
|
2200
|
-
}
|
|
2201
|
-
), u && /* @__PURE__ */ a.createElement(
|
|
2202
|
-
We,
|
|
2203
|
-
{
|
|
2204
|
-
title: _e.toLanguageString(it, v[it]),
|
|
2205
|
-
iconClass: "k-i-sort-desc-small",
|
|
2206
|
-
svgIcon: Zt,
|
|
2207
|
-
selected: te.dir === "desc",
|
|
2208
|
-
onClick: ge
|
|
2209
|
-
}
|
|
2210
|
-
)) : null, rr = C && d.length > 0 ? /* @__PURE__ */ a.createElement("div", { className: "k-columnmenu-item-wrapper", key: "filtering" }, /* @__PURE__ */ a.createElement(
|
|
2211
|
-
We,
|
|
2212
|
-
{
|
|
2213
|
-
iconClass: "k-i-filter",
|
|
2214
|
-
svgIcon: Ve,
|
|
2215
|
-
title: _e.toLanguageString(ot, v[ot]),
|
|
2216
|
-
onClick: D
|
|
2217
|
-
}
|
|
2218
|
-
), /* @__PURE__ */ a.createElement(
|
|
2219
|
-
Fs,
|
|
2220
|
-
{
|
|
2221
|
-
show: E,
|
|
2222
|
-
onSubmit: Z,
|
|
2223
|
-
onReset: he
|
|
2224
|
-
},
|
|
2225
|
-
ne && /* @__PURE__ */ a.createElement(ne, { filter: C.filters[0], onFilterChange: V }),
|
|
2226
|
-
re && /* @__PURE__ */ a.createElement(re, { value: C.logic, onChange: ze }),
|
|
2227
|
-
se && /* @__PURE__ */ a.createElement(se, { filter: C.filters[1], onFilterChange: V })
|
|
2228
|
-
)) : null, Lt = [nr, rr], sr = /* @__PURE__ */ a.createElement(
|
|
2229
|
-
"span",
|
|
2230
|
-
{
|
|
2231
|
-
ref: I,
|
|
2232
|
-
onClick: G,
|
|
2233
|
-
onMouseDown: T,
|
|
2234
|
-
className: "k-grid-header-menu k-grid-column-menu" + (y() ? " k-active" : ""),
|
|
2235
|
-
key: "button"
|
|
2236
|
-
},
|
|
2237
|
-
/* @__PURE__ */ a.createElement(Me, { name: "filter", icon: Ve })
|
|
2238
|
-
), or = /* @__PURE__ */ a.createElement(
|
|
2239
|
-
Sr,
|
|
2240
|
-
{
|
|
2241
|
-
anchor: I.current,
|
|
2242
|
-
show: m,
|
|
2243
|
-
key: "popup",
|
|
2244
|
-
popupClass: "k-column-menu k-column-menu-popup"
|
|
2245
|
-
},
|
|
2246
|
-
/* @__PURE__ */ a.createElement(
|
|
2247
|
-
"div",
|
|
2248
|
-
{
|
|
2249
|
-
ref: F,
|
|
2250
|
-
tabIndex: 0,
|
|
2251
|
-
onBlur: A,
|
|
2252
|
-
onFocus: P,
|
|
2253
|
-
style: { outline: "none" }
|
|
2254
|
-
},
|
|
2255
|
-
e.itemsRender ? e.itemsRender.call(void 0, Lt, { closeMenu: k, field: n }) : Lt
|
|
2256
|
-
)
|
|
2257
|
-
), Dt = [sr, or];
|
|
2258
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, e.render ? e.render.call(void 0, Dt) : Dt);
|
|
2259
|
-
}, Mo = (e) => {
|
|
2260
|
-
const { field: t, ...n } = e, r = a.useCallback(
|
|
2261
|
-
(i) => ({ logic: "and", filters: [{ operator: "contains", field: i, value: "" }, { operator: "contains", field: i, value: "" }] }),
|
|
2262
|
-
[]
|
|
2263
|
-
), s = !!e.field, o = s ? [
|
|
2264
|
-
Gt,
|
|
2265
|
-
Mt,
|
|
2266
|
-
Gt
|
|
2267
|
-
] : [];
|
|
2268
|
-
return /* @__PURE__ */ a.createElement(
|
|
2269
|
-
qe,
|
|
2270
|
-
{
|
|
2271
|
-
sortAsc: s,
|
|
2272
|
-
sortDesc: s,
|
|
2273
|
-
filterContent: o,
|
|
2274
|
-
initialFilter: s ? r : void 0,
|
|
2275
|
-
field: t,
|
|
2276
|
-
...n
|
|
2277
|
-
}
|
|
2278
|
-
);
|
|
2279
|
-
}, Ro = (e) => {
|
|
2280
|
-
const { field: t, ...n } = e, r = a.useCallback(
|
|
2281
|
-
(i) => ({ logic: "or", filters: [{ operator: "eq", field: i, value: null }, { operator: "eq", field: i, value: null }] }),
|
|
2282
|
-
[]
|
|
2283
|
-
), s = !!e.field, o = s ? [
|
|
2284
|
-
zt,
|
|
2285
|
-
Mt,
|
|
2286
|
-
zt
|
|
2287
|
-
] : [];
|
|
2288
|
-
return /* @__PURE__ */ a.createElement(
|
|
2289
|
-
qe,
|
|
2290
|
-
{
|
|
2291
|
-
sortAsc: s,
|
|
2292
|
-
sortDesc: s,
|
|
2293
|
-
filterContent: o,
|
|
2294
|
-
initialFilter: s ? r : void 0,
|
|
2295
|
-
field: t,
|
|
2296
|
-
...n
|
|
2297
|
-
}
|
|
2298
|
-
);
|
|
2299
|
-
}, Lo = (e) => {
|
|
2300
|
-
const { field: t, ...n } = e, r = a.useCallback(
|
|
2301
|
-
(i) => ({ logic: "or", filters: [{ operator: "eq", field: i, value: null }, { operator: "eq", field: i, value: null }] }),
|
|
2302
|
-
[]
|
|
2303
|
-
), s = !!e.field, o = s ? [
|
|
2304
|
-
_t,
|
|
2305
|
-
Mt,
|
|
2306
|
-
_t
|
|
2307
|
-
] : [];
|
|
2308
|
-
return /* @__PURE__ */ a.createElement(
|
|
2309
|
-
qe,
|
|
2310
|
-
{
|
|
2311
|
-
sortAsc: s,
|
|
2312
|
-
sortDesc: s,
|
|
2313
|
-
filterContent: o,
|
|
2314
|
-
initialFilter: s ? r : void 0,
|
|
2315
|
-
field: t,
|
|
2316
|
-
...n
|
|
2317
|
-
}
|
|
2318
|
-
);
|
|
2319
|
-
}, Do = (e) => {
|
|
2320
|
-
const { field: t, ...n } = e, r = a.useCallback(
|
|
2321
|
-
(i) => ({ logic: "and", filters: [{ operator: "eq", field: i, value: !1 }] }),
|
|
2322
|
-
[]
|
|
2323
|
-
), s = !!e.field, o = s ? [
|
|
2324
|
-
Is
|
|
2325
|
-
] : [];
|
|
2326
|
-
return /* @__PURE__ */ a.createElement(
|
|
2327
|
-
qe,
|
|
2328
|
-
{
|
|
2329
|
-
sortAsc: s,
|
|
2330
|
-
sortDesc: s,
|
|
2331
|
-
filterContent: o,
|
|
2332
|
-
initialFilter: s ? r : void 0,
|
|
2333
|
-
field: t,
|
|
2334
|
-
...n
|
|
2335
|
-
}
|
|
2336
|
-
);
|
|
2337
|
-
};
|
|
2338
|
-
function le(e, t, n) {
|
|
2339
|
-
return n ? { ...e, [t]: n.length ? [...n] : void 0 } : e && e[t] ? [...e[t]] : [];
|
|
2340
|
-
}
|
|
2341
|
-
function Qn(e, t, n) {
|
|
2342
|
-
if (e[n]) {
|
|
2343
|
-
let r = le(e, n, tn(le(e, n), t)), s = le(r, n).map((o) => Qn(o, t, n));
|
|
2344
|
-
return { ...r, [n]: s };
|
|
2345
|
-
}
|
|
2346
|
-
return e;
|
|
2347
|
-
}
|
|
2348
|
-
function wo(e, t, n) {
|
|
2349
|
-
let r = tn(e, t);
|
|
2350
|
-
return r = r.map((s) => Qn(s, t, n)), r;
|
|
2351
|
-
}
|
|
2352
|
-
function er(e, t, n) {
|
|
2353
|
-
let r = le(e, n);
|
|
2354
|
-
if (r && r.length) {
|
|
2355
|
-
r = r.map((l) => er(l, t, n));
|
|
2356
|
-
const i = kr(r, {
|
|
2357
|
-
filters: [
|
|
2358
|
-
{ filters: t, logic: "and" },
|
|
2359
|
-
{ operator: (l) => !!(l[n] || []).length }
|
|
2360
|
-
],
|
|
2361
|
-
logic: "or"
|
|
2362
|
-
});
|
|
2363
|
-
return le(e, n, i);
|
|
2364
|
-
}
|
|
2365
|
-
return e;
|
|
2366
|
-
}
|
|
2367
|
-
function Oo(e, t, n) {
|
|
2368
|
-
let r = { [n]: [...e] };
|
|
2369
|
-
return r = er(r, t, n), r[n] || [];
|
|
2370
|
-
}
|
|
2371
|
-
function No(e, t, n) {
|
|
2372
|
-
let r = [];
|
|
2373
|
-
const s = [];
|
|
2374
|
-
for (let o = e.length - 1; o >= 0; o--) {
|
|
2375
|
-
const i = e[o];
|
|
2376
|
-
r.push({
|
|
2377
|
-
root: i,
|
|
2378
|
-
data: t(i),
|
|
2379
|
-
level: [o],
|
|
2380
|
-
levelCount: e.length
|
|
2381
|
-
});
|
|
2382
|
-
}
|
|
2383
|
-
for (; r.length > 0; ) {
|
|
2384
|
-
let o = r.pop();
|
|
2385
|
-
if (s.push({
|
|
2386
|
-
dataItem: o.root,
|
|
2387
|
-
level: [...o.level],
|
|
2388
|
-
...n(o.root),
|
|
2389
|
-
levelCount: o.levelCount
|
|
2390
|
-
}), o.data.length)
|
|
2391
|
-
for (let i = o.data.length - 1; i >= 0; i--) {
|
|
2392
|
-
const l = o.data[i];
|
|
2393
|
-
r.push({
|
|
2394
|
-
root: l,
|
|
2395
|
-
data: t(l),
|
|
2396
|
-
level: [...o.level, i],
|
|
2397
|
-
levelCount: o.data.length
|
|
2398
|
-
});
|
|
2399
|
-
}
|
|
2400
|
-
}
|
|
2401
|
-
return s;
|
|
2402
|
-
}
|
|
2403
|
-
const Ao = (e, t, n) => {
|
|
2404
|
-
const r = (c) => !!$e(t, c), s = (c) => !!$e(n, c), o = (c) => {
|
|
2405
|
-
const u = [];
|
|
2406
|
-
return r(c) && s(c) && u.push(...$e(n, c)), u;
|
|
2407
|
-
}, i = (c, u, d) => {
|
|
2408
|
-
u.push({ ...c, level: d }), o(c).forEach((h) => i(h, u, d + 1));
|
|
2409
|
-
}, l = [];
|
|
2410
|
-
return e.forEach((c) => i(c, l, 0)), l;
|
|
2411
|
-
}, Po = (e, t, n, r) => {
|
|
2412
|
-
let s = {}, o = [], i;
|
|
2413
|
-
return e.forEach((l) => s[t(l)] = { ...l }), e.forEach((l) => {
|
|
2414
|
-
i = s[n(l)], i ? (i[r] = i[r] || [], i[r].push(s[t(l)])) : o.push(s[t(l)]);
|
|
2415
|
-
}), o;
|
|
2416
|
-
}, To = (e, t, n) => mt(e, t, n), Ko = (e, t, n) => [...J(
|
|
2417
|
-
[{ [t]: [...e] }],
|
|
2418
|
-
t,
|
|
2419
|
-
(s) => Ms(s, n, t)
|
|
2420
|
-
)[0][t]], Ms = (e, t, n) => {
|
|
2421
|
-
const r = e[n] || [], s = r.findIndex(t);
|
|
2422
|
-
if (s !== -1) {
|
|
2423
|
-
const o = [...r];
|
|
2424
|
-
return o.splice(s, 1), {
|
|
2425
|
-
...e,
|
|
2426
|
-
[n]: o
|
|
2427
|
-
};
|
|
2428
|
-
}
|
|
2429
|
-
return e;
|
|
2430
|
-
}, Bo = (e, t, n, r) => J(
|
|
2431
|
-
e,
|
|
2432
|
-
t,
|
|
2433
|
-
(s) => n(s) ? { ...s, [t]: r(s[t] || []) } : s
|
|
2434
|
-
), $t = (e, t, n) => lr(e, t, n), qo = (e, t, n, r) => {
|
|
2435
|
-
const s = [...e], o = $t(s, t, r), i = o.pop(), l = o.pop(), c = t[t.length - 1];
|
|
2436
|
-
if (n) {
|
|
2437
|
-
const d = $t(s, n, r).pop();
|
|
2438
|
-
(l ? l[r] : s).splice(c, 1), d[r] = d[r] || [], d[r].push(i);
|
|
2439
|
-
} else
|
|
2440
|
-
(l ? l[r] : s).splice(c, 1), s.push(i);
|
|
2441
|
-
return s;
|
|
2442
|
-
}, ue = "groupId", ht = "items", tr = (e, t, n) => {
|
|
2443
|
-
e.items && (e[ue] = `${n}${n && "_"}${e.value}${e.field}`, t > 1 && e.items.forEach((r) => tr(r, t - 1, e[ue])));
|
|
2444
|
-
}, Go = (e) => {
|
|
2445
|
-
const { group: t } = e;
|
|
2446
|
-
if (t && t.length && e.data)
|
|
2447
|
-
return e.data.forEach((n) => tr(n, t.length, ""));
|
|
2448
|
-
}, zo = (e) => {
|
|
2449
|
-
const t = [];
|
|
2450
|
-
return J(e.data, ht, (n) => {
|
|
2451
|
-
n[ue] && t.push(n[ue]);
|
|
2452
|
-
}), t;
|
|
2453
|
-
}, _o = (e) => J(
|
|
2454
|
-
e.data,
|
|
2455
|
-
ht,
|
|
2456
|
-
(t) => mt(t, ht, {
|
|
2457
|
-
expanded: !e.collapsedIds.some((n) => n === t[ue])
|
|
2458
|
-
})
|
|
2459
|
-
), Rs = (e) => {
|
|
2460
|
-
const { navigatable: t, contextStateRef: n, navigationStateRef: r, idPrefix: s } = e;
|
|
2461
|
-
t && (n.current = {
|
|
2462
|
-
activeId: "",
|
|
2463
|
-
level: 0
|
|
2464
|
-
}, r.current = {
|
|
2465
|
-
activeElementIsFocused: !1,
|
|
2466
|
-
prevNavigationIndexes: void 0,
|
|
2467
|
-
idPrefix: s || cr(),
|
|
2468
|
-
navigationMatrix: [],
|
|
2469
|
-
lastHeaderIndex: -1
|
|
2470
|
-
});
|
|
2471
|
-
}, Ls = (e) => {
|
|
2472
|
-
const { scope: t, contextStateRef: n, navigationStateRef: r } = e;
|
|
2473
|
-
if (n.current && r.current && t) {
|
|
2474
|
-
Rt(e);
|
|
2475
|
-
const s = r.current.navigationMatrix[0][0], o = R.getActiveElement(t, s);
|
|
2476
|
-
s && o && (n.current.activeId = s, o.setAttribute("tabIndex", "0"));
|
|
2477
|
-
}
|
|
2478
|
-
}, Ds = (e) => {
|
|
2479
|
-
const { contextStateRef: t, navigationStateRef: n, document: r } = e;
|
|
2480
|
-
if (t.current && n.current && r) {
|
|
2481
|
-
const s = ur(r), o = R.getNavigatableId(s);
|
|
2482
|
-
o && o === t.current.activeId && (n.current.activeElementIsFocused = !0);
|
|
2483
|
-
}
|
|
2484
|
-
}, ws = (e) => {
|
|
2485
|
-
const { scope: t, contextStateRef: n, navigationStateRef: r } = e;
|
|
2486
|
-
if (Rt(e), n.current && r.current && t) {
|
|
2487
|
-
if (!R.getActiveElement(t, n.current.activeId)) {
|
|
2488
|
-
const o = r.current.navigationMatrix[0][0], i = R.getActiveElement(t, o);
|
|
2489
|
-
o && i && (n.current.activeId = o, i.setAttribute("tabIndex", "0"), r.current.activeElementIsFocused && i.focus());
|
|
2490
|
-
}
|
|
2491
|
-
r.current.activeElementIsFocused = !1;
|
|
2492
|
-
}
|
|
2493
|
-
}, Os = (e, t) => {
|
|
2494
|
-
const { contextStateRef: n } = t;
|
|
2495
|
-
if (e.isDefaultPrevented() || !n.current)
|
|
2496
|
-
return;
|
|
2497
|
-
const r = e.target, s = R.getNavigatableId(r);
|
|
2498
|
-
if (s && s !== n.current.activeId) {
|
|
2499
|
-
const o = R.getClosestScope(r);
|
|
2500
|
-
if (!o)
|
|
2501
|
-
return;
|
|
2502
|
-
const i = R.getActiveElement(o, n.current.activeId);
|
|
2503
|
-
i && i.setAttribute("tabIndex", "-1"), r.setAttribute("tabIndex", "0"), n.current.activeId = s;
|
|
2504
|
-
}
|
|
2505
|
-
}, Ns = (e, t) => {
|
|
2506
|
-
const {
|
|
2507
|
-
contextStateRef: n,
|
|
2508
|
-
navigationStateRef: r,
|
|
2509
|
-
onNavigationAction: s
|
|
2510
|
-
} = t;
|
|
2511
|
-
if (e.isDefaultPrevented() || !n.current || !r.current)
|
|
2512
|
-
return;
|
|
2513
|
-
if (e.keyCode === K.esc) {
|
|
2514
|
-
const d = R.getClosestNavigatableElement(e.target);
|
|
2515
|
-
R.focusElement({ elementForFocus: d, event: e, contextStateRef: n });
|
|
2516
|
-
return;
|
|
2517
|
-
}
|
|
2518
|
-
const o = e.target, i = R.getNavigatableId(o), l = R.getNavigatableLevel(o), c = R.getClosestScope(o), u = r.current.navigationMatrix;
|
|
2519
|
-
if (l !== void 0 && c) {
|
|
2520
|
-
if (e.keyCode === K.enter) {
|
|
2521
|
-
const d = R.getNavigatableElement(o, { level: l + 1 });
|
|
2522
|
-
if (d) {
|
|
2523
|
-
R.focusElement({
|
|
2524
|
-
elementForFocus: d,
|
|
2525
|
-
event: e,
|
|
2526
|
-
contextStateRef: n,
|
|
2527
|
-
prevElement: o
|
|
2528
|
-
});
|
|
2529
|
-
return;
|
|
2530
|
-
} else {
|
|
2531
|
-
const h = R.getFocusableElements(o)[0];
|
|
2532
|
-
R.focusElement({ elementForFocus: h, event: e, contextStateRef: n, prevElement: o });
|
|
2533
|
-
return;
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
if (e.keyCode === K.up || e.keyCode === K.down || e.keyCode === K.left || e.keyCode === K.right) {
|
|
2537
|
-
const d = e.keyCode === K.up || e.keyCode === K.left, h = e.keyCode === K.up || e.keyCode === K.down;
|
|
2538
|
-
let m;
|
|
2539
|
-
if (r.current && r.current.prevNavigationIndexes) {
|
|
2540
|
-
const [g, E] = r.current.prevNavigationIndexes;
|
|
2541
|
-
u[g][E] === i ? m = r.current.prevNavigationIndexes : m = dt(u, i);
|
|
2542
|
-
} else
|
|
2543
|
-
m = dt(u, i);
|
|
2544
|
-
if (m) {
|
|
2545
|
-
const [g, E] = m, [b, C] = h ? Vn(g, E, i, u, d) : Yn(g, E, i, u, d);
|
|
2546
|
-
if (b) {
|
|
2547
|
-
const f = R.getActiveElement(c, b);
|
|
2548
|
-
R.focusElement({ elementForFocus: f, event: e, contextStateRef: n, prevElement: o }), r.current.prevNavigationIndexes = C, s && s({ focusElement: f, event: e });
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
|
-
}
|
|
2553
|
-
}, Rt = (e) => {
|
|
2554
|
-
const { navigationStateRef: t, scope: n } = e;
|
|
2555
|
-
if (!t.current || !n)
|
|
2556
|
-
return;
|
|
2557
|
-
const r = [], s = Hn(n), o = Wn(n);
|
|
2558
|
-
if (!s || !o)
|
|
2559
|
-
return;
|
|
2560
|
-
const i = Array.from(s.children), l = Array.from(o.children);
|
|
2561
|
-
[...i, ...l].forEach((c, u) => {
|
|
2562
|
-
Array.from(c.children).forEach((d) => {
|
|
2563
|
-
const h = bt(d);
|
|
2564
|
-
if (!h)
|
|
2565
|
-
return;
|
|
2566
|
-
const m = d.rowSpan || 1, g = d.colSpan || 1;
|
|
2567
|
-
let E;
|
|
2568
|
-
for (let b = u, C = u + m; b < C; b++) {
|
|
2569
|
-
if (r[b] || (r[b] = []), E === void 0) {
|
|
2570
|
-
const f = r[b].findIndex((I) => !I);
|
|
2571
|
-
E = f > -1 ? f : r[b].length;
|
|
2572
|
-
}
|
|
2573
|
-
r[b][E] = h || "";
|
|
2574
|
-
}
|
|
2575
|
-
for (let b = E + 1, C = E + g; b < C; b++)
|
|
2576
|
-
r[u][b] = h || "";
|
|
2577
|
-
});
|
|
2578
|
-
}), t.current.navigationMatrix = r.filter((c) => !!c), t.current.lastHeaderIndex = i.length - 1;
|
|
2579
|
-
}, $o = {
|
|
2580
|
-
onConstructor: Rs,
|
|
2581
|
-
onComponentDidMount: Ls,
|
|
2582
|
-
onGetSnapshotBeforeUpdate: Ds,
|
|
2583
|
-
onComponentDidUpdate: ws,
|
|
2584
|
-
onFocus: Os,
|
|
2585
|
-
onKeyDown: Ns,
|
|
2586
|
-
generateMatrix: Rt
|
|
2587
|
-
}, As = "data-grid-row-index", Ps = "data-grid-col-index", Ts = "data-prevent-selection", Ks = "items", j = {}, Bs = (e, t) => !e || Array.isArray(e) && e.length === 0 ? [t] : e.findIndex((r) => r === t) > -1 ? e.filter((r) => r !== t) : [...e, t], Y = (e, t) => {
|
|
2588
|
-
let n = e;
|
|
2589
|
-
for (; n; ) {
|
|
2590
|
-
if (n.tagName === t)
|
|
2591
|
-
return n;
|
|
2592
|
-
if (n.tagName === "TABLE")
|
|
2593
|
-
return null;
|
|
2594
|
-
n = n.parentElement;
|
|
2595
|
-
}
|
|
2596
|
-
return null;
|
|
2597
|
-
}, Se = (e) => {
|
|
2598
|
-
if (!e)
|
|
2599
|
-
return;
|
|
2600
|
-
const t = e.getAttribute(As);
|
|
2601
|
-
return t ? parseInt(t, 10) : void 0;
|
|
2602
|
-
}, Fe = (e) => {
|
|
2603
|
-
if (!e)
|
|
2604
|
-
return;
|
|
2605
|
-
const t = e.getAttribute(Ps);
|
|
2606
|
-
return t ? parseInt(t, 10) : void 0;
|
|
2607
|
-
}, Ho = (e) => {
|
|
2608
|
-
const t = e.subItemsField || Ks, n = Vt(e.dataItemKey);
|
|
2609
|
-
return J(
|
|
2610
|
-
e.data,
|
|
2611
|
-
t,
|
|
2612
|
-
(r) => mt(r, t, {
|
|
2613
|
-
[e.selectedField]: e.selectedState[n(r)]
|
|
2614
|
-
})
|
|
2615
|
-
);
|
|
2616
|
-
}, Wo = (e) => {
|
|
2617
|
-
const { event: t, dataItemKey: n, selectedState: r } = e, { syntheticEvent: s, nativeEvent: o, dataItems: i, componentId: l, mode: c, cell: u, selectedField: d } = t, { target: h, ctrlKey: m, metaKey: g, altKey: E, shiftKey: b } = o;
|
|
2618
|
-
if (s.isDefaultPrevented() || o.keyCode !== K.enter)
|
|
2619
|
-
return r;
|
|
2620
|
-
const C = Y(h, "TD"), f = Y(h, "TR"), I = Fe(C), F = Se(f);
|
|
2621
|
-
let S = {};
|
|
2622
|
-
return C && f && F !== void 0 && I !== void 0 && (S = qs({
|
|
2623
|
-
selectedState: r,
|
|
2624
|
-
dataItemKey: n,
|
|
2625
|
-
event: {
|
|
2626
|
-
ctrlKey: m,
|
|
2627
|
-
metaKey: g,
|
|
2628
|
-
altKey: E,
|
|
2629
|
-
shiftKey: b,
|
|
2630
|
-
dataItems: i,
|
|
2631
|
-
cell: u,
|
|
2632
|
-
mode: c,
|
|
2633
|
-
selectedField: d,
|
|
2634
|
-
componentId: l,
|
|
2635
|
-
startColIndex: I,
|
|
2636
|
-
endColIndex: I,
|
|
2637
|
-
startRowIndex: F,
|
|
2638
|
-
endRowIndex: F,
|
|
2639
|
-
isDrag: !1,
|
|
2640
|
-
syntheticEvent: s,
|
|
2641
|
-
nativeEvent: o,
|
|
2642
|
-
target: t.target,
|
|
2643
|
-
dataItem: null
|
|
2644
|
-
}
|
|
2645
|
-
})), S;
|
|
2646
|
-
}, qs = (e) => {
|
|
2647
|
-
const { event: t, dataItemKey: n, selectedState: r } = e, {
|
|
2648
|
-
dataItems: s,
|
|
2649
|
-
startRowIndex: o,
|
|
2650
|
-
endRowIndex: i,
|
|
2651
|
-
startColIndex: l,
|
|
2652
|
-
endColIndex: c,
|
|
2653
|
-
cell: u,
|
|
2654
|
-
isDrag: d,
|
|
2655
|
-
ctrlKey: h,
|
|
2656
|
-
shiftKey: m,
|
|
2657
|
-
metaKey: g,
|
|
2658
|
-
componentId: E,
|
|
2659
|
-
mode: b,
|
|
2660
|
-
dataItem: C
|
|
2661
|
-
} = t, f = Vt(n);
|
|
2662
|
-
let I = {};
|
|
2663
|
-
const F = C !== null;
|
|
2664
|
-
if (b === "single") {
|
|
2665
|
-
const S = s.slice(o, o + 1)[0], x = f(S);
|
|
2666
|
-
j[E] = {
|
|
2667
|
-
rowIndex: o,
|
|
2668
|
-
colIndex: l
|
|
2669
|
-
}, I[x] = u ? [l] : !0;
|
|
2670
|
-
} else if (d || !m && !h && !g && !F) {
|
|
2671
|
-
d || (j[E] = {
|
|
2672
|
-
rowIndex: o,
|
|
2673
|
-
colIndex: l
|
|
2674
|
-
});
|
|
2675
|
-
const S = [];
|
|
2676
|
-
for (let y = l; y <= c; y++)
|
|
2677
|
-
S.push(y);
|
|
2678
|
-
s.slice(o, i + 1).forEach((y) => {
|
|
2679
|
-
const k = f(y);
|
|
2680
|
-
I[k] = u ? [...S] : !0;
|
|
2681
|
-
});
|
|
2682
|
-
} else if (h || g || F) {
|
|
2683
|
-
j[E] = {
|
|
2684
|
-
rowIndex: o,
|
|
2685
|
-
colIndex: l
|
|
2686
|
-
};
|
|
2687
|
-
const x = s.slice(o, i + 1)[0], y = f(x);
|
|
2688
|
-
I = { ...r }, I[y] = u && !F ? Bs(I[y], l) : !I[y];
|
|
2689
|
-
} else if (m) {
|
|
2690
|
-
const S = j[E] && j[E].rowIndex || 0, x = j[E] && j[E].colIndex || 0, y = Math.min(S, o, i), k = Math.max(S, o, i), A = Math.min(x, l, c), P = Math.max(x, l, c), T = [];
|
|
2691
|
-
for (let D = A; D <= P; D++)
|
|
2692
|
-
T.push(D);
|
|
2693
|
-
s.slice(y, k + 1).forEach((D) => {
|
|
2694
|
-
const L = f(D);
|
|
2695
|
-
I[L] = u ? [...T] : !0;
|
|
2696
|
-
});
|
|
2697
|
-
}
|
|
2698
|
-
return I;
|
|
2699
|
-
}, Gs = dr(), zs = (e) => {
|
|
2700
|
-
if (!e || !Gs)
|
|
2701
|
-
return null;
|
|
2702
|
-
let t = e.parentElement;
|
|
2703
|
-
for (; t; ) {
|
|
2704
|
-
if (window.getComputedStyle(t).transform !== "none")
|
|
2705
|
-
return t;
|
|
2706
|
-
t = t.parentElement;
|
|
2707
|
-
}
|
|
2708
|
-
}, _s = (e) => {
|
|
2709
|
-
if (e && e.ownerDocument && e !== e.ownerDocument.body) {
|
|
2710
|
-
const t = e.getBoundingClientRect();
|
|
2711
|
-
return {
|
|
2712
|
-
left: t.left - e.scrollLeft,
|
|
2713
|
-
top: t.top - e.scrollTop
|
|
2714
|
-
};
|
|
2715
|
-
}
|
|
2716
|
-
return { left: 0, top: 0 };
|
|
2717
|
-
}, $s = (e) => {
|
|
2718
|
-
const t = e ? typeof e.enabled == "boolean" ? e.enabled : !0 : !1, n = e ? !!e.drag : !1, r = e && e.mode ? e.mode : "multiple", s = !!(e && e.cell);
|
|
2719
|
-
return { enabled: t, drag: n, mode: r, cell: s };
|
|
2720
|
-
}, Vo = (e) => {
|
|
2721
|
-
var F;
|
|
2722
|
-
const { onRelease: t, childRef: n } = e, {
|
|
2723
|
-
enabled: r,
|
|
2724
|
-
drag: s,
|
|
2725
|
-
mode: o,
|
|
2726
|
-
cell: i
|
|
2727
|
-
} = $s(e.selectable), l = a.useRef(null), c = a.useRef(null), u = a.useRef({ clientX: 0, clientY: 0 }), [d, h] = a.useState(null), m = a.useRef(), g = a.useRef(!1), E = a.useRef(!1), b = a.useCallback(
|
|
2728
|
-
(S) => {
|
|
2729
|
-
const { event: x } = S;
|
|
2730
|
-
E.current = x.originalEvent.target.hasAttribute(Ts), !(E.current || !l.current) && (m.current = zs(l.current.element), u.current = {
|
|
2731
|
-
clientY: x.clientY,
|
|
2732
|
-
clientX: x.clientX
|
|
2733
|
-
});
|
|
2734
|
-
},
|
|
2735
|
-
[]
|
|
2736
|
-
), C = a.useCallback(
|
|
2737
|
-
(S) => {
|
|
2738
|
-
const { event: x } = S, { clientX: y, clientY: k } = u.current;
|
|
2739
|
-
if (!E.current && !(!s || o === "single") && ((Math.abs(k - x.clientY) > 5 || Math.abs(y - x.clientX) > 5) && (g.current = !0), g.current)) {
|
|
2740
|
-
const A = _s(m.current);
|
|
2741
|
-
h({
|
|
2742
|
-
top: Math.min(k, x.clientY) - A.top,
|
|
2743
|
-
left: Math.min(y, x.clientX) - A.left,
|
|
2744
|
-
width: Math.abs(x.clientX - y),
|
|
2745
|
-
height: Math.abs(x.clientY - k)
|
|
2746
|
-
});
|
|
2747
|
-
}
|
|
2748
|
-
},
|
|
2749
|
-
[h, s, o]
|
|
2750
|
-
), f = a.useCallback(
|
|
2751
|
-
(S) => {
|
|
2752
|
-
const { event: x } = S, { clientX: y, clientY: k } = u.current;
|
|
2753
|
-
if (E.current || !l.current)
|
|
2754
|
-
return;
|
|
2755
|
-
const A = l.current.element && l.current.element.ownerDocument;
|
|
2756
|
-
if (A) {
|
|
2757
|
-
if (g.current) {
|
|
2758
|
-
const P = Math.min(k, x.clientY), T = Math.min(y, x.clientX), G = Math.max(k, x.clientY), D = Math.max(y, x.clientX), L = c.current;
|
|
2759
|
-
if (!L)
|
|
2760
|
-
return;
|
|
2761
|
-
L.style.visibility = "hidden";
|
|
2762
|
-
const V = A.elementFromPoint(T, P), Z = A.elementFromPoint(D, G);
|
|
2763
|
-
if (L.style.visibility = "", !V || !Z)
|
|
2764
|
-
return;
|
|
2765
|
-
const he = Y(V, "TD"), Ge = Y(he, "TR"), ge = Y(Z, "TD"), ze = Y(ge, "TR"), te = Fe(he), ne = Se(Ge), re = Fe(ge), se = Se(ze);
|
|
2766
|
-
te !== void 0 && ne !== void 0 && re !== void 0 && se !== void 0 && t({
|
|
2767
|
-
nativeEvent: x.originalEvent,
|
|
2768
|
-
startRowIndex: ne,
|
|
2769
|
-
startColIndex: te,
|
|
2770
|
-
endRowIndex: se,
|
|
2771
|
-
endColIndex: re,
|
|
2772
|
-
altKey: x.altKey,
|
|
2773
|
-
shiftKey: x.shiftKey,
|
|
2774
|
-
ctrlKey: x.ctrlKey,
|
|
2775
|
-
metaKey: x.metaKey,
|
|
2776
|
-
mode: o,
|
|
2777
|
-
cell: i,
|
|
2778
|
-
isDrag: !0
|
|
2779
|
-
});
|
|
2780
|
-
} else {
|
|
2781
|
-
const P = A.elementFromPoint(y, k);
|
|
2782
|
-
if (!P)
|
|
2783
|
-
return;
|
|
2784
|
-
const T = Y(P, "TD"), G = Y(P, "TR"), D = Fe(T), L = Se(G);
|
|
2785
|
-
T && G && L !== void 0 && D !== void 0 && t({
|
|
2786
|
-
nativeEvent: x.originalEvent,
|
|
2787
|
-
startRowIndex: L,
|
|
2788
|
-
startColIndex: D,
|
|
2789
|
-
endRowIndex: L,
|
|
2790
|
-
endColIndex: D,
|
|
2791
|
-
altKey: x.altKey,
|
|
2792
|
-
shiftKey: x.shiftKey,
|
|
2793
|
-
ctrlKey: x.ctrlKey,
|
|
2794
|
-
metaKey: x.metaKey,
|
|
2795
|
-
mode: o,
|
|
2796
|
-
cell: i,
|
|
2797
|
-
isDrag: !1
|
|
2798
|
-
});
|
|
2799
|
-
}
|
|
2800
|
-
h(null), g.current = !1, u.current = { clientX: 0, clientY: 0 };
|
|
2801
|
-
}
|
|
2802
|
-
},
|
|
2803
|
-
[h, o, i, t]
|
|
2804
|
-
), I = pr(c);
|
|
2805
|
-
return r ? /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
2806
|
-
ft,
|
|
2807
|
-
{
|
|
2808
|
-
onPress: b,
|
|
2809
|
-
onDrag: C,
|
|
2810
|
-
onRelease: f,
|
|
2811
|
-
ref: l,
|
|
2812
|
-
childRef: n
|
|
2813
|
-
},
|
|
2814
|
-
e.children
|
|
2815
|
-
), d && Ir.createPortal(
|
|
2816
|
-
/* @__PURE__ */ a.createElement(
|
|
2817
|
-
"div",
|
|
2818
|
-
{
|
|
2819
|
-
ref: c,
|
|
2820
|
-
style: { ...d, position: "fixed" },
|
|
2821
|
-
className: "k-marquee k-marquee-color"
|
|
2822
|
-
}
|
|
2823
|
-
),
|
|
2824
|
-
(F = I()) == null ? void 0 : F.body
|
|
2825
|
-
)) : a.cloneElement(a.Children.only(e.children), { ref: n });
|
|
2826
|
-
}, Hs = "items";
|
|
2827
|
-
var z = /* @__PURE__ */ ((e) => (e.copy = "copy", e.cut = "cut", e.paste = "paste", e))(z || {});
|
|
2828
|
-
const Ws = (e, t, n) => {
|
|
2829
|
-
const r = e.cellDelimiter || " ", s = e.newLineDelimiter || `\r
|
|
2830
|
-
`, o = t.includes(s) ? s : t.includes(`
|
|
2831
|
-
`) ? `
|
|
2832
|
-
` : null, i = o ? t.split(o) : [t], l = n.copiedItems.length ? n.copiedItems[0].fields[0] : e.columns[0].field || "";
|
|
2833
|
-
return i.map((u) => {
|
|
2834
|
-
const d = u.includes(r) ? u.split(r) : [u], h = e.columns.map((b) => b.field || ""), m = h.indexOf(l), g = h.slice(m, m + d.length), E = {};
|
|
2835
|
-
return h.slice(m, m + d.length).forEach((b, C) => E[b] = d[C]), {
|
|
2836
|
-
dataItem: E,
|
|
2837
|
-
fields: g
|
|
2838
|
-
};
|
|
2839
|
-
});
|
|
2840
|
-
}, Vs = (e, t) => {
|
|
2841
|
-
if (!t.length)
|
|
2842
|
-
return null;
|
|
2843
|
-
let n = "";
|
|
2844
|
-
return t.forEach((r, s, o) => n += `${e[r]}${s < o.length - 1 ? " " : ""}`), n;
|
|
2845
|
-
}, Ys = (e, t, n) => {
|
|
2846
|
-
const r = n.cellDelimiter || " ", s = n.newLineDelimiter || `\r
|
|
2847
|
-
`;
|
|
2848
|
-
return `${t.join(r)}${s}${e}`;
|
|
2849
|
-
}, Us = (e) => {
|
|
2850
|
-
const { event: t, selectedState: n, data: r, dataItemKey: s } = e, o = {}, i = { copiedItems: [], pastedItems: [], clipboardData: "" }, l = e.subItemsField || Hs;
|
|
2851
|
-
return Object.entries(n).forEach(([c, u]) => {
|
|
2852
|
-
o[c] = hr(u) ? u.map((d) => t.columns[d]) : t.columns;
|
|
2853
|
-
}), J(r, l, (c) => {
|
|
2854
|
-
const u = c[s || t.dataItemKey || ""] || "";
|
|
2855
|
-
return o[u] && i.copiedItems.push({
|
|
2856
|
-
dataItem: c,
|
|
2857
|
-
fields: o[u].map((d) => d.field || "")
|
|
2858
|
-
}), c;
|
|
2859
|
-
}), i;
|
|
2860
|
-
}, js = (e, t) => {
|
|
2861
|
-
const n = t.newLineDelimiter || `\r
|
|
2862
|
-
`, r = e.copiedItems.map((s, o) => {
|
|
2863
|
-
let i = Vs(s.dataItem, s.fields) || "";
|
|
2864
|
-
return t.copyHeaders && o === 0 && (i = Ys(i, s.fields, t)), i ? [i] : [];
|
|
2865
|
-
}).join(n);
|
|
2866
|
-
return navigator.clipboard.writeText(r), r;
|
|
2867
|
-
}, Yo = (e) => {
|
|
2868
|
-
const { event: t } = e, n = Us(e);
|
|
2869
|
-
let r = "";
|
|
2870
|
-
if (t.type === "paste") {
|
|
2871
|
-
const s = t.nativeEvent ? t.nativeEvent.clipboardData : "";
|
|
2872
|
-
r = s ? s.getData("text").trim() : "", n.pastedItems = Ws(t, r, n);
|
|
2873
|
-
} else
|
|
2874
|
-
n.pastedItems = [], r = js(n, t);
|
|
2875
|
-
return n.clipboardData = r, n;
|
|
2876
|
-
};
|
|
2877
|
-
class Uo {
|
|
2878
|
-
constructor(t) {
|
|
2879
|
-
this.copyHandler = (n) => {
|
|
2880
|
-
this.clipboardEvent(z.copy, n);
|
|
2881
|
-
}, this.cutHandler = (n) => {
|
|
2882
|
-
this.clipboardEvent(z.cut, n);
|
|
2883
|
-
}, this.pasteHandler = (n) => {
|
|
2884
|
-
this.clipboardEvent(z.paste, n);
|
|
2885
|
-
}, this.addEventListeners = (n) => {
|
|
2886
|
-
n && (n.addEventListener(z.copy, this.copyHandler), n.addEventListener(z.cut, this.cutHandler), n.addEventListener(z.paste, this.pasteHandler));
|
|
2887
|
-
}, this.removeEventListeners = (n) => {
|
|
2888
|
-
n && (n.removeEventListener(z.copy, this.copyHandler), n.removeEventListener(z.cut, this.cutHandler), n.removeEventListener(z.paste, this.pasteHandler));
|
|
2889
|
-
}, this.clipboardEvent = t;
|
|
2890
|
-
}
|
|
2891
|
-
}
|
|
9
|
+
import { Pager as r } from "./pager/Pager.mjs";
|
|
10
|
+
import { ColumnResize as m } from "./drag/ColumnResize.mjs";
|
|
11
|
+
import { ColumnResizer as a } from "./drag/ColumnResizer.mjs";
|
|
12
|
+
import { CommonDragLogic as p } from "./drag/CommonDragLogic.mjs";
|
|
13
|
+
import { DragClue as x } from "./drag/DragClue.mjs";
|
|
14
|
+
import { DropClue as f } from "./drag/DropClue.mjs";
|
|
15
|
+
import { createDataTree as E, extendDataItem as A, filterBy as T, flatData as _, getItemPath as d, modifySubItems as D, moveTreeItem as s, orderBy as F, removeItems as N, treeToFlat as g } from "./utils/data-operations.mjs";
|
|
16
|
+
import { getGroupIds as b, setExpandedState as O, setGroupIds as R } from "./utils/group-operations.mjs";
|
|
17
|
+
import { useTableKeyboardNavigation as I } from "./navigation/hooks.mjs";
|
|
18
|
+
import { FOCUSABLE_ELEMENTS as L, KEYBOARD_NAV_DATA_BODY as M, KEYBOARD_NAV_DATA_HEADER as K, KEYBOARD_NAV_DATA_ID as y, KEYBOARD_NAV_DATA_LEVEL as v, KEYBOARD_NAV_DATA_SCOPE as V, KEYBOARD_NAV_DATA_ZONE as Y, KEYBOARD_NAV_FILTER_COL_SUFFIX as H, TABBABLE_ELEMENTS as P, tableKeyboardNavigationBodyAttributes as w, tableKeyboardNavigationHeaderAttributes as z, tableKeyboardNavigationScopeAttributes as U } from "./navigation/constants.mjs";
|
|
19
|
+
import { tableKeyboardNavigation as G } from "./navigation/TableKeyboardNavigation.mjs";
|
|
20
|
+
import { TableKeyboardNavigationContext as W } from "./navigation/TableKeyboardNavigationContext.mjs";
|
|
21
|
+
import { tableKeyboardNavigationTools as j } from "./navigation/utils.mjs";
|
|
22
|
+
import { TableSelection as q } from "./selection/TableSelection.mjs";
|
|
23
|
+
import { TABLE_COL_INDEX_ATTRIBUTE as Q, TABLE_PREVENT_SELECTION_ELEMENT as $, TABLE_ROW_INDEX_ATTRIBUTE as ee } from "./selection/constants.mjs";
|
|
24
|
+
import { closestTagName as re, getColumnIndex as te, getOffset as me, getRowIndex as le, getSelectedState as ae, getSelectedStateFromKeyDown as ne, getSelectionOptions as pe, relativeContextElement as ie, setSelectedState as xe } from "./selection/utils.mjs";
|
|
25
|
+
import { ClipboardService as fe } from "./clipboard/clipboard.service.mjs";
|
|
26
|
+
import { ClipboardActionType as Ee, populateClipboardData as Ae } from "./clipboard/common.mjs";
|
|
27
|
+
import { createFilterComponent as _e } from "./filteringCells/FilterComponent.mjs";
|
|
28
|
+
import { BooleanFilterCell as De } from "./filteringCells/BooleanFilter.mjs";
|
|
29
|
+
import { DateFilterCell as Fe } from "./filteringCells/DateFilter.mjs";
|
|
30
|
+
import { NumericFilterCell as ge } from "./filteringCells/NumericFilter.mjs";
|
|
31
|
+
import { TextFilterCell as be } from "./filteringCells/TextFilter.mjs";
|
|
32
|
+
import { ColumnDefaultProps as Re } from "./header/ColumnProps.mjs";
|
|
33
|
+
import { FILTER_ROW_CLASS as Ie, FilterRow as ce } from "./header/FilterRow.mjs";
|
|
34
|
+
import { Header as Me } from "./header/Header.mjs";
|
|
35
|
+
import { HeaderCell as ye } from "./header/HeaderCell.mjs";
|
|
36
|
+
import { HeaderRow as Ve } from "./header/HeaderRow.mjs";
|
|
37
|
+
import { HeaderSelectionCell as He } from "./header/HeaderSelectionCell.mjs";
|
|
38
|
+
import { normalize as we } from "./header/SortSettings.mjs";
|
|
39
|
+
import { getIndex as Ue, isRtl as he, mapColumns as Ge, nextColumn as Xe, readColumns as We, updateLeft as Ze, updateRight as je } from "./header/utils/index.mjs";
|
|
40
|
+
import { HeaderThElement as qe } from "./header/HeaderThElement.mjs";
|
|
41
|
+
import { tableColumnsVirtualization as Qe } from "./virtualization/columns.mjs";
|
|
42
|
+
import { TextFilter as eo } from "./filter/filters/TextFilter.mjs";
|
|
43
|
+
import { NumericFilter as ro } from "./filter/filters/NumericFilter.mjs";
|
|
44
|
+
import { DateFilter as mo } from "./filter/filters/DateFilter.mjs";
|
|
45
|
+
import { BooleanFilter as ao } from "./filter/filters/BooleanFilter.mjs";
|
|
46
|
+
import { EnumFilter as po } from "./filter/filters/EnumFilter.mjs";
|
|
47
|
+
import { Expression as xo } from "./filter/Expression.mjs";
|
|
48
|
+
import { Filter as fo } from "./filter/Filter.mjs";
|
|
49
|
+
import { Group as Eo } from "./filter/Group.mjs";
|
|
50
|
+
import { Operators as To, stringOperator as _o, unaryOperator as Do } from "./filter/operators.mjs";
|
|
51
|
+
import { ColumnMenuBooleanColumn as Fo, ColumnMenuDateColumn as No, ColumnMenuNumericColumn as go, ColumnMenuTextColumn as Bo } from "./columnmenu/ColumnMenu.mjs";
|
|
52
|
+
import { ColumnMenuFilterForm as Oo, ColumnMenuForm as Ro } from "./columnmenu/ColumnMenuFilterForm.mjs";
|
|
53
|
+
import { ColumnMenuFilterLogic as Io } from "./columnmenu/ColumnMenuFilterLogic.mjs";
|
|
54
|
+
import { ColumnMenuBooleanFilter as Lo, ColumnMenuDateFilter as Mo, ColumnMenuNumericFilter as Ko, ColumnMenuTextFilter as yo } from "./columnmenu/ColumnMenuFilters.mjs";
|
|
55
|
+
import { ColumnMenuItem as Vo } from "./columnmenu/ColumnMenuItem.mjs";
|
|
56
|
+
import { ColumnMenuOperators as Ho } from "./columnmenu/ColumnMenuOperators.mjs";
|
|
2892
57
|
export {
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
58
|
+
ao as BooleanFilter,
|
|
59
|
+
De as BooleanFilterCell,
|
|
60
|
+
Ee as ClipboardActionType,
|
|
61
|
+
fe as ClipboardService,
|
|
62
|
+
Re as ColumnDefaultProps,
|
|
63
|
+
Fo as ColumnMenuBooleanColumn,
|
|
64
|
+
Lo as ColumnMenuBooleanFilter,
|
|
65
|
+
No as ColumnMenuDateColumn,
|
|
66
|
+
Mo as ColumnMenuDateFilter,
|
|
67
|
+
Oo as ColumnMenuFilterForm,
|
|
68
|
+
Io as ColumnMenuFilterLogic,
|
|
69
|
+
Ro as ColumnMenuForm,
|
|
70
|
+
Vo as ColumnMenuItem,
|
|
71
|
+
go as ColumnMenuNumericColumn,
|
|
72
|
+
Ko as ColumnMenuNumericFilter,
|
|
73
|
+
Ho as ColumnMenuOperators,
|
|
74
|
+
Bo as ColumnMenuTextColumn,
|
|
75
|
+
yo as ColumnMenuTextFilter,
|
|
76
|
+
m as ColumnResize,
|
|
77
|
+
a as ColumnResizer,
|
|
78
|
+
p as CommonDragLogic,
|
|
79
|
+
mo as DateFilter,
|
|
80
|
+
Fe as DateFilterCell,
|
|
81
|
+
x as DragClue,
|
|
82
|
+
f as DropClue,
|
|
83
|
+
po as EnumFilter,
|
|
84
|
+
xo as Expression,
|
|
85
|
+
Ie as FILTER_ROW_CLASS,
|
|
86
|
+
L as FOCUSABLE_ELEMENTS,
|
|
87
|
+
fo as Filter,
|
|
88
|
+
ce as FilterRow,
|
|
89
|
+
Eo as Group,
|
|
90
|
+
Me as Header,
|
|
91
|
+
ye as HeaderCell,
|
|
92
|
+
Ve as HeaderRow,
|
|
93
|
+
He as HeaderSelectionCell,
|
|
94
|
+
qe as HeaderThElement,
|
|
95
|
+
M as KEYBOARD_NAV_DATA_BODY,
|
|
96
|
+
K as KEYBOARD_NAV_DATA_HEADER,
|
|
97
|
+
y as KEYBOARD_NAV_DATA_ID,
|
|
98
|
+
v as KEYBOARD_NAV_DATA_LEVEL,
|
|
99
|
+
V as KEYBOARD_NAV_DATA_SCOPE,
|
|
100
|
+
Y as KEYBOARD_NAV_DATA_ZONE,
|
|
101
|
+
H as KEYBOARD_NAV_FILTER_COL_SUFFIX,
|
|
102
|
+
ro as NumericFilter,
|
|
103
|
+
ge as NumericFilterCell,
|
|
104
|
+
To as Operators,
|
|
105
|
+
r as Pager,
|
|
106
|
+
P as TABBABLE_ELEMENTS,
|
|
107
|
+
Q as TABLE_COL_INDEX_ATTRIBUTE,
|
|
108
|
+
$ as TABLE_PREVENT_SELECTION_ELEMENT,
|
|
109
|
+
ee as TABLE_ROW_INDEX_ATTRIBUTE,
|
|
110
|
+
W as TableKeyboardNavigationContext,
|
|
111
|
+
q as TableSelection,
|
|
112
|
+
eo as TextFilter,
|
|
113
|
+
be as TextFilterCell,
|
|
114
|
+
re as closestTagName,
|
|
115
|
+
E as createDataTree,
|
|
116
|
+
_e as createFilterComponent,
|
|
117
|
+
A as extendDataItem,
|
|
118
|
+
T as filterBy,
|
|
119
|
+
_ as flatData,
|
|
120
|
+
te as getColumnIndex,
|
|
121
|
+
b as getGroupIds,
|
|
122
|
+
Ue as getIndex,
|
|
123
|
+
d as getItemPath,
|
|
124
|
+
me as getOffset,
|
|
125
|
+
le as getRowIndex,
|
|
126
|
+
ae as getSelectedState,
|
|
127
|
+
ne as getSelectedStateFromKeyDown,
|
|
128
|
+
pe as getSelectionOptions,
|
|
129
|
+
he as isRtl,
|
|
130
|
+
Ge as mapColumns,
|
|
131
|
+
D as modifySubItems,
|
|
132
|
+
s as moveTreeItem,
|
|
133
|
+
Xe as nextColumn,
|
|
134
|
+
we as normalize,
|
|
135
|
+
F as orderBy,
|
|
136
|
+
Ae as populateClipboardData,
|
|
137
|
+
We as readColumns,
|
|
138
|
+
ie as relativeContextElement,
|
|
139
|
+
N as removeItems,
|
|
140
|
+
O as setExpandedState,
|
|
141
|
+
R as setGroupIds,
|
|
142
|
+
xe as setSelectedState,
|
|
143
|
+
_o as stringOperator,
|
|
144
|
+
Qe as tableColumnsVirtualization,
|
|
145
|
+
G as tableKeyboardNavigation,
|
|
146
|
+
w as tableKeyboardNavigationBodyAttributes,
|
|
147
|
+
z as tableKeyboardNavigationHeaderAttributes,
|
|
148
|
+
U as tableKeyboardNavigationScopeAttributes,
|
|
149
|
+
j as tableKeyboardNavigationTools,
|
|
150
|
+
g as treeToFlat,
|
|
151
|
+
Do as unaryOperator,
|
|
152
|
+
Ze as updateLeft,
|
|
153
|
+
je as updateRight,
|
|
154
|
+
I as useTableKeyboardNavigation
|
|
2990
155
|
};
|