@progress/kendo-vue-grid 7.1.0-develop.4 → 7.1.0-develop.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Grid.js +1 -1
- package/Grid.mjs +647 -588
- package/GridNav.js +1 -1
- package/GridNav.mjs +3 -1
- package/GridState.js +1 -1
- package/GridState.mjs +80 -60
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +65 -109
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +24 -19
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +23 -23
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +13 -14
- package/common.js +1 -1
- package/common.mjs +3 -0
- package/{GridNoRecords.js → components/noRecords/GridNoRecords.js} +1 -1
- package/{GridNoRecords.mjs → components/noRecords/GridNoRecords.mjs} +1 -1
- package/components/noRecords/GridNoRecordsContainer.js +8 -0
- package/components/noRecords/GridNoRecordsContainer.mjs +30 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +9 -16
- package/header/Header.js +1 -1
- package/header/Header.mjs +20 -26
- package/index.d.mts +102 -23
- package/index.d.ts +102 -23
- package/index.js +1 -1
- package/index.mjs +30 -29
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +18 -17
- package/utils/main.js +1 -1
- package/utils/main.mjs +30 -22
- package/VirtualScrollFixed.js +0 -8
- package/VirtualScrollFixed.mjs +0 -86
- package/utils/browser-support.service.js +0 -8
- package/utils/browser-support.service.mjs +0 -21
package/Grid.mjs
CHANGED
|
@@ -5,46 +5,46 @@
|
|
|
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
|
|
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 { GridEditCell as
|
|
18
|
-
import { Header as
|
|
19
|
-
import { HeaderRow as
|
|
20
|
-
import { FilterRow as
|
|
21
|
-
import { GroupPanel as
|
|
22
|
-
import { Footer as
|
|
23
|
-
import { FooterRow as
|
|
24
|
-
import { operators as
|
|
25
|
-
import { VirtualScroll as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { packageMetadata as
|
|
39
|
-
import { pagerMessagesMap as
|
|
40
|
-
import { process as
|
|
41
|
-
import { KendoKey as
|
|
42
|
-
import { getVirtualCellsToRender as
|
|
43
|
-
const
|
|
8
|
+
import { defineComponent as at, createVNode as n, h as De, createTextVNode as ot, ref as x, inject as nt, markRaw as _ } from "vue";
|
|
9
|
+
import { isObject as A, cloneArray as dt, canUseDOM as Q, WatermarkOverlay as ht, getter as X, getTemplate as Te, setRef as G, hasListener as L, getRef as $, RowHeightService as pt, setScrollbarWidth as ut, kendoThemeMaps as Ge, uGrid as ct, isRtl as Fe, validatePackage as gt, shouldShowValidationUI as ft, getLicenseMessage as mt, guid as Le, getNestedValue as Pe } from "@progress/kendo-vue-common";
|
|
10
|
+
import { tableKeyboardNavigationTools as E, combineFilters as Ct, Pager as bt, normalize as $t, TableKeyboardNavigationProvider as Me, updateLeft as Rt, updateRight as xt, groupExpandReducer as vt, detailExpandReducer as wt, getDetailExpandableOptions as It, getGroupExpandableOptions as St } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { Loader as yt } from "@progress/kendo-vue-indicators";
|
|
12
|
+
import { GridNav as Ae } from "./GridNav.mjs";
|
|
13
|
+
import { GridSelectionCell as Ve } from "./cells/GridSelectionCell.mjs";
|
|
14
|
+
import { GridHierarchyCell as Y } from "./cells/GridHierarchyCell.mjs";
|
|
15
|
+
import { GridDetailHierarchyCell as Ht } from "./cells/GridDetailHierarchyCell.mjs";
|
|
16
|
+
import { GridDetailCell as kt } from "./cells/GridDetailCell.mjs";
|
|
17
|
+
import { GridEditCell as _t } from "./cells/GridEditCell.mjs";
|
|
18
|
+
import { Header as Et } from "./header/Header.mjs";
|
|
19
|
+
import { HeaderRow as zt } from "./header/HeaderRow.mjs";
|
|
20
|
+
import { FilterRow as Dt } from "./header/FilterRow.mjs";
|
|
21
|
+
import { GroupPanel as Tt } from "./header/GroupPanel.mjs";
|
|
22
|
+
import { Footer as Gt } from "./footer/Footer.mjs";
|
|
23
|
+
import { FooterRow as Ft } from "./footer/FooterRow.mjs";
|
|
24
|
+
import { operators as Ne } from "./filterCommon.mjs";
|
|
25
|
+
import { VirtualScroll as Lt } from "./VirtualScroll.mjs";
|
|
26
|
+
import { ColumnResize as Pt } from "./drag/ColumnResize.mjs";
|
|
27
|
+
import { CommonDragLogic as Mt } from "./drag/CommonDragLogic.mjs";
|
|
28
|
+
import { DragClue as At } from "./drag/DragClue.mjs";
|
|
29
|
+
import { DropClue as Vt } from "./drag/DropClue.mjs";
|
|
30
|
+
import { applyExpandedState as Nt, getColSpan as Ot, autoGenerateColumns as Wt, mapColumns as Kt, getFlatColumnsState as Oe, getRowSpanOptions as We, groupedFirstItemValue as Ke, calcRowHeight as Ut, flatData as Bt, readColumns as jt } from "./utils/main.mjs";
|
|
31
|
+
import { GridCell as qt } from "./cells/GridCell.mjs";
|
|
32
|
+
import { GridGroupCell as Z } from "./cells/GridGroupCell.mjs";
|
|
33
|
+
import { GridRow as Jt } from "./rows/GridRow.mjs";
|
|
34
|
+
import { gridProps as Qt } from "./common.mjs";
|
|
35
|
+
import { GridHeaderSelectionCell as Ue } from "./header/GridHeaderSelectionCell.mjs";
|
|
36
|
+
import { GridNoRecords as Be } from "./components/noRecords/GridNoRecords.mjs";
|
|
37
|
+
import { GridNoRecordsContainer as je } from "./components/noRecords/GridNoRecordsContainer.mjs";
|
|
38
|
+
import { packageMetadata as ee } from "./package-metadata.mjs";
|
|
39
|
+
import { pagerMessagesMap as qe } from "./messages/messagesMap.mjs";
|
|
40
|
+
import { process as Xt } from "@progress/kendo-data-query";
|
|
41
|
+
import { KendoKey as Yt } from "./key.mjs";
|
|
42
|
+
import { getVirtualCellsToRender as Zt } from "./utils/virtualColumns.mjs";
|
|
43
|
+
const Pi = /* @__PURE__ */ at({
|
|
44
44
|
name: "KendoGrid",
|
|
45
45
|
inheritAttrs: !1,
|
|
46
46
|
props: {
|
|
47
|
-
...
|
|
47
|
+
...Qt,
|
|
48
48
|
toolbar: {
|
|
49
49
|
type: Object
|
|
50
50
|
},
|
|
@@ -63,31 +63,45 @@ const Gs = /* @__PURE__ */ st({
|
|
|
63
63
|
};
|
|
64
64
|
},
|
|
65
65
|
watch: {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
rowHeight: function(e, t) {
|
|
67
|
+
var i;
|
|
68
|
+
this.onRowHeightChanged(e, t), (i = this.vsRef) == null || i.reset();
|
|
68
69
|
},
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
scrollable: function() {
|
|
71
|
+
var e;
|
|
72
|
+
(e = this.vsRef) == null || e.reset();
|
|
71
73
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
filter: function() {
|
|
75
|
+
var e;
|
|
76
|
+
(e = this.vsRef) == null || e.reset();
|
|
77
|
+
},
|
|
78
|
+
group: function() {
|
|
79
|
+
var e;
|
|
80
|
+
(e = this.vsRef) == null || e.reset();
|
|
81
|
+
},
|
|
82
|
+
currentGroupable: function() {
|
|
83
|
+
var e;
|
|
84
|
+
(e = this.vsRef) == null || e.reset();
|
|
85
|
+
},
|
|
86
|
+
sort: function() {
|
|
87
|
+
var e;
|
|
88
|
+
(e = this.vsRef) == null || e.reset();
|
|
74
89
|
}
|
|
75
90
|
},
|
|
76
91
|
created() {
|
|
77
|
-
|
|
78
|
-
const e = this.currentGroupable, t = this.getVirtualScroll();
|
|
79
|
-
this.vs = new t(e || this.$props.rowHeight === void 0 || this.$props.rowHeight === 0, this.$props.topCacheCount), this.dragLogic = new Gt(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new Dt(this.onResize.bind(this)), this._columnsMap = [[]], this._header = null, this._footer = null, this.forceUpdateTimeout = void 0, this._gridId = ze(), this._gridRoleElementId = ze(), this.slicedCurrentData = void 0, this._prevTotal = void 0;
|
|
92
|
+
gt(ee), this.showLicenseWatermark = ft(ee), this.licenseMessage = mt(ee), this.initialHeight = null, this._columns = [], this.vsRef = new Lt(), this.dragLogic = new Mt(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new Pt(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 = Le(), this._gridRoleElementId = Le(), this.slicedCurrentData = void 0, this._prevTotal = void 0, this._containerHeightRef = 0, this._minRowHeightRef = 0, this._virtualSkipRef = 0, this.wrapperScrollTopRef = 0, this.scrollLeftRef = 0;
|
|
80
93
|
},
|
|
81
94
|
mounted() {
|
|
82
|
-
var t,
|
|
95
|
+
var t, i;
|
|
83
96
|
this.setRefs();
|
|
84
|
-
const e =
|
|
85
|
-
this._prevTotal = this.$props.total, this.isRtl = e, this.initialHeight = ((
|
|
97
|
+
const e = Fe(this._element);
|
|
98
|
+
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 = Q && (window == null ? void 0 : window.ResizeObserver) && new ResizeObserver(this.calculateMedia), document != null && document.body && this.resizeObserver && this.resizeObserver.observe(document.body);
|
|
86
99
|
},
|
|
87
100
|
updated() {
|
|
101
|
+
var t;
|
|
88
102
|
this.setRefs();
|
|
89
|
-
const e =
|
|
90
|
-
this.isRtl = e, this._prevTotal = this.$props.total, this.
|
|
103
|
+
const e = Fe(this._element);
|
|
104
|
+
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());
|
|
91
105
|
},
|
|
92
106
|
unmounted() {
|
|
93
107
|
this.gridUnmounted();
|
|
@@ -100,16 +114,16 @@ const Gs = /* @__PURE__ */ st({
|
|
|
100
114
|
return this.$props.navigatable ? this.gridId : "";
|
|
101
115
|
},
|
|
102
116
|
groupExpandable() {
|
|
103
|
-
return
|
|
117
|
+
return St(typeof this.$props.groupable == "object" && this.$props.groupable.enabled !== !1 ? this.$props.groupable.expandable : this.$props.groupable);
|
|
104
118
|
},
|
|
105
119
|
hierarchClass() {
|
|
106
|
-
return
|
|
120
|
+
return ct.hierarchyCell({});
|
|
107
121
|
},
|
|
108
|
-
|
|
109
|
-
return
|
|
122
|
+
computedRowSpannable() {
|
|
123
|
+
return We(this.$props.rowSpannable);
|
|
110
124
|
},
|
|
111
125
|
detailExpandable() {
|
|
112
|
-
return
|
|
126
|
+
return It(!!this.$props.detail);
|
|
113
127
|
},
|
|
114
128
|
nonscrollableWrapperClass() {
|
|
115
129
|
const {
|
|
@@ -118,7 +132,7 @@ const Gs = /* @__PURE__ */ st({
|
|
|
118
132
|
return {
|
|
119
133
|
"k-grid": !0,
|
|
120
134
|
"k-grid-md": !e,
|
|
121
|
-
[`k-grid-${
|
|
135
|
+
[`k-grid-${Ge.sizeMap[e] || e}`]: e,
|
|
122
136
|
[t]: !!t
|
|
123
137
|
};
|
|
124
138
|
},
|
|
@@ -139,7 +153,7 @@ const Gs = /* @__PURE__ */ st({
|
|
|
139
153
|
"k-table": !0,
|
|
140
154
|
"k-grid-table": !0,
|
|
141
155
|
"k-grid-md": !e,
|
|
142
|
-
[`k-table-${
|
|
156
|
+
[`k-table-${Ge.sizeMap[e] || e}`]: e
|
|
143
157
|
};
|
|
144
158
|
},
|
|
145
159
|
getCorrectHeight() {
|
|
@@ -148,7 +162,7 @@ const Gs = /* @__PURE__ */ st({
|
|
|
148
162
|
currentGroupable() {
|
|
149
163
|
var t;
|
|
150
164
|
const e = (t = this.gridContext.group) == null ? void 0 : t.value;
|
|
151
|
-
return this.$props.groupable === !0 && (e == null ? void 0 : e.length) ||
|
|
165
|
+
return this.$props.groupable === !0 && (e == null ? void 0 : e.length) || A(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
152
166
|
},
|
|
153
167
|
computedCollapsed() {
|
|
154
168
|
let e = [];
|
|
@@ -160,47 +174,50 @@ const Gs = /* @__PURE__ */ st({
|
|
|
160
174
|
// Calculates the value of the ariaRowcount attribute.
|
|
161
175
|
getAriaRowCount() {
|
|
162
176
|
const e = this.$props.dataItems, t = this.$props.total || (e == null ? void 0 : e.total) || (e == null ? void 0 : e.length) || 0;
|
|
163
|
-
return this.$props.detail ? this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t * 2 + (this._columns.some((
|
|
177
|
+
return this.$props.detail ? this._columnsMap.length + (this.$props.filterable ? 1 : 0) + t * 2 + (this._columns.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._columns.some((i) => !!i.footerCell) ? 1 : 0);
|
|
164
178
|
},
|
|
165
179
|
// Calculates the value of the ariaColcount attribute.
|
|
166
180
|
// Based on the result of this method the ariaColIndex is rendered or not in the HeaderRow TH elements
|
|
167
181
|
getAriaColCount() {
|
|
168
|
-
const e = this.$props.columns, t = this.$props.columnVirtualization,
|
|
169
|
-
if (t ||
|
|
182
|
+
const e = this.$props.columns, t = this.$props.columnVirtualization, i = (e == null ? void 0 : e.filter((s) => s.hidden !== void 0).length) !== 0;
|
|
183
|
+
if (t || i)
|
|
170
184
|
return (e == null ? void 0 : e.length) !== 0 ? e == null ? void 0 : e.length : -1;
|
|
185
|
+
},
|
|
186
|
+
isVirtualScroll() {
|
|
187
|
+
return this.$props.scrollable === "virtual" || this.$props.scrollable === void 0 || !1;
|
|
171
188
|
}
|
|
172
189
|
},
|
|
173
190
|
methods: {
|
|
174
191
|
readColumnElements() {
|
|
175
|
-
return
|
|
192
|
+
return jt(this.$props.columns, this.currentColumnsState, {
|
|
176
193
|
prevId: 0,
|
|
177
194
|
idPrefix: this.idPrefix
|
|
178
195
|
});
|
|
179
196
|
},
|
|
180
197
|
getResolvedFlatColumnsState() {
|
|
181
|
-
const e = [], t = (
|
|
182
|
-
const
|
|
198
|
+
const e = [], t = (i, s) => i == null ? void 0 : i.forEach((r) => {
|
|
199
|
+
const l = r.hidden || s;
|
|
183
200
|
e.push({
|
|
184
|
-
...
|
|
185
|
-
hidden:
|
|
186
|
-
}), t(
|
|
201
|
+
...r,
|
|
202
|
+
hidden: l
|
|
203
|
+
}), t(r.children, l);
|
|
187
204
|
});
|
|
188
205
|
return t(this.currentColumnsState, !1), e;
|
|
189
206
|
},
|
|
190
207
|
filterColumns(e) {
|
|
191
208
|
const t = this.getResolvedFlatColumnsState();
|
|
192
|
-
return [e.filter((
|
|
193
|
-
var
|
|
194
|
-
return !
|
|
195
|
-
}), e.filter((
|
|
196
|
-
var
|
|
197
|
-
return
|
|
209
|
+
return [e.filter((i) => {
|
|
210
|
+
var s;
|
|
211
|
+
return !i.hidden && !((s = t.find((r) => r.id === i.id)) != null && s.hidden);
|
|
212
|
+
}), e.filter((i) => {
|
|
213
|
+
var s;
|
|
214
|
+
return i.hidden || ((s = t.find((r) => r.id === i.id)) == null ? void 0 : s.hidden);
|
|
198
215
|
})];
|
|
199
216
|
},
|
|
200
|
-
getFlatData(e, t, s,
|
|
201
|
-
const h = [], c =
|
|
202
|
-
index:
|
|
203
|
-
},
|
|
217
|
+
getFlatData(e, t, i, s, r, l, d) {
|
|
218
|
+
const h = [], c = Bt(h, e, t, {
|
|
219
|
+
index: i
|
|
220
|
+
}, s !== void 0, r, l, this.groupExpandable.defaultExpand, d, this.$props.expandField);
|
|
204
221
|
return {
|
|
205
222
|
flattedData: h,
|
|
206
223
|
resolvedGroupsCount: c
|
|
@@ -221,11 +238,11 @@ const Gs = /* @__PURE__ */ st({
|
|
|
221
238
|
filterHiddenColumns(e) {
|
|
222
239
|
if (!e || e.length === 0)
|
|
223
240
|
return e;
|
|
224
|
-
const t = (
|
|
225
|
-
...
|
|
226
|
-
children:
|
|
241
|
+
const t = (i) => ({
|
|
242
|
+
...i,
|
|
243
|
+
children: i.children && i.children.length > 0 ? this.filterHiddenColumns(i.children) : i.children
|
|
227
244
|
});
|
|
228
|
-
return [...e].filter((
|
|
245
|
+
return [...e].filter((i) => !i.hidden).filter((i) => Q && i && i.media ? window.matchMedia(i.media).matches : i).map((i) => t(i));
|
|
229
246
|
},
|
|
230
247
|
/**
|
|
231
248
|
* A getter of the current columns. Gets the current column width or current columns,
|
|
@@ -235,46 +252,40 @@ const Gs = /* @__PURE__ */ st({
|
|
|
235
252
|
* and check the properties afterwards. You can check the result in the browser console.
|
|
236
253
|
*/
|
|
237
254
|
getColumns() {
|
|
238
|
-
const e = this._columns.filter((
|
|
255
|
+
const e = this._columns.filter((i) => i.declarationIndex >= 0 && i.parentIndex === -1), t = (i) => (i.sort((s, r) => s.declarationIndex - r.declarationIndex), i.map((s) => {
|
|
239
256
|
const {
|
|
240
|
-
declarationIndex:
|
|
241
|
-
parentIndex:
|
|
257
|
+
declarationIndex: r,
|
|
258
|
+
parentIndex: l,
|
|
242
259
|
depth: d,
|
|
243
260
|
colSpan: h,
|
|
244
261
|
rowSpan: c,
|
|
245
|
-
index:
|
|
262
|
+
index: m,
|
|
246
263
|
kFirst: u,
|
|
247
|
-
children:
|
|
248
|
-
...
|
|
249
|
-
} =
|
|
250
|
-
return
|
|
251
|
-
children: t(
|
|
252
|
-
...
|
|
253
|
-
} :
|
|
264
|
+
children: C,
|
|
265
|
+
...R
|
|
266
|
+
} = s;
|
|
267
|
+
return C.length ? {
|
|
268
|
+
children: t(C),
|
|
269
|
+
...R
|
|
270
|
+
} : R;
|
|
254
271
|
}));
|
|
255
272
|
return t(e);
|
|
256
273
|
},
|
|
257
274
|
setRefs() {
|
|
258
275
|
let e = "$el";
|
|
259
|
-
const t =
|
|
276
|
+
const t = $(this, "gridNav");
|
|
260
277
|
t && (this._element = t[e]);
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
263
|
-
let
|
|
264
|
-
this.dragLogic.refGroupPanelDiv(
|
|
278
|
+
const i = $(this, "groupPanelDiv");
|
|
279
|
+
if (i) {
|
|
280
|
+
let l = i[e] || null;
|
|
281
|
+
this.dragLogic.refGroupPanelDiv(l);
|
|
265
282
|
}
|
|
266
|
-
const
|
|
267
|
-
this.dragLogic.refDropElementClue(
|
|
283
|
+
const s = $(this, "dropElementClue"), r = $(this, "dragElementClue");
|
|
284
|
+
this.dragLogic.refDropElementClue(s), this.dragLogic.refDragElementClue(r), this.columnResize.colGroupMain = $(this, "colGroup"), this._header = $(this, "header"), this._footer = $(this, "footer"), this.resetTableWidth(), ut();
|
|
268
285
|
},
|
|
269
286
|
gridUnmounted() {
|
|
270
287
|
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._columns = [], document != null && document.body && this.resizeObserver && this.resizeObserver.disconnect();
|
|
271
288
|
},
|
|
272
|
-
resetVirtual() {
|
|
273
|
-
this.vs.PageChange = this.pageChangeHandler, this.vs.realSkip = this.$props.skip || 0, this.vs.pageSize = (this.$props.take !== void 0 ? this.$props.take : this.$props.pageSize) || 0, this.vs.scrollableVirtual = this.$props.scrollable === "virtual", this.vs.propsSkip = (this.$props.skip || 0) + (this.$props.scrollable === "virtual" ? this.vs.topCacheCount + (this.vs.attendedSkip - (this.$props.skip || 0)) : 0);
|
|
274
|
-
},
|
|
275
|
-
getVirtualScroll() {
|
|
276
|
-
return Q;
|
|
277
|
-
},
|
|
278
289
|
isAllData() {
|
|
279
290
|
const {
|
|
280
291
|
dataItems: e,
|
|
@@ -282,45 +293,36 @@ const Gs = /* @__PURE__ */ st({
|
|
|
282
293
|
} = this.$props;
|
|
283
294
|
return Array.isArray(e) ? e.length === t : e ? t === e.total : !1;
|
|
284
295
|
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (this.slicedCurrentData = void 0, this.vs instanceof Et) {
|
|
296
|
-
const {
|
|
297
|
-
rowHeight: t = 0,
|
|
298
|
-
detail: s,
|
|
299
|
-
expandField: i
|
|
300
|
-
} = this.$props;
|
|
301
|
-
let {
|
|
302
|
-
detailRowHeight: l = 0
|
|
303
|
-
} = this.$props;
|
|
304
|
-
l = s && i ? l : t, this.isAllData() ? (this.vs.total = this.currentData.length, this.slicedCurrentData = this.currentData.slice(this.vs.realSkip, this.vs.realSkip + this.vs.pageSize), this.vs.rowHeightService = this.rowHeightService(this.vs, this.currentData.length, t, l, this.currentData)) : this.vs.rowHeightService = new _t(e, t, l);
|
|
305
|
-
const a = this.vs.rowHeightService.totalHeight();
|
|
306
|
-
this.vs.containerHeight = At ? Math.min(Pt, a) : a;
|
|
307
|
-
}
|
|
296
|
+
resetVirtualSkip() {
|
|
297
|
+
this.isVirtualScroll && this._virtualSkipRef && (this._virtualSkipRef = 0);
|
|
298
|
+
},
|
|
299
|
+
virtualPageChange(e, t) {
|
|
300
|
+
var i;
|
|
301
|
+
this.$props.pageable || (i = this.$props.group) != null && i.length ? (this._virtualSkipRef = e.skip, this.$forceUpdate()) : this.pageChangeHandler(e, t);
|
|
302
|
+
},
|
|
303
|
+
initializeVirtualization() {
|
|
304
|
+
const e = this.vsRef, t = this.$props.rowHeight || this._minRowHeightRef || 0;
|
|
305
|
+
e && (e.fixedScroll = this.$props.fixedScroll || !1, e.PageChange = this.virtualPageChange, e.pageSize = this._virtualPageSize, e.scrollableVirtual = this.isVirtualScroll, e.container = $(this, "scrollContainer"), e.tableBody = $(this, "tableBody"), e.scrollHeightContainer = $(this, "scrollHeightContainer"), e.table = $(this, "table"), (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new pt(this._virtualTotal, t)));
|
|
308
306
|
},
|
|
309
|
-
|
|
310
|
-
|
|
307
|
+
setContainerHeight() {
|
|
308
|
+
const e = $(this, "scrollContainer");
|
|
309
|
+
this._containerHeightRef = (e == null ? void 0 : e.offsetHeight) || 0;
|
|
311
310
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
setMinRowHeight() {
|
|
312
|
+
if (!this._minRowHeightRef && !this.$props.rowHeight) {
|
|
313
|
+
const t = Ut($(this, "tableBody"));
|
|
314
|
+
t && (this._minRowHeightRef = t, this.$forceUpdate());
|
|
315
|
+
}
|
|
315
316
|
},
|
|
316
317
|
onRowHeightChanged(e, t) {
|
|
317
|
-
|
|
318
|
-
this.vs.reset(), this.vs = new Q(s || this.$props.rowHeight === void 0 || this.$props.rowHeight === 0, this.$props.topCacheCount), this.resetVirtual(), this.setRefs();
|
|
318
|
+
this.setRefs();
|
|
319
319
|
},
|
|
320
320
|
scrollHandler(e) {
|
|
321
|
-
clearTimeout(this.forceUpdateTimeout)
|
|
321
|
+
clearTimeout(this.forceUpdateTimeout);
|
|
322
|
+
const t = e.currentTarget.scrollLeft, i = e.currentTarget.scrollTop;
|
|
323
|
+
this.$props.columnVirtualization && (!this.isVirtualScroll || i === this.wrapperScrollTopRef) && (this.forceUpdateTimeout = setTimeout(() => {
|
|
322
324
|
this.$forceUpdate();
|
|
323
|
-
}, 0)), this._header && this._header.setScrollLeft(e.currentTarget.scrollLeft), this._footer && this._footer.setScrollLeft(e.currentTarget.scrollLeft), this.
|
|
325
|
+
}, 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;
|
|
324
326
|
},
|
|
325
327
|
rowClick(e, t) {
|
|
326
328
|
e.target.type !== "checkbox" && this.$emit("rowclick", {
|
|
@@ -334,30 +336,30 @@ const Gs = /* @__PURE__ */ st({
|
|
|
334
336
|
...this.getArguments(e)
|
|
335
337
|
});
|
|
336
338
|
},
|
|
337
|
-
loopGroupedItems(e, t,
|
|
338
|
-
return e.forEach((
|
|
339
|
-
!
|
|
340
|
-
}),
|
|
339
|
+
loopGroupedItems(e, t, i = 0, s = null) {
|
|
340
|
+
return e.forEach((r) => {
|
|
341
|
+
!s && t(r, i) && (s = r), r.items && r.items.length && !s && (s = this.loopGroupedItems(r.items, t, i + 1, s));
|
|
342
|
+
}), s;
|
|
341
343
|
},
|
|
342
344
|
updateGroupCollapsed(e) {
|
|
343
|
-
let t = this.computedCollapsed,
|
|
344
|
-
const
|
|
345
|
+
let t = this.computedCollapsed, i = t[e.level];
|
|
346
|
+
const s = this.$props.uniqueField, r = function(h, c) {
|
|
345
347
|
return h.value === e.dataItem.value && c === e.level;
|
|
346
|
-
},
|
|
348
|
+
}, l = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, r, 0, null) : e.dataItem, d = Ke(l || e.dataItem, s);
|
|
347
349
|
if (e.value) {
|
|
348
|
-
if (
|
|
349
|
-
const h =
|
|
350
|
-
h > -1 &&
|
|
350
|
+
if (i && i.length) {
|
|
351
|
+
const h = i.indexOf(d);
|
|
352
|
+
h > -1 && i.splice(h, 1);
|
|
351
353
|
}
|
|
352
354
|
} else
|
|
353
|
-
|
|
355
|
+
i ? i.includes(d) || i.push(d) : i = [d];
|
|
354
356
|
return t;
|
|
355
357
|
},
|
|
356
358
|
itemChange(e) {
|
|
357
|
-
var
|
|
358
|
-
const t =
|
|
359
|
-
if (e.field === this.$props.expandField || (
|
|
360
|
-
|
|
359
|
+
var s;
|
|
360
|
+
const t = L.call(this, "itemchange"), i = (s = this.gridContext.group) == null ? void 0 : s.value;
|
|
361
|
+
if (e.field === this.$props.expandField || (i || this.$props.detail) && e.field === void 0) {
|
|
362
|
+
L.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
|
|
361
363
|
...this.getArguments(e.event),
|
|
362
364
|
collapsedGroups: this.updateGroupCollapsed(e),
|
|
363
365
|
dataItem: e.dataItem,
|
|
@@ -404,17 +406,17 @@ const Gs = /* @__PURE__ */ st({
|
|
|
404
406
|
selectionChangeHandler(e) {
|
|
405
407
|
const {
|
|
406
408
|
event: t,
|
|
407
|
-
dataItem:
|
|
408
|
-
dataIndex:
|
|
409
|
-
columnIndex:
|
|
409
|
+
dataItem: i,
|
|
410
|
+
dataIndex: s,
|
|
411
|
+
columnIndex: r
|
|
410
412
|
} = e;
|
|
411
413
|
this.$emit("selectionchange", {
|
|
412
414
|
...this.getArguments(t.event),
|
|
413
|
-
dataItem:
|
|
414
|
-
startColIndex:
|
|
415
|
-
endColIndex:
|
|
416
|
-
startRowIndex:
|
|
417
|
-
endRowIndex:
|
|
415
|
+
dataItem: i,
|
|
416
|
+
startColIndex: r,
|
|
417
|
+
endColIndex: r,
|
|
418
|
+
startRowIndex: s,
|
|
419
|
+
endRowIndex: s,
|
|
418
420
|
dataItems: this.getLeafDataItems(),
|
|
419
421
|
altKey: !1,
|
|
420
422
|
ctrlKey: !1,
|
|
@@ -465,130 +467,141 @@ const Gs = /* @__PURE__ */ st({
|
|
|
465
467
|
}, t);
|
|
466
468
|
},
|
|
467
469
|
handleDetailExpandAction(e, t) {
|
|
468
|
-
var
|
|
470
|
+
var i;
|
|
469
471
|
if (this.detailExpandable.enabled) {
|
|
470
|
-
const
|
|
471
|
-
this
|
|
472
|
+
const s = (i = this.gridContext.detailExpand) == null ? void 0 : i.value, r = wt(s != null ? s : {}, e);
|
|
473
|
+
this.$emit("detailexpandchange", {
|
|
472
474
|
...this.getArguments(t),
|
|
473
|
-
detailExpand:
|
|
475
|
+
detailExpand: r
|
|
474
476
|
});
|
|
475
477
|
}
|
|
476
478
|
},
|
|
477
479
|
handleGroupExpandAction(e, t) {
|
|
478
|
-
var
|
|
480
|
+
var i;
|
|
479
481
|
if (this.groupExpandable.enabled) {
|
|
480
|
-
const
|
|
481
|
-
this.$props.expandField || this
|
|
482
|
+
const s = (i = this.gridContext.groupExpand) == null ? void 0 : i.value, r = vt(s != null ? s : [], e, this.groupExpandable);
|
|
483
|
+
this.$props.expandField || this.$emit("groupexpandchange", {
|
|
482
484
|
...this.getArguments(t),
|
|
483
|
-
groupExpand:
|
|
485
|
+
groupExpand: r
|
|
484
486
|
});
|
|
485
487
|
}
|
|
486
488
|
},
|
|
487
|
-
raiseDataEvent(e, t,
|
|
488
|
-
this.$props.autoProcessData
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
489
|
+
raiseDataEvent(e, t, i, s) {
|
|
490
|
+
if (this.resetVirtualSkip(), this.$props.autoProcessData)
|
|
491
|
+
this.gridContext[e]({
|
|
492
|
+
...this.getArguments(s),
|
|
493
|
+
...t
|
|
494
|
+
});
|
|
495
|
+
else if (L.call(this, e))
|
|
496
|
+
this.$emit(e, {
|
|
497
|
+
...this.getArguments(s),
|
|
498
|
+
...t
|
|
499
|
+
});
|
|
500
|
+
else if (L.call(this, "datastatechange")) {
|
|
501
|
+
const r = {
|
|
497
502
|
...this.getDataState(),
|
|
498
|
-
...
|
|
499
|
-
}
|
|
500
|
-
|
|
503
|
+
...i
|
|
504
|
+
};
|
|
505
|
+
this.gridContext.datastatechange({
|
|
506
|
+
...this.getArguments(s),
|
|
507
|
+
data: r,
|
|
508
|
+
dataState: r
|
|
509
|
+
});
|
|
510
|
+
}
|
|
501
511
|
},
|
|
502
|
-
columnReorder(e, t,
|
|
503
|
-
const
|
|
512
|
+
columnReorder(e, t, i) {
|
|
513
|
+
const s = this._columns[e], r = Oe(this.currentColumnsState), l = s.depth, d = (u) => {
|
|
504
514
|
do
|
|
505
515
|
u++;
|
|
506
|
-
while (u < this._columns.length && this._columns[u].depth >
|
|
516
|
+
while (u < this._columns.length && this._columns[u].depth > l);
|
|
507
517
|
return u;
|
|
508
518
|
}, h = this._columns.splice(e, d(e) - e);
|
|
509
|
-
this._columns.splice(e < t ? d(t - h.length) : t, 0, ...h), this._columns.filter((u) => u.declarationIndex >= 0).forEach((u,
|
|
510
|
-
u.orderIndex =
|
|
511
|
-
const
|
|
512
|
-
|
|
519
|
+
this._columns.splice(e < t ? d(t - h.length) : t, 0, ...h), this._columns.filter((u) => u.declarationIndex >= 0).forEach((u, C) => {
|
|
520
|
+
u.orderIndex = C;
|
|
521
|
+
const R = r.find((I) => I.id === u.id);
|
|
522
|
+
R && (R.orderIndex = C);
|
|
513
523
|
});
|
|
514
524
|
const c = this._columns[e].locked && this._columns[t].locked;
|
|
515
|
-
|
|
516
|
-
const
|
|
525
|
+
Rt(this._columnsMap, this._columns, c || this.shouldUpdateLeftRightRef), xt(this._columnsMap, this._columns, c || this.shouldUpdateLeftRightRef), this.resizedRef && (this.shouldUpdateLeftRightRef = !1, this.resizedRef = !1);
|
|
526
|
+
const m = this.getColumns();
|
|
517
527
|
this.$emit("columnreorder", {
|
|
518
528
|
target: this,
|
|
519
|
-
columns:
|
|
520
|
-
event:
|
|
529
|
+
columns: m,
|
|
530
|
+
event: i,
|
|
521
531
|
prev: e,
|
|
522
532
|
next: t
|
|
523
533
|
}), this.gridContext.columnsstatechange({
|
|
524
534
|
columnsState: this.currentColumnsState
|
|
525
535
|
});
|
|
526
536
|
},
|
|
527
|
-
groupReorder(e, t,
|
|
528
|
-
var
|
|
529
|
-
const
|
|
530
|
-
|
|
537
|
+
groupReorder(e, t, i) {
|
|
538
|
+
var r;
|
|
539
|
+
const s = (r = this.gridContext.group) == null ? void 0 : r.value;
|
|
540
|
+
s !== void 0 && (s.splice(t, 0, ...s.splice(e, 1)), this.groupChangeHandler(s, i));
|
|
531
541
|
},
|
|
532
|
-
columnToGroup(e, t,
|
|
533
|
-
var
|
|
534
|
-
const
|
|
535
|
-
if (!
|
|
542
|
+
columnToGroup(e, t, i) {
|
|
543
|
+
var l;
|
|
544
|
+
const s = this._columns[e].field;
|
|
545
|
+
if (!s)
|
|
536
546
|
return;
|
|
537
|
-
const
|
|
538
|
-
|
|
539
|
-
field:
|
|
540
|
-
}), this.groupChangeHandler(
|
|
547
|
+
const r = (((l = this.gridContext.group) == null ? void 0 : l.value) || []).slice();
|
|
548
|
+
r.splice(t, 0, {
|
|
549
|
+
field: s
|
|
550
|
+
}), this.groupChangeHandler(r, i);
|
|
541
551
|
},
|
|
542
552
|
resetTableWidth() {
|
|
553
|
+
var s;
|
|
543
554
|
let e = 0;
|
|
544
555
|
if (!this.columnResize.colGroupMain)
|
|
545
556
|
return;
|
|
546
|
-
const t = this.columnResize.colGroupMain.children;
|
|
547
|
-
for (let
|
|
548
|
-
const
|
|
549
|
-
if (!
|
|
557
|
+
const t = (s = this.columnResize.colGroupMain) == null ? void 0 : s.children;
|
|
558
|
+
for (let r = 0; r < t.length; r++) {
|
|
559
|
+
const l = t[r].width;
|
|
560
|
+
if (!l)
|
|
550
561
|
return;
|
|
551
|
-
e += parseFloat(
|
|
562
|
+
e += parseFloat(l.toString());
|
|
552
563
|
}
|
|
553
|
-
e = Math.round(e), this._header && this._header.setWidth(e), this._footer && this._footer.setWidth(e)
|
|
564
|
+
e = Math.round(e), this._header && this._header.setWidth(e), this._footer && this._footer.setWidth(e);
|
|
565
|
+
const i = $(this, "table");
|
|
566
|
+
i && e && (i.style.width = e + "px");
|
|
554
567
|
},
|
|
555
|
-
onResize(e, t, s,
|
|
568
|
+
onResize(e, t, i, s, r, l, d) {
|
|
556
569
|
this.resetTableWidth(), this.shouldUpdateLeftRightRef = !0, this.resizedRef = !0, this.$emit("columnresize", {
|
|
557
570
|
columns: this.getColumns(),
|
|
558
571
|
index: e,
|
|
559
572
|
targetColumnId: d,
|
|
560
|
-
event:
|
|
573
|
+
event: s,
|
|
561
574
|
newWidth: t,
|
|
562
|
-
oldWidth:
|
|
563
|
-
end:
|
|
575
|
+
oldWidth: i,
|
|
576
|
+
end: r,
|
|
564
577
|
target: this
|
|
565
|
-
}),
|
|
566
|
-
columnsState:
|
|
578
|
+
}), r && this.gridContext.columnsstatechange({
|
|
579
|
+
columnsState: l
|
|
567
580
|
});
|
|
568
581
|
},
|
|
569
582
|
initColumnsState(e, t) {
|
|
570
|
-
const
|
|
571
|
-
var
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
583
|
+
const i = (s) => {
|
|
584
|
+
var l;
|
|
585
|
+
const r = t.find((d) => d.id === s.id);
|
|
586
|
+
if (r) {
|
|
574
587
|
const d = {
|
|
575
|
-
...
|
|
588
|
+
...r
|
|
576
589
|
};
|
|
577
|
-
return d.children = (
|
|
590
|
+
return d.children = (l = s.children) == null ? void 0 : l.map(i), d;
|
|
578
591
|
}
|
|
579
|
-
return
|
|
592
|
+
return s;
|
|
580
593
|
};
|
|
581
|
-
this.currentColumnsState = e.filter((
|
|
594
|
+
this.currentColumnsState = e.filter((s) => s.parentIndex === -1).map(i);
|
|
582
595
|
},
|
|
583
596
|
configureColumns(e, t) {
|
|
584
|
-
e.filter((
|
|
585
|
-
|
|
586
|
-
}), this.$props.selectedField && this._columns.filter((
|
|
587
|
-
|
|
597
|
+
e.filter((l) => l.columnType === "checkbox").forEach((l) => {
|
|
598
|
+
l.width = l.width || "50px", l.defaultCell = _(Ve), l.defaultHeaderCell = _(Ue), l._type = "edit";
|
|
599
|
+
}), this.$props.selectedField && this._columns.filter((l) => l.field === this.$props.selectedField).forEach((l) => {
|
|
600
|
+
l.width = l.width || "50px", l.internalCell = _(Ve), l.internalHeaderCell = _(Ue);
|
|
588
601
|
});
|
|
589
|
-
const
|
|
590
|
-
this.initColumnsState(e,
|
|
591
|
-
const
|
|
602
|
+
const i = Oe(this.currentColumnsState);
|
|
603
|
+
this.initColumnsState(e, i);
|
|
604
|
+
const s = {
|
|
592
605
|
id: "",
|
|
593
606
|
resizable: !0,
|
|
594
607
|
width: "32px",
|
|
@@ -608,85 +621,87 @@ const Gs = /* @__PURE__ */ st({
|
|
|
608
621
|
ariaColumnIndex: 0,
|
|
609
622
|
isAccessible: !0
|
|
610
623
|
};
|
|
611
|
-
let
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
...
|
|
624
|
+
let r = 0;
|
|
625
|
+
if (this.detailExpandable.enabled && this.$props.detail && !this.$props.expandField) {
|
|
626
|
+
const l = {
|
|
627
|
+
...s,
|
|
615
628
|
_type: "expand",
|
|
616
|
-
id:
|
|
617
|
-
defaultCell:
|
|
618
|
-
internalCell:
|
|
629
|
+
id: E.generateNavigatableId(`${r++}`, "expand", "column"),
|
|
630
|
+
defaultCell: _(Y),
|
|
631
|
+
internalCell: _(Y),
|
|
619
632
|
field: this.detailExpandable.column,
|
|
620
633
|
headerClassName: this.hierarchClass
|
|
621
634
|
};
|
|
622
|
-
e.unshift(
|
|
635
|
+
e.unshift(l), this.currentColumnsState.unshift(i.find((d) => d.id === l.id) || l);
|
|
623
636
|
}
|
|
624
|
-
this.$props.expandField &&
|
|
625
|
-
...
|
|
626
|
-
internalCell:
|
|
637
|
+
this.$props.expandField && L.call(this, "expandchange") && this.$props.detail && (e.unshift({
|
|
638
|
+
...s,
|
|
639
|
+
internalCell: _(Y),
|
|
627
640
|
field: this.$props.expandField,
|
|
628
641
|
headerClassName: "k-hierarchy-cell k-header",
|
|
629
|
-
id:
|
|
642
|
+
id: E.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
|
|
630
643
|
...this.expandColumn
|
|
631
|
-
}),
|
|
632
|
-
for (let
|
|
644
|
+
}), r++);
|
|
645
|
+
for (let l = 0; l < t; l++) {
|
|
633
646
|
const d = {
|
|
634
|
-
...
|
|
647
|
+
...s,
|
|
635
648
|
isAccessible: !1,
|
|
636
|
-
defaultCell:
|
|
637
|
-
internalCell:
|
|
638
|
-
id:
|
|
649
|
+
defaultCell: _(Z),
|
|
650
|
+
internalCell: _(Z),
|
|
651
|
+
id: E.generateNavigatableId(`${r++}`, "group", "column"),
|
|
639
652
|
field: "value",
|
|
640
653
|
locked: this.$props.lockGroups
|
|
641
654
|
};
|
|
642
|
-
e.unshift(d), this.currentColumnsState.unshift(
|
|
655
|
+
e.unshift(d), this.currentColumnsState.unshift(i.find((h) => h.id === d.id) || d);
|
|
643
656
|
}
|
|
644
|
-
e.slice(
|
|
645
|
-
|
|
657
|
+
e.slice(r).forEach((l) => {
|
|
658
|
+
l.parentIndex >= 0 && (l.parentIndex += r), l.rowSpannable = l.rowSpannable !== void 0 ? We(l.rowSpannable) : this.computedRowSpannable;
|
|
646
659
|
});
|
|
647
660
|
},
|
|
648
661
|
initColumns(e, t) {
|
|
649
|
-
var
|
|
662
|
+
var l;
|
|
650
663
|
this._columns = this.readColumnElements();
|
|
651
|
-
const
|
|
652
|
-
this._columns.filter((d) => !d.hidden).length === 0 && (this._columns =
|
|
664
|
+
const i = (l = this.gridContext.group) == null ? void 0 : l.value;
|
|
665
|
+
this._columns.filter((d) => !d.hidden).length === 0 && (this._columns = Wt(e, i, {
|
|
653
666
|
column: this.$props.expandField ? this.$props.expandField : this.groupExpandable.column
|
|
654
667
|
}, {
|
|
655
668
|
prevId: 0,
|
|
656
669
|
idPrefix: this.idPrefix
|
|
657
670
|
})), this.configureColumns(this._columns, t);
|
|
658
|
-
const [
|
|
659
|
-
this._columns =
|
|
671
|
+
const [s, r] = this.filterColumns(this._columns);
|
|
672
|
+
this._columns = s, this.hiddenColumnsRef = r, this._columnsMap = Kt(this._columns, !0);
|
|
660
673
|
},
|
|
661
674
|
resolveTitle(e) {
|
|
662
|
-
const t = this.findColumnByField(e),
|
|
663
|
-
return
|
|
675
|
+
const t = this.findColumnByField(e), i = t && (t.title || t.field);
|
|
676
|
+
return i === void 0 ? e : i;
|
|
664
677
|
},
|
|
665
678
|
findColumnByField(e) {
|
|
666
679
|
let t;
|
|
667
|
-
return this.$props.columns.forEach((
|
|
668
|
-
const
|
|
669
|
-
|
|
680
|
+
return this.$props.columns.forEach((i) => {
|
|
681
|
+
const s = this.searchColumn(i, e);
|
|
682
|
+
s && (t = s);
|
|
670
683
|
}), t;
|
|
671
684
|
},
|
|
672
685
|
searchColumn(e, t) {
|
|
673
686
|
if (e.field === t)
|
|
674
687
|
return e;
|
|
675
688
|
if (e.children) {
|
|
676
|
-
let
|
|
677
|
-
for (
|
|
678
|
-
|
|
679
|
-
return
|
|
689
|
+
let i, s = null;
|
|
690
|
+
for (i = 0; s == null && i < e.children.length; i++)
|
|
691
|
+
s = this.searchColumn(e.children[i], t);
|
|
692
|
+
return s;
|
|
680
693
|
}
|
|
681
694
|
return null;
|
|
682
695
|
},
|
|
683
696
|
getDataState() {
|
|
697
|
+
var l, d, h, c, m;
|
|
698
|
+
const e = (l = this.gridContext.sort) == null ? void 0 : l.value, t = (d = this.gridContext.filter) == null ? void 0 : d.value, i = (h = this.gridContext.skip) == null ? void 0 : h.value, s = (c = this.gridContext.take) == null ? void 0 : c.value, r = (m = this.gridContext.group) == null ? void 0 : m.value;
|
|
684
699
|
return {
|
|
685
|
-
filter:
|
|
686
|
-
sort:
|
|
687
|
-
skip:
|
|
688
|
-
take:
|
|
689
|
-
group:
|
|
700
|
+
filter: t,
|
|
701
|
+
sort: e,
|
|
702
|
+
skip: i,
|
|
703
|
+
take: s !== void 0 ? s : this.$props.pageSize,
|
|
704
|
+
group: r
|
|
690
705
|
};
|
|
691
706
|
},
|
|
692
707
|
getArguments(e) {
|
|
@@ -703,59 +718,76 @@ const Gs = /* @__PURE__ */ st({
|
|
|
703
718
|
return e && (t = this.addSubItems(e, t)), t;
|
|
704
719
|
},
|
|
705
720
|
addSubItems(e, t) {
|
|
706
|
-
return e.forEach((
|
|
707
|
-
t++,
|
|
721
|
+
return e.forEach((i) => {
|
|
722
|
+
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++;
|
|
708
723
|
}), t;
|
|
709
724
|
},
|
|
710
725
|
searchChange(e) {
|
|
711
|
-
const t = this.$props.searchFields || this._columns.map((
|
|
726
|
+
const t = this.$props.searchFields || this._columns.map((r) => r.field) || [], i = e.event.target.value, s = {
|
|
712
727
|
logic: "or",
|
|
713
|
-
filters: t.filter((
|
|
714
|
-
var
|
|
715
|
-
return typeof
|
|
716
|
-
field:
|
|
717
|
-
value:
|
|
728
|
+
filters: t.filter((r) => r !== void 0).map((r) => {
|
|
729
|
+
var l;
|
|
730
|
+
return typeof r == "string" ? {
|
|
731
|
+
field: r,
|
|
732
|
+
value: i,
|
|
718
733
|
operator: "contains"
|
|
719
734
|
} : {
|
|
720
|
-
value:
|
|
721
|
-
operator: (
|
|
722
|
-
field:
|
|
723
|
-
ignoreCase:
|
|
735
|
+
value: i,
|
|
736
|
+
operator: (l = r.operator) != null ? l : "contains",
|
|
737
|
+
field: r.field,
|
|
738
|
+
ignoreCase: r.ignoreCase
|
|
724
739
|
};
|
|
725
740
|
})
|
|
726
741
|
};
|
|
727
742
|
this.raiseDataEvent("searchchange", {
|
|
728
|
-
search:
|
|
743
|
+
search: s
|
|
729
744
|
}, {
|
|
730
745
|
skip: 0
|
|
731
746
|
}, e);
|
|
732
747
|
},
|
|
733
748
|
getCellsToRender(e, t) {
|
|
734
|
-
var
|
|
735
|
-
const
|
|
736
|
-
let
|
|
749
|
+
var l;
|
|
750
|
+
const i = [];
|
|
751
|
+
let s = null, r = 0;
|
|
737
752
|
if (t.forEach((d, h) => {
|
|
738
753
|
const c = parseFloat((d.width || "").toString()) || 10;
|
|
739
|
-
if (
|
|
740
|
-
|
|
754
|
+
if (r) {
|
|
755
|
+
r--, s && (s.width += c);
|
|
741
756
|
return;
|
|
742
757
|
}
|
|
743
|
-
const
|
|
744
|
-
|
|
758
|
+
const m = Math.min(Ot(d, e), t.length - h);
|
|
759
|
+
r = m - 1, s = {
|
|
745
760
|
width: c,
|
|
746
|
-
colSpan:
|
|
761
|
+
colSpan: m,
|
|
747
762
|
columnIndex: h
|
|
748
|
-
},
|
|
763
|
+
}, i.push(s);
|
|
749
764
|
}), this.$props.columnVirtualization) {
|
|
750
|
-
const d = this.
|
|
751
|
-
return
|
|
752
|
-
cellModels:
|
|
765
|
+
const d = this.scrollLeftRef || 0, h = this.tableWidth || parseFloat((((l = this.$attrs.style) == null ? void 0 : l.width) || "").toString());
|
|
766
|
+
return Zt({
|
|
767
|
+
cellModels: i,
|
|
753
768
|
columns: t,
|
|
754
769
|
tableViewPortWidth: h,
|
|
755
770
|
scrollLeft: d
|
|
756
771
|
});
|
|
757
772
|
}
|
|
758
|
-
return
|
|
773
|
+
return i;
|
|
774
|
+
},
|
|
775
|
+
calcVirtualPageSize() {
|
|
776
|
+
const {
|
|
777
|
+
pageable: e,
|
|
778
|
+
take: t,
|
|
779
|
+
pageSize: i
|
|
780
|
+
} = this.$props;
|
|
781
|
+
if (!this.isVirtualScroll)
|
|
782
|
+
return 0;
|
|
783
|
+
if (!e) {
|
|
784
|
+
if (t)
|
|
785
|
+
return t;
|
|
786
|
+
if (i)
|
|
787
|
+
return i;
|
|
788
|
+
}
|
|
789
|
+
const s = this.$props.rowHeight || this._minRowHeightRef, r = this._containerHeightRef;
|
|
790
|
+
return r && s ? Math.ceil(r / s * 1.5) : 0;
|
|
759
791
|
}
|
|
760
792
|
},
|
|
761
793
|
provide() {
|
|
@@ -769,89 +801,101 @@ const Gs = /* @__PURE__ */ st({
|
|
|
769
801
|
};
|
|
770
802
|
},
|
|
771
803
|
setup(e) {
|
|
772
|
-
const t =
|
|
804
|
+
const t = x(null), i = x(null), s = x(null), r = x(null), l = x(null), d = x(null), h = x(null), c = x(null), m = x(null), u = x(null), C = x(!0), R = x(!1), I = nt(Yt, {});
|
|
773
805
|
return {
|
|
774
806
|
groupPanelDivRef: t,
|
|
775
|
-
dropElementClueRef:
|
|
776
|
-
dragElementClueRef:
|
|
777
|
-
headerRef:
|
|
778
|
-
footerRef:
|
|
807
|
+
dropElementClueRef: i,
|
|
808
|
+
dragElementClueRef: s,
|
|
809
|
+
headerRef: r,
|
|
810
|
+
footerRef: l,
|
|
779
811
|
gridNavRef: d,
|
|
780
812
|
colGroupRef: h,
|
|
781
813
|
scrollContainerRef: c,
|
|
782
|
-
scrollTableRef:
|
|
814
|
+
scrollTableRef: m,
|
|
783
815
|
scrollTableBodyRef: u,
|
|
784
|
-
gridContext:
|
|
785
|
-
shouldUpdateLeftRightRef:
|
|
786
|
-
resizedRef:
|
|
816
|
+
gridContext: I,
|
|
817
|
+
shouldUpdateLeftRightRef: C,
|
|
818
|
+
resizedRef: R,
|
|
787
819
|
currentColumnsState: e.columnsState
|
|
788
820
|
};
|
|
789
821
|
},
|
|
790
822
|
render() {
|
|
791
|
-
var ge, fe, me, Ce, $e,
|
|
792
|
-
const e = (ge = this.gridContext.sort) == null ? void 0 : ge.value, t = (fe = this.gridContext.filter) == null ? void 0 : fe.value,
|
|
793
|
-
|
|
794
|
-
|
|
823
|
+
var ge, fe, me, Ce, be, $e, Re, xe, ve, we, Ie;
|
|
824
|
+
const e = (ge = this.gridContext.sort) == null ? void 0 : ge.value, t = (fe = this.gridContext.filter) == null ? void 0 : fe.value, i = (me = this.gridContext.search) == null ? void 0 : me.value, s = (Ce = this.gridContext.skip) == null ? void 0 : Ce.value, r = (be = this.gridContext.take) == null ? void 0 : be.value, l = ($e = this.gridContext.group) == null ? void 0 : $e.value, d = (Re = this.gridContext.groupExpand) == null ? void 0 : Re.value, h = (xe = this.gridContext.detailExpand) == null ? void 0 : xe.value, c = !!(l != null && l.length);
|
|
825
|
+
let m;
|
|
826
|
+
this.currentColumnsState = (ve = this.gridContext.columnsState) == null ? void 0 : ve.value;
|
|
827
|
+
const u = this.$props.autoProcessData === !0 ? {
|
|
795
828
|
group: !0,
|
|
796
829
|
sort: !0,
|
|
797
830
|
filter: !0,
|
|
798
831
|
search: !0,
|
|
799
832
|
page: !0
|
|
800
833
|
} : this.$props.autoProcessData;
|
|
801
|
-
let
|
|
802
|
-
const
|
|
803
|
-
let
|
|
804
|
-
Array.isArray(this.$props.dataItems) ?
|
|
805
|
-
const
|
|
806
|
-
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable =
|
|
807
|
-
const
|
|
808
|
-
if (this.currentData = [],
|
|
809
|
-
const
|
|
810
|
-
data:
|
|
811
|
-
total:
|
|
812
|
-
} =
|
|
813
|
-
group:
|
|
814
|
-
sort:
|
|
815
|
-
filter:
|
|
816
|
-
...
|
|
817
|
-
take: this.$props.pageable ?
|
|
818
|
-
skip:
|
|
834
|
+
let C = this.$props.total || 0;
|
|
835
|
+
const R = E.getIdPrefix(this.navigation);
|
|
836
|
+
let I = [];
|
|
837
|
+
Array.isArray(this.$props.dataItems) ? I = this.$props.dataItems : this.$props.dataItems && (I = Nt(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField).data, C = C || this.$props.dataItems.total);
|
|
838
|
+
const te = this.$props.groupable === !0 || A(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
839
|
+
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = te, this._virtualPageSize = this.calcVirtualPageSize();
|
|
840
|
+
const V = I.length === C, Je = A(this.$props.groupable) && this.$props.groupable.footer || "none";
|
|
841
|
+
if (this.currentData = [], u) {
|
|
842
|
+
const a = u.page && !(this.isVirtualScroll && !this.$props.pageable), {
|
|
843
|
+
data: f,
|
|
844
|
+
total: S
|
|
845
|
+
} = Xt(I, {
|
|
846
|
+
group: u.group ? l : void 0,
|
|
847
|
+
sort: u.sort ? e : void 0,
|
|
848
|
+
filter: Ct(u.filter ? t : void 0, u.search ? i : void 0),
|
|
849
|
+
...a ? {
|
|
850
|
+
take: this.$props.pageable ? r || 10 : r,
|
|
851
|
+
skip: s || 0
|
|
819
852
|
} : {}
|
|
820
853
|
});
|
|
821
|
-
|
|
854
|
+
I = f, C = (we = this.$props.total) != null ? we : S;
|
|
822
855
|
}
|
|
823
856
|
const {
|
|
824
|
-
resolvedGroupsCount:
|
|
825
|
-
flattedData:
|
|
826
|
-
} = this.getFlatData(
|
|
827
|
-
this.currentData =
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
|
|
857
|
+
resolvedGroupsCount: Qe,
|
|
858
|
+
flattedData: Xe
|
|
859
|
+
} = this.getFlatData(I, Je, V ? 0 : this.$props.skip || 0, l, h, d, this.$props.dataItemKey);
|
|
860
|
+
this.currentData = Xe;
|
|
861
|
+
const N = this._virtualSkipRef || 0;
|
|
862
|
+
if (this._virtualTotal = C, this.isVirtualScroll) {
|
|
863
|
+
let a = s || 0;
|
|
864
|
+
if ((c || this.$props.pageable) && (a = N, this._virtualTotal = this.currentData.length), V || c || this.$props.pageable)
|
|
865
|
+
if (this._virtualPageSize === 0) {
|
|
866
|
+
const f = Math.min(r || this.$props.pageSize || 20, this.currentData.length);
|
|
867
|
+
m = this.currentData.slice(a, a + f);
|
|
868
|
+
} else
|
|
869
|
+
m = this.currentData.slice(a, a + this._virtualPageSize);
|
|
870
|
+
}
|
|
871
|
+
this.initializeVirtualization(), this.initColumns(this.$props.dataItems, Qe), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this._columns, this.columnResize.columnsState = dt(this.currentColumnsState || []), this.dragLogic.columns = this._columns;
|
|
872
|
+
const ie = this.$props.toolbar, P = this.$props.noRecords, z = this._columns.filter((a) => a.children.length === 0), se = te && n(Tt, {
|
|
873
|
+
ref: (a) => {
|
|
874
|
+
this.groupPanelDivRef = a;
|
|
831
875
|
},
|
|
832
|
-
group:
|
|
876
|
+
group: l || [],
|
|
833
877
|
ariaControls: this._gridRoleElementId,
|
|
834
878
|
onGroupChange: this.groupChangeHandler,
|
|
835
879
|
onPressHandler: this.dragLogic.pressHandler,
|
|
836
880
|
onDragHandler: this.dragLogic.dragHandler,
|
|
837
881
|
onReleaseHandler: this.dragLogic.releaseHandler,
|
|
838
882
|
resolveTitle: this.resolveTitle
|
|
839
|
-
}, null),
|
|
840
|
-
ref: (
|
|
841
|
-
this.dropElementClueRef =
|
|
883
|
+
}, null), re = (this.dragLogic.reorderable || this.dragLogic.groupable) && Q && document && document.body, le = [re && n(Vt, {
|
|
884
|
+
ref: (a) => {
|
|
885
|
+
this.dropElementClueRef = a;
|
|
842
886
|
}
|
|
843
|
-
}, null),
|
|
844
|
-
ref: (
|
|
845
|
-
this.dragElementClueRef =
|
|
887
|
+
}, null), re && n(At, {
|
|
888
|
+
ref: (a) => {
|
|
889
|
+
this.dragElementClueRef = a;
|
|
846
890
|
}
|
|
847
|
-
}, null)],
|
|
891
|
+
}, null)], ae = n(Et, {
|
|
848
892
|
size: this.$props.size,
|
|
849
893
|
columnResize: this.columnResize,
|
|
850
894
|
staticHeaders: this.$props.scrollable !== "none",
|
|
851
|
-
ref: (
|
|
852
|
-
this.headerRef =
|
|
895
|
+
ref: (a) => {
|
|
896
|
+
this.headerRef = a;
|
|
853
897
|
},
|
|
854
|
-
headerRow:
|
|
898
|
+
headerRow: n(zt, {
|
|
855
899
|
grid: this,
|
|
856
900
|
sort: e,
|
|
857
901
|
groupable: this.$props.groupable,
|
|
@@ -860,7 +904,7 @@ const Gs = /* @__PURE__ */ st({
|
|
|
860
904
|
onSortChange: this.sortChangeHandler,
|
|
861
905
|
filter: t,
|
|
862
906
|
filterable: this.$props.filterable,
|
|
863
|
-
filterOperators: this.$props.filterOperators ||
|
|
907
|
+
filterOperators: this.$props.filterOperators || Ne,
|
|
864
908
|
onFilterChange: this.filterChangeHandler,
|
|
865
909
|
columnMenu: this.$props.columnMenu,
|
|
866
910
|
columnMenuIcon: this.$props.columnMenuIcon,
|
|
@@ -876,12 +920,12 @@ const Gs = /* @__PURE__ */ st({
|
|
|
876
920
|
cellRender: this.$props.headerCellRender,
|
|
877
921
|
isRtl: this.isRtl,
|
|
878
922
|
isColCountDefined: this.getAriaColCount !== void 0,
|
|
879
|
-
filterRow: this.$props.filterable &&
|
|
923
|
+
filterRow: this.$props.filterable && n(Dt, {
|
|
880
924
|
grid: this,
|
|
881
925
|
size: this.$props.size,
|
|
882
926
|
columns: this._columns,
|
|
883
927
|
filter: t,
|
|
884
|
-
filterOperators: this.$props.filterOperators ||
|
|
928
|
+
filterOperators: this.$props.filterOperators || Ne,
|
|
885
929
|
onFilterchange: this.filterChangeHandler,
|
|
886
930
|
sort: this.$props.sort,
|
|
887
931
|
cellRender: this.$props.filterCellRender,
|
|
@@ -889,127 +933,138 @@ const Gs = /* @__PURE__ */ st({
|
|
|
889
933
|
ariaRowIndex: this._columnsMap.length + 1
|
|
890
934
|
}, null) || void 0
|
|
891
935
|
}, null),
|
|
892
|
-
cols:
|
|
893
|
-
return
|
|
894
|
-
key:
|
|
895
|
-
width:
|
|
936
|
+
cols: z.map(function(a, f) {
|
|
937
|
+
return n("col", {
|
|
938
|
+
key: f.toString(),
|
|
939
|
+
width: a.width !== void 0 ? Math.floor(parseFloat(a.width.toString())) : void 0
|
|
896
940
|
}, null);
|
|
897
941
|
}, this)
|
|
898
|
-
}, null),
|
|
942
|
+
}, null), oe = this._columns.some((a) => !!a.footerCell) ? n(Gt, {
|
|
899
943
|
size: this.$props.size,
|
|
900
944
|
columnResize: this.columnResize,
|
|
901
945
|
staticHeaders: this.$props.scrollable !== "none",
|
|
902
|
-
ref: (
|
|
903
|
-
this.footerRef =
|
|
946
|
+
ref: (a) => {
|
|
947
|
+
this.footerRef = a;
|
|
904
948
|
},
|
|
905
|
-
row:
|
|
949
|
+
row: n(Ft, {
|
|
906
950
|
isRtl: this.isRtl,
|
|
907
951
|
rowIndex: this.getAriaRowCount + 1,
|
|
908
952
|
columns: this._columns
|
|
909
953
|
}, null),
|
|
910
|
-
cols:
|
|
911
|
-
return
|
|
912
|
-
key:
|
|
913
|
-
width:
|
|
954
|
+
cols: z.map(function(a, f) {
|
|
955
|
+
return n("col", {
|
|
956
|
+
key: f.toString(),
|
|
957
|
+
width: a.width !== void 0 ? Math.floor(parseFloat(a.width.toString())) : void 0
|
|
914
958
|
}, null);
|
|
915
959
|
}, this)
|
|
916
|
-
}, null) :
|
|
960
|
+
}, null) : n("span", null, null), Ye = this.showLicenseWatermark ? n(ht, {
|
|
917
961
|
message: this.licenseMessage
|
|
918
|
-
}, null) : null,
|
|
919
|
-
this.tableWidth = parseFloat(
|
|
920
|
-
const
|
|
921
|
-
let
|
|
922
|
-
|
|
923
|
-
const
|
|
924
|
-
let
|
|
925
|
-
const
|
|
926
|
-
return
|
|
927
|
-
row:
|
|
928
|
-
columnIndex:
|
|
929
|
-
colSpan:
|
|
962
|
+
}, null) : null, O = this.$attrs.style, Ze = O && A(O) && O["width"] || "";
|
|
963
|
+
this.tableWidth = parseFloat(Ze.toString());
|
|
964
|
+
const ne = z.findIndex((a) => typeof a.colSpan == "function") > -1;
|
|
965
|
+
let W;
|
|
966
|
+
ne || (W = this.getCellsToRender(null, z));
|
|
967
|
+
const et = function(a, f, S, Se, k) {
|
|
968
|
+
let p = !1;
|
|
969
|
+
const D = this.$props.selectedField, y = D ? Pe(D, a.dataItem) : void 0, v = this.$props.highlight && this.$props.dataItemKey && X(this.$props.dataItemKey)(a.dataItem) !== void 0 ? this.$props.highlight[X(this.$props.dataItemKey)(a.dataItem)] : void 0;
|
|
970
|
+
return ne && (W = this.getCellsToRender(a.dataItem, z)), {
|
|
971
|
+
row: W.map(function({
|
|
972
|
+
columnIndex: b,
|
|
973
|
+
colSpan: T
|
|
930
974
|
}) {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
975
|
+
var ke, _e, Ee, ze;
|
|
976
|
+
const o = z[b];
|
|
977
|
+
let w;
|
|
978
|
+
if ((ke = o.rowSpannable) != null && ke.enabled && a.rowType === "data" && o.field && k) {
|
|
979
|
+
const g = o.field ? (Ee = (_e = o.rowSpannable).valueGetter) == null ? void 0 : Ee.call(_e, a.dataItem, o.field) : null;
|
|
980
|
+
w = {
|
|
981
|
+
value: g,
|
|
982
|
+
count: 1
|
|
983
|
+
}, k[o.field] && ((ze = k[o.field]) == null ? void 0 : ze.value) === g && k[o.field] !== null ? (k[o.field].count++, w.count = null) : k[o.field] = w;
|
|
984
|
+
}
|
|
985
|
+
const F = `${o.className ? o.className + " " : ""}${o.locked ? "k-grid-content-sticky" : ""}`, H = o.left !== void 0 ? this.isRtl ? {
|
|
986
|
+
left: o.right + "px",
|
|
987
|
+
right: o.left + "px"
|
|
934
988
|
} : {
|
|
935
|
-
left:
|
|
936
|
-
right:
|
|
989
|
+
left: o.left + "px",
|
|
990
|
+
right: o.right + "px"
|
|
937
991
|
} : {};
|
|
938
|
-
let
|
|
939
|
-
if (
|
|
940
|
-
const
|
|
941
|
-
(
|
|
992
|
+
let ye = !1;
|
|
993
|
+
if (o.editable && this.$props.editField) {
|
|
994
|
+
const g = Pe(this.$props.editField, a.dataItem);
|
|
995
|
+
(g === !0 || g === o.field) && (p = !0, ye = !0);
|
|
942
996
|
}
|
|
943
|
-
let
|
|
944
|
-
|
|
945
|
-
const He = this.computedCollapsed && this.computedCollapsed[
|
|
946
|
-
return
|
|
947
|
-
key:
|
|
948
|
-
id:
|
|
949
|
-
colSpan:
|
|
950
|
-
dataItem:
|
|
951
|
-
field:
|
|
952
|
-
editor:
|
|
953
|
-
format:
|
|
954
|
-
readFormat:
|
|
955
|
-
type:
|
|
956
|
-
className:
|
|
957
|
-
render:
|
|
997
|
+
let M;
|
|
998
|
+
o.cell && (M = o.cell);
|
|
999
|
+
const He = this.computedCollapsed && this.computedCollapsed[a.level] && this.computedCollapsed[a.level].some((g) => g === Ke(a.dataItem, this.$props.uniqueField)), j = o.id ? o.id : b, q = He ? !He : a.expanded || a.dataItem.expanded, lt = o._type === "expand", J = E.generateNavigatableId(`${f}-${String(b)}`, R, lt || a.rowType === "groupHeader" || a.rowType === "groupFooter" || o.field === "value" ? "nodata" : "cell");
|
|
1000
|
+
return o.internalCell ? n(o.internalCell, {
|
|
1001
|
+
key: j,
|
|
1002
|
+
id: J,
|
|
1003
|
+
colSpan: T,
|
|
1004
|
+
dataItem: a.dataItem,
|
|
1005
|
+
field: o.field || "",
|
|
1006
|
+
editor: o.editor,
|
|
1007
|
+
format: o.format,
|
|
1008
|
+
readFormat: o.readFormat,
|
|
1009
|
+
type: o.type,
|
|
1010
|
+
className: F,
|
|
1011
|
+
render: M || this.$props.cellRender,
|
|
958
1012
|
onChange: this.itemChange,
|
|
959
|
-
onSelectionchange: (
|
|
960
|
-
event:
|
|
961
|
-
dataItem:
|
|
962
|
-
dataIndex:
|
|
963
|
-
columnIndex:
|
|
1013
|
+
onSelectionchange: (g) => this.selectionChangeHandler({
|
|
1014
|
+
event: g,
|
|
1015
|
+
dataItem: a.dataItem,
|
|
1016
|
+
dataIndex: S,
|
|
1017
|
+
columnIndex: b
|
|
964
1018
|
}),
|
|
965
|
-
columnIndex:
|
|
966
|
-
columnsCount: this._columns.filter((
|
|
967
|
-
rowType:
|
|
968
|
-
level:
|
|
969
|
-
expanded:
|
|
970
|
-
dataIndex:
|
|
971
|
-
style:
|
|
972
|
-
ariaColumnIndex:
|
|
1019
|
+
columnIndex: b,
|
|
1020
|
+
columnsCount: this._columns.filter((g) => !g.children.length).length,
|
|
1021
|
+
rowType: a.rowType,
|
|
1022
|
+
level: a.level,
|
|
1023
|
+
expanded: q,
|
|
1024
|
+
dataIndex: a.dataIndex,
|
|
1025
|
+
style: H,
|
|
1026
|
+
ariaColumnIndex: o.ariaColumnIndex,
|
|
973
1027
|
isRtl: this.isRtl,
|
|
974
|
-
isSelected: Array.isArray(
|
|
975
|
-
isHighlighted: !!(typeof
|
|
976
|
-
group:
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1028
|
+
isSelected: Array.isArray(y) && y.indexOf(b) > -1,
|
|
1029
|
+
isHighlighted: !!(typeof v != "boolean" && v && o.field && v[o.field] === !0),
|
|
1030
|
+
group: a.group,
|
|
1031
|
+
rowSpan: w
|
|
1032
|
+
}, null) : ye ? n(_t, {
|
|
1033
|
+
id: J,
|
|
1034
|
+
key: j,
|
|
1035
|
+
colSpan: T,
|
|
1036
|
+
dataItem: a.dataItem,
|
|
1037
|
+
field: o.field || "",
|
|
1038
|
+
editor: o.editor,
|
|
1039
|
+
format: o.format,
|
|
1040
|
+
readFormat: o.readFormat,
|
|
1041
|
+
type: o.type,
|
|
1042
|
+
className: F,
|
|
1043
|
+
render: M || this.$props.cellRender,
|
|
989
1044
|
onEdit: this.editHandler,
|
|
990
1045
|
onRemove: this.removeHandler,
|
|
991
1046
|
onSave: this.saveHandler,
|
|
992
1047
|
onCancel: this.cancelHandler,
|
|
993
1048
|
onChange: this.itemChange,
|
|
994
|
-
columnIndex:
|
|
995
|
-
columnsCount: this._columns.filter((
|
|
996
|
-
rowType:
|
|
997
|
-
level:
|
|
998
|
-
expanded:
|
|
999
|
-
dataIndex:
|
|
1000
|
-
style:
|
|
1001
|
-
}, null) :
|
|
1002
|
-
key:
|
|
1003
|
-
id:
|
|
1004
|
-
colSpan:
|
|
1005
|
-
dataItem:
|
|
1006
|
-
field:
|
|
1007
|
-
editor:
|
|
1008
|
-
format:
|
|
1009
|
-
readFormat:
|
|
1010
|
-
type:
|
|
1011
|
-
className:
|
|
1012
|
-
render:
|
|
1049
|
+
columnIndex: b,
|
|
1050
|
+
columnsCount: this._columns.filter((g) => !g.children.length).length,
|
|
1051
|
+
rowType: a.rowType,
|
|
1052
|
+
level: a.level,
|
|
1053
|
+
expanded: q,
|
|
1054
|
+
dataIndex: a.dataIndex,
|
|
1055
|
+
style: H
|
|
1056
|
+
}, null) : n(qt, {
|
|
1057
|
+
key: j,
|
|
1058
|
+
id: J,
|
|
1059
|
+
colSpan: T,
|
|
1060
|
+
dataItem: a.dataItem,
|
|
1061
|
+
field: o.field || "",
|
|
1062
|
+
editor: o.editor,
|
|
1063
|
+
format: o.format,
|
|
1064
|
+
readFormat: o.readFormat,
|
|
1065
|
+
type: o.type,
|
|
1066
|
+
className: F,
|
|
1067
|
+
render: M || this.$props.cellRender,
|
|
1013
1068
|
onCellclick: this.cellClickHandler,
|
|
1014
1069
|
onCellkeydown: this.cellKeydownHandler,
|
|
1015
1070
|
onEdit: this.editHandler,
|
|
@@ -1017,232 +1072,236 @@ const Gs = /* @__PURE__ */ st({
|
|
|
1017
1072
|
onSave: this.saveHandler,
|
|
1018
1073
|
onCancel: this.cancelHandler,
|
|
1019
1074
|
onChange: this.itemChange,
|
|
1020
|
-
onSelectionchange: (
|
|
1021
|
-
event:
|
|
1022
|
-
dataItem:
|
|
1023
|
-
dataIndex:
|
|
1024
|
-
columnIndex:
|
|
1075
|
+
onSelectionchange: (g) => this.selectionChangeHandler({
|
|
1076
|
+
event: g,
|
|
1077
|
+
dataItem: a.dataItem,
|
|
1078
|
+
dataIndex: S,
|
|
1079
|
+
columnIndex: b
|
|
1025
1080
|
}),
|
|
1026
|
-
columnIndex:
|
|
1027
|
-
columnsCount: this._columns.filter((
|
|
1028
|
-
rowType:
|
|
1029
|
-
level:
|
|
1030
|
-
expanded:
|
|
1031
|
-
dataIndex:
|
|
1032
|
-
style:
|
|
1033
|
-
|
|
1034
|
-
|
|
1081
|
+
columnIndex: b,
|
|
1082
|
+
columnsCount: this._columns.filter((g) => !g.children.length).length,
|
|
1083
|
+
rowType: a.rowType,
|
|
1084
|
+
level: a.level,
|
|
1085
|
+
expanded: q,
|
|
1086
|
+
dataIndex: a.dataIndex,
|
|
1087
|
+
style: H,
|
|
1088
|
+
rowSpan: w,
|
|
1089
|
+
isSelected: Array.isArray(y) && y.indexOf(b) > -1,
|
|
1090
|
+
isHighlighted: !!(typeof v != "boolean" && v && o.field && v[o.field] === !0)
|
|
1035
1091
|
}, null);
|
|
1036
1092
|
}, this),
|
|
1037
|
-
isInEdit:
|
|
1038
|
-
isSelected: typeof
|
|
1039
|
-
isHighlighted: typeof
|
|
1093
|
+
isInEdit: p,
|
|
1094
|
+
isSelected: typeof y == "boolean" && y,
|
|
1095
|
+
isHighlighted: typeof v == "boolean" && v
|
|
1040
1096
|
};
|
|
1041
1097
|
};
|
|
1042
|
-
let
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1098
|
+
let tt = 0, K = [];
|
|
1099
|
+
const U = !this.currentData.length, de = (a) => a >= this.currentData.length - tt;
|
|
1100
|
+
let B = 0;
|
|
1101
|
+
if (this.currentData.length) {
|
|
1102
|
+
const a = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
|
|
1103
|
+
let f = this.$props.skip || 0, S = -1, Se = 0;
|
|
1104
|
+
const k = this.computedRowSpannable.enabled ? {} : void 0;
|
|
1105
|
+
if (this.isVirtualScroll) {
|
|
1106
|
+
if (N > 0) {
|
|
1107
|
+
const p = this.currentData.slice(0, N).filter((D) => D.rowType === "data").length;
|
|
1108
|
+
S += p, f += p;
|
|
1109
|
+
}
|
|
1110
|
+
!this.$props.pageable && V && (S += this.$props.skip || 0);
|
|
1052
1111
|
}
|
|
1112
|
+
K = (m || this.currentData).map(function(p, D) {
|
|
1113
|
+
p.rowType === "data" && S++;
|
|
1114
|
+
const y = p.dataIndex % 2 !== 0, v = this.$props.dataItemKey && X(this.$props.dataItemKey)(p.dataItem), b = D + f, T = v || "ai" + b, o = T + "_1", w = et.call(this, p, T, S, y, k), F = z.length - (this.detailExpandable.enabled ? 1 : 0) - ((l == null ? void 0 : l.length) || 0) || 1;
|
|
1115
|
+
return B = b + a + Se, [n(Jt, {
|
|
1116
|
+
key: T,
|
|
1117
|
+
item: p,
|
|
1118
|
+
dataIndex: S,
|
|
1119
|
+
ariaRowIndex: B,
|
|
1120
|
+
absoluteRowIndex: b,
|
|
1121
|
+
isAltRow: y,
|
|
1122
|
+
isHidden: de(D),
|
|
1123
|
+
rowHeight: this.$props.rowHeight,
|
|
1124
|
+
isSelected: w.isSelected,
|
|
1125
|
+
isHighlighted: w.isHighlighted,
|
|
1126
|
+
isInEdit: w.isInEdit,
|
|
1127
|
+
rowType: p.rowType,
|
|
1128
|
+
onRowclick: (H) => this.rowClick(H, p),
|
|
1129
|
+
onRowdblclick: (H) => this.rowDoubleClick(H, p),
|
|
1130
|
+
render: this.$props.rowRender,
|
|
1131
|
+
class: this.$props.rowClass ? this.$props.rowClass(p) : ""
|
|
1132
|
+
}, {
|
|
1133
|
+
default: () => [w.row]
|
|
1134
|
+
}), this.$props.detail && p.rowType === "data" && (p.expanded || p.dataItem.expanded) && n("tr", {
|
|
1135
|
+
key: o,
|
|
1136
|
+
class: y ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
|
|
1137
|
+
style: {
|
|
1138
|
+
visibility: de(D) ? "hidden" : "",
|
|
1139
|
+
height: this.$props.detailRowHeight + "px"
|
|
1140
|
+
},
|
|
1141
|
+
role: "row",
|
|
1142
|
+
"aria-rowindex": B
|
|
1143
|
+
}, [l == null ? void 0 : l.map(function(H) {
|
|
1144
|
+
return n(Z, {
|
|
1145
|
+
id: "",
|
|
1146
|
+
dataIndex: p.dataIndex,
|
|
1147
|
+
field: H.field,
|
|
1148
|
+
dataItem: p.dataItem,
|
|
1149
|
+
key: `group-${H.field}-${p.dataIndex}`,
|
|
1150
|
+
group: p.group
|
|
1151
|
+
}, null);
|
|
1152
|
+
}, this), (this.$props.expandField || this.detailExpandable.enabled) && n(Ht, {
|
|
1153
|
+
id: E.generateNavigatableId(`${o}-dhcell`, R)
|
|
1154
|
+
}, null), n(kt, {
|
|
1155
|
+
dataItem: p.dataItem,
|
|
1156
|
+
dataIndex: p.dataIndex,
|
|
1157
|
+
colSpan: F,
|
|
1158
|
+
ariaColIndex: 2 + (l ? l.length : 0),
|
|
1159
|
+
detail: this.$props.detail ? this.$props.detail : void 0,
|
|
1160
|
+
id: E.generateNavigatableId(`${o}-dcell`, R)
|
|
1161
|
+
}, null)])];
|
|
1162
|
+
}, this);
|
|
1053
1163
|
}
|
|
1054
|
-
const
|
|
1055
|
-
let N = this.vs.propsSkip || 0;
|
|
1056
|
-
const T = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
|
|
1057
|
-
let F, O = -1, W = 0;
|
|
1058
|
-
const de = this.currentData.length && this.currentData.map(function(r, p) {
|
|
1059
|
-
r.rowType === "data" && (N++, O++), this.$props.alternatePerGroup && r.rowType === "groupHeader" && (N = 0);
|
|
1060
|
-
const x = N % 2 === 0, D = this.$props.dataItemKey && q(this.$props.dataItemKey)(r.dataItem), _ = p + (this.vs.propsSkip || 0), I = D || "ai" + _, $ = I + "_1";
|
|
1061
|
-
F = _ + T + W;
|
|
1062
|
-
let C;
|
|
1063
|
-
this.$props.detail && r.rowType === "data" && (r.expanded || r.dataItem.expanded) && (C = y.length - (this.detailExpandable.enabled || this.$props.expandField ? 1 : 0) - (a ? a.length : 0) || 1, W++, F = _ + T + W);
|
|
1064
|
-
const G = p * 2 + T, n = p * 2 + T + 1, S = Xe.call(this, r, I, O);
|
|
1065
|
-
return [o(Wt, {
|
|
1066
|
-
key: I,
|
|
1067
|
-
dataItem: r.dataItem,
|
|
1068
|
-
isAltRow: x,
|
|
1069
|
-
isInEdit: S.isInEdit,
|
|
1070
|
-
isSelected: S.isSelected,
|
|
1071
|
-
isHighlighted: S.isHighlighted,
|
|
1072
|
-
rowType: r.rowType,
|
|
1073
|
-
isHidden: ne(p),
|
|
1074
|
-
onRowclick: (w) => this.rowClick(w, r),
|
|
1075
|
-
onRowdblclick: (w) => this.rowDoubleClick(w, r),
|
|
1076
|
-
selectedField: this.$props.selectedField,
|
|
1077
|
-
rowHeight: this.$props.rowHeight,
|
|
1078
|
-
render: this.$props.rowRender,
|
|
1079
|
-
ariaRowIndex: this.$props.detail ? G : F,
|
|
1080
|
-
dataIndex: O,
|
|
1081
|
-
class: this.$props.rowClass ? this.$props.rowClass(r) : ""
|
|
1082
|
-
}, {
|
|
1083
|
-
default: () => [S.row]
|
|
1084
|
-
}), this.$props.detail && r.rowType === "data" && (r.expanded || r.dataItem.expanded) && o("tr", {
|
|
1085
|
-
key: $,
|
|
1086
|
-
class: x ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
|
|
1087
|
-
style: {
|
|
1088
|
-
visibility: ne(p) ? "hidden" : "",
|
|
1089
|
-
height: this.$props.detailRowHeight + "px"
|
|
1090
|
-
},
|
|
1091
|
-
role: "row",
|
|
1092
|
-
"aria-rowindex": this.$props.detail ? n : F
|
|
1093
|
-
}, [a == null ? void 0 : a.map(function(w) {
|
|
1094
|
-
return o(X, {
|
|
1095
|
-
id: "",
|
|
1096
|
-
dataIndex: r.dataIndex,
|
|
1097
|
-
field: w.field,
|
|
1098
|
-
dataItem: r.dataItem,
|
|
1099
|
-
key: `group-${w.field}-${r.dataIndex}`,
|
|
1100
|
-
group: r.group
|
|
1101
|
-
}, null);
|
|
1102
|
-
}, this), (this.$props.expandField || this.detailExpandable.enabled) && o(vt, {
|
|
1103
|
-
id: H.generateNavigatableId(`${$}-dhcell`, v)
|
|
1104
|
-
}, null), o(xt, {
|
|
1105
|
-
dataItem: r.dataItem,
|
|
1106
|
-
dataIndex: r.dataIndex,
|
|
1107
|
-
colSpan: C,
|
|
1108
|
-
ariaColIndex: 2 + (a ? a.length : 0),
|
|
1109
|
-
detail: this.$props.detail ? this.$props.detail : void 0,
|
|
1110
|
-
id: H.generateNavigatableId(`${$}-dcell`, v)
|
|
1111
|
-
}, null)])];
|
|
1112
|
-
}, this) || o("tr", {
|
|
1113
|
-
class: "k-table-row k-grid-norecords"
|
|
1114
|
-
}, [o("td", {
|
|
1115
|
-
class: "k-table-td",
|
|
1116
|
-
colspan: this._columns.filter((r) => !r.children.length).length
|
|
1117
|
-
}, [ee.length ? ee : o(Ut, null, null)])]), Ye = this.$props.pageable && o(pt, {
|
|
1164
|
+
const it = this.$props.pageable && n(bt, {
|
|
1118
1165
|
class: "k-grid-pager",
|
|
1119
1166
|
onPagesizechange: this.pageChangeHandler,
|
|
1120
1167
|
onPagechange: this.pageChangeHandler,
|
|
1121
1168
|
size: this.$props.size,
|
|
1122
|
-
total:
|
|
1123
|
-
skip:
|
|
1124
|
-
pageSize: (
|
|
1125
|
-
messagesMap:
|
|
1126
|
-
settings:
|
|
1127
|
-
}, null), he =
|
|
1128
|
-
h:
|
|
1169
|
+
total: C,
|
|
1170
|
+
skip: s || 0,
|
|
1171
|
+
pageSize: (r !== void 0 ? r : this.$props.pageSize) || 10,
|
|
1172
|
+
messagesMap: qe,
|
|
1173
|
+
settings: $t(this.$props.pageable || {})
|
|
1174
|
+
}, null), he = Te.call(this, {
|
|
1175
|
+
h: De,
|
|
1129
1176
|
template: this.$props.pager,
|
|
1130
|
-
defaultRendering:
|
|
1177
|
+
defaultRendering: it,
|
|
1131
1178
|
additionalProps: {
|
|
1132
1179
|
...this.$props,
|
|
1133
|
-
skip: this.
|
|
1134
|
-
messagesMap:
|
|
1180
|
+
skip: this.$props.skip || 0,
|
|
1181
|
+
messagesMap: qe
|
|
1135
1182
|
},
|
|
1136
1183
|
additionalListeners: {
|
|
1137
1184
|
pagesizechange: this.pageChangeHandler,
|
|
1138
1185
|
pagechange: this.pageChangeHandler
|
|
1139
1186
|
}
|
|
1140
|
-
}),
|
|
1141
|
-
ref:
|
|
1142
|
-
}, [
|
|
1143
|
-
return
|
|
1144
|
-
key:
|
|
1145
|
-
class:
|
|
1146
|
-
width:
|
|
1187
|
+
}), st = (a) => e && e.filter((f) => f.field === a).length > 0, pe = n("colgroup", {
|
|
1188
|
+
ref: G(this, "colGroup")
|
|
1189
|
+
}, [z.map(function(a, f) {
|
|
1190
|
+
return n("col", {
|
|
1191
|
+
key: f.toString(),
|
|
1192
|
+
class: st(a.field) ? "k-sorted" : void 0,
|
|
1193
|
+
width: a.width !== void 0 ? a.width.toString().indexOf("%") !== -1 ? a.width : Math.floor(parseFloat(a.width.toString())) + "px" : void 0
|
|
1147
1194
|
}, null);
|
|
1148
1195
|
}, this)]), ue = {
|
|
1149
1196
|
height: this.getCorrectHeight,
|
|
1150
1197
|
...this.$attrs.style
|
|
1151
|
-
},
|
|
1198
|
+
}, rt = this.$props.loader && n("div", {
|
|
1152
1199
|
class: "k-loader-container k-loader-container-md k-loader-top"
|
|
1153
|
-
}, [
|
|
1200
|
+
}, [n("div", {
|
|
1154
1201
|
class: "k-loader-container-overlay k-overlay-light"
|
|
1155
|
-
}, null),
|
|
1202
|
+
}, null), n("div", {
|
|
1156
1203
|
class: "k-loader-container-inner"
|
|
1157
|
-
}, [
|
|
1204
|
+
}, [n(yt, {
|
|
1158
1205
|
size: "large",
|
|
1159
1206
|
type: "infinite-spinner"
|
|
1160
|
-
}, null)])]), ce = ((
|
|
1161
|
-
h:
|
|
1207
|
+
}, null)])]), ce = ((Ie = this.$props.showLoader) != null ? Ie : !!this.$props.loader) && Te.call(this, {
|
|
1208
|
+
h: De,
|
|
1162
1209
|
template: this.$props.loader,
|
|
1163
|
-
defaultRendering:
|
|
1210
|
+
defaultRendering: rt
|
|
1164
1211
|
});
|
|
1165
|
-
return this.$props.scrollable === "none" ?
|
|
1212
|
+
return this.$props.scrollable === "none" ? n(Me, {
|
|
1166
1213
|
ref: "navRef",
|
|
1167
1214
|
id: this._gridId,
|
|
1168
1215
|
navigatable: this.$props.navigatable
|
|
1169
1216
|
}, {
|
|
1170
|
-
default: () => [
|
|
1171
|
-
ref: (
|
|
1172
|
-
this.gridNavRef =
|
|
1217
|
+
default: () => [n(Ae, {
|
|
1218
|
+
ref: (a) => {
|
|
1219
|
+
this.gridNavRef = a;
|
|
1173
1220
|
},
|
|
1174
1221
|
currentData: this.currentData,
|
|
1222
|
+
id: this.$props.id,
|
|
1175
1223
|
style: ue,
|
|
1176
1224
|
class: this.nonscrollableWrapperClass
|
|
1177
1225
|
}, {
|
|
1178
|
-
default: () => [
|
|
1226
|
+
default: () => [ie, se, n("div", {
|
|
1179
1227
|
role: "grid",
|
|
1180
1228
|
class: "k-grid-aria-root",
|
|
1181
1229
|
id: this._gridRoleElementId,
|
|
1182
1230
|
"aria-colcount": this.getAriaColCount,
|
|
1183
1231
|
"aria-rowcount": this.getAriaRowCount
|
|
1184
|
-
}, [
|
|
1232
|
+
}, [n("table", {
|
|
1185
1233
|
class: "k-table",
|
|
1186
1234
|
style: {
|
|
1187
1235
|
tableLayout: "fixed"
|
|
1188
1236
|
},
|
|
1237
|
+
ref: G(this, "table"),
|
|
1189
1238
|
role: "none"
|
|
1190
|
-
}, [pe,
|
|
1239
|
+
}, [ot(" "), pe, ae, n("tbody", {
|
|
1191
1240
|
class: "k-table-tbody",
|
|
1192
1241
|
"data-keyboardnavbody": !0
|
|
1193
|
-
}, [
|
|
1242
|
+
}, [K, ce]), oe]), U && n(je, {
|
|
1243
|
+
id: E.generateNavigatableId("no-records", R)
|
|
1244
|
+
}, {
|
|
1245
|
+
default: () => [P.length ? P : n(Be, null, null)]
|
|
1246
|
+
})]), he, le]
|
|
1194
1247
|
})]
|
|
1195
|
-
}) :
|
|
1248
|
+
}) : n(Me, {
|
|
1196
1249
|
ref: "navRef",
|
|
1197
1250
|
id: this._gridId,
|
|
1198
1251
|
navigatable: this.$props.navigatable
|
|
1199
1252
|
}, {
|
|
1200
|
-
default: () => [
|
|
1201
|
-
ref: (
|
|
1202
|
-
this.gridNavRef =
|
|
1253
|
+
default: () => [n(Ae, {
|
|
1254
|
+
ref: (a) => {
|
|
1255
|
+
this.gridNavRef = a;
|
|
1203
1256
|
},
|
|
1204
1257
|
currentData: this.currentData,
|
|
1258
|
+
id: this.$props.id,
|
|
1205
1259
|
style: ue,
|
|
1206
1260
|
class: this.scrollableWrapperClass
|
|
1207
1261
|
}, {
|
|
1208
|
-
default: () => [
|
|
1262
|
+
default: () => [ie, se, n("div", {
|
|
1209
1263
|
role: "grid",
|
|
1210
1264
|
class: "k-grid-aria-root",
|
|
1211
1265
|
id: this._gridRoleElementId,
|
|
1212
1266
|
"aria-colcount": this.getAriaColCount,
|
|
1213
1267
|
"aria-rowcount": this.getAriaRowCount
|
|
1214
|
-
}, [
|
|
1268
|
+
}, [ae, n("div", {
|
|
1215
1269
|
class: "k-grid-container",
|
|
1216
1270
|
role: "presentation"
|
|
1217
|
-
}, [
|
|
1271
|
+
}, [n("div", {
|
|
1218
1272
|
role: "presentation",
|
|
1219
|
-
ref:
|
|
1273
|
+
ref: G(this, "scrollContainer"),
|
|
1220
1274
|
class: "k-grid-content k-virtual-content",
|
|
1221
1275
|
onScroll: this.scrollHandler
|
|
1222
|
-
}, [
|
|
1276
|
+
}, [n("div", {
|
|
1223
1277
|
class: "k-grid-table-wrap",
|
|
1224
1278
|
role: "presentation"
|
|
1225
|
-
}, [
|
|
1279
|
+
}, [n("table", {
|
|
1226
1280
|
role: "none",
|
|
1227
1281
|
class: this.gridTableClass,
|
|
1228
|
-
ref:
|
|
1229
|
-
}, [pe,
|
|
1282
|
+
ref: G(this, "table")
|
|
1283
|
+
}, [pe, n("tbody", {
|
|
1230
1284
|
class: "k-table-tbody",
|
|
1231
1285
|
role: "rowgroup",
|
|
1232
1286
|
"data-keyboardnavbody": !0,
|
|
1233
|
-
ref:
|
|
1234
|
-
}, [
|
|
1287
|
+
ref: G(this, "tableBody")
|
|
1288
|
+
}, [K])]), U && n(je, {
|
|
1289
|
+
id: E.generateNavigatableId("no-records", R)
|
|
1290
|
+
}, {
|
|
1291
|
+
default: () => [P.length ? P : n(Be, null, null)]
|
|
1292
|
+
})]), !U && n("div", {
|
|
1235
1293
|
class: "k-height-container",
|
|
1236
1294
|
role: "presentation"
|
|
1237
|
-
}, [
|
|
1295
|
+
}, [n("div", {
|
|
1296
|
+
ref: G(this, "scrollHeightContainer"),
|
|
1238
1297
|
style: this.$props.scrollable === "virtual" ? {
|
|
1239
|
-
height: this.
|
|
1298
|
+
height: this._containerHeightRef + "px"
|
|
1240
1299
|
} : {}
|
|
1241
|
-
}, null)])]), ce]),
|
|
1300
|
+
}, null)])]), ce]), oe, Ye]), he, le]
|
|
1242
1301
|
})]
|
|
1243
1302
|
});
|
|
1244
1303
|
}
|
|
1245
1304
|
});
|
|
1246
1305
|
export {
|
|
1247
|
-
|
|
1306
|
+
Pi as Grid
|
|
1248
1307
|
};
|