@progress/kendo-vue-grid 8.1.0-develop.1 → 8.1.0-develop.3

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 (61) hide show
  1. package/Grid.d.ts +56 -5
  2. package/Grid.js +1 -1
  3. package/Grid.mjs +667 -649
  4. package/GridNav.d.ts +24 -4
  5. package/GridNav.js +1 -1
  6. package/GridNav.mjs +62 -22
  7. package/GridState.d.ts +4 -0
  8. package/RootGrid.d.ts +32 -11
  9. package/RootGrid.js +1 -1
  10. package/RootGrid.mjs +96 -57
  11. package/cells/GridCell.js +1 -1
  12. package/cells/GridCell.mjs +35 -26
  13. package/cells/GridGroupCell.d.ts +10 -0
  14. package/cells/GridGroupCell.js +1 -1
  15. package/cells/GridGroupCell.mjs +95 -53
  16. package/columnMenu/GridColumnMenuCheckboxFilter.d.ts +1 -1
  17. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
  18. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +11 -11
  19. package/common.d.ts +2 -0
  20. package/common.js +1 -1
  21. package/common.mjs +2 -0
  22. package/components/StickyGroupTable.d.ts +85 -0
  23. package/components/StickyGroupTable.js +8 -0
  24. package/components/StickyGroupTable.mjs +113 -0
  25. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  26. package/drag/ColumnResize.d.ts +10 -1
  27. package/drag/ColumnResize.js +1 -1
  28. package/drag/ColumnResize.mjs +129 -104
  29. package/drag/GroupingIndicator.d.ts +1 -0
  30. package/drag/GroupingIndicator.js +1 -1
  31. package/drag/GroupingIndicator.mjs +28 -18
  32. package/footer/FooterCell.d.ts +43 -0
  33. package/footer/FooterCell.js +8 -0
  34. package/footer/FooterCell.mjs +68 -0
  35. package/footer/FooterRow.d.ts +5 -6
  36. package/footer/FooterRow.js +1 -1
  37. package/footer/FooterRow.mjs +16 -39
  38. package/getRowContents.d.ts +85 -0
  39. package/getRowContents.js +8 -0
  40. package/getRowContents.mjs +172 -0
  41. package/header/GridHeaderGroupSpacerCell.d.ts +11 -0
  42. package/hooks/useStickyGroups.d.ts +72 -0
  43. package/hooks/useStickyGroups.js +8 -0
  44. package/hooks/useStickyGroups.mjs +350 -0
  45. package/index.d.mts +1 -0
  46. package/index.d.ts +1 -0
  47. package/index.js +1 -1
  48. package/index.mjs +74 -73
  49. package/interfaces/GridCellProps.d.ts +4 -0
  50. package/interfaces/GridCellsSettings.d.ts +320 -0
  51. package/interfaces/GridColumnProps.d.ts +11 -1
  52. package/interfaces/GridGroupableSettings.d.ts +23 -0
  53. package/interfaces/GridProps.d.ts +33 -0
  54. package/messages/main.d.ts +5 -0
  55. package/messages/main.js +2 -2
  56. package/messages/main.mjs +15 -13
  57. package/package-metadata.js +1 -1
  58. package/package-metadata.mjs +2 -2
  59. package/package.json +12 -12
  60. package/utils/main.js +1 -1
  61. package/utils/main.mjs +80 -76
