@progress/kendo-vue-data-tools 8.0.3-develop.4 → 8.1.0-develop.2
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.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +103 -100
- package/navigation/NavigatableSettings.d.ts +25 -0
- package/navigation/NavigatableSettings.js +8 -0
- package/navigation/NavigatableSettings.mjs +11 -0
- package/navigation/TableKeyboardNavigation.d.ts +32 -8
- package/navigation/TableKeyboardNavigation.js +1 -1
- package/navigation/TableKeyboardNavigation.mjs +283 -109
- package/navigation/constants.d.ts +2 -2
- package/navigation/constants.js +1 -1
- package/navigation/constants.mjs +17 -17
- package/navigation/utils.d.ts +143 -4
- package/navigation/utils.js +1 -1
- package/navigation/utils.mjs +210 -71
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/selection/TableSelection.d.ts +33 -0
- package/selection/TableSelection.js +8 -0
- package/selection/TableSelection.mjs +154 -0
- package/selection/events.d.ts +1 -5
- package/selection/utils.d.ts +3 -6
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +125 -99
|
@@ -5,18 +5,24 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { getDefaultSlots as
|
|
9
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
10
|
-
import { getHeaderElement as
|
|
11
|
-
import { defineComponent as
|
|
12
|
-
|
|
8
|
+
import { getDefaultSlots as S, Keys as s, disableNavigatableContainer as L, keepFocusInContainer as V, TABBABLE_ELEMENTS as P, enableNavigatableContainer as R, guid as _ } from "@progress/kendo-vue-common";
|
|
9
|
+
import { KEYBOARD_NAV_DATA_ID as H, KEYBOARD_NAV_DATA_LEVEL as O } from "./constants.mjs";
|
|
10
|
+
import { getHeaderElement as U, getBodyElement as z, getNoRecordsElement as G, getNavigatableId as $, tableKeyboardNavigationTools as i, getCurrentIdIndexes as W, getFirstDataCell as T, findNextIdByRowIndex as K, getFirstRowDataCell as Y, focusFirstDataElement as q, getLastRowDataCell as j, getLastDataCell as J, findNextIdByCellIndex as Q } from "./utils.mjs";
|
|
11
|
+
import { defineComponent as X } from "vue";
|
|
12
|
+
import { NavigatableMode as D } from "./NavigatableSettings.mjs";
|
|
13
|
+
const oe = /* @__PURE__ */ X({
|
|
13
14
|
name: "KendoTableKeyboardNavigationProvider",
|
|
14
15
|
props: {
|
|
15
16
|
navigatable: {
|
|
16
17
|
type: Boolean,
|
|
17
18
|
default: !1
|
|
18
19
|
},
|
|
19
|
-
id: String
|
|
20
|
+
id: String,
|
|
21
|
+
columnVirtualization: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
scrollable: String
|
|
20
26
|
},
|
|
21
27
|
data: function() {
|
|
22
28
|
return {
|
|
@@ -29,8 +35,8 @@ const _ = /* @__PURE__ */ M({
|
|
|
29
35
|
return {
|
|
30
36
|
getKeyboardNavigationAttributes: this.getKeyboardNavigationAttributes,
|
|
31
37
|
onNavMount: this.onComponentDidMount,
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
onNavBeforeUpdate: this.onGetSnapshotBeforeUpdate,
|
|
39
|
+
onNavUpdate: this.onComponentDidUpdate,
|
|
34
40
|
onNavFocus: this.onFocus,
|
|
35
41
|
onNavKeyDown: this.onKeyDown,
|
|
36
42
|
generateMatrix: this.generateMatrix,
|
|
@@ -41,7 +47,7 @@ const _ = /* @__PURE__ */ M({
|
|
|
41
47
|
created() {
|
|
42
48
|
const {
|
|
43
49
|
navigatable: e,
|
|
44
|
-
id:
|
|
50
|
+
id: a
|
|
45
51
|
} = this.$props;
|
|
46
52
|
e && (this.kbContext = {
|
|
47
53
|
activeId: "",
|
|
@@ -49,171 +55,339 @@ const _ = /* @__PURE__ */ M({
|
|
|
49
55
|
}, this.navigation = {
|
|
50
56
|
activeElementIsFocused: !1,
|
|
51
57
|
prevNavigationIndexes: void 0,
|
|
52
|
-
idPrefix:
|
|
58
|
+
idPrefix: a || _(),
|
|
53
59
|
navigationMatrix: [],
|
|
54
60
|
lastHeaderIndex: -1
|
|
55
61
|
});
|
|
56
62
|
},
|
|
57
63
|
methods: {
|
|
64
|
+
scrollElementIntoViewForVirtualization(e) {
|
|
65
|
+
if (!e || typeof e.scrollIntoView != "function") return;
|
|
66
|
+
const {
|
|
67
|
+
scrollable: a,
|
|
68
|
+
columnVirtualization: n
|
|
69
|
+
} = this.$props;
|
|
70
|
+
(a === "virtual" || n) && e.scrollIntoView({
|
|
71
|
+
block: a === "virtual" ? "center" : void 0,
|
|
72
|
+
inline: n ? "center" : void 0,
|
|
73
|
+
behavior: "auto"
|
|
74
|
+
});
|
|
75
|
+
},
|
|
58
76
|
getKeyboardNavigationAttributes(e) {
|
|
59
77
|
return !e || this.$props.navigatable === !1 ? {} : {
|
|
60
78
|
tabIndex: this.kbContext.activeId && this.kbContext.activeId === e ? 0 : -1,
|
|
61
|
-
[
|
|
62
|
-
[
|
|
79
|
+
[O]: this.kbContext.level,
|
|
80
|
+
[H]: e
|
|
63
81
|
};
|
|
64
82
|
},
|
|
65
83
|
onComponentDidMount(e) {
|
|
66
84
|
const {
|
|
67
|
-
scope:
|
|
85
|
+
scope: a = this.scope
|
|
68
86
|
} = e;
|
|
69
|
-
if (this.kbContext && this.navigation &&
|
|
70
|
-
this.scope =
|
|
71
|
-
const
|
|
72
|
-
|
|
87
|
+
if (this.kbContext && this.navigation && a) {
|
|
88
|
+
this.scope = a, this.generateMatrix(e);
|
|
89
|
+
const n = T(this.navigation.navigationMatrix);
|
|
90
|
+
if (n) {
|
|
91
|
+
const l = i.getActiveNavDataElement(a, n);
|
|
92
|
+
l && (this.kbContext.activeId = n, l.setAttribute("tabIndex", "0"));
|
|
93
|
+
}
|
|
73
94
|
}
|
|
74
95
|
},
|
|
75
96
|
onGetSnapshotBeforeUpdate(e) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
document: t
|
|
80
|
-
} = e;
|
|
81
|
-
if (n && i && t) {
|
|
82
|
-
const s = t.activeElement, a = o.getNavigatableId(s);
|
|
83
|
-
a && a === n.activeId && (i.activeElementIsFocused = !0);
|
|
97
|
+
if (this.kbContext && this.navigation && document) {
|
|
98
|
+
const a = document.activeElement, n = i.getNavigatableId(a);
|
|
99
|
+
n && n === this.kbContext.activeId && (this.navigation.activeElementIsFocused = !0);
|
|
84
100
|
}
|
|
85
101
|
},
|
|
102
|
+
conditionallyFocusElement(e, a, n) {
|
|
103
|
+
if (a) {
|
|
104
|
+
e();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const l = document.activeElement;
|
|
108
|
+
l && l !== document.body && n && !n.contains(l) || e();
|
|
109
|
+
},
|
|
86
110
|
onComponentDidUpdate(e) {
|
|
111
|
+
var o, u;
|
|
87
112
|
const {
|
|
88
|
-
scope:
|
|
113
|
+
scope: a,
|
|
114
|
+
focusFirst: n,
|
|
115
|
+
newEditableRow: l,
|
|
116
|
+
singleEditRow: c,
|
|
117
|
+
lastActiveElement: g,
|
|
118
|
+
navigatable: r,
|
|
119
|
+
userInitiatedEdit: m
|
|
89
120
|
} = e;
|
|
90
|
-
if (this.generateMatrix(e), this.kbContext && this.navigation &&
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
121
|
+
if (n && (this.onConstructor(e), this.onComponentDidMount(e), this.focusFirstDataElement(e)), (!r || r && r.mode === D.inline) && (l && !c || l && c && !g) ? this.conditionallyFocusElement(() => this.focusFirstEditor(l), m, a) : r && r.mode === D.inline && l && c && g && this.conditionallyFocusElement(() => g.focus(), m, a), this.generateMatrix(e), this.kbContext && this.navigation && a) {
|
|
122
|
+
const b = i.getActiveNavDataElement(a, this.kbContext.activeId);
|
|
123
|
+
if (b)
|
|
124
|
+
this.navigation.activeElementIsFocused && ((u = (o = this.navigation) == null ? void 0 : o.prevNavigationIndexes) == null ? void 0 : u.length) > 0 && b !== document.activeElement && b.focus();
|
|
125
|
+
else {
|
|
126
|
+
const E = a.className.indexOf("k-treelist") === -1 ? T(this.navigation.navigationMatrix) : this.navigation.navigationMatrix[0][0], v = i.getActiveNavDataElement(a, E);
|
|
127
|
+
E && v && (this.kbContext.activeId = E, v.setAttribute("tabIndex", "0"), this.navigation.activeElementIsFocused && v.focus());
|
|
94
128
|
}
|
|
95
129
|
this.navigation.activeElementIsFocused = !1;
|
|
96
130
|
}
|
|
97
131
|
},
|
|
98
|
-
onFocus(e) {
|
|
132
|
+
onFocus(e, a) {
|
|
99
133
|
const n = this.kbContext;
|
|
100
134
|
if (e.defaultPrevented || !n)
|
|
101
135
|
return;
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
136
|
+
const l = e.target, c = i.getNavigatableId(l);
|
|
137
|
+
if (c && c !== n.activeId) {
|
|
138
|
+
const g = i.getClosestScope(l);
|
|
139
|
+
if (!g)
|
|
106
140
|
return;
|
|
107
|
-
const
|
|
108
|
-
|
|
141
|
+
const r = i.getActiveNavDataElement(g, n.activeId);
|
|
142
|
+
r && !e.target.classList.contains("k-table-td") && !e.target.classList.contains("k-detail-cell") && r.setAttribute("tabIndex", "-1"), l.setAttribute("tabIndex", "0"), n.activeId = c;
|
|
143
|
+
} else if (l.closest(".k-filtercell") && (a != null && a.navigatable)) {
|
|
144
|
+
const g = l.closest(".k-table-td");
|
|
145
|
+
R(g);
|
|
109
146
|
}
|
|
110
147
|
},
|
|
111
|
-
onKeyDown(e,
|
|
148
|
+
async onKeyDown(e, a) {
|
|
149
|
+
var N, A, w, F;
|
|
112
150
|
const {
|
|
113
|
-
kbContext:
|
|
114
|
-
navigation:
|
|
115
|
-
onNavigationAction:
|
|
116
|
-
|
|
117
|
-
|
|
151
|
+
kbContext: n = this.kbContext,
|
|
152
|
+
navigation: l = this.navigation,
|
|
153
|
+
onNavigationAction: c,
|
|
154
|
+
columns: g
|
|
155
|
+
} = a;
|
|
156
|
+
if (e.defaultPrevented || !n || !l)
|
|
118
157
|
return;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
158
|
+
let r;
|
|
159
|
+
if (e.keyCode === s.esc) {
|
|
160
|
+
const t = i.getClosestNavigatableElement(e.target);
|
|
161
|
+
i.focusElement({
|
|
162
|
+
elementForFocus: t,
|
|
123
163
|
event: e,
|
|
124
|
-
kbContext:
|
|
125
|
-
});
|
|
164
|
+
kbContext: n
|
|
165
|
+
}), e.target.closest(".k-filtercell") && t && a.navigatable && L(t);
|
|
126
166
|
return;
|
|
127
167
|
}
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
130
|
-
if (e.keyCode ===
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
elementForFocus: d,
|
|
137
|
-
event: e,
|
|
138
|
-
kbContext: i,
|
|
139
|
-
prevElement: a
|
|
168
|
+
const m = e.target, o = m.className.indexOf("k-checkbox") === -1 ? m : i.getClosestNavigatableElement(m), u = i.getNavigatableId(o), b = u == null ? void 0 : u.endsWith("column"), E = u == null ? void 0 : u.endsWith("column_filter"), v = i.getNavigatableLevel(o), y = i.getClosestScope(o), k = l.navigationMatrix, C = e.metaKey || e.ctrlKey, d = W(l, k, u), I = o.closest(".k-table-td"), x = (N = o.closest(".k-table-td")) == null ? void 0 : N.classList.contains("k-grid-edit-cell");
|
|
169
|
+
if (a.navigatable && a.navigatable.mode === D.inline) {
|
|
170
|
+
if (e.keyCode === s.enter) {
|
|
171
|
+
const t = o.classList.contains("k-grid-remove-command"), f = o.classList.contains("k-grid-cancel-command"), h = i.getRowAriaRowIndex(o);
|
|
172
|
+
if (t) {
|
|
173
|
+
setTimeout(() => {
|
|
174
|
+
const p = i.getRemoveButtonByAriaRowIndex(h.current) || i.getRemoveButtonByAriaRowIndex(h.prev);
|
|
175
|
+
p && p.focus();
|
|
140
176
|
});
|
|
141
177
|
return;
|
|
142
|
-
} else {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
event: e,
|
|
147
|
-
kbContext: i,
|
|
148
|
-
prevElement: a
|
|
178
|
+
} else if (f && o.parentElement) {
|
|
179
|
+
const p = (A = i.getClosestNavigatableElement(o)) == null ? void 0 : A.getAttribute("data-keyboardnavid");
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
p && i.getTableCellByKeyboardNavId(p).focus();
|
|
149
182
|
});
|
|
150
183
|
return;
|
|
151
184
|
}
|
|
152
185
|
}
|
|
153
|
-
if (e.keyCode ===
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
186
|
+
if (e.keyCode === s.esc) {
|
|
187
|
+
const t = i.getClosestCancelButton(o);
|
|
188
|
+
t && t.click();
|
|
189
|
+
const f = await i.getClosestEditButton(o);
|
|
190
|
+
f && f.focus();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
} else if (a.navigatable && a.navigatable.mode === D.incell) {
|
|
194
|
+
if (e.keyCode === s.esc) {
|
|
195
|
+
o.focus(), o.blur();
|
|
196
|
+
const t = ((w = m == null ? void 0 : m.parentElement) == null ? void 0 : w.closest(".k-grid-edit-row")) || null, f = i.getClosestCellNavId(o), h = await i.waitForElementToBeVisible(`[data-keyboardnavid='${f}']:not(.k-grid-edit-cell)`, t);
|
|
197
|
+
h && h.focus();
|
|
198
|
+
} else if (e.keyCode === s.enter) {
|
|
199
|
+
let t;
|
|
200
|
+
if (d) {
|
|
201
|
+
const [f, h] = d;
|
|
202
|
+
t = K(f, h, u, k, !1);
|
|
203
|
+
}
|
|
204
|
+
if (!x)
|
|
205
|
+
(F = i.getParentCell(o)) == null || F.click();
|
|
206
|
+
else if (x && t) {
|
|
207
|
+
const f = (t == null ? void 0 : t[0]) && i.getTableCellByKeyboardNavId(t[0]);
|
|
208
|
+
f == null || f.click();
|
|
209
|
+
}
|
|
210
|
+
} else if (e.keyCode === s.left || e.keyCode === s.right || e.keyCode === s.up || e.keyCode === s.down) {
|
|
211
|
+
if (x)
|
|
212
|
+
return;
|
|
213
|
+
} else if (e.key === "Tab" && x) {
|
|
214
|
+
if (e.shiftKey) {
|
|
215
|
+
const t = d && g && i.getPrevEditableCell(d, g, u, k);
|
|
216
|
+
if (t != null && t.prevCell && t.prevCell.click(), t && t.elementToFocus !== "gridcell") {
|
|
217
|
+
o.blur();
|
|
218
|
+
const f = i.getClosestCellNavId(o);
|
|
219
|
+
setTimeout(() => {
|
|
220
|
+
f && i.getTableCellByKeyboardNavId(f).focus();
|
|
173
221
|
});
|
|
174
222
|
}
|
|
223
|
+
e.preventDefault();
|
|
224
|
+
} else {
|
|
225
|
+
const t = d && g && i.getNextEditableCell(d, g, u, k);
|
|
226
|
+
if (t != null && t.nextCell && t.elementToFocus === "gridcell" && t.nextCell.click(), t && t.elementToFocus !== "gridcell") {
|
|
227
|
+
o.blur();
|
|
228
|
+
const f = i.getClosestCellNavId(o);
|
|
229
|
+
f && i.getTableCellByKeyboardNavId(f).focus();
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
e.preventDefault();
|
|
175
233
|
}
|
|
234
|
+
e.preventDefault();
|
|
176
235
|
}
|
|
177
236
|
}
|
|
237
|
+
if (o.closest(".k-filtercell") && I && a.navigatable) {
|
|
238
|
+
V(e, I, P);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (v !== void 0 && y) {
|
|
242
|
+
if (e.keyCode === s.enter) {
|
|
243
|
+
const t = i.getNavigatableElement(o, {
|
|
244
|
+
level: v + 1
|
|
245
|
+
});
|
|
246
|
+
if (t) {
|
|
247
|
+
i.focusElement({
|
|
248
|
+
elementForFocus: t,
|
|
249
|
+
event: e,
|
|
250
|
+
kbContext: n,
|
|
251
|
+
prevElement: o
|
|
252
|
+
});
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
o.querySelector(".k-filtercell") && a.navigatable && R(o), r = i.getFocusableElements(o)[0], i.focusElement({
|
|
256
|
+
elementForFocus: r,
|
|
257
|
+
event: e,
|
|
258
|
+
kbContext: n,
|
|
259
|
+
prevElement: o
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (e.keyCode === s.home && d)
|
|
263
|
+
if (C)
|
|
264
|
+
q({
|
|
265
|
+
scope: y,
|
|
266
|
+
navigation: l,
|
|
267
|
+
kbContext: n
|
|
268
|
+
}, e);
|
|
269
|
+
else {
|
|
270
|
+
const t = Y(l.navigationMatrix, d[0]);
|
|
271
|
+
r = i.getActiveNavDataElement(y, t), i.focusElement({
|
|
272
|
+
elementForFocus: r,
|
|
273
|
+
event: e,
|
|
274
|
+
kbContext: n
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
if (e.keyCode === s.end && d)
|
|
278
|
+
if (C) {
|
|
279
|
+
const t = J(l.navigationMatrix);
|
|
280
|
+
r = i.getActiveNavDataElement(y, t), i.focusElement({
|
|
281
|
+
elementForFocus: r,
|
|
282
|
+
event: e,
|
|
283
|
+
kbContext: n
|
|
284
|
+
});
|
|
285
|
+
} else {
|
|
286
|
+
const t = j(l.navigationMatrix, d[0]);
|
|
287
|
+
r = i.getActiveNavDataElement(y, t), i.focusElement({
|
|
288
|
+
elementForFocus: r,
|
|
289
|
+
event: e,
|
|
290
|
+
kbContext: n
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
if (e.keyCode === s.up || e.keyCode === s.down || e.keyCode === s.left || e.keyCode === s.right) {
|
|
294
|
+
const t = e.keyCode === s.up || e.keyCode === s.left, f = e.keyCode === s.up || e.keyCode === s.down;
|
|
295
|
+
if (d) {
|
|
296
|
+
const [h, p] = d, [B, M] = f ? K(h, p, u, k, t) : Q(h, p, u, k, t);
|
|
297
|
+
B && (r = i.getActiveNavDataElement(y, B), i.focusElement({
|
|
298
|
+
elementForFocus: r,
|
|
299
|
+
event: e,
|
|
300
|
+
kbContext: n,
|
|
301
|
+
prevElement: o
|
|
302
|
+
}), l.prevNavigationIndexes = M, this.scrollElementIntoViewForVirtualization(r));
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
if (C && e.keyCode === s.left && b) {
|
|
306
|
+
c && c({
|
|
307
|
+
focusElement: o,
|
|
308
|
+
event: e,
|
|
309
|
+
action: "reorderToLeft"
|
|
310
|
+
}), e.preventDefault();
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (C && e.keyCode === s.right && b) {
|
|
314
|
+
c && c({
|
|
315
|
+
focusElement: o,
|
|
316
|
+
event: e,
|
|
317
|
+
action: "reorderToRight"
|
|
318
|
+
}), e.preventDefault();
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (e.keyCode === s.pageUp) {
|
|
322
|
+
c && c({
|
|
323
|
+
focusElement: r,
|
|
324
|
+
event: e,
|
|
325
|
+
action: "moveToNextPage"
|
|
326
|
+
}), e.preventDefault();
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
if (e.keyCode === s.pageDown) {
|
|
330
|
+
c && c({
|
|
331
|
+
focusElement: r,
|
|
332
|
+
event: e,
|
|
333
|
+
action: "moveToPrevPage"
|
|
334
|
+
}), e.preventDefault();
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
if (!b && !E && !x && (e.keyCode === s.space || e.keyCode === s.enter || e.shiftKey && (e.keyCode === s.up || e.keyCode === s.down || e.keyCode === s.left || e.keyCode === s.right))) {
|
|
338
|
+
c && c({
|
|
339
|
+
focusElement: r,
|
|
340
|
+
event: e,
|
|
341
|
+
action: "select"
|
|
342
|
+
});
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
c && c({
|
|
346
|
+
focusElement: r,
|
|
347
|
+
event: e
|
|
348
|
+
});
|
|
349
|
+
}
|
|
178
350
|
},
|
|
179
351
|
generateMatrix(e) {
|
|
180
352
|
const {
|
|
181
|
-
navigation:
|
|
182
|
-
scope:
|
|
353
|
+
navigation: a = this.navigation,
|
|
354
|
+
scope: n
|
|
183
355
|
} = e;
|
|
184
|
-
if (!
|
|
356
|
+
if (!a || !n)
|
|
185
357
|
return;
|
|
186
|
-
const
|
|
187
|
-
if (!
|
|
358
|
+
const l = [], c = U(n), g = z(n);
|
|
359
|
+
if (!c || !g)
|
|
188
360
|
return;
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
361
|
+
const r = Array.from(c.children), m = Array.from(g.children), o = G(n) || {
|
|
362
|
+
children: []
|
|
363
|
+
};
|
|
364
|
+
[...r, ...m, o].forEach((u, b) => {
|
|
365
|
+
Array.from(u.children).forEach((E) => {
|
|
366
|
+
const v = $(E);
|
|
193
367
|
if (!v)
|
|
194
368
|
return;
|
|
195
|
-
const
|
|
196
|
-
let
|
|
197
|
-
for (let
|
|
198
|
-
if (
|
|
199
|
-
const
|
|
200
|
-
|
|
369
|
+
const y = E.rowSpan || 1, k = E.colSpan || 1;
|
|
370
|
+
let C;
|
|
371
|
+
for (let d = b, I = b + y; d < I; d++) {
|
|
372
|
+
if (l[d] || (l[d] = []), C === void 0) {
|
|
373
|
+
const x = l[d].findIndex((N) => !N);
|
|
374
|
+
C = x > -1 ? x : l[d].length;
|
|
201
375
|
}
|
|
202
|
-
|
|
376
|
+
l[d][C] = v || "";
|
|
203
377
|
}
|
|
204
|
-
for (let
|
|
205
|
-
|
|
378
|
+
for (let d = C + 1, I = C + k; d < I; d++)
|
|
379
|
+
l[b][d] = v || "";
|
|
206
380
|
});
|
|
207
|
-
}),
|
|
381
|
+
}), a.navigationMatrix = l.filter((u) => !!u), a.lastHeaderIndex = r.length - 1;
|
|
208
382
|
}
|
|
209
383
|
},
|
|
210
384
|
/**
|
|
211
385
|
* @hidden
|
|
212
386
|
*/
|
|
213
387
|
render() {
|
|
214
|
-
return
|
|
388
|
+
return S(this)[0];
|
|
215
389
|
}
|
|
216
390
|
});
|
|
217
391
|
export {
|
|
218
|
-
|
|
392
|
+
oe as TableKeyboardNavigationProvider
|
|
219
393
|
};
|
|
@@ -36,11 +36,11 @@ export declare const KEYBOARD_NAV_FILTER_COL_SUFFIX = "_filter";
|
|
|
36
36
|
/**
|
|
37
37
|
* @hidden
|
|
38
38
|
*/
|
|
39
|
-
export declare const
|
|
39
|
+
export declare const KEYBOARD_NAV_CANCEL_BUTTON_CLASS = "k-grid-cancel-command";
|
|
40
40
|
/**
|
|
41
41
|
* @hidden
|
|
42
42
|
*/
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const KEYBOARD_NAV_EDIT_BUTTON_CLASS = "k-grid-edit-command";
|
|
44
44
|
/**
|
|
45
45
|
* @hidden
|
|
46
46
|
*/
|
package/navigation/constants.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="data-keyboardnavlevel",A="data-keyboardnavscope",_="data-keyboardnavheader",t="data-keyboardnavbody",e="data-keyboardnavid",o="data-keyboardnavzone",D="_filter",E="k-grid-cancel-command",d="k-grid-edit-command",N={[A]:!0},r={[_]:!0},O={[t]:!0};exports.KEYBOARD_NAV_CANCEL_BUTTON_CLASS=E;exports.KEYBOARD_NAV_DATA_BODY=t;exports.KEYBOARD_NAV_DATA_HEADER=_;exports.KEYBOARD_NAV_DATA_ID=e;exports.KEYBOARD_NAV_DATA_LEVEL=a;exports.KEYBOARD_NAV_DATA_SCOPE=A;exports.KEYBOARD_NAV_DATA_ZONE=o;exports.KEYBOARD_NAV_EDIT_BUTTON_CLASS=d;exports.KEYBOARD_NAV_FILTER_COL_SUFFIX=D;exports.tableKeyboardNavigationBodyAttributes=O;exports.tableKeyboardNavigationHeaderAttributes=r;exports.tableKeyboardNavigationScopeAttributes=N;
|
package/navigation/constants.mjs
CHANGED
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
9
|
-
[
|
|
10
|
-
}, i = {
|
|
11
|
-
[o]: !0
|
|
8
|
+
const o = "data-keyboardnavlevel", a = "data-keyboardnavscope", t = "data-keyboardnavheader", A = "data-keyboardnavbody", e = "data-keyboardnavid", _ = "data-keyboardnavzone", d = "_filter", n = "k-grid-cancel-command", r = "k-grid-edit-command", D = {
|
|
9
|
+
[a]: !0
|
|
12
10
|
}, c = {
|
|
13
|
-
[
|
|
11
|
+
[t]: !0
|
|
12
|
+
}, E = {
|
|
13
|
+
[A]: !0
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
r as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
n as KEYBOARD_NAV_CANCEL_BUTTON_CLASS,
|
|
17
|
+
A as KEYBOARD_NAV_DATA_BODY,
|
|
18
|
+
t as KEYBOARD_NAV_DATA_HEADER,
|
|
19
|
+
e as KEYBOARD_NAV_DATA_ID,
|
|
20
|
+
o as KEYBOARD_NAV_DATA_LEVEL,
|
|
21
|
+
a as KEYBOARD_NAV_DATA_SCOPE,
|
|
22
|
+
_ as KEYBOARD_NAV_DATA_ZONE,
|
|
23
|
+
r as KEYBOARD_NAV_EDIT_BUTTON_CLASS,
|
|
24
|
+
d as KEYBOARD_NAV_FILTER_COL_SUFFIX,
|
|
25
|
+
E as tableKeyboardNavigationBodyAttributes,
|
|
26
|
+
c as tableKeyboardNavigationHeaderAttributes,
|
|
27
|
+
D as tableKeyboardNavigationScopeAttributes
|
|
28
28
|
};
|