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