@progress/kendo-react-data-tools 13.3.0-develop.1 → 13.3.0-develop.3
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 +231 -9
- package/index.d.ts +231 -9
- package/index.js +1 -1
- package/index.mjs +175 -168
- package/navigation/TableKeyboardNavigation.js +1 -1
- package/navigation/TableKeyboardNavigation.mjs +38 -47
- package/navigation/stackedKeyboardNavigation.js +8 -0
- package/navigation/stackedKeyboardNavigation.mjs +73 -0
- package/navigation/utils.js +1 -1
- package/navigation/utils.mjs +113 -93
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./utils.js"),K=e=>e==="ArrowLeft"||e==="ArrowRight"||e==="ArrowUp"||e==="ArrowDown"||e==="PageUp"||e==="PageDown"||e==="Home"||e==="End",d=(e,t,r,n,o,i)=>{if(n&&o==="inline")return!1;if(n&&o==="incell"){e.preventDefault(),e.stopPropagation();const u=f.getStackedCellContainer(t);if(!u)return!0;const C=Array.from(u.querySelectorAll(".k-grid-stack-cell")),S=C.indexOf(t);if(S===-1)return!0;const y=e.shiftKey?-1:1,h=S+y;return h<0||h>=C.length||i&&i(y),!0}const c=f.getStackedCellContainer(t);if(!c)return!1;const a=Array.from(c.querySelectorAll(".k-grid-stack-cell")),l=a.indexOf(t);if(l===-1)return!1;if(e.shiftKey){if(l===0)return e.stopPropagation(),e.preventDefault(),!0;e.preventDefault();const u=a[l-1];return u&&f.focusStackedCellElement(u,0),!0}if(l===a.length-1)return e.stopPropagation(),e.preventDefault(),!0;e.preventDefault();const s=a[l+1];return s&&f.focusStackedCellElement(s,0),!0},g=(e,t,r,n,o)=>n&&o==="incell"||n&&o==="inline"?!1:r===t?(e.preventDefault(),f.focusStackedCellElement(t,0),!0):!1,p=(e,t,r,n,o,i)=>{if(e.preventDefault(),e.stopPropagation(),o&&i==="incell"){const a=document.activeElement;return a&&t.contains(a)&&a.blur(),t.focus(),n&&n(),r&&r(),!0}if(o&&i==="inline")return r&&r(),!1;const c=f.getStackedCellContainer(t);return r&&r(),c&&c.focus(),!0},k=(e,t,r)=>{if(!t)return!1;const n=e.key,i=e.target.closest(".k-animation-container, .k-popup, .k-list-container");return r==="incell"&&K(n)&&!i||r==="inline"&&(n==="ArrowUp"||n==="ArrowDown")&&!i?(e.preventDefault(),e.stopPropagation(),!0):!1},w=e=>{const{event:t,cellElement:r,onKeyDown:n,onEscape:o,onExitEdit:i,onTabToNextCell:c,isInEdit:a,editMode:l}=e,s=t.target;k(t,a,l)||(t.key==="Tab"&&d(t,r,s,a,l,c),(t.key==="Enter"||t.key==="F2")&&g(t,r,s,a,l),t.key==="Escape"&&p(t,r,o,i,a,l),n&&n(t))},D={handleStackedKeyboardNavigation:w,handleStackedCellTabNavigation:d,handleStackedCellEnterKey:g,handleStackedCellEscapeKey:p,handleNavigationKeysInEditMode:k,isNavigationKey:K};exports.handleNavigationKeysInEditMode=k;exports.handleStackedCellEnterKey=g;exports.handleStackedCellEscapeKey=p;exports.handleStackedCellTabNavigation=d;exports.handleStackedKeyboardNavigation=w;exports.stackedKeyboardNavigationTools=D;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { getStackedCellContainer as c, focusStackedCellElement as p } from "./utils.mjs";
|
|
9
|
+
const w = (t) => t === "ArrowLeft" || t === "ArrowRight" || t === "ArrowUp" || t === "ArrowDown" || t === "PageUp" || t === "PageDown" || t === "Home" || t === "End", D = (t, r, e, n, i, a) => {
|
|
10
|
+
if (n && i === "inline")
|
|
11
|
+
return !1;
|
|
12
|
+
if (n && i === "incell") {
|
|
13
|
+
t.preventDefault(), t.stopPropagation();
|
|
14
|
+
const s = c(r);
|
|
15
|
+
if (!s)
|
|
16
|
+
return !0;
|
|
17
|
+
const g = Array.from(s.querySelectorAll(".k-grid-stack-cell")), d = g.indexOf(r);
|
|
18
|
+
if (d === -1)
|
|
19
|
+
return !0;
|
|
20
|
+
const k = t.shiftKey ? -1 : 1, C = d + k;
|
|
21
|
+
return C < 0 || C >= g.length || a && a(k), !0;
|
|
22
|
+
}
|
|
23
|
+
const f = c(r);
|
|
24
|
+
if (!f)
|
|
25
|
+
return !1;
|
|
26
|
+
const o = Array.from(f.querySelectorAll(".k-grid-stack-cell")), l = o.indexOf(r);
|
|
27
|
+
if (l === -1)
|
|
28
|
+
return !1;
|
|
29
|
+
if (t.shiftKey) {
|
|
30
|
+
if (l === 0)
|
|
31
|
+
return t.stopPropagation(), t.preventDefault(), !0;
|
|
32
|
+
t.preventDefault();
|
|
33
|
+
const s = o[l - 1];
|
|
34
|
+
return s && p(s, 0), !0;
|
|
35
|
+
}
|
|
36
|
+
if (l === o.length - 1)
|
|
37
|
+
return t.stopPropagation(), t.preventDefault(), !0;
|
|
38
|
+
t.preventDefault();
|
|
39
|
+
const u = o[l + 1];
|
|
40
|
+
return u && p(u, 0), !0;
|
|
41
|
+
}, y = (t, r, e, n, i) => n && i === "incell" || n && i === "inline" ? !1 : e === r ? (t.preventDefault(), p(r, 0), !0) : !1, h = (t, r, e, n, i, a) => {
|
|
42
|
+
if (t.preventDefault(), t.stopPropagation(), i && a === "incell") {
|
|
43
|
+
const o = document.activeElement;
|
|
44
|
+
return o && r.contains(o) && o.blur(), r.focus(), n && n(), e && e(), !0;
|
|
45
|
+
}
|
|
46
|
+
if (i && a === "inline")
|
|
47
|
+
return e && e(), !1;
|
|
48
|
+
const f = c(r);
|
|
49
|
+
return e && e(), f && f.focus(), !0;
|
|
50
|
+
}, A = (t, r, e) => {
|
|
51
|
+
if (!r)
|
|
52
|
+
return !1;
|
|
53
|
+
const n = t.key, a = t.target.closest(".k-animation-container, .k-popup, .k-list-container");
|
|
54
|
+
return e === "incell" && w(n) && !a || e === "inline" && (n === "ArrowUp" || n === "ArrowDown") && !a ? (t.preventDefault(), t.stopPropagation(), !0) : !1;
|
|
55
|
+
}, S = (t) => {
|
|
56
|
+
const { event: r, cellElement: e, onKeyDown: n, onEscape: i, onExitEdit: a, onTabToNextCell: f, isInEdit: o, editMode: l } = t, u = r.target;
|
|
57
|
+
A(r, o, l) || (r.key === "Tab" && D(r, e, u, o, l, f), (r.key === "Enter" || r.key === "F2") && y(r, e, u, o, l), r.key === "Escape" && h(r, e, i, a, o, l), n && n(r));
|
|
58
|
+
}, P = {
|
|
59
|
+
handleStackedKeyboardNavigation: S,
|
|
60
|
+
handleStackedCellTabNavigation: D,
|
|
61
|
+
handleStackedCellEnterKey: y,
|
|
62
|
+
handleStackedCellEscapeKey: h,
|
|
63
|
+
handleNavigationKeysInEditMode: A,
|
|
64
|
+
isNavigationKey: w
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
A as handleNavigationKeysInEditMode,
|
|
68
|
+
y as handleStackedCellEnterKey,
|
|
69
|
+
h as handleStackedCellEscapeKey,
|
|
70
|
+
D as handleStackedCellTabNavigation,
|
|
71
|
+
S as handleStackedKeyboardNavigation,
|
|
72
|
+
P as stackedKeyboardNavigationTools
|
|
73
|
+
};
|
package/navigation/utils.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@progress/kendo-react-common"),a=require("./constants.js"),B=(e,t,n="cell")=>`${t}_${e}_${n}`,
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@progress/kendo-react-common"),a=require("./constants.js"),B=(e,t,n="cell")=>`${t}_${e}_${n}`,S=e=>{if(e)return parseInt(e.getAttribute(a.KEYBOARD_NAV_DATA_LEVEL)||"",10)},b=e=>{if(!e)return;const t=e.getAttribute(a.KEYBOARD_NAV_DATA_ID);return t||void 0},A=e=>e?!!e.getAttribute(a.KEYBOARD_NAV_DATA_ID):!1,y=(e,t={level:0})=>e.querySelector(`[${a.KEYBOARD_NAV_DATA_LEVEL}='${t.level}']`),C=e=>e&&e.parentElement&&e.parentElement.closest(`[${a.KEYBOARD_NAV_DATA_LEVEL}]`),N=(e,t)=>e.querySelector(`[${a.KEYBOARD_NAV_DATA_ID}='${t}']`),k=e=>e&&e.parentElement&&e.parentElement.closest(`[${a.KEYBOARD_NAV_DATA_SCOPE}]`),p=e=>{var n;const t=((n=e==null?void 0:e.parentElement)==null?void 0:n.closest(".k-grid-edit-row"))||null;return t==null?void 0:t.querySelector("."+a.KEYBOARD_NAV_CANCEL_BUTTON_CLASS)},T=e=>document.querySelector(`[aria-rowindex="${e}"] .k-grid-remove-command`),u=e=>document.querySelector(`[data-keyboardnavid="${e}"]`),w=e=>{var r;const t=e&&e.parentElement&&e.parentElement.closest(".k-table-row");let n;return(r=t==null?void 0:t.parentElement)==null||r.childNodes.forEach(l=>{if(t===l){const o=l.previousSibling;n={current:t.getAttribute("aria-rowindex"),prev:o&&o.getAttribute("aria-rowindex")}}}),n};async function L(e,t,n=5e3){const r=Date.now();if(t)for(;Date.now()-r<n;){const l=t.querySelector(e);if(l)return l;await new Promise(o=>setTimeout(o,20))}return!1}const R=async e=>{var r;const t=((r=e==null?void 0:e.parentElement)==null?void 0:r.closest(".k-grid-edit-row"))||null;return await L("."+a.KEYBOARD_NAV_EDIT_BUTTON_CLASS,t)},F=e=>(e==null?void 0:e.closest(".k-table-td"))||null,h=e=>e.querySelector(`[${a.KEYBOARD_NAV_DATA_HEADER}]`),O=e=>e.querySelector(`[${a.KEYBOARD_NAV_DATA_BODY}]`),Q=e=>e.querySelector(".k-grid-norecords"),Z=e=>{const t=e.querySelector(".k-grid-edit-cell"),n=t==null?void 0:t.querySelector("input");n?n.focus():t&&t.firstChild.focus()},V=(e,t)=>{const{scope:n,navigationStateRef:r,contextStateRef:l}=e;if(!r.current||!n)return;const o=W(r.current.navigationMatrix),s=N(n,o);I({elementForFocus:s,contextStateRef:l,event:t})},v=(e,t={focusable:!1})=>{const n=t.focusable?g.FOCUSABLE_ELEMENTS:g.TABBABLE_ELEMENTS;return Array.from(e.querySelectorAll(n.join(",")))},$=(e,t={level:0})=>{if(!e)return[];const n=g.FOCUSABLE_ELEMENTS.map(r=>r+`[${a.KEYBOARD_NAV_DATA_LEVEL}='${t.level}']`).join(",");return Array.from(e.querySelectorAll(n))},K=(e={level:0})=>{const t=g.FOCUSABLE_ELEMENTS.map(n=>n+`[${a.KEYBOARD_NAV_DATA_LEVEL}='${e.level}']`).join(",");return n=>n.matches(t)},I=e=>{const{elementForFocus:t,event:n,contextStateRef:r,prevElement:l}=e;if(r.current&&t&&t.focus){n==null||n.preventDefault();const o=t.querySelector(".k-checkbox-wrap .k-checkbox");o&&o.focus?o.focus():t.focus(),A(t)&&(t.setAttribute("tabIndex","0"),r.current.activeId=b(t)),l&&A(l)&&l.setAttribute("tabIndex","-1")}},q=e=>e.current?e.current.idPrefix:"",Y=(e,t,n,r,l)=>{if(!n)return[];let o=e+(l?-1:1);for(;o>=0&&o<r.length;){const s=r[o][t];if(s!==n)return[s,[o,t]];o=o+(l?-1:1)}return[]},d=(e,t,n,r,l)=>{if(!n)return[];let o=t+(l?-1:1);for(;o>=0&&r[e]&&o<r[e].length;){const s=r[e][o];if(s!==n)return[s,[e,o]];o=o+(l?-1:1)}return[]},f=(e,t)=>{if(t){for(let n=0;n<e.length;n++)for(let r=0;r<e[n].length;r++)if(e[n][r]===t)return[n,r]}},D=(e,t,n)=>{let r;do if(e=e+1,r=t[n-e],r&&r.editable)break;while(n-e>=0);return r},P=(e,t,n,r)=>{var m;let l;const[o,s]=e;let c;const i=0,E=t.length;return c=D(i,t,s),c?l=d(o,c.ariaColumnIndex,n,r,!0):(c=D(i,t,E),l=d(o-1,c.ariaColumnIndex,n,r,!0)),{prevCell:l&&l[0]&&u(l[0]),elementToFocus:l&&l[0]&&((m=u(l[0]))==null?void 0:m.getAttribute("role"))}},x=(e,t,n)=>{let r;do if(e=e+1,r=t[n+e],r&&r.editable)break;while(n+e-1<t.length);return r},U=(e,t,n,r)=>{var o;let l;if(e){const[s,c]=e;let i,E=0;i=x(E,t,c),i?l=d(s,i.ariaColumnIndex,n,r,!0):(E=-1,i=x(E,t,0),l=d(s+1,i.ariaColumnIndex,n,r,!0))}return{nextCell:l&&l[0]&&u(l[0]),elementToFocus:l&&l[0]&&((o=u(l[0]))==null?void 0:o.getAttribute("role"))}},M=e=>e.current?e.current.navigationMatrix.length:0,W=e=>e.flat().find(t=>t.endsWith("cell")),ee=e=>e.flat().reverse().find(t=>t.endsWith("cell")),te=(e,t)=>e[t][0],ne=(e,t)=>Array.from(e[t]).reverse()[0],j=e=>e?`${e}${a.KEYBOARD_NAV_FILTER_COL_SUFFIX}`:"",re=(e,t,n)=>{var l;let r;if((l=e.current)!=null&&l.prevNavigationIndexes){const[o,s]=e.current.prevNavigationIndexes,c=t[o];c&&c[s]===n?r=e.current.prevNavigationIndexes:r=f(t,n)}else r=f(t,n);return r},H=e=>{var t;return((t=C(e))==null?void 0:t.getAttribute("data-keyboardnavid"))||e.getAttribute("data-keyboardnavid")},X=e=>e.closest(".k-grid-stack-cell"),_=e=>v(e,{focusable:!0}),z=(e,t)=>{var o;const n=e.closest(".k-table-td");if(!n)return null;const r=Array.from(n.querySelectorAll(".k-grid-stack-cell")),l=r.indexOf(e);return l===-1?null:t==="next"?l<r.length-1?r[l+1]:r[0]:l>0?r[l-1]:(o=r.at(-1))!=null?o:null},G=e=>e.closest(".k-table-td, td.k-table-td[tabindex]"),J=(e,t=0)=>{const n=_(e);n.length>0?(n[t]||n[0]).focus():e.focus()},le={generateNavigatableId:B,getNavigatableId:b,getNavigatableLevel:S,getNavigatableElement:y,getClosestNavigatableElement:C,getActiveNavDataElement:N,getClosestScope:k,getHeaderElement:h,getBodyElement:O,getFocusableElements:v,getNavigatableElements:$,filterNavigatableElements:K,focusElement:I,getIdPrefix:q,isNavigatable:A,findNextIdByRowIndex:Y,findNextIdByCellIndex:d,findId:f,getNextNavigationIndex:M,getFilterColumnId:j,focusFirstDataElement:V,getClosestCancelButton:p,getClosestEditButton:R,getRowAriaRowIndex:w,getRemoveButtonByAriaRowIndex:T,getTableCellByKeyboardNavId:u,getParentCell:F,waitForElementToBeVisible:L,getNextEditableCell:U,getPrevEditableCell:P,getClosestCellNavId:H,getStackedCellWrapper:X,getStackedCellFocusableElements:_,getNextStackedCell:z,getStackedCellContainer:G,focusStackedCellElement:J};exports.filterNavigatableElements=K;exports.findId=f;exports.findNextIdByCellIndex=d;exports.findNextIdByRowIndex=Y;exports.focusElement=I;exports.focusFirstDataElement=V;exports.focusFirstEditor=Z;exports.focusStackedCellElement=J;exports.generateNavigatableId=B;exports.getActiveNavDataElement=N;exports.getBodyElement=O;exports.getClosestCancelButton=p;exports.getClosestCellNavId=H;exports.getClosestEditButton=R;exports.getClosestNavigatableElement=C;exports.getClosestScope=k;exports.getCurrentIdIndexes=re;exports.getFilterColumnId=j;exports.getFirstDataCell=W;exports.getFirstRowDataCell=te;exports.getFocusableElements=v;exports.getHeaderElement=h;exports.getIdPrefix=q;exports.getLastDataCell=ee;exports.getLastRowDataCell=ne;exports.getNavigatableElement=y;exports.getNavigatableElements=$;exports.getNavigatableId=b;exports.getNavigatableLevel=S;exports.getNextEditableCell=U;exports.getNextNavigationIndex=M;exports.getNextStackedCell=z;exports.getNoRecordsElement=Q;exports.getParentCell=F;exports.getPrevEditableCell=P;exports.getRemoveButtonByAriaRowIndex=T;exports.getRowAriaRowIndex=w;exports.getStackedCellContainer=G;exports.getStackedCellFocusableElements=_;exports.getStackedCellWrapper=X;exports.getTableCellByKeyboardNavId=u;exports.isNavigatable=A;exports.tableKeyboardNavigationTools=le;
|
package/navigation/utils.mjs
CHANGED
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { FOCUSABLE_ELEMENTS as
|
|
9
|
-
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 B, KEYBOARD_NAV_EDIT_BUTTON_CLASS as w, KEYBOARD_NAV_DATA_HEADER as
|
|
10
|
-
const
|
|
8
|
+
import { FOCUSABLE_ELEMENTS as A, TABBABLE_ELEMENTS as k } from "@progress/kendo-react-common";
|
|
9
|
+
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 B, KEYBOARD_NAV_EDIT_BUTTON_CLASS as w, KEYBOARD_NAV_DATA_HEADER as h, KEYBOARD_NAV_DATA_BODY as T, KEYBOARD_NAV_FILTER_COL_SUFFIX as $ } from "./constants.mjs";
|
|
10
|
+
const F = (e, t, r = "cell") => `${t}_${e}_${r}`, q = (e) => {
|
|
11
11
|
if (e)
|
|
12
12
|
return parseInt(e.getAttribute(f) || "", 10);
|
|
13
|
-
},
|
|
13
|
+
}, m = (e) => {
|
|
14
14
|
if (!e)
|
|
15
15
|
return;
|
|
16
16
|
const t = e.getAttribute(g);
|
|
17
17
|
return t || void 0;
|
|
18
|
-
}, E = (e) => e ? !!e.getAttribute(g) : !1,
|
|
18
|
+
}, E = (e) => e ? !!e.getAttribute(g) : !1, L = (e, t = { level: 0 }) => e.querySelector(`[${f}='${t.level}']`), x = (e) => e && e.parentElement && e.parentElement.closest(`[${f}]`), I = (e, t) => e.querySelector(`[${g}='${t}']`), O = (e) => e && e.parentElement && e.parentElement.closest(`[${D}]`), R = (e) => {
|
|
19
19
|
var r;
|
|
20
20
|
const t = ((r = e == null ? void 0 : e.parentElement) == null ? void 0 : r.closest(".k-grid-edit-row")) || null;
|
|
21
21
|
return t == null ? void 0 : t.querySelector("." + B);
|
|
22
|
-
},
|
|
22
|
+
}, K = (e) => document.querySelector(`[aria-rowindex="${e}"] .k-grid-remove-command`), a = (e) => document.querySelector(`[data-keyboardnavid="${e}"]`), V = (e) => {
|
|
23
23
|
var n;
|
|
24
24
|
const t = e && e.parentElement && e.parentElement.closest(".k-table-row");
|
|
25
25
|
let r;
|
|
@@ -44,38 +44,38 @@ async function p(e, t, r = 5e3) {
|
|
|
44
44
|
}
|
|
45
45
|
return !1;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const Y = async (e) => {
|
|
48
48
|
var n;
|
|
49
49
|
const t = ((n = e == null ? void 0 : e.parentElement) == null ? void 0 : n.closest(".k-grid-edit-row")) || null;
|
|
50
50
|
return await p("." + w, t);
|
|
51
|
-
},
|
|
51
|
+
}, P = (e) => (e == null ? void 0 : e.closest(".k-table-td")) || null, U = (e) => e.querySelector(`[${h}]`), W = (e) => e.querySelector(`[${T}]`), ue = (e) => e.querySelector(".k-grid-norecords"), ae = (e) => {
|
|
52
52
|
const t = e.querySelector(".k-grid-edit-cell"), r = t == null ? void 0 : t.querySelector("input");
|
|
53
53
|
r ? r.focus() : t && t.firstChild.focus();
|
|
54
|
-
},
|
|
54
|
+
}, j = (e, t) => {
|
|
55
55
|
const { scope: r, navigationStateRef: n, contextStateRef: l } = e;
|
|
56
56
|
if (!n.current || !r)
|
|
57
57
|
return;
|
|
58
|
-
const o =
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
const r = t.focusable ?
|
|
58
|
+
const o = Z(n.current.navigationMatrix), s = I(r, o);
|
|
59
|
+
_({ elementForFocus: s, contextStateRef: l, event: t });
|
|
60
|
+
}, y = (e, t = { focusable: !1 }) => {
|
|
61
|
+
const r = t.focusable ? A : k;
|
|
62
62
|
return Array.from(e.querySelectorAll(r.join(",")));
|
|
63
|
-
},
|
|
63
|
+
}, H = (e, t = { level: 0 }) => {
|
|
64
64
|
if (!e)
|
|
65
65
|
return [];
|
|
66
|
-
const r =
|
|
66
|
+
const r = A.map((n) => n + `[${f}='${t.level}']`).join(",");
|
|
67
67
|
return Array.from(e.querySelectorAll(r));
|
|
68
|
-
},
|
|
69
|
-
const t =
|
|
68
|
+
}, M = (e = { level: 0 }) => {
|
|
69
|
+
const t = A.map((r) => r + `[${f}='${e.level}']`).join(",");
|
|
70
70
|
return (r) => r.matches(t);
|
|
71
|
-
},
|
|
71
|
+
}, _ = (e) => {
|
|
72
72
|
const { elementForFocus: t, event: r, contextStateRef: n, prevElement: l } = e;
|
|
73
73
|
if (n.current && t && t.focus) {
|
|
74
74
|
r == null || r.preventDefault();
|
|
75
75
|
const o = t.querySelector(".k-checkbox-wrap .k-checkbox");
|
|
76
|
-
o && o.focus ? o.focus() : t.focus(), E(t) && (t.setAttribute("tabIndex", "0"), n.current.activeId =
|
|
76
|
+
o && o.focus ? o.focus() : t.focus(), E(t) && (t.setAttribute("tabIndex", "0"), n.current.activeId = m(t)), l && E(l) && l.setAttribute("tabIndex", "-1");
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, X = (e) => e.current ? e.current.idPrefix : "", z = (e, t, r, n, l) => {
|
|
79
79
|
if (!r)
|
|
80
80
|
return [];
|
|
81
81
|
let o = e + (l ? -1 : 1);
|
|
@@ -97,29 +97,29 @@ const K = async (e) => {
|
|
|
97
97
|
o = o + (l ? -1 : 1);
|
|
98
98
|
}
|
|
99
99
|
return [];
|
|
100
|
-
},
|
|
100
|
+
}, b = (e, t) => {
|
|
101
101
|
if (t) {
|
|
102
102
|
for (let r = 0; r < e.length; r++)
|
|
103
103
|
for (let n = 0; n < e[r].length; n++)
|
|
104
104
|
if (e[r][n] === t)
|
|
105
105
|
return [r, n];
|
|
106
106
|
}
|
|
107
|
-
},
|
|
107
|
+
}, v = (e, t, r) => {
|
|
108
108
|
let n;
|
|
109
109
|
do
|
|
110
110
|
if (e = e + 1, n = t[r - e], n && n.editable)
|
|
111
111
|
break;
|
|
112
112
|
while (r - e >= 0);
|
|
113
113
|
return n;
|
|
114
|
-
},
|
|
115
|
-
var
|
|
114
|
+
}, G = (e, t, r, n) => {
|
|
115
|
+
var C;
|
|
116
116
|
let l;
|
|
117
117
|
const [o, s] = e;
|
|
118
118
|
let c;
|
|
119
119
|
const i = 0, u = t.length;
|
|
120
|
-
return c =
|
|
120
|
+
return c = v(i, t, s), c ? l = d(o, c.ariaColumnIndex, r, n, !0) : (c = v(i, t, u), l = d(o - 1, c.ariaColumnIndex, r, n, !0)), {
|
|
121
121
|
prevCell: l && l[0] && a(l[0]),
|
|
122
|
-
elementToFocus: l && l[0] && ((
|
|
122
|
+
elementToFocus: l && l[0] && ((C = a(l[0])) == null ? void 0 : C.getAttribute("role"))
|
|
123
123
|
};
|
|
124
124
|
}, N = (e, t, r) => {
|
|
125
125
|
let n;
|
|
@@ -128,7 +128,7 @@ const K = async (e) => {
|
|
|
128
128
|
break;
|
|
129
129
|
while (r + e - 1 < t.length);
|
|
130
130
|
return n;
|
|
131
|
-
},
|
|
131
|
+
}, J = (e, t, r, n) => {
|
|
132
132
|
var o;
|
|
133
133
|
let l;
|
|
134
134
|
if (e) {
|
|
@@ -140,88 +140,108 @@ const K = async (e) => {
|
|
|
140
140
|
nextCell: l && l[0] && a(l[0]),
|
|
141
141
|
elementToFocus: l && l[0] && ((o = a(l[0])) == null ? void 0 : o.getAttribute("role"))
|
|
142
142
|
};
|
|
143
|
-
},
|
|
143
|
+
}, Q = (e) => e.current ? e.current.navigationMatrix.length : 0, Z = (e) => e.flat().find((t) => t.endsWith("cell")), de = (e) => e.flat().reverse().find((t) => t.endsWith("cell")), fe = (e, t) => e[t][0], Ee = (e, t) => Array.from(e[t]).reverse()[0], ee = (e) => e ? `${e}${$}` : "", be = (e, t, r) => {
|
|
144
144
|
var l;
|
|
145
145
|
let n;
|
|
146
146
|
if ((l = e.current) != null && l.prevNavigationIndexes) {
|
|
147
147
|
const [o, s] = e.current.prevNavigationIndexes, c = t[o];
|
|
148
|
-
c && c[s] === r ? n = e.current.prevNavigationIndexes : n =
|
|
148
|
+
c && c[s] === r ? n = e.current.prevNavigationIndexes : n = b(t, r);
|
|
149
149
|
} else
|
|
150
|
-
n =
|
|
150
|
+
n = b(t, r);
|
|
151
151
|
return n;
|
|
152
|
-
},
|
|
152
|
+
}, te = (e) => {
|
|
153
153
|
var t;
|
|
154
|
-
return ((t =
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
154
|
+
return ((t = x(e)) == null ? void 0 : t.getAttribute("data-keyboardnavid")) || e.getAttribute("data-keyboardnavid");
|
|
155
|
+
}, re = (e) => e.closest(".k-grid-stack-cell"), S = (e) => y(e, { focusable: !0 }), ne = (e, t) => {
|
|
156
|
+
var o;
|
|
157
|
+
const r = e.closest(".k-table-td");
|
|
158
|
+
if (!r)
|
|
159
|
+
return null;
|
|
160
|
+
const n = Array.from(r.querySelectorAll(".k-grid-stack-cell")), l = n.indexOf(e);
|
|
161
|
+
return l === -1 ? null : t === "next" ? l < n.length - 1 ? n[l + 1] : n[0] : l > 0 ? n[l - 1] : (o = n.at(-1)) != null ? o : null;
|
|
162
|
+
}, le = (e) => e.closest(".k-table-td, td.k-table-td[tabindex]"), oe = (e, t = 0) => {
|
|
163
|
+
const r = S(e);
|
|
164
|
+
r.length > 0 ? (r[t] || r[0]).focus() : e.focus();
|
|
165
|
+
}, Ae = {
|
|
166
|
+
generateNavigatableId: F,
|
|
167
|
+
getNavigatableId: m,
|
|
168
|
+
getNavigatableLevel: q,
|
|
169
|
+
getNavigatableElement: L,
|
|
170
|
+
getClosestNavigatableElement: x,
|
|
171
|
+
getActiveNavDataElement: I,
|
|
172
|
+
getClosestScope: O,
|
|
173
|
+
getHeaderElement: U,
|
|
174
|
+
getBodyElement: W,
|
|
175
|
+
getFocusableElements: y,
|
|
176
|
+
getNavigatableElements: H,
|
|
177
|
+
filterNavigatableElements: M,
|
|
178
|
+
focusElement: _,
|
|
179
|
+
getIdPrefix: X,
|
|
170
180
|
isNavigatable: E,
|
|
171
|
-
findNextIdByRowIndex:
|
|
181
|
+
findNextIdByRowIndex: z,
|
|
172
182
|
findNextIdByCellIndex: d,
|
|
173
|
-
findId:
|
|
174
|
-
getNextNavigationIndex:
|
|
175
|
-
getFilterColumnId:
|
|
176
|
-
focusFirstDataElement:
|
|
183
|
+
findId: b,
|
|
184
|
+
getNextNavigationIndex: Q,
|
|
185
|
+
getFilterColumnId: ee,
|
|
186
|
+
focusFirstDataElement: j,
|
|
177
187
|
getClosestCancelButton: R,
|
|
178
|
-
getClosestEditButton:
|
|
179
|
-
getRowAriaRowIndex:
|
|
180
|
-
getRemoveButtonByAriaRowIndex:
|
|
188
|
+
getClosestEditButton: Y,
|
|
189
|
+
getRowAriaRowIndex: V,
|
|
190
|
+
getRemoveButtonByAriaRowIndex: K,
|
|
181
191
|
getTableCellByKeyboardNavId: a,
|
|
182
|
-
getParentCell:
|
|
192
|
+
getParentCell: P,
|
|
183
193
|
waitForElementToBeVisible: p,
|
|
184
|
-
getNextEditableCell:
|
|
185
|
-
getPrevEditableCell:
|
|
186
|
-
getClosestCellNavId:
|
|
194
|
+
getNextEditableCell: J,
|
|
195
|
+
getPrevEditableCell: G,
|
|
196
|
+
getClosestCellNavId: te,
|
|
197
|
+
getStackedCellWrapper: re,
|
|
198
|
+
getStackedCellFocusableElements: S,
|
|
199
|
+
getNextStackedCell: ne,
|
|
200
|
+
getStackedCellContainer: le,
|
|
201
|
+
focusStackedCellElement: oe
|
|
187
202
|
};
|
|
188
203
|
export {
|
|
189
|
-
|
|
190
|
-
|
|
204
|
+
M as filterNavigatableElements,
|
|
205
|
+
b as findId,
|
|
191
206
|
d as findNextIdByCellIndex,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
207
|
+
z as findNextIdByRowIndex,
|
|
208
|
+
_ as focusElement,
|
|
209
|
+
j as focusFirstDataElement,
|
|
210
|
+
ae as focusFirstEditor,
|
|
211
|
+
oe as focusStackedCellElement,
|
|
212
|
+
F as generateNavigatableId,
|
|
213
|
+
I as getActiveNavDataElement,
|
|
214
|
+
W as getBodyElement,
|
|
199
215
|
R as getClosestCancelButton,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
216
|
+
te as getClosestCellNavId,
|
|
217
|
+
Y as getClosestEditButton,
|
|
218
|
+
x as getClosestNavigatableElement,
|
|
219
|
+
O as getClosestScope,
|
|
220
|
+
be as getCurrentIdIndexes,
|
|
221
|
+
ee as getFilterColumnId,
|
|
222
|
+
Z as getFirstDataCell,
|
|
223
|
+
fe as getFirstRowDataCell,
|
|
224
|
+
y as getFocusableElements,
|
|
225
|
+
U as getHeaderElement,
|
|
226
|
+
X as getIdPrefix,
|
|
227
|
+
de as getLastDataCell,
|
|
228
|
+
Ee as getLastRowDataCell,
|
|
229
|
+
L as getNavigatableElement,
|
|
230
|
+
H as getNavigatableElements,
|
|
231
|
+
m as getNavigatableId,
|
|
232
|
+
q as getNavigatableLevel,
|
|
233
|
+
J as getNextEditableCell,
|
|
234
|
+
Q as getNextNavigationIndex,
|
|
235
|
+
ne as getNextStackedCell,
|
|
236
|
+
ue as getNoRecordsElement,
|
|
237
|
+
P as getParentCell,
|
|
238
|
+
G as getPrevEditableCell,
|
|
239
|
+
K as getRemoveButtonByAriaRowIndex,
|
|
240
|
+
V as getRowAriaRowIndex,
|
|
241
|
+
le as getStackedCellContainer,
|
|
242
|
+
S as getStackedCellFocusableElements,
|
|
243
|
+
re as getStackedCellWrapper,
|
|
224
244
|
a as getTableCellByKeyboardNavId,
|
|
225
245
|
E as isNavigatable,
|
|
226
|
-
|
|
246
|
+
Ae as tableKeyboardNavigationTools
|
|
227
247
|
};
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-data-tools",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-data-tools",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1768210222,version:"13.3.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "13.3.0-develop.
|
|
13
|
+
publishDate: 1768210222,
|
|
14
|
+
version: "13.3.0-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-data-tools",
|
|
3
|
-
"version": "13.3.0-develop.
|
|
3
|
+
"version": "13.3.0-develop.3",
|
|
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",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"@progress/kendo-data-query": "^1.7.2",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
30
|
"@progress/kendo-licensing": "^1.7.2",
|
|
31
|
-
"@progress/kendo-react-animation": "13.3.0-develop.
|
|
32
|
-
"@progress/kendo-react-buttons": "13.3.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "13.3.0-develop.
|
|
34
|
-
"@progress/kendo-react-dateinputs": "13.3.0-develop.
|
|
35
|
-
"@progress/kendo-react-dropdowns": "13.3.0-develop.
|
|
36
|
-
"@progress/kendo-react-inputs": "13.3.0-develop.
|
|
37
|
-
"@progress/kendo-react-intl": "13.3.0-develop.
|
|
38
|
-
"@progress/kendo-react-popup": "13.3.0-develop.
|
|
31
|
+
"@progress/kendo-react-animation": "13.3.0-develop.3",
|
|
32
|
+
"@progress/kendo-react-buttons": "13.3.0-develop.3",
|
|
33
|
+
"@progress/kendo-react-common": "13.3.0-develop.3",
|
|
34
|
+
"@progress/kendo-react-dateinputs": "13.3.0-develop.3",
|
|
35
|
+
"@progress/kendo-react-dropdowns": "13.3.0-develop.3",
|
|
36
|
+
"@progress/kendo-react-inputs": "13.3.0-develop.3",
|
|
37
|
+
"@progress/kendo-react-intl": "13.3.0-develop.3",
|
|
38
|
+
"@progress/kendo-react-popup": "13.3.0-develop.3",
|
|
39
39
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
40
40
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
41
41
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"package": {
|
|
66
66
|
"productName": "KendoReact",
|
|
67
67
|
"productCode": "KENDOUIREACT",
|
|
68
|
-
"publishDate":
|
|
68
|
+
"publishDate": 1768210222,
|
|
69
69
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
70
70
|
}
|
|
71
71
|
},
|