@progress/kendo-react-data-tools 13.3.0-develop.2 → 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/index.mjs CHANGED
@@ -7,190 +7,197 @@
7
7
  */
8
8
  import { Pager as t } from "./pager/Pager.mjs";
9
9
  import { ColumnResize as a } from "./drag/ColumnResize.mjs";
10
- import { ColumnResizer as l } from "./drag/ColumnResizer.mjs";
11
- import { CommonDragLogic as n } from "./drag/CommonDragLogic.mjs";
10
+ import { ColumnResizer as m } from "./drag/ColumnResizer.mjs";
11
+ import { CommonDragLogic as p } from "./drag/CommonDragLogic.mjs";
12
12
  import { DragClue as x } from "./drag/DragClue.mjs";
13
- import { DropClue as f } from "./drag/DropClue.mjs";
14
- import { combineFilters as C, createDataTree as T, extendDataItem as s, filterBy as A, flatData as E, getItemPath as _, getSearchFromString as D, getStringFromSearch as g, modifySubItems as N, moveTreeItem as O, orderBy as I, removeItems as b, treeToFlat as S } from "./utils/data-operations.mjs";
13
+ import { DropClue as u } from "./drag/DropClue.mjs";
14
+ import { combineFilters as C, createDataTree as s, extendDataItem as T, filterBy as E, flatData as A, getItemPath as g, getSearchFromString as _, getStringFromSearch as D, modifySubItems as N, moveTreeItem as c, orderBy as S, removeItems as b, treeToFlat as I } from "./utils/data-operations.mjs";
15
15
  import { getGroupIds as F, setExpandedState as R, setGroupIds as B } from "./utils/group-operations.mjs";
16
- import { useTableKeyboardNavigation as K } from "./navigation/hooks.mjs";
17
- import { KEYBOARD_NAV_CANCEL_BUTTON_CLASS as M, KEYBOARD_NAV_DATA_BODY as v, KEYBOARD_NAV_DATA_HEADER as P, KEYBOARD_NAV_DATA_ID as V, KEYBOARD_NAV_DATA_LEVEL as Y, KEYBOARD_NAV_DATA_SCOPE as H, KEYBOARD_NAV_DATA_ZONE as U, KEYBOARD_NAV_EDIT_BUTTON_CLASS as G, KEYBOARD_NAV_FILTER_COL_SUFFIX as h, tableKeyboardNavigationBodyAttributes as X, tableKeyboardNavigationHeaderAttributes as w, tableKeyboardNavigationScopeAttributes as z } from "./navigation/constants.mjs";
18
- import { NavigatableMode as Z } from "./navigation/NavigatableSettings.mjs";
19
- import { tableKeyboardNavigation as k } from "./navigation/TableKeyboardNavigation.mjs";
16
+ import { useTableKeyboardNavigation as y } from "./navigation/hooks.mjs";
17
+ import { KEYBOARD_NAV_CANCEL_BUTTON_CLASS as v, KEYBOARD_NAV_DATA_BODY as M, KEYBOARD_NAV_DATA_HEADER as P, KEYBOARD_NAV_DATA_ID as V, KEYBOARD_NAV_DATA_LEVEL as h, KEYBOARD_NAV_DATA_SCOPE as Y, KEYBOARD_NAV_DATA_ZONE as H, KEYBOARD_NAV_EDIT_BUTTON_CLASS as U, KEYBOARD_NAV_FILTER_COL_SUFFIX as G, tableKeyboardNavigationBodyAttributes as k, tableKeyboardNavigationHeaderAttributes as X, tableKeyboardNavigationScopeAttributes as w } from "./navigation/constants.mjs";
18
+ import { NavigatableMode as W } from "./navigation/NavigatableSettings.mjs";
19
+ import { tableKeyboardNavigation as j } from "./navigation/TableKeyboardNavigation.mjs";
20
20
  import { TableKeyboardNavigationContext as J } from "./navigation/TableKeyboardNavigationContext.mjs";
21
21
  import { tableKeyboardNavigationTools as $ } from "./navigation/utils.mjs";
