@progress/kendo-vue-data-tools 8.0.3-develop.4 → 8.1.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -10,141 +10,144 @@ import { CommonDragLogic as a } from "./drag/CommonDragLogic.mjs";
10
10
  import { DragClue as l } from "./drag/DragClue.mjs";
11
11
  import { DropClue as i } from "./drag/DropClue.mjs";
12
12
  import { FilterCell as x } from "./cells/FilterCell.mjs";
13
- import { combineFilters as E, filterBy as d, getSearchFromString as A, getStringFromSearch as g, orderBy as _ } from "./utils/data-operations.mjs";
14
- import { getGroupIds as T, setExpandedState as s, setGroupIds as D } from "./utils/group-operations.mjs";
15
- import { IsUnaryFilter as N, booleanFilterValues as B, cellBoolDropdownChange as C, cellInputChange as R, cellOperatorChange as I, defaultBooleanOperator as S, defaultHideSecondFilter as c, filterLogicList as F, getDefaultOperator as b, getFilterType as L, operatorMap as P, operators as K } from "./filterCommon.mjs";
16
- import { Pager as V } from "./pager/Pager.mjs";
17
- import { PagerInfo as v } from "./pager/PagerInfo.mjs";
13
+ import { combineFilters as E, filterBy as d, getSearchFromString as A, getStringFromSearch as _, orderBy as g } from "./utils/data-operations.mjs";
14
+ import { getGroupIds as u, setExpandedState as s, setGroupIds as D } from "./utils/group-operations.mjs";
15
+ import { IsUnaryFilter as O, booleanFilterValues as C, cellBoolDropdownChange as B, cellInputChange as R, cellOperatorChange as S, defaultBooleanOperator as I, defaultHideSecondFilter as c, filterLogicList as b, getDefaultOperator as F, getFilterType as L, operatorMap as K, operators as P } from "./filterCommon.mjs";
16
+ import { Pager as y } from "./pager/Pager.mjs";
17
+ import { PagerInfo as H } from "./pager/PagerInfo.mjs";
18
18
  import { PagerInput as h } from "./pager/PagerInput.mjs";
19
- import { PagerNavigationButton as U } from "./pager/PagerNavigationButton.mjs";
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 { FOCUSABLE_ELEMENTS as J, KEYBOARD_NAV_DATA_BODY as Q, KEYBOARD_NAV_DATA_HEADER as $, KEYBOARD_NAV_DATA_ID as ee, KEYBOARD_NAV_DATA_LEVEL as re, KEYBOARD_NAV_DATA_SCOPE as oe, KEYBOARD_NAV_DATA_ZONE as te, KEYBOARD_NAV_FILTER_COL_SUFFIX as ae, TABBABLE_ELEMENTS as pe, tableKeyboardNavigationBodyAttributes as le, tableKeyboardNavigationHeaderAttributes as me, tableKeyboardNavigationScopeAttributes as ie } from "./navigation/constants.mjs";
24
+ import { KEYBOARD_NAV_CANCEL_BUTTON_CLASS as J, KEYBOARD_NAV_DATA_BODY as Q, KEYBOARD_NAV_DATA_HEADER as $, KEYBOARD_NAV_DATA_ID as ee, KEYBOARD_NAV_DATA_LEVEL as re, KEYBOARD_NAV_DATA_SCOPE as oe, KEYBOARD_NAV_DATA_ZONE as te, KEYBOARD_NAV_EDIT_BUTTON_CLASS as ae, KEYBOARD_NAV_FILTER_COL_SUFFIX as pe, tableKeyboardNavigationBodyAttributes as le, tableKeyboardNavigationHeaderAttributes as me, tableKeyboardNavigationScopeAttributes as ie } from "./navigation/constants.mjs";
25
25
  import { TableKeyboardNavigationProvider as xe } from "./navigation/TableKeyboardNavigation.mjs";
26
26
  import { tableKeyboardNavigationTools as Ee } from "./navigation/utils.mjs";
