@progress/kendo-vue-grid 8.1.2-develop.2 → 8.2.0

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.
Files changed (58) hide show
  1. package/Grid.d.ts +36 -3
  2. package/Grid.js +1 -1
  3. package/Grid.mjs +706 -496
  4. package/GridSearchBox.js +1 -1
  5. package/GridSearchBox.mjs +5 -5
  6. package/GridState.d.ts +6 -0
  7. package/RootGrid.d.ts +6 -10
  8. package/cells/GridCell.d.ts +2 -0
  9. package/cells/GridCell.js +1 -1
  10. package/cells/GridCell.mjs +52 -43
  11. package/cells/GridDetailCell.d.ts +4 -1
  12. package/cells/GridDetailCell.js +1 -1
  13. package/cells/GridDetailCell.mjs +27 -18
  14. package/cells/GridEditCell.d.ts +2 -0
  15. package/cells/GridEditCell.js +1 -1
  16. package/cells/GridEditCell.mjs +21 -14
  17. package/cells/GridGroupCell.d.ts +1 -0
  18. package/cells/GridGroupCell.js +1 -1
  19. package/cells/GridGroupCell.mjs +45 -40
  20. package/cells/GridHierarchyCell.d.ts +1 -0
  21. package/cells/GridHierarchyCell.js +1 -1
  22. package/cells/GridHierarchyCell.mjs +25 -20
  23. package/cells/GridSelectionCell.d.ts +4 -1
  24. package/cells/GridSelectionCell.js +1 -1
  25. package/cells/GridSelectionCell.mjs +31 -21
  26. package/cells/pincell/GridPinCell.d.ts +6 -2
  27. package/cells/pincell/GridPinCell.js +1 -1
  28. package/cells/pincell/GridPinCell.mjs +67 -42
  29. package/cells/pincell/GridPinDropdownButton.js +1 -1
  30. package/cells/pincell/GridPinDropdownButton.mjs +25 -25
  31. package/common.d.ts +3 -0
  32. package/common.js +1 -1
  33. package/common.mjs +4 -1
  34. package/components/PinnedRowsTable.js +1 -1
  35. package/components/PinnedRowsTable.mjs +46 -34
  36. package/components/table/GridTable.js +1 -1
  37. package/components/table/GridTable.mjs +6 -6
  38. package/components/table/GridTableScrollable.js +1 -1
  39. package/components/table/GridTableScrollable.mjs +4 -4
  40. package/contextMenu/GridContextMenu.d.ts +155 -0
  41. package/contextMenu/GridContextMenu.js +8 -0
  42. package/contextMenu/GridContextMenu.mjs +336 -0
  43. package/contextMenu/enums.d.ts +40 -0
  44. package/contextMenu/enums.js +8 -0
  45. package/contextMenu/enums.mjs +12 -0
  46. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  47. package/header/HeaderRow.d.ts +1 -0
  48. package/header/HeaderRow.js +1 -1
  49. package/header/HeaderRow.mjs +92 -81
  50. package/index.d.mts +3 -0
  51. package/index.d.ts +3 -0
  52. package/index.js +1 -1
  53. package/index.mjs +61 -53
  54. package/interfaces/GridProps.d.ts +31 -1
  55. package/interfaces/events.d.ts +38 -0
  56. package/package-metadata.js +1 -1
  57. package/package-metadata.mjs +2 -2
  58. package/package.json +13 -13