22
- import { TableSelection as oe } from "./selection/TableSelection.mjs";
23
- import { TABLE_COL_INDEX_ATTRIBUTE as re, TABLE_PREVENT_SELECTION_ELEMENT as ae, TABLE_ROW_INDEX_ATTRIBUTE as me } from "./selection/constants.mjs";
24
- import { closestTagName as pe, getColumnIndex as ne, getOffset as ie, getRowIndex as xe, getSelectedState as ue, getSelectedStateFromKeyDown as fe, getSelectionOptions as de, isInNonSelectable as Ce, relativeContextElement as Te, setSelectedState as se } from "./selection/utils.mjs";
25
- import { getEditableOptions as Ee } from "./editing/utils.mjs";
26
- import { EDIT_ACTION as De, editReducer as ge } from "./editing/editReducer.mjs";
27
- import { getDetailExpandableOptions as Oe } from "./detail-expansion/utils.mjs";
28
- import { DETAIL_EXPAND_ACTION as be, detailExpandReducer as Se } from "./detail-expansion/expandReducer.mjs";
29
- import { GROUP_EXPAND_ACTION as Fe, findGroupExpand as Re, flatToTree as Be, getGroupExpandableOptions as Le, groupExpandReducer as Ke, isExpanded as ye } from "./group-expansion/groupExpandReducer.mjs";
30
- import { ClipboardService as ve } from "./clipboard/clipboard.service.mjs";
31
- import { ClipboardActionType as Ve, addHeaders as Ye, getClipboardData as He, getClipboardItemsToPaste as Ue, getClipboardText as Ge, getItemsToPaste as he, getItemsToUpdateOnPaste as Xe, getPastedItems as we, getPreviouslyCopiedItemsData as ze, getSelectedItems as We, itemToString as Ze, populateClipboardData as je } from "./clipboard/common.mjs";
32
- import { useDataSource as qe } from "./data-source/use-data-source.mjs";
33
- import { useRemoteDataSource as Qe } from "./data-source/use-remote-data-source.mjs";
34
- import { useODataDataSource as eo } from "./data-source/use-odata-data-source.mjs";
35
- import { createFilterComponent as to } from "./filteringCells/FilterComponent.mjs";
36
- import { BooleanFilterCell as ao } from "./filteringCells/BooleanFilter.mjs";
37
- import { DateFilterCell as lo } from "./filteringCells/DateFilter.mjs";
38
- import { NumericFilterCell as no } from "./filteringCells/NumericFilter.mjs";
39
- import { TextFilterCell as xo } from "./filteringCells/TextFilter.mjs";
40
- import { ColumnDefaultProps as fo } from "./header/ColumnProps.mjs";
41
- import { FILTER_ROW_CLASS as To, FilterRow as so } from "./header/FilterRow.mjs";
42
- import { Header as Eo } from "./header/Header.mjs";
43
- import { HeaderCell as Do } from "./header/HeaderCell.mjs";
44
- import { HeaderRow as No } from "./header/HeaderRow.mjs";
45
- import { HeaderSelectionCell as Io } from "./header/HeaderSelectionCell.mjs";
46
- import { normalize as So } from "./header/SortSettings.mjs";
47
- import { getIndex as Fo, isRtl as Ro, mapColumns as Bo, nextColumn as Lo, readColumns as Ko, updateLeft as yo, updateRight as Mo } from "./header/utils/index.mjs";
48
- import { HeaderThElement as Po } from "./header/HeaderThElement.mjs";
49
- import { HeaderTdElement as Yo } from "./header/HeaderTdElement.mjs";
50
- import { tableColumnsVirtualization as Uo } from "./virtualization/columns.mjs";
51
- import { TextFilter as ho } from "./filter/filters/TextFilter.mjs";
52
- import { NumericFilter as wo } from "./filter/filters/NumericFilter.mjs";
53
- import { DateFilter as Wo } from "./filter/filters/DateFilter.mjs";
54
- import { BooleanFilter as jo } from "./filter/filters/BooleanFilter.mjs";
55
- import { EnumFilter as qo } from "./filter/filters/EnumFilter.mjs";
56
- import { Expression as Qo } from "./filter/Expression.mjs";
57
- import { Filter as et, selectors as ot } from "./filter/Filter.mjs";
58
- import { Group as rt } from "./filter/Group.mjs";
59
- import { Operators as mt, stringOperator as lt, unaryOperator as pt } from "./filter/operators.mjs";
60
- import { ColumnMenuBooleanColumn as it, ColumnMenuDateColumn as xt, ColumnMenuNumericColumn as ut, ColumnMenuTextColumn as ft } from "./columnmenu/ColumnMenu.mjs";
61
- import { ColumnMenuFilterForm as Ct, ColumnMenuForm as Tt } from "./columnmenu/ColumnMenuFilterForm.mjs";
62
- import { ColumnMenuFilterLogic as At } from "./columnmenu/ColumnMenuFilterLogic.mjs";
63
- import { ColumnMenuBooleanFilter as _t, ColumnMenuDateFilter as Dt, ColumnMenuNumericFilter as gt, ColumnMenuTextFilter as Nt } from "./columnmenu/ColumnMenuFilters.mjs";
64
- import { ColumnMenuItem as It } from "./columnmenu/ColumnMenuItem.mjs";
65
- import { ColumnMenuOperators as St } from "./columnmenu/ColumnMenuOperators.mjs";
22
+ import { handleNavigationKeysInEditMode as oe, handleStackedCellEnterKey as te, handleStackedCellEscapeKey as re, handleStackedCellTabNavigation as ae, handleStackedKeyboardNavigation as le, stackedKeyboardNavigationTools as me } from "./navigation/stackedKeyboardNavigation.mjs";
23
+ import { TableSelection as pe } from "./selection/TableSelection.mjs";
24
+ import { TABLE_COL_INDEX_ATTRIBUTE as xe, TABLE_PREVENT_SELECTION_ELEMENT as de, TABLE_ROW_INDEX_ATTRIBUTE as ue } from "./selection/constants.mjs";
25
+ import { closestTagName as Ce, getColumnIndex as se, getOffset as Te, getRowIndex as Ee, getSelectedState as Ae, getSelectedStateFromKeyDown as ge, getSelectionOptions as _e, isInNonSelectable as De, relativeContextElement as Ne, setSelectedState as ce } from "./selection/utils.mjs";
26
+ import { getEditableOptions as be } from "./editing/utils.mjs";
27
+ import { EDIT_ACTION as Oe, editReducer as Fe } from "./editing/editReducer.mjs";
28
+ import { getDetailExpandableOptions as Be } from "./detail-expansion/utils.mjs";
29
+ import { DETAIL_EXPAND_ACTION as ye, detailExpandReducer as Le } from "./detail-expansion/expandReducer.mjs";
30
+ import { GROUP_EXPAND_ACTION as Me, findGroupExpand as Pe, flatToTree as Ve, getGroupExpandableOptions as he, groupExpandReducer as Ye, isExpanded as He } from "./group-expansion/groupExpandReducer.mjs";
31
+ import { ClipboardService as Ge } from "./clipboard/clipboard.service.mjs";
32
+ import { ClipboardActionType as Xe, addHeaders as we, getClipboardData as ze, getClipboardItemsToPaste as We, getClipboardText as Ze, getItemsToPaste as je, getItemsToUpdateOnPaste as qe, getPastedItems as Je, getPreviouslyCopiedItemsData as Qe, getSelectedItems as $e, itemToString as eo, populateClipboardData as oo } from "./clipboard/common.mjs";
33
+ import { useDataSource as ro } from "./data-source/use-data-source.mjs";
34
+ import { useRemoteDataSource as lo } from "./data-source/use-remote-data-source.mjs";
35
+ import { useODataDataSource as no } from "./data-source/use-odata-data-source.mjs";
36
+ import { createFilterComponent as io } from "./filteringCells/FilterComponent.mjs";
37
+ import { BooleanFilterCell as uo } from "./filteringCells/BooleanFilter.mjs";
38
+ import { DateFilterCell as Co } from "./filteringCells/DateFilter.mjs";
39
+ import { NumericFilterCell as To } from "./filteringCells/NumericFilter.mjs";
40
+ import { TextFilterCell as Ao } from "./filteringCells/TextFilter.mjs";
41
+ import { ColumnDefaultProps as _o } from "./header/ColumnProps.mjs";
42
+ import { FILTER_ROW_CLASS as No, FilterRow as co } from "./header/FilterRow.mjs";
43
+ import { Header as bo } from "./header/Header.mjs";
44
+ import { HeaderCell as Oo } from "./header/HeaderCell.mjs";
45
+ import { HeaderRow as Ro } from "./header/HeaderRow.mjs";
46
+ import { HeaderSelectionCell as Ko } from "./header/HeaderSelectionCell.mjs";
47
+ import { normalize as Lo } from "./header/SortSettings.mjs";
48
+ import { getIndex as Mo, isRtl as Po, mapColumns as Vo, nextColumn as ho, readColumns as Yo, updateLeft as Ho, updateRight as Uo } from "./header/utils/index.mjs";
49
+ import { HeaderThElement as ko } from "./header/HeaderThElement.mjs";
50
+ import { HeaderTdElement as wo } from "./header/HeaderTdElement.mjs";
51
+ import { tableColumnsVirtualization as Wo } from "./virtualization/columns.mjs";
52
+ import { TextFilter as jo } from "./filter/filters/TextFilter.mjs";
53
+ import { NumericFilter as Jo } from "./filter/filters/NumericFilter.mjs";
54
+ import { DateFilter as $o } from "./filter/filters/DateFilter.mjs";
55
+ import { BooleanFilter as ot } from "./filter/filters/BooleanFilter.mjs";
56
+ import { EnumFilter as rt } from "./filter/filters/EnumFilter.mjs";
57
+ import { Expression as lt } from "./filter/Expression.mjs";
58
+ import { Filter as nt, selectors as pt } from "./filter/Filter.mjs";
59
+ import { Group as xt } from "./filter/Group.mjs";
60
+ import { Operators as ut, stringOperator as ft, unaryOperator as Ct } from "./filter/operators.mjs";
61
+ import { ColumnMenuBooleanColumn as Tt, ColumnMenuDateColumn as Et, ColumnMenuNumericColumn as At, ColumnMenuTextColumn as gt } from "./columnmenu/ColumnMenu.mjs";
62
+ import { ColumnMenuFilterForm as Dt, ColumnMenuForm as Nt } from "./columnmenu/ColumnMenuFilterForm.mjs";
63
+ import { ColumnMenuFilterLogic as St } from "./columnmenu/ColumnMenuFilterLogic.mjs";
64
+ import { ColumnMenuBooleanFilter as It, ColumnMenuDateFilter as Ot, ColumnMenuNumericFilter as Ft, ColumnMenuTextFilter as Rt } from "./columnmenu/ColumnMenuFilters.mjs";
65
+ import { ColumnMenuItem as Kt } from "./columnmenu/ColumnMenuItem.mjs";
66
+ import { ColumnMenuOperators as Lt } from "./columnmenu/ColumnMenuOperators.mjs";
66
67
  export {
67
- jo as BooleanFilter,
68
- ao as BooleanFilterCell,
69
- Ve as ClipboardActionType,
70
- ve as ClipboardService,
71
- fo as ColumnDefaultProps,
72
- it as ColumnMenuBooleanColumn,
73
- _t as ColumnMenuBooleanFilter,
74
- xt as ColumnMenuDateColumn,
75
- Dt as ColumnMenuDateFilter,
76
- Ct as ColumnMenuFilterForm,
77
- At as ColumnMenuFilterLogic,
78
- Tt as ColumnMenuForm,
79
- It as ColumnMenuItem,
80
- ut as ColumnMenuNumericColumn,
81
- gt as ColumnMenuNumericFilter,
82
- St as ColumnMenuOperators,
83
- ft as ColumnMenuTextColumn,
84
- Nt as ColumnMenuTextFilter,
68
+ ot as BooleanFilter,
69
+ uo as BooleanFilterCell,
70
+ Xe as ClipboardActionType,
71
+ Ge as ClipboardService,
72
+ _o as ColumnDefaultProps,
73
+ Tt as ColumnMenuBooleanColumn,
74
+ It as ColumnMenuBooleanFilter,
75
+ Et as ColumnMenuDateColumn,
76
+ Ot as ColumnMenuDateFilter,
77
+ Dt as ColumnMenuFilterForm,
78
+ St as ColumnMenuFilterLogic,
79
+ Nt as ColumnMenuForm,
80
+ Kt as ColumnMenuItem,
81
+ At as ColumnMenuNumericColumn,
82
+ Ft as ColumnMenuNumericFilter,
83
+ Lt as ColumnMenuOperators,
84
+ gt as ColumnMenuTextColumn,
85
+ Rt as ColumnMenuTextFilter,
85
86
  a as ColumnResize,
86
- l as ColumnResizer,
87
- n as CommonDragLogic,
88
- be as DETAIL_EXPAND_ACTION,
89
- Wo as DateFilter,
90
- lo as DateFilterCell,
87
+ m as ColumnResizer,
88
+ p as CommonDragLogic,
89
+ ye as DETAIL_EXPAND_ACTION,
90
+ $o as DateFilter,
91
+ Co as DateFilterCell,
91
92
  x as DragClue,
92
- f as DropClue,
93
- De as EDIT_ACTION,
94
- qo as EnumFilter,
95
- Qo as Expression,
96
- To as FILTER_ROW_CLASS,
97
- et as Filter,
98
- so as FilterRow,
99
- Fe as GROUP_EXPAND_ACTION,
100
- rt as Group,
101
- Eo as Header,
102
- Do as HeaderCell,
103
- No as HeaderRow,
104
- Io as HeaderSelectionCell,
105
- Yo as HeaderTdElement,
106
- Po as HeaderThElement,
107
- M as KEYBOARD_NAV_CANCEL_BUTTON_CLASS,
108
- v as KEYBOARD_NAV_DATA_BODY,
93
+ u as DropClue,
94
+ Oe as EDIT_ACTION,
95
+ rt as EnumFilter,
96
+ lt as Expression,
97
+ No as FILTER_ROW_CLASS,
98
+ nt as Filter,
99
+ co as FilterRow,
100
+ Me as GROUP_EXPAND_ACTION,
101
+ xt as Group,
102
+ bo as Header,
103
+ Oo as HeaderCell,
104
+ Ro as HeaderRow,
105
+ Ko as HeaderSelectionCell,
106
+ wo as HeaderTdElement,
107
+ ko as HeaderThElement,
108
+ v as KEYBOARD_NAV_CANCEL_BUTTON_CLASS,
109
+ M as KEYBOARD_NAV_DATA_BODY,
109
110
  P as KEYBOARD_NAV_DATA_HEADER,
110
111
  V as KEYBOARD_NAV_DATA_ID,
111
- Y as KEYBOARD_NAV_DATA_LEVEL,
112
- H as KEYBOARD_NAV_DATA_SCOPE,
113
- U as KEYBOARD_NAV_DATA_ZONE,
114
- G as KEYBOARD_NAV_EDIT_BUTTON_CLASS,
115
- h as KEYBOARD_NAV_FILTER_COL_SUFFIX,
116
- Z as NavigatableMode,
117
- wo as NumericFilter,
118
- no as NumericFilterCell,
119
- mt as Operators,
112
+ h as KEYBOARD_NAV_DATA_LEVEL,
113
+ Y as KEYBOARD_NAV_DATA_SCOPE,
114
+ H as KEYBOARD_NAV_DATA_ZONE,
115
+ U as KEYBOARD_NAV_EDIT_BUTTON_CLASS,
116
+ G as KEYBOARD_NAV_FILTER_COL_SUFFIX,
117
+ W as NavigatableMode,
118
+ Jo as NumericFilter,
119
+ To as NumericFilterCell,
120
+ ut as Operators,
120
121
  t as Pager,
121
- re as TABLE_COL_INDEX_ATTRIBUTE,
122
- ae as TABLE_PREVENT_SELECTION_ELEMENT,
123
- me as TABLE_ROW_INDEX_ATTRIBUTE,
122
+ xe as TABLE_COL_INDEX_ATTRIBUTE,
123
+ de as TABLE_PREVENT_SELECTION_ELEMENT,
124
+ ue as TABLE_ROW_INDEX_ATTRIBUTE,
124
125
  J as TableKeyboardNavigationContext,
125
- oe as TableSelection,
126
- ho as TextFilter,
127
- xo as TextFilterCell,
128
- Ye as addHeaders,
129
- pe as closestTagName,
126
+ pe as TableSelection,
127
+ jo as TextFilter,
128
+ Ao as TextFilterCell,
129
+ we as addHeaders,
130
+ Ce as closestTagName,
130
131
  C as combineFilters,
131
- T as createDataTree,
132
- to as createFilterComponent,
133
- Se as detailExpandReducer,
134
- ge as editReducer,
135
- s as extendDataItem,
136
- A as filterBy,
137
- Re as findGroupExpand,
138
- E as flatData,
139
- Be as flatToTree,
140
- He as getClipboardData,
141
- Ue as getClipboardItemsToPaste,
142
- Ge as getClipboardText,
143
- ne as getColumnIndex,
144
- Oe as getDetailExpandableOptions,
145
- Ee as getEditableOptions,
146
- Le as getGroupExpandableOptions,
132
+ s as createDataTree,
133
+ io as createFilterComponent,
134
+ Le as detailExpandReducer,
135
+ Fe as editReducer,
136
+ T as extendDataItem,
137
+ E as filterBy,
138
+ Pe as findGroupExpand,
139
+ A as flatData,
140
+ Ve as flatToTree,
141
+ ze as getClipboardData,
142
+ We as getClipboardItemsToPaste,
143
+ Ze as getClipboardText,
144
+ se as getColumnIndex,
145
+ Be as getDetailExpandableOptions,
146
+ be as getEditableOptions,
147
+ he as getGroupExpandableOptions,
147
148
  F as getGroupIds,
148
- Fo as getIndex,
149
- _ as getItemPath,
150
- he as getItemsToPaste,
151
- Xe as getItemsToUpdateOnPaste,
152
- ie as getOffset,
153
- we as getPastedItems,
154
- ze as getPreviouslyCopiedItemsData,
155
- xe as getRowIndex,
156
- D as getSearchFromString,
157
- We as getSelectedItems,
158
- ue as getSelectedState,
159
- fe as getSelectedStateFromKeyDown,
160
- de as getSelectionOptions,
161
- g as getStringFromSearch,
162
- Ke as groupExpandReducer,
163
- ye as isExpanded,
164
- Ce as isInNonSelectable,
165
- Ro as isRtl,
166
- Ze as itemToString,
167
- Bo as mapColumns,
149
+ Mo as getIndex,
150
+ g as getItemPath,
151
+ je as getItemsToPaste,
152
+ qe as getItemsToUpdateOnPaste,
153
+ Te as getOffset,
154
+ Je as getPastedItems,
155
+ Qe as getPreviouslyCopiedItemsData,
156
+ Ee as getRowIndex,
157
+ _ as getSearchFromString,
158
+ $e as getSelectedItems,
159
+ Ae as getSelectedState,
160
+ ge as getSelectedStateFromKeyDown,
161
+ _e as getSelectionOptions,
162
+ D as getStringFromSearch,
163
+ Ye as groupExpandReducer,
164
+ oe as handleNavigationKeysInEditMode,
165
+ te as handleStackedCellEnterKey,
166
+ re as handleStackedCellEscapeKey,
167
+ ae as handleStackedCellTabNavigation,
168
+ le as handleStackedKeyboardNavigation,
169
+ He as isExpanded,
170
+ De as isInNonSelectable,
171
+ Po as isRtl,
172
+ eo as itemToString,
173
+ Vo as mapColumns,
168
174
  N as modifySubItems,
169
- O as moveTreeItem,
170
- Lo as nextColumn,
171
- So as normalize,
172
- I as orderBy,
173
- je as populateClipboardData,
174
- Ko as readColumns,
175
- Te as relativeContextElement,
175
+ c as moveTreeItem,
176
+ ho as nextColumn,
177
+ Lo as normalize,
178
+ S as orderBy,
179
+ oo as populateClipboardData,
180
+ Yo as readColumns,
181
+ Ne as relativeContextElement,
176
182
  b as removeItems,
177
- ot as selectors,
183
+ pt as selectors,
178
184
  R as setExpandedState,
179
185
  B as setGroupIds,
180
- se as setSelectedState,
181
- lt as stringOperator,
182
- Uo as tableColumnsVirtualization,
183
- k as tableKeyboardNavigation,
184
- X as tableKeyboardNavigationBodyAttributes,
185
- w as tableKeyboardNavigationHeaderAttributes,
186
- z as tableKeyboardNavigationScopeAttributes,
186
+ ce as setSelectedState,
187
+ me as stackedKeyboardNavigationTools,
188
+ ft as stringOperator,
189
+ Wo as tableColumnsVirtualization,
190
+ j as tableKeyboardNavigation,
191
+ k as tableKeyboardNavigationBodyAttributes,
192
+ X as tableKeyboardNavigationHeaderAttributes,
193
+ w as tableKeyboardNavigationScopeAttributes,
187
194
  $ as tableKeyboardNavigationTools,
188
- S as treeToFlat,
189
- pt as unaryOperator,
190
- yo as updateLeft,
191
- Mo as updateRight,
192
- qe as useDataSource,
193
- eo as useODataDataSource,
194
- Qe as useRemoteDataSource,
195
- K as useTableKeyboardNavigation
195
+ I as treeToFlat,
196
+ Ct as unaryOperator,
197
+ Ho as updateLeft,
198
+ Uo as updateRight,
199
+ ro as useDataSource,
200
+ no as useODataDataSource,
201
+ lo as useRemoteDataSource,
202
+ y as useTableKeyboardNavigation
196
203
  };
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-react-common"),t=require("./utils.js"),p=require("./NavigatableSettings.js"),S=e=>{const{navigatable:r,contextStateRef:n,navigationStateRef:i,idPrefix:s}=e;r&&(n.current={activeId:"",level:0},i.current={activeElementIsFocused:!1,prevNavigationIndexes:void 0,idPrefix:s||o.guid(),navigationMatrix:[],lastHeaderIndex:-1})},B=e=>{const{scope:r,contextStateRef:n,navigationStateRef:i}=e;if(n.current&&i.current&&r){R(e);const s=t.getFirstDataCell(i.current.navigationMatrix);if(s){const g=t.tableKeyboardNavigationTools.getActiveNavDataElement(r,s);g&&(n.current.activeId=s,g.setAttribute("tabIndex","0"))}}},L=e=>{const{contextStateRef:r,navigationStateRef:n,document:i}=e;if(r.current&&n.current&&i){const s=o.getActiveElement(i),g=t.tableKeyboardNavigationTools.getNavigatableId(s);g&&g===r.current.activeId&&(n.current.activeElementIsFocused=!0)}},P=e=>{const{scope:r,contextStateRef:n,navigationStateRef:i,focusFirst:s,newEditableRow:g,singleEditRow:c,lastActiveElement:u,navigatable:a}=e;if(s&&(S(e),B(e),t.focusFirstDataElement(e)),(!a||a&&a.mode===p.NavigatableMode.inline)&&(g&&!c||g&&c&&!u)?t.focusFirstEditor(g):a&&a.mode===p.NavigatableMode.inline&&g&&c&&u&&u.focus(),R(e),n.current&&i.current&&r){if(!t.tableKeyboardNavigationTools.getActiveNavDataElement(r,n.current.activeId)){const y=r.className.indexOf("k-treelist")===-1?t.getFirstDataCell(i.current.navigationMatrix):i.current.navigationMatrix[0][0],C=t.tableKeyboardNavigationTools.getActiveNavDataElement(r,y);y&&C&&(n.current.activeId=y,C.setAttribute("tabIndex","0"),i.current.activeElementIsFocused&&C.focus())}i.current.activeElementIsFocused=!1}},H=(e,r)=>{const{contextStateRef:n}=r;if(e.isDefaultPrevented()||!n.current)return;const i=e.target,s=t.tableKeyboardNavigationTools.getNavigatableId(i);if(s&&s!==n.current.activeId){const g=t.tableKeyboardNavigationTools.getClosestScope(i);if(!g)return;const c=t.tableKeyboardNavigationTools.getActiveNavDataElement(g,n.current.activeId);c&&!e.target.classList.contains("k-table-td")&&!e.target.classList.contains("k-detail-cell")&&c.setAttribute("tabIndex","-1"),i.setAttribute("tabIndex","0"),n.current.activeId=s}else if(i.closest(".k-filtercell")&&r.navigatable){const g=i.closest(".k-table-td");o.enableNavigatableContainer(g)}},q=async(e,r)=>{var x,D,w,F,h;const{contextStateRef:n,navigationStateRef:i,onNavigationAction:s,columns:g}=r;if(e.isDefaultPrevented()||!n.current||!i.current)return;let c;if(e.keyCode===o.Keys.esc&&!r.navigatable.mode){c=t.tableKeyboardNavigationTools.getClosestNavigatableElement(e.target),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n}),e.target.closest(".k-filtercell")&&c&&r.navigatable&&o.disableNavigatableContainer(c);return}const u=e.target,a=u.className.indexOf("k-checkbox")===-1?u:t.tableKeyboardNavigationTools.getClosestNavigatableElement(u),b=t.tableKeyboardNavigationTools.getNavigatableId(a)||((x=t.tableKeyboardNavigationTools.getParentCell(a))==null?void 0:x.getAttribute("data-keyboardnavid")),y=b==null?void 0:b.endsWith("column"),C=b==null?void 0:b.endsWith("column_filter"),k=t.tableKeyboardNavigationTools.getNavigatableLevel(a),K=t.tableKeyboardNavigationTools.getClosestScope(a),E=i.current.navigationMatrix,m=e.metaKey||e.ctrlKey,d=t.getCurrentIdIndexes(i,E,b),I=a.closest(".k-table-td"),v=(D=a.closest(".k-table-td"))==null?void 0:D.classList.contains("k-grid-edit-cell");if(r.navigatable&&r.navigatable.mode===p.NavigatableMode.inline){if(e.keyCode===o.Keys.enter){const l=a.classList.contains("k-grid-remove-command"),f=a.classList.contains("k-grid-cancel-command"),N=t.tableKeyboardNavigationTools.getRowAriaRowIndex(a);if(l){setTimeout(()=>{const T=t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(N.current)||t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(N.prev);T&&T.focus()});return}else if(f&&a.parentElement){const T=(w=t.tableKeyboardNavigationTools.getClosestNavigatableElement(a))==null?void 0:w.getAttribute("data-keyboardnavid");setTimeout(()=>{T&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(T).focus()});return}}if(e.keyCode===o.Keys.esc){const l=t.tableKeyboardNavigationTools.getClosestCancelButton(a);l&&l.click();const f=await t.tableKeyboardNavigationTools.getClosestEditButton(a);f&&f.focus();return}}else if(r.navigatable&&r.navigatable.mode===p.NavigatableMode.incell){if(e.keyCode===o.Keys.esc){a.focus(),a.blur();const l=((F=u==null?void 0:u.parentElement)==null?void 0:F.closest(".k-grid-edit-row"))||null,f=t.tableKeyboardNavigationTools.getClosestCellNavId(a),N=await t.tableKeyboardNavigationTools.waitForElementToBeVisible(`[data-keyboardnavid='${f}']:not(.k-grid-edit-cell)`,l);N&&N.focus()}else if(e.keyCode===o.Keys.enter){let l;if(d){const[f,N]=d;l=t.findNextIdByRowIndex(f,N,b,E,!1)}if(!v)(h=t.tableKeyboardNavigationTools.getParentCell(a))==null||h.click();else if(v&&l){const f=l&&l[0]&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(l[0]);f&&f.click()}}else if(e.keyCode===o.Keys.left){if(v)return}else if(e.keyCode===o.Keys.right){if(v)return}else if(e.keyCode===o.Keys.up){if(v)return}else if(e.keyCode===o.Keys.down){if(v)return}else if(e.keyCode===o.Keys.tab&&v){if(e.shiftKey){const l=d&&g&&t.tableKeyboardNavigationTools.getPrevEditableCell(d,g,b,E);if(l&&l.prevCell&&l.prevCell.click(),l&&l.elementToFocus!=="gridcell"){a.blur();const f=t.tableKeyboardNavigationTools.getClosestCellNavId(a);setTimeout(()=>{f&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(f).focus()})}e.preventDefault()}else{const l=d&&g&&t.tableKeyboardNavigationTools.getNextEditableCell(d,g,b,E);if(l&&l.nextCell&&l.elementToFocus==="gridcell"&&l.nextCell.click(),l&&l.elementToFocus!=="gridcell"){a.blur();const f=t.tableKeyboardNavigationTools.getClosestCellNavId(a);f&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(f).focus();return}e.preventDefault()}e.preventDefault()}}if(a.closest(".k-filtercell")&&I&&r.navigatable){o.keepFocusInContainer(e,I,o.TABBABLE_ELEMENTS);return}if(k!==void 0&&K){if(e.keyCode===o.Keys.enter){const l=t.tableKeyboardNavigationTools.getNavigatableElement(a,{level:k+1});if(l){t.tableKeyboardNavigationTools.focusElement({elementForFocus:l,event:e,contextStateRef:n,prevElement:a});return}a.querySelector(".k-filtercell")&&r.navigatable&&o.enableNavigatableContainer(a),c=t.tableKeyboardNavigationTools.getFocusableElements(a)[0],t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n,prevElement:a})}if(e.keyCode===o.Keys.home&&d)if(m)t.focusFirstDataElement({scope:K,navigationStateRef:i,contextStateRef:n},e);else{const l=t.getFirstRowDataCell(i.current.navigationMatrix,d[0]);c=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,l),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n})}if(e.keyCode===o.Keys.end&&d)if(m){const l=t.getLastDataCell(i.current.navigationMatrix);c=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,l),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n})}else{const l=t.getLastRowDataCell(i.current.navigationMatrix,d[0]);c=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,l),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n})}if(e.keyCode===o.Keys.up||e.keyCode===o.Keys.down||e.keyCode===o.Keys.left||e.keyCode===o.Keys.right){const l=e.keyCode===o.Keys.up||e.keyCode===o.Keys.left,f=e.keyCode===o.Keys.up||e.keyCode===o.Keys.down;if(d){const[N,T]=d,[A,M]=f?t.findNextIdByRowIndex(N,T,b,E,l):t.findNextIdByCellIndex(N,T,b,E,l);A&&(c=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,A),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n,prevElement:a}),i.current.prevNavigationIndexes=M)}}if(m&&e.keyCode===o.Keys.left&&y){s&&s({focusElement:a,event:e,action:"reorderToLeft"}),e.preventDefault();return}if(m&&e.keyCode===o.Keys.right&&y){s&&s({focusElement:a,event:e,action:"reorderToRight"}),e.preventDefault();return}if(e.keyCode===o.Keys.pageUp){s&&s({focusElement:c,event:e,action:"moveToNextPage"}),e.preventDefault();return}if(e.keyCode===o.Keys.pageDown){s&&s({focusElement:c,event:e,action:"moveToPrevPage"}),e.preventDefault();return}if(!y&&!C&&!v&&(e.keyCode===o.Keys.space||e.keyCode===o.Keys.enter||e.shiftKey&&(e.keyCode===o.Keys.up||e.keyCode===o.Keys.down||e.keyCode===o.Keys.left||e.keyCode===o.Keys.right))){s&&s({focusElement:c,event:e,action:"select"});return}s&&s({focusElement:c,event:e})}},R=e=>{const{navigationStateRef:r,scope:n}=e;if(!r.current||!n)return;const i=[],s=t.getHeaderElement(n),g=t.getBodyElement(n),c=t.getNoRecordsElement(n)||{children:[]};if(!s||!g)return;const u=Array.from(s.children),a=Array.from(g.children);[...u,...a,c].forEach((b,y)=>{Array.from(b.children).forEach(C=>{const k=t.getNavigatableId(C);if(!k)return;const K=C.rowSpan||1,E=C.colSpan||1;let m;for(let d=y,I=y+K;d<I;d++){if(i[d]||(i[d]=[]),m===void 0){const v=i[d].findIndex(x=>!x);m=v>-1?v:i[d].length}i[d][m]=k||""}for(let d=m+1,I=m+E;d<I;d++)i[y][d]=k||""})}),r.current.navigationMatrix=i.filter(b=>!!b),r.current.lastHeaderIndex=u.length-1},O={onConstructor:S,onComponentDidMount:B,onGetSnapshotBeforeUpdate:L,onComponentDidUpdate:P,onFocus:H,onKeyDown:q,generateMatrix:R,focusFirstDataElement:t.focusFirstDataElement};exports.tableKeyboardNavigation=O;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-react-common"),t=require("./utils.js"),p=require("./NavigatableSettings.js"),S=e=>{const{navigatable:r,contextStateRef:n,navigationStateRef:i,idPrefix:s}=e;r&&(n.current={activeId:"",level:0},i.current={activeElementIsFocused:!1,prevNavigationIndexes:void 0,idPrefix:s||l.guid(),navigationMatrix:[],lastHeaderIndex:-1})},B=e=>{const{scope:r,contextStateRef:n,navigationStateRef:i}=e;if(n.current&&i.current&&r){R(e);const s=t.getFirstDataCell(i.current.navigationMatrix);if(s){const g=t.tableKeyboardNavigationTools.getActiveNavDataElement(r,s);g&&(n.current.activeId=s,g.setAttribute("tabIndex","0"))}}},L=e=>{const{contextStateRef:r,navigationStateRef:n,document:i}=e;if(r.current&&n.current&&i){const s=l.getActiveElement(i),g=t.tableKeyboardNavigationTools.getNavigatableId(s);g&&g===r.current.activeId&&(n.current.activeElementIsFocused=!0)}},P=e=>{const{scope:r,contextStateRef:n,navigationStateRef:i,focusFirst:s,newEditableRow:g,singleEditRow:c,lastActiveElement:u,navigatable:a}=e;if(s&&(S(e),B(e),t.focusFirstDataElement(e)),(!a||a&&a.mode===p.NavigatableMode.inline)&&(g&&!c||g&&c&&!u)?t.focusFirstEditor(g):a&&a.mode===p.NavigatableMode.inline&&g&&c&&u&&u.focus(),R(e),n.current&&i.current&&r){if(!t.tableKeyboardNavigationTools.getActiveNavDataElement(r,n.current.activeId)){const y=r.className.indexOf("k-treelist")===-1?t.getFirstDataCell(i.current.navigationMatrix):i.current.navigationMatrix[0][0],N=t.tableKeyboardNavigationTools.getActiveNavDataElement(r,y);y&&N&&(n.current.activeId=y,N.setAttribute("tabIndex","0"),i.current.activeElementIsFocused&&N.focus())}i.current.activeElementIsFocused=!1}},H=(e,r)=>{const{contextStateRef:n}=r;if(e.isDefaultPrevented()||!n.current)return;const i=e.target,s=t.tableKeyboardNavigationTools.getNavigatableId(i);if(s&&s!==n.current.activeId){const g=t.tableKeyboardNavigationTools.getClosestScope(i);if(!g)return;const c=t.tableKeyboardNavigationTools.getActiveNavDataElement(g,n.current.activeId);c&&!e.target.classList.contains("k-table-td")&&!e.target.classList.contains("k-detail-cell")&&c.setAttribute("tabIndex","-1"),i.setAttribute("tabIndex","0"),n.current.activeId=s}else if(i.closest(".k-filtercell")&&r.navigatable){const g=i.closest(".k-table-td");l.enableNavigatableContainer(g)}},q=async(e,r)=>{var x,D,w,F,h;const{contextStateRef:n,navigationStateRef:i,onNavigationAction:s,columns:g}=r;if(e.isDefaultPrevented()||!n.current||!i.current)return;let c;if(e.keyCode===l.Keys.esc&&!r.navigatable.mode){c=t.tableKeyboardNavigationTools.getClosestNavigatableElement(e.target),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n}),e.target.closest(".k-filtercell")&&c&&r.navigatable&&l.disableNavigatableContainer(c);return}const u=e.target,a=u.className.indexOf("k-checkbox")===-1?u:t.tableKeyboardNavigationTools.getClosestNavigatableElement(u),f=t.tableKeyboardNavigationTools.getNavigatableId(a)||((x=t.tableKeyboardNavigationTools.getParentCell(a))==null?void 0:x.getAttribute("data-keyboardnavid")),y=f==null?void 0:f.endsWith("column"),N=f==null?void 0:f.endsWith("column_filter"),k=t.tableKeyboardNavigationTools.getNavigatableLevel(a),C=t.tableKeyboardNavigationTools.getClosestScope(a),K=i.current.navigationMatrix,v=e.metaKey||e.ctrlKey,d=t.getCurrentIdIndexes(i,K,f),I=a.closest(".k-table-td"),E=(D=a.closest(".k-table-td"))==null?void 0:D.classList.contains("k-grid-edit-cell");if(r.navigatable&&r.navigatable.mode===p.NavigatableMode.inline){if(e.keyCode===l.Keys.enter){const o=a.classList.contains("k-grid-remove-command"),b=a.classList.contains("k-grid-cancel-command"),m=t.tableKeyboardNavigationTools.getRowAriaRowIndex(a);if(o){setTimeout(()=>{const T=t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(m.current)||t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(m.prev);T&&T.focus()});return}else if(b&&a.parentElement){const T=(w=t.tableKeyboardNavigationTools.getClosestNavigatableElement(a))==null?void 0:w.getAttribute("data-keyboardnavid");setTimeout(()=>{T&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(T).focus()});return}}if(e.keyCode===l.Keys.esc){const o=t.tableKeyboardNavigationTools.getClosestCancelButton(a);o&&o.click();const b=await t.tableKeyboardNavigationTools.getClosestEditButton(a);b&&b.focus();return}}else if(r.navigatable&&r.navigatable.mode===p.NavigatableMode.incell){if(e.keyCode===l.Keys.esc){a.focus(),a.blur();const o=((F=u==null?void 0:u.parentElement)==null?void 0:F.closest(".k-grid-edit-row"))||null,b=t.tableKeyboardNavigationTools.getClosestCellNavId(a),m=await t.tableKeyboardNavigationTools.waitForElementToBeVisible(`[data-keyboardnavid='${b}']:not(.k-grid-edit-cell)`,o);m&&m.focus()}else if(e.keyCode===l.Keys.enter){let o;if(d){const[b,m]=d;o=t.findNextIdByRowIndex(b,m,f,K,!1)}if(!E)(h=t.tableKeyboardNavigationTools.getParentCell(a))==null||h.click();else if(E&&o){const b=o&&o[0]&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(o[0]);b&&b.click()}}else if(e.keyCode===l.Keys.left||e.keyCode===l.Keys.right||e.keyCode===l.Keys.up||e.keyCode===l.Keys.down){if(E)return}else if(e.key==="Tab"&&E){if(e.shiftKey){const o=d&&g&&t.tableKeyboardNavigationTools.getPrevEditableCell(d,g,f,K);if(o&&o.prevCell&&o.prevCell.click(),o&&o.elementToFocus!=="gridcell"){a.blur();const b=t.tableKeyboardNavigationTools.getClosestCellNavId(a);setTimeout(()=>{b&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(b).focus()})}e.preventDefault()}else{const o=d&&g&&t.tableKeyboardNavigationTools.getNextEditableCell(d,g,f,K);if(o&&o.nextCell&&o.elementToFocus==="gridcell"&&o.nextCell.click(),o&&o.elementToFocus!=="gridcell"){a.blur();const b=t.tableKeyboardNavigationTools.getClosestCellNavId(a);b&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(b).focus();return}e.preventDefault()}e.preventDefault()}}if(a.closest(".k-filtercell")&&I&&r.navigatable){l.keepFocusInContainer(e,I,l.TABBABLE_ELEMENTS);return}if(k!==void 0&&C){if(e.keyCode===l.Keys.enter){const o=t.tableKeyboardNavigationTools.getNavigatableElement(a,{level:k+1});if(o){t.tableKeyboardNavigationTools.focusElement({elementForFocus:o,event:e,contextStateRef:n,prevElement:a});return}a.querySelector(".k-filtercell")&&r.navigatable&&l.enableNavigatableContainer(a),c=t.tableKeyboardNavigationTools.getFocusableElements(a)[0],t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n,prevElement:a})}if(e.keyCode===l.Keys.home&&d)if(v)t.focusFirstDataElement({scope:C,navigationStateRef:i,contextStateRef:n},e);else{const o=t.getFirstRowDataCell(i.current.navigationMatrix,d[0]);c=t.tableKeyboardNavigationTools.getActiveNavDataElement(C,o),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n})}if(e.keyCode===l.Keys.end&&d)if(v){const o=t.getLastDataCell(i.current.navigationMatrix);c=t.tableKeyboardNavigationTools.getActiveNavDataElement(C,o),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n})}else{const o=t.getLastRowDataCell(i.current.navigationMatrix,d[0]);c=t.tableKeyboardNavigationTools.getActiveNavDataElement(C,o),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n})}if(e.keyCode===l.Keys.up||e.keyCode===l.Keys.down||e.keyCode===l.Keys.left||e.keyCode===l.Keys.right){const o=e.keyCode===l.Keys.up||e.keyCode===l.Keys.left,b=e.keyCode===l.Keys.up||e.keyCode===l.Keys.down;if(d){const[m,T]=d,[A,M]=b?t.findNextIdByRowIndex(m,T,f,K,o):t.findNextIdByCellIndex(m,T,f,K,o);A&&(c=t.tableKeyboardNavigationTools.getActiveNavDataElement(C,A),t.tableKeyboardNavigationTools.focusElement({elementForFocus:c,event:e,contextStateRef:n,prevElement:a}),i.current.prevNavigationIndexes=M)}}if(v&&e.keyCode===l.Keys.left&&y){s&&s({focusElement:a,event:e,action:"reorderToLeft"}),e.preventDefault();return}if(v&&e.keyCode===l.Keys.right&&y){s&&s({focusElement:a,event:e,action:"reorderToRight"}),e.preventDefault();return}if(e.keyCode===l.Keys.pageUp){s&&s({focusElement:c,event:e,action:"moveToNextPage"}),e.preventDefault();return}if(e.keyCode===l.Keys.pageDown){s&&s({focusElement:c,event:e,action:"moveToPrevPage"}),e.preventDefault();return}if(!y&&!N&&!E&&(e.keyCode===l.Keys.space||e.keyCode===l.Keys.enter||e.shiftKey&&(e.keyCode===l.Keys.up||e.keyCode===l.Keys.down||e.keyCode===l.Keys.left||e.keyCode===l.Keys.right))){s&&s({focusElement:c,event:e,action:"select"});return}s&&s({focusElement:c,event:e})}},R=e=>{const{navigationStateRef:r,scope:n}=e;if(!r.current||!n)return;const i=[],s=t.getHeaderElement(n),g=t.getBodyElement(n),c=t.getNoRecordsElement(n)||{children:[]};if(!s||!g)return;const u=Array.from(s.children),a=Array.from(g.children);[...u,...a,c].forEach((f,y)=>{Array.from(f.children).forEach(N=>{const k=t.getNavigatableId(N);if(!k)return;const C=N.rowSpan||1,K=N.colSpan||1;let v;for(let d=y,I=y+C;d<I;d++){if(i[d]||(i[d]=[]),v===void 0){const E=i[d].findIndex(x=>!x);v=E>-1?E:i[d].length}i[d][v]=k||""}for(let d=v+1,I=v+K;d<I;d++)i[y][d]=k||""})}),r.current.navigationMatrix=i.filter(f=>!!f),r.current.lastHeaderIndex=u.length-1},O={onConstructor:S,onComponentDidMount:B,onGetSnapshotBeforeUpdate:L,onComponentDidUpdate:P,onFocus:H,onKeyDown:q,generateMatrix:R,focusFirstDataElement:t.focusFirstDataElement};exports.tableKeyboardNavigation=O;
@@ -50,8 +50,8 @@ const P = (e) => {
50
50
  } = e;