27
- import { TABLE_COL_INDEX_ATTRIBUTE as Ae, TABLE_PREVENT_SELECTION_ELEMENT as ge, TABLE_ROW_INDEX_ATTRIBUTE as _e } from "./selection/constants.mjs";
28
- import { closestTagName as Te, getColumnIndex as se, getOffset as De, getRowIndex as Oe, getSelectedState as Ne, getSelectedStateFromKeyDown as Be, getSelectionOptions as Ce, relativeContextElement as Re, setSelectedState as Ie } from "./selection/utils.mjs";
29
- import { getEditableOptions as ce } from "./editing/utils.mjs";
30
- import { EDIT_ACTION as be, editReducer as Le } from "./editing/editReducer.mjs";
31
- import { getDetailExpandableOptions as Ke } from "./detail-expansion/utils.mjs";
32
- import { DETAIL_EXPAND_ACTION as Ve, detailExpandReducer as He } from "./detail-expansion/expandReducer.mjs";
33
- import { GROUP_EXPAND_ACTION as Ye, findGroupExpand as he, flatToTree as Ge, getGroupExpandableOptions as Ue, groupExpandReducer as we, isExpanded as Xe } from "./group-expansion/groupExpandReducer.mjs";
34
- import { BooleanFilter as Me } from "./filter/filters/BooleanFilter.mjs";
35
- import { ColumnDefaultProps as Ze } from "./interfaces/ColumnProps.mjs";
36
- import { DateFilter as ke } from "./filter/filters/DateFilter.mjs";
37
- import { EnumFilter as Je } from "./filter/filters/EnumFilter.mjs";
38
- import { Expression as $e } from "./filter/Expression.mjs";
39
- import { Filter as rr } from "./filter/Filter.mjs";
40
- import { FilterRow as tr } from "./header/FilterRow.mjs";
41
- import { GroupFilter as pr } from "./filter/GroupFilters.mjs";
42
- import { Header as mr } from "./header/Header.mjs";
43
- import { HeaderCell as nr } from "./header/HeaderCell.mjs";
44
- import { HeaderRow as fr } from "./header/HeaderRow.mjs";
45
- import { HeaderSelectionCell as dr } from "./header/HeaderSelectionCell.mjs";
46
- import { HeaderTdElement as gr } from "./header/HeaderTdElement.mjs";
47
- import { NumericFilter as ur } from "./filter/filters/NumericFilter.mjs";
48
- import { Operators as sr, stringOperator as Dr, unaryOperator as Or } from "./filter/operators.mjs";
49
- import { TextFilter as Br } from "./filter/filters/TextFilter.mjs";
50
- import { getIndex as Rr, isRtl as Ir, mapColumns as Sr, nextColumn as cr, readColumns as Fr, updateLeft as br, updateRight as Lr } from "./header/utils/main.mjs";
51
- import { tableColumnsVirtualization as Kr } from "./virtualization/columns.mjs";
27
+ import { TableSelection as Ae } from "./selection/TableSelection.mjs";
28
+ import { TABLE_COL_INDEX_ATTRIBUTE as ge, TABLE_PREVENT_SELECTION_ELEMENT as Te, TABLE_ROW_INDEX_ATTRIBUTE as ue } from "./selection/constants.mjs";
29
+ import { closestTagName as De, getColumnIndex as Ne, getOffset as Oe, getRowIndex as Ce, getSelectedState as Be, getSelectedStateFromKeyDown as Re, getSelectionOptions as Se, isInNonSelectable as Ie, relativeContextElement as ce, setSelectedState as be } from "./selection/utils.mjs";
30
+ import { getEditableOptions as Le } from "./editing/utils.mjs";
31
+ import { EDIT_ACTION as Pe, editReducer as Ve } from "./editing/editReducer.mjs";
32
+ import { getDetailExpandableOptions as Ye } from "./detail-expansion/utils.mjs";
33
+ import { DETAIL_EXPAND_ACTION as ve, detailExpandReducer as he } from "./detail-expansion/expandReducer.mjs";
34
+ import { GROUP_EXPAND_ACTION as Ge, findGroupExpand as we, flatToTree as Xe, getGroupExpandableOptions as ze, groupExpandReducer as Me, isExpanded as We } from "./group-expansion/groupExpandReducer.mjs";
35
+ import { BooleanFilter as je } from "./filter/filters/BooleanFilter.mjs";
36
+ import { ColumnDefaultProps as qe } from "./interfaces/ColumnProps.mjs";
37
+ import { DateFilter as Qe } from "./filter/filters/DateFilter.mjs";
38
+ import { EnumFilter as er } from "./filter/filters/EnumFilter.mjs";
39
+ import { Expression as or } from "./filter/Expression.mjs";
40
+ import { Filter as ar } from "./filter/Filter.mjs";
41
+ import { FilterRow as lr } from "./header/FilterRow.mjs";
42
+ import { GroupFilter as ir } from "./filter/GroupFilters.mjs";
43
+ import { Header as xr } from "./header/Header.mjs";
44
+ import { HeaderCell as Er } from "./header/HeaderCell.mjs";
45
+ import { HeaderRow as Ar } from "./header/HeaderRow.mjs";
46
+ import { HeaderSelectionCell as gr } from "./header/HeaderSelectionCell.mjs";
47
+ import { HeaderTdElement as ur } from "./header/HeaderTdElement.mjs";
48
+ import { NumericFilter as Dr } from "./filter/filters/NumericFilter.mjs";
49
+ import { Operators as Or, stringOperator as Cr, unaryOperator as Br } from "./filter/operators.mjs";
50
+ import { TextFilter as Sr } from "./filter/filters/TextFilter.mjs";
51
+ import { getIndex as cr, isRtl as br, mapColumns as Fr, nextColumn as Lr, readColumns as Kr, updateLeft as Pr, updateRight as Vr } from "./header/utils/main.mjs";
52
+ import { tableColumnsVirtualization as Yr } from "./virtualization/columns.mjs";
52
53
  export {
53
- Me as BooleanFilter,
54
- Ze as ColumnDefaultProps,
54
+ je as BooleanFilter,
55
+ qe as ColumnDefaultProps,
55
56
  o as ColumnResize,
56
57
  a as CommonDragLogic,
57
- Ve as DETAIL_EXPAND_ACTION,
58
- ke as DateFilter,
58
+ ve as DETAIL_EXPAND_ACTION,
59
+ Qe as DateFilter,
59
60
  l as DragClue,
60
61
  i as DropClue,
61
- be as EDIT_ACTION,
62
- Je as EnumFilter,
63
- $e as Expression,
64
- J as FOCUSABLE_ELEMENTS,
65
- rr as Filter,
62
+ Pe as EDIT_ACTION,
63
+ er as EnumFilter,
64
+ or as Expression,
65
+ ar as Filter,
66
66
  x as FilterCell,
67
- tr as FilterRow,
68
- Ye as GROUP_EXPAND_ACTION,
69
- pr as GroupFilter,
70
- mr as Header,
71
- nr as HeaderCell,
72
- fr as HeaderRow,
73
- dr as HeaderSelectionCell,
74
- gr as HeaderTdElement,
67
+ lr as FilterRow,
68
+ Ge as GROUP_EXPAND_ACTION,
69
+ ir as GroupFilter,
70
+ xr as Header,
71
+ Er as HeaderCell,
72
+ Ar as HeaderRow,
73
+ gr as HeaderSelectionCell,
74
+ ur as HeaderTdElement,
75
75
  Z as HeaderThElement,
76
- N as IsUnaryFilter,
76
+ O as IsUnaryFilter,
77
+ J as KEYBOARD_NAV_CANCEL_BUTTON_CLASS,
77
78
  Q as KEYBOARD_NAV_DATA_BODY,
78
79
  $ as KEYBOARD_NAV_DATA_HEADER,
79
80
  ee as KEYBOARD_NAV_DATA_ID,
80
81
  re as KEYBOARD_NAV_DATA_LEVEL,
81
82
  oe as KEYBOARD_NAV_DATA_SCOPE,
82
83
  te as KEYBOARD_NAV_DATA_ZONE,
83
- ae as KEYBOARD_NAV_FILTER_COL_SUFFIX,
84
- ur as NumericFilter,
85
- sr as Operators,
86
- V as Pager,
87
- v as PagerInfo,
84
+ ae as KEYBOARD_NAV_EDIT_BUTTON_CLASS,
85
+ pe as KEYBOARD_NAV_FILTER_COL_SUFFIX,
86
+ Dr as NumericFilter,
87
+ Or as Operators,
88
+ y as Pager,
89
+ H as PagerInfo,
88
90
  h as PagerInput,
89
- U as PagerNavigationButton,
91
+ G as PagerNavigationButton,
90
92
  X as PagerNumericButtons,
91
93
  M as PagerPageSizes,
92
- pe as TABBABLE_ELEMENTS,
93
- Ae as TABLE_COL_INDEX_ATTRIBUTE,
94
- ge as TABLE_PREVENT_SELECTION_ELEMENT,
95
- _e as TABLE_ROW_INDEX_ATTRIBUTE,
94
+ ge as TABLE_COL_INDEX_ATTRIBUTE,
95
+ Te as TABLE_PREVENT_SELECTION_ELEMENT,
96
+ ue as TABLE_ROW_INDEX_ATTRIBUTE,
96
97
  xe as TableKeyboardNavigationProvider,
97
- Br as TextFilter,
98
- B as booleanFilterValues,
99
- C as cellBoolDropdownChange,
98
+ Ae as TableSelection,
99
+ Sr as TextFilter,
100
+ C as booleanFilterValues,
101
+ B as cellBoolDropdownChange,
100
102
  R as cellInputChange,
101
- I as cellOperatorChange,
102
- Te as closestTagName,
103
+ S as cellOperatorChange,
104
+ De as closestTagName,
103
105
  E as combineFilters,
104
- S as defaultBooleanOperator,
106
+ I as defaultBooleanOperator,
105
107
  c as defaultHideSecondFilter,
106
- He as detailExpandReducer,
107
- Le as editReducer,
108
+ he as detailExpandReducer,
109
+ Ve as editReducer,
108
110
  d as filterBy,
109
- F as filterLogicList,
110
- he as findGroupExpand,
111
- Ge as flatToTree,
112
- se as getColumnIndex,
113
- b as getDefaultOperator,
114
- Ke as getDetailExpandableOptions,
115
- ce as getEditableOptions,
111
+ b as filterLogicList,
112
+ we as findGroupExpand,
113
+ Xe as flatToTree,
114
+ Ne as getColumnIndex,
115
+ F as getDefaultOperator,
116
+ Ye as getDetailExpandableOptions,
117
+ Le as getEditableOptions,
116
118
  L as getFilterType,
117
- Ue as getGroupExpandableOptions,
118
- T as getGroupIds,
119
- Rr as getIndex,
120
- De as getOffset,
121
- Oe as getRowIndex,
119
+ ze as getGroupExpandableOptions,
120
+ u as getGroupIds,
121
+ cr as getIndex,
122
+ Oe as getOffset,
123
+ Ce as getRowIndex,
122
124
  A as getSearchFromString,
123
- Ne as getSelectedState,
124
- Be as getSelectedStateFromKeyDown,
125
- Ce as getSelectionOptions,
126
- g as getStringFromSearch,
127
- we as groupExpandReducer,
128
- Xe as isExpanded,
129
- Ir as isRtl,
130
- Sr as mapColumns,
131
- cr as nextColumn,
125
+ Be as getSelectedState,
126
+ Re as getSelectedStateFromKeyDown,
127
+ Se as getSelectionOptions,
128
+ _ as getStringFromSearch,
129
+ Me as groupExpandReducer,
130
+ We as isExpanded,
131
+ Ie as isInNonSelectable,
132
+ br as isRtl,
133
+ Fr as mapColumns,
134
+ Lr as nextColumn,
132
135
  k as normalize,
133
- P as operatorMap,
134
- K as operators,
135
- _ as orderBy,
136
- Fr as readColumns,
137
- Re as relativeContextElement,
136
+ K as operatorMap,
137
+ P as operators,
138
+ g as orderBy,
139
+ Kr as readColumns,
140
+ ce as relativeContextElement,
138
141
  s as setExpandedState,
139
142
  D as setGroupIds,
140
- Ie as setSelectedState,
141
- Dr as stringOperator,
142
- Kr as tableColumnsVirtualization,
143
+ be as setSelectedState,
144
+ Cr as stringOperator,
145
+ Yr as tableColumnsVirtualization,
143
146
  le as tableKeyboardNavigationBodyAttributes,
144
147
  me as tableKeyboardNavigationHeaderAttributes,
145
148
  ie as tableKeyboardNavigationScopeAttributes,
146
149
  Ee as tableKeyboardNavigationTools,
147
- Or as unaryOperator,
148
- br as updateLeft,
149
- Lr as updateRight
150
+ Br as unaryOperator,
151
+ Pr as updateLeft,
152
+ Vr as updateRight
150
153
  };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ /**
9
+ * The navigatable modes
10
+ */
11
+ export declare enum NavigatableMode {
12
+ incell = "incell",
13
+ inline = "inline"
14
+ }
15
+ /**
16
+ * The navigatable additional settings
17
+ */
18
+ export interface NavigatableSettings {
19
+ /**
20
+ * The available values are:
21
+ * * `incell`
22
+ * * `inline`
23
+ */
24
+ mode?: NavigatableMode;
25
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i=(e=>(e.incell="incell",e.inline="inline",e))(i||{});exports.NavigatableMode=i;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ var i = /* @__PURE__ */ ((n) => (n.incell = "incell", n.inline = "inline", n))(i || {});
9
+ export {
10
+ i as NavigatableMode
11
+ };
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { TableKeyboardNavigationContextType } from './TableKeyboardNavigationContextType';
9
9
  import { TableKeyboardNavigationStateType } from './TableKeyboardNavigationStateType';
10
+ import { NavigatableSettings } from './NavigatableSettings';
10
11
  /**
11
12
  * @hidden
12
13
  */
@@ -16,11 +17,17 @@ declare const TableKeyboardNavigationProvider: import('vue').DefineComponent<imp
16
17
  default: boolean;
17
18
  };