package/Grid.mjs CHANGED
@@ -5,48 +5,49 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as $t, createVNode as d, h as Ve, createTextVNode as It, ref as S, inject as xt, markRaw as T } from "vue";
9
- import { isObject as N, cloneArray as vt, canUseDOM as te, WatermarkOverlay as St, getter as E, getTemplate as Ne, setRef as F, hasListener as M, getComponentElementRef as Oe, getRef as I, RowHeightService as yt, setScrollbarWidth as wt, kendoThemeMaps as We, uGrid as Ht, isRtl as Be, validatePackage as kt, shouldShowValidationUI as Tt, getLicenseMessage as Et, guid as Ue, getNestedValue as je } from "@progress/kendo-vue-common";
10
- import { tableKeyboardNavigationTools as D, combineFilters as Dt, Pager as zt, normalize as _t, TableKeyboardNavigationProvider as qe, updateLeft as Pt, updateRight as Lt, groupExpandReducer as Ft, detailExpandReducer as Gt, getSelectedState as Je, getSelectedStateFromKeyDown as Mt, closestTagName as Qe, getColumnIndex as Kt, getRowIndex as At, getDetailExpandableOptions as Vt, getSelectionOptions as Nt, getGroupExpandableOptions as Ot } from "@progress/kendo-vue-data-tools";
11
- import { Loader as Wt } from "@progress/kendo-vue-indicators";
12
- import { GridNav as Xe } from "./GridNav.mjs";
13
- import { GridSelectionCell as Ye } from "./cells/GridSelectionCell.mjs";
14
- import { GridHierarchyCell as ie } from "./cells/GridHierarchyCell.mjs";
15
- import { GridDetailHierarchyCell as Bt } from "./cells/GridDetailHierarchyCell.mjs";
16
- import { GridDetailCell as Ut } from "./cells/GridDetailCell.mjs";
17
- import { GridEditCell as jt } from "./cells/GridEditCell.mjs";
18
- import { Header as qt } from "./header/Header.mjs";
19
- import { HeaderRow as Jt } from "./header/HeaderRow.mjs";
20
- import { FilterRow as Qt } from "./header/FilterRow.mjs";
21
- import { GroupPanel as Xt } from "./header/GroupPanel.mjs";
22
- import { Footer as Yt } from "./footer/Footer.mjs";
23
- import { FooterRow as Zt } from "./footer/FooterRow.mjs";
24
- import { GridTable as ei } from "./components/table/GridTable.mjs";
25
- import { GridTableScrollable as ti } from "./components/table/GridTableScrollable.mjs";
26
- import { operators as Ze } from "./filterCommon.mjs";
27
- import { VirtualScroll as ii } from "./VirtualScroll.mjs";
28
- import { ColumnResize as si } from "./drag/ColumnResize.mjs";
29
- import { CommonDragLogic as li } from "./drag/CommonDragLogic.mjs";
30
- import { DragClue as ai } from "./drag/DragClue.mjs";
31
- import { DropClue as ri } from "./drag/DropClue.mjs";
32
- import { applyExpandedState as oi, getColSpan as ni, autoGenerateColumns as di, mapColumns as hi, getFlatColumnsState as et, getRowSpanOptions as tt, getDataAsArray as pi, groupedFirstItemValue as it, calcRowHeight as ci, flatData as ui, readColumns as fi } from "./utils/main.mjs";
33
- import { GridCell as gi } from "./cells/GridCell.mjs";
34
- import { GridGroupCell as se } from "./cells/GridGroupCell.mjs";
35
- import { GridRow as mi } from "./rows/GridRow.mjs";
36
- import { gridProps as Ci } from "./common.mjs";
37
- import { GridHeaderSelectionCell as st } from "./header/GridHeaderSelectionCell.mjs";
38
- import { GridNoRecords as lt } from "./components/noRecords/GridNoRecords.mjs";
39
- import { GridNoRecordsContainer as at } from "./components/noRecords/GridNoRecordsContainer.mjs";
40
- import { packageMetadata as le } from "./package-metadata.mjs";
41
- import { pagerMessagesMap as rt } from "./messages/messagesMap.mjs";
42
- import { process as bi } from "@progress/kendo-data-query";
43
- import { KendoKey as Ri } from "./key.mjs";
44
- import { getVirtualCellsToRender as $i } from "./utils/virtualColumns.mjs";
45
- const rs = /* @__PURE__ */ $t({
8
+ import { defineComponent as pt, createVNode as n, h as _e, createTextVNode as ct, ref as c, inject as ut, computed as Pe, markRaw as x } from "vue";
9
+ import { isObject as W, cloneArray as ft, canUseDOM as B, WatermarkOverlay as gt, getter as P, getTemplate as Me, setRef as w, hasListener as M, getComponentElementRef as Ke, getRef as m, RowHeightService as mt, setScrollbarWidth as Rt, kendoThemeMaps as Ae, uGrid as Ct, isRtl as Ve, validatePackage as bt, shouldShowValidationUI as $t, getLicenseMessage as It, guid as Oe } from "@progress/kendo-vue-common";
10
+ import { tableKeyboardNavigationTools as H, combineFilters as vt, Pager as xt, normalize as wt, TableKeyboardNavigationProvider as Ne, updateLeft as St, updateRight as yt, groupExpandReducer as kt, detailExpandReducer as Ht, getSelectedState as We, getSelectedStateFromKeyDown as Tt, closestTagName as Be, getColumnIndex as zt, getRowIndex as Et, getDetailExpandableOptions as Gt, getSelectionOptions as Ft, getGroupExpandableOptions as Dt } from "@progress/kendo-vue-data-tools";
11
+ import { Loader as Lt } from "@progress/kendo-vue-indicators";
12
+ import { GridNav as Ue } from "./GridNav.mjs";
13
+ import { GridSelectionCell as je } from "./cells/GridSelectionCell.mjs";
14
+ import { GridHierarchyCell as ae } from "./cells/GridHierarchyCell.mjs";
15
+ import { GridDetailHierarchyCell as _t } from "./cells/GridDetailHierarchyCell.mjs";
16
+ import { GridDetailCell as Pt } from "./cells/GridDetailCell.mjs";
17
+ import { Header as Mt } from "./header/Header.mjs";
18
+ import { HeaderRow as Kt } from "./header/HeaderRow.mjs";
19
+ import { FilterRow as At } from "./header/FilterRow.mjs";
20
+ import { GroupPanel as Vt } from "./header/GroupPanel.mjs";
21
+ import { Footer as Ot } from "./footer/Footer.mjs";
22
+ import { FooterRow as Nt } from "./footer/FooterRow.mjs";
23
+ import { GridTable as Wt } from "./components/table/GridTable.mjs";
24
+ import { GridTableScrollable as Bt } from "./components/table/GridTableScrollable.mjs";
25
+ import { operators as qe } from "./filterCommon.mjs";
26
+ import { VirtualScroll as Ut } from "./VirtualScroll.mjs";
27
+ import { ColumnResize as jt } from "./drag/ColumnResize.mjs";
28
+ import { CommonDragLogic as qt } from "./drag/CommonDragLogic.mjs";
29
+ import { DragClue as Jt } from "./drag/DragClue.mjs";
30
+ import { DropClue as Qt } from "./drag/DropClue.mjs";
31
+ import { applyExpandedState as Xt, getColSpan as Yt, autoGenerateColumns as Zt, mapColumns as es, getFlatColumnsState as Je, getRowSpanOptions as Qe, getDataAsArray as ts, groupedFirstItemValue as ss, calcRowHeight as is, flatData as os, readColumns as rs } from "./utils/main.mjs";
32
+ import { GridGroupCell as ne } from "./cells/GridGroupCell.mjs";
33
+ import { GridRow as ls } from "./rows/GridRow.mjs";
34
+ import { gridProps as as } from "./common.mjs";
35
+ import { GridHeaderSelectionCell as Xe } from "./header/GridHeaderSelectionCell.mjs";
36
+ import { GridNoRecords as Ye } from "./components/noRecords/GridNoRecords.mjs";
37
+ import { GridNoRecordsContainer as Ze } from "./components/noRecords/GridNoRecordsContainer.mjs";
38
+ import { packageMetadata as de } from "./package-metadata.mjs";
39
+ import { pagerMessagesMap as et } from "./messages/messagesMap.mjs";
40
+ import { process as ns } from "@progress/kendo-data-query";
41
+ import { KendoKey as ds } from "./key.mjs";
42
+ import { getVirtualCellsToRender as hs } from "./utils/virtualColumns.mjs";
43
+ import { StickyGroupTable as tt } from "./components/StickyGroupTable.mjs";
44
+ import { getRowContents as ps } from "./getRowContents.mjs";
45
+ import { useStickyGroups as cs } from "./hooks/useStickyGroups.mjs";
46
+ const Ys = /* @__PURE__ */ pt({
46
47
  name: "KendoGrid",
47
48
  inheritAttrs: !1,
48
49
  props: {
49
- ...Ci,
50
+ ...as,
50
51
  toolbar: {
51
52
  type: Object
52
53
  },
@@ -66,8 +67,8 @@ const rs = /* @__PURE__ */ $t({
66
67
  },
67
68
  watch: {
68
69
  rowHeight: function(e, t) {
69
- var i;
70
- this.onRowHeightChanged(e, t), (i = this.vsRef) == null || i.reset();
70
+ var s;
71
+ this.onRowHeightChanged(e, t), (s = this.vsRef) == null || s.reset();
71
72
  },
72
73
  scrollable: function() {
73
74
  var e;
@@ -91,19 +92,27 @@ const rs = /* @__PURE__ */ $t({
91
92
  }
92
93
  },
93
94
  created() {
94
- kt(le), this.showLicenseWatermark = Tt(le), this.licenseMessage = Et(le), this.initialHeight = null, this.columnsRef = [], this.vsRef = new ii(), this.dragLogic = new li(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new si(this.onResize.bind(this)), this._columnsMap = [[]], this._header = null, this._footer = null, this.tableBodyRef = null, this.tableRef = null, this.scrollHeightContainerRef = null, this.forceUpdateTimeout = void 0, this._gridId = Ue(), this._gridRoleElementId = Ue(), this.slicedCurrentData = void 0, this._prevTotal = void 0, this._containerHeightRef = 0, this._minRowHeightRef = 0, this._virtualSkipRef = 0, this.wrapperScrollTopRef = 0, this.scrollLeftRef = 0;
95
+ bt(de), this.showLicenseWatermark = $t(de), this.licenseMessage = It(de), this.initialHeight = null, this.columnsRef = [], this.dragLogic = new qt(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new jt(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;
95
96
  },
96
97
  mounted() {
97
- var t, i;
98
+ var t, s;
98
99
  this.setRefs();
99
- const e = Be(this._element);
100
- this._prevTotal = this.$props.total, this.isRtl = e, this.initialHeight = ((i = (t = this._element) == null ? void 0 : t.style) == null ? void 0 : i.height) || null, this.resizeObserver = te && (window == null ? void 0 : window.ResizeObserver) && new ResizeObserver(this.calculateMedia), document != null && document.body && this.resizeObserver && this.resizeObserver.observe(document.body);
100
+ const e = Ve(this._element);
101
+ 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 = B && (window == null ? void 0 : window.ResizeObserver) && new ResizeObserver(this.calculateMedia), document != null && document.body && this.resizeObserver && this.resizeObserver.observe(document.body), B) {
102
+ const i = {
103
+ rootMargin: "0px",
104
+ threshold: 0.9
105
+ };
106
+ this.observerRef = window.IntersectionObserver && new window.IntersectionObserver(this.handleIntersection, i) || null;
107
+ }
101
108
  },
102
109
  updated() {
103
- var t;
110
+ var s;
104
111
  this.setRefs();
105
- const e = Be(this._element);
106
- 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 = ""), this.isVirtualScroll && (this.setContainerHeight(), this.setMinRowHeight(), (t = this.vsRef) == null || t.update());
112
+ const e = Ve(this._element);
113
+ 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 = "");
114
+ const t = this.updateStickyGroups();
115
+ 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());
107
116
  },
108
117
  unmounted() {
109
118
  this.gridUnmounted();
@@ -116,19 +125,19 @@ const rs = /* @__PURE__ */ $t({
116
125
  return this.$props.navigatable ? this.gridId : "";
117
126
  },
118
127
  groupExpandable() {
119
- return Ot(typeof this.$props.groupable == "object" && this.$props.groupable.enabled !== !1 ? this.$props.groupable.expandable : this.$props.groupable);
128
+ return Dt(typeof this.$props.groupable == "object" && this.$props.groupable.enabled !== !1 ? this.$props.groupable.expandable : this.$props.groupable);
120
129
  },
121
130
  hierarchClass() {
122
- return Ht.hierarchyCell({});
131
+ return Ct.hierarchyCell({});
123
132
  },
124
133
  computedRowSpannable() {
125
- return tt(this.$props.rowSpannable);
134
+ return Qe(this.$props.rowSpannable);
126
135
  },
127
136
  computedSelectable() {
128
- return Nt(this.$props.selectable);
137
+ return Ft(this.$props.selectable);
129
138
  },
130
139
  detailExpandable() {
131
- return Vt(!!this.$props.detail);
140
+ return Gt(!!this.$props.detail);
132
141
  },
133
142
  nonscrollableWrapperClass() {
134
143
  const {
@@ -137,7 +146,7 @@ const rs = /* @__PURE__ */ $t({
137
146
  return {
138
147
  "k-grid": !0,
139
148
  "k-grid-md": !e,
140
- [`k-grid-${We.sizeMap[e] || e}`]: e,
149
+ [`k-grid-${Ae.sizeMap[e] || e}`]: e,
141
150
  [t]: !!t
142
151
  };
143
152
  },
@@ -158,7 +167,7 @@ const rs = /* @__PURE__ */ $t({
158
167
  "k-table": !0,
159
168
  "k-grid-table": !0,
160
169
  "k-grid-md": !e,
161
- [`k-table-${We.sizeMap[e] || e}`]: e
170
+ [`k-table-${Ae.sizeMap[e] || e}`]: e
162
171
  };
163
172
  },
164
173
  getCorrectHeight() {
@@ -167,7 +176,7 @@ const rs = /* @__PURE__ */ $t({
167
176
  currentGroupable() {
168
177
  var t;
169
178
  const e = (t = this.gridContext.group) == null ? void 0 : t.value;
170
- return this.$props.groupable === !0 && (e == null ? void 0 : e.length) || N(this.$props.groupable) && this.$props.groupable.enabled !== !1;
179
+ return this.$props.groupable === !0 && (e == null ? void 0 : e.length) || W(this.$props.groupable) && this.$props.groupable.enabled !== !1;
171
180
  },
172
181
  computedCollapsed() {
173
182
  let e = [];
@@ -178,14 +187,21 @@ const rs = /* @__PURE__ */ $t({
178
187
  },
179
188
  // Calculates the value of the ariaRowcount attribute.
180
189
  getAriaRowCount() {
190
+ var s, i;
181
191
  const e = this.$props.dataItems, t = this.$props.total || (e == null ? void 0 : e.total) || (e == null ? void 0 : e.length) || 0;
182
- return this.$props.detail ? this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t * 2 + (this.columnsRef.some((i) => !!i.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((i) => !!i.footerCell) ? 1 : 0);
192
+ return this.$props.detail ? this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t * 2 + (this.columnsRef.some((o) => {
193
+ var r;
194
+ return !!(o.footerCell || (r = o.cells) != null && r.footerCell);
195
+ }) || (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((o) => {
196
+ var r;
197
+ return !!(o.footerCell || (r = o.cells) != null && r.footerCell);
198
+ }) || (i = this.$props.cells) != null && i.footerCell ? 1 : 0);
183
199
  },
184
200
  // Calculates the value of the ariaColcount attribute.
185
201
  // Based on the result of this method the ariaColIndex is rendered or not in the HeaderRow TH elements
186
202
  getAriaColCount() {
187
- const e = this.$props.columns, t = this.$props.columnVirtualization, i = (e == null ? void 0 : e.filter((s) => s.hidden !== void 0).length) !== 0;
188
- if (t || i)
203
+ const e = this.$props.columns, t = this.$props.columnVirtualization, s = (e == null ? void 0 : e.filter((i) => i.hidden !== void 0).length) !== 0;
204
+ if (t || s)
189
205
  return (e == null ? void 0 : e.length) !== 0 ? e == null ? void 0 : e.length : -1;
190
206
  },
191
207
  isVirtualScroll() {
@@ -193,43 +209,82 @@ const rs = /* @__PURE__ */ $t({
193
209
  }
194
210
  },
195
211
  methods: {
212
+ handleIntersection(e) {
213
+ const t = {
214
+ rowIndex: this.rowIndexRef.value
215
+ };
216
+ e.forEach((s) => {
217
+ s.boundingClientRect.height !== s.intersectionRect.height && this.setCurrentOnTop(t);
218
+ });
219
+ },
220
+ scrollIntoView(e) {
221
+ var i;
222
+ if (!((i = this.vsRef) != null && i.container) || this.$props.scrollable === "none")
223
+ return;
224
+ const {
225
+ rowIndex: t
226
+ } = e;
227
+ this.rowIndexRef.value = t;
228
+ const s = this._element;
229
+ if (this.observerRef.value && s) {
230
+ this.observerRef.value.disconnect();
231
+ const o = s.querySelector(`[absolute-row-index="${this.rowIndexRef.value}"]`);
232
+ o ? this.observerRef.value.observe(o) : this.setCurrentOnTop(e);
233
+ }
234
+ },
235
+ setCurrentOnTop(e) {
236
+ var i, o;
237
+ if (!((i = this.vsRef) != null && i.container) || this.$props.scrollable === "none")
238
+ return;
239
+ this.observerRef.value && this.observerRef.value.disconnect();
240
+ const {
241
+ rowIndex: t
242
+ } = e, s = this._element;
243
+ if (this.isVirtualScroll) {
244
+ const r = ((o = this.vsRef.rowHeightService) == null ? void 0 : o.offset(t)) || 0;
245
+ this.vsRef.container.scroll(0, r);
246
+ } else if (s) {
247
+ const r = t < 1 ? s.querySelector("tbody > tr:nth-child(1)") : s.querySelector(`tbody > tr:nth-child(${t + 1})`);
248
+ r && this.containerElementRef && (this.containerElementRef.scrollTop = r.offsetTop);
249
+ }
250
+ },
196
251
  getTotal() {
197
252
  let e = this.$props.total || 0;
198
253
  return Array.isArray(this.$props.dataItems) ? e = e || this.$props.dataItems.length : this.$props.dataItems && (e = e || this.$props.dataItems.total), e;
199
254
  },
200
255
  readColumnElements() {
201
- return fi(this.$props.columns, this.currentColumnsState, {
256
+ return rs(this.$props.columns, this.currentColumnsState, {
202
257
  prevId: 0,
203
258
  idPrefix: this.idPrefix
204
259
  });
205
260
  },
206
261
  getResolvedFlatColumnsState() {
207
- const e = [], t = (i, s) => i == null ? void 0 : i.forEach((l) => {
208
- const a = l.hidden || s;
262
+ const e = [], t = (s, i) => s == null ? void 0 : s.forEach((o) => {
263
+ const r = o.hidden || i;
209
264
  e.push({
210
- ...l,
211
- hidden: a
212
- }), t(l.children, a);
265
+ ...o,
266
+ hidden: r
267
+ }), t(o.children, r);
213
268
  });
214
269
  return t(this.currentColumnsState, !1), e;
215
270
  },
216
271
  filterColumns(e) {
217
272
  const t = this.getResolvedFlatColumnsState();
218
- return [e.filter((i) => {
219
- var s;
220
- return !i.hidden && !((s = t.find((l) => l.id === i.id)) != null && s.hidden);
221
- }), e.filter((i) => {
222
- var s;
223
- return i.hidden || ((s = t.find((l) => l.id === i.id)) == null ? void 0 : s.hidden);
273
+ return [e.filter((s) => {
274
+ var i;
275
+ return !s.hidden && !((i = t.find((o) => o.id === s.id)) != null && i.hidden);
276
+ }), e.filter((s) => {
277
+ var i;
278
+ return s.hidden || ((i = t.find((o) => o.id === s.id)) == null ? void 0 : i.hidden);
224
279
  })];
225
280
  },
226
- getFlatData(e, t, i, s, l, a, o) {
227
- const h = [], c = ui(h, e, t, {
228
- index: i
229
- }, s !== void 0, l, a, this.groupExpandable.defaultExpand, o, this.$props.expandField);
281
+ getFlatData(e, t, s, i, o, r, l) {
282
+ const d = [], h = os(d, e, t, {
283
+ index: s
284
+ }, i !== void 0, o, r, this.groupExpandable.defaultExpand, l, this.$props.expandField);
230
285
  return {
231
- flattedData: h,
232
- resolvedGroupsCount: c
286
+ flattedData: d,
287
+ resolvedGroupsCount: h
233
288
  };
234
289
  },
235
290
  getColumnsEssentialProps(e) {
@@ -247,11 +302,11 @@ const rs = /* @__PURE__ */ $t({
247
302
  filterHiddenColumns(e) {
248
303
  if (!e || e.length === 0)
249
304
  return e;
250
- const t = (i) => ({
251
- ...i,
252
- children: i.children && i.children.length > 0 ? this.filterHiddenColumns(i.children) : i.children
305
+ const t = (s) => ({
306
+ ...s,
307
+ children: s.children && s.children.length > 0 ? this.filterHiddenColumns(s.children) : s.children
253
308
  });
254
- return [...e].filter((i) => !i.hidden).filter((i) => te && i && i.media ? window.matchMedia(i.media).matches : i).map((i) => t(i));
309
+ return [...e].filter((s) => !s.hidden).filter((s) => B && s && s.media ? window.matchMedia(s.media).matches : s).map((s) => t(s));
255
310
  },
256
311
  /**
257
312
  * A getter of the current columns. Gets the current column width or current columns,
@@ -261,39 +316,41 @@ const rs = /* @__PURE__ */ $t({
261
316
  * and check the properties afterwards. You can check the result in the browser console.
262
317
  */
263
318
  getColumns() {
264
- const e = this.columnsRef.filter((i) => i.declarationIndex >= 0 && i.parentIndex === -1), t = (i) => (i.sort((s, l) => s.declarationIndex - l.declarationIndex), i.map((s) => {
319
+ const e = this.columnsRef.filter((s) => s.declarationIndex >= 0 && s.parentIndex === -1), t = (s) => (s.sort((i, o) => i.declarationIndex - o.declarationIndex), s.map((i) => {
265
320
  const {
266
- declarationIndex: l,
267
- parentIndex: a,
268
- depth: o,
269
- colSpan: h,
270
- rowSpan: c,
271
- index: m,
321
+ declarationIndex: o,
322
+ parentIndex: r,
323
+ depth: l,
324
+ colSpan: d,
325
+ rowSpan: h,
326
+ index: g,
272
327
  kFirst: u,
273
- children: f,
328
+ children: R,
274
329
  ...C
275
- } = s;
276
- return f.length ? {
277
- children: t(f),
330
+ } = i;
331
+ return R.length ? {
332
+ children: t(R),
278
333
  ...C
279
334
  } : C;
280
335
  }));
281
336
  return t(e);
282
337
  },
283
338
  setRefs() {
339
+ var r, l;
284
340
  let e = "$el";
285
- const t = I(this, "gridNav");
341
+ const t = m(this, "gridNav");
286
342
  t && (this._element = t[e]);
287
- const i = I(this, "groupPanelDiv");
288
- if (i) {
289
- let a = i[e] || null;
290
- this.dragLogic.refGroupPanelDiv(a);
343
+ const s = m(this, "groupPanelDiv");
344
+ if (s) {
345
+ let d = s[e] || null;
346
+ this.dragLogic.refGroupPanelDiv(d);
291
347
  }
292
- const s = I(this, "dropElementClue"), l = I(this, "dragElementClue");
293
- this.dragLogic.refDropElementClue(s), this.dragLogic.refDragElementClue(l), this.columnResize.colGroupMain = I(this, "colGroup"), this._header = I(this, "header"), this._footer = I(this, "footer"), this.resetTableWidth(), wt();
348
+ this.stickyHeaderRef = m(this, "stickyHeader"), this.stickyFooterRef = m(this, "stickyFooter");
349
+ const i = m(this, "dropElementClue"), o = m(this, "dragElementClue");
350
+ this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(o), this.columnResize.colGroupMain = m(this, "colGroup"), this.columnResize.colGroupStickyHeader = (r = this.stickyHeaderRef) == null ? void 0 : r.colGroupRef, this.columnResize.colGroupStickyFooter = (l = this.stickyFooterRef) == null ? void 0 : l.colGroupRef, this._header = m(this, "header"), this._footer = m(this, "footer"), this.resetTableWidth(), Rt();
294
351
  },
295
352
  gridUnmounted() {
296
- 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.currentData = [], this.columnsRef = [], document != null && document.body && this.resizeObserver && this.resizeObserver.disconnect();
353
+ 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();
297
354
  },
298
355
  isAllData() {
299
356
  const {
@@ -303,23 +360,24 @@ const rs = /* @__PURE__ */ $t({
303
360
  return Array.isArray(e) ? e.length === t : e ? t === e.total : !1;
304
361
  },
305
362
  resetVirtualSkip() {
306
- this.isVirtualScroll && this._virtualSkipRef && (this._virtualSkipRef = 0);
363
+ this.isVirtualScroll && this.virtualSkipRef && (this.virtualSkipRef = 0);
307
364
  },
308
365
  virtualPageChange(e, t) {
309
366
  var i;
310
- this.$props.pageable || (i = this.$props.group) != null && i.length ? (this._virtualSkipRef = e.skip, this.$forceUpdate()) : this.pageChangeHandler(e, t);
367
+ const s = (i = this.gridContext.group) == null ? void 0 : i.value;
368
+ this.$props.pageable || s != null && s.length ? (this.virtualSkipRef = e.skip, this.$forceUpdate()) : this.pageChangeHandler(e, t);
311
369
  },
312
370
  initializeVirtualization() {
313
371
  const e = this.vsRef, t = this.$props.rowHeight || this._minRowHeightRef || 0;
314
- e && (e.fixedScroll = this.$props.fixedScroll || !1, e.PageChange = this.virtualPageChange, e.pageSize = this._virtualPageSize, e.scrollableVirtual = this.isVirtualScroll, e.container = I(this, "scrollContainer"), e.tableBody = I(this, "tableBody"), e.scrollHeightContainer = I(this, "scrollHeightContainer"), e.table = Oe(this, "table"), (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new yt(this._virtualTotal, t)));
372
+ this.tableBodyRef = m(this, "tableBody"), this.scrollTableRef = Ke(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 = m(this, "scrollContainer"), e.tableBody = this.tableBodyRef, e.scrollHeightContainer = m(this, "scrollHeightContainer"), e.table = this.scrollTableRef, (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new mt(this._virtualTotal, t)));
315
373
  },
316
374
  setContainerHeight() {
317
- const e = I(this, "scrollContainer");
375
+ const e = m(this, "scrollContainer");
318
376
  this._containerHeightRef = (e == null ? void 0 : e.offsetHeight) || 0;
319
377
  },
320
378
  setMinRowHeight() {
321
379
  if (!this._minRowHeightRef && !this.$props.rowHeight) {
322
- const t = ci(I(this, "tableBody"));
380
+ const t = is(m(this, "tableBody"));
323
381
  t && (this._minRowHeightRef = t, this.$forceUpdate());
324
382
  }
325
383
  },
@@ -327,15 +385,23 @@ const rs = /* @__PURE__ */ $t({
327
385
  this.setRefs();
328
386
  },
329
387
  onHeaderScroll(e) {
330
- const i = e.target.scrollLeft, s = I(this, "scrollContainer");
331
- s && (s.scrollLeft = i), this.scrollLeftRef = i;
388
+ const s = e.target.scrollLeft, i = m(this, "scrollContainer");
389
+ i && (i.scrollLeft = s), this.scrollLeftRef = s;
332
390
  },
333
391
  scrollHandler(e) {
392
+ var r, l;
334
393
  clearTimeout(this.forceUpdateTimeout);
335
- const t = e.currentTarget.scrollLeft, i = e.currentTarget.scrollTop;
336
- this.$props.columnVirtualization && (!this.isVirtualScroll || i === this.wrapperScrollTopRef) && (this.forceUpdateTimeout = setTimeout(() => {
394
+ const t = e.currentTarget.scrollLeft, s = e.currentTarget.scrollTop;
395
+ this.$props.columnVirtualization && (!this.isVirtualScroll || s === this.wrapperScrollTopRef) && (this.forceUpdateTimeout = setTimeout(() => {
337
396
  this.$forceUpdate();
338
- }, 0)), this.scrollLeftRef = t, this._header && this._header.setScrollLeft(e.currentTarget.scrollLeft), this._footer && this._footer.setScrollLeft(e.currentTarget.scrollLeft), this.vsRef && i !== this.wrapperScrollTopRef && this.vsRef.scrollHandler(e), this.$emit("scroll", e), this.wrapperScrollTopRef = i;
397
+ }, 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.vsRef && s !== this.wrapperScrollTopRef && this.vsRef.scrollHandler(e);
398
+ const i = (r = this.virtualSkipRef) == null ? void 0 : r.current;
399
+ this.vsRef.current && s !== this.wrapperScrollTopRef && this.vsRef.current.scrollHandler(e);
400
+ const o = this.isVirtualScroll && ((l = this.virtualSkipRef) == null ? void 0 : l.current) !== i;
401
+ if (this.$emit("scroll", e), this.wrapperScrollTopRef = s, !o) {
402
+ const d = this.updateStickyGroups();
403
+ this.sticky.headerItems = d == null ? void 0 : d.stickyHeaderItems, this.sticky.footerItems = d == null ? void 0 : d.stickyFooterItems;
404
+ }
339
405
  },
340
406
  rowClick(e, t) {
341
407
  e.target.type !== "checkbox" && this.$emit("rowclick", {
@@ -349,29 +415,29 @@ const rs = /* @__PURE__ */ $t({
349
415
  ...this.getArguments(e)
350
416
  });
351
417
  },
352
- loopGroupedItems(e, t, i = 0, s = null) {
353
- return e.forEach((l) => {
354
- !s && t(l, i) && (s = l), l.items && l.items.length && !s && (s = this.loopGroupedItems(l.items, t, i + 1, s));
355
- }), s;
418
+ loopGroupedItems(e, t, s = 0, i = null) {
419
+ return e.forEach((o) => {
420
+ !i && t(o, s) && (i = o), o.items && o.items.length && !i && (i = this.loopGroupedItems(o.items, t, s + 1, i));
421
+ }), i;
356
422
  },
357
423
  updateGroupCollapsed(e) {
358
- let t = this.computedCollapsed, i = t[e.level];
359
- const s = this.$props.uniqueField, l = function(h, c) {
360
- return h.value === e.dataItem.value && c === e.level;
361
- }, a = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, l, 0, null) : e.dataItem, o = it(a || e.dataItem, s);
424
+ let t = this.computedCollapsed, s = t[e.level];
425
+ const i = this.$props.uniqueField, o = function(d, h) {
426
+ return d.value === e.dataItem.value && h === e.level;
427
+ }, r = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, o, 0, null) : e.dataItem, l = ss(r || e.dataItem, i);
362
428
  if (e.value) {
363
- if (i && i.length) {
364
- const h = i.indexOf(o);
365
- h > -1 && i.splice(h, 1);
429
+ if (s && s.length) {
430
+ const d = s.indexOf(l);
431
+ d > -1 && s.splice(d, 1);
366
432
  }
367
433
  } else
368
- i ? i.includes(o) || i.push(o) : i = [o];
434
+ s ? s.includes(l) || s.push(l) : s = [l];
369
435
  return t;
370
436
  },
371
437
  itemChange(e) {
372
- var s;
373
- const t = M.call(this, "itemchange"), i = (s = this.gridContext.group) == null ? void 0 : s.value;
374
- if (e.field === this.$props.expandField || (i || this.$props.detail) && e.field === void 0) {
438
+ var i;
439
+ const t = M.call(this, "itemchange"), s = (i = this.gridContext.group) == null ? void 0 : i.value;
440
+ if (e.field === this.$props.expandField || (s || this.$props.detail) && e.field === void 0) {
375
441
  M.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
376
442
  ...this.getArguments(e.event),
377
443
  collapsedGroups: this.updateGroupCollapsed(e),
@@ -420,17 +486,17 @@ const rs = /* @__PURE__ */ $t({
420
486
  var t;
421
487
  if (this.computedSelectable.enabled) {
422
488
  const {
423
- event: i,
424
- dataItem: s,
425
- dataIndex: l,
426
- columnIndex: a
427
- } = e, o = {
428
- ...this.getArguments(i),
429
- dataItem: s,
430
- startColIndex: a,
431
- endColIndex: a,
432
- startRowIndex: l,
433
- endRowIndex: l,
489
+ event: s,
490
+ dataItem: i,
491
+ dataIndex: o,
492
+ columnIndex: r
493
+ } = e, l = {
494
+ ...this.getArguments(s),
495
+ dataItem: i,
496
+ startColIndex: r,
497
+ endColIndex: r,
498
+ startRowIndex: o,
499
+ endRowIndex: o,
434
500
  dataItems: this.getLeafDataItems(),
435
501
  altKey: !1,
436
502
  ctrlKey: !1,
@@ -443,9 +509,9 @@ const rs = /* @__PURE__ */ $t({
443
509
  selectedField: this.$props.selectedField || ""
444
510
  };
445
511
  this.gridContext.selectionchange({
446
- ...o,
447
- select: this.$props.dataItemKey ? Je({
448
- event: o,
512
+ ...l,
513
+ select: this.$props.dataItemKey ? We({
514
+ event: l,
449
515
  selectedState: (t = this.$props.select) != null ? t : {},
450
516
  dataItemKey: this.$props.dataItemKey
451
517
  }) : {}
@@ -453,36 +519,36 @@ const rs = /* @__PURE__ */ $t({
453
519
  }
454
520
  },
455
521
  onKeyboardSelectionChangeHandler(e) {
456
- var m, u;
522
+ var g, u;
457
523
  if (!this.computedSelectable.enabled || !this.$props.dataItemKey)
458
524
  return;
459
- const t = (m = this.gridContext.select) == null ? void 0 : m.value, i = {
525
+ const t = (g = this.gridContext.select) == null ? void 0 : g.value, s = {
460
526
  dataItems: this.getLeafDataItems(),
461
527
  mode: this.computedSelectable.mode,
462
528
  cell: this.computedSelectable.cell,
463
529
  componentId: this.$props.id,
464
530
  selectedField: "",
465
531
  ...this.getArguments(e)
466
- }, s = Mt({
467
- event: i,
532
+ }, i = Tt({
533
+ event: s,
468
534
  selectedState: t != null ? t : {},
469
535
  dataItemKey: this.$props.dataItemKey
470
536
  });
471
- if (s === t)
537
+ if (i === t)
472
538
  return;
473
- const l = e.target, a = Qe(l, "TD"), o = Qe(l, "TR"), h = Kt(a), c = At(o);
474
- if (h !== void 0 && c !== void 0) {
475
- const f = (u = pi(this.$props.dataItems)) == null ? void 0 : u[c];
539
+ const o = e.target, r = Be(o, "TD"), l = Be(o, "TR"), d = zt(r), h = Et(l);
540
+ if (d !== void 0 && h !== void 0) {
541
+ const R = (u = ts(this.$props.dataItems)) == null ? void 0 : u[h];
476
542
  this.gridContext.selectionchange({
477
- ...i,
478
- select: s,
479
- dataItem: f,
480
- startRowIndex: c,
481
- startColIndex: h,
482
- startDataItem: f,
483
- endDataItem: f,
484
- endRowIndex: c,
485
- endColIndex: h,
543
+ ...s,
544
+ select: i,
545
+ dataItem: R,
546
+ startRowIndex: h,
547
+ startColIndex: d,
548
+ startDataItem: R,
549
+ endDataItem: R,
550
+ endRowIndex: h,
551
+ endColIndex: d,
486
552
  ctrlKey: e.ctrlKey,
487
553
  altKey: e.altKey,
488
554
  metaKey: e.metaKey,
@@ -495,7 +561,7 @@ const rs = /* @__PURE__ */ $t({
495
561
  if (this.computedSelectable.enabled) {
496
562
  const t = this.getLeafDataItems();
497
563
  this.gridContext.headerselectionchange({
498
- select: e.event.target.checked ? t.reduce((i, s) => (this.$props.dataItemKey && E(this.$props.dataItemKey)(s) !== void 0 && (i[E(this.$props.dataItemKey)(s)] = !0), i), {}) : {},
564
+ select: e.event.target.checked ? t.reduce((s, i) => (this.$props.dataItemKey && P(this.$props.dataItemKey)(i) !== void 0 && (s[P(this.$props.dataItemKey)(i)] = !0), s), {}) : {},
499
565
  field: e.field,
500
566
  event: e.event,
501
567
  target: this,
@@ -506,24 +572,24 @@ const rs = /* @__PURE__ */ $t({
506
572
  selectionRelease(e) {
507
573
  var t;
508
574
  if (this.computedSelectable.enabled) {
509
- const i = this.getLeafDataItems(), s = i[e.startRowIndex], l = i[e.endRowIndex], a = {
575
+ const s = this.getLeafDataItems(), i = s[e.startRowIndex], o = s[e.endRowIndex], r = {
510
576
  event: void 0,
511
577
  target: this,
512
578
  selectedField: "",
513
579
  componentId: this.$props.id || this._gridId,
514
- dataItems: i,
580
+ dataItems: s,
515
581
  dataItem: null,
516
- startDataItem: s,
517
- endDataItem: l,
582
+ startDataItem: i,
583
+ endDataItem: o,
518
584
  ...e
519
- }, o = Je({
520
- event: a,
585
+ }, l = We({
586
+ event: r,
521
587
  selectedState: (t = this.$props.select) != null ? t : {},
522
588
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
523
589
  // it does work correctly even without it
524
590
  dataItemKey: this.$props.dataItemKey
525
591
  });
526
- this.raiseSelectionEvent(a, o);
592
+ this.raiseSelectionEvent(r, l);
527
593
  }
528
594
  },
529
595
  clearSelection(e) {
@@ -536,18 +602,18 @@ const rs = /* @__PURE__ */ $t({
536
602
  });
537
603
  },
538
604
  moveToNextPage(e) {
539
- var l, a, o, h;
540
- const t = (o = (a = (l = this.gridContext.take) == null ? void 0 : l.value) != null ? a : this.$props.pageSize) != null ? o : 0, i = (((h = this.gridContext.skip) == null ? void 0 : h.value) || 0) + t, s = this.getTotal();
541
- i < s && this.pageChangeHandler({
542
- skip: i,
605
+ var o, r, l, d;
606
+ const t = (l = (r = (o = this.gridContext.take) == null ? void 0 : o.value) != null ? r : this.$props.pageSize) != null ? l : 0, s = (((d = this.gridContext.skip) == null ? void 0 : d.value) || 0) + t, i = this.getTotal();
607
+ s < i && this.pageChangeHandler({
608
+ skip: s,
543
609
  take: t
544
610
  }, e);
545
611
  },
546
612
  moveToPrevPage(e) {
547
- var s, l, a, o;
548
- const t = (a = (l = (s = this.gridContext.take) == null ? void 0 : s.value) != null ? l : this.$props.pageSize) != null ? a : 0, i = (((o = this.gridContext.skip) == null ? void 0 : o.value) || 0) - t;
549
- i >= 0 && this.pageChangeHandler({
550
- skip: i,
613
+ var i, o, r, l;
614
+ const t = (r = (o = (i = this.gridContext.take) == null ? void 0 : i.value) != null ? o : this.$props.pageSize) != null ? r : 0, s = (((l = this.gridContext.skip) == null ? void 0 : l.value) || 0) - t;
615
+ s >= 0 && this.pageChangeHandler({
616
+ skip: s,
551
617
  take: t
552
618
  }, e);
553
619
  },
@@ -584,141 +650,142 @@ const rs = /* @__PURE__ */ $t({
584
650
  }, t);
585
651
  },
586
652
  handleDetailExpandAction(e, t) {
587
- var i;
653
+ var s;
588
654
  if (this.detailExpandable.enabled) {
589
- const s = (i = this.gridContext.detailExpand) == null ? void 0 : i.value, l = Gt(s != null ? s : {}, e);
655
+ const i = (s = this.gridContext.detailExpand) == null ? void 0 : s.value, o = Ht(i != null ? i : {}, e);
590
656
  this.gridContext.detailexpandchange({
591
657
  ...this.getArguments(t),
592
- detailExpand: l
658
+ detailExpand: o
593
659
  });
594
660
  }
595
661
  },
596
662
  handleGroupExpandAction(e, t) {
597
- var i;
663
+ var s;
598
664
  if (this.groupExpandable.enabled) {
599
- const s = (i = this.gridContext.groupExpand) == null ? void 0 : i.value, l = Ft(s != null ? s : [], e, this.groupExpandable);
665
+ const i = (s = this.gridContext.groupExpand) == null ? void 0 : s.value, o = kt(i != null ? i : [], e, this.groupExpandable);
600
666
  this.$props.expandField || this.gridContext.groupexpandchange({
601
667
  ...this.getArguments(t),
602
- groupExpand: l
668
+ groupExpand: o
603
669
  });
604
670
  }
671
+ this.scrollToStickyGroup(e.group);
605
672
  },
606
- raiseDataEvent(e, t, i, s) {
673
+ raiseDataEvent(e, t, s, i) {
607
674
  if (this.resetVirtualSkip(), this.$props.autoProcessData)
608
675
  this.gridContext[e]({
609
- ...this.getArguments(s),
676
+ ...this.getArguments(i),
610
677
  ...t
611
678
  });
612
679
  else if (M.call(this, e))
613
680
  this.$emit(e, {
614
- ...this.getArguments(s),
681
+ ...this.getArguments(i),
615
682
  ...t
616
683
  });
617
684
  else if (M.call(this, "datastatechange")) {
618
- const l = {
685
+ const o = {
619
686
  ...this.getDataState(),
620
- ...i
687
+ ...s
621
688
  };
622
689
  this.gridContext.datastatechange({
623
- ...this.getArguments(s),
624
- data: l,
625
- dataState: l
690
+ ...this.getArguments(i),
691
+ data: o,
692
+ dataState: o
626
693
  });
627
694
  }
628
695
  },
629
- columnReorder(e, t, i) {
630
- const s = this.columnsRef[e], l = et(this.currentColumnsState), a = s.depth, o = (u) => {
696
+ columnReorder(e, t, s) {
697
+ const i = this.columnsRef[e], o = Je(this.currentColumnsState), r = i.depth, l = (u) => {
631
698
  do
632
699
  u++;
633
- while (u < this.columnsRef.length && this.columnsRef[u].depth > a);
700
+ while (u < this.columnsRef.length && this.columnsRef[u].depth > r);
634
701
  return u;
635
- }, h = this.columnsRef.splice(e, o(e) - e);
636
- this.columnsRef.splice(e < t ? o(t - h.length) : t, 0, ...h), this.columnsRef.filter((u) => u.declarationIndex >= 0).forEach((u, f) => {
637
- u.orderIndex = f;
638
- const C = l.find((w) => w.id === u.id);
639
- C && (C.orderIndex = f);
702
+ }, d = this.columnsRef.splice(e, l(e) - e);
703
+ this.columnsRef.splice(e < t ? l(t - d.length) : t, 0, ...d), this.columnsRef.filter((u) => u.declarationIndex >= 0).forEach((u, R) => {
704
+ u.orderIndex = R;
705
+ const C = o.find((S) => S.id === u.id);
706
+ C && (C.orderIndex = R);
640
707
  });
641
- const c = this.columnsRef[e].locked && this.columnsRef[t].locked;
642
- Pt(this._columnsMap, this.columnsRef, c || this.shouldUpdateLeftRightRef), Lt(this._columnsMap, this.columnsRef, c || this.shouldUpdateLeftRightRef), this.resizedRef && (this.shouldUpdateLeftRightRef = !1, this.resizedRef = !1);
643
- const m = this.getColumns();
708
+ const h = this.columnsRef[e].locked && this.columnsRef[t].locked;
709
+ St(this._columnsMap, this.columnsRef, h || this.shouldUpdateLeftRightRef), yt(this._columnsMap, this.columnsRef, h || this.shouldUpdateLeftRightRef), this.resizedRef && (this.shouldUpdateLeftRightRef = !1, this.resizedRef = !1);
710
+ const g = this.getColumns();
644
711
  this.$emit("columnreorder", {
645
712
  target: this,
646
- columns: m,
647
- event: i,
713
+ columns: g,
714
+ event: s,
648
715
  prev: e,
649
716
  next: t
650
717
  }), this.gridContext.columnsstatechange({
651
718
  columnsState: this.currentColumnsState
652
719
  });
653
720
  },
654
- groupReorder(e, t, i) {
655
- var l;
656
- const s = (l = this.gridContext.group) == null ? void 0 : l.value;
657
- s !== void 0 && (s.splice(t, 0, ...s.splice(e, 1)), this.groupChangeHandler(s, i));
721
+ groupReorder(e, t, s) {
722
+ var o;
723
+ const i = (o = this.gridContext.group) == null ? void 0 : o.value;
724
+ i !== void 0 && (i.splice(t, 0, ...i.splice(e, 1)), this.groupChangeHandler(i, s));
658
725
  },
659
- columnToGroup(e, t, i) {
660
- var a;
661
- const s = this.columnsRef[e].field;
662
- if (!s)
726
+ columnToGroup(e, t, s) {
727
+ var r;
728
+ const i = this.columnsRef[e].field;
729
+ if (!i)
663
730
  return;
664
- const l = (((a = this.gridContext.group) == null ? void 0 : a.value) || []).slice();
665
- l.splice(t, 0, {
666
- field: s
667
- }), this.groupChangeHandler(l, i);
731
+ const o = (((r = this.gridContext.group) == null ? void 0 : r.value) || []).slice();
732
+ o.splice(t, 0, {
733
+ field: i
734
+ }), this.groupChangeHandler(o, s);
668
735
  },
669
736
  resetTableWidth() {
670
- var s;
737
+ var i;
671
738
  let e = 0;
672
739
  if (!this.columnResize.colGroupMain)
673
740
  return;
674
- const t = (s = this.columnResize.colGroupMain) == null ? void 0 : s.children;
675
- for (let l = 0; l < t.length; l++) {
676
- const a = t[l].width;
677
- if (!a)
741
+ const t = (i = this.columnResize.colGroupMain) == null ? void 0 : i.children;
742
+ for (let o = 0; o < t.length; o++) {
743
+ const r = t[o].width;
744
+ if (!r)
678
745
  return;
679
- e += parseFloat(a.toString());
746
+ e += parseFloat(r.toString());
680
747
  }
681
- e = Math.round(e), this._header && this._header.setWidth(e), this._footer && this._footer.setWidth(e);
682
- const i = Oe(this, "table");
683
- i && e && (i.style.width = e + "px");
748
+ 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);
749
+ const s = Ke(this, "table");
750
+ s && e && (s.style.width = e + "px");
684
751
  },
685
- onResize(e, t, i, s, l, a, o) {
752
+ onResize(e, t, s, i, o, r, l) {
686
753
  this.resetTableWidth(), this.shouldUpdateLeftRightRef = !0, this.resizedRef = !0, this.$emit("columnresize", {
687
754
  columns: this.getColumns(),
688
755
  index: e,
689
- targetColumnId: o,
690
- event: s,
756
+ targetColumnId: l,
757
+ event: i,
691
758
  newWidth: t,
692
- oldWidth: i,
693
- end: l,
759
+ oldWidth: s,
760
+ end: o,
694
761
  target: this
695
- }), l && this.gridContext.columnsstatechange({
696
- columnsState: a
762
+ }), o && this.gridContext.columnsstatechange({
763
+ columnsState: r
697
764
  });
698
765
  },
699
766
  initColumnsState(e, t) {
700
- const i = (s) => {
701
- var a;
702
- const l = t.find((o) => o.id === s.id);
703
- if (l) {
704
- const o = {
705
- ...l
767
+ const s = (i) => {
768
+ var r;
769
+ const o = t.find((l) => l.id === i.id);
770
+ if (o) {
771
+ const l = {
772
+ ...o
706
773
  };
707
- return o.children = (a = s.children) == null ? void 0 : a.map(i), o;
774
+ return l.children = (r = i.children) == null ? void 0 : r.map(s), l;
708
775
  }
709
- return s;
776
+ return i;
710
777
  };
711
- this.currentColumnsState = e.filter((s) => s.parentIndex === -1).map(i);
778
+ this.currentColumnsState = e.filter((i) => i.parentIndex === -1).map(s);
712
779
  },
713
780
  configureColumns(e, t) {
714
- e.filter((a) => a.columnType === "checkbox").forEach((a) => {
715
- a.width = a.width || "50px", a.internalCell = T(Ye), a.internalHeaderCell = T(st), a._type = "edit", a.columnMenu = !1;
716
- }), this.$props.selectedField && this.columnsRef.filter((a) => a.field === this.$props.selectedField).forEach((a) => {
717
- a.width = a.width || "50px", a.internalCell = T(Ye), a.internalHeaderCell = T(st), a.columnMenu = !1;
781
+ e.filter((r) => r.columnType === "checkbox").forEach((r) => {
782
+ r.width = r.width || "50px", r.internalCell = x(je), r.internalHeaderCell = x(Xe), r._type = "edit", r.columnMenu = !1;
783
+ }), this.$props.selectedField && this.columnsRef.filter((r) => r.field === this.$props.selectedField).forEach((r) => {
784
+ r.width = r.width || "50px", r.internalCell = x(je), r.internalHeaderCell = x(Xe), r.columnMenu = !1;
718
785
  });
719
- const i = et(this.currentColumnsState);
720
- this.initColumnsState(e, i);
721
- const s = {
786
+ const s = Je(this.currentColumnsState);
787
+ this.initColumnsState(e, s);
788
+ const i = {
722
789
  id: "",
723
790
  resizable: !0,
724
791
  width: "32px",
@@ -738,88 +805,88 @@ const rs = /* @__PURE__ */ $t({
738
805
  ariaColumnIndex: 0,
739
806
  isAccessible: !0
740
807
  };
741
- let l = 0;
808
+ let o = 0;
742
809
  if (this.detailExpandable.enabled && this.$props.detail && !this.$props.expandField) {
743
- const a = {
744
- ...s,
810
+ const r = {
811
+ ...i,
745
812
  _type: "expand",
746
- id: D.generateNavigatableId(`${l++}`, "expand", "column"),
747
- defaultCell: T(ie),
748
- internalCell: T(ie),
813
+ id: H.generateNavigatableId(`${o++}`, "expand", "column"),
814
+ defaultCell: x(ae),
815
+ internalCell: x(ae),
749
816
  field: this.detailExpandable.column,
750
817
  headerClassName: this.hierarchClass
751
818
  };
752
- e.unshift(a), this.currentColumnsState.unshift(i.find((o) => o.id === a.id) || a);
819
+ e.unshift(r), this.currentColumnsState.unshift(s.find((l) => l.id === r.id) || r);
753
820
  }
754
821
  this.$props.expandField && M.call(this, "expandchange") && this.$props.detail && (e.unshift({
755
- ...s,
756
- internalCell: T(ie),
822
+ ...i,
823
+ internalCell: x(ae),
757
824
  field: this.$props.expandField,
758
825
  headerClassName: "k-hierarchy-cell k-header",
759
- id: D.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
826
+ id: H.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
760
827
  ...this.expandColumn
761
- }), l++);
762
- for (let a = 0; a < t; a++) {
763
- const o = {
764
- ...s,
828
+ }), o++);
829
+ for (let r = 0; r < t; r++) {
830
+ const l = {
831
+ ...i,
765
832
  isAccessible: !1,
766
- defaultCell: T(se),
767
- internalCell: T(se),
768
- id: D.generateNavigatableId(`${l++}`, "group", "column"),
833
+ defaultCell: x(ne),
834
+ internalCell: x(ne),
835
+ id: H.generateNavigatableId(`${o++}`, "group", "column"),
769
836
  field: "value",
770
837
  locked: this.$props.lockGroups,
771
838
  columnMenu: !1
772
839
  };
773
- e.unshift(o), this.currentColumnsState.unshift(i.find((h) => h.id === o.id) || o);
840
+ e.unshift(l), this.currentColumnsState.unshift(s.find((d) => d.id === l.id) || l);
774
841
  }
775
- e.slice(l).forEach((a) => {
776
- a.parentIndex >= 0 && (a.parentIndex += l), a.rowSpannable = a.rowSpannable !== void 0 ? tt(a.rowSpannable) : this.computedRowSpannable;
842
+ e.slice(o).forEach((r) => {
843
+ r.parentIndex >= 0 && (r.parentIndex += o), r.rowSpannable = r.rowSpannable !== void 0 ? Qe(r.rowSpannable) : this.computedRowSpannable;
777
844
  });
778
845
  },
779
846
  initColumns(e, t) {
780
- var a;
847
+ var r;
781
848
  this.columnsRef = this.readColumnElements();
782
- const i = (a = this.gridContext.group) == null ? void 0 : a.value;
783
- this.columnsRef.filter((o) => !o.hidden).length === 0 && (this.columnsRef = di(e, i, {
849
+ const s = (r = this.gridContext.group) == null ? void 0 : r.value;
850
+ this.columnsRef.filter((l) => !l.hidden).length === 0 && (this.columnsRef = Zt(e, s, {
784
851
  column: this.$props.expandField ? this.$props.expandField : this.groupExpandable.column
785
852
  }, {
786
853
  prevId: 0,
787
854
  idPrefix: this.idPrefix
788
855
  })), this.configureColumns(this.columnsRef, t);
789
- const [s, l] = this.filterColumns(this.columnsRef);
790
- this.columnsRef = s, this.hiddenColumnsRef = l, this._columnsMap = hi(this.columnsRef, !0);
856
+ const [i, o] = this.filterColumns(this.columnsRef);
857
+ this.columnsRef = i, this.hiddenColumnsRef = o, this._columnsMap = es(this.columnsRef, !0);
791
858
  },
792
859
  resolveTitle(e) {
793
- const t = this.findColumnByField(e), i = t && (t.title || t.field);
794
- return i === void 0 ? e : i;
860
+ const t = this.findColumnByField(e), s = t && (t.title || t.field);
861
+ return s === void 0 ? e : s;
795
862
  },
796
863
  findColumnByField(e) {
797
864
  let t;
798
- return this.$props.columns.forEach((i) => {
799
- const s = this.searchColumn(i, e);
800
- s && (t = s);
865
+ return this.$props.columns.forEach((s) => {
866
+ const i = this.searchColumn(s, e);
867
+ i && (t = i);
801
868
  }), t;
802
869
  },
803
870
  searchColumn(e, t) {
804
871
  if (e.field === t)
805
872
  return e;
806
873
  if (e.children) {
807
- let i, s = null;
808
- for (i = 0; s == null && i < e.children.length; i++)
809
- s = this.searchColumn(e.children[i], t);
810
- return s;
874
+ let s, i = null;
875
+ for (s = 0; i == null && s < e.children.length; s++)
876
+ i = this.searchColumn(e.children[s], t);
877
+ return i;
811
878
  }
812
879
  return null;
813
880
  },
814
881
  getDataState() {
815
- var a, o, h, c, m;
816
- const e = (a = this.gridContext.sort) == null ? void 0 : a.value, t = (o = this.gridContext.filter) == null ? void 0 : o.value, i = (h = this.gridContext.skip) == null ? void 0 : h.value, s = (c = this.gridContext.take) == null ? void 0 : c.value, l = (m = this.gridContext.group) == null ? void 0 : m.value;
882
+ var r, l, d, h, g;
883
+ const e = (r = this.gridContext.sort) == null ? void 0 : r.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, o = (g = this.gridContext.group) == null ? void 0 : g.value;
817
884
  return {
818
885
  filter: t,
819
886
  sort: e,
820
- skip: i,
821
- take: s !== void 0 ? s : this.$props.pageSize,
822
- group: l
887
+ skip: s,
888
+ take: i !== void 0 ? i : this.$props.pageSize,
889
+ group: o
823
890
  };
824
891
  },
825
892
  getArguments(e) {
@@ -829,83 +896,83 @@ const rs = /* @__PURE__ */ $t({
829
896
  };
830
897
  },
831
898
  getLeafDataItems() {
832
- return this.currentData.filter((e) => e.rowType === "data").map((e) => e.dataItem);
899
+ return this.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem);
833
900
  },
834
901
  totalGroupedRows(e) {
835
902
  let t = 0;
836
903
  return e && (t = this.addSubItems(e, t)), t;
837
904
  },
838
905
  addSubItems(e, t) {
839
- return e.forEach((i) => {
840
- t++, i.expanded !== !1 && i.items && (t = this.addSubItems(i.items, t)), this.group && this.group.length && (this.$props.groupable.footer === "always" || i.expanded !== !1 && i.items && this.$props.groupable.footer === "visible") && t++;
906
+ return e.forEach((s) => {
907
+ t++, s.expanded !== !1 && s.items && (t = this.addSubItems(s.items, t)), this.group && this.group.length && (this.$props.groupable.footer === "always" || s.expanded !== !1 && s.items && this.$props.groupable.footer === "visible") && t++;
841
908
  }), t;
842
909
  },
843
910
  searchChange(e) {
844
- const t = this.$props.searchFields || this.columnsRef.map((l) => l.field) || [], i = e.event.target.value, s = {
911
+ const t = this.$props.searchFields || this.columnsRef.map((o) => o.field) || [], s = e.event.target.value, i = {
845
912
  logic: "or",
846
- filters: t.filter((l) => l !== void 0).map((l) => {
847
- var a;
848
- return typeof l == "string" ? {
849
- field: l,
850
- value: i,
913
+ filters: t.filter((o) => o !== void 0).map((o) => {
914
+ var r;
915
+ return typeof o == "string" ? {
916
+ field: o,
917
+ value: s,
851
918
  operator: "contains"
852
919
  } : {
853
- value: i,
854
- operator: (a = l.operator) != null ? a : "contains",
855
- field: l.field,
856
- ignoreCase: l.ignoreCase
920
+ value: s,
921
+ operator: (r = o.operator) != null ? r : "contains",
922
+ field: o.field,
923
+ ignoreCase: o.ignoreCase
857
924
  };
858
925
  })
859
926
  };
860
927
  this.raiseDataEvent("searchchange", {
861
- search: s
928
+ search: i
862
929
  }, {
863
930
  skip: 0
864
931
  }, e);
865
932
  },
866
933
  getCellsToRender(e, t) {
867
- var a;
868
- const i = [];
869
- let s = null, l = 0;
870
- if (t.forEach((o, h) => {
871
- const c = parseFloat((o.width || "").toString()) || 10;
872
- if (l) {
873
- l--, s && (s.width += c);
934
+ var r;
935
+ const s = [];
936
+ let i = null, o = 0;
937
+ if (t.forEach((l, d) => {
938
+ const h = parseFloat((l.width || "").toString()) || 10;
939
+ if (o) {
940
+ o--, i && (i.width += h);
874
941
  return;
875
942
  }
876
- const m = Math.min(ni(o, e), t.length - h);
877
- l = m - 1, s = {
878
- width: c,
879
- colSpan: m,
880
- columnIndex: h
881
- }, i.push(s);
943
+ const g = Math.min(Yt(l, e), t.length - d);
944
+ o = g - 1, i = {
945
+ width: h,
946
+ colSpan: g,
947
+ columnIndex: d
948
+ }, s.push(i);
882
949
  }), this.$props.columnVirtualization) {
883
- const o = this.scrollLeftRef || 0, h = this.tableWidth || parseFloat((((a = this.$attrs.style) == null ? void 0 : a.width) || "").toString());
884
- return $i({
885
- cellModels: i,
950
+ const l = this.scrollLeftRef || 0, d = this.tableWidth || parseFloat((((r = this.$attrs.style) == null ? void 0 : r.width) || "").toString());
951
+ return hs({
952
+ cellModels: s,
886
953
  columns: t,
887
- tableViewPortWidth: h,
888
- scrollLeft: o
954
+ tableViewPortWidth: d,
955
+ scrollLeft: l
889
956
  });
890
957
  }
891
- return i;
958
+ return s;
892
959
  },
893
960
  calcVirtualPageSize() {
894
961
  const {
895
962
  pageable: e,
896
963
  take: t,
897
- pageSize: i
964
+ pageSize: s
898
965
  } = this.$props;
899
966
  if (!this.isVirtualScroll)
900
967
  return 0;
901
968
  if (!e) {
902
969
  if (t)
903
970
  return t;
904
- if (i)
905
- return i;
971
+ if (s)
972
+ return s;
906
973
  }
907
- const s = this.$props.rowHeight || this._minRowHeightRef, l = this._containerHeightRef;
908
- return l && s ? Math.ceil(l / s * 1.5) : 0;
974
+ const i = this.$props.rowHeight || this._minRowHeightRef, o = this._containerHeightRef;
975
+ return o && i ? Math.ceil(o / i * 1.5) : 0;
909
976
  }
910
977
  },
911
978
  provide() {
@@ -915,123 +982,157 @@ const rs = /* @__PURE__ */ $t({
915
982
  searchChange: this.searchChange,
916
983
  selectionRelease: this.selectionRelease,
917
984
  dispatchGroupExpand: this.handleGroupExpandAction,
918
- dispatchDetailExpand: this.handleDetailExpandAction
919
- }
985
+ dispatchDetailExpand: this.handleDetailExpandAction,
986
+ scrollToStickyGroup: this.scrollToStickyGroup
987
+ },
988
+ sticky: this.sticky
920
989
  };
921
990
  },
922
991
  setup(e) {
923
- const t = S(null), i = S(null), s = S(null), l = S(null), a = S(null), o = S(null), h = S(null), c = S(null), m = S(null), u = S(null), f = S(!0), C = S(!1), w = xt(Ri, {});
992
+ const t = c(null), s = c(null), i = c(null), o = c(null), r = c(null), l = c(null), d = c(null), h = c([]), g = c([]), u = c(null), R = c(null), C = c(null), S = c(null), y = c(!0), k = c(!1), $ = new Ut(), b = c(0), G = ut(ds, {}), F = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, U = typeof e.groupable == "object" && !!e.groupable.stickyFooters, K = c([]), j = Pe(() => {
993
+ var D, L;
994
+ return !!((L = (D = G.group) == null ? void 0 : D.value) != null && L.length);
995
+ }), T = c(null), q = c(void 0), A = c({
996
+ headerItems: [],
997
+ footerItems: []
998
+ }), {
999
+ scrollToStickyGroup: z,
1000
+ update: I
1001
+ } = cs({
1002
+ enabled: F,
1003
+ enabledFooters: U,
1004
+ flatData: K,
1005
+ containerRef: u,
1006
+ stickyHeaderRef: R,
1007
+ stickyFooterRef: C,
1008
+ tableBodyRef: S,
1009
+ rowHeight: e.rowHeight,
1010
+ isGrouped: j,
1011
+ virtualSkipRef: b,
1012
+ rowHeightServiceRef: Pe(() => $ == null ? void 0 : $.rowHeightService)
1013
+ });
924
1014
  return {
1015
+ rowIndexRef: q,
1016
+ observerRef: T,
1017
+ dataRef: K,
925
1018
  groupPanelDivRef: t,
926
- dropElementClueRef: i,
927
- dragElementClueRef: s,
928
- headerRef: l,
929
- footerRef: a,
930
- gridNavRef: o,
931
- colGroupRef: h,
932
- scrollContainerRef: c,
933
- scrollTableRef: m,
934
- scrollTableBodyRef: u,
935
- gridContext: w,
936
- shouldUpdateLeftRightRef: f,
937
- resizedRef: C,
938
- currentColumnsState: e.columnsState
1019
+ dropElementClueRef: s,
1020
+ dragElementClueRef: i,
1021
+ headerRef: o,
1022
+ footerRef: r,
1023
+ gridNavRef: l,
1024
+ colGroupRef: d,
1025
+ scrollContainerRef: u,
1026
+ tableBodyRef: S,
1027
+ gridContext: G,
1028
+ shouldUpdateLeftRightRef: y,
1029
+ resizedRef: k,
1030
+ currentColumnsState: e.columnsState,
1031
+ vsRef: $,
1032
+ virtualSkipRef: b,
1033
+ stickyHeaderItems: h,
1034
+ stickyHeaderRef: R,
1035
+ stickyFooterItems: g,
1036
+ stickyFooterRef: C,
1037
+ sticky: A,
1038
+ scrollToStickyGroup: z,
1039
+ updateStickyGroups: I
939
1040
  };
940
1041
  },
941
1042
  render() {
942
- var Ce, be, Re, $e, Ie, xe, ve, Se, ye, we, He, ke, Te, Ee, De, ze, _e;
943
- const e = (Ce = this.gridContext.sort) == null ? void 0 : Ce.value, t = (be = this.gridContext.filter) == null ? void 0 : be.value, i = (Re = this.gridContext.search) == null ? void 0 : Re.value, s = ($e = this.gridContext.select) == null ? void 0 : $e.value, l = (Ie = this.gridContext.skip) == null ? void 0 : Ie.value, a = (xe = this.gridContext.take) == null ? void 0 : xe.value, o = (ve = this.gridContext.group) == null ? void 0 : ve.value, h = (Se = this.gridContext.groupExpand) == null ? void 0 : Se.value, c = (ye = this.gridContext.detailExpand) == null ? void 0 : ye.value, m = !!(o != null && o.length);
944
- let u;
945
- this.currentColumnsState = (we = this.gridContext.columnsState) == null ? void 0 : we.value;
946
- const f = this.$props.autoProcessData === !0 ? {
1043
+ var Re, Ce, be, $e, Ie, ve, xe, we, Se, ye, ke, He, Te, ze, Ee, Ge, Fe, De;
1044
+ const e = (Re = this.gridContext.sort) == null ? void 0 : Re.value, t = (Ce = this.gridContext.filter) == null ? void 0 : Ce.value, s = (be = this.gridContext.search) == null ? void 0 : be.value, i = ($e = this.gridContext.select) == null ? void 0 : $e.value, o = (Ie = this.gridContext.skip) == null ? void 0 : Ie.value, r = (ve = this.gridContext.take) == null ? void 0 : ve.value, l = (xe = this.gridContext.group) == null ? void 0 : xe.value, d = (we = this.gridContext.groupExpand) == null ? void 0 : we.value, h = (Se = this.gridContext.detailExpand) == null ? void 0 : Se.value, g = (l == null ? void 0 : l.length) || 0, u = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyHeaders, R = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyFooters, C = !!(l != null && l.length);
1045
+ let S;
1046
+ this.currentColumnsState = (ye = this.gridContext.columnsState) == null ? void 0 : ye.value;
1047
+ const y = this.$props.autoProcessData === !0 ? {
947
1048
  group: !0,
948
1049
  sort: !0,
949
1050
  filter: !0,
950
1051
  search: !0,
951
1052
  page: !0
952
1053
  } : this.$props.autoProcessData;
953
- let C;
954
- const w = D.getIdPrefix(this.navigation);
955
- let z = [];
956
- Array.isArray(this.$props.dataItems) ? (z = this.$props.dataItems, C = (He = this.$props.total) != null ? He : z.length) : (z = ((ke = oi(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField)) == null ? void 0 : ke.data) || [], C = (De = (Ee = this.$props.total) != null ? Ee : (Te = this.$props.dataItems) == null ? void 0 : Te.total) != null ? De : z.length);
957
- const ae = this.$props.groupable === !0 || N(this.$props.groupable) && this.$props.groupable.enabled !== !1;
958
- this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = ae, this._virtualPageSize = this.calcVirtualPageSize();
959
- const O = z.length === C, ot = N(this.$props.groupable) && this.$props.groupable.footer || "none";
960
- if (this.currentData = [], f) {
961
- const r = f.page && !(this.isVirtualScroll && !this.$props.pageable), {
962
- data: b,
963
- total: y
964
- } = bi(z, {
965
- group: f.group ? o : void 0,
966
- sort: f.sort ? e : void 0,
967
- filter: Dt(f.filter ? t : void 0, f.search ? i : void 0),
968
- ...r ? {
969
- take: this.$props.pageable ? a || 10 : a,
970
- skip: l || 0
1054
+ let k;
1055
+ const $ = H.getIdPrefix(this.navigation);
1056
+ let b = [];
1057
+ Array.isArray(this.$props.dataItems) ? (b = this.$props.dataItems, k = (ke = this.$props.total) != null ? ke : b.length) : (b = ((He = Xt(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField)) == null ? void 0 : He.data) || [], k = (Ee = (ze = this.$props.total) != null ? ze : (Te = this.$props.dataItems) == null ? void 0 : Te.total) != null ? Ee : b.length);
1058
+ const G = this.$props.groupable === !0 || W(this.$props.groupable) && this.$props.groupable.enabled !== !1;
1059
+ this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = G, this._virtualPageSize = this.calcVirtualPageSize();
1060
+ const F = b.length === k, U = W(this.$props.groupable) && this.$props.groupable.footer || "none";
1061
+ if (y) {
1062
+ const a = y.page && !(this.isVirtualScroll && !this.$props.pageable), {
1063
+ data: f,
1064
+ total: v
1065
+ } = ns(b, {
1066
+ group: y.group ? l : void 0,
1067
+ sort: y.sort ? e : void 0,
1068
+ filter: vt(y.filter ? t : void 0, y.search ? s : void 0),
1069
+ ...a ? {
1070
+ take: this.$props.pageable ? r || 10 : r,
1071
+ skip: o || 0
971
1072
  } : {}
972
1073
  });
973
- z = b, C = (ze = this.$props.total) != null ? ze : y;
1074
+ b = f, k = (Ge = this.$props.total) != null ? Ge : v;
974
1075
  }
975
1076
  const {
976
- resolvedGroupsCount: nt,
977
- flattedData: dt
978
- } = this.getFlatData(z, ot, O ? 0 : this.$props.skip || 0, o, c, h, this.$props.dataItemKey);
979
- this.currentData = dt;
980
- const W = this._virtualSkipRef || 0;
981
- if (this._virtualTotal = C, this.isVirtualScroll) {
982
- let r = l || 0;
983
- if ((m || this.$props.pageable) && (r = W, this._virtualTotal = this.currentData.length), O || m || this.$props.pageable)
1077
+ resolvedGroupsCount: K,
1078
+ flattedData: j
1079
+ } = this.getFlatData(b, U, F ? 0 : this.$props.skip || 0, l, h, d, this.$props.dataItemKey);
1080
+ this.dataRef = j;
1081
+ const T = this.virtualSkipRef || 0;
1082
+ if (this._virtualTotal = k, this.isVirtualScroll) {
1083
+ let a = o || 0;
1084
+ if ((C || this.$props.pageable) && (a = T, this._virtualTotal = this.dataRef.length), F || C || this.$props.pageable)
984
1085
  if (this._virtualPageSize === 0) {
985
- const b = Math.min(a || this.$props.pageSize || 20, this.currentData.length);
986
- u = this.currentData.slice(r, r + b);
1086
+ const f = Math.min(r || this.$props.pageSize || 20, this.dataRef.length);
1087
+ S = this.dataRef.slice(a, a + f);
987
1088
  } else
988
- u = this.currentData.slice(r, r + this._virtualPageSize);
1089
+ S = this.dataRef.slice(a, a + this._virtualPageSize);
989
1090
  }
990
1091
  this.initializeVirtualization();
991
- const ht = (_e = this.selectable) != null && _e.drag ? "none" : void 0;
992
- this.initColumns(this.$props.dataItems, nt), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this.columnsRef, this.columnResize.columnsState = vt(this.currentColumnsState || []), this.dragLogic.columns = this.columnsRef;
993
- const re = this.$props.toolbar, K = this.$props.noRecords, H = this.columnsRef.filter((r) => r.children.length === 0), oe = ae && d(Xt, {
994
- ref: (r) => {
995
- this.groupPanelDivRef = r;
1092
+ const q = (Fe = this.selectable) != null && Fe.drag ? "none" : void 0;
1093
+ this.initColumns(this.$props.dataItems, K), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this.columnsRef, this.columnResize.columnsState = ft(this.currentColumnsState || []), this.dragLogic.columns = this.columnsRef;
1094
+ const A = this.$props.toolbar, z = this.$props.noRecords, I = this.columnsRef.filter((a) => a.children.length === 0), D = G && n(Vt, {
1095
+ ref: (a) => {
1096
+ this.groupPanelDivRef = a;
996
1097
  },
997
- group: o || [],
1098
+ group: l || [],
998
1099
  ariaControls: this._gridRoleElementId,
999
1100
  onGroupChange: this.groupChangeHandler,
1000
1101
  onPressHandler: this.dragLogic.pressHandler,
1001
1102
  onDragHandler: this.dragLogic.dragHandler,
1002
1103
  onReleaseHandler: this.dragLogic.releaseHandler,
1003
1104
  resolveTitle: this.resolveTitle
1004
- }, null), ne = (this.dragLogic.reorderable || this.dragLogic.groupable) && te && document && document.body, de = [ne && d(ri, {
1005
- ref: (r) => {
1006
- this.dropElementClueRef = r;
1105
+ }, null), L = (this.dragLogic.reorderable || this.dragLogic.groupable) && B && document && document.body, he = [L && n(Qt, {
1106
+ ref: (a) => {
1107
+ this.dropElementClueRef = a;
1007
1108
  }
1008
- }, null), ne && d(ai, {
1009
- ref: (r) => {
1010
- this.dragElementClueRef = r;
1109
+ }, null), L && n(Jt, {
1110
+ ref: (a) => {
1111
+ this.dragElementClueRef = a;
1011
1112
  }
1012
- }, null)], pt = this.showLicenseWatermark ? d(St, {
1113
+ }, null)], st = this.showLicenseWatermark ? n(gt, {
1013
1114
  message: this.licenseMessage
1014
- }, null) : null, B = this.$attrs.style, ct = B && N(B) && B["width"] || "";
1015
- this.tableWidth = parseFloat(ct.toString());
1016
- const ut = H.findIndex((r) => typeof r.colSpan == "function") > -1;
1017
- let G;
1018
- G = this.getCellsToRender({}, H);
1019
- const he = (this.$props.columnVirtualization ? this.getCellsToRender({}, H).map(({
1020
- columnIndex: r
1021
- }) => H[r]) : H).map(function(r, b) {
1022
- return d("col", {
1023
- key: r.id || `col-${b}`,
1024
- width: r.width !== void 0 ? Math.floor(parseFloat(r.width.toString())) : void 0
1115
+ }, null) : null, J = this.$attrs.style, it = J && W(J) && J["width"] || "";
1116
+ this.tableWidth = parseFloat(it.toString());
1117
+ const ot = I.findIndex((a) => typeof a.colSpan == "function") > -1;
1118
+ let V;
1119
+ V = this.getCellsToRender({}, I);
1120
+ const O = (this.$props.columnVirtualization ? this.getCellsToRender({}, I).map(({
1121
+ columnIndex: a
1122
+ }) => I[a]) : I).map(function(a, f) {
1123
+ return n("col", {
1124
+ key: a.id || `col-${f}`,
1125
+ width: a.width !== void 0 ? Math.floor(parseFloat(a.width.toString())) : void 0
1025
1126
  }, null);
1026
- }, this), pe = d(qt, {
1127
+ }, this), pe = n(Mt, {
1027
1128
  size: this.$props.size,
1028
1129
  columnResize: this.columnResize,
1029
1130
  staticHeaders: this.$props.scrollable !== "none",
1030
- ref: (r) => {
1031
- this.headerRef = r;
1131
+ ref: (a) => {
1132
+ this.headerRef = a;
1032
1133
  },
1033
1134
  onHeaderscroll: this.onHeaderScroll,
1034
- headerRow: d(Jt, {
1135
+ headerRow: n(Kt, {
1035
1136
  grid: this,
1036
1137
  sort: e,
1037
1138
  groupable: this.$props.groupable,
@@ -1040,14 +1141,14 @@ const rs = /* @__PURE__ */ $t({
1040
1141
  onSortChange: this.sortChangeHandler,
1041
1142
  filter: t,
1042
1143
  filterable: this.$props.filterable,
1043
- filterOperators: this.$props.filterOperators || Ze,
1144
+ filterOperators: this.$props.filterOperators || qe,
1044
1145
  onFilterChange: this.filterChangeHandler,
1045
1146
  columnMenu: this.$props.columnMenu,
1046
1147
  columnMenuIcon: this.$props.columnMenuIcon,
1047
1148
  columnMenuAnimate: this.$props.columnMenuAnimate,
1048
1149
  onSelectionchange: this.onHeaderSelectionChangeHandler,
1049
1150
  columns: this.columnsRef,
1050
- cellsToRender: G,
1151
+ cellsToRender: V,
1051
1152
  columnVirtualization: this.$props.columnVirtualization,
1052
1153
  columnsInitial: this.$props.columns,
1053
1154
  columnResize: this.columnResize,
@@ -1058,16 +1159,16 @@ const rs = /* @__PURE__ */ $t({
1058
1159
  cellRender: this.$props.headerCellRender,
1059
1160
  isRtl: this.isRtl,
1060
1161
  isColCountDefined: this.getAriaColCount !== void 0,
1061
- headerSelectionValue: !!(s && this.currentData.filter((r) => r.rowType === "data").every((r) => s && this.$props.dataItemKey && E(this.$props.dataItemKey)(r.dataItem) !== void 0 ? s[E(this.$props.dataItemKey)(r.dataItem)] : void 0)),
1062
- filterRow: this.$props.filterable && d(Qt, {
1162
+ headerSelectionValue: !!(i && this.dataRef.filter((a) => a.rowType === "data").every((a) => i && this.$props.dataItemKey && P(this.$props.dataItemKey)(a.dataItem) !== void 0 ? i[P(this.$props.dataItemKey)(a.dataItem)] : void 0)),
1163
+ filterRow: this.$props.filterable && n(At, {
1063
1164
  grid: this,
1064
1165
  size: this.$props.size,
1065
1166
  columns: this.columnsRef,
1066
1167
  columnsMap: this._columnsMap,
1067
- cellsToRender: G,
1168
+ cellsToRender: V,
1068
1169
  columnVirtualization: this.$props.columnVirtualization,
1069
1170
  filter: t,
1070
- filterOperators: this.$props.filterOperators || Ze,
1171
+ filterOperators: this.$props.filterOperators || qe,
1071
1172
  onFilterchange: this.filterChangeHandler,
1072
1173
  sort: this.$props.sort,
1073
1174
  cellRender: this.$props.filterCellRender,
@@ -1075,286 +1176,185 @@ const rs = /* @__PURE__ */ $t({
1075
1176
  ariaRowIndex: this._columnsMap.length + 1
1076
1177
  }, null) || void 0
1077
1178
  }, null),
1078
- cols: he
1079
- }, null), ce = this.columnsRef.some((r) => !!r.footerCell) ? d(Yt, {
1179
+ cols: O
1180
+ }, null), ce = this.columnsRef.some((a) => {
1181
+ var f;
1182
+ return !!(a.footerCell || (f = a.cells) != null && f.footerCell);
1183
+ }) || (De = this.$props.cells) != null && De.footerCell ? n(Ot, {
1080
1184
  size: this.$props.size,
1081
1185
  columnResize: this.columnResize,
1082
1186
  staticHeaders: this.$props.scrollable !== "none",
1083
- ref: (r) => {
1084
- this.footerRef = r;
1187
+ ref: (a) => {
1188
+ this.footerRef = a;
1085
1189
  },
1086
- row: d(Zt, {
1190
+ row: n(Nt, {
1087
1191
  isRtl: this.isRtl,
1088
1192
  rowIndex: this.getAriaRowCount + 1,
1089
- columns: this.columnsRef
1193
+ columns: this.columnsRef,
1194
+ cells: this.$props.cells
1090
1195
  }, null),
1091
- cols: he
1092
- }, null) : d("span", null, null), ft = function(r, b, y, Pe, k) {
1093
- let p = !1;
1094
- const _ = this.$props.selectedField, L = this.$props.dataItemKey, A = s && L && E(L)(r.dataItem) !== void 0 ? s[E(L)(r.dataItem)] : void 0, x = _ ? je(_, r.dataItem) : A, v = this.$props.highlight && this.$props.dataItemKey && E(this.$props.dataItemKey)(r.dataItem) !== void 0 ? this.$props.highlight[E(this.$props.dataItemKey)(r.dataItem)] : void 0;
1095
- return ut && (G = this.getCellsToRender(r.dataItem, H)), {
1096
- row: G.map(function({
1097
- columnIndex: R,
1098
- colSpan: P
1099
- }) {
1100
- var Ge, Me, Ke, Ae;
1101
- const n = H[R];
1102
- let $;
1103
- if ((Ge = n.rowSpannable) != null && Ge.enabled && r.rowType === "data" && n.field && k) {
1104
- const g = n.field ? (Ke = (Me = n.rowSpannable).valueGetter) == null ? void 0 : Ke.call(Me, r.dataItem, n.field) : null;
1105
- $ = {
1106
- value: g,
1107
- count: 1
1108
- }, k[n.field] && ((Ae = k[n.field]) == null ? void 0 : Ae.value) === g && k[n.field] !== null ? (k[n.field].count++, $.count = null) : k[n.field] = $;
1109
- }
1110
- const Q = `${n.className ? n.className + " " : ""}${n.locked ? "k-grid-content-sticky" : ""}`, X = n.locked && n.left !== void 0 ? this.isRtl ? {
1111
- left: n.right + "px",
1112
- right: n.left + "px"
1113
- } : {
1114
- left: n.left + "px",
1115
- right: n.right + "px"
1116
- } : void 0;
1117
- let Le = !1;
1118
- if (n.editable && this.$props.editField) {
1119
- const g = je(this.$props.editField, r.dataItem);
1120
- (g === !0 || g === n.field) && (p = !0, Le = !0);
1121
- }
1122
- let V;
1123
- n.cell && (V = n.cell);
1124
- const Fe = this.computedCollapsed && this.computedCollapsed[r.level] && this.computedCollapsed[r.level].some((g) => g === it(r.dataItem, this.$props.uniqueField)), Y = n.id ? n.id : R, Z = Fe ? !Fe : r.expanded || r.dataItem.expanded, Rt = n._type === "expand", ee = D.generateNavigatableId(`${b}-${String(R)}`, w, Rt || r.rowType === "groupHeader" || r.rowType === "groupFooter" || n.field === "value" ? "nodata" : "cell");
1125
- return n.internalCell ? d(n.internalCell, {
1126
- key: Y,
1127
- id: ee,
1128
- colSpan: P,
1129
- dataItem: r.dataItem,
1130
- field: n.field || "",
1131
- editor: n.editor,
1132
- format: n.format,
1133
- readFormat: n.readFormat,
1134
- type: n.type,
1135
- columnType: n.columnType,
1136
- className: Q,
1137
- render: V || this.$props.cellRender,
1138
- onChange: this.itemChange,
1139
- onSelectionchange: (g) => this.selectionChangeHandler({
1140
- event: g,
1141
- dataItem: r.dataItem,
1142
- dataIndex: y,
1143
- columnIndex: R
1144
- }),
1145
- columnIndex: R,
1146
- columnsCount: this.columnsRef.filter((g) => !g.children.length).length,
1147
- rowType: r.rowType,
1148
- level: r.level,
1149
- expanded: Z,
1150
- dataIndex: r.dataIndex,
1151
- style: X,
1152
- ariaColumnIndex: n.ariaColumnIndex,
1153
- isRtl: this.isRtl,
1154
- isSelected: !!((n == null ? void 0 : n._type) === "edit" ? x : Array.isArray(x) && x.indexOf(R) > -1),
1155
- isHighlighted: !!(typeof v != "boolean" && v && n.field && v[n.field] === !0),
1156
- group: r.group,
1157
- rowSpan: $
1158
- }, null) : Le ? d(jt, {
1159
- id: ee,
1160
- key: Y,
1161
- colSpan: P,
1162
- dataItem: r.dataItem,
1163
- field: n.field || "",
1164
- editor: n.editor,
1165
- format: n.format,
1166
- readFormat: n.readFormat,
1167
- type: n.type,
1168
- columnType: n.columnType,
1169
- className: Q,
1170
- render: V || this.$props.cellRender,
1171
- onEdit: this.editHandler,
1172
- onRemove: this.removeHandler,
1173
- onSave: this.saveHandler,
1174
- onCancel: this.cancelHandler,
1175
- onChange: this.itemChange,
1176
- columnIndex: R,
1177
- columnsCount: this.columnsRef.filter((g) => !g.children.length).length,
1178
- rowType: r.rowType,
1179
- level: r.level,
1180
- expanded: Z,
1181
- dataIndex: r.dataIndex,
1182
- style: X
1183
- }, null) : d(gi, {
1184
- key: Y,
1185
- id: ee,
1186
- colSpan: P,
1187
- dataItem: r.dataItem,
1188
- field: n.field || "",
1189
- editor: n.editor,
1190
- format: n.format,
1191
- readFormat: n.readFormat,
1192
- type: n.type,
1193
- columnType: n.columnType,
1194
- className: Q,
1195
- render: V || this.$props.cellRender,
1196
- onCellclick: this.cellClickHandler,
1197
- onCellkeydown: this.cellKeydownHandler,
1198
- onEdit: this.editHandler,
1199
- onRemove: this.removeHandler,
1200
- onSave: this.saveHandler,
1201
- onCancel: this.cancelHandler,
1202
- onChange: this.itemChange,
1203
- onSelectionchange: (g) => this.selectionChangeHandler({
1204
- event: g,
1205
- dataItem: r.dataItem,
1206
- dataIndex: y,
1207
- columnIndex: R
1208
- }),
1209
- columnIndex: R,
1210
- columnsCount: this.columnsRef.filter((g) => !g.children.length).length,
1211
- rowType: r.rowType,
1212
- level: r.level,
1213
- expanded: Z,
1214
- dataIndex: r.dataIndex,
1215
- style: X,
1216
- rowSpan: $,
1217
- isSelected: !!((n == null ? void 0 : n._type) === "edit" ? x : Array.isArray(x) && x.indexOf(R) > -1),
1218
- isHighlighted: !!(typeof v != "boolean" && v && n.field && v[n.field] === !0)
1219
- }, null);
1220
- }, this),
1221
- isInEdit: p,
1222
- isSelected: typeof x == "boolean" && x,
1223
- isHighlighted: typeof v == "boolean" && v
1224
- };
1196
+ cols: O
1197
+ }, null) : n("span", null, null), Q = {
1198
+ leafColumns: I,
1199
+ cellsToRender: V,
1200
+ selectedField: this.$props.selectedField,
1201
+ dataItemKey: this.$props.dataItemKey,
1202
+ select: i,
1203
+ highlight: this.$props.highlight,
1204
+ editField: this.$props.editField,
1205
+ cellRender: this.$props.cellRender,
1206
+ cells: this.$props.cells,
1207
+ getCellsToRender: this.getCellsToRender,
1208
+ hasDynamicColSpan: ot,
1209
+ itemChange: this.itemChange,
1210
+ selectionChangeHandler: this.selectionChangeHandler,
1211
+ editHandler: this.editHandler,
1212
+ removeHandler: this.removeHandler,
1213
+ saveHandler: this.saveHandler,
1214
+ cancelHandler: this.cancelHandler,
1215
+ cellClickHandler: this.cellClickHandler,
1216
+ cellKeydownHandler: this.cellKeydownHandler,
1217
+ computedCollapsed: this.computedCollapsed,
1218
+ uniqueField: this.$props.uniqueField,
1219
+ columnsRef: this.columnsRef,
1220
+ isRtl: this.isRtl,
1221
+ idPrefix: $
1222
+ }, rt = function(a, f, v, te, se) {
1223
+ return ps(Q, a, f, v, te, se);
1225
1224
  };
1226
- let gt = 0, U = [];
1227
- const j = !this.currentData.length, ue = (r) => r >= this.currentData.length - gt;
1228
- let q = 0;
1229
- if (this.currentData.length) {
1230
- const r = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
1231
- let b = this.$props.skip || 0, y = -1, Pe = 0;
1232
- const k = this.computedRowSpannable.enabled ? {} : void 0;
1225
+ let lt = 0, X = [];
1226
+ const Y = !this.dataRef.length, ue = (a) => a >= this.dataRef.length - lt;
1227
+ let Z = 0;
1228
+ if (this.dataRef.length) {
1229
+ const a = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
1230
+ let f = this.$props.skip || 0, v = -1, te = 0;
1231
+ const se = this.computedRowSpannable.enabled ? {} : void 0;
1233
1232
  if (this.isVirtualScroll) {
1234
- if (W > 0) {
1235
- const p = this.currentData.slice(0, W).filter((_) => _.rowType === "data").length;
1236
- y += p, b += p;
1233
+ if (T > 0) {
1234
+ const p = this.dataRef.slice(0, T).filter((_) => _.rowType === "data").length;
1235
+ v += p, f += T;
1237
1236
  }
1238
- !this.$props.pageable && O && (y += this.$props.skip || 0);
1237
+ !this.$props.pageable && F && (v += this.$props.skip || 0);
1239
1238
  }
1240
- U = (u || this.currentData).map(function(p, _) {
1241
- p.rowType === "data" && y++;
1242
- const L = p.dataIndex % 2 !== 0, A = this.$props.dataItemKey && E(this.$props.dataItemKey)(p.dataItem), x = _ + b, v = A || "ai" + x, R = v + "_1", P = ft.call(this, p, v, y, L, k), n = H.length - (this.detailExpandable.enabled ? 1 : 0) - ((o == null ? void 0 : o.length) || 0) || 1;
1243
- return q = x + r + Pe, [d(mi, {
1244
- key: v,
1239
+ X = (S || this.dataRef).map(function(p, _) {
1240
+ p.rowType === "data" && v++;
1241
+ const ie = p.dataIndex % 2 !== 0, Le = this.$props.dataItemKey && P(this.$props.dataItemKey)(p.dataItem), oe = _ + f, re = Le || "ai" + oe, le = re + "_1", N = rt.call(this, p, re, v, ie, se), ht = I.length - (this.detailExpandable.enabled ? 1 : 0) - ((l == null ? void 0 : l.length) || 0) || 1;
1242
+ return Z = oe + a + te, [n(ls, {
1243
+ key: re,
1245
1244
  item: p,
1246
- dataIndex: y,
1247
- ariaRowIndex: q,
1248
- absoluteRowIndex: x,
1249
- isAltRow: L,
1245
+ dataIndex: v,
1246
+ ariaRowIndex: Z,
1247
+ absoluteRowIndex: oe,
1248
+ isAltRow: ie,
1250
1249
  isHidden: ue(_),
1251
1250
  rowHeight: this.$props.rowHeight,
1252
- isSelected: P.isSelected,
1253
- isHighlighted: P.isHighlighted,
1254
- isInEdit: P.isInEdit,
1251
+ isSelected: N.isSelected,
1252
+ isHighlighted: N.isHighlighted,
1253
+ isInEdit: N.isInEdit,
1255
1254
  rowType: p.rowType,
1256
- onRowclick: ($) => this.rowClick($, p),
1257
- onRowdblclick: ($) => this.rowDoubleClick($, p),
1255
+ onRowclick: (E) => this.rowClick(E, p),
1256
+ onRowdblclick: (E) => this.rowDoubleClick(E, p),
1258
1257
  render: this.$props.rowRender,
1259
1258
  class: this.$props.rowClass ? this.$props.rowClass(p) : ""
1260
1259
  }, {
1261
- default: () => [P.row]
1262
- }), this.$props.detail && p.rowType === "data" && (p.expanded || p.dataItem.expanded) && d("tr", {
1263
- key: R,
1264
- class: L ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
1260
+ default: () => [N.row]
1261
+ }), this.$props.detail && p.rowType === "data" && (p.expanded || p.dataItem.expanded) && n("tr", {
1262
+ key: le,
1263
+ class: ie ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
1265
1264
  style: {
1266
1265
  visibility: ue(_) ? "hidden" : "",
1267
1266
  height: this.$props.detailRowHeight + "px"
1268
1267
  },
1269
1268
  role: "row",
1270
- "aria-rowindex": q
1271
- }, [o == null ? void 0 : o.map(function($) {
1272
- return d(se, {
1269
+ "aria-rowindex": Z
1270
+ }, [l == null ? void 0 : l.map(function(E) {
1271
+ return n(ne, {
1273
1272
  id: "",
1274
1273
  dataIndex: p.dataIndex,
1275
- field: $.field,
1274
+ field: E.field,
1276
1275
  dataItem: p.dataItem,
1277
- key: `group-${$.field}-${p.dataIndex}`,
1276
+ key: `group-${E.field}-${p.dataIndex}`,
1277
+ locked: this.$props.lockGroups,
1278
1278
  group: p.group
1279
1279
  }, null);
1280
- }, this), (this.$props.expandField || this.detailExpandable.enabled) && d(Bt, {
1281
- id: D.generateNavigatableId(`${R}-dhcell`, w)
1282
- }, null), d(Ut, {
1280
+ }, this), (this.$props.expandField || this.detailExpandable.enabled) && n(_t, {
1281
+ id: H.generateNavigatableId(`${le}-dhcell`, $)
1282
+ }, null), n(Pt, {
1283
1283
  dataItem: p.dataItem,
1284
1284
  dataIndex: p.dataIndex,
1285
- colSpan: n,
1286
- ariaColIndex: 2 + (o ? o.length : 0),
1285
+ colSpan: ht,
1286
+ ariaColIndex: 2 + (l ? l.length : 0),
1287
1287
  detail: this.$props.detail ? this.$props.detail : void 0,
1288
- id: D.generateNavigatableId(`${R}-dcell`, w)
1288
+ id: H.generateNavigatableId(`${le}-dcell`, $)
1289
1289
  }, null)])];
1290
1290
  }, this);
1291
1291
  }
1292
- const mt = this.$props.pageable && d(zt, {
1292
+ const at = this.$props.pageable && n(xt, {
1293
1293
  class: "k-grid-pager",
1294
1294
  onPagesizechange: this.pageChangeHandler,
1295
1295
  onPagechange: this.pageChangeHandler,
1296
1296
  size: this.$props.size,
1297
- total: C,
1298
- skip: l || 0,
1299
- pageSize: (a !== void 0 ? a : this.$props.pageSize) || 10,
1300
- messagesMap: rt,
1301
- settings: _t(this.$props.pageable || {})
1302
- }, null), fe = Ne.call(this, {
1303
- h: Ve,
1297
+ total: k,
1298
+ skip: o || 0,
1299
+ pageSize: (r !== void 0 ? r : this.$props.pageSize) || 10,
1300
+ messagesMap: et,
1301
+ settings: wt(this.$props.pageable || {})
1302
+ }, null), fe = Me.call(this, {
1303
+ h: _e,
1304
1304
  template: this.$props.pager,
1305
- defaultRendering: mt,
1305
+ defaultRendering: at,
1306
1306
  additionalProps: {
1307
1307
  ...this.$props,
1308
1308
  skip: this.$props.skip || 0,
1309
- messagesMap: rt
1309
+ messagesMap: et
1310
1310
  },
1311
1311
  additionalListeners: {
1312
1312
  pagesizechange: this.pageChangeHandler,
1313
1313
  pagechange: this.pageChangeHandler
1314
1314
  }
1315
- }), Ct = (r) => e && e.filter((b) => b.field === r).length > 0, ge = d("colgroup", {
1316
- ref: F(this, "colGroup")
1317
- }, [H.map(function(r, b) {
1318
- return d("col", {
1319
- key: r.id || `col-${b}`,
1320
- class: Ct(r.field) ? "k-sorted" : void 0,
1321
- width: r.width !== void 0 ? r.width.toString().indexOf("%") !== -1 ? r.width : Math.floor(parseFloat(r.width.toString())) + "px" : void 0
1315
+ }), nt = (a) => e && e.filter((f) => f.field === a).length > 0, ge = n("colgroup", {
1316
+ ref: w(this, "colGroup")
1317
+ }, [I.map(function(a, f) {
1318
+ return n("col", {
1319
+ key: a.id || `col-${f}`,
1320
+ class: nt(a.field) ? "k-sorted" : void 0,
1321
+ width: a.width !== void 0 ? a.width.toString().indexOf("%") !== -1 ? a.width : Math.floor(parseFloat(a.width.toString())) + "px" : void 0
1322
1322
  }, null);
1323
1323
  }, this)]), me = {
1324
1324
  height: this.getCorrectHeight,
1325
1325
  ...this.$attrs.style
1326
- }, bt = d("div", {
1326
+ }, dt = n("div", {
1327
1327
  class: "k-loading-mask"
1328
- }, [d("div", {
1328
+ }, [n("div", {
1329
1329
  class: "k-loading-color"
1330
- }, null), d("div", {
1330
+ }, null), n("div", {
1331
1331
  style: {
1332
1332
  height: "100%",
1333
1333
  display: "flex",
1334
1334
  justifyContent: "center",
1335
1335
  alignItems: "center"
1336
1336
  }
1337
- }, [d(Wt, {
1337
+ }, [n(Lt, {
1338
1338
  size: "large",
1339
1339
  type: "converging-spinner"
1340
- }, null)])]), J = this.$props.showLoader && Ne.call(this, {
1341
- h: Ve,
1340
+ }, null)])]), ee = this.$props.showLoader && Me.call(this, {
1341
+ h: _e,
1342
1342
  template: this.$props.loader,
1343
- defaultRendering: bt
1343
+ defaultRendering: dt
1344
1344
  });
1345
- return this.$props.scrollable === "none" ? d(qe, {
1345
+ return this.$props.scrollable === "none" ? n(Ne, {
1346
1346
  ref: "navRef",
1347
1347
  id: this._gridId,
1348
1348
  navigatable: this.$props.navigatable,
1349
1349
  scrollable: this.$props.scrollable,
1350
1350
  columnVirtualization: this.$props.columnVirtualization
1351
1351
  }, {
1352
- default: () => [d(Xe, {
1353
- ref: (r) => {
1354
- this.gridNavRef = r;
1352
+ default: () => [n(Ue, {
1353
+ ref: (a) => {
1354
+ this.gridNavRef = a;
1355
1355
  },
1356
1356
  columnsRef: this.columnsRef,
1357
- currentData: this.currentData,
1357
+ dataRef: this.dataRef,
1358
1358
  id: this.$props.id,
1359
1359
  style: me,
1360
1360
  class: this.nonscrollableWrapperClass,
@@ -1363,95 +1363,113 @@ const rs = /* @__PURE__ */ $t({
1363
1363
  onColumnreorder: this.columnReorder,
1364
1364
  onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler
1365
1365
  }, {
1366
- default: () => [re, oe, d("div", {
1366
+ default: () => [A, D, n("div", {
1367
1367
  role: "grid",
1368
1368
  class: "k-grid-aria-root",
1369
1369
  id: this._gridRoleElementId,
1370
1370
  "aria-colcount": this.getAriaColCount,
1371
1371
  "aria-rowcount": this.getAriaRowCount
1372
- }, [d(ei, {
1372
+ }, [n(Wt, {
1373
1373
  selectable: this.computedSelectable,
1374
1374
  class: "k-table",
1375
- ref: F(this, "table")
1375
+ ref: w(this, "table")
1376
1376
  }, {
1377
- default: () => [ge, pe, d("tbody", {
1377
+ default: () => [ge, pe, n("tbody", {
1378
1378
  class: "k-table-tbody",
1379
- "data-keyboardnavbody": !0
1380
- }, [U, It(" "), J]), ce]
1381
- }), j && d(at, {
1382
- id: D.generateNavigatableId("no-records", w)
1379
+ "data-keyboardnavbody": !0,
1380
+ ref: w(this, "tableBody")
1381
+ }, [X, ct(" "), ee]), ce]
1382
+ }), Y && n(Ze, {
1383
+ id: H.generateNavigatableId("no-records", $)
1383
1384
  }, {
1384
- default: () => [K.length ? K : d(lt, null, null)]
1385
- })]), fe, J, de]
1385
+ default: () => [z.length ? z : n(Ye, null, null)]
1386
+ })]), fe, ee, he]
1386
1387
  })]
1387
- }) : d(qe, {
1388
+ }) : n(Ne, {
1388
1389
  ref: "navRef",
1389
1390
  id: this._gridId,
1390
1391
  navigatable: this.$props.navigatable,
1391
1392
  scrollable: this.$props.scrollable,
1392
1393
  columnVirtualization: this.$props.columnVirtualization
1393
1394
  }, {
1394
- default: () => [d(Xe, {
1395
- ref: (r) => {
1396
- this.gridNavRef = r;
1395
+ default: () => [n(Ue, {
1396
+ ref: (a) => {
1397
+ this.gridNavRef = a;
1397
1398
  },
1398
- currentData: this.currentData,
1399
+ dataRef: this.dataRef,
1399
1400
  id: this.$props.id,
1400
1401
  style: me,
1401
1402
  class: this.scrollableWrapperClass,
1402
1403
  onMovetonextpage: this.moveToNextPage,
1403
1404
  onMovetoprevpage: this.moveToPrevPage,
1404
1405
  onColumnreorder: this.columnReorder,
1405
- onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler
1406
+ onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler,
1407
+ onSetcurrentontop: this.setCurrentOnTop
1406
1408
  }, {
1407
- default: () => [re, oe, d("div", {
1409
+ default: () => [A, D, n("div", {
1408
1410
  role: "grid",
1409
1411
  class: "k-grid-aria-root",
1410
1412
  id: this._gridRoleElementId,
1411
1413
  "aria-colcount": this.getAriaColCount,
1412
1414
  "aria-rowcount": this.getAriaRowCount
1413
- }, [pe, d("div", {
1415
+ }, [pe, n("div", {
1414
1416
  class: "k-grid-container",
1415
1417
  role: "presentation"
1416
- }, [d("div", {
1418
+ }, [C && u && n(tt, {
1419
+ ref: w(this, "stickyHeader"),
1420
+ size: this.$props.size,
1421
+ cols: O,
1422
+ dataRowContext: Q,
1423
+ position: "top",
1424
+ groupLevelCount: g,
1425
+ rowHeight: this.$props.rowHeight
1426
+ }, null), n("div", {
1417
1427
  role: "presentation",
1418
- ref: F(this, "scrollContainer"),
1428
+ ref: w(this, "scrollContainer"),
1419
1429
  class: "k-grid-content k-virtual-content",
1420
1430
  onScroll: this.scrollHandler
1421
- }, [d("div", {
1431
+ }, [n("div", {
1422
1432
  class: "k-grid-table-wrap",
1423
1433
  role: "presentation"
1424
- }, [d(ti, {
1434
+ }, [n(Bt, {
1425
1435
  selectable: this.computedSelectable,
1426
1436
  tableClassName: this.gridTableClass,
1427
1437
  tableStyle: {
1428
- userSelect: ht
1438
+ userSelect: q
1429
1439
  },
1430
- ref: F(this, "table")
1440
+ ref: w(this, "table")
1431
1441
  }, {
1432
- default: () => [ge, d("tbody", {
1442
+ default: () => [ge, n("tbody", {
1433
1443
  class: "k-table-tbody",
1434
1444
  role: "rowgroup",
1435
1445
  "data-keyboardnavbody": !0,
1436
- ref: F(this, "tableBody")
1437
- }, [U])]
1438
- }), j && d(at, {
1439
- id: D.generateNavigatableId("no-records", w)
1446
+ ref: w(this, "tableBody")
1447
+ }, [X])]
1448
+ }), Y && n(Ze, {
1449
+ id: H.generateNavigatableId("no-records", $)
1440
1450
  }, {
1441
- default: () => [K.length ? K : d(lt, null, null)]
1442
- })]), !j && d("div", {
1451
+ default: () => [z.length ? z : n(Ye, null, null)]
1452
+ })]), !Y && n("div", {
1443
1453
  class: "k-height-container",
1444
1454
  role: "presentation"
1445
- }, [d("div", {
1446
- ref: F(this, "scrollHeightContainer"),
1455
+ }, [n("div", {
1456
+ ref: w(this, "scrollHeightContainer"),
1447
1457
  style: this.$props.scrollable === "virtual" ? {
1448
1458
  height: this._containerHeightRef + "px"
1449
1459
  } : {}
1450
- }, null)])])]), ce, pt]), fe, J, de]
1460
+ }, null)])]), C && R && n(tt, {
1461
+ ref: w(this, "stickyFooter"),
1462
+ size: this.$props.size,
1463
+ cols: O,
1464
+ dataRowContext: Q,
1465
+ position: "bottom",
1466
+ groupLevelCount: g,
1467
+ rowHeight: this.$props.rowHeight
1468
+ }, null)]), ce, st]), fe, ee, he]
1451
1469
  })]
1452
1470
  });
1453
1471
  }
1454
1472
  });
1455
1473
  export {
1456
- rs as Grid
1474
+ Ys as Grid
1457
1475
  };