51
51
  if (c && (P(e), H(e), w(e)), (!a || a && a.mode === D.inline) && (f && !s || f && s && !m) ? G(f) : a && a.mode === D.inline && f && s && m && m.focus(), h(e), l.current && n.current && r) {
52
52
  if (!t.getActiveNavDataElement(r, l.current.activeId)) {
53
- const C = r.className.indexOf("k-treelist") === -1 ? L(n.current.navigationMatrix) : n.current.navigationMatrix[0][0], y = t.getActiveNavDataElement(r, C);
54
- C && y && (l.current.activeId = C, y.setAttribute("tabIndex", "0"), n.current.activeElementIsFocused && y.focus());
53
+ const C = r.className.indexOf("k-treelist") === -1 ? L(n.current.navigationMatrix) : n.current.navigationMatrix[0][0], v = t.getActiveNavDataElement(r, C);
54
+ C && v && (l.current.activeId = C, v.setAttribute("tabIndex", "0"), n.current.activeElementIsFocused && v.focus());
55
55
  }
56
56
  n.current.activeElementIsFocused = !1;
57
57
  }
@@ -80,13 +80,13 @@ const P = (e) => {
80
80
  s = t.getClosestNavigatableElement(e.target), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l }), e.target.closest(".k-filtercell") && s && r.navigatable && W(s);