18
19
  id: StringConstructor;
20
+ columnVirtualization: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ scrollable: StringConstructor;
19
25
  }>, {}, {
20
26
  scope: any;
21
27
  kbContext: any;
22
28
  navigation: any;
23
29
  }, {}, {
30
+ scrollElementIntoViewForVirtualization(element: HTMLElement): void;
24
31
  getKeyboardNavigationAttributes(elementId: string): {
25
32
  tabIndex?: undefined;
26
33
  "data-keyboardnavlevel"?: undefined;
@@ -35,23 +42,34 @@ declare const TableKeyboardNavigationProvider: import('vue').DefineComponent<imp
35
42
  }): void;
36
43
  onGetSnapshotBeforeUpdate(options: {
37
44
  document: Document;
38
- kbContext: TableKeyboardNavigationContextType;
39
- navigation: TableKeyboardNavigationStateType;
40
45
  }): void;
46
+ conditionallyFocusElement(focusCallback: () => void, userInitiatedEdit?: boolean, scope?: HTMLElement): void;
41
47
  onComponentDidUpdate(options: {
42
48
  scope?: HTMLElement;
43
- kbContext: TableKeyboardNavigationContextType;
44
- navigation: TableKeyboardNavigationStateType;
49
+ focusFirst?: boolean;
50
+ newEditableRow?: Element;
51
+ singleEditRow?: boolean;
52
+ lastActiveElement?: Element;
53
+ navigatable?: boolean | NavigatableSettings;
54
+ userInitiatedEdit?: boolean;
55
+ }): void;
56
+ onFocus(event: any, options?: {
57
+ navigatable?: boolean | NavigatableSettings;
58
+ contextStateRef: {
59
+ current?: TableKeyboardNavigationContextType;
60
+ };
45
61
  }): void;
