@progress/kendo-react-data-tools 8.2.0-develop.4 → 8.2.0-develop.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-datatools.js +1 -1
- package/drag/ColumnDraggable.js +1 -1
- package/drag/ColumnDraggable.mjs +2 -1
- package/drag/ColumnResizer.js +1 -1
- package/drag/ColumnResizer.mjs +1 -0
- package/filter/Expression.js +1 -1
- package/filter/Expression.mjs +12 -10
- package/filter/Filter.js +1 -1
- package/filter/Filter.mjs +103 -35
- package/filter/Group.js +1 -1
- package/filter/Group.mjs +17 -17
- package/filter/filters/DateFilter.js +1 -1
- package/filter/filters/DateFilter.mjs +4 -3
- package/filter/filters/EnumFilter.js +1 -1
- package/filter/filters/EnumFilter.mjs +2 -1
- package/filter/filters/NumericFilter.js +1 -1
- package/filter/filters/NumericFilter.mjs +2 -1
- package/filter/filters/TextFilter.js +1 -1
- package/filter/filters/TextFilter.mjs +2 -1
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +34 -27
- package/header/Header.js +1 -1
- package/header/Header.mjs +7 -3
- package/header/HeaderThElement.js +1 -1
- package/header/HeaderThElement.mjs +27 -23
- package/index.d.mts +86 -12
- package/index.d.ts +86 -12
- package/index.js +1 -1
- package/index.mjs +130 -125
- package/navigation/NavigatableSettings.js +8 -0
- package/navigation/NavigatableSettings.mjs +12 -0
- package/navigation/TableKeyboardNavigation.js +1 -1
- package/navigation/TableKeyboardNavigation.mjs +197 -113
- package/navigation/constants.js +1 -1
- package/navigation/constants.mjs +11 -9
- package/navigation/utils.js +1 -1
- package/navigation/utils.mjs +173 -80
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
package/navigation/utils.mjs
CHANGED
|
@@ -6,17 +6,51 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { FOCUSABLE_ELEMENTS as
|
|
10
|
-
import { KEYBOARD_NAV_DATA_LEVEL as
|
|
11
|
-
const
|
|
9
|
+
import { FOCUSABLE_ELEMENTS as b, TABBABLE_ELEMENTS as y } from "@progress/kendo-react-common";
|
|
10
|
+
import { KEYBOARD_NAV_DATA_LEVEL as f, KEYBOARD_NAV_DATA_ID as g, KEYBOARD_NAV_DATA_SCOPE as D, KEYBOARD_NAV_CANCEL_BUTTON_CLASS as w, KEYBOARD_NAV_EDIT_BUTTON_CLASS as B, KEYBOARD_NAV_DATA_HEADER as S, KEYBOARD_NAV_DATA_BODY as h, KEYBOARD_NAV_FILTER_COL_SUFFIX as T } from "./constants.mjs";
|
|
11
|
+
const $ = (e, t, r = "cell") => `${t}_${e}_${r}`, k = (e) => {
|
|
12
12
|
if (e)
|
|
13
|
-
return parseInt(e.getAttribute(
|
|
14
|
-
},
|
|
13
|
+
return parseInt(e.getAttribute(f) || "", 10);
|
|
14
|
+
}, I = (e) => {
|
|
15
15
|
if (!e)
|
|
16
16
|
return;
|
|
17
|
-
const t = e.getAttribute(
|
|
17
|
+
const t = e.getAttribute(g);
|
|
18
18
|
return t || void 0;
|
|
19
|
-
},
|
|
19
|
+
}, E = (e) => e ? !!e.getAttribute(g) : !1, F = (e, t = { level: 0 }) => e.querySelector(`[${f}='${t.level}']`), m = (e) => e && e.parentElement && e.parentElement.closest(`[${f}]`), p = (e, t) => e.querySelector(`[${g}='${t}']`), R = (e) => e && e.parentElement && e.parentElement.closest(`[${D}]`), L = (e) => {
|
|
20
|
+
const t = e && e.parentElement && e.parentElement.closest(".k-grid-edit-row");
|
|
21
|
+
return t && t.querySelector("." + w);
|
|
22
|
+
}, q = (e) => document.querySelector(`[aria-rowindex="${e}"] .k-grid-remove-command`), u = (e) => document.querySelector(`[data-keyboardnavid="${e}"]`), O = (e) => {
|
|
23
|
+
var n;
|
|
24
|
+
const t = e && e.parentElement && e.parentElement.closest(".k-table-row");
|
|
25
|
+
let r;
|
|
26
|
+
return (n = t == null ? void 0 : t.parentElement) == null || n.childNodes.forEach((l) => {
|
|
27
|
+
if (t === l) {
|
|
28
|
+
const o = l.previousSibling;
|
|
29
|
+
r = {
|
|
30
|
+
current: t.getAttribute("aria-rowindex"),
|
|
31
|
+
prev: o && o.getAttribute("aria-rowindex")
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}), r;
|
|
35
|
+
};
|
|
36
|
+
async function _(e, t, r = 5e3) {
|
|
37
|
+
const n = Date.now();
|
|
38
|
+
if (t)
|
|
39
|
+
for (; Date.now() - n < r; ) {
|
|
40
|
+
const l = t.querySelector(e);
|
|
41
|
+
if (l)
|
|
42
|
+
return l;
|
|
43
|
+
await new Promise((o) => setTimeout(o, 20));
|
|
44
|
+
}
|
|
45
|
+
return !1;
|
|
46
|
+
}
|
|
47
|
+
const K = async (e) => {
|
|
48
|
+
const t = e && e.parentElement && e.parentElement.closest(".k-grid-edit-row");
|
|
49
|
+
return await _("." + B, t);
|
|
50
|
+
}, V = (e) => (e == null ? void 0 : e.closest(".k-table-td")) || null, Y = (e) => e.querySelector(`[${S}]`), P = (e) => e.querySelector(`[${h}]`), le = (e) => e.querySelector(".k-grid-norecords"), oe = (e) => {
|
|
51
|
+
const t = e.querySelector(".k-grid-edit-cell"), r = t && t.querySelector("input");
|
|
52
|
+
r ? r.focus() : (t == null ? void 0 : t.firstChild).focus();
|
|
53
|
+
}, U = (e, t) => {
|
|
20
54
|
const {
|
|
21
55
|
scope: r,
|
|
22
56
|
navigationStateRef: n,
|
|
@@ -24,115 +58,174 @@ const _ = (e, t, r = "cell") => `${t}_${e}_${r}`, D = (e) => {
|
|
|
24
58
|
} = e;
|
|
25
59
|
if (!n.current || !r)
|
|
26
60
|
return;
|
|
27
|
-
const o =
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
const r = t.focusable ?
|
|
61
|
+
const o = Q(n.current.navigationMatrix), s = p(r, o);
|
|
62
|
+
x({ elementForFocus: s, contextStateRef: l, event: t });
|
|
63
|
+
}, j = (e, t = { focusable: !1 }) => {
|
|
64
|
+
const r = t.focusable ? b : y;
|
|
31
65
|
return Array.from(e.querySelectorAll(r.join(",")));
|
|
32
|
-
},
|
|
66
|
+
}, W = (e, t = { level: 0 }) => {
|
|
33
67
|
if (!e)
|
|
34
68
|
return [];
|
|
35
|
-
const r =
|
|
69
|
+
const r = b.map((n) => n + `[${f}='${t.level}']`).join(",");
|
|
36
70
|
return Array.from(e.querySelectorAll(r));
|
|
37
|
-
},
|
|
38
|
-
const t =
|
|
39
|
-
(r) => r + `[${
|
|
71
|
+
}, H = (e = { level: 0 }) => {
|
|
72
|
+
const t = b.map(
|
|
73
|
+
(r) => r + `[${f}='${e.level}']`
|
|
40
74
|
).join(",");
|
|
41
75
|
return (r) => r.matches(t);
|
|
42
|
-
},
|
|
76
|
+
}, x = (e) => {
|
|
43
77
|
const { elementForFocus: t, event: r, contextStateRef: n, prevElement: l } = e;
|
|
44
78
|
if (n.current && t && t.focus) {
|
|
45
79
|
r == null || r.preventDefault();
|
|
46
80
|
const o = t.querySelector(".k-checkbox-wrap .k-checkbox");
|
|
47
|
-
o && o.focus ? o.focus() : t.focus(),
|
|
81
|
+
o && o.focus ? o.focus() : t.focus(), E(t) && (t.setAttribute("tabIndex", "0"), n.current.activeId = I(t)), l && E(l) && l.setAttribute("tabIndex", "-1");
|
|
48
82
|
}
|
|
49
|
-
},
|
|
83
|
+
}, M = (e) => e.current ? e.current.idPrefix : "", X = (e, t, r, n, l) => {
|
|
50
84
|
if (!r)
|
|
51
85
|
return [];
|
|
52
86
|
let o = e + (l ? -1 : 1);
|
|
53
87
|
for (; o >= 0 && o < n.length; ) {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return [
|
|
88
|
+
const s = n[o][t];
|
|
89
|
+
if (s !== r)
|
|
90
|
+
return [s, [o, t]];
|
|
57
91
|
o = o + (l ? -1 : 1);
|
|
58
92
|
}
|
|
59
93
|
return [];
|
|
60
|
-
},
|
|
94
|
+
}, d = (e, t, r, n, l) => {
|
|
61
95
|
if (!r)
|
|
62
96
|
return [];
|
|
63
97
|
let o = t + (l ? -1 : 1);
|
|
64
|
-
for (; o >= 0 && o < n[e].length; ) {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
return [
|
|
98
|
+
for (; o >= 0 && n[e] && o < n[e].length; ) {
|
|
99
|
+
const s = n[e][o];
|
|
100
|
+
if (s !== r)
|
|
101
|
+
return [s, [e, o]];
|
|
68
102
|
o = o + (l ? -1 : 1);
|
|
69
103
|
}
|
|
70
104
|
return [];
|
|
71
|
-
},
|
|
105
|
+
}, A = (e, t) => {
|
|
72
106
|
if (t) {
|
|
73
107
|
for (let r = 0; r < e.length; r++)
|
|
74
108
|
for (let n = 0; n < e[r].length; n++)
|
|
75
109
|
if (e[r][n] === t)
|
|
76
110
|
return [r, n];
|
|
77
111
|
}
|
|
78
|
-
},
|
|
112
|
+
}, C = (e, t, r) => {
|
|
113
|
+
let n;
|
|
114
|
+
do
|
|
115
|
+
if (e = e + 1, n = t[r - e], n && n.editable)
|
|
116
|
+
break;
|
|
117
|
+
while (r - e >= 0);
|
|
118
|
+
return n;
|
|
119
|
+
}, z = (e, t, r, n) => {
|
|
120
|
+
var v;
|
|
121
|
+
let l;
|
|
122
|
+
const [o, s] = e;
|
|
123
|
+
let i;
|
|
124
|
+
const c = 0, a = t.length;
|
|
125
|
+
return i = C(c, t, s), i ? l = d(o, i.ariaColumnIndex, r, n, !0) : (i = C(c, t, a), l = d(o - 1, i.ariaColumnIndex, r, n, !0)), {
|
|
126
|
+
prevCell: l && l[0] && u(l[0]),
|
|
127
|
+
elementToFocus: l && l[0] && ((v = u(l[0])) == null ? void 0 : v.getAttribute("role"))
|
|
128
|
+
};
|
|
129
|
+
}, N = (e, t, r) => {
|
|
130
|
+
let n;
|
|
131
|
+
do
|
|
132
|
+
if (e = e + 1, n = t[r + e], n && n.editable)
|
|
133
|
+
break;
|
|
134
|
+
while (r + e - 1 < t.length);
|
|
135
|
+
return n;
|
|
136
|
+
}, G = (e, t, r, n) => {
|
|
137
|
+
var o;
|
|
138
|
+
let l;
|
|
139
|
+
if (e) {
|
|
140
|
+
const [s, i] = e;
|
|
141
|
+
let c, a = 0;
|
|
142
|
+
c = N(a, t, i), c ? l = d(s, c.ariaColumnIndex, r, n, !0) : (a = -1, c = N(a, t, 0), l = d(s + 1, c.ariaColumnIndex, r, n, !0));
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
nextCell: l && l[0] && u(l[0]),
|
|
146
|
+
elementToFocus: l && l[0] && ((o = u(l[0])) == null ? void 0 : o.getAttribute("role"))
|
|
147
|
+
};
|
|
148
|
+
}, J = (e) => e.current ? e.current.navigationMatrix.length : 0, Q = (e) => e.flat().find((t) => t.endsWith("cell")), se = (e) => e.flat().reverse().find((t) => t.endsWith("cell")), ce = (e, t) => e[t][0], ie = (e, t) => Array.from(e[t]).reverse()[0], Z = (e) => e ? `${e}${T}` : "", ae = (e, t, r) => {
|
|
79
149
|
let n;
|
|
80
150
|
if (e.current && e.current.prevNavigationIndexes) {
|
|
81
|
-
const [l, o] = e.current.prevNavigationIndexes;
|
|
82
|
-
|
|
151
|
+
const [l, o] = e.current.prevNavigationIndexes, s = t[l];
|
|
152
|
+
s && s[o] === r ? n = e.current.prevNavigationIndexes : n = A(t, r);
|
|
83
153
|
} else
|
|
84
|
-
n =
|
|
154
|
+
n = A(t, r);
|
|
85
155
|
return n;
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
156
|
+
}, ee = (e) => {
|
|
157
|
+
var t;
|
|
158
|
+
return ((t = m(e)) == null ? void 0 : t.getAttribute("data-keyboardnavid")) || e.getAttribute("data-keyboardnavid");
|
|
159
|
+
}, ue = {
|
|
160
|
+
generateNavigatableId: $,
|
|
161
|
+
getNavigatableId: I,
|
|
162
|
+
getNavigatableLevel: k,
|
|
163
|
+
getNavigatableElement: F,
|
|
91
164
|
getClosestNavigatableElement: m,
|
|
92
|
-
getActiveNavDataElement:
|
|
93
|
-
getClosestScope:
|
|
94
|
-
getHeaderElement:
|
|
95
|
-
getBodyElement:
|
|
96
|
-
getFocusableElements:
|
|
97
|
-
getNavigatableElements:
|
|
98
|
-
filterNavigatableElements:
|
|
99
|
-
focusElement:
|
|
100
|
-
getIdPrefix:
|
|
101
|
-
isNavigatable:
|
|
102
|
-
findNextIdByRowIndex:
|
|
103
|
-
findNextIdByCellIndex:
|
|
104
|
-
findId:
|
|
105
|
-
getNextNavigationIndex:
|
|
106
|
-
getFilterColumnId:
|
|
107
|
-
focusFirstDataElement:
|
|
165
|
+
getActiveNavDataElement: p,
|
|
166
|
+
getClosestScope: R,
|
|
167
|
+
getHeaderElement: Y,
|
|
168
|
+
getBodyElement: P,
|
|
169
|
+
getFocusableElements: j,
|
|
170
|
+
getNavigatableElements: W,
|
|
171
|
+
filterNavigatableElements: H,
|
|
172
|
+
focusElement: x,
|
|
173
|
+
getIdPrefix: M,
|
|
174
|
+
isNavigatable: E,
|
|
175
|
+
findNextIdByRowIndex: X,
|
|
176
|
+
findNextIdByCellIndex: d,
|
|
177
|
+
findId: A,
|
|
178
|
+
getNextNavigationIndex: J,
|
|
179
|
+
getFilterColumnId: Z,
|
|
180
|
+
focusFirstDataElement: U,
|
|
181
|
+
getClosestCancelButton: L,
|
|
182
|
+
getClosestEditButton: K,
|
|
183
|
+
getRowAriaRowIndex: O,
|
|
184
|
+
getRemoveButtonByAriaRowIndex: q,
|
|
185
|
+
getTableCellByKeyboardNavId: u,
|
|
186
|
+
getParentCell: V,
|
|
187
|
+
waitForElementToBeVisible: _,
|
|
188
|
+
getNextEditableCell: G,
|
|
189
|
+
getPrevEditableCell: z,
|
|
190
|
+
getClosestCellNavId: ee
|
|
108
191
|
};
|
|
109
192
|
export {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
193
|
+
H as filterNavigatableElements,
|
|
194
|
+
A as findId,
|
|
195
|
+
d as findNextIdByCellIndex,
|
|
196
|
+
X as findNextIdByRowIndex,
|
|
197
|
+
x as focusElement,
|
|
198
|
+
U as focusFirstDataElement,
|
|
199
|
+
oe as focusFirstEditor,
|
|
200
|
+
$ as generateNavigatableId,
|
|
201
|
+
p as getActiveNavDataElement,
|
|
202
|
+
P as getBodyElement,
|
|
203
|
+
L as getClosestCancelButton,
|
|
204
|
+
ee as getClosestCellNavId,
|
|
205
|
+
K as getClosestEditButton,
|
|
119
206
|
m as getClosestNavigatableElement,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
207
|
+
R as getClosestScope,
|
|
208
|
+
ae as getCurrentIdIndexes,
|
|
209
|
+
Z as getFilterColumnId,
|
|
210
|
+
Q as getFirstDataCell,
|
|
211
|
+
ce as getFirstRowDataCell,
|
|
212
|
+
j as getFocusableElements,
|
|
213
|
+
Y as getHeaderElement,
|
|
214
|
+
M as getIdPrefix,
|
|
215
|
+
se as getLastDataCell,
|
|
216
|
+
ie as getLastRowDataCell,
|
|
217
|
+
F as getNavigatableElement,
|
|
218
|
+
W as getNavigatableElements,
|
|
219
|
+
I as getNavigatableId,
|
|
220
|
+
k as getNavigatableLevel,
|
|
221
|
+
G as getNextEditableCell,
|
|
222
|
+
J as getNextNavigationIndex,
|
|
223
|
+
le as getNoRecordsElement,
|
|
224
|
+
V as getParentCell,
|
|
225
|
+
z as getPrevEditableCell,
|
|
226
|
+
q as getRemoveButtonByAriaRowIndex,
|
|
227
|
+
O as getRowAriaRowIndex,
|
|
228
|
+
u as getTableCellByKeyboardNavId,
|
|
229
|
+
E as isNavigatable,
|
|
230
|
+
ue as tableKeyboardNavigationTools
|
|
138
231
|
};
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-data-tools",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1722840962,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-data-tools",
|
|
3
|
-
"version": "8.2.0-develop.
|
|
3
|
+
"version": "8.2.0-develop.40",
|
|
4
4
|
"description": "Includes React Pager & React Filter component, an intuitive interface to create complex filter descriptions. KendoReact Data Tools package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"@progress/kendo-data-query": "^1.0.0",
|
|
26
26
|
"@progress/kendo-drawing": "^1.20.1",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "8.2.0-develop.
|
|
29
|
-
"@progress/kendo-react-buttons": "8.2.0-develop.
|
|
30
|
-
"@progress/kendo-react-common": "8.2.0-develop.
|
|
31
|
-
"@progress/kendo-react-dateinputs": "8.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-dropdowns": "8.2.0-develop.
|
|
33
|
-
"@progress/kendo-react-inputs": "8.2.0-develop.
|
|
34
|
-
"@progress/kendo-react-intl": "8.2.0-develop.
|
|
35
|
-
"@progress/kendo-react-popup": "8.2.0-develop.
|
|
28
|
+
"@progress/kendo-react-animation": "8.2.0-develop.40",
|
|
29
|
+
"@progress/kendo-react-buttons": "8.2.0-develop.40",
|
|
30
|
+
"@progress/kendo-react-common": "8.2.0-develop.40",
|
|
31
|
+
"@progress/kendo-react-dateinputs": "8.2.0-develop.40",
|
|
32
|
+
"@progress/kendo-react-dropdowns": "8.2.0-develop.40",
|
|
33
|
+
"@progress/kendo-react-inputs": "8.2.0-develop.40",
|
|
34
|
+
"@progress/kendo-react-intl": "8.2.0-develop.40",
|
|
35
|
+
"@progress/kendo-react-popup": "8.2.0-develop.40",
|
|
36
36
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
37
37
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
38
38
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|