81
81
  return;
82
82
  }
83
- const m = e.target, a = m.className.indexOf("k-checkbox") === -1 ? m : t.getClosestNavigatableElement(m), g = t.getNavigatableId(a) || ((R = t.getParentCell(a)) == null ? void 0 : R.getAttribute("data-keyboardnavid")), C = g == null ? void 0 : g.endsWith("column"), y = g == null ? void 0 : g.endsWith("column_filter"), p = t.getNavigatableLevel(a), k = t.getClosestScope(a), I = n.current.navigationMatrix, E = e.metaKey || e.ctrlKey, d = $(n, I, g), N = a.closest(".k-table-td"), b = (A = a.closest(".k-table-td")) == null ? void 0 : A.classList.contains("k-grid-edit-cell");
83
+ const m = e.target, a = m.className.indexOf("k-checkbox") === -1 ? m : t.getClosestNavigatableElement(m), g = t.getNavigatableId(a) || ((R = t.getParentCell(a)) == null ? void 0 : R.getAttribute("data-keyboardnavid")), C = g == null ? void 0 : g.endsWith("column"), v = g == null ? void 0 : g.endsWith("column_filter"), p = t.getNavigatableLevel(a), y = t.getClosestScope(a), k = n.current.navigationMatrix, b = e.metaKey || e.ctrlKey, d = $(n, k, g), N = a.closest(".k-table-td"), I = (A = a.closest(".k-table-td")) == null ? void 0 : A.classList.contains("k-grid-edit-cell");
84
84
  if (r.navigatable && r.navigatable.mode === D.inline) {
85
85
  if (e.keyCode === i.enter) {
86
- const o = a.classList.contains("k-grid-remove-command"), u = a.classList.contains("k-grid-cancel-command"), v = t.getRowAriaRowIndex(a);
86
+ const o = a.classList.contains("k-grid-remove-command"), u = a.classList.contains("k-grid-cancel-command"), E = t.getRowAriaRowIndex(a);
87
87
  if (o) {
88
88
  setTimeout(() => {
89
- const x = t.getRemoveButtonByAriaRowIndex(v.current) || t.getRemoveButtonByAriaRowIndex(v.prev);
89
+ const x = t.getRemoveButtonByAriaRowIndex(E.current) || t.getRemoveButtonByAriaRowIndex(E.prev);
90
90
  x && x.focus();
91
91
  });
92
92
  return;
@@ -108,38 +108,29 @@ const P = (e) => {
108
108
  } else if (r.navigatable && r.navigatable.mode === D.incell) {
109
109
  if (e.keyCode === i.esc) {
110
110
  a.focus(), a.blur();
111
- const o = ((F = m == null ? void 0 : m.parentElement) == null ? void 0 : F.closest(".k-grid-edit-row")) || null, u = t.getClosestCellNavId(a), v = await t.waitForElementToBeVisible(
111
+ const o = ((F = m == null ? void 0 : m.parentElement) == null ? void 0 : F.closest(".k-grid-edit-row")) || null, u = t.getClosestCellNavId(a), E = await t.waitForElementToBeVisible(
112
112
  `[data-keyboardnavid='${u}']:not(.k-grid-edit-cell)`,
113
113
  o
114
114
  );
115
- v && v.focus();
115
+ E && E.focus();
116
116
  } else if (e.keyCode === i.enter) {
117
117
  let o;
118
118
  if (d) {
119
- const [u, v] = d;
120
- o = M(u, v, g, I, !1);
119
+ const [u, E] = d;
120
+ o = M(u, E, g, k, !1);
121
121
  }
122
- if (!b)
122
+ if (!I)
123
123
  (S = t.getParentCell(a)) == null || S.click();
124
- else if (b && o) {
124
+ else if (I && o) {
125
125
  const u = o && o[0] && t.getTableCellByKeyboardNavId(o[0]);
126
126
  u && u.click();
127
127
  }
128
- } else if (e.keyCode === i.left) {
129
- if (b)
130
- return;
131
- } else if (e.keyCode === i.right) {
132
- if (b)
133
- return;
134
- } else if (e.keyCode === i.up) {
135
- if (b)
136
- return;
137
- } else if (e.keyCode === i.down) {
138
- if (b)
128
+ } else if (e.keyCode === i.left || e.keyCode === i.right || e.keyCode === i.up || e.keyCode === i.down) {
129
+ if (I)
139
130
  return;
140
- } else if (e.keyCode === i.tab && b) {
131
+ } else if (e.key === "Tab" && I) {
141
132
  if (e.shiftKey) {
142
- const o = d && f && t.getPrevEditableCell(d, f, g, I);
133
+ const o = d && f && t.getPrevEditableCell(d, f, g, k);
143
134
  if (o && o.prevCell && o.prevCell.click(), o && o.elementToFocus !== "gridcell") {
144
135
  a.blur();
145
136
  const u = t.getClosestCellNavId(a);
@@ -149,7 +140,7 @@ const P = (e) => {
149
140
  }
150
141
  e.preventDefault();
151
142
  } else {
152
- const o = d && f && t.getNextEditableCell(d, f, g, I);
143
+ const o = d && f && t.getNextEditableCell(d, f, g, k);
153
144
  if (o && o.nextCell && o.elementToFocus === "gridcell" && o.nextCell.click(), o && o.elementToFocus !== "gridcell") {
154
145
  a.blur();
155
146
  const u = t.getClosestCellNavId(a);
@@ -165,7 +156,7 @@ const P = (e) => {
165
156
  _(e, N, q);
166
157
  return;
167
158
  }
168
- if (p !== void 0 && k) {
159
+ if (p !== void 0 && y) {
169
160
  if (e.keyCode === i.enter) {
170
161
  const o = t.getNavigatableElement(a, { level: p + 1 });
171
162
  if (o) {
@@ -180,10 +171,10 @@ const P = (e) => {
180
171
  a.querySelector(".k-filtercell") && r.navigatable && K(a), s = t.getFocusableElements(a)[0], t.focusElement({ elementForFocus: s, event: e, contextStateRef: l, prevElement: a });
181
172
  }
182
173
  if (e.keyCode === i.home && d)
183
- if (E)
174
+ if (b)
184
175
  w(
185
176
  {
186
- scope: k,
177
+ scope: y,
187
178
  navigationStateRef: n,
188
179
  contextStateRef: l
189
180
  },
@@ -194,31 +185,31 @@ const P = (e) => {
194
185
  n.current.navigationMatrix,
195
186
  d[0]
196
187
  );
197
- s = t.getActiveNavDataElement(k, o), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l });
188
+ s = t.getActiveNavDataElement(y, o), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l });
198
189
  }
199
190
  if (e.keyCode === i.end && d)
200
- if (E) {
191
+ if (b) {
201
192
  const o = J(n.current.navigationMatrix);
202
- s = t.getActiveNavDataElement(k, o), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l });
193
+ s = t.getActiveNavDataElement(y, o), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l });
203
194
  } else {
204
195
  const o = z(
205
196
  n.current.navigationMatrix,
206
197
  d[0]
207
198
  );
208
- s = t.getActiveNavDataElement(k, o), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l });
199
+ s = t.getActiveNavDataElement(y, o), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l });
209
200
  }
210
201
  if (e.keyCode === i.up || e.keyCode === i.down || e.keyCode === i.left || e.keyCode === i.right) {
211
202
  const o = e.keyCode === i.up || e.keyCode === i.left, u = e.keyCode === i.up || e.keyCode === i.down;
212
203
  if (d) {
213
- const [v, x] = d, [T, O] = u ? M(v, x, g, I, o) : ee(v, x, g, I, o);
214
- T && (s = t.getActiveNavDataElement(k, T), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l, prevElement: a }), n.current.prevNavigationIndexes = O);
204
+ const [E, x] = d, [T, O] = u ? M(E, x, g, k, o) : ee(E, x, g, k, o);
205
+ T && (s = t.getActiveNavDataElement(y, T), t.focusElement({ elementForFocus: s, event: e, contextStateRef: l, prevElement: a }), n.current.prevNavigationIndexes = O);
215
206
  }
216
207
  }
217
- if (E && e.keyCode === i.left && C) {
208
+ if (b && e.keyCode === i.left && C) {
218
209
  c && c({ focusElement: a, event: e, action: "reorderToLeft" }), e.preventDefault();
219
210
  return;
220
211
  }
221
- if (E && e.keyCode === i.right && C) {
212
+ if (b && e.keyCode === i.right && C) {
222
213
  c && c({ focusElement: a, event: e, action: "reorderToRight" }), e.preventDefault();
223
214
  return;
224
215
  }
@@ -230,7 +221,7 @@ const P = (e) => {
230
221
  c && c({ focusElement: s, event: e, action: "moveToPrevPage" }), e.preventDefault();
231
222
  return;
232
223
  }
233
- if (!C && !y && !b && (e.keyCode === i.space || e.keyCode === i.enter || e.shiftKey && (e.keyCode === i.up || e.keyCode === i.down || e.keyCode === i.left || e.keyCode === i.right))) {
224
+ if (!C && !v && !I && (e.keyCode === i.space || e.keyCode === i.enter || e.shiftKey && (e.keyCode === i.up || e.keyCode === i.down || e.keyCode === i.left || e.keyCode === i.right))) {
234
225
  c && c({ focusElement: s, event: e, action: "select" });
235
226
  return;
236
227
  }
@@ -245,20 +236,20 @@ const P = (e) => {
245
236
  return;
246
237
  const m = Array.from(c.children), a = Array.from(f.children);
247
238
  [...m, ...a, s].forEach((g, C) => {
248
- Array.from(g.children).forEach((y) => {
249
- const p = Z(y);
239
+ Array.from(g.children).forEach((v) => {
240
+ const p = Z(v);
250
241
  if (!p)
251
242
  return;
252
- const k = y.rowSpan || 1, I = y.colSpan || 1;
253
- let E;
254
- for (let d = C, N = C + k; d < N; d++) {
255
- if (n[d] || (n[d] = []), E === void 0) {
256
- const b = n[d].findIndex((R) => !R);
257
- E = b > -1 ? b : n[d].length;
243
+ const y = v.rowSpan || 1, k = v.colSpan || 1;
244
+ let b;
245
+ for (let d = C, N = C + y; d < N; d++) {
246
+ if (n[d] || (n[d] = []), b === void 0) {
247
+ const I = n[d].findIndex((R) => !R);
248
+ b = I > -1 ? I : n[d].length;
258
249
  }
259
- n[d][E] = p || "";
250
+ n[d][b] = p || "";
260
251
  }
261
- for (let d = E + 1, N = E + I; d < N; d++)
252
+ for (let d = b + 1, N = b + k; d < N; d++)
262
253
  n[C][d] = p || "";
263
254
  });
264
255
  }), r.current.navigationMatrix = n.filter((g) => !!g), r.current.lastHeaderIndex = m.length - 1;