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