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