package/Grid.mjs CHANGED
@@ -5,51 +5,53 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as ft, createVNode as a, h as De, createTextVNode as gt, ref as f, inject as mt, computed as Le, markRaw as I } from "vue";
9
- import { isObject as j, cloneArray as Rt, canUseDOM as q, WatermarkOverlay as Ct, getter as D, getTemplate as _e, setRef as $, hasListener as K, getComponentElementRef as Me, getRef as R, RowHeightService as bt, setScrollbarWidth as $t, kendoThemeMaps as Ke, uGrid as wt, isRtl as Be, validatePackage as xt, shouldShowValidationUI as vt, getLicenseMessage as It, guid as Ae } from "@progress/kendo-vue-common";
10
- import { tableKeyboardNavigationTools as k, combineFilters as St, Pager as yt, normalize as kt, TableKeyboardNavigationProvider as Ve, HeaderCell as Ht, updateLeft as Tt, updateRight as zt, groupExpandReducer as Et, detailExpandReducer as Pt, getSelectedState as Oe, getSelectedStateFromKeyDown as Gt, closestTagName as We, getColumnIndex as Ft, getRowIndex as Dt, getDetailExpandableOptions as Lt, getSelectionOptions as _t, getGroupExpandableOptions as Mt } from "@progress/kendo-vue-data-tools";
11
- import { Loader as Kt } from "@progress/kendo-vue-indicators";
12
- import { GridNav as Ne } from "./GridNav.mjs";
13
- import { GridSelectionCell as Ue } from "./cells/GridSelectionCell.mjs";
14
- import { GridHierarchyCell as je } from "./cells/GridHierarchyCell.mjs";
15
- import { GridDetailHierarchyCell as Bt } from "./cells/GridDetailHierarchyCell.mjs";
16
- import { GridDetailCell as At } from "./cells/GridDetailCell.mjs";
17
- import { Header as Vt } from "./header/Header.mjs";
18
- import { HeaderRow as Ot } from "./header/HeaderRow.mjs";
19
- import { FilterRow as Wt } from "./header/FilterRow.mjs";
20
- import { GroupPanel as Nt } from "./header/GroupPanel.mjs";
21
- import { Footer as Ut } from "./footer/Footer.mjs";
22
- import { FooterRow as jt } from "./footer/FooterRow.mjs";
23
- import { GridTable as qt } from "./components/table/GridTable.mjs";
24
- import { GridTableScrollable as Jt } from "./components/table/GridTableScrollable.mjs";
25
- import { operators as qe } from "./filterCommon.mjs";
26
- import { VirtualScroll as Qt } from "./VirtualScroll.mjs";
27
- import { ColumnResize as Xt } from "./drag/ColumnResize.mjs";
28
- import { CommonDragLogic as Yt } from "./drag/CommonDragLogic.mjs";
29
- import { DragClue as Zt } from "./drag/DragClue.mjs";
30
- import { DropClue as es } from "./drag/DropClue.mjs";
31
- import { applyExpandedState as ts, getColSpan as ss, autoGenerateColumns as is, mapColumns as os, getFlatColumnsState as Je, getRowSpanOptions as Qe, getDataAsArray as rs, groupedFirstItemValue as ls, calcRowHeight as ns, flatData as as, readColumns as ds } from "./utils/main.mjs";
32
- import { GridGroupCell as Xe } from "./cells/GridGroupCell.mjs";
33
- import { GridRow as hs } from "./rows/GridRow.mjs";
34
- import { gridProps as ps } from "./common.mjs";
35
- import { GridHeaderSelectionCell as Ye } from "./header/GridHeaderSelectionCell.mjs";
36
- import { GridNoRecords as Ze } from "./components/noRecords/GridNoRecords.mjs";
37
- import { GridNoRecordsContainer as et } from "./components/noRecords/GridNoRecordsContainer.mjs";
38
- import { packageMetadata as de } from "./package-metadata.mjs";
39
- import { pagerMessagesMap as tt } from "./messages/messagesMap.mjs";
40
- import { process as cs, orderBy as st } from "@progress/kendo-data-query";
41
- import { KendoKey as us } from "./key.mjs";
42
- import { getVirtualCellsToRender as fs } from "./utils/virtualColumns.mjs";
43
- import { StickyGroupTable as it } from "./components/StickyGroupTable.mjs";
44
- import { getRowContents as gs } from "./getRowContents.mjs";
45
- import { useStickyGroups as ms } from "./hooks/useStickyGroups.mjs";
46
- import { PinnedRowsTable as ot } from "./components/PinnedRowsTable.mjs";
47
- import { GridPinCell as Rs } from "./cells/pincell/GridPinCell.mjs";
48
- const ri = /* @__PURE__ */ ft({
8
+ import { defineComponent as Rt, createVNode as d, h as Fe, Fragment as Le, createTextVNode as Ct, ref as g, inject as bt, computed as Ke, markRaw as k } from "vue";
9
+ import { isObject as j, cloneArray as St, canUseDOM as q, WatermarkOverlay as xt, getter as M, getTemplate as _e, setRef as y, hasListener as _, getComponentElementRef as Ae, getRef as x, RowHeightService as It, setScrollbarWidth as $t, kendoThemeMaps as Be, uGrid as wt, isRtl as Ve, validatePackage as yt, shouldShowValidationUI as vt, getLicenseMessage as kt, guid as Oe } from "@progress/kendo-vue-common";
10
+ import { tableKeyboardNavigationTools as P, combineFilters as Ht, Pager as Tt, normalize as Mt, TableKeyboardNavigationProvider as Ne, HeaderCell as Pt, updateLeft as zt, updateRight as Et, groupExpandReducer as Dt, detailExpandReducer as Gt, getSelectedState as We, getSelectedStateFromKeyDown as Ft, closestTagName as Ue, getColumnIndex as Lt, getRowIndex as Kt, getDetailExpandableOptions as _t, getSelectionOptions as At, getGroupExpandableOptions as Bt } from "@progress/kendo-vue-data-tools";
11
+ import { Loader as Vt } from "@progress/kendo-vue-indicators";
12
+ import { GridNav as je } from "./GridNav.mjs";
13
+ import { GridSelectionCell as qe } from "./cells/GridSelectionCell.mjs";
14
+ import { GridHierarchyCell as Je } from "./cells/GridHierarchyCell.mjs";
15
+ import { GridDetailHierarchyCell as Ot } from "./cells/GridDetailHierarchyCell.mjs";
16
+ import { GridDetailCell as Nt } from "./cells/GridDetailCell.mjs";
17
+ import { Header as Wt } from "./header/Header.mjs";
18
+ import { HeaderRow as Ut } from "./header/HeaderRow.mjs";
19
+ import { FilterRow as jt } from "./header/FilterRow.mjs";
20
+ import { GroupPanel as qt } from "./header/GroupPanel.mjs";
21
+ import { Footer as Jt } from "./footer/Footer.mjs";
22
+ import { FooterRow as Xt } from "./footer/FooterRow.mjs";
23
+ import { GridTable as Yt } from "./components/table/GridTable.mjs";
24
+ import { GridTableScrollable as Qt } from "./components/table/GridTableScrollable.mjs";
25
+ import { operators as Xe } from "./filterCommon.mjs";
26
+ import { VirtualScroll as Zt } from "./VirtualScroll.mjs";
27
+ import { ColumnResize as es } from "./drag/ColumnResize.mjs";
28
+ import { CommonDragLogic as ts } from "./drag/CommonDragLogic.mjs";
29
+ import { DragClue as ss } from "./drag/DragClue.mjs";
30
+ import { DropClue as is } from "./drag/DropClue.mjs";
31
+ import { applyExpandedState as os, getColSpan as ns, autoGenerateColumns as rs, mapColumns as ls, getFlatColumnsState as Ye, getRowSpanOptions as Qe, getDataAsArray as as, groupedFirstItemValue as ds, calcRowHeight as hs, flatData as cs, readColumns as ps } from "./utils/main.mjs";
32
+ import { GridGroupCell as Ze } from "./cells/GridGroupCell.mjs";
33
+ import { GridRow as us } from "./rows/GridRow.mjs";
34
+ import { gridProps as fs } from "./common.mjs";
35
+ import { GridHeaderSelectionCell as et } from "./header/GridHeaderSelectionCell.mjs";
36
+ import { GridNoRecords as tt } from "./components/noRecords/GridNoRecords.mjs";
37
+ import { GridNoRecordsContainer as st } from "./components/noRecords/GridNoRecordsContainer.mjs";
38
+ import { packageMetadata as he } from "./package-metadata.mjs";
39
+ import { pagerMessagesMap as it } from "./messages/messagesMap.mjs";
40
+ import { process as ms, orderBy as ot } from "@progress/kendo-data-query";
41
+ import { KendoKey as gs } from "./key.mjs";
42
+ import { getVirtualCellsToRender as Rs } from "./utils/virtualColumns.mjs";
43
+ import { StickyGroupTable as nt } from "./components/StickyGroupTable.mjs";
44
+ import { getRowContents as Cs } from "./getRowContents.mjs";
45
+ import { useStickyGroups as bs } from "./hooks/useStickyGroups.mjs";
46
+ import { PinnedRowsTable as rt } from "./components/PinnedRowsTable.mjs";
47
+ import { GridPinCell as Ss } from "./cells/pincell/GridPinCell.mjs";
48
+ import { contextMenuItemsMap as xs, GridContextMenu as Is, getDefaultBodyContextMenuItems as $s, getDefaultHeadContextMenuItems as ws } from "./contextMenu/GridContextMenu.mjs";
49
+ import { GridContextMenuItemNames as J, GridContextMenuAnchorPart as lt } from "./contextMenu/enums.mjs";
50
+ const fi = /* @__PURE__ */ Rt({
49
51
  name: "KendoGrid",
50
52
  inheritAttrs: !1,
51
53
  props: {
52
- ...ps,
54
+ ...fs,
53
55
  toolbar: {
54
56
  type: Object
55
57
  },
@@ -64,7 +66,16 @@ const ri = /* @__PURE__ */ ft({
64
66
  navigation: void 0,
65
67
  showLicenseWatermark: !1,
66
68
  licenseMessage: void 0,
67
- notHiddenColumns: []
69
+ notHiddenColumns: [],
70
+ contextMenuState: {
71
+ show: !1,
72
+ offset: {
73
+ left: 0,
74
+ top: 0
75
+ },
76
+ dataItem: void 0,
77
+ field: void 0
78
+ }
68
79
  };
69
80
  },
70
81
  watch: {
@@ -94,12 +105,12 @@ const ri = /* @__PURE__ */ ft({
94
105
  }
95
106
  },
96
107
  created() {
97
- xt(de), this.showLicenseWatermark = vt(de), this.licenseMessage = It(de), this.initialHeight = null, this.columnsRef = [], this.dragLogic = new Yt(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new Xt(this.onResize.bind(this)), this._columnsMap = [[]], this._header = null, this._footer = null, this.tableRef = null, this.scrollHeightContainerRef = null, this.forceUpdateTimeout = void 0, this._gridId = Ae(), this._gridRoleElementId = Ae(), this.slicedCurrentData = void 0, this._prevTotal = void 0, this._containerHeightRef = 0, this._minRowHeightRef = 0, this.wrapperScrollTopRef = 0, this.scrollLeftRef = 0;
108
+ yt(he), this.showLicenseWatermark = vt(he), this.licenseMessage = kt(he), this.initialHeight = null, this.columnsRef = [], this.dragLogic = new ts(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new es(this.onResize.bind(this)), this._columnsMap = [[]], this._header = null, this._footer = null, this.tableRef = null, this.scrollHeightContainerRef = null, this.forceUpdateTimeout = void 0, this._gridId = Oe(), this._gridRoleElementId = Oe(), this.slicedCurrentData = void 0, this._prevTotal = void 0, this._containerHeightRef = 0, this._minRowHeightRef = 0, this.wrapperScrollTopRef = 0, this.scrollLeftRef = 0;
98
109
  },
99
110
  mounted() {
100
111
  var t, s;
101
112
  this.setRefs();
102
- const e = Be(this._element);
113
+ const e = Ve(this._element);
103
114
  if (this._prevTotal = this.$props.total, this.isRtl = e, this.initialHeight = ((s = (t = this._element) == null ? void 0 : t.style) == null ? void 0 : s.height) || null, this.resizeObserver = q && (window == null ? void 0 : window.ResizeObserver) && new ResizeObserver(this.calculateMedia), document != null && document.body && this.resizeObserver && this.resizeObserver.observe(document.body), q) {
104
115
  const i = {
105
116
  rootMargin: "0px",
@@ -111,7 +122,7 @@ const ri = /* @__PURE__ */ ft({
111
122
  updated() {
112
123
  var s;
113
124
  this.setRefs();
114
- const e = Be(this._element);
125
+ const e = Ve(this._element);
115
126
  this.isRtl = e, this._prevTotal = this.$props.total, this.vsRef.tableTransform && this.vsRef.table && (this.vsRef.table.style.transform = this.vsRef.tableTransform, this.vsRef.tableTransform = "");
116
127
  const t = this.updateStickyGroups();
117
128
  this.sticky.headerItems = t == null ? void 0 : t.stickyHeaderItems, this.sticky.footerItems = t == null ? void 0 : t.stickyFooterItems, this.isVirtualScroll && (this.setContainerHeight(), this.setMinRowHeight(), (s = this.vsRef) == null || s.update());
@@ -127,7 +138,7 @@ const ri = /* @__PURE__ */ ft({
127
138
  return this.$props.navigatable ? this.gridId : "";
128
139
  },
129
140
  groupExpandable() {
130
- return Mt(typeof this.$props.groupable == "object" && this.$props.groupable.enabled !== !1 ? this.$props.groupable.expandable : this.$props.groupable);
141
+ return Bt(typeof this.$props.groupable == "object" && this.$props.groupable.enabled !== !1 ? this.$props.groupable.expandable : this.$props.groupable);
131
142
  },
132
143
  hierarchClass() {
133
144
  return wt.hierarchyCell({});
@@ -136,10 +147,10 @@ const ri = /* @__PURE__ */ ft({
136
147
  return Qe(this.$props.rowSpannable);
137
148
  },
138
149
  computedSelectable() {
139
- return _t(this.$props.selectable);
150
+ return At(this.$props.selectable);
140
151
  },
141
152
  detailExpandable() {
142
- return Lt(!!this.$props.detail);
153
+ return _t(!!this.$props.detail);
143
154
  },
144
155
  nonscrollableWrapperClass() {
145
156
  const {
@@ -148,7 +159,7 @@ const ri = /* @__PURE__ */ ft({
148
159
  return {
149
160
  "k-grid": !0,
150
161
  "k-grid-md": !e,
151
- [`k-grid-${Ke.sizeMap[e] || e}`]: e,
162
+ [`k-grid-${Be.sizeMap[e] || e}`]: e,
152
163
  [t]: !!t
153
164
  };
154
165
  },
@@ -169,7 +180,7 @@ const ri = /* @__PURE__ */ ft({
169
180
  "k-table": !0,
170
181
  "k-grid-table": !0,
171
182
  "k-grid-md": !e,
172
- [`k-table-${Ke.sizeMap[e] || e}`]: e
183
+ [`k-table-${Be.sizeMap[e] || e}`]: e
173
184
  };
174
185
  },
175
186
  getCorrectHeight() {
@@ -177,7 +188,7 @@ const ri = /* @__PURE__ */ ft({
177
188
  },
178
189
  currentGroupable() {
179
190
  var t;
180
- const e = (t = this.gridContext.group) == null ? void 0 : t.value;
191
+ const e = (t = this.gridStateContext.group) == null ? void 0 : t.value;
181
192
  return this.$props.groupable === !0 && (e == null ? void 0 : e.length) || j(this.$props.groupable) && this.$props.groupable.enabled !== !1;
182
193
  },
183
194
  computedCollapsed() {
@@ -191,12 +202,12 @@ const ri = /* @__PURE__ */ ft({
191
202
  getAriaRowCount() {
192
203
  var s, i;
193
204
  const e = this.$props.dataItems, t = this.$props.total || (e == null ? void 0 : e.total) || (e == null ? void 0 : e.length) || 0;
194
- return this.$props.detail ? this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t * 2 + (this.columnsRef.some((r) => {
205
+ return this.$props.detail ? this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t * 2 + (this.columnsRef.some((n) => {
195
206
  var o;
196
- return !!(r.footerCell || (o = r.cells) != null && o.footerCell);
197
- }) || (s = this.$props.cells) != null && s.footerCell ? 1 : 0) : !this.$props.pageable && this.$props.scrollable === "scrollable" ? void 0 : this.$props.groupable ? -1 : this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t + (this.columnsRef.some((r) => {
207
+ return !!(n.footerCell || (o = n.cells) != null && o.footerCell);
208
+ }) || (s = this.$props.cells) != null && s.footerCell ? 1 : 0) : !this.$props.pageable && this.$props.scrollable === "scrollable" ? void 0 : this.$props.groupable ? -1 : this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t + (this.columnsRef.some((n) => {
198
209
  var o;
199
- return !!(r.footerCell || (o = r.cells) != null && o.footerCell);
210
+ return !!(n.footerCell || (o = n.cells) != null && o.footerCell);
200
211
  }) || (i = this.$props.cells) != null && i.footerCell ? 1 : 0);
201
212
  },
202
213
  // Calculates the value of the ariaColcount attribute.
@@ -212,23 +223,50 @@ const ri = /* @__PURE__ */ ft({
212
223
  pinnedSourceSet() {
213
224
  var t, s;
214
225
  const e = /* @__PURE__ */ new Set();
215
- return (t = this.gridContext.pinnedTopRows) != null && t.value && this.gridContext.pinnedTopRows.value.forEach((i) => e.add(i)), (s = this.gridContext.pinnedBottomRows) != null && s.value && this.gridContext.pinnedBottomRows.value.forEach((i) => e.add(i)), e;
226
+ return (t = this.gridStateContext.pinnedTopRows) != null && t.value && this.gridStateContext.pinnedTopRows.value.forEach((i) => e.add(i)), (s = this.gridStateContext.pinnedBottomRows) != null && s.value && this.gridStateContext.pinnedBottomRows.value.forEach((i) => e.add(i)), e;
216
227
  },
217
228
  sortedPinnedTopRows() {
218
229
  var s, i;
219
- const e = ((s = this.gridContext.pinnedTopRows) == null ? void 0 : s.value) || [], t = (i = this.gridContext.sort) == null ? void 0 : i.value;
220
- return this.autoProcessData && (t != null && t.length) ? st([...e], t) : e;
230
+ const e = ((s = this.gridStateContext.pinnedTopRows) == null ? void 0 : s.value) || [], t = (i = this.gridStateContext.sort) == null ? void 0 : i.value;
231
+ return this.autoProcessData && (t != null && t.length) ? ot([...e], t) : e;
221
232
  },
222
233
  sortedPinnedBottomRows() {
223
234
  var s, i;
224
- const e = ((s = this.gridContext.pinnedBottomRows) == null ? void 0 : s.value) || [], t = (i = this.gridContext.sort) == null ? void 0 : i.value;
225
- return this.autoProcessData && (t != null && t.length) ? st([...e], t) : e;
235
+ const e = ((s = this.gridStateContext.pinnedBottomRows) == null ? void 0 : s.value) || [], t = (i = this.gridStateContext.sort) == null ? void 0 : i.value;
236
+ return this.autoProcessData && (t != null && t.length) ? ot([...e], t) : e;
226
237
  },
227
238
  hasPinnedTopRows() {
228
239
  return this.$props.pinnable && this.sortedPinnedTopRows.length > 0;
229
240
  },
230
241
  hasPinnedBottomRows() {
231
242
  return this.$props.pinnable && this.sortedPinnedBottomRows.length > 0;
243
+ },
244
+ contextMenuColumn() {
245
+ return this.columnsRef.find((e) => e.field === this.contextMenuState.field);
246
+ },
247
+ headMenuItems() {
248
+ var t;
249
+ const e = this.$props.sortable && ((t = this.contextMenuColumn) == null ? void 0 : t.sortable);
250
+ return ws({
251
+ sortable: !!e,
252
+ selectable: this.computedSelectable.enabled
253
+ });
254
+ },
255
+ bodyMenuItems() {
256
+ var e;
257
+ return this.$props.sortable && ((e = this.contextMenuColumn) == null || e.sortable), $s({
258
+ selectable: this.computedSelectable.enabled,
259
+ pinnable: !!this.$props.pinnable
260
+ });
261
+ },
262
+ contextMenuItems() {
263
+ var s;
264
+ const e = ((s = this.contextMenuColumn) == null ? void 0 : s.contextMenu) || this.$props.contextMenu, t = typeof e == "function" ? e(this.contextMenuState) : e;
265
+ if (t && this.contextMenuState.offset) {
266
+ const i = this.contextMenuState.dataItem ? lt.body : lt.head, n = t[i], o = this.contextMenuState.dataItem ? this.bodyMenuItems : this.headMenuItems;
267
+ let r;
268
+ return n === !0 || n === void 0 ? r = o : n !== !1 && (r = n), this.$props.pinnable && r && this.contextMenuState.dataItem ? this.filterPinContextMenuItems(r) : r;
269
+ }
232
270
  }
233
271
  },
234
272
  methods: {
@@ -241,6 +279,177 @@ const ri = /* @__PURE__ */ ft({
241
279
  right: e.right + "px"
242
280
  } : {};
243
281
  },
282
+ handleContextMenuOpen(e, t, s) {
283
+ e.preventDefault(), this.contextMenuState = {
284
+ show: !0,
285
+ offset: {
286
+ left: e.pageX,
287
+ top: e.pageY
288
+ },
289
+ dataItem: t,
290
+ field: s
291
+ };
292
+ },
293
+ handleContextMenuClose() {
294
+ this.contextMenuState = {
295
+ show: !1,
296
+ offset: {
297
+ left: 0,
298
+ top: 0
299
+ },
300
+ dataItem: void 0,
301
+ field: void 0
302
+ };
303
+ },
304
+ handleContextMenuSelect(e) {
305
+ this.handleContextMenuItemClick({
306
+ event: e,
307
+ dataItem: this.contextMenuState.dataItem,
308
+ field: this.contextMenuState.field
309
+ });
310
+ },
311
+ renderContextMenu() {
312
+ var e;
313
+ return d(Is, {
314
+ show: !!(this.contextMenuState.show && ((e = this.contextMenuItems) != null && e.length)),
315
+ dataItem: this.contextMenuState.dataItem,
316
+ field: this.contextMenuState.field,
317
+ items: this.contextMenuItems,
318
+ offset: this.contextMenuState.offset,
319
+ onClose: this.handleContextMenuClose,
320
+ onSelect: this.handleContextMenuSelect
321
+ }, null);
322
+ },
323
+ filterPinContextMenuItems(e) {
324
+ var c, f;
325
+ const t = this.$props.dataItemKey || "", s = this.contextMenuState.dataItem, i = ((c = this.gridStateContext.pinnedTopRows) == null ? void 0 : c.value) || [], n = ((f = this.gridStateContext.pinnedBottomRows) == null ? void 0 : f.value) || [], o = t ? s[t] : void 0, r = o !== void 0 && i.some((h) => h[t] === o), a = o !== void 0 && n.some((h) => h[t] === o);
326
+ return e.map((h) => {
327
+ const u = typeof h == "string" ? xs[h] : h;
328
+ return (u == null ? void 0 : u.name) === J.pinRow && u.items ? {
329
+ ...u,
330
+ items: u.items.filter((p) => p.name === J.pinTop ? !r : p.name === J.pinBottom ? !a : p.name === J.unpin ? r || a : !0)
331
+ } : h;
332
+ });
333
+ },
334
+ handleContextMenuItemClick(e) {
335
+ var i, n, o, r, a, c, f;
336
+ const t = e.event.event.item, s = {
337
+ event: e.event,
338
+ menuItem: t,
339
+ dataItem: e.dataItem,
340
+ field: e.field
341
+ };
342
+ switch (this.$emit("contextmenuitemclick", s), (i = t.data) == null ? void 0 : i.action) {
343
+ case "SortCommand":
344
+ if (this.contextMenuColumn) {
345
+ const h = (n = t.name) == null ? void 0 : n.toLowerCase().includes("asc"), p = ((o = t.name) == null ? void 0 : o.toLowerCase().includes("desc")) ? "desc" : void 0, R = h ? "asc" : p, C = t.name ? R : void 0, w = (((r = this.gridStateContext.sort) == null ? void 0 : r.value) || []).filter(($) => {
346
+ var b;
347
+ return $.field !== ((b = this.contextMenuColumn) == null ? void 0 : b.field);
348
+ });
349
+ C && ((a = this.contextMenuColumn) != null && a.field) && w.push({
350
+ field: this.contextMenuColumn.field,
351
+ dir: C
352
+ }), this.sortChangeHandler(w, {
353
+ event: e.event
354
+ });
355
+ }
356
+ break;
357
+ case "SelectRowCommand": {
358
+ const h = e.dataItem;
359
+ if (this.computedSelectable.enabled && h && this.$props.dataItemKey) {
360
+ const p = M(this.$props.dataItemKey)(h), R = this.getLeafDataItems(), C = R.findIndex((H) => H[this.$props.dataItemKey] === h[this.$props.dataItemKey]), I = 0, w = this.columnsRef.length - 1, $ = {
361
+ ...this.getArguments(e.event),
362
+ dataItem: h,
363
+ startDataItem: C,
364
+ endDataItem: C,
365
+ startRowIndex: C,
366
+ endRowIndex: C,
367
+ startColIndex: I,
368
+ endColIndex: w,
369
+ dataItems: R,
370
+ ctrlKey: !1,
371
+ altKey: !1,
372
+ metaKey: !1,
373
+ shiftKey: !1,
374
+ isDrag: !1,
375
+ mode: this.computedSelectable.mode,
376
+ cell: this.computedSelectable.cell,
377
+ componentId: this.$props.id || this._gridId,
378
+ selectedField: this.$props.selectedField || ""
379
+ }, b = this.computedSelectable.mode === "multiple" ? {
380
+ ...(f = (c = this.gridStateContext.select) == null ? void 0 : c.value) != null ? f : {}
381
+ } : {};
382
+ b[p] === !0 || Array.isArray(b[p]) && b[p].length === this.columnsRef.length ? delete b[p] : b[p] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0, this.raiseSelectionEvent($, b);
383
+ }
384
+ break;
385
+ }
386
+ case "SelectAllRowsCommand": {
387
+ if (this.computedSelectable.enabled && this.$props.dataItemKey) {
388
+ const h = this.getLeafDataItems(), u = {}, p = h[0], R = h[h.length - 1];
389
+ h.forEach((C) => {
390
+ const I = M(this.$props.dataItemKey)(C);
391
+ u[I] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0;
392
+ }), this.raiseSelectionEvent({
393
+ ...this.getArguments(e.event),
394
+ dataItems: h,
395
+ dataItem: p,
396
+ startDataItem: p,
397
+ endDataItem: R,
398
+ startRowIndex: 0,
399
+ endRowIndex: h.length - 1,
400
+ startColIndex: 0,
401
+ endColIndex: this.columnsRef.length - 1,
402
+ ctrlKey: !1,
403
+ altKey: !1,
404
+ metaKey: !1,
405
+ shiftKey: !1,
406
+ isDrag: !1,
407
+ mode: this.computedSelectable.mode,
408
+ cell: this.computedSelectable.cell,
409
+ componentId: this.$props.id || this._gridId,
410
+ selectedField: this.$props.selectedField || ""
411
+ }, u);
412
+ }
413
+ break;
414
+ }
415
+ case "ClearSelectionCommand":
416
+ this.computedSelectable.enabled && this.clearSelection({
417
+ ...this.getArguments(e.event),
418
+ dataItems: this.getLeafDataItems(),
419
+ startRowIndex: -1,
420
+ endRowIndex: -1,
421
+ startColIndex: -1,
422
+ endColIndex: -1,
423
+ ctrlKey: !1,
424
+ altKey: !1,
425
+ metaKey: !1,
426
+ shiftKey: !1,
427
+ isDrag: !1,
428
+ mode: this.computedSelectable.mode,
429
+ cell: this.computedSelectable.cell,
430
+ componentId: this.$props.id || this._gridId,
431
+ selectedField: this.$props.selectedField || ""
432
+ });
433
+ break;
434
+ case "PinTopCommand":
435
+ this.handleRowPin("pinTop", e.dataItem);
436
+ break;
437
+ case "PinBottomCommand":
438
+ this.handleRowPin("pinBottom", e.dataItem);
439
+ break;
440
+ case "UnpinCommand":
441
+ this.handleRowPin("unpin", e.dataItem);
442
+ break;
443
+ }
444
+ this.handleContextMenuClose();
445
+ },
446
+ triggerCellContextMenu(e, t, s) {
447
+ this.$emit("contextmenu", {
448
+ dataItem: t,
449
+ field: s,
450
+ event: e
451
+ }), this.$props.contextMenu && this.handleContextMenuOpen(e, t, s);
452
+ },
244
453
  handleIntersection(e) {
245
454
  const t = {
246
455
  rowIndex: this.rowIndexRef.value
@@ -260,12 +469,12 @@ const ri = /* @__PURE__ */ ft({
260
469
  const s = this._element;
261
470
  if (this.observerRef && s) {
262
471
  this.observerRef.disconnect();
263
- const r = s.querySelector(`[absolute-row-index="${this.rowIndexRef.value}"]`);
264
- r ? this.observerRef.observe(r) : this.setCurrentOnTop(e);
472
+ const n = s.querySelector(`[absolute-row-index="${this.rowIndexRef.value}"]`);
473
+ n ? this.observerRef.observe(n) : this.setCurrentOnTop(e);
265
474
  }
266
475
  },
267
476
  setCurrentOnTop(e) {
268
- var i, r;
477
+ var i, n;
269
478
  if (!((i = this.vsRef) != null && i.container) || this.$props.scrollable === "none")
270
479
  return;
271
480
  this.observerRef && this.observerRef.disconnect();
@@ -273,7 +482,7 @@ const ri = /* @__PURE__ */ ft({
273
482
  rowIndex: t
274
483
  } = e, s = this._element;
275
484
  if (this.isVirtualScroll) {
276
- const o = ((r = this.vsRef.rowHeightService) == null ? void 0 : r.offset(t)) || 0;
485
+ const o = ((n = this.vsRef.rowHeightService) == null ? void 0 : n.offset(t)) || 0;
277
486
  this.vsRef.container.scroll(0, o);
278
487
  } else if (s) {
279
488
  const o = t < 1 ? s.querySelector("tbody > tr:nth-child(1)") : s.querySelector(`tbody > tr:nth-child(${t + 1})`);
@@ -285,18 +494,18 @@ const ri = /* @__PURE__ */ ft({
285
494
  return Array.isArray(this.$props.dataItems) ? e = e || this.$props.dataItems.length : this.$props.dataItems && (e = e || this.$props.dataItems.total), e;
286
495
  },
287
496
  readColumnElements() {
288
- return ds(this.$props.columns, this.currentColumnsState, {
497
+ return ps(this.$props.columns, this.currentColumnsState, {
289
498
  prevId: 0,
290
499
  idPrefix: this.idPrefix
291
500
  });
292
501
  },
293
502
  getResolvedFlatColumnsState() {
294
- const e = [], t = (s, i) => s == null ? void 0 : s.forEach((r) => {
295
- const o = r.hidden || i;
503
+ const e = [], t = (s, i) => s == null ? void 0 : s.forEach((n) => {
504
+ const o = n.hidden || i;
296
505
  e.push({
297
- ...r,
506
+ ...n,
298
507
  hidden: o
299
- }), t(r.children, o);
508
+ }), t(n.children, o);
300
509
  });
301
510
  return t(this.currentColumnsState, !1), e;
302
511
  },
@@ -304,19 +513,19 @@ const ri = /* @__PURE__ */ ft({
304
513
  const t = this.getResolvedFlatColumnsState();
305
514
  return [e.filter((s) => {
306
515
  var i;
307
- return !s.hidden && !((i = t.find((r) => r.id === s.id)) != null && i.hidden);
516
+ return !s.hidden && !((i = t.find((n) => n.id === s.id)) != null && i.hidden);
308
517
  }), e.filter((s) => {
309
518
  var i;
310
- return s.hidden || ((i = t.find((r) => r.id === s.id)) == null ? void 0 : i.hidden);
519
+ return s.hidden || ((i = t.find((n) => n.id === s.id)) == null ? void 0 : i.hidden);
311
520
  })];
312
521
  },
313
- getFlatData(e, t, s, i, r, o, l) {
314
- const d = [], h = as(d, e, t, {
522
+ getFlatData(e, t, s, i, n, o, r) {
523
+ const a = [], c = cs(a, e, t, {
315
524
  index: s
316
- }, i !== void 0, r, o, this.groupExpandable.defaultExpand, l, this.$props.expandField);
525
+ }, i !== void 0, n, o, this.groupExpandable.defaultExpand, r, this.$props.expandField);
317
526
  return {
318
- flattedData: d,
319
- resolvedGroupsCount: h
527
+ flattedData: a,
528
+ resolvedGroupsCount: c
320
529
  };
321
530
  },
322
531
  getColumnsEssentialProps(e) {
@@ -348,38 +557,38 @@ const ri = /* @__PURE__ */ ft({
348
557
  * and check the properties afterwards. You can check the result in the browser console.
349
558
  */
350
559
  getColumns() {
351
- const e = this.columnsRef.filter((s) => s.declarationIndex >= 0 && s.parentIndex === -1), t = (s) => (s.sort((i, r) => i.declarationIndex - r.declarationIndex), s.map((i) => {
560
+ const e = this.columnsRef.filter((s) => s.declarationIndex >= 0 && s.parentIndex === -1), t = (s) => (s.sort((i, n) => i.declarationIndex - n.declarationIndex), s.map((i) => {
352
561
  const {
353
- declarationIndex: r,
562
+ declarationIndex: n,
354
563
  parentIndex: o,
355
- depth: l,
356
- colSpan: d,
357
- rowSpan: h,
358
- index: c,
359
- kFirst: u,
360
- children: g,
361
- ...C
564
+ depth: r,
565
+ colSpan: a,
566
+ rowSpan: c,
567
+ index: f,
568
+ kFirst: h,
569
+ children: u,
570
+ ...p
362
571
  } = i;
363
- return g.length ? {
364
- children: t(g),
365
- ...C
366
- } : C;
572
+ return u.length ? {
573
+ children: t(u),
574
+ ...p
575
+ } : p;
367
576
  }));
368
577
  return t(e);
369
578
  },
370
579
  setRefs() {
371
- var o, l, d, h;
580
+ var o, r, a, c;
372
581
  let e = "$el";
373
- const t = R(this, "gridNav");
582
+ const t = x(this, "gridNav");
374
583
  t && (this._element = t[e]);
375
- const s = R(this, "groupPanelDiv");
584
+ const s = x(this, "groupPanelDiv");
376
585
  if (s) {
377
- let c = s[e] || null;
378
- this.dragLogic.refGroupPanelDiv(c);
586
+ let f = s[e] || null;
587
+ this.dragLogic.refGroupPanelDiv(f);
379
588
  }
380
- this.stickyHeaderRef = R(this, "stickyHeader"), this.stickyFooterRef = R(this, "stickyFooter"), this.pinnedTopRef = R(this, "pinnedTop"), this.pinnedBottomRef = R(this, "pinnedBottom");
381
- const i = R(this, "dropElementClue"), r = R(this, "dragElementClue");
382
- this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(r), this.columnResize.colGroupMain = R(this, "colGroup"), this.columnResize.colGroupStickyHeader = (o = this.stickyHeaderRef) == null ? void 0 : o.colGroupRef, this.columnResize.colGroupStickyFooter = (l = this.stickyFooterRef) == null ? void 0 : l.colGroupRef, this.columnResize.colGroupPinnedTop = (d = this.pinnedTopRef) == null ? void 0 : d.colGroupRef, this.columnResize.colGroupPinnedBottom = (h = this.pinnedBottomRef) == null ? void 0 : h.colGroupRef, this._header = R(this, "header"), this._footer = R(this, "footer"), this.resetTableWidth(), $t();
589
+ this.stickyHeaderRef = x(this, "stickyHeader"), this.stickyFooterRef = x(this, "stickyFooter"), this.pinnedTopRef = x(this, "pinnedTop"), this.pinnedBottomRef = x(this, "pinnedBottom");
590
+ const i = x(this, "dropElementClue"), n = x(this, "dragElementClue");
591
+ this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(n), this.columnResize.colGroupMain = x(this, "colGroup"), this.columnResize.colGroupStickyHeader = (o = this.stickyHeaderRef) == null ? void 0 : o.colGroupRef, this.columnResize.colGroupStickyFooter = (r = this.stickyFooterRef) == null ? void 0 : r.colGroupRef, this.columnResize.colGroupPinnedTop = (a = this.pinnedTopRef) == null ? void 0 : a.colGroupRef, this.columnResize.colGroupPinnedBottom = (c = this.pinnedBottomRef) == null ? void 0 : c.colGroupRef, this._header = x(this, "header"), this._footer = x(this, "footer"), this.resetTableWidth(), $t();
383
592
  },
384
593
  gridUnmounted() {
385
594
  clearTimeout(this.forceUpdateTimeout), this.columnResize.columns = [], this.dragLogic.columns = [], this.dragLogic && this.dragLogic.dragElementClue && (this.dragLogic.dragElementClue.$el.remove(), this.dragLogic.dropElementClue.$el.remove()), this.dataRef = [], this.columnsRef = [], document != null && document.body && this.resizeObserver && this.resizeObserver.disconnect(), this.observerRef && (this.observerRef.disconnect(), this.observerRef = null);
@@ -396,20 +605,20 @@ const ri = /* @__PURE__ */ ft({
396
605
  },
397
606
  virtualPageChange(e, t) {
398
607
  var i;
399
- const s = (i = this.gridContext.group) == null ? void 0 : i.value;
608
+ const s = (i = this.gridStateContext.group) == null ? void 0 : i.value;
400
609
  this.$props.pageable || s != null && s.length ? (this.virtualSkipRef = e.skip, this.$forceUpdate()) : this.pageChangeHandler(e, t);
401
610
  },
402
611
  initializeVirtualization() {
403
612
  const e = this.vsRef, t = this.$props.rowHeight || this._minRowHeightRef || 0;
404
- this.tableBodyRef = R(this, "tableBody"), this.scrollTableRef = Me(this, "table"), e && (e.fixedScroll = this.$props.fixedScroll || !1, e.PageChange = this.virtualPageChange, e.pageSize = this._virtualPageSize, e.scrollableVirtual = this.isVirtualScroll, this.scrollContainerRef = e.container = R(this, "scrollContainer"), e.tableBody = this.tableBodyRef, e.scrollHeightContainer = R(this, "scrollHeightContainer"), e.table = this.scrollTableRef, (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new bt(this._virtualTotal, t)));
613
+ this.tableBodyRef = x(this, "tableBody"), this.scrollTableRef = Ae(this, "table"), e && (e.fixedScroll = this.$props.fixedScroll || !1, e.PageChange = this.virtualPageChange, e.pageSize = this._virtualPageSize, e.scrollableVirtual = this.isVirtualScroll, this.scrollContainerRef = e.container = x(this, "scrollContainer"), e.tableBody = this.tableBodyRef, e.scrollHeightContainer = x(this, "scrollHeightContainer"), e.table = this.scrollTableRef, (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new It(this._virtualTotal, t)));
405
614
  },
406
615
  setContainerHeight() {
407
- const e = R(this, "scrollContainer");
616
+ const e = x(this, "scrollContainer");
408
617
  this._containerHeightRef = (e == null ? void 0 : e.offsetHeight) || 0;
409
618
  },
410
619
  setMinRowHeight() {
411
620
  if (!this._minRowHeightRef && !this.$props.rowHeight) {
412
- const t = ns(R(this, "tableBody"));
621
+ const t = hs(x(this, "tableBody"));
413
622
  t && (this._minRowHeightRef = t, this.$forceUpdate());
414
623
  }
415
624
  },
@@ -417,7 +626,7 @@ const ri = /* @__PURE__ */ ft({
417
626
  this.setRefs();
418
627
  },
419
628
  onHeaderScroll(e) {
420
- const s = e.target.scrollLeft, i = R(this, "scrollContainer");
629
+ const s = e.target.scrollLeft, i = x(this, "scrollContainer");
421
630
  i && (i.scrollLeft = s), this.scrollLeftRef = s;
422
631
  },
423
632
  scrollHandler(e) {
@@ -428,8 +637,8 @@ const ri = /* @__PURE__ */ ft({
428
637
  }, 0)), this.scrollLeftRef = t, this._header && this._header.setScrollLeft(e.currentTarget.scrollLeft), this._footer && this._footer.setScrollLeft(e.currentTarget.scrollLeft), this.stickyHeaderRef && this.stickyHeaderRef.setScrollLeft(e.currentTarget.scrollLeft), this.stickyFooterRef && this.stickyFooterRef.setScrollLeft(e.currentTarget.scrollLeft), this.pinnedTopRef && this.pinnedTopRef.setScrollLeft(t), this.pinnedBottomRef && this.pinnedBottomRef.setScrollLeft(t), this.vsRef && s !== this.wrapperScrollTopRef && this.vsRef.scrollHandler(e);
429
638
  const i = this.virtualSkipRef;
430
639
  this.vsRef && s !== this.wrapperScrollTopRef && this.vsRef.scrollHandler(e);
431
- const r = this.isVirtualScroll && this.virtualSkipRef !== i;
432
- if (this.$emit("scroll", e), this.wrapperScrollTopRef = s, !r) {
640
+ const n = this.isVirtualScroll && this.virtualSkipRef !== i;
641
+ if (this.$emit("scroll", e), this.wrapperScrollTopRef = s, !n) {
433
642
  const o = this.updateStickyGroups();
434
643
  this.sticky.headerItems = o == null ? void 0 : o.stickyHeaderItems, this.sticky.footerItems = o == null ? void 0 : o.stickyFooterItems;
435
644
  }
@@ -447,29 +656,29 @@ const ri = /* @__PURE__ */ ft({
447
656
  });
448
657
  },
449
658
  loopGroupedItems(e, t, s = 0, i = null) {
450
- return e.forEach((r) => {
451
- !i && t(r, s) && (i = r), r.items && r.items.length && !i && (i = this.loopGroupedItems(r.items, t, s + 1, i));
659
+ return e.forEach((n) => {
660
+ !i && t(n, s) && (i = n), n.items && n.items.length && !i && (i = this.loopGroupedItems(n.items, t, s + 1, i));
452
661
  }), i;
453
662
  },
454
663
  updateGroupCollapsed(e) {
455
664
  let t = this.computedCollapsed, s = t[e.level];
456
- const i = this.$props.uniqueField, r = function(d, h) {
457
- return d.value === e.dataItem.value && h === e.level;
458
- }, o = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, r, 0, null) : e.dataItem, l = ls(o || e.dataItem, i);
665
+ const i = this.$props.uniqueField, n = function(a, c) {
666
+ return a.value === e.dataItem.value && c === e.level;
667
+ }, o = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, n, 0, null) : e.dataItem, r = ds(o || e.dataItem, i);
459
668
  if (e.value) {
460
669
  if (s && s.length) {
461
- const d = s.indexOf(l);
462
- d > -1 && s.splice(d, 1);
670
+ const a = s.indexOf(r);
671
+ a > -1 && s.splice(a, 1);
463
672
  }
464
673
  } else
465
- s ? s.includes(l) || s.push(l) : s = [l];
674
+ s ? s.includes(r) || s.push(r) : s = [r];
466
675
  return t;
467
676
  },
468
677
  itemChange(e) {
469
678
  var i;
470
- const t = K.call(this, "itemchange"), s = (i = this.gridContext.group) == null ? void 0 : i.value;
679
+ const t = _.call(this, "itemchange"), s = (i = this.gridStateContext.group) == null ? void 0 : i.value;
471
680
  if (e.field === this.$props.expandField || (s || this.$props.detail) && e.field === void 0) {
472
- K.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
681
+ _.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
473
682
  ...this.getArguments(e.event),
474
683
  collapsedGroups: this.updateGroupCollapsed(e),
475
684
  dataItem: e.dataItem,
@@ -519,15 +728,15 @@ const ri = /* @__PURE__ */ ft({
519
728
  const {
520
729
  event: s,
521
730
  dataItem: i,
522
- dataIndex: r,
731
+ dataIndex: n,
523
732
  columnIndex: o
524
- } = e, l = {
733
+ } = e, r = {
525
734
  ...this.getArguments(s),
526
735
  dataItem: i,
527
736
  startColIndex: o,
528
737
  endColIndex: o,
529
- startRowIndex: r,
530
- endRowIndex: r,
738
+ startRowIndex: n,
739
+ endRowIndex: n,
531
740
  dataItems: this.getLeafDataItems(),
532
741
  altKey: !1,
533
742
  ctrlKey: !1,
@@ -539,10 +748,10 @@ const ri = /* @__PURE__ */ ft({
539
748
  componentId: this.$props.id || this._gridId,
540
749
  selectedField: this.$props.selectedField || ""
541
750
  };
542
- this.gridContext.selectionchange({
543
- ...l,
544
- select: this.$props.dataItemKey ? Oe({
545
- event: l,
751
+ this.gridStateContext.selectionchange({
752
+ ...r,
753
+ select: this.$props.dataItemKey ? We({
754
+ event: r,
546
755
  selectedState: (t = this.$props.select) != null ? t : {},
547
756
  dataItemKey: this.$props.dataItemKey
548
757
  }) : {}
@@ -550,36 +759,36 @@ const ri = /* @__PURE__ */ ft({
550
759
  }
551
760
  },
552
761
  onKeyboardSelectionChangeHandler(e) {
553
- var c, u;
762
+ var f, h;
554
763
  if (!this.computedSelectable.enabled || !this.$props.dataItemKey)
555
764
  return;
556
- const t = (c = this.gridContext.select) == null ? void 0 : c.value, s = {
765
+ const t = (f = this.gridStateContext.select) == null ? void 0 : f.value, s = {
557
766
  dataItems: this.getLeafDataItems(),
558
767
  mode: this.computedSelectable.mode,
559
768
  cell: this.computedSelectable.cell,
560
769
  componentId: this.$props.id,
561
770
  selectedField: "",
562
771
  ...this.getArguments(e)
563
- }, i = Gt({
772
+ }, i = Ft({
564
773
  event: s,
565
774
  selectedState: t != null ? t : {},
566
775
  dataItemKey: this.$props.dataItemKey
567
776
  });
568
777
  if (i === t)
569
778
  return;
570
- const r = e.target, o = We(r, "TD"), l = We(r, "TR"), d = Ft(o), h = Dt(l);
571
- if (d !== void 0 && h !== void 0) {
572
- const g = (u = rs(this.$props.dataItems)) == null ? void 0 : u[h];
573
- this.gridContext.selectionchange({
779
+ const n = e.target, o = Ue(n, "TD"), r = Ue(n, "TR"), a = Lt(o), c = Kt(r);
780
+ if (a !== void 0 && c !== void 0) {
781
+ const u = (h = as(this.$props.dataItems)) == null ? void 0 : h[c];
782
+ this.gridStateContext.selectionchange({
574
783
  ...s,
575
784
  select: i,
576
- dataItem: g,
577
- startRowIndex: h,
578
- startColIndex: d,
579
- startDataItem: g,
580
- endDataItem: g,
581
- endRowIndex: h,
582
- endColIndex: d,
785
+ dataItem: u,
786
+ startRowIndex: c,
787
+ startColIndex: a,
788
+ startDataItem: u,
789
+ endDataItem: u,
790
+ endRowIndex: c,
791
+ endColIndex: a,
583
792
  ctrlKey: e.ctrlKey,
584
793
  altKey: e.altKey,
585
794
  metaKey: e.metaKey,
@@ -591,8 +800,8 @@ const ri = /* @__PURE__ */ ft({
591
800
  onHeaderSelectionChangeHandler(e) {
592
801
  if (this.computedSelectable.enabled) {
593
802
  const t = this.getLeafDataItems();
594
- this.gridContext.headerselectionchange({
595
- select: e.event.target.checked ? t.reduce((s, i) => (this.$props.dataItemKey && D(this.$props.dataItemKey)(i) !== void 0 && (s[D(this.$props.dataItemKey)(i)] = !0), s), {}) : {},
803
+ this.gridStateContext.headerselectionchange({
804
+ select: e.event.target.checked ? t.reduce((s, i) => (this.$props.dataItemKey && M(this.$props.dataItemKey)(i) !== void 0 && (s[M(this.$props.dataItemKey)(i)] = !0), s), {}) : {},
596
805
  field: e.field,
597
806
  event: e.event,
598
807
  target: this,
@@ -603,7 +812,7 @@ const ri = /* @__PURE__ */ ft({
603
812
  selectionRelease(e) {
604
813
  var t;
605
814
  if (this.computedSelectable.enabled) {
606
- const s = this.getLeafDataItems(), i = s[e.startRowIndex], r = s[e.endRowIndex], o = {
815
+ const s = this.getLeafDataItems(), i = s[e.startRowIndex], n = s[e.endRowIndex], o = {
607
816
  event: void 0,
608
817
  target: this,
609
818
  selectedField: "",
@@ -611,38 +820,38 @@ const ri = /* @__PURE__ */ ft({
611
820
  dataItems: s,
612
821
  dataItem: null,
613
822
  startDataItem: i,
614
- endDataItem: r,
823
+ endDataItem: n,
615
824
  ...e
616
- }, l = Oe({
825
+ }, r = We({
617
826
  event: o,
618
827
  selectedState: (t = this.$props.select) != null ? t : {},
619
828
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
620
829
  // it does work correctly even without it
621
830
  dataItemKey: this.$props.dataItemKey
622
831
  });
623
- this.raiseSelectionEvent(o, l);
832
+ this.raiseSelectionEvent(o, r);
624
833
  }
625
834
  },
626
835
  clearSelection(e) {
627
836
  this.computedSelectable.enabled && this.raiseSelectionEvent(e, {});
628
837
  },
629
838
  raiseSelectionEvent(e, t) {
630
- this.computedSelectable.enabled && this.gridContext.selectionchange({
839
+ this.computedSelectable.enabled && this.gridStateContext.selectionchange({
631
840
  ...e,
632
841
  select: t
633
842
  });
634
843
  },
635
844
  moveToNextPage(e) {
636
- var r, o, l, d;
637
- const t = (l = (o = (r = this.gridContext.take) == null ? void 0 : r.value) != null ? o : this.$props.pageSize) != null ? l : 0, s = (((d = this.gridContext.skip) == null ? void 0 : d.value) || 0) + t, i = this.getTotal();
845
+ var n, o, r, a;
846
+ const t = (r = (o = (n = this.gridStateContext.take) == null ? void 0 : n.value) != null ? o : this.$props.pageSize) != null ? r : 0, s = (((a = this.gridStateContext.skip) == null ? void 0 : a.value) || 0) + t, i = this.getTotal();
638
847
  s < i && this.pageChangeHandler({
639
848
  skip: s,
640
849
  take: t
641
850
  }, e);
642
851
  },
643
852
  moveToPrevPage(e) {
644
- var i, r, o, l;
645
- const t = (o = (r = (i = this.gridContext.take) == null ? void 0 : i.value) != null ? r : this.$props.pageSize) != null ? o : 0, s = (((l = this.gridContext.skip) == null ? void 0 : l.value) || 0) - t;
853
+ var i, n, o, r;
854
+ const t = (o = (n = (i = this.gridStateContext.take) == null ? void 0 : i.value) != null ? n : this.$props.pageSize) != null ? o : 0, s = (((r = this.gridStateContext.skip) == null ? void 0 : r.value) || 0) - t;
646
855
  s >= 0 && this.pageChangeHandler({
647
856
  skip: s,
648
857
  take: t
@@ -683,75 +892,75 @@ const ri = /* @__PURE__ */ ft({
683
892
  handleDetailExpandAction(e, t) {
684
893
  var s;
685
894
  if (this.detailExpandable.enabled) {
686
- const i = (s = this.gridContext.detailExpand) == null ? void 0 : s.value, r = Pt(i != null ? i : {}, e);
687
- this.gridContext.detailexpandchange({
895
+ const i = (s = this.gridStateContext.detailExpand) == null ? void 0 : s.value, n = Gt(i != null ? i : {}, e);
896
+ this.gridStateContext.detailexpandchange({
688
897
  ...this.getArguments(t),
689
- detailExpand: r
898
+ detailExpand: n
690
899
  });
691
900
  }
692
901
  },
693
902
  handleGroupExpandAction(e, t) {
694
903
  var s;
695
904
  if (this.groupExpandable.enabled) {
696
- const i = (s = this.gridContext.groupExpand) == null ? void 0 : s.value, r = Et(i != null ? i : [], e, this.groupExpandable);
697
- this.$props.expandField || this.gridContext.groupexpandchange({
905
+ const i = (s = this.gridStateContext.groupExpand) == null ? void 0 : s.value, n = Dt(i != null ? i : [], e, this.groupExpandable);
906
+ this.$props.expandField || this.gridStateContext.groupexpandchange({
698
907
  ...this.getArguments(t),
699
- groupExpand: r
908
+ groupExpand: n
700
909
  });
701
910
  }
702
911
  this.scrollToStickyGroup(e.group);
703
912
  },
704
913
  raiseDataEvent(e, t, s, i) {
705
914
  if (this.resetVirtualSkip(), this.$props.autoProcessData)
706
- this.gridContext[e]({
915
+ this.gridStateContext[e]({
707
916
  ...this.getArguments(i),
708
917
  ...t
709
918
  });
710
- else if (K.call(this, e))
919
+ else if (_.call(this, e))
711
920
  this.$emit(e, {
712
921
  ...this.getArguments(i),
713
922
  ...t
714
923
  });
715
- else if (K.call(this, "datastatechange")) {
716
- const r = {
924
+ else if (_.call(this, "datastatechange")) {
925
+ const n = {
717
926
  ...this.getDataState(),
718
927
  ...s
719
928
  };
720
- this.gridContext.datastatechange({
929
+ this.gridStateContext.datastatechange({
721
930
  ...this.getArguments(i),
722
- data: r,
723
- dataState: r
931
+ data: n,
932
+ dataState: n
724
933
  });
725
934
  }
726
935
  },
727
936
  columnReorder(e, t, s) {
728
- const i = this.columnsRef[e], r = Je(this.currentColumnsState), o = i.depth, l = (u) => {
937
+ const i = this.columnsRef[e], n = Ye(this.currentColumnsState), o = i.depth, r = (h) => {
729
938
  do
730
- u++;
731
- while (u < this.columnsRef.length && this.columnsRef[u].depth > o);
732
- return u;
733
- }, d = this.columnsRef.splice(e, l(e) - e);
734
- this.columnsRef.splice(e < t ? l(t - d.length) : t, 0, ...d), this.columnsRef.filter((u) => u.declarationIndex >= 0).forEach((u, g) => {
735
- u.orderIndex = g;
736
- const C = r.find((b) => b.id === u.id);
737
- C && (C.orderIndex = g);
939
+ h++;
940
+ while (h < this.columnsRef.length && this.columnsRef[h].depth > o);
941
+ return h;
942
+ }, a = this.columnsRef.splice(e, r(e) - e);
943
+ this.columnsRef.splice(e < t ? r(t - a.length) : t, 0, ...a), this.columnsRef.filter((h) => h.declarationIndex >= 0).forEach((h, u) => {
944
+ h.orderIndex = u;
945
+ const p = n.find((R) => R.id === h.id);
946
+ p && (p.orderIndex = u);
738
947
  });
739
- const h = this.columnsRef[e].locked && this.columnsRef[t].locked;
740
- Tt(this._columnsMap, this.columnsRef, h || this.shouldUpdateLeftRightRef), zt(this._columnsMap, this.columnsRef, h || this.shouldUpdateLeftRightRef), this.resizedRef && (this.shouldUpdateLeftRightRef = !1, this.resizedRef = !1);
741
- const c = this.getColumns();
948
+ const c = this.columnsRef[e].locked && this.columnsRef[t].locked;
949
+ zt(this._columnsMap, this.columnsRef, c || this.shouldUpdateLeftRightRef), Et(this._columnsMap, this.columnsRef, c || this.shouldUpdateLeftRightRef), this.resizedRef && (this.shouldUpdateLeftRightRef = !1, this.resizedRef = !1);
950
+ const f = this.getColumns();
742
951
  this.$emit("columnreorder", {
743
952
  target: this,
744
- columns: c,
953
+ columns: f,
745
954
  event: s,
746
955
  prev: e,
747
956
  next: t
748
- }), this.gridContext.columnsstatechange({
957
+ }), this.gridStateContext.columnsstatechange({
749
958
  columnsState: this.currentColumnsState
750
959
  });
751
960
  },
752
961
  groupReorder(e, t, s) {
753
- var r;
754
- const i = (r = this.gridContext.group) == null ? void 0 : r.value;
962
+ var n;
963
+ const i = (n = this.gridStateContext.group) == null ? void 0 : n.value;
755
964
  i !== void 0 && (i.splice(t, 0, ...i.splice(e, 1)), this.groupChangeHandler(i, s));
756
965
  },
757
966
  columnToGroup(e, t, s) {
@@ -759,10 +968,10 @@ const ri = /* @__PURE__ */ ft({
759
968
  const i = this.columnsRef[e].field;
760
969
  if (!i)
761
970
  return;
762
- const r = (((o = this.gridContext.group) == null ? void 0 : o.value) || []).slice();
763
- r.splice(t, 0, {
971
+ const n = (((o = this.gridStateContext.group) == null ? void 0 : o.value) || []).slice();
972
+ n.splice(t, 0, {
764
973
  field: i
765
- }), this.groupChangeHandler(r, s);
974
+ }), this.groupChangeHandler(n, s);
766
975
  },
767
976
  resetTableWidth() {
768
977
  var i;
@@ -770,43 +979,43 @@ const ri = /* @__PURE__ */ ft({
770
979
  if (!this.columnResize.colGroupMain)
771
980
  return;
772
981
  const t = (i = this.columnResize.colGroupMain) == null ? void 0 : i.children;
773
- for (let r = 0; r < t.length; r++) {
774
- const o = t[r].width;
982
+ for (let n = 0; n < t.length; n++) {
983
+ const o = t[n].width;
775
984
  if (!o)
776
985
  return;
777
986
  e += parseFloat(o.toString());
778
987
  }
779
988
  e = Math.round(e), this._header && this._header.setWidth(e), this._footer && this._footer.setWidth(e), this.stickyHeaderRef && this.stickyHeaderRef.setWidth(e), this.stickyFooterRef && this.stickyFooterRef.setWidth(e), this.pinnedTopRef && this.pinnedTopRef.setWidth(e), this.pinnedBottomRef && this.pinnedBottomRef.setWidth(e);
780
- const s = Me(this, "table");
989
+ const s = Ae(this, "table");
781
990
  s && e && (s.style.width = e + "px"), this.stickyFooterRef && this.setStickyFooterOffset();
782
991
  },
783
992
  setStickyFooterOffset() {
784
993
  const e = this.containerElementRef, t = e ? e.scrollWidth > e.clientWidth : !1;
785
994
  this.stickyFooterRef && (this.stickyFooterRef.$el.style.marginBlockEnd = t ? "var(--kendo-scrollbar-width, 0px)" : "");
786
995
  },
787
- onResize(e, t, s, i, r, o, l) {
996
+ onResize(e, t, s, i, n, o, r) {
788
997
  this.resetTableWidth(), this.shouldUpdateLeftRightRef = !0, this.resizedRef = !0, this.$emit("columnresize", {
789
998
  columns: this.getColumns(),
790
999
  index: e,
791
- targetColumnId: l,
1000
+ targetColumnId: r,
792
1001
  event: i,
793
1002
  newWidth: t,
794
1003
  oldWidth: s,
795
- end: r,
1004
+ end: n,
796
1005
  target: this
797
- }), r && this.gridContext.columnsstatechange({
1006
+ }), n && this.gridStateContext.columnsstatechange({
798
1007
  columnsState: o
799
1008
  });
800
1009
  },
801
1010
  initColumnsState(e, t) {
802
1011
  const s = (i) => {
803
1012
  var o;
804
- const r = t.find((l) => l.id === i.id);
805
- if (r) {
806
- const l = {
807
- ...r
1013
+ const n = t.find((r) => r.id === i.id);
1014
+ if (n) {
1015
+ const r = {
1016
+ ...n
808
1017
  };
809
- return l.children = (o = i.children) == null ? void 0 : o.map(s), l;
1018
+ return r.children = (o = i.children) == null ? void 0 : o.map(s), r;
810
1019
  }
811
1020
  return i;
812
1021
  };
@@ -814,13 +1023,13 @@ const ri = /* @__PURE__ */ ft({
814
1023
  },
815
1024
  configureColumns(e, t) {
816
1025
  e.filter((o) => o.columnType === "checkbox").forEach((o) => {
817
- o.width = o.width || "50px", o.defaultCell = I(Ue), o.defaultHeaderCell = I(Ye), o._type = "edit", o.columnMenu = !1;
1026
+ o.width = o.width || "50px", o.defaultCell = k(qe), o.defaultHeaderCell = k(et), o._type = "edit", o.columnMenu = !1;
818
1027
  }), this.$props.selectedField && this.columnsRef.filter((o) => o.field === this.$props.selectedField).forEach((o) => {
819
- o.width = o.width || "50px", o.defaultCell = I(Ue), o.defaultHeaderCell = I(Ye), o.columnMenu = !1;
1028
+ o.width = o.width || "50px", o.defaultCell = k(qe), o.defaultHeaderCell = k(et), o.columnMenu = !1;
820
1029
  }), this.$props.pinnable && e.filter((o) => o.columnType === "pin").forEach((o) => {
821
- o.width = o.width || "48px", o.defaultCell = I(Rs), o.defaultHeaderCell = I(Ht), o.sortable = !1, o.filterable = !1, o.editable = !1;
1030
+ o.width = o.width || "48px", o.defaultCell = k(Ss), o.defaultHeaderCell = k(Pt), o.sortable = !1, o.filterable = !1, o.editable = !1;
822
1031
  });
823
- const s = Je(this.currentColumnsState);
1032
+ const s = Ye(this.currentColumnsState);
824
1033
  this.initColumnsState(e, s);
825
1034
  const i = {
826
1035
  id: "",
@@ -842,54 +1051,54 @@ const ri = /* @__PURE__ */ ft({
842
1051
  ariaColumnIndex: 0,
843
1052
  isAccessible: !0
844
1053
  };
845
- let r = 0;
1054
+ let n = 0;
846
1055
  if (this.detailExpandable.enabled && this.$props.detail && !this.$props.expandField) {
847
1056
  const o = {
848
1057
  ...i,
849
1058
  _type: "expand",
850
- id: k.generateNavigatableId(`${r++}`, "expand", "column"),
851
- defaultCell: I(je),
1059
+ id: P.generateNavigatableId(`${n++}`, "expand", "column"),
1060
+ defaultCell: k(Je),
852
1061
  field: this.detailExpandable.column,
853
1062
  headerClassName: this.hierarchClass
854
1063
  };
855
- e.unshift(o), this.currentColumnsState.unshift(s.find((l) => l.id === o.id) || o);
1064
+ e.unshift(o), this.currentColumnsState.unshift(s.find((r) => r.id === o.id) || o);
856
1065
  }
857
- this.$props.expandField && K.call(this, "expandchange") && this.$props.detail && (e.unshift({
1066
+ this.$props.expandField && _.call(this, "expandchange") && this.$props.detail && (e.unshift({
858
1067
  ...i,
859
- defaultCell: I(je),
1068
+ defaultCell: k(Je),
860
1069
  field: this.$props.expandField,
861
1070
  headerClassName: "k-hierarchy-cell k-header",
862
- id: k.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
1071
+ id: P.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
863
1072
  ...this.expandColumn
864
- }), r++);
1073
+ }), n++);
865
1074
  for (let o = 0; o < t; o++) {
866
- const l = {
1075
+ const r = {
867
1076
  ...i,
868
1077
  isAccessible: !1,
869
- defaultCell: I(Xe),
870
- id: k.generateNavigatableId(`${r++}`, "group", "column"),
1078
+ defaultCell: k(Ze),
1079
+ id: P.generateNavigatableId(`${n++}`, "group", "column"),
871
1080
  field: "value",
872
1081
  locked: this.$props.lockGroups,
873
1082
  columnMenu: !1
874
1083
  };
875
- e.unshift(l), this.currentColumnsState.unshift(s.find((d) => d.id === l.id) || l);
1084
+ e.unshift(r), this.currentColumnsState.unshift(s.find((a) => a.id === r.id) || r);
876
1085
  }
877
- e.slice(r).forEach((o) => {
878
- o.parentIndex >= 0 && (o.parentIndex += r), o.rowSpannable = o.rowSpannable !== void 0 ? Qe(o.rowSpannable) : this.computedRowSpannable;
1086
+ e.slice(n).forEach((o) => {
1087
+ o.parentIndex >= 0 && (o.parentIndex += n), o.rowSpannable = o.rowSpannable !== void 0 ? Qe(o.rowSpannable) : this.computedRowSpannable;
879
1088
  });
880
1089
  },
881
1090
  initColumns(e, t) {
882
1091
  var o;
883
1092
  this.columnsRef = this.readColumnElements();
884
- const s = (o = this.gridContext.group) == null ? void 0 : o.value;
885
- this.columnsRef.filter((l) => !l.hidden).length === 0 && (this.columnsRef = is(e, s, {
1093
+ const s = (o = this.gridStateContext.group) == null ? void 0 : o.value;
1094
+ this.columnsRef.filter((r) => !r.hidden).length === 0 && (this.columnsRef = rs(e, s, {
886
1095
  column: this.$props.expandField ? this.$props.expandField : this.groupExpandable.column
887
1096
  }, {
888
1097
  prevId: 0,
889
1098
  idPrefix: this.idPrefix
890
1099
  })), this.configureColumns(this.columnsRef, t);
891
- const [i, r] = this.filterColumns(this.columnsRef);
892
- this.columnsRef = i, this.hiddenColumnsRef = r, this._columnsMap = os(this.columnsRef, !0);
1100
+ const [i, n] = this.filterColumns(this.columnsRef);
1101
+ this.columnsRef = i, this.hiddenColumnsRef = n, this._columnsMap = ls(this.columnsRef, !0);
893
1102
  },
894
1103
  resolveTitle(e) {
895
1104
  const t = this.findColumnByField(e), s = t && (t.title || t.field);
@@ -914,14 +1123,14 @@ const ri = /* @__PURE__ */ ft({
914
1123
  return null;
915
1124
  },
916
1125
  getDataState() {
917
- var o, l, d, h, c;
918
- const e = (o = this.gridContext.sort) == null ? void 0 : o.value, t = (l = this.gridContext.filter) == null ? void 0 : l.value, s = (d = this.gridContext.skip) == null ? void 0 : d.value, i = (h = this.gridContext.take) == null ? void 0 : h.value, r = (c = this.gridContext.group) == null ? void 0 : c.value;
1126
+ var o, r, a, c, f;
1127
+ const e = (o = this.gridStateContext.sort) == null ? void 0 : o.value, t = (r = this.gridStateContext.filter) == null ? void 0 : r.value, s = (a = this.gridStateContext.skip) == null ? void 0 : a.value, i = (c = this.gridStateContext.take) == null ? void 0 : c.value, n = (f = this.gridStateContext.group) == null ? void 0 : f.value;
919
1128
  return {
920
1129
  filter: t,
921
1130
  sort: e,
922
1131
  skip: s,
923
1132
  take: i !== void 0 ? i : this.$props.pageSize,
924
- group: r
1133
+ group: n
925
1134
  };
926
1135
  },
927
1136
  getArguments(e) {
@@ -943,19 +1152,19 @@ const ri = /* @__PURE__ */ ft({
943
1152
  }), t;
944
1153
  },
945
1154
  searchChange(e) {
946
- const t = this.$props.searchFields || this.columnsRef.map((r) => r.field) || [], s = e.event.target.value, i = {
1155
+ const t = this.$props.searchFields || this.columnsRef.map((n) => n.field) || [], s = e.event.target.value, i = {
947
1156
  logic: "or",
948
- filters: t.filter((r) => r !== void 0).map((r) => {
1157
+ filters: t.filter((n) => n !== void 0).map((n) => {
949
1158
  var o;
950
- return typeof r == "string" ? {
951
- field: r,
1159
+ return typeof n == "string" ? {
1160
+ field: n,
952
1161
  value: s,
953
1162
  operator: "contains"
954
1163
  } : {
955
1164
  value: s,
956
- operator: (o = r.operator) != null ? o : "contains",
957
- field: r.field,
958
- ignoreCase: r.ignoreCase
1165
+ operator: (o = n.operator) != null ? o : "contains",
1166
+ field: n.field,
1167
+ ignoreCase: n.ignoreCase
959
1168
  };
960
1169
  })
961
1170
  };
@@ -968,26 +1177,26 @@ const ri = /* @__PURE__ */ ft({
968
1177
  getCellsToRender(e, t) {
969
1178
  var o;
970
1179
  const s = [];
971
- let i = null, r = 0;
972
- if (t.forEach((l, d) => {
973
- const h = parseFloat((l.width || "").toString()) || 10;
974
- if (r) {
975
- r--, i && (i.width += h);
1180
+ let i = null, n = 0;
1181
+ if (t.forEach((r, a) => {
1182
+ const c = parseFloat((r.width || "").toString()) || 10;
1183
+ if (n) {
1184
+ n--, i && (i.width += c);
976
1185
  return;
977
1186
  }
978
- const c = Math.min(ss(l, e), t.length - d);
979
- r = c - 1, i = {
980
- width: h,
981
- colSpan: c,
982
- columnIndex: d
1187
+ const f = Math.min(ns(r, e), t.length - a);
1188
+ n = f - 1, i = {
1189
+ width: c,
1190
+ colSpan: f,
1191
+ columnIndex: a
983
1192
  }, s.push(i);
984
1193
  }), this.$props.columnVirtualization) {
985
- const l = this.scrollLeftRef || 0, d = this.tableWidth || parseFloat((((o = this.$attrs.style) == null ? void 0 : o.width) || "").toString());
986
- return fs({
1194
+ const r = this.scrollLeftRef || 0, a = this.tableWidth || parseFloat((((o = this.$attrs.style) == null ? void 0 : o.width) || "").toString());
1195
+ return Rs({
987
1196
  cellModels: s,
988
1197
  columns: t,
989
- tableViewPortWidth: d,
990
- scrollLeft: l
1198
+ tableViewPortWidth: a,
1199
+ scrollLeft: r
991
1200
  });
992
1201
  }
993
1202
  return s;
@@ -1006,69 +1215,69 @@ const ri = /* @__PURE__ */ ft({
1006
1215
  if (s)
1007
1216
  return s;
1008
1217
  }
1009
- const i = this.$props.rowHeight || this._minRowHeightRef, r = this._containerHeightRef;
1010
- return r && i ? Math.ceil(r / i * 1.5) : 0;
1218
+ const i = this.$props.rowHeight || this._minRowHeightRef, n = this._containerHeightRef;
1219
+ return n && i ? Math.ceil(n / i * 1.5) : 0;
1011
1220
  },
1012
1221
  getRowPinPosition(e) {
1013
- var o, l;
1222
+ var o, r;
1014
1223
  const {
1015
1224
  dataItemKey: t = ""
1016
- } = this.$props, s = ((o = this.gridContext.pinnedTopRows) == null ? void 0 : o.value) || [], i = ((l = this.gridContext.pinnedBottomRows) == null ? void 0 : l.value) || [];
1225
+ } = this.$props, s = ((o = this.gridStateContext.pinnedTopRows) == null ? void 0 : o.value) || [], i = ((r = this.gridStateContext.pinnedBottomRows) == null ? void 0 : r.value) || [];
1017
1226
  if (!t || !e)
1018
1227
  return "none";
1019
- const r = e[t];
1020
- return s != null && s.some((d) => d[t] === r) ? "top" : i != null && i.some((d) => d[t] === r) ? "bottom" : "none";
1228
+ const n = e[t];
1229
+ return s != null && s.some((a) => a[t] === n) ? "top" : i != null && i.some((a) => a[t] === n) ? "bottom" : "none";
1021
1230
  },
1022
1231
  handleRowPin(e, t) {
1023
- var c, u, g, C;
1232
+ var f, h, u, p;
1024
1233
  if (!this.$props.pinnable)
1025
1234
  return;
1026
1235
  const {
1027
1236
  dataItemKey: s = ""
1028
- } = this.$props, i = ((c = this.gridContext.pinnedTopRows) == null ? void 0 : c.value) || [], r = ((u = this.gridContext.pinnedBottomRows) == null ? void 0 : u.value) || [], o = t[s], l = i.filter((b) => b[s] !== o), d = r.filter((b) => b[s] !== o);
1029
- let h;
1237
+ } = this.$props, i = ((f = this.gridStateContext.pinnedTopRows) == null ? void 0 : f.value) || [], n = ((h = this.gridStateContext.pinnedBottomRows) == null ? void 0 : h.value) || [], o = t[s], r = i.filter((R) => R[s] !== o), a = n.filter((R) => R[s] !== o);
1238
+ let c;
1030
1239
  switch (e) {
1031
1240
  case "pinTop":
1032
- h = {
1033
- pinnedTopRows: [...l, t],
1034
- pinnedBottomRows: d,
1241
+ c = {
1242
+ pinnedTopRows: [...r, t],
1243
+ pinnedBottomRows: a,
1035
1244
  dataItem: t
1036
1245
  };
1037
1246
  break;
1038
1247
  case "pinBottom":
1039
- h = {
1040
- pinnedTopRows: l,
1041
- pinnedBottomRows: [...d, t],
1248
+ c = {
1249
+ pinnedTopRows: r,
1250
+ pinnedBottomRows: [...a, t],
1042
1251
  dataItem: t
1043
1252
  };
1044
1253
  break;
1045
1254
  case "unpin":
1046
- h = {
1047
- pinnedTopRows: l,
1048
- pinnedBottomRows: d,
1255
+ c = {
1256
+ pinnedTopRows: r,
1257
+ pinnedBottomRows: a,
1049
1258
  dataItem: t
1050
1259
  };
1051
1260
  break;
1052
1261
  default:
1053
1262
  return;
1054
1263
  }
1055
- (C = (g = this.gridContext).rowpinchange) == null || C.call(g, h);
1264
+ (p = (u = this.gridStateContext).rowpinchange) == null || p.call(u, c);
1056
1265
  },
1057
1266
  pinnedSelectionRelease(e, t) {
1058
1267
  const s = this.$props.dataItemKey;
1059
1268
  if (!s || !t)
1060
1269
  return;
1061
- const i = D(s), r = this.getLeafDataItems().findIndex((o) => i(o) === i(t));
1062
- r !== -1 && this.selectionRelease({
1270
+ const i = M(s), n = this.getLeafDataItems().findIndex((o) => i(o) === i(t));
1271
+ n !== -1 && this.selectionRelease({
1063
1272
  ...e,
1064
- startRowIndex: r,
1065
- endRowIndex: r
1273
+ startRowIndex: n,
1274
+ endRowIndex: n
1066
1275
  });
1067
1276
  }
1068
1277
  },
1069
1278
  provide() {
1070
1279
  return {
1071
- kendo: {
1280
+ gridContext: {
1072
1281
  dataItemKey: this.$props.dataItemKey,
1073
1282
  searchChange: this.searchChange,
1074
1283
  selectionRelease: this.selectionRelease,
@@ -1078,156 +1287,157 @@ const ri = /* @__PURE__ */ ft({
1078
1287
  scrollToStickyGroup: this.scrollToStickyGroup,
1079
1288
  getCellPositionStyle: this.getCellPositionStyle,
1080
1289
  onRowPin: this.handleRowPin,
1081
- getRowPinPosition: this.getRowPinPosition
1290
+ getRowPinPosition: this.getRowPinPosition,
1291
+ onContextMenu: this.triggerCellContextMenu
1082
1292
  },
1083
1293
  sticky: this.sticky
1084
1294
  };
1085
1295
  },
1086
1296
  setup(e) {
1087
- const t = f(null), s = f(null), i = f(null), r = f(null), o = f(null), l = f(null), d = f(null), h = f([]), c = f([]), u = f(null), g = f(null), C = f(null), b = f(null), S = f(null), x = f(null), H = f(!0), w = f(!1), T = new Qt(), E = f(0), B = mt(us, {}), J = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, Q = typeof e.groupable == "object" && !!e.groupable.stickyFooters, z = f([]), X = Le(() => {
1088
- var L, W;
1089
- return !!((W = (L = B.group) == null ? void 0 : L.value) != null && W.length);
1090
- }), A = null, P = f(void 0), y = f({
1297
+ const t = g(null), s = g(null), i = g(null), n = g(null), o = g(null), r = g(null), a = g(null), c = g([]), f = g([]), h = g(null), u = g(null), p = g(null), R = g(null), C = g(null), I = g(null), w = g(!0), $ = g(!1), b = new Zt(), H = g(0), A = bt(gs, {}), X = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, Y = typeof e.groupable == "object" && !!e.groupable.stickyFooters, z = g([]), Q = Ke(() => {
1298
+ var F, N;
1299
+ return !!((N = (F = A.group) == null ? void 0 : F.value) != null && N.length);
1300
+ }), B = null, E = g(void 0), T = g({
1091
1301
  headerItems: [],
1092
1302
  footerItems: []
1093
1303
  }), {
1094
1304
  scrollToStickyGroup: V,
1095
1305
  update: O
1096
- } = ms({
1097
- enabled: J,
1098
- enabledFooters: Q,
1306
+ } = bs({
1307
+ enabled: X,
1308
+ enabledFooters: Y,
1099
1309
  flatData: z,
1100
- containerRef: u,
1101
- stickyHeaderRef: g,
1102
- stickyFooterRef: C,
1103
- tableBodyRef: x,
1310
+ containerRef: h,
1311
+ stickyHeaderRef: u,
1312
+ stickyFooterRef: p,
1313
+ tableBodyRef: I,
1104
1314
  rowHeight: e.rowHeight,
1105
- isGrouped: X,
1106
- virtualSkipRef: E,
1107
- rowHeightServiceRef: Le(() => T == null ? void 0 : T.rowHeightService)
1315
+ isGrouped: Q,
1316
+ virtualSkipRef: H,
1317
+ rowHeightServiceRef: Ke(() => b == null ? void 0 : b.rowHeightService)
1108
1318
  });
1109
1319
  return {
1110
- rowIndexRef: P,
1111
- observerRef: A,
1320
+ rowIndexRef: E,
1321
+ observerRef: B,
1112
1322
  dataRef: z,
1113
1323
  groupPanelDivRef: t,
1114
1324
  dropElementClueRef: s,
1115
1325
  dragElementClueRef: i,
1116
- headerRef: r,
1326
+ headerRef: n,
1117
1327
  footerRef: o,
1118
- gridNavRef: l,
1119
- colGroupRef: d,
1120
- scrollContainerRef: u,
1121
- tableBodyRef: x,
1122
- gridContext: B,
1123
- shouldUpdateLeftRightRef: H,
1124
- resizedRef: w,
1328
+ gridNavRef: r,
1329
+ colGroupRef: a,
1330
+ scrollContainerRef: h,
1331
+ tableBodyRef: I,
1332
+ gridStateContext: A,
1333
+ shouldUpdateLeftRightRef: w,
1334
+ resizedRef: $,
1125
1335
  currentColumnsState: e.columnsState,
1126
- vsRef: T,
1127
- virtualSkipRef: E,
1128
- stickyHeaderItems: h,
1129
- stickyHeaderRef: g,
1130
- stickyFooterItems: c,
1131
- stickyFooterRef: C,
1132
- pinnedTopRef: b,
1133
- pinnedBottomRef: S,
1134
- sticky: y,
1336
+ vsRef: b,
1337
+ virtualSkipRef: H,
1338
+ stickyHeaderItems: c,
1339
+ stickyHeaderRef: u,
1340
+ stickyFooterItems: f,
1341
+ stickyFooterRef: p,
1342
+ pinnedTopRef: R,
1343
+ pinnedBottomRef: C,
1344
+ sticky: T,
1135
1345
  scrollToStickyGroup: V,
1136
1346
  updateStickyGroups: O
1137
1347
  };
1138
1348
  },
1139
1349
  render() {
1140
- var me, Re, Ce, be, $e, we, xe, ve, Ie, Se, ye, ke, He, Te, ze, Ee, Pe, Ge;
1141
- const e = (me = this.gridContext.sort) == null ? void 0 : me.value, t = (Re = this.gridContext.filter) == null ? void 0 : Re.value, s = (Ce = this.gridContext.search) == null ? void 0 : Ce.value, i = (be = this.gridContext.select) == null ? void 0 : be.value, r = ($e = this.gridContext.skip) == null ? void 0 : $e.value, o = (we = this.gridContext.take) == null ? void 0 : we.value, l = (xe = this.gridContext.group) == null ? void 0 : xe.value, d = (ve = this.gridContext.groupExpand) == null ? void 0 : ve.value, h = (Ie = this.gridContext.detailExpand) == null ? void 0 : Ie.value, c = (l == null ? void 0 : l.length) || 0, u = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyHeaders, g = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyFooters, C = !!(l != null && l.length);
1142
- let b;
1143
- this.currentColumnsState = (Se = this.gridContext.columnsState) == null ? void 0 : Se.value;
1144
- const S = this.$props.autoProcessData === !0 ? {
1350
+ var Re, Ce, be, Se, xe, Ie, $e, we, ye, ve, ke, He, Te, Me, Pe, ze, Ee, De;
1351
+ const e = (Re = this.gridStateContext.sort) == null ? void 0 : Re.value, t = (Ce = this.gridStateContext.filter) == null ? void 0 : Ce.value, s = (be = this.gridStateContext.search) == null ? void 0 : be.value, i = (Se = this.gridStateContext.select) == null ? void 0 : Se.value, n = (xe = this.gridStateContext.skip) == null ? void 0 : xe.value, o = (Ie = this.gridStateContext.take) == null ? void 0 : Ie.value, r = ($e = this.gridStateContext.group) == null ? void 0 : $e.value, a = (we = this.gridStateContext.groupExpand) == null ? void 0 : we.value, c = (ye = this.gridStateContext.detailExpand) == null ? void 0 : ye.value, f = (r == null ? void 0 : r.length) || 0, h = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyHeaders, u = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyFooters, p = !!(r != null && r.length);
1352
+ let R;
1353
+ this.currentColumnsState = (ve = this.gridStateContext.columnsState) == null ? void 0 : ve.value;
1354
+ const C = this.$props.autoProcessData === !0 ? {
1145
1355
  group: !0,
1146
1356
  sort: !0,
1147
1357
  filter: !0,
1148
1358
  search: !0,
1149
1359
  page: !0
1150
1360
  } : this.$props.autoProcessData;
1151
- let x;
1152
- const H = k.getIdPrefix(this.navigation);
1153
- let w = [];
1154
- Array.isArray(this.$props.dataItems) ? (w = this.$props.dataItems, x = (ye = this.$props.total) != null ? ye : w.length) : (w = ((ke = ts(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField)) == null ? void 0 : ke.data) || [], x = (ze = (Te = this.$props.total) != null ? Te : (He = this.$props.dataItems) == null ? void 0 : He.total) != null ? ze : w.length);
1155
- const T = this.$props.groupable === !0 || j(this.$props.groupable) && this.$props.groupable.enabled !== !1;
1156
- this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = T, this._virtualPageSize = this.calcVirtualPageSize();
1157
- const E = w.length === x, B = j(this.$props.groupable) && this.$props.groupable.footer || "none";
1158
- if (S) {
1159
- const n = S.page && !(this.isVirtualScroll && !this.$props.pageable), {
1160
- data: m,
1361
+ let I;
1362
+ const w = P.getIdPrefix(this.navigation);
1363
+ let $ = [];
1364
+ Array.isArray(this.$props.dataItems) ? ($ = this.$props.dataItems, I = (ke = this.$props.total) != null ? ke : $.length) : ($ = ((He = os(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField)) == null ? void 0 : He.data) || [], I = (Pe = (Me = this.$props.total) != null ? Me : (Te = this.$props.dataItems) == null ? void 0 : Te.total) != null ? Pe : $.length);
1365
+ const b = this.$props.groupable === !0 || j(this.$props.groupable) && this.$props.groupable.enabled !== !1;
1366
+ this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = b, this._virtualPageSize = this.calcVirtualPageSize();
1367
+ const H = $.length === I, A = j(this.$props.groupable) && this.$props.groupable.footer || "none";
1368
+ if (C) {
1369
+ const l = C.page && !(this.isVirtualScroll && !this.$props.pageable), {
1370
+ data: S,
1161
1371
  total: v
1162
- } = cs(w, {
1163
- group: S.group ? l : void 0,
1164
- sort: S.sort ? e : void 0,
1165
- filter: St(S.filter ? t : void 0, S.search ? s : void 0),
1166
- ...n ? {
1372
+ } = ms($, {
1373
+ group: C.group ? r : void 0,
1374
+ sort: C.sort ? e : void 0,
1375
+ filter: Ht(C.filter ? t : void 0, C.search ? s : void 0),
1376
+ ...l ? {
1167
1377
  take: this.$props.pageable ? o || 10 : o,
1168
- skip: r || 0
1378
+ skip: n || 0
1169
1379
  } : {}
1170
1380
  });
1171
- w = m, x = (Ee = this.$props.total) != null ? Ee : v;
1381
+ $ = S, I = (ze = this.$props.total) != null ? ze : v;
1172
1382
  }
1173
1383
  const {
1174
- resolvedGroupsCount: J,
1175
- flattedData: Q
1176
- } = this.getFlatData(w, B, E ? 0 : this.$props.skip || 0, l, h, d, this.$props.dataItemKey);
1177
- this.dataRef = Q;
1384
+ resolvedGroupsCount: X,
1385
+ flattedData: Y
1386
+ } = this.getFlatData($, A, H ? 0 : this.$props.skip || 0, r, c, a, this.$props.dataItemKey);
1387
+ this.dataRef = Y;
1178
1388
  const z = this.virtualSkipRef || 0;
1179
- if (this._virtualTotal = x, this.isVirtualScroll) {
1180
- let n = r || 0;
1181
- if ((C || this.$props.pageable) && (n = z, this._virtualTotal = this.dataRef.length), E || C || this.$props.pageable)
1389
+ if (this._virtualTotal = I, this.isVirtualScroll) {
1390
+ let l = n || 0;
1391
+ if ((p || this.$props.pageable) && (l = z, this._virtualTotal = this.dataRef.length), H || p || this.$props.pageable)
1182
1392
  if (this._virtualPageSize === 0) {
1183
- const m = Math.min(o || this.$props.pageSize || 20, this.dataRef.length);
1184
- b = this.dataRef.slice(n, n + m);
1393
+ const S = Math.min(o || this.$props.pageSize || 20, this.dataRef.length);
1394
+ R = this.dataRef.slice(l, l + S);
1185
1395
  } else
1186
- b = this.dataRef.slice(n, n + this._virtualPageSize);
1396
+ R = this.dataRef.slice(l, l + this._virtualPageSize);
1187
1397
  }
1188
1398
  this.initializeVirtualization();
1189
- const X = (Pe = this.selectable) != null && Pe.drag ? "none" : void 0;
1190
- this.initColumns(this.$props.dataItems, J), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this.columnsRef, this.columnResize.columnsState = Rt(this.currentColumnsState || []), this.dragLogic.columns = this.columnsRef;
1191
- const A = this.$props.toolbar, P = this.$props.noRecords, y = this.columnsRef.filter((n) => n.children.length === 0), V = T && a(Nt, {
1192
- ref: (n) => {
1193
- this.groupPanelDivRef = n;
1399
+ const Q = (Ee = this.selectable) != null && Ee.drag ? "none" : void 0;
1400
+ this.initColumns(this.$props.dataItems, X), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this.columnsRef, this.columnResize.columnsState = St(this.currentColumnsState || []), this.dragLogic.columns = this.columnsRef;
1401
+ const B = this.$props.toolbar, E = this.$props.noRecords, T = this.columnsRef.filter((l) => l.children.length === 0), V = b && d(qt, {
1402
+ ref: (l) => {
1403
+ this.groupPanelDivRef = l;
1194
1404
  },
1195
- group: l || [],
1405
+ group: r || [],
1196
1406
  ariaControls: this._gridRoleElementId,
1197
1407
  onGroupChange: this.groupChangeHandler,
1198
1408
  onPressHandler: this.dragLogic.pressHandler,
1199
1409
  onDragHandler: this.dragLogic.dragHandler,
1200
1410
  onReleaseHandler: this.dragLogic.releaseHandler,
1201
1411
  resolveTitle: this.resolveTitle
1202
- }, null), O = (this.dragLogic.reorderable || this.dragLogic.groupable) && q && document && document.body, L = [O && a(es, {
1203
- ref: (n) => {
1204
- this.dropElementClueRef = n;
1412
+ }, null), O = (this.dragLogic.reorderable || this.dragLogic.groupable) && q && document && document.body, F = [O && d(is, {
1413
+ ref: (l) => {
1414
+ this.dropElementClueRef = l;
1205
1415
  }
1206
- }, null), O && a(Zt, {
1207
- ref: (n) => {
1208
- this.dragElementClueRef = n;
1416
+ }, null), O && d(ss, {
1417
+ ref: (l) => {
1418
+ this.dragElementClueRef = l;
1209
1419
  }
1210
- }, null)], W = this.showLicenseWatermark ? a(Ct, {
1420
+ }, null)], N = this.showLicenseWatermark ? d(xt, {
1211
1421
  message: this.licenseMessage
1212
- }, null) : null, Y = this.$attrs.style, rt = Y && j(Y) && Y["width"] || "";
1213
- this.tableWidth = parseFloat(rt.toString());
1214
- const lt = y.findIndex((n) => typeof n.colSpan == "function") > -1;
1215
- let N;
1216
- N = this.getCellsToRender({}, y);
1217
- const G = y.map(function(n, m) {
1218
- return a("col", {
1219
- key: n.id || `col-${m}`,
1220
- width: n.width !== void 0 ? Math.floor(parseFloat(n.width.toString())) : void 0
1422
+ }, null) : null, Z = this.$attrs.style, at = Z && j(Z) && Z["width"] || "";
1423
+ this.tableWidth = parseFloat(at.toString());
1424
+ const dt = T.findIndex((l) => typeof l.colSpan == "function") > -1;
1425
+ let W;
1426
+ W = this.getCellsToRender({}, T);
1427
+ const D = T.map(function(l, S) {
1428
+ return d("col", {
1429
+ key: l.id || `col-${S}`,
1430
+ width: l.width !== void 0 ? Math.floor(parseFloat(l.width.toString())) : void 0
1221
1431
  }, null);
1222
- }, this), he = a(Vt, {
1432
+ }, this), ce = d(Wt, {
1223
1433
  size: this.$props.size,
1224
1434
  columnResize: this.columnResize,
1225
1435
  staticHeaders: this.$props.scrollable !== "none",
1226
- ref: (n) => {
1227
- this.headerRef = n;
1436
+ ref: (l) => {
1437
+ this.headerRef = l;
1228
1438
  },
1229
1439
  onHeaderscroll: this.onHeaderScroll,
1230
- headerRow: a(Ot, {
1440
+ headerRow: d(Ut, {
1231
1441
  grid: this,
1232
1442
  sort: e,
1233
1443
  groupable: this.$props.groupable,
@@ -1236,14 +1446,14 @@ const ri = /* @__PURE__ */ ft({
1236
1446
  onSortChange: this.sortChangeHandler,
1237
1447
  filter: t,
1238
1448
  filterable: this.$props.filterable,
1239
- filterOperators: this.$props.filterOperators || qe,
1449
+ filterOperators: this.$props.filterOperators || Xe,
1240
1450
  onFilterChange: this.filterChangeHandler,
1241
1451
  columnMenu: this.$props.columnMenu,
1242
1452
  columnMenuIcon: this.$props.columnMenuIcon,
1243
1453
  columnMenuAnimate: this.$props.columnMenuAnimate,
1244
1454
  onSelectionchange: this.onHeaderSelectionChangeHandler,
1245
1455
  columns: this.columnsRef,
1246
- cellsToRender: N,
1456
+ cellsToRender: W,
1247
1457
  columnVirtualization: this.$props.columnVirtualization,
1248
1458
  columnsInitial: this.$props.columns,
1249
1459
  columnResize: this.columnResize,
@@ -1255,16 +1465,16 @@ const ri = /* @__PURE__ */ ft({
1255
1465
  cells: this.$props.cells,
1256
1466
  isRtl: this.isRtl,
1257
1467
  isColCountDefined: this.getAriaColCount !== void 0,
1258
- headerSelectionValue: !!(i && this.dataRef.filter((n) => n.rowType === "data").every((n) => i && this.$props.dataItemKey && D(this.$props.dataItemKey)(n.dataItem) !== void 0 ? i[D(this.$props.dataItemKey)(n.dataItem)] : void 0)),
1259
- filterRow: this.$props.filterable && a(Wt, {
1468
+ headerSelectionValue: !!(i && this.dataRef.filter((l) => l.rowType === "data").every((l) => i && this.$props.dataItemKey && M(this.$props.dataItemKey)(l.dataItem) !== void 0 ? i[M(this.$props.dataItemKey)(l.dataItem)] : void 0)),
1469
+ filterRow: this.$props.filterable && d(jt, {
1260
1470
  grid: this,
1261
1471
  size: this.$props.size,
1262
1472
  columns: this.columnsRef,
1263
1473
  columnsMap: this._columnsMap,
1264
- cellsToRender: N,
1474
+ cellsToRender: W,
1265
1475
  columnVirtualization: this.$props.columnVirtualization,
1266
1476
  filter: t,
1267
- filterOperators: this.$props.filterOperators || qe,
1477
+ filterOperators: this.$props.filterOperators || Xe,
1268
1478
  onFilterchange: this.filterChangeHandler,
1269
1479
  sort: this.$props.sort,
1270
1480
  cellRender: this.$props.filterCellRender,
@@ -1273,27 +1483,27 @@ const ri = /* @__PURE__ */ ft({
1273
1483
  ariaRowIndex: this._columnsMap.length + 1
1274
1484
  }, null) || void 0
1275
1485
  }, null),
1276
- cols: G
1277
- }, null), pe = this.columnsRef.some((n) => {
1278
- var m;
1279
- return !!(n.footerCell || (m = n.cells) != null && m.footerCell);
1280
- }) || (Ge = this.$props.cells) != null && Ge.footerCell ? a(Ut, {
1486
+ cols: D
1487
+ }, null), pe = this.columnsRef.some((l) => {
1488
+ var S;
1489
+ return !!(l.footerCell || (S = l.cells) != null && S.footerCell);
1490
+ }) || (De = this.$props.cells) != null && De.footerCell ? d(Jt, {
1281
1491
  size: this.$props.size,
1282
1492
  columnResize: this.columnResize,
1283
1493
  staticHeaders: this.$props.scrollable !== "none",
1284
- ref: (n) => {
1285
- this.footerRef = n;
1494
+ ref: (l) => {
1495
+ this.footerRef = l;
1286
1496
  },
1287
- row: a(jt, {
1497
+ row: d(Xt, {
1288
1498
  isRtl: this.isRtl,
1289
1499
  rowIndex: this.getAriaRowCount + 1,
1290
1500
  columns: this.columnsRef,
1291
1501
  cells: this.$props.cells
1292
1502
  }, null),
1293
- cols: G
1294
- }, null) : a("span", null, null), _ = {
1295
- leafColumns: y,
1296
- cellsToRender: N,
1503
+ cols: D
1504
+ }, null) : d("span", null, null), L = {
1505
+ leafColumns: T,
1506
+ cellsToRender: W,
1297
1507
  selectedField: this.$props.selectedField,
1298
1508
  dataItemKey: this.$props.dataItemKey,
1299
1509
  select: i,
@@ -1302,7 +1512,7 @@ const ri = /* @__PURE__ */ ft({
1302
1512
  cellRender: this.$props.cellRender,
1303
1513
  cells: this.$props.cells,
1304
1514
  getCellsToRender: this.getCellsToRender,
1305
- hasDynamicColSpan: lt,
1515
+ hasDynamicColSpan: dt,
1306
1516
  itemChange: this.itemChange,
1307
1517
  selectionChangeHandler: this.selectionChangeHandler,
1308
1518
  editHandler: this.editHandler,
@@ -1315,142 +1525,142 @@ const ri = /* @__PURE__ */ ft({
1315
1525
  uniqueField: this.$props.uniqueField,
1316
1526
  columnsRef: this.columnsRef,
1317
1527
  isRtl: this.isRtl,
1318
- idPrefix: H
1319
- }, nt = function(n, m, v, ie, oe) {
1320
- return gs(_, n, m, v, ie, oe);
1528
+ idPrefix: w
1529
+ }, ht = function(l, S, v, oe, ne) {
1530
+ return Cs(L, l, S, v, oe, ne);
1321
1531
  };
1322
- let at = 0, Z = [];
1323
- const ee = !this.dataRef.length, ce = (n) => n >= this.dataRef.length - at;
1324
- let te = 0;
1532
+ let ct = 0, ee = [];
1533
+ const te = !this.dataRef.length, ue = (l) => l >= this.dataRef.length - ct;
1534
+ let se = 0;
1325
1535
  if (this.dataRef.length) {
1326
- const n = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
1327
- let m = this.$props.skip || 0, v = -1, ie = 0;
1328
- const oe = this.computedRowSpannable.enabled ? {} : void 0;
1536
+ const l = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
1537
+ let S = this.$props.skip || 0, v = -1, oe = 0;
1538
+ const ne = this.computedRowSpannable.enabled ? {} : void 0;
1329
1539
  if (this.isVirtualScroll) {
1330
1540
  if (z > 0) {
1331
- const p = this.dataRef.slice(0, z).filter((M) => M.rowType === "data").length;
1332
- v += p, m += z;
1541
+ const m = this.dataRef.slice(0, z).filter((K) => K.rowType === "data").length;
1542
+ v += m, S += z;
1333
1543
  }
1334
- !this.$props.pageable && E && (v += this.$props.skip || 0);
1544
+ !this.$props.pageable && H && (v += this.$props.skip || 0);
1335
1545
  }
1336
- Z = (b || this.dataRef).map(function(p, M) {
1337
- p.rowType === "data" && v++;
1338
- const re = p.dataIndex % 2 !== 0, Fe = this.$props.dataItemKey && D(this.$props.dataItemKey)(p.dataItem), le = M + m, ne = Fe || "ai" + le, ae = ne + "_1", U = nt.call(this, p, ne, v, re, oe), ct = p.rowType === "data" ? this.pinnedSourceSet.has(p.dataItem) : !1, ut = y.length - (this.detailExpandable.enabled ? 1 : 0) - ((l == null ? void 0 : l.length) || 0) || 1;
1339
- return te = le + n + ie, [a(hs, {
1340
- key: ne,
1341
- item: p,
1546
+ ee = (R || this.dataRef).map(function(m, K) {
1547
+ m.rowType === "data" && v++;
1548
+ const re = m.dataIndex % 2 !== 0, Ge = this.$props.dataItemKey && M(this.$props.dataItemKey)(m.dataItem), le = K + S, ae = Ge || "ai" + le, de = ae + "_1", U = ht.call(this, m, ae, v, re, ne), mt = m.rowType === "data" ? this.pinnedSourceSet.has(m.dataItem) : !1, gt = T.length - (this.detailExpandable.enabled ? 1 : 0) - ((r == null ? void 0 : r.length) || 0) || 1;
1549
+ return se = le + l + oe, [d(us, {
1550
+ key: ae,
1551
+ item: m,
1342
1552
  dataIndex: v,
1343
- ariaRowIndex: te,
1553
+ ariaRowIndex: se,
1344
1554
  absoluteRowIndex: le,
1345
1555
  isAltRow: re,
1346
- isHidden: ce(M),
1556
+ isHidden: ue(K),
1347
1557
  rowHeight: this.$props.rowHeight,
1348
1558
  isSelected: U.isSelected,
1349
1559
  isHighlighted: U.isHighlighted,
1350
1560
  isInEdit: U.isInEdit,
1351
- rowType: p.rowType,
1352
- onRowclick: (F) => this.rowClick(F, p),
1353
- onRowdblclick: (F) => this.rowDoubleClick(F, p),
1561
+ rowType: m.rowType,
1562
+ onRowclick: (G) => this.rowClick(G, m),
1563
+ onRowdblclick: (G) => this.rowDoubleClick(G, m),
1354
1564
  render: this.$props.rowRender,
1355
- class: this.$props.rowClass ? this.$props.rowClass(p) : "",
1356
- isPinned: ct,
1565
+ class: this.$props.rowClass ? this.$props.rowClass(m) : "",
1566
+ isPinned: mt,
1357
1567
  rows: this.$props.rows
1358
1568
  }, {
1359
1569
  default: () => [U.row]
1360
- }), this.$props.detail && p.rowType === "data" && (p.expanded || p.dataItem.expanded) && a("tr", {
1361
- key: ae,
1570
+ }), this.$props.detail && m.rowType === "data" && (m.expanded || m.dataItem.expanded) && d("tr", {
1571
+ key: de,
1362
1572
  class: re ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
1363
1573
  style: {
1364
- visibility: ce(M) ? "hidden" : "",
1574
+ visibility: ue(K) ? "hidden" : "",
1365
1575
  height: this.$props.detailRowHeight + "px"
1366
1576
  },
1367
1577
  role: "row",
1368
- "aria-rowindex": te
1369
- }, [l == null ? void 0 : l.map(function(F) {
1370
- return a(Xe, {
1578
+ "aria-rowindex": se
1579
+ }, [r == null ? void 0 : r.map(function(G) {
1580
+ return d(Ze, {
1371
1581
  id: "",
1372
- dataIndex: p.dataIndex,
1373
- field: F.field,
1374
- dataItem: p.dataItem,
1375
- key: `group-${F.field}-${p.dataIndex}`,
1582
+ dataIndex: m.dataIndex,
1583
+ field: G.field,
1584
+ dataItem: m.dataItem,
1585
+ key: `group-${G.field}-${m.dataIndex}`,
1376
1586
  locked: this.$props.lockGroups,
1377
- group: p.group
1587
+ group: m.group
1378
1588
  }, null);
1379
- }, this), (this.$props.expandField || this.detailExpandable.enabled) && a(Bt, {
1380
- id: k.generateNavigatableId(`${ae}-dhcell`, H)
1381
- }, null), a(At, {
1382
- dataItem: p.dataItem,
1383
- dataIndex: p.dataIndex,
1384
- colSpan: ut,
1385
- ariaColIndex: 2 + (l ? l.length : 0),
1589
+ }, this), (this.$props.expandField || this.detailExpandable.enabled) && d(Ot, {
1590
+ id: P.generateNavigatableId(`${de}-dhcell`, w)
1591
+ }, null), d(Nt, {
1592
+ dataItem: m.dataItem,
1593
+ dataIndex: m.dataIndex,
1594
+ colSpan: gt,
1595
+ ariaColIndex: 2 + (r ? r.length : 0),
1386
1596
  detail: this.$props.detail ? this.$props.detail : void 0,
1387
- id: k.generateNavigatableId(`${ae}-dcell`, H)
1597
+ id: P.generateNavigatableId(`${de}-dcell`, w)
1388
1598
  }, null)])];
1389
1599
  }, this);
1390
1600
  }
1391
- const dt = this.$props.pageable && a(yt, {
1601
+ const pt = this.$props.pageable && d(Tt, {
1392
1602
  class: "k-grid-pager",
1393
1603
  onPagesizechange: this.pageChangeHandler,
1394
1604
  onPagechange: this.pageChangeHandler,
1395
1605
  size: this.$props.size,
1396
- total: x,
1397
- skip: r || 0,
1606
+ total: I,
1607
+ skip: n || 0,
1398
1608
  pageSize: (o !== void 0 ? o : this.$props.pageSize) || 10,
1399
- messagesMap: tt,
1400
- settings: kt(this.$props.pageable || {})
1401
- }, null), ue = _e.call(this, {
1402
- h: De,
1609
+ messagesMap: it,
1610
+ settings: Mt(this.$props.pageable || {})
1611
+ }, null), fe = _e.call(this, {
1612
+ h: Fe,
1403
1613
  template: this.$props.pager,
1404
- defaultRendering: dt,
1614
+ defaultRendering: pt,
1405
1615
  additionalProps: {
1406
1616
  ...this.$props,
1407
1617
  skip: this.$props.skip || 0,
1408
- messagesMap: tt
1618
+ messagesMap: it
1409
1619
  },
1410
1620
  additionalListeners: {
1411
1621
  pagesizechange: this.pageChangeHandler,
1412
1622
  pagechange: this.pageChangeHandler
1413
1623
  }
1414
- }), ht = (n) => e && e.filter((m) => m.field === n).length > 0, fe = a("colgroup", {
1415
- ref: $(this, "colGroup")
1416
- }, [y.map(function(n, m) {
1417
- return a("col", {
1418
- key: n.id || `col-${m}`,
1419
- class: ht(n.field) ? "k-sorted" : void 0,
1420
- width: n.width !== void 0 ? n.width.toString().indexOf("%") !== -1 ? n.width : Math.floor(parseFloat(n.width.toString())) + "px" : void 0
1624
+ }), ut = (l) => e && e.filter((S) => S.field === l).length > 0, me = d("colgroup", {
1625
+ ref: y(this, "colGroup")
1626
+ }, [T.map(function(l, S) {
1627
+ return d("col", {
1628
+ key: l.id || `col-${S}`,
1629
+ class: ut(l.field) ? "k-sorted" : void 0,
1630
+ width: l.width !== void 0 ? l.width.toString().indexOf("%") !== -1 ? l.width : Math.floor(parseFloat(l.width.toString())) + "px" : void 0
1421
1631
  }, null);
1422
1632
  }, this)]), ge = {
1423
1633
  height: this.getCorrectHeight,
1424
1634
  ...this.$attrs.style
1425
- }, pt = a("div", {
1635
+ }, ft = d("div", {
1426
1636
  class: "k-loading-mask"
1427
- }, [a("div", {
1637
+ }, [d("div", {
1428
1638
  class: "k-loading-color"
1429
- }, null), a("div", {
1639
+ }, null), d("div", {
1430
1640
  style: {
1431
1641
  height: "100%",
1432
1642
  display: "flex",
1433
1643
  justifyContent: "center",
1434
1644
  alignItems: "center"
1435
1645
  }
1436
- }, [a(Kt, {
1646
+ }, [d(Vt, {
1437
1647
  size: "large",
1438
1648
  type: "converging-spinner"
1439
- }, null)])]), se = this.$props.showLoader && _e.call(this, {
1440
- h: De,
1649
+ }, null)])]), ie = this.$props.showLoader && _e.call(this, {
1650
+ h: Fe,
1441
1651
  template: this.$props.loader,
1442
- defaultRendering: pt
1652
+ defaultRendering: ft
1443
1653
  });
1444
- return this.$props.scrollable === "none" ? a(Ve, {
1654
+ return this.$props.scrollable === "none" ? d(Le, null, [d(Ne, {
1445
1655
  ref: "navRef",
1446
1656
  id: this._gridId,
1447
1657
  navigatable: this.$props.navigatable,
1448
1658
  scrollable: this.$props.scrollable,
1449
1659
  columnVirtualization: this.$props.columnVirtualization
1450
1660
  }, {
1451
- default: () => [a(Ne, {
1452
- ref: (n) => {
1453
- this.gridNavRef = n;
1661
+ default: () => [d(je, {
1662
+ ref: (l) => {
1663
+ this.gridNavRef = l;
1454
1664
  },
1455
1665
  columnsRef: this.columnsRef,
1456
1666
  dataRef: this.dataRef,
@@ -1462,38 +1672,38 @@ const ri = /* @__PURE__ */ ft({
1462
1672
  onColumnreorder: this.columnReorder,
1463
1673
  onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler
1464
1674
  }, {
1465
- default: () => [A, V, a("div", {
1675
+ default: () => [B, V, d("div", {
1466
1676
  role: "grid",
1467
1677
  class: "k-grid-aria-root",
1468
1678
  id: this._gridRoleElementId,
1469
1679
  "aria-colcount": this.getAriaColCount,
1470
1680
  "aria-rowcount": this.getAriaRowCount
1471
- }, [a(qt, {
1681
+ }, [d(Yt, {
1472
1682
  selectable: this.computedSelectable,
1473
1683
  class: "k-table",
1474
- ref: $(this, "table")
1684
+ ref: y(this, "table")
1475
1685
  }, {
1476
- default: () => [fe, he, a("tbody", {
1686
+ default: () => [me, ce, d("tbody", {
1477
1687
  class: "k-table-tbody",
1478
1688
  "data-keyboardnavbody": !0,
1479
- ref: $(this, "tableBody")
1480
- }, [Z, gt(" "), se]), pe]
1481
- }), ee && a(et, {
1482
- id: k.generateNavigatableId("no-records", H)
1689
+ ref: y(this, "tableBody")
1690
+ }, [ee, Ct(" "), ie]), pe]
1691
+ }), te && d(st, {
1692
+ id: P.generateNavigatableId("no-records", w)
1483
1693
  }, {
1484
- default: () => [P.length ? P : a(Ze, null, null)]
1485
- })]), ue, se, L]
1694
+ default: () => [E.length ? E : d(tt, null, null)]
1695
+ })]), fe, ie, F]
1486
1696
  })]
1487
- }) : a(Ve, {
1697
+ }), this.renderContextMenu()]) : d(Le, null, [d(Ne, {
1488
1698
  ref: "navRef",
1489
1699
  id: this._gridId,
1490
1700
  navigatable: this.$props.navigatable,
1491
1701
  scrollable: this.$props.scrollable,
1492
1702
  columnVirtualization: this.$props.columnVirtualization
1493
1703
  }, {
1494
- default: () => [a(Ne, {
1495
- ref: (n) => {
1496
- this.gridNavRef = n;
1704
+ default: () => [d(je, {
1705
+ ref: (l) => {
1706
+ this.gridNavRef = l;
1497
1707
  },
1498
1708
  dataRef: this.dataRef,
1499
1709
  id: this.$props.id,
@@ -1505,90 +1715,90 @@ const ri = /* @__PURE__ */ ft({
1505
1715
  onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler,
1506
1716
  onSetcurrentontop: this.setCurrentOnTop
1507
1717
  }, {
1508
- default: () => [A, V, a("div", {
1718
+ default: () => [B, V, d("div", {
1509
1719
  role: "grid",
1510
1720
  class: "k-grid-aria-root",
1511
1721
  id: this._gridRoleElementId,
1512
1722
  "aria-colcount": this.getAriaColCount,
1513
1723
  "aria-rowcount": this.getAriaRowCount
1514
- }, [he, this.hasPinnedTopRows && a(ot, {
1515
- ref: $(this, "pinnedTop"),
1724
+ }, [ce, this.hasPinnedTopRows && d(rt, {
1725
+ ref: y(this, "pinnedTop"),
1516
1726
  size: this.$props.size,
1517
- cols: G,
1518
- dataRowContext: _,
1727
+ cols: D,
1728
+ dataRowContext: L,
1519
1729
  position: "top",
1520
1730
  pinnedItems: this.sortedPinnedTopRows,
1521
1731
  rowHeight: this.$props.rowHeight,
1522
1732
  rows: this.$props.rows,
1523
1733
  selectable: this.computedSelectable
1524
- }, null), a("div", {
1734
+ }, null), d("div", {
1525
1735
  class: "k-grid-container",
1526
1736
  role: "presentation"
1527
- }, [C && u && a(it, {
1528
- ref: $(this, "stickyHeader"),
1737
+ }, [p && h && d(nt, {
1738
+ ref: y(this, "stickyHeader"),
1529
1739
  size: this.$props.size,
1530
- cols: G,
1531
- dataRowContext: _,
1740
+ cols: D,
1741
+ dataRowContext: L,
1532
1742
  position: "top",
1533
- groupLevelCount: c,
1743
+ groupLevelCount: f,
1534
1744
  rowHeight: this.$props.rowHeight
1535
- }, null), a("div", {
1745
+ }, null), d("div", {
1536
1746
  role: "presentation",
1537
- ref: $(this, "scrollContainer"),
1747
+ ref: y(this, "scrollContainer"),
1538
1748
  class: "k-grid-content k-virtual-content",
1539
1749
  onScroll: this.scrollHandler
1540
- }, [a("div", {
1750
+ }, [d("div", {
1541
1751
  class: "k-grid-table-wrap",
1542
1752
  role: "presentation"
1543
- }, [a(Jt, {
1753
+ }, [d(Qt, {
1544
1754
  selectable: this.computedSelectable,
1545
1755
  tableClassName: this.gridTableClass,
1546
1756
  tableStyle: {
1547
- userSelect: X
1757
+ userSelect: Q
1548
1758
  },
1549
- ref: $(this, "table")
1759
+ ref: y(this, "table")
1550
1760
  }, {
1551
- default: () => [fe, a("tbody", {
1761
+ default: () => [me, d("tbody", {
1552
1762
  class: "k-table-tbody",
1553
1763
  role: "rowgroup",
1554
1764
  "data-keyboardnavbody": !0,
1555
- ref: $(this, "tableBody")
1556
- }, [Z])]
1557
- }), ee && a(et, {
1558
- id: k.generateNavigatableId("no-records", H)
1765
+ ref: y(this, "tableBody")
1766
+ }, [ee])]
1767
+ }), te && d(st, {
1768
+ id: P.generateNavigatableId("no-records", w)
1559
1769
  }, {
1560
- default: () => [P.length ? P : a(Ze, null, null)]
1561
- })]), !ee && a("div", {
1770
+ default: () => [E.length ? E : d(tt, null, null)]
1771
+ })]), !te && d("div", {
1562
1772
  class: "k-height-container",
1563
1773
  role: "presentation"
1564
- }, [a("div", {
1565
- ref: $(this, "scrollHeightContainer"),
1774
+ }, [d("div", {
1775
+ ref: y(this, "scrollHeightContainer"),
1566
1776
  style: this.$props.scrollable === "virtual" ? {
1567
1777
  height: this._containerHeightRef + "px"
1568
1778
  } : {}
1569
- }, null)])]), C && g && a(it, {
1570
- ref: $(this, "stickyFooter"),
1779
+ }, null)])]), p && u && d(nt, {
1780
+ ref: y(this, "stickyFooter"),
1571
1781
  size: this.$props.size,
1572
- cols: G,
1573
- dataRowContext: _,
1782
+ cols: D,
1783
+ dataRowContext: L,
1574
1784
  position: "bottom",
1575
- groupLevelCount: c,
1785
+ groupLevelCount: f,
1576
1786
  rowHeight: this.$props.rowHeight
1577
- }, null)]), this.hasPinnedBottomRows && a(ot, {
1578
- ref: $(this, "pinnedBottom"),
1787
+ }, null)]), this.hasPinnedBottomRows && d(rt, {
1788
+ ref: y(this, "pinnedBottom"),
1579
1789
  size: this.$props.size,
1580
- cols: G,
1581
- dataRowContext: _,
1790
+ cols: D,
1791
+ dataRowContext: L,
1582
1792
  position: "bottom",
1583
1793
  pinnedItems: this.sortedPinnedBottomRows,
1584
1794
  rowHeight: this.$props.rowHeight,
1585
1795
  rows: this.$props.rows,
1586
1796
  selectable: this.computedSelectable
1587
- }, null), pe, W]), ue, se, L]
1797
+ }, null), pe, N]), fe, ie, F]
1588
1798
  })]
1589
- });
1799
+ }), this.renderContextMenu()]);
1590
1800
  }
1591
1801
  });
1592
1802
  export {
1593
- ri as Grid
1803
+ fi as Grid
1594
1804
  };