@progress/kendo-vue-data-tools 8.1.0-develop.5 → 8.1.0-develop.6
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-vue-datatools.js +1 -1
- package/index.js +1 -1
- package/index.mjs +121 -117
- package/navigation/TableKeyboardNavigation.js +1 -1
- package/navigation/TableKeyboardNavigation.mjs +142 -142
- package/navigation/constants.d.ts +20 -0
- package/navigation/constants.js +1 -1
- package/navigation/constants.mjs +23 -15
- package/navigation/utils.d.ts +10 -0
- package/navigation/utils.js +1 -1
- package/navigation/utils.mjs +101 -97
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/selection/TableSelection.js +1 -1
- package/selection/TableSelection.mjs +7 -8
package/index.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./drag/ColumnResize.js"),E=require("./drag/CommonDragLogic.js"),c=require("./drag/DragClue.js"),g=require("./drag/DropClue.js"),_=require("./cells/FilterCell.js"),i=require("./utils/data-operations.js"),n=require("./utils/group-operations.js"),t=require("./filterCommon.js"),T=require("./pager/Pager.js"),p=require("./pager/PagerInfo.js"),N=require("./pager/PagerInput.js"),D=require("./pager/PagerNavigationButton.js"),O=require("./pager/PagerNumericButtons.js"),C=require("./pager/PagerPageSizes.js"),B=require("./header/HeaderThElement.js"),m=require("./pager/GridPagerSettings.js"),e=require("./navigation/constants.js"),R=require("./navigation/TableKeyboardNavigation.js"),b=require("./navigation/utils.js"),S=require("./selection/TableSelection.js"),l=require("./selection/constants.js"),r=require("./selection/utils.js"),I=require("./editing/utils.js"),s=require("./editing/editReducer.js"),F=require("./detail-expansion/utils.js"),d=require("./detail-expansion/expandReducer.js"),a=require("./group-expansion/groupExpandReducer.js"),P=require("./filter/filters/BooleanFilter.js"),q=require("./interfaces/ColumnProps.js"),K=require("./filter/filters/DateFilter.js"),L=require("./filter/filters/EnumFilter.js"),x=require("./filter/Expression.js"),y=require("./filter/Filter.js"),V=require("./header/FilterRow.js"),f=require("./filter/GroupFilters.js"),H=require("./header/Header.js"),Y=require("./header/HeaderCell.js"),v=require("./header/HeaderRow.js"),h=require("./header/HeaderSelectionCell.js"),G=require("./header/HeaderTdElement.js"),U=require("./filter/filters/NumericFilter.js"),u=require("./filter/operators.js"),w=require("./filter/filters/TextFilter.js"),o=require("./header/utils/main.js"),z=require("./virtualization/columns.js");exports.ColumnResize=A.ColumnResize;exports.CommonDragLogic=E.CommonDragLogic;exports.DragClue=c.DragClue;exports.DropClue=g.DropClue;exports.FilterCell=_.FilterCell;exports.combineFilters=i.combineFilters;exports.filterBy=i.filterBy;exports.getSearchFromString=i.getSearchFromString;exports.getStringFromSearch=i.getStringFromSearch;exports.orderBy=i.orderBy;exports.getGroupIds=n.getGroupIds;exports.setExpandedState=n.setExpandedState;exports.setGroupIds=n.setGroupIds;exports.IsUnaryFilter=t.IsUnaryFilter;exports.booleanFilterValues=t.booleanFilterValues;exports.cellBoolDropdownChange=t.cellBoolDropdownChange;exports.cellInputChange=t.cellInputChange;exports.cellOperatorChange=t.cellOperatorChange;exports.defaultBooleanOperator=t.defaultBooleanOperator;exports.defaultHideSecondFilter=t.defaultHideSecondFilter;exports.filterLogicList=t.filterLogicList;exports.getDefaultOperator=t.getDefaultOperator;exports.getFilterType=t.getFilterType;exports.operatorMap=t.operatorMap;exports.operators=t.operators;exports.Pager=T.Pager;exports.PagerInfo=p.PagerInfo;exports.PagerInput=N.PagerInput;exports.PagerNavigationButton=D.PagerNavigationButton;exports.PagerNumericButtons=O.PagerNumericButtons;exports.PagerPageSizes=C.PagerPageSizes;exports.HeaderThElement=B.HeaderThElement;exports.normalize=m.normalize;exports.KEYBOARD_NAV_CANCEL_BUTTON_CLASS=e.KEYBOARD_NAV_CANCEL_BUTTON_CLASS;exports.KEYBOARD_NAV_DATA_BODY=e.KEYBOARD_NAV_DATA_BODY;exports.KEYBOARD_NAV_DATA_BOTTOM_PINNED=e.KEYBOARD_NAV_DATA_BOTTOM_PINNED;exports.KEYBOARD_NAV_DATA_HEADER=e.KEYBOARD_NAV_DATA_HEADER;exports.KEYBOARD_NAV_DATA_ID=e.KEYBOARD_NAV_DATA_ID;exports.KEYBOARD_NAV_DATA_LEVEL=e.KEYBOARD_NAV_DATA_LEVEL;exports.KEYBOARD_NAV_DATA_SCOPE=e.KEYBOARD_NAV_DATA_SCOPE;exports.KEYBOARD_NAV_DATA_TOP_PINNED=e.KEYBOARD_NAV_DATA_TOP_PINNED;exports.KEYBOARD_NAV_DATA_ZONE=e.KEYBOARD_NAV_DATA_ZONE;exports.KEYBOARD_NAV_EDIT_BUTTON_CLASS=e.KEYBOARD_NAV_EDIT_BUTTON_CLASS;exports.KEYBOARD_NAV_FILTER_COL_SUFFIX=e.KEYBOARD_NAV_FILTER_COL_SUFFIX;exports.tableKeyboardNavigationBodyAttributes=e.tableKeyboardNavigationBodyAttributes;exports.tableKeyboardNavigationBottomPinnedAttributes=e.tableKeyboardNavigationBottomPinnedAttributes;exports.tableKeyboardNavigationHeaderAttributes=e.tableKeyboardNavigationHeaderAttributes;exports.tableKeyboardNavigationScopeAttributes=e.tableKeyboardNavigationScopeAttributes;exports.tableKeyboardNavigationTopPinnedAttributes=e.tableKeyboardNavigationTopPinnedAttributes;exports.TableKeyboardNavigationProvider=R.TableKeyboardNavigationProvider;exports.tableKeyboardNavigationTools=b.tableKeyboardNavigationTools;exports.TableSelection=S.TableSelection;exports.TABLE_COL_INDEX_ATTRIBUTE=l.TABLE_COL_INDEX_ATTRIBUTE;exports.TABLE_PREVENT_SELECTION_ELEMENT=l.TABLE_PREVENT_SELECTION_ELEMENT;exports.TABLE_ROW_INDEX_ATTRIBUTE=l.TABLE_ROW_INDEX_ATTRIBUTE;exports.closestTagName=r.closestTagName;exports.getColumnIndex=r.getColumnIndex;exports.getOffset=r.getOffset;exports.getRowIndex=r.getRowIndex;exports.getSelectedState=r.getSelectedState;exports.getSelectedStateFromKeyDown=r.getSelectedStateFromKeyDown;exports.getSelectionOptions=r.getSelectionOptions;exports.isInNonSelectable=r.isInNonSelectable;exports.relativeContextElement=r.relativeContextElement;exports.setSelectedState=r.setSelectedState;exports.getEditableOptions=I.getEditableOptions;exports.EDIT_ACTION=s.EDIT_ACTION;exports.editReducer=s.editReducer;exports.getDetailExpandableOptions=F.getDetailExpandableOptions;exports.DETAIL_EXPAND_ACTION=d.DETAIL_EXPAND_ACTION;exports.detailExpandReducer=d.detailExpandReducer;exports.GROUP_EXPAND_ACTION=a.GROUP_EXPAND_ACTION;exports.findGroupExpand=a.findGroupExpand;exports.flatToTree=a.flatToTree;exports.getGroupExpandableOptions=a.getGroupExpandableOptions;exports.groupExpandReducer=a.groupExpandReducer;exports.isExpanded=a.isExpanded;exports.BooleanFilter=P.BooleanFilter;exports.ColumnDefaultProps=q.ColumnDefaultProps;exports.DateFilter=K.DateFilter;exports.EnumFilter=L.EnumFilter;exports.Expression=x.Expression;exports.Filter=y.Filter;exports.FilterRow=V.FilterRow;exports.GroupFilter=f.GroupFilter;exports.Header=H.Header;exports.HeaderCell=Y.HeaderCell;exports.HeaderRow=v.HeaderRow;exports.HeaderSelectionCell=h.HeaderSelectionCell;exports.HeaderTdElement=G.HeaderTdElement;exports.NumericFilter=U.NumericFilter;exports.Operators=u.Operators;exports.stringOperator=u.stringOperator;exports.unaryOperator=u.unaryOperator;exports.TextFilter=w.TextFilter;exports.getIndex=o.getIndex;exports.isRtl=o.isRtl;exports.mapColumns=o.mapColumns;exports.nextColumn=o.nextColumn;exports.readColumns=o.readColumns;exports.updateLeft=o.updateLeft;exports.updateRight=o.updateRight;exports.tableColumnsVirtualization=z.tableColumnsVirtualization;
|
package/index.mjs
CHANGED
|
@@ -8,146 +8,150 @@
|
|
|
8
8
|
import { ColumnResize as o } from "./drag/ColumnResize.mjs";
|
|
9
9
|
import { CommonDragLogic as a } from "./drag/CommonDragLogic.mjs";
|
|
10
10
|
import { DragClue as l } from "./drag/DragClue.mjs";
|
|
11
|
-
import { DropClue as
|
|
11
|
+
import { DropClue as n } from "./drag/DropClue.mjs";
|
|
12
12
|
import { FilterCell as x } from "./cells/FilterCell.mjs";
|
|
13
|
-
import { combineFilters as
|
|
14
|
-
import { getGroupIds as
|
|
15
|
-
import { IsUnaryFilter as
|
|
13
|
+
import { combineFilters as f, filterBy as E, getSearchFromString as d, getStringFromSearch as _, orderBy as T } from "./utils/data-operations.mjs";
|
|
14
|
+
import { getGroupIds as N, setExpandedState as D, setGroupIds as u } from "./utils/group-operations.mjs";
|
|
15
|
+
import { IsUnaryFilter as s, booleanFilterValues as B, cellBoolDropdownChange as C, cellInputChange as b, cellOperatorChange as R, defaultBooleanOperator as I, defaultHideSecondFilter as S, filterLogicList as c, getDefaultOperator as F, getFilterType as K, operatorMap as P, operators as L } from "./filterCommon.mjs";
|
|
16
16
|
import { Pager as y } from "./pager/Pager.mjs";
|
|
17
|
-
import { PagerInfo as
|
|
17
|
+
import { PagerInfo as v } from "./pager/PagerInfo.mjs";
|
|
18
18
|
import { PagerInput as h } from "./pager/PagerInput.mjs";
|
|
19
19
|
import { PagerNavigationButton as G } from "./pager/PagerNavigationButton.mjs";
|
|
20
20
|
import { PagerNumericButtons as X } from "./pager/PagerNumericButtons.mjs";
|
|
21
21
|
import { PagerPageSizes as M } from "./pager/PagerPageSizes.mjs";
|
|
22
22
|
import { HeaderThElement as Z } from "./header/HeaderThElement.mjs";
|
|
23
23
|
import { normalize as k } from "./pager/GridPagerSettings.mjs";
|
|
24
|
-
import { KEYBOARD_NAV_CANCEL_BUTTON_CLASS as J, KEYBOARD_NAV_DATA_BODY as Q,
|
|
25
|
-
import { TableKeyboardNavigationProvider as
|
|
26
|
-
import { tableKeyboardNavigationTools as
|
|
27
|
-
import { TableSelection as
|
|
28
|
-
import { TABLE_COL_INDEX_ATTRIBUTE as
|
|
29
|
-
import { closestTagName as
|
|
30
|
-
import { getEditableOptions as
|
|
31
|
-
import { EDIT_ACTION as
|
|
32
|
-
import { getDetailExpandableOptions as
|
|
33
|
-
import { DETAIL_EXPAND_ACTION as
|
|
34
|
-
import { GROUP_EXPAND_ACTION as
|
|
35
|
-
import { BooleanFilter as
|
|
36
|
-
import { ColumnDefaultProps as
|
|
37
|
-
import { DateFilter as
|
|
38
|
-
import { EnumFilter as
|
|
39
|
-
import { Expression as
|
|
40
|
-
import { Filter as
|
|
41
|
-
import { FilterRow as
|
|
42
|
-
import { GroupFilter as
|
|
43
|
-
import { Header as
|
|
44
|
-
import { HeaderCell as
|
|
45
|
-
import { HeaderRow as
|
|
46
|
-
import { HeaderSelectionCell as
|
|
47
|
-
import { HeaderTdElement as
|
|
48
|
-
import { NumericFilter as
|
|
49
|
-
import { Operators as
|
|
50
|
-
import { TextFilter as
|
|
51
|
-
import { getIndex as
|
|
52
|
-
import { tableColumnsVirtualization as
|
|
24
|
+
import { KEYBOARD_NAV_CANCEL_BUTTON_CLASS as J, KEYBOARD_NAV_DATA_BODY as Q, KEYBOARD_NAV_DATA_BOTTOM_PINNED as $, KEYBOARD_NAV_DATA_HEADER as ee, KEYBOARD_NAV_DATA_ID as re, KEYBOARD_NAV_DATA_LEVEL as oe, KEYBOARD_NAV_DATA_SCOPE as te, KEYBOARD_NAV_DATA_TOP_PINNED as ae, KEYBOARD_NAV_DATA_ZONE as pe, KEYBOARD_NAV_EDIT_BUTTON_CLASS as le, KEYBOARD_NAV_FILTER_COL_SUFFIX as ie, tableKeyboardNavigationBodyAttributes as ne, tableKeyboardNavigationBottomPinnedAttributes as me, tableKeyboardNavigationHeaderAttributes as xe, tableKeyboardNavigationScopeAttributes as Ae, tableKeyboardNavigationTopPinnedAttributes as fe } from "./navigation/constants.mjs";
|
|
25
|
+
import { TableKeyboardNavigationProvider as de } from "./navigation/TableKeyboardNavigation.mjs";
|
|
26
|
+
import { tableKeyboardNavigationTools as Te } from "./navigation/utils.mjs";
|
|
27
|
+
import { TableSelection as Ne } from "./selection/TableSelection.mjs";
|
|
28
|
+
import { TABLE_COL_INDEX_ATTRIBUTE as ue, TABLE_PREVENT_SELECTION_ELEMENT as Oe, TABLE_ROW_INDEX_ATTRIBUTE as se } from "./selection/constants.mjs";
|
|
29
|
+
import { closestTagName as Ce, getColumnIndex as be, getOffset as Re, getRowIndex as Ie, getSelectedState as Se, getSelectedStateFromKeyDown as ce, getSelectionOptions as Fe, isInNonSelectable as Ke, relativeContextElement as Pe, setSelectedState as Le } from "./selection/utils.mjs";
|
|
30
|
+
import { getEditableOptions as ye } from "./editing/utils.mjs";
|
|
31
|
+
import { EDIT_ACTION as ve, editReducer as He } from "./editing/editReducer.mjs";
|
|
32
|
+
import { getDetailExpandableOptions as Ue } from "./detail-expansion/utils.mjs";
|
|
33
|
+
import { DETAIL_EXPAND_ACTION as we, detailExpandReducer as Xe } from "./detail-expansion/expandReducer.mjs";
|
|
34
|
+
import { GROUP_EXPAND_ACTION as Me, findGroupExpand as We, flatToTree as Ze, getGroupExpandableOptions as je, groupExpandReducer as ke, isExpanded as qe } from "./group-expansion/groupExpandReducer.mjs";
|
|
35
|
+
import { BooleanFilter as Qe } from "./filter/filters/BooleanFilter.mjs";
|
|
36
|
+
import { ColumnDefaultProps as er } from "./interfaces/ColumnProps.mjs";
|
|
37
|
+
import { DateFilter as or } from "./filter/filters/DateFilter.mjs";
|
|
38
|
+
import { EnumFilter as ar } from "./filter/filters/EnumFilter.mjs";
|
|
39
|
+
import { Expression as lr } from "./filter/Expression.mjs";
|
|
40
|
+
import { Filter as nr } from "./filter/Filter.mjs";
|
|
41
|
+
import { FilterRow as xr } from "./header/FilterRow.mjs";
|
|
42
|
+
import { GroupFilter as fr } from "./filter/GroupFilters.mjs";
|
|
43
|
+
import { Header as dr } from "./header/Header.mjs";
|
|
44
|
+
import { HeaderCell as Tr } from "./header/HeaderCell.mjs";
|
|
45
|
+
import { HeaderRow as Nr } from "./header/HeaderRow.mjs";
|
|
46
|
+
import { HeaderSelectionCell as ur } from "./header/HeaderSelectionCell.mjs";
|
|
47
|
+
import { HeaderTdElement as sr } from "./header/HeaderTdElement.mjs";
|
|
48
|
+
import { NumericFilter as Cr } from "./filter/filters/NumericFilter.mjs";
|
|
49
|
+
import { Operators as Rr, stringOperator as Ir, unaryOperator as Sr } from "./filter/operators.mjs";
|
|
50
|
+
import { TextFilter as Fr } from "./filter/filters/TextFilter.mjs";
|
|
51
|
+
import { getIndex as Pr, isRtl as Lr, mapColumns as Vr, nextColumn as yr, readColumns as Yr, updateLeft as vr, updateRight as Hr } from "./header/utils/main.mjs";
|
|
52
|
+
import { tableColumnsVirtualization as Ur } from "./virtualization/columns.mjs";
|
|
53
53
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
Qe as BooleanFilter,
|
|
55
|
+
er as ColumnDefaultProps,
|
|
56
56
|
o as ColumnResize,
|
|
57
57
|
a as CommonDragLogic,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
we as DETAIL_EXPAND_ACTION,
|
|
59
|
+
or as DateFilter,
|
|
60
60
|
l as DragClue,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
n as DropClue,
|
|
62
|
+
ve as EDIT_ACTION,
|
|
63
|
+
ar as EnumFilter,
|
|
64
|
+
lr as Expression,
|
|
65
|
+
nr as Filter,
|
|
66
66
|
x as FilterCell,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
xr as FilterRow,
|
|
68
|
+
Me as GROUP_EXPAND_ACTION,
|
|
69
|
+
fr as GroupFilter,
|
|
70
|
+
dr as Header,
|
|
71
|
+
Tr as HeaderCell,
|
|
72
|
+
Nr as HeaderRow,
|
|
73
|
+
ur as HeaderSelectionCell,
|
|
74
|
+
sr as HeaderTdElement,
|
|
75
75
|
Z as HeaderThElement,
|
|
76
|
-
|
|
76
|
+
s as IsUnaryFilter,
|
|
77
77
|
J as KEYBOARD_NAV_CANCEL_BUTTON_CLASS,
|
|
78
78
|
Q as KEYBOARD_NAV_DATA_BODY,
|
|
79
|
-
$ as
|
|
80
|
-
ee as
|
|
81
|
-
re as
|
|
82
|
-
oe as
|
|
83
|
-
te as
|
|
84
|
-
ae as
|
|
85
|
-
pe as
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
$ as KEYBOARD_NAV_DATA_BOTTOM_PINNED,
|
|
80
|
+
ee as KEYBOARD_NAV_DATA_HEADER,
|
|
81
|
+
re as KEYBOARD_NAV_DATA_ID,
|
|
82
|
+
oe as KEYBOARD_NAV_DATA_LEVEL,
|
|
83
|
+
te as KEYBOARD_NAV_DATA_SCOPE,
|
|
84
|
+
ae as KEYBOARD_NAV_DATA_TOP_PINNED,
|
|
85
|
+
pe as KEYBOARD_NAV_DATA_ZONE,
|
|
86
|
+
le as KEYBOARD_NAV_EDIT_BUTTON_CLASS,
|
|
87
|
+
ie as KEYBOARD_NAV_FILTER_COL_SUFFIX,
|
|
88
|
+
Cr as NumericFilter,
|
|
89
|
+
Rr as Operators,
|
|
88
90
|
y as Pager,
|
|
89
|
-
|
|
91
|
+
v as PagerInfo,
|
|
90
92
|
h as PagerInput,
|
|
91
93
|
G as PagerNavigationButton,
|
|
92
94
|
X as PagerNumericButtons,
|
|
93
95
|
M as PagerPageSizes,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
ue as TABLE_COL_INDEX_ATTRIBUTE,
|
|
97
|
+
Oe as TABLE_PREVENT_SELECTION_ELEMENT,
|
|
98
|
+
se as TABLE_ROW_INDEX_ATTRIBUTE,
|
|
99
|
+
de as TableKeyboardNavigationProvider,
|
|
100
|
+
Ne as TableSelection,
|
|
101
|
+
Fr as TextFilter,
|
|
102
|
+
B as booleanFilterValues,
|
|
103
|
+
C as cellBoolDropdownChange,
|
|
104
|
+
b as cellInputChange,
|
|
105
|
+
R as cellOperatorChange,
|
|
106
|
+
Ce as closestTagName,
|
|
107
|
+
f as combineFilters,
|
|
106
108
|
I as defaultBooleanOperator,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
S as defaultHideSecondFilter,
|
|
110
|
+
Xe as detailExpandReducer,
|
|
111
|
+
He as editReducer,
|
|
112
|
+
E as filterBy,
|
|
113
|
+
c as filterLogicList,
|
|
114
|
+
We as findGroupExpand,
|
|
115
|
+
Ze as flatToTree,
|
|
116
|
+
be as getColumnIndex,
|
|
115
117
|
F as getDefaultOperator,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
Ue as getDetailExpandableOptions,
|
|
119
|
+
ye as getEditableOptions,
|
|
120
|
+
K as getFilterType,
|
|
121
|
+
je as getGroupExpandableOptions,
|
|
122
|
+
N as getGroupIds,
|
|
123
|
+
Pr as getIndex,
|
|
124
|
+
Re as getOffset,
|
|
125
|
+
Ie as getRowIndex,
|
|
126
|
+
d as getSearchFromString,
|
|
127
|
+
Se as getSelectedState,
|
|
128
|
+
ce as getSelectedStateFromKeyDown,
|
|
129
|
+
Fe as getSelectionOptions,
|
|
128
130
|
_ as getStringFromSearch,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
ke as groupExpandReducer,
|
|
132
|
+
qe as isExpanded,
|
|
133
|
+
Ke as isInNonSelectable,
|
|
134
|
+
Lr as isRtl,
|
|
135
|
+
Vr as mapColumns,
|
|
136
|
+
yr as nextColumn,
|
|
135
137
|
k as normalize,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
me as
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
138
|
+
P as operatorMap,
|
|
139
|
+
L as operators,
|
|
140
|
+
T as orderBy,
|
|
141
|
+
Yr as readColumns,
|
|
142
|
+
Pe as relativeContextElement,
|
|
143
|
+
D as setExpandedState,
|
|
144
|
+
u as setGroupIds,
|
|
145
|
+
Le as setSelectedState,
|
|
146
|
+
Ir as stringOperator,
|
|
147
|
+
Ur as tableColumnsVirtualization,
|
|
148
|
+
ne as tableKeyboardNavigationBodyAttributes,
|
|
149
|
+
me as tableKeyboardNavigationBottomPinnedAttributes,
|
|
150
|
+
xe as tableKeyboardNavigationHeaderAttributes,
|
|
151
|
+
Ae as tableKeyboardNavigationScopeAttributes,
|
|
152
|
+
Te as tableKeyboardNavigationTools,
|
|
153
|
+
fe as tableKeyboardNavigationTopPinnedAttributes,
|
|
154
|
+
Sr as unaryOperator,
|
|
155
|
+
vr as updateLeft,
|
|
156
|
+
Hr as updateRight
|
|
153
157
|
};
|
|
@@ -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 o=require("@progress/kendo-vue-common"),F=require("./constants.js"),t=require("./utils.js"),R=require("vue"),T=require("./NavigatableSettings.js"),M=R.defineComponent({name:"KendoTableKeyboardNavigationProvider",props:{navigatable:{type:Boolean,default:!1},id:String,columnVirtualization:{type:Boolean,default:!1},scrollable:String},data:function(){return{scope:void 0,kbContext:void 0,navigation:void 0}},provide:function(){return{getKeyboardNavigationAttributes:this.getKeyboardNavigationAttributes,onNavMount:this.onComponentDidMount,onNavBeforeUpdate:this.onGetSnapshotBeforeUpdate,onNavUpdate:this.onComponentDidUpdate,onNavFocus:this.onFocus,onNavKeyDown:this.onKeyDown,generateMatrix:this.generateMatrix,kbContext:this.kbContext,navigation:this.navigation}},created(){const{navigatable:e,id:i}=this.$props;e&&(this.kbContext={activeId:"",level:0},this.navigation={activeElementIsFocused:!1,prevNavigationIndexes:void 0,idPrefix:i||o.guid(),navigationMatrix:[],lastHeaderIndex:-1})},methods:{scrollElementIntoViewForVirtualization(e){if(!e||typeof e.scrollIntoView!="function")return;const{scrollable:i,columnVirtualization:l}=this.$props;(i==="virtual"||l)&&e.scrollIntoView({block:i==="virtual"?"center":void 0,inline:l?"center":void 0,behavior:"auto"})},getKeyboardNavigationAttributes(e){return!e||this.$props.navigatable===!1?{}:{tabIndex:this.kbContext.activeId&&this.kbContext.activeId===e?0:-1,[F.KEYBOARD_NAV_DATA_LEVEL]:this.kbContext.level,[F.KEYBOARD_NAV_DATA_ID]:e}},onComponentDidMount(e){const{scope:i=this.scope}=e;if(this.kbContext&&this.navigation&&i){this.scope=i,this.generateMatrix(e);const l=t.getFirstDataCell(this.navigation.navigationMatrix);if(l){const s=t.tableKeyboardNavigationTools.getActiveNavDataElement(i,l);s&&(this.kbContext.activeId=l,s.setAttribute("tabIndex","0"))}}},onGetSnapshotBeforeUpdate(e){if(this.kbContext&&this.navigation&&document){const i=document.activeElement,l=t.tableKeyboardNavigationTools.getNavigatableId(i);l&&l===this.kbContext.activeId&&(this.navigation.activeElementIsFocused=!0)}},conditionallyFocusElement(e,i,l){if(i){e();return}const s=document.activeElement;s&&s!==document.body&&l&&!l.contains(s)||e()},onComponentDidUpdate(e){var n,b;const{scope:i,focusFirst:l,newEditableRow:s,singleEditRow:d,lastActiveElement:f,navigatable:r,userInitiatedEdit:u}=e;if(l&&(this.onConstructor(e),this.onComponentDidMount(e),this.focusFirstDataElement(e)),(!r||r&&r.mode===T.NavigatableMode.inline)&&(s&&!d||s&&d&&!f)?this.conditionallyFocusElement(()=>this.focusFirstEditor(s),u,i):r&&r.mode===T.NavigatableMode.inline&&s&&d&&f&&this.conditionallyFocusElement(()=>f.focus(),u,i),this.generateMatrix(e),this.kbContext&&this.navigation&&i){const y=t.tableKeyboardNavigationTools.getActiveNavDataElement(i,this.kbContext.activeId);if(y)this.navigation.activeElementIsFocused&&((b=(n=this.navigation)==null?void 0:n.prevNavigationIndexes)==null?void 0:b.length)>0&&y!==document.activeElement&&y.focus();else{const C=i.className.indexOf("k-treelist")===-1?t.getFirstDataCell(this.navigation.navigationMatrix):this.navigation.navigationMatrix[0][0],v=t.tableKeyboardNavigationTools.getActiveNavDataElement(i,C);C&&v&&(this.kbContext.activeId=C,v.setAttribute("tabIndex","0"),this.navigation.activeElementIsFocused&&v.focus())}this.navigation.activeElementIsFocused=!1}},onFocus(e,i){const l=this.kbContext;if(e.defaultPrevented||!l)return;const s=e.target,d=t.tableKeyboardNavigationTools.getNavigatableId(s);if(d&&d!==l.activeId){const f=t.tableKeyboardNavigationTools.getClosestScope(s);if(!f)return;const r=t.tableKeyboardNavigationTools.getActiveNavDataElement(f,l.activeId);r&&!e.target.classList.contains("k-table-td")&&!e.target.classList.contains("k-detail-cell")&&r.setAttribute("tabIndex","-1"),s.setAttribute("tabIndex","0"),l.activeId=d}else if(s.closest(".k-filtercell")&&(i!=null&&i.navigatable)){const f=s.closest(".k-table-td");o.enableNavigatableContainer(f)}},async onKeyDown(e,i){var I,p,D,A;const{kbContext:l=this.kbContext,navigation:s=this.navigation,onNavigationAction:d,columns:f}=i;if(e.defaultPrevented||!l||!s)return;let r;if(e.keyCode===o.Keys.esc){const a=t.tableKeyboardNavigationTools.getClosestNavigatableElement(e.target);t.tableKeyboardNavigationTools.focusElement({elementForFocus:a,event:e,kbContext:l}),e.target.closest(".k-filtercell")&&a&&i.navigatable&&o.disableNavigatableContainer(a);return}const u=e.target,n=u.className.indexOf("k-checkbox")===-1?u:t.tableKeyboardNavigationTools.getClosestNavigatableElement(u),b=t.tableKeyboardNavigationTools.getNavigatableId(n),y=b==null?void 0:b.endsWith("column"),C=b==null?void 0:b.endsWith("column_filter"),v=t.tableKeyboardNavigationTools.getNavigatableLevel(n),K=t.tableKeyboardNavigationTools.getClosestScope(n),h=s.navigationMatrix,m=e.metaKey||e.ctrlKey,c=t.getCurrentIdIndexes(s,h,b),x=n.closest(".k-table-td"),E=(I=n.closest(".k-table-td"))==null?void 0:I.classList.contains("k-grid-edit-cell");if(i.navigatable&&i.navigatable.mode===T.NavigatableMode.inline){if(e.keyCode===o.Keys.enter){const a=n.classList.contains("k-grid-remove-command"),g=n.classList.contains("k-grid-cancel-command"),N=t.tableKeyboardNavigationTools.getRowAriaRowIndex(n);if(a){setTimeout(()=>{const k=t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(N.current)||t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(N.prev);k&&k.focus()});return}else if(g&&n.parentElement){const k=(p=t.tableKeyboardNavigationTools.getClosestNavigatableElement(n))==null?void 0:p.getAttribute("data-keyboardnavid");setTimeout(()=>{k&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(k).focus()});return}}if(e.keyCode===o.Keys.esc){const a=t.tableKeyboardNavigationTools.getClosestCancelButton(n);a&&a.click();const g=await t.tableKeyboardNavigationTools.getClosestEditButton(n);g&&g.focus();return}}else if(i.navigatable&&i.navigatable.mode===T.NavigatableMode.incell){if(e.keyCode===o.Keys.esc){n.focus(),n.blur();const a=((D=u==null?void 0:u.parentElement)==null?void 0:D.closest(".k-grid-edit-row"))||null,g=t.tableKeyboardNavigationTools.getClosestCellNavId(n),N=await t.tableKeyboardNavigationTools.waitForElementToBeVisible(`[data-keyboardnavid='${g}']:not(.k-grid-edit-cell)`,a);N&&N.focus()}else if(e.keyCode===o.Keys.enter){let a;if(c){const[g,N]=c;a=t.findNextIdByRowIndex(g,N,b,h,!1)}if(!E)(A=t.tableKeyboardNavigationTools.getParentCell(n))==null||A.click();else if(E&&a){const g=(a==null?void 0:a[0])&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(a[0]);g==null||g.click()}}else if(e.keyCode===o.Keys.left||e.keyCode===o.Keys.right||e.keyCode===o.Keys.up||e.keyCode===o.Keys.down){if(E)return}else if(e.key==="Tab"&&E){if(e.shiftKey){const a=c&&f&&t.tableKeyboardNavigationTools.getPrevEditableCell(c,f,b,h);if(a!=null&&a.prevCell&&a.prevCell.click(),a&&a.elementToFocus!=="gridcell"){n.blur();const g=t.tableKeyboardNavigationTools.getClosestCellNavId(n);setTimeout(()=>{g&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(g).focus()})}e.preventDefault()}else{const a=c&&f&&t.tableKeyboardNavigationTools.getNextEditableCell(c,f,b,h);if(a!=null&&a.nextCell&&a.elementToFocus==="gridcell"&&a.nextCell.click(),a&&a.elementToFocus!=="gridcell"){n.blur();const g=t.tableKeyboardNavigationTools.getClosestCellNavId(n);g&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(g).focus();return}e.preventDefault()}e.preventDefault()}}if(n.closest(".k-filtercell")&&x&&i.navigatable){o.keepFocusInContainer(e,x,o.TABBABLE_ELEMENTS);return}if(v!==void 0&&K){if(e.keyCode===o.Keys.enter){const a=t.tableKeyboardNavigationTools.getNavigatableElement(n,{level:v+1});if(a){t.tableKeyboardNavigationTools.focusElement({elementForFocus:a,event:e,kbContext:l,prevElement:n});return}n.querySelector(".k-filtercell")&&i.navigatable&&o.enableNavigatableContainer(n),r=t.tableKeyboardNavigationTools.getFocusableElements(n)[0],t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:l,prevElement:n})}if(e.keyCode===o.Keys.home&&c)if(m)t.focusFirstDataElement({scope:K,navigation:s,kbContext:l},e);else{const a=t.getFirstRowDataCell(s.navigationMatrix,c[0]);r=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,a),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:l})}if(e.keyCode===o.Keys.end&&c)if(m){const a=t.getLastDataCell(s.navigationMatrix);r=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,a),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:l})}else{const a=t.getLastRowDataCell(s.navigationMatrix,c[0]);r=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,a),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:l})}if(e.keyCode===o.Keys.up||e.keyCode===o.Keys.down||e.keyCode===o.Keys.left||e.keyCode===o.Keys.right){const a=e.keyCode===o.Keys.up||e.keyCode===o.Keys.left,g=e.keyCode===o.Keys.up||e.keyCode===o.Keys.down;if(c){const[N,k]=c,[w,B]=g?t.findNextIdByRowIndex(N,k,b,h,a):t.findNextIdByCellIndex(N,k,b,h,a);w&&(r=t.tableKeyboardNavigationTools.getActiveNavDataElement(K,w),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:l,prevElement:n}),s.prevNavigationIndexes=B,this.scrollElementIntoViewForVirtualization(r))}}if(m&&e.keyCode===o.Keys.left&&y){d&&d({focusElement:n,event:e,action:"reorderToLeft"}),e.preventDefault();return}if(m&&e.keyCode===o.Keys.right&&y){d&&d({focusElement:n,event:e,action:"reorderToRight"}),e.preventDefault();return}if(e.keyCode===o.Keys.pageUp){d&&d({focusElement:r,event:e,action:"moveToNextPage"}),e.preventDefault();return}if(e.keyCode===o.Keys.pageDown){d&&d({focusElement:r,event:e,action:"moveToPrevPage"}),e.preventDefault();return}if(!y&&!C&&!E&&(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))){d&&d({focusElement:r,event:e,action:"select"});return}d&&d({focusElement:r,event:e})}},generateMatrix(e){const{navigation:i=this.navigation,scope:l}=e;if(!i||!l)return;const s=[],d=t.getHeaderElement(l),f=t.getBodyElement(l);if(!d||!f)return;const r=Array.from(d.children),u=Array.from(f.children),n=t.getNoRecordsElement(l)||{children:[]};[...r,...u,n].forEach((b,y)=>{Array.from(b.children).forEach(C=>{const v=t.getNavigatableId(C);if(!v)return;const K=C.rowSpan||1,h=C.colSpan||1;let m;for(let c=y,x=y+K;c<x;c++){if(s[c]||(s[c]=[]),m===void 0){const E=s[c].findIndex(I=>!I);m=E>-1?E:s[c].length}s[c][m]=v||""}for(let c=m+1,x=m+h;c<x;c++)s[y][c]=v||""})}),i.navigationMatrix=s.filter(b=>!!b),i.lastHeaderIndex=r.length-1}},render(){return o.getDefaultSlots(this)[0]}});exports.TableKeyboardNavigationProvider=M;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-vue-common"),F=require("./constants.js"),t=require("./utils.js"),R=require("vue"),A=require("./NavigatableSettings.js"),M=R.defineComponent({name:"KendoTableKeyboardNavigationProvider",props:{navigatable:{type:Boolean,default:!1},id:String,columnVirtualization:{type:Boolean,default:!1},scrollable:String},data:function(){return{scope:void 0,kbContext:void 0,navigation:void 0}},provide:function(){return{getKeyboardNavigationAttributes:this.getKeyboardNavigationAttributes,onNavMount:this.onComponentDidMount,onNavBeforeUpdate:this.onGetSnapshotBeforeUpdate,onNavUpdate:this.onComponentDidUpdate,onNavFocus:this.onFocus,onNavKeyDown:this.onKeyDown,generateMatrix:this.generateMatrix,kbContext:this.kbContext,navigation:this.navigation}},created(){const{navigatable:e,id:i}=this.$props;e&&(this.kbContext={activeId:"",level:0},this.navigation={activeElementIsFocused:!1,prevNavigationIndexes:void 0,idPrefix:i||o.guid(),navigationMatrix:[],lastHeaderIndex:-1})},methods:{scrollElementIntoViewForVirtualization(e){if(!e||typeof e.scrollIntoView!="function")return;const{scrollable:i,columnVirtualization:n}=this.$props;(i==="virtual"||n)&&e.scrollIntoView({block:i==="virtual"?"center":void 0,inline:n?"center":void 0,behavior:"auto"})},getKeyboardNavigationAttributes(e){return!e||this.$props.navigatable===!1?{}:{tabIndex:this.kbContext.activeId&&this.kbContext.activeId===e?0:-1,[F.KEYBOARD_NAV_DATA_LEVEL]:this.kbContext.level,[F.KEYBOARD_NAV_DATA_ID]:e}},onComponentDidMount(e){const{scope:i=this.scope}=e;if(this.kbContext&&this.navigation&&i){this.scope=i,this.generateMatrix(e);const n=t.getFirstDataCell(this.navigation.navigationMatrix);if(n){const s=t.tableKeyboardNavigationTools.getActiveNavDataElement(i,n);s&&(this.kbContext.activeId=n,s.setAttribute("tabIndex","0"))}}},onGetSnapshotBeforeUpdate(e){if(this.kbContext&&this.navigation&&document){const i=document.activeElement,n=t.tableKeyboardNavigationTools.getNavigatableId(i);n&&n===this.kbContext.activeId&&(this.navigation.activeElementIsFocused=!0)}},conditionallyFocusElement(e,i,n){if(i){e();return}const s=document.activeElement;s&&s!==document.body&&n&&!n.contains(s)||e()},onComponentDidUpdate(e){var l,g;const{scope:i,focusFirst:n,newEditableRow:s,singleEditRow:d,lastActiveElement:b,navigatable:r,userInitiatedEdit:y}=e;if(n&&(this.onConstructor(e),this.onComponentDidMount(e),this.focusFirstDataElement(e)),(!r||r&&r.mode===A.NavigatableMode.inline)&&(s&&!d||s&&d&&!b)?this.conditionallyFocusElement(()=>this.focusFirstEditor(s),y,i):r&&r.mode===A.NavigatableMode.inline&&s&&d&&b&&this.conditionallyFocusElement(()=>b.focus(),y,i),this.generateMatrix(e),this.kbContext&&this.navigation&&i){const C=t.tableKeyboardNavigationTools.getActiveNavDataElement(i,this.kbContext.activeId);if(C)this.navigation.activeElementIsFocused&&((g=(l=this.navigation)==null?void 0:l.prevNavigationIndexes)==null?void 0:g.length)>0&&C!==document.activeElement&&C.focus();else{const x=i.className.indexOf("k-treelist")===-1?t.getFirstDataCell(this.navigation.navigationMatrix):this.navigation.navigationMatrix[0][0],K=t.tableKeyboardNavigationTools.getActiveNavDataElement(i,x);x&&K&&(this.kbContext.activeId=x,K.setAttribute("tabIndex","0"),this.navigation.activeElementIsFocused&&K.focus())}this.navigation.activeElementIsFocused=!1}},onFocus(e,i){const n=this.kbContext;if(e.defaultPrevented||!n)return;const s=e.target,d=t.tableKeyboardNavigationTools.getNavigatableId(s);if(d&&d!==n.activeId){const b=t.tableKeyboardNavigationTools.getClosestScope(s);if(!b)return;const r=t.tableKeyboardNavigationTools.getActiveNavDataElement(b,n.activeId);r&&!e.target.classList.contains("k-table-td")&&!e.target.classList.contains("k-detail-cell")&&r.setAttribute("tabIndex","-1"),s.setAttribute("tabIndex","0"),n.activeId=d}else if(s.closest(".k-filtercell")&&(i!=null&&i.navigatable)){const b=s.closest(".k-table-td");o.enableNavigatableContainer(b)}},async onKeyDown(e,i){var E,u,I,p;const{kbContext:n=this.kbContext,navigation:s=this.navigation,onNavigationAction:d,columns:b}=i;if(e.defaultPrevented||!n||!s)return;let r;if(e.keyCode===o.Keys.esc){const a=t.tableKeyboardNavigationTools.getClosestNavigatableElement(e.target);t.tableKeyboardNavigationTools.focusElement({elementForFocus:a,event:e,kbContext:n}),e.target.closest(".k-filtercell")&&a&&i.navigatable&&o.disableNavigatableContainer(a);return}const y=e.target,l=y.className.indexOf("k-checkbox")===-1?y:t.tableKeyboardNavigationTools.getClosestNavigatableElement(y),g=t.tableKeyboardNavigationTools.getNavigatableId(l),C=g==null?void 0:g.endsWith("column"),x=g==null?void 0:g.endsWith("column_filter"),K=t.tableKeyboardNavigationTools.getNavigatableLevel(l),v=t.tableKeyboardNavigationTools.getClosestScope(l),m=s.navigationMatrix,h=e.metaKey||e.ctrlKey,f=t.getCurrentIdIndexes(s,m,g),D=l.closest(".k-table-td"),T=(E=l.closest(".k-table-td"))==null?void 0:E.classList.contains("k-grid-edit-cell");if(i.navigatable&&i.navigatable.mode===A.NavigatableMode.inline){if(e.keyCode===o.Keys.enter){const a=l.classList.contains("k-grid-remove-command"),c=l.classList.contains("k-grid-cancel-command"),N=t.tableKeyboardNavigationTools.getRowAriaRowIndex(l);if(a){setTimeout(()=>{const k=t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(N.current)||t.tableKeyboardNavigationTools.getRemoveButtonByAriaRowIndex(N.prev);k&&k.focus()});return}else if(c&&l.parentElement){const k=(u=t.tableKeyboardNavigationTools.getClosestNavigatableElement(l))==null?void 0:u.getAttribute("data-keyboardnavid");setTimeout(()=>{k&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(k).focus()});return}}if(e.keyCode===o.Keys.esc){const a=t.tableKeyboardNavigationTools.getClosestCancelButton(l);a&&a.click();const c=await t.tableKeyboardNavigationTools.getClosestEditButton(l);c&&c.focus();return}}else if(i.navigatable&&i.navigatable.mode===A.NavigatableMode.incell){if(e.keyCode===o.Keys.esc){l.focus(),l.blur();const a=((I=y==null?void 0:y.parentElement)==null?void 0:I.closest(".k-grid-edit-row"))||null,c=t.tableKeyboardNavigationTools.getClosestCellNavId(l),N=await t.tableKeyboardNavigationTools.waitForElementToBeVisible(`[data-keyboardnavid='${c}']:not(.k-grid-edit-cell)`,a);N&&N.focus()}else if(e.keyCode===o.Keys.enter){let a;if(f){const[c,N]=f;a=t.findNextIdByRowIndex(c,N,g,m,!1)}if(!T)(p=t.tableKeyboardNavigationTools.getParentCell(l))==null||p.click();else if(T&&a){const c=(a==null?void 0:a[0])&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(a[0]);c==null||c.click()}}else if(e.keyCode===o.Keys.left||e.keyCode===o.Keys.right||e.keyCode===o.Keys.up||e.keyCode===o.Keys.down){if(T)return}else if(e.key==="Tab"&&T){if(e.shiftKey){const a=f&&b&&t.tableKeyboardNavigationTools.getPrevEditableCell(f,b,g,m);if(a!=null&&a.prevCell&&a.prevCell.click(),a&&a.elementToFocus!=="gridcell"){l.blur();const c=t.tableKeyboardNavigationTools.getClosestCellNavId(l);setTimeout(()=>{c&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(c).focus()})}e.preventDefault()}else{const a=f&&b&&t.tableKeyboardNavigationTools.getNextEditableCell(f,b,g,m);if(a!=null&&a.nextCell&&a.elementToFocus==="gridcell"&&a.nextCell.click(),a&&a.elementToFocus!=="gridcell"){l.blur();const c=t.tableKeyboardNavigationTools.getClosestCellNavId(l);c&&t.tableKeyboardNavigationTools.getTableCellByKeyboardNavId(c).focus();return}e.preventDefault()}e.preventDefault()}}if(l.closest(".k-filtercell")&&D&&i.navigatable){o.keepFocusInContainer(e,D,o.TABBABLE_ELEMENTS);return}if(K!==void 0&&v){if(e.keyCode===o.Keys.enter){const a=t.tableKeyboardNavigationTools.getNavigatableElement(l,{level:K+1});if(a){t.tableKeyboardNavigationTools.focusElement({elementForFocus:a,event:e,kbContext:n,prevElement:l});return}l.querySelector(".k-filtercell")&&i.navigatable&&o.enableNavigatableContainer(l),r=t.tableKeyboardNavigationTools.getFocusableElements(l)[0],t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:n,prevElement:l})}if(e.keyCode===o.Keys.home&&f)if(h)t.focusFirstDataElement({scope:v,navigation:s,kbContext:n},e);else{const a=t.getFirstRowDataCell(s.navigationMatrix,f[0]);r=t.tableKeyboardNavigationTools.getActiveNavDataElement(v,a),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:n})}if(e.keyCode===o.Keys.end&&f)if(h){const a=t.getLastDataCell(s.navigationMatrix);r=t.tableKeyboardNavigationTools.getActiveNavDataElement(v,a),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:n})}else{const a=t.getLastRowDataCell(s.navigationMatrix,f[0]);r=t.tableKeyboardNavigationTools.getActiveNavDataElement(v,a),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:n})}if(e.keyCode===o.Keys.up||e.keyCode===o.Keys.down||e.keyCode===o.Keys.left||e.keyCode===o.Keys.right){const a=e.keyCode===o.Keys.up||e.keyCode===o.Keys.left,c=e.keyCode===o.Keys.up||e.keyCode===o.Keys.down;if(f){const[N,k]=f,[w,B]=c?t.findNextIdByRowIndex(N,k,g,m,a):t.findNextIdByCellIndex(N,k,g,m,a);w&&(r=t.tableKeyboardNavigationTools.getActiveNavDataElement(v,w),t.tableKeyboardNavigationTools.focusElement({elementForFocus:r,event:e,kbContext:n,prevElement:l}),s.prevNavigationIndexes=B,this.scrollElementIntoViewForVirtualization(r))}}if(h&&e.keyCode===o.Keys.left&&C){d&&d({focusElement:l,event:e,action:"reorderToLeft"}),e.preventDefault();return}if(h&&e.keyCode===o.Keys.right&&C){d&&d({focusElement:l,event:e,action:"reorderToRight"}),e.preventDefault();return}if(e.keyCode===o.Keys.pageUp){d&&d({focusElement:r,event:e,action:"moveToNextPage"}),e.preventDefault();return}if(e.keyCode===o.Keys.pageDown){d&&d({focusElement:r,event:e,action:"moveToPrevPage"}),e.preventDefault();return}if(!C&&!x&&!T&&(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))){d&&d({focusElement:r,event:e,action:"select"});return}d&&d({focusElement:r,event:e})}},generateMatrix(e){const{navigation:i=this.navigation,scope:n}=e;if(!i||!n)return;const s=[],d=t.getHeaderElement(n),b=t.getBodyElement(n),r=t.getTopPinnedElement(n),y=t.getBottomPinnedElement(n);if(!d||!b)return;const l=Array.from(d.children),g=r?Array.from(r.children):[],C=Array.from(b.children),x=y?Array.from(y.children):[],K=t.getNoRecordsElement(n)||{children:[]};[...l,...g,...C,...x,K].forEach((v,m)=>{Array.from(v.children).forEach(h=>{const f=t.getNavigatableId(h);if(!f)return;const D=h.rowSpan||1,T=h.colSpan||1;let E;for(let u=m,I=m+D;u<I;u++){if(s[u]||(s[u]=[]),E===void 0){const p=s[u].findIndex(a=>!a);E=p>-1?p:s[u].length}s[u][E]=f||""}for(let u=E+1,I=E+T;u<I;u++)s[m][u]=f||""})}),i.navigationMatrix=s.filter(v=>!!v),i.lastHeaderIndex=l.length-1}},render(){return o.getDefaultSlots(this)[0]}});exports.TableKeyboardNavigationProvider=M;
|