@progress/kendo-react-data-tools 7.3.0-develop.4 → 7.4.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/dist/cdn/js/kendo-react-datatools.js +1 -1
- package/index.d.mts +4 -14
- package/index.d.ts +4 -14
- package/index.js +1 -1
- package/index.mjs +119 -121
- package/navigation/TableKeyboardNavigation.js +1 -1
- package/navigation/TableKeyboardNavigation.mjs +64 -61
- package/navigation/constants.js +1 -1
- package/navigation/constants.mjs +15 -31
- package/navigation/utils.js +1 -1
- package/navigation/utils.mjs +68 -63
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
package/navigation/utils.mjs
CHANGED
|
@@ -6,102 +6,107 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import { FOCUSABLE_ELEMENTS as a, TABBABLE_ELEMENTS as f } from "@progress/kendo-react-common";
|
|
10
|
+
import { KEYBOARD_NAV_DATA_LEVEL as u, KEYBOARD_NAV_DATA_ID as i, KEYBOARD_NAV_DATA_SCOPE as E, KEYBOARD_NAV_DATA_HEADER as g, KEYBOARD_NAV_DATA_BODY as d, KEYBOARD_NAV_FILTER_COL_SUFFIX as b } from "./constants.mjs";
|
|
11
|
+
const _ = (e, t, r = "cell") => `${t}_${e}_${r}`, N = (e) => {
|
|
11
12
|
if (e)
|
|
12
13
|
return parseInt(e.getAttribute(u) || "", 10);
|
|
13
14
|
}, A = (e) => {
|
|
14
15
|
if (!e)
|
|
15
16
|
return;
|
|
16
|
-
const t = e.getAttribute(
|
|
17
|
+
const t = e.getAttribute(i);
|
|
17
18
|
return t || void 0;
|
|
18
|
-
}, s = (e) => e ? !!e.getAttribute(
|
|
19
|
-
let r = t.focusable ?
|
|
19
|
+
}, s = (e) => e ? !!e.getAttribute(i) : !1, v = (e, t = { level: 0 }) => e.querySelector(`[${u}='${t.level}']`), I = (e) => e.parentElement && e.parentElement.closest(`[${u}]`), m = (e, t) => e.querySelector(`[${i}='${t}']`), $ = (e) => e.parentElement && e.parentElement.closest(`[${E}]`), D = (e) => e.querySelector(`[${g}]`), B = (e) => e.querySelector(`[${d}]`), p = (e, t = { focusable: !1 }) => {
|
|
20
|
+
let r = t.focusable ? a : f;
|
|
20
21
|
return Array.from(e.querySelectorAll(r.join(",")));
|
|
21
|
-
},
|
|
22
|
+
}, x = (e, t = { level: 0 }) => {
|
|
22
23
|
if (!e)
|
|
23
24
|
return [];
|
|
24
|
-
let r =
|
|
25
|
+
let r = a.map((l) => l + `[${u}='${t.level}']`).join(",");
|
|
25
26
|
return Array.from(e.querySelectorAll(r));
|
|
26
|
-
},
|
|
27
|
-
let t =
|
|
27
|
+
}, y = (e = { level: 0 }) => {
|
|
28
|
+
let t = a.map(
|
|
28
29
|
(r) => r + `[${u}='${e.level}']`
|
|
29
30
|
).join(",");
|
|
30
31
|
return (r) => r.matches(t);
|
|
31
|
-
},
|
|
32
|
-
const { elementForFocus: t, event: r, contextStateRef:
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
}, S = (e) => {
|
|
33
|
+
const { elementForFocus: t, event: r, contextStateRef: l, prevElement: o } = e;
|
|
34
|
+
if (l.current && t && t.focus) {
|
|
35
|
+
r.preventDefault();
|
|
36
|
+
const n = t.querySelector(".k-checkbox-wrap .k-checkbox");
|
|
37
|
+
n && n.focus ? n.focus() : t.focus(), s(t) && (t.setAttribute("tabIndex", "0"), l.current.activeId = A(t)), o && s(o) && o.setAttribute("tabIndex", "-1");
|
|
38
|
+
}
|
|
39
|
+
}, h = (e) => e.current ? e.current.idPrefix : "", O = (e, t, r, l, o) => {
|
|
35
40
|
if (!r)
|
|
36
41
|
return [];
|
|
37
|
-
let
|
|
38
|
-
for (;
|
|
39
|
-
const c = n
|
|
42
|
+
let n = e + (o ? -1 : 1);
|
|
43
|
+
for (; n >= 0 && n < l.length; ) {
|
|
44
|
+
const c = l[n][t];
|
|
40
45
|
if (c !== r)
|
|
41
|
-
return [c, [
|
|
42
|
-
|
|
46
|
+
return [c, [n, t]];
|
|
47
|
+
n = n + (o ? -1 : 1);
|
|
43
48
|
}
|
|
44
49
|
return [];
|
|
45
|
-
},
|
|
50
|
+
}, T = (e, t, r, l, o) => {
|
|
46
51
|
if (!r)
|
|
47
52
|
return [];
|
|
48
|
-
let
|
|
49
|
-
for (;
|
|
50
|
-
const c =
|
|
53
|
+
let n = t + (o ? -1 : 1);
|
|
54
|
+
for (; n >= 0 && n < l[e].length; ) {
|
|
55
|
+
const c = l[e][n];
|
|
51
56
|
if (c !== r)
|
|
52
|
-
return [c, [e,
|
|
53
|
-
|
|
57
|
+
return [c, [e, n]];
|
|
58
|
+
n = n + (o ? -1 : 1);
|
|
54
59
|
}
|
|
55
60
|
return [];
|
|
56
|
-
},
|
|
61
|
+
}, C = (e, t) => {
|
|
57
62
|
if (t) {
|
|
58
63
|
for (let r = 0; r < e.length; r++)
|
|
59
|
-
for (let
|
|
60
|
-
if (e[r][
|
|
61
|
-
return [r,
|
|
64
|
+
for (let l = 0; l < e[r].length; l++)
|
|
65
|
+
if (e[r][l] === t)
|
|
66
|
+
return [r, l];
|
|
62
67
|
}
|
|
63
|
-
},
|
|
64
|
-
generateNavigatableId:
|
|
68
|
+
}, L = (e) => e.current ? e.current.navigationMatrix.length : 0, F = (e) => e ? `${e}${b}` : "", R = {
|
|
69
|
+
generateNavigatableId: _,
|
|
65
70
|
getNavigatableId: A,
|
|
66
|
-
getNavigatableLevel:
|
|
67
|
-
getNavigatableElement:
|
|
68
|
-
getClosestNavigatableElement:
|
|
69
|
-
|
|
70
|
-
getClosestScope:
|
|
71
|
-
getHeaderElement:
|
|
72
|
-
getBodyElement:
|
|
73
|
-
getFocusableElements:
|
|
74
|
-
getNavigatableElements:
|
|
75
|
-
filterNavigatableElements:
|
|
76
|
-
focusElement:
|
|
77
|
-
getIdPrefix:
|
|
71
|
+
getNavigatableLevel: N,
|
|
72
|
+
getNavigatableElement: v,
|
|
73
|
+
getClosestNavigatableElement: I,
|
|
74
|
+
getActiveNavDataElement: m,
|
|
75
|
+
getClosestScope: $,
|
|
76
|
+
getHeaderElement: D,
|
|
77
|
+
getBodyElement: B,
|
|
78
|
+
getFocusableElements: p,
|
|
79
|
+
getNavigatableElements: x,
|
|
80
|
+
filterNavigatableElements: y,
|
|
81
|
+
focusElement: S,
|
|
82
|
+
getIdPrefix: h,
|
|
78
83
|
isNavigatable: s,
|
|
79
|
-
findNextIdByRowIndex:
|
|
80
|
-
findNextIdByCellIndex:
|
|
81
|
-
findId:
|
|
82
|
-
getNextNavigationIndex:
|
|
84
|
+
findNextIdByRowIndex: O,
|
|
85
|
+
findNextIdByCellIndex: T,
|
|
86
|
+
findId: C,
|
|
87
|
+
getNextNavigationIndex: L,
|
|
83
88
|
getFilterColumnId: F
|
|
84
89
|
};
|
|
85
90
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
y as filterNavigatableElements,
|
|
92
|
+
C as findId,
|
|
93
|
+
T as findNextIdByCellIndex,
|
|
94
|
+
O as findNextIdByRowIndex,
|
|
95
|
+
S as focusElement,
|
|
96
|
+
_ as generateNavigatableId,
|
|
97
|
+
m as getActiveNavDataElement,
|
|
98
|
+
B as getBodyElement,
|
|
99
|
+
I as getClosestNavigatableElement,
|
|
100
|
+
$ as getClosestScope,
|
|
96
101
|
F as getFilterColumnId,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
p as getFocusableElements,
|
|
103
|
+
D as getHeaderElement,
|
|
104
|
+
h as getIdPrefix,
|
|
105
|
+
v as getNavigatableElement,
|
|
106
|
+
x as getNavigatableElements,
|
|
102
107
|
A as getNavigatableId,
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
N as getNavigatableLevel,
|
|
109
|
+
L as getNextNavigationIndex,
|
|
105
110
|
s as isNavigatable,
|
|
106
111
|
R as tableKeyboardNavigationTools
|
|
107
112
|
};
|
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: 1711098642,
|
|
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": "7.
|
|
3
|
+
"version": "7.4.0-develop.1",
|
|
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.19.0",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "7.
|
|
29
|
-
"@progress/kendo-react-buttons": "7.
|
|
30
|
-
"@progress/kendo-react-common": "7.
|
|
31
|
-
"@progress/kendo-react-dateinputs": "7.
|
|
32
|
-
"@progress/kendo-react-dropdowns": "7.
|
|
33
|
-
"@progress/kendo-react-inputs": "7.
|
|
34
|
-
"@progress/kendo-react-intl": "7.
|
|
35
|
-
"@progress/kendo-react-popup": "7.
|
|
28
|
+
"@progress/kendo-react-animation": "7.4.0-develop.1",
|
|
29
|
+
"@progress/kendo-react-buttons": "7.4.0-develop.1",
|
|
30
|
+
"@progress/kendo-react-common": "7.4.0-develop.1",
|
|
31
|
+
"@progress/kendo-react-dateinputs": "7.4.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-dropdowns": "7.4.0-develop.1",
|
|
33
|
+
"@progress/kendo-react-inputs": "7.4.0-develop.1",
|
|
34
|
+
"@progress/kendo-react-intl": "7.4.0-develop.1",
|
|
35
|
+
"@progress/kendo-react-popup": "7.4.0-develop.1",
|
|
36
36
|
"@progress/kendo-svg-icons": "^2.1.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"
|