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