46
- onFocus(event: any): void;
47
62
  onKeyDown(event: any, options: {
63
+ navigatable: boolean | NavigatableSettings;
48
64
  kbContext: TableKeyboardNavigationContextType;
49
65
  navigation: TableKeyboardNavigationStateType;
50
66
  onNavigationAction?: (options: {
51
67
  event: any;
52
68
  focusElement: any;
69
+ action?: 'moveToNextPage' | 'moveToPrevPage' | 'reorderToLeft' | 'reorderToRight' | 'select';
53
70
  }) => void;
54
- }): void;
71
+ columns?: object[];
72
+ }): Promise<void>;
55
73
  generateMatrix(options: {
56
74
  scope?: HTMLElement;
57
75
  navigation: TableKeyboardNavigationStateType;
@@ -62,13 +80,19 @@ declare const TableKeyboardNavigationProvider: import('vue').DefineComponent<imp
62
80
  default: boolean;
63
81
  };
64
82
  id: StringConstructor;
83
+ columnVirtualization: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ scrollable: StringConstructor;
65
88
  }>> & Readonly<{}>, {
66
89
  navigatable: boolean;
90
+ columnVirtualization: boolean;
67
91
  }, {}, {}, {}, string, () => {
68
92
  getKeyboardNavigationAttributes: any;
69
93
  onNavMount: any;
70
- onGetSnapshotBeforeUpdate: any;
71
- onComponentDidUpdate: any;
94
+ onNavBeforeUpdate: any;
95
+ onNavUpdate: any;
72
96
  onNavFocus: any;
73
97
  onNavKeyDown: any;
74
98
  generateMatrix: any;
@@ -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 d=require("@progress/kendo-vue-common"),p=require("./constants.js"),o=require("./utils.js"),N=require("vue"),K=N.defineComponent({name:"KendoTableKeyboardNavigationProvider",props:{navigatable:{type:Boolean,default:!1},id:String},data:function(){return{scope:void 0,kbContext:void 0,navigation:void 0}},provide:function(){return{getKeyboardNavigationAttributes:this.getKeyboardNavigationAttributes,onNavMount:this.onComponentDidMount,onGetSnapshotBeforeUpdate:this.onGetSnapshotBeforeUpdate,onComponentDidUpdate:this.onComponentDidUpdate,onNavFocus:this.onFocus,onNavKeyDown:this.onKeyDown,generateMatrix:this.generateMatrix,kbContext:this.kbContext,navigation:this.navigation}},created(){const{navigatable:e,id:n}=this.$props;e&&(this.kbContext={activeId:"",level:0},this.navigation={activeElementIsFocused:!1,prevNavigationIndexes:void 0,idPrefix:n||d.guid(),navigationMatrix:[],lastHeaderIndex:-1})},methods:{getKeyboardNavigationAttributes(e){return!e||this.$props.navigatable===!1?{}:{tabIndex:this.kbContext.activeId&&this.kbContext.activeId===e?0:-1,[p.KEYBOARD_NAV_DATA_LEVEL]:this.kbContext.level,[p.KEYBOARD_NAV_DATA_ID]:e}},onComponentDidMount(e){const{scope:n=this.scope}=e;if(this.kbContext&&this.navigation&&n){this.scope=n,this.generateMatrix(e);const a=this.navigation.navigationMatrix[0][0],t=o.tableKeyboardNavigationTools.getActiveElement(n,a);a&&t&&(this.kbContext.activeId=a,t.setAttribute("tabIndex","0"))}},onGetSnapshotBeforeUpdate(e){const{kbContext:n=this.kbContext,navigation:a=this.navigation,document:t}=e;if(n&&a&&t){const s=t.activeElement,i=o.tableKeyboardNavigationTools.getNavigatableId(s);i&&i===n.activeId&&(a.activeElementIsFocused=!0)}},onComponentDidUpdate(e){const{scope:n}=e;if(this.generateMatrix(e),this.kbContext&&this.navigation&&n){if(!o.tableKeyboardNavigationTools.getActiveElement(n,this.kbContext.activeId)){const t=this.navigation.navigationMatrix[0][0],s=o.tableKeyboardNavigationTools.getActiveElement(n,t);t&&s&&(this.kbContext.activeId=t,s.setAttribute("tabIndex","0"),this.navigation.activeElementIsFocused&&s.focus())}this.navigation.activeElementIsFocused=!1}},onFocus(e){const n=this.kbContext;if(e.defaultPrevented||!n)return;const a=e.target,t=o.tableKeyboardNavigationTools.getNavigatableId(a);if(t&&t!==n.activeId){const s=o.tableKeyboardNavigationTools.getClosestScope(a);if(!s)return;const i=o.tableKeyboardNavigationTools.getActiveElement(s,n.activeId);i&&i.setAttribute("tabIndex","-1"),a.setAttribute("tabIndex","0"),n.activeId=t}},onKeyDown(e,n){const{kbContext:a=this.kbContext,navigation:t=this.navigation,onNavigationAction:s}=n;if(e.defaultPrevented||!a||!t)return;if(e.keyCode===d.Keys.esc){const l=o.tableKeyboardNavigationTools.getClosestNavigatableElement(e.target);o.tableKeyboardNavigationTools.focusElement({elementForFocus:l,event:e,kbContext:a});return}const i=e.target,v=o.tableKeyboardNavigationTools.getNavigatableId(i),m=o.tableKeyboardNavigationTools.getNavigatableLevel(i),u=o.tableKeyboardNavigationTools.getClosestScope(i),g=t.navigationMatrix;if(m!==void 0&&u){if(e.keyCode===d.Keys.enter){const l=o.tableKeyboardNavigationTools.getNavigatableElement(i,{level:m+1});if(l){o.tableKeyboardNavigationTools.focusElement({elementForFocus:l,event:e,kbContext:a,prevElement:i});return}else{const b=o.tableKeyboardNavigationTools.getFocusableElements(i)[0];o.tableKeyboardNavigationTools.focusElement({elementForFocus:b,event:e,kbContext:a,prevElement:i});return}}if(e.keyCode===d.Keys.up||e.keyCode===d.Keys.down||e.keyCode===d.Keys.left||e.keyCode===d.Keys.right){const l=e.keyCode===d.Keys.up||e.keyCode===d.Keys.left,b=e.keyCode===d.Keys.up||e.keyCode===d.Keys.down;let f;if(t&&t.prevNavigationIndexes){const[y,c]=t.prevNavigationIndexes;g[y][c]===v?f=t.prevNavigationIndexes:f=o.findId(g,v)}else f=o.findId(g,v);if(f){const[y,c]=f,[r,h]=b?o.findNextIdByRowIndex(y,c,v,g,l):o.findNextIdByCellIndex(y,c,v,g,l);if(r){const x=o.tableKeyboardNavigationTools.getActiveElement(u,r);o.tableKeyboardNavigationTools.focusElement({elementForFocus:x,event:e,kbContext:a,prevElement:i}),t.prevNavigationIndexes=h,s&&s({focusElement:x,event:e})}}}}},generateMatrix(e){const{navigation:n=this.navigation,scope:a}=e;if(!n||!a)return;const t=[],s=o.getHeaderElement(a),i=o.getBodyElement(a);if(!s||!i)return;const v=Array.from(s.children),m=Array.from(i.children);[...v,...m].forEach((u,g)=>{Array.from(u.children).forEach(l=>{const b=o.getNavigatableId(l);if(!b)return;const f=l.rowSpan||1,y=l.colSpan||1;let c;for(let r=g,h=g+f;r<h;r++){if(t[r]||(t[r]=[]),c===void 0){const x=t[r].findIndex(I=>!I);c=x>-1?x:t[r].length}t[r][c]=b||""}for(let r=c+1,h=c+y;r<h;r++)t[g][r]=b||""})}),n.navigationMatrix=t.filter(u=>!!u),n.lastHeaderIndex=v.length-1}},render(){return d.getDefaultSlots(this)[0]}});exports.TableKeyboardNavigationProvider=K;
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;