@progress/kendo-vue-grid 7.1.0-develop.7 → 8.0.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.js +1 -1
- package/Grid.mjs +220 -214
- package/GridSearchBox.js +1 -1
- package/GridSearchBox.mjs +18 -17
- package/GridState.js +1 -1
- package/GridState.mjs +2 -2
- package/common.js +1 -1
- package/common.mjs +1 -1
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +6 -6
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +71 -60
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +99 -89
- package/index.d.mts +21 -20
- package/index.d.ts +21 -20
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +13 -10
- package/utils/main.js +1 -1
- package/utils/main.mjs +171 -146
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +40 -20
package/Grid.mjs
CHANGED
|
@@ -5,42 +5,42 @@
|
|
|
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
|
|
8
|
+
import { defineComponent as ot, createVNode as n, h as Te, createTextVNode as De, ref as x, inject as nt, markRaw as E } from "vue";
|
|
9
|
+
import { isObject as V, cloneArray as dt, canUseDOM as X, WatermarkOverlay as ht, getter as Y, getTemplate as Ge, setRef as G, hasListener as P, getRef as $, RowHeightService as pt, setScrollbarWidth as ut, kendoThemeMaps as Fe, uGrid as ct, isRtl as Le, validatePackage as gt, shouldShowValidationUI as ft, getLicenseMessage as mt, guid as Pe, getNestedValue as Me } from "@progress/kendo-vue-common";
|
|
10
|
+
import { tableKeyboardNavigationTools as z, combineFilters as Ct, Pager as bt, normalize as $t, TableKeyboardNavigationProvider as Ae, updateLeft as Rt, updateRight as xt, groupExpandReducer as vt, detailExpandReducer as It, getDetailExpandableOptions as wt, getGroupExpandableOptions as St } from "@progress/kendo-vue-data-tools";
|
|
11
11
|
import { Loader as yt } from "@progress/kendo-vue-indicators";
|
|
12
|
-
import { GridNav as
|
|
13
|
-
import { GridSelectionCell as
|
|
14
|
-
import { GridHierarchyCell as
|
|
12
|
+
import { GridNav as Ve } from "./GridNav.mjs";
|
|
13
|
+
import { GridSelectionCell as Ne } from "./cells/GridSelectionCell.mjs";
|
|
14
|
+
import { GridHierarchyCell as Z } from "./cells/GridHierarchyCell.mjs";
|
|
15
15
|
import { GridDetailHierarchyCell as Ht } from "./cells/GridDetailHierarchyCell.mjs";
|
|
16
16
|
import { GridDetailCell as kt } from "./cells/GridDetailCell.mjs";
|
|
17
17
|
import { GridEditCell as _t } from "./cells/GridEditCell.mjs";
|
|
18
18
|
import { Header as Et } from "./header/Header.mjs";
|
|
19
19
|
import { HeaderRow as zt } from "./header/HeaderRow.mjs";
|
|
20
|
-
import { FilterRow as
|
|
21
|
-
import { GroupPanel as
|
|
20
|
+
import { FilterRow as Tt } from "./header/FilterRow.mjs";
|
|
21
|
+
import { GroupPanel as Dt } from "./header/GroupPanel.mjs";
|
|
22
22
|
import { Footer as Gt } from "./footer/Footer.mjs";
|
|
23
23
|
import { FooterRow as Ft } from "./footer/FooterRow.mjs";
|
|
24
|
-
import { operators as
|
|
24
|
+
import { operators as Oe } from "./filterCommon.mjs";
|
|
25
25
|
import { VirtualScroll as Lt } from "./VirtualScroll.mjs";
|
|
26
26
|
import { ColumnResize as Pt } from "./drag/ColumnResize.mjs";
|
|
27
27
|
import { CommonDragLogic as Mt } from "./drag/CommonDragLogic.mjs";
|
|
28
28
|
import { DragClue as At } from "./drag/DragClue.mjs";
|
|
29
29
|
import { DropClue as Vt } from "./drag/DropClue.mjs";
|
|
30
|
-
import { applyExpandedState as Nt, getColSpan as Ot, autoGenerateColumns as Wt, mapColumns as Kt, getFlatColumnsState as
|
|
30
|
+
import { applyExpandedState as Nt, getColSpan as Ot, autoGenerateColumns as Wt, mapColumns as Kt, getFlatColumnsState as We, getRowSpanOptions as Ke, groupedFirstItemValue as Ue, calcRowHeight as Ut, flatData as Bt, readColumns as jt } from "./utils/main.mjs";
|
|
31
31
|
import { GridCell as qt } from "./cells/GridCell.mjs";
|
|
32
|
-
import { GridGroupCell as
|
|
32
|
+
import { GridGroupCell as ee } from "./cells/GridGroupCell.mjs";
|
|
33
33
|
import { GridRow as Jt } from "./rows/GridRow.mjs";
|
|
34
34
|
import { gridProps as Qt } from "./common.mjs";
|
|
35
|
-
import { GridHeaderSelectionCell as
|
|
36
|
-
import { GridNoRecords as
|
|
37
|
-
import { GridNoRecordsContainer as
|
|
38
|
-
import { packageMetadata as
|
|
39
|
-
import { pagerMessagesMap as
|
|
35
|
+
import { GridHeaderSelectionCell as Be } from "./header/GridHeaderSelectionCell.mjs";
|
|
36
|
+
import { GridNoRecords as je } from "./components/noRecords/GridNoRecords.mjs";
|
|
37
|
+
import { GridNoRecordsContainer as qe } from "./components/noRecords/GridNoRecordsContainer.mjs";
|
|
38
|
+
import { packageMetadata as te } from "./package-metadata.mjs";
|
|
39
|
+
import { pagerMessagesMap as Je } from "./messages/messagesMap.mjs";
|
|
40
40
|
import { process as Xt } from "@progress/kendo-data-query";
|
|
41
41
|
import { KendoKey as Yt } from "./key.mjs";
|
|
42
42
|
import { getVirtualCellsToRender as Zt } from "./utils/virtualColumns.mjs";
|
|
43
|
-
const Pi = /* @__PURE__ */
|
|
43
|
+
const Pi = /* @__PURE__ */ ot({
|
|
44
44
|
name: "KendoGrid",
|
|
45
45
|
inheritAttrs: !1,
|
|
46
46
|
props: {
|
|
@@ -89,18 +89,18 @@ const Pi = /* @__PURE__ */ at({
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
created() {
|
|
92
|
-
gt(
|
|
92
|
+
gt(te), this.showLicenseWatermark = ft(te), this.licenseMessage = mt(te), this.initialHeight = null, this._columns = [], this.vsRef = new Lt(), this.dragLogic = new Mt(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new Pt(this.onResize.bind(this)), this._columnsMap = [[]], this._header = null, this._footer = null, this.tableBodyRef = null, this.tableRef = null, this.scrollHeightContainerRef = null, this.forceUpdateTimeout = void 0, this._gridId = Pe(), this._gridRoleElementId = Pe(), this.slicedCurrentData = void 0, this._prevTotal = void 0, this._containerHeightRef = 0, this._minRowHeightRef = 0, this._virtualSkipRef = 0, this.wrapperScrollTopRef = 0, this.scrollLeftRef = 0;
|
|
93
93
|
},
|
|
94
94
|
mounted() {
|
|
95
95
|
var t, i;
|
|
96
96
|
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 =
|
|
97
|
+
const e = Le(this._element);
|
|
98
|
+
this._prevTotal = this.$props.total, this.isRtl = e, this.initialHeight = ((i = (t = this._element) == null ? void 0 : t.style) == null ? void 0 : i.height) || null, this.resizeObserver = X && (window == null ? void 0 : window.ResizeObserver) && new ResizeObserver(this.calculateMedia), document != null && document.body && this.resizeObserver && this.resizeObserver.observe(document.body);
|
|
99
99
|
},
|
|
100
100
|
updated() {
|
|
101
101
|
var t;
|
|
102
102
|
this.setRefs();
|
|
103
|
-
const e =
|
|
103
|
+
const e = Le(this._element);
|
|
104
104
|
this.isRtl = e, this._prevTotal = this.$props.total, this.vsRef.tableTransform && this.vsRef.table && (this.vsRef.table.style.transform = this.vsRef.tableTransform, this.vsRef.tableTransform = ""), this.isVirtualScroll && (this.setContainerHeight(), this.setMinRowHeight(), (t = this.vsRef) == null || t.update());
|
|
105
105
|
},
|
|
106
106
|
unmounted() {
|
|
@@ -120,10 +120,10 @@ const Pi = /* @__PURE__ */ at({
|
|
|
120
120
|
return ct.hierarchyCell({});
|
|
121
121
|
},
|
|
122
122
|
computedRowSpannable() {
|
|
123
|
-
return
|
|
123
|
+
return Ke(this.$props.rowSpannable);
|
|
124
124
|
},
|
|
125
125
|
detailExpandable() {
|
|
126
|
-
return
|
|
126
|
+
return wt(!!this.$props.detail);
|
|
127
127
|
},
|
|
128
128
|
nonscrollableWrapperClass() {
|
|
129
129
|
const {
|
|
@@ -132,7 +132,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
132
132
|
return {
|
|
133
133
|
"k-grid": !0,
|
|
134
134
|
"k-grid-md": !e,
|
|
135
|
-
[`k-grid-${
|
|
135
|
+
[`k-grid-${Fe.sizeMap[e] || e}`]: e,
|
|
136
136
|
[t]: !!t
|
|
137
137
|
};
|
|
138
138
|
},
|
|
@@ -153,7 +153,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
153
153
|
"k-table": !0,
|
|
154
154
|
"k-grid-table": !0,
|
|
155
155
|
"k-grid-md": !e,
|
|
156
|
-
[`k-table-${
|
|
156
|
+
[`k-table-${Fe.sizeMap[e] || e}`]: e
|
|
157
157
|
};
|
|
158
158
|
},
|
|
159
159
|
getCorrectHeight() {
|
|
@@ -162,7 +162,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
162
162
|
currentGroupable() {
|
|
163
163
|
var t;
|
|
164
164
|
const e = (t = this.gridContext.group) == null ? void 0 : t.value;
|
|
165
|
-
return this.$props.groupable === !0 && (e == null ? void 0 : e.length) ||
|
|
165
|
+
return this.$props.groupable === !0 && (e == null ? void 0 : e.length) || V(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
166
166
|
},
|
|
167
167
|
computedCollapsed() {
|
|
168
168
|
let e = [];
|
|
@@ -242,7 +242,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
242
242
|
...i,
|
|
243
243
|
children: i.children && i.children.length > 0 ? this.filterHiddenColumns(i.children) : i.children
|
|
244
244
|
});
|
|
245
|
-
return [...e].filter((i) => !i.hidden).filter((i) =>
|
|
245
|
+
return [...e].filter((i) => !i.hidden).filter((i) => X && i && i.media ? window.matchMedia(i.media).matches : i).map((i) => t(i));
|
|
246
246
|
},
|
|
247
247
|
/**
|
|
248
248
|
* A getter of the current columns. Gets the current column width or current columns,
|
|
@@ -259,13 +259,13 @@ const Pi = /* @__PURE__ */ at({
|
|
|
259
259
|
depth: d,
|
|
260
260
|
colSpan: h,
|
|
261
261
|
rowSpan: c,
|
|
262
|
-
index:
|
|
262
|
+
index: f,
|
|
263
263
|
kFirst: u,
|
|
264
|
-
children:
|
|
264
|
+
children: m,
|
|
265
265
|
...R
|
|
266
266
|
} = s;
|
|
267
|
-
return
|
|
268
|
-
children: t(
|
|
267
|
+
return m.length ? {
|
|
268
|
+
children: t(m),
|
|
269
269
|
...R
|
|
270
270
|
} : R;
|
|
271
271
|
}));
|
|
@@ -345,7 +345,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
345
345
|
let t = this.computedCollapsed, i = t[e.level];
|
|
346
346
|
const s = this.$props.uniqueField, r = function(h, c) {
|
|
347
347
|
return h.value === e.dataItem.value && c === e.level;
|
|
348
|
-
}, l = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, r, 0, null) : e.dataItem, d =
|
|
348
|
+
}, l = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, r, 0, null) : e.dataItem, d = Ue(l || e.dataItem, s);
|
|
349
349
|
if (e.value) {
|
|
350
350
|
if (i && i.length) {
|
|
351
351
|
const h = i.indexOf(d);
|
|
@@ -357,9 +357,9 @@ const Pi = /* @__PURE__ */ at({
|
|
|
357
357
|
},
|
|
358
358
|
itemChange(e) {
|
|
359
359
|
var s;
|
|
360
|
-
const t =
|
|
360
|
+
const t = P.call(this, "itemchange"), i = (s = this.gridContext.group) == null ? void 0 : s.value;
|
|
361
361
|
if (e.field === this.$props.expandField || (i || this.$props.detail) && e.field === void 0) {
|
|
362
|
-
|
|
362
|
+
P.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
|
|
363
363
|
...this.getArguments(e.event),
|
|
364
364
|
collapsedGroups: this.updateGroupCollapsed(e),
|
|
365
365
|
dataItem: e.dataItem,
|
|
@@ -469,7 +469,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
469
469
|
handleDetailExpandAction(e, t) {
|
|
470
470
|
var i;
|
|
471
471
|
if (this.detailExpandable.enabled) {
|
|
472
|
-
const s = (i = this.gridContext.detailExpand) == null ? void 0 : i.value, r =
|
|
472
|
+
const s = (i = this.gridContext.detailExpand) == null ? void 0 : i.value, r = It(s != null ? s : {}, e);
|
|
473
473
|
this.$emit("detailexpandchange", {
|
|
474
474
|
...this.getArguments(t),
|
|
475
475
|
detailExpand: r
|
|
@@ -492,12 +492,12 @@ const Pi = /* @__PURE__ */ at({
|
|
|
492
492
|
...this.getArguments(s),
|
|
493
493
|
...t
|
|
494
494
|
});
|
|
495
|
-
else if (
|
|
495
|
+
else if (P.call(this, e))
|
|
496
496
|
this.$emit(e, {
|
|
497
497
|
...this.getArguments(s),
|
|
498
498
|
...t
|
|
499
499
|
});
|
|
500
|
-
else if (
|
|
500
|
+
else if (P.call(this, "datastatechange")) {
|
|
501
501
|
const r = {
|
|
502
502
|
...this.getDataState(),
|
|
503
503
|
...i
|
|
@@ -510,23 +510,23 @@ const Pi = /* @__PURE__ */ at({
|
|
|
510
510
|
}
|
|
511
511
|
},
|
|
512
512
|
columnReorder(e, t, i) {
|
|
513
|
-
const s = this._columns[e], r =
|
|
513
|
+
const s = this._columns[e], r = We(this.currentColumnsState), l = s.depth, d = (u) => {
|
|
514
514
|
do
|
|
515
515
|
u++;
|
|
516
516
|
while (u < this._columns.length && this._columns[u].depth > l);
|
|
517
517
|
return u;
|
|
518
518
|
}, h = this._columns.splice(e, d(e) - e);
|
|
519
|
-
this._columns.splice(e < t ? d(t - h.length) : t, 0, ...h), this._columns.filter((u) => u.declarationIndex >= 0).forEach((u,
|
|
520
|
-
u.orderIndex =
|
|
521
|
-
const R = r.find((
|
|
522
|
-
R && (R.orderIndex =
|
|
519
|
+
this._columns.splice(e < t ? d(t - h.length) : t, 0, ...h), this._columns.filter((u) => u.declarationIndex >= 0).forEach((u, m) => {
|
|
520
|
+
u.orderIndex = m;
|
|
521
|
+
const R = r.find((w) => w.id === u.id);
|
|
522
|
+
R && (R.orderIndex = m);
|
|
523
523
|
});
|
|
524
524
|
const c = this._columns[e].locked && this._columns[t].locked;
|
|
525
525
|
Rt(this._columnsMap, this._columns, c || this.shouldUpdateLeftRightRef), xt(this._columnsMap, this._columns, c || this.shouldUpdateLeftRightRef), this.resizedRef && (this.shouldUpdateLeftRightRef = !1, this.resizedRef = !1);
|
|
526
|
-
const
|
|
526
|
+
const f = this.getColumns();
|
|
527
527
|
this.$emit("columnreorder", {
|
|
528
528
|
target: this,
|
|
529
|
-
columns:
|
|
529
|
+
columns: f,
|
|
530
530
|
event: i,
|
|
531
531
|
prev: e,
|
|
532
532
|
next: t
|
|
@@ -595,11 +595,11 @@ const Pi = /* @__PURE__ */ at({
|
|
|
595
595
|
},
|
|
596
596
|
configureColumns(e, t) {
|
|
597
597
|
e.filter((l) => l.columnType === "checkbox").forEach((l) => {
|
|
598
|
-
l.width = l.width || "50px", l.defaultCell =
|
|
598
|
+
l.width = l.width || "50px", l.defaultCell = E(Ne), l.defaultHeaderCell = E(Be), l._type = "edit";
|
|
599
599
|
}), this.$props.selectedField && this._columns.filter((l) => l.field === this.$props.selectedField).forEach((l) => {
|
|
600
|
-
l.width = l.width || "50px", l.internalCell =
|
|
600
|
+
l.width = l.width || "50px", l.internalCell = E(Ne), l.internalHeaderCell = E(Be);
|
|
601
601
|
});
|
|
602
|
-
const i =
|
|
602
|
+
const i = We(this.currentColumnsState);
|
|
603
603
|
this.initColumnsState(e, i);
|
|
604
604
|
const s = {
|
|
605
605
|
id: "",
|
|
@@ -626,36 +626,36 @@ const Pi = /* @__PURE__ */ at({
|
|
|
626
626
|
const l = {
|
|
627
627
|
...s,
|
|
628
628
|
_type: "expand",
|
|
629
|
-
id:
|
|
630
|
-
defaultCell:
|
|
631
|
-
internalCell:
|
|
629
|
+
id: z.generateNavigatableId(`${r++}`, "expand", "column"),
|
|
630
|
+
defaultCell: E(Z),
|
|
631
|
+
internalCell: E(Z),
|
|
632
632
|
field: this.detailExpandable.column,
|
|
633
633
|
headerClassName: this.hierarchClass
|
|
634
634
|
};
|
|
635
635
|
e.unshift(l), this.currentColumnsState.unshift(i.find((d) => d.id === l.id) || l);
|
|
636
636
|
}
|
|
637
|
-
this.$props.expandField &&
|
|
637
|
+
this.$props.expandField && P.call(this, "expandchange") && this.$props.detail && (e.unshift({
|
|
638
638
|
...s,
|
|
639
|
-
internalCell:
|
|
639
|
+
internalCell: E(Z),
|
|
640
640
|
field: this.$props.expandField,
|
|
641
641
|
headerClassName: "k-hierarchy-cell k-header",
|
|
642
|
-
id:
|
|
642
|
+
id: z.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
|
|
643
643
|
...this.expandColumn
|
|
644
644
|
}), r++);
|
|
645
645
|
for (let l = 0; l < t; l++) {
|
|
646
646
|
const d = {
|
|
647
647
|
...s,
|
|
648
648
|
isAccessible: !1,
|
|
649
|
-
defaultCell:
|
|
650
|
-
internalCell:
|
|
651
|
-
id:
|
|
649
|
+
defaultCell: E(ee),
|
|
650
|
+
internalCell: E(ee),
|
|
651
|
+
id: z.generateNavigatableId(`${r++}`, "group", "column"),
|
|
652
652
|
field: "value",
|
|
653
653
|
locked: this.$props.lockGroups
|
|
654
654
|
};
|
|
655
655
|
e.unshift(d), this.currentColumnsState.unshift(i.find((h) => h.id === d.id) || d);
|
|
656
656
|
}
|
|
657
657
|
e.slice(r).forEach((l) => {
|
|
658
|
-
l.parentIndex >= 0 && (l.parentIndex += r), l.rowSpannable = l.rowSpannable !== void 0 ?
|
|
658
|
+
l.parentIndex >= 0 && (l.parentIndex += r), l.rowSpannable = l.rowSpannable !== void 0 ? Ke(l.rowSpannable) : this.computedRowSpannable;
|
|
659
659
|
});
|
|
660
660
|
},
|
|
661
661
|
initColumns(e, t) {
|
|
@@ -694,8 +694,8 @@ const Pi = /* @__PURE__ */ at({
|
|
|
694
694
|
return null;
|
|
695
695
|
},
|
|
696
696
|
getDataState() {
|
|
697
|
-
var l, d, h, c,
|
|
698
|
-
const e = (l = this.gridContext.sort) == null ? void 0 : l.value, t = (d = this.gridContext.filter) == null ? void 0 : d.value, i = (h = this.gridContext.skip) == null ? void 0 : h.value, s = (c = this.gridContext.take) == null ? void 0 : c.value, r = (
|
|
697
|
+
var l, d, h, c, f;
|
|
698
|
+
const e = (l = this.gridContext.sort) == null ? void 0 : l.value, t = (d = this.gridContext.filter) == null ? void 0 : d.value, i = (h = this.gridContext.skip) == null ? void 0 : h.value, s = (c = this.gridContext.take) == null ? void 0 : c.value, r = (f = this.gridContext.group) == null ? void 0 : f.value;
|
|
699
699
|
return {
|
|
700
700
|
filter: t,
|
|
701
701
|
sort: e,
|
|
@@ -755,10 +755,10 @@ const Pi = /* @__PURE__ */ at({
|
|
|
755
755
|
r--, s && (s.width += c);
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const
|
|
759
|
-
r =
|
|
758
|
+
const f = Math.min(Ot(d, e), t.length - h);
|
|
759
|
+
r = f - 1, s = {
|
|
760
760
|
width: c,
|
|
761
|
-
colSpan:
|
|
761
|
+
colSpan: f,
|
|
762
762
|
columnIndex: h
|
|
763
763
|
}, i.push(s);
|
|
764
764
|
}), this.$props.columnVirtualization) {
|
|
@@ -801,7 +801,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
801
801
|
};
|
|
802
802
|
},
|
|
803
803
|
setup(e) {
|
|
804
|
-
const t = x(null), i = x(null), s = x(null), r = x(null), l = x(null), d = x(null), h = x(null), c = x(null),
|
|
804
|
+
const t = x(null), i = x(null), s = x(null), r = x(null), l = x(null), d = x(null), h = x(null), c = x(null), f = x(null), u = x(null), m = x(!0), R = x(!1), w = nt(Yt, {});
|
|
805
805
|
return {
|
|
806
806
|
groupPanelDivRef: t,
|
|
807
807
|
dropElementClueRef: i,
|
|
@@ -811,19 +811,19 @@ const Pi = /* @__PURE__ */ at({
|
|
|
811
811
|
gridNavRef: d,
|
|
812
812
|
colGroupRef: h,
|
|
813
813
|
scrollContainerRef: c,
|
|
814
|
-
scrollTableRef:
|
|
814
|
+
scrollTableRef: f,
|
|
815
815
|
scrollTableBodyRef: u,
|
|
816
|
-
gridContext:
|
|
817
|
-
shouldUpdateLeftRightRef:
|
|
816
|
+
gridContext: w,
|
|
817
|
+
shouldUpdateLeftRightRef: m,
|
|
818
818
|
resizedRef: R,
|
|
819
819
|
currentColumnsState: e.columnsState
|
|
820
820
|
};
|
|
821
821
|
},
|
|
822
822
|
render() {
|
|
823
|
-
var
|
|
824
|
-
const e = (
|
|
825
|
-
let
|
|
826
|
-
this.currentColumnsState = (
|
|
823
|
+
var fe, me, Ce, be, $e, Re, xe, ve, Ie, we;
|
|
824
|
+
const e = (fe = this.gridContext.sort) == null ? void 0 : fe.value, t = (me = this.gridContext.filter) == null ? void 0 : me.value, i = (Ce = this.gridContext.search) == null ? void 0 : Ce.value, s = (be = this.gridContext.skip) == null ? void 0 : be.value, r = ($e = this.gridContext.take) == null ? void 0 : $e.value, l = (Re = this.gridContext.group) == null ? void 0 : Re.value, d = (xe = this.gridContext.groupExpand) == null ? void 0 : xe.value, h = (ve = this.gridContext.detailExpand) == null ? void 0 : ve.value, c = !!(l != null && l.length);
|
|
825
|
+
let f;
|
|
826
|
+
this.currentColumnsState = (Ie = this.gridContext.columnsState) == null ? void 0 : Ie.value;
|
|
827
827
|
const u = this.$props.autoProcessData === !0 ? {
|
|
828
828
|
group: !0,
|
|
829
829
|
sort: !0,
|
|
@@ -831,18 +831,18 @@ const Pi = /* @__PURE__ */ at({
|
|
|
831
831
|
search: !0,
|
|
832
832
|
page: !0
|
|
833
833
|
} : this.$props.autoProcessData;
|
|
834
|
-
let
|
|
835
|
-
const R =
|
|
836
|
-
let
|
|
837
|
-
Array.isArray(this.$props.dataItems) ?
|
|
838
|
-
const
|
|
839
|
-
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable =
|
|
840
|
-
const
|
|
834
|
+
let m = this.$props.total || 0;
|
|
835
|
+
const R = z.getIdPrefix(this.navigation);
|
|
836
|
+
let w = [];
|
|
837
|
+
Array.isArray(this.$props.dataItems) ? w = this.$props.dataItems : this.$props.dataItems && (w = Nt(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField).data, m = m || this.$props.dataItems.total);
|
|
838
|
+
const ie = this.$props.groupable === !0 || V(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
839
|
+
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = ie, this._virtualPageSize = this.calcVirtualPageSize();
|
|
840
|
+
const N = w.length === m, Qe = V(this.$props.groupable) && this.$props.groupable.footer || "none";
|
|
841
841
|
if (this.currentData = [], u) {
|
|
842
842
|
const a = u.page && !(this.isVirtualScroll && !this.$props.pageable), {
|
|
843
|
-
data:
|
|
843
|
+
data: C,
|
|
844
844
|
total: S
|
|
845
|
-
} = Xt(
|
|
845
|
+
} = Xt(w, {
|
|
846
846
|
group: u.group ? l : void 0,
|
|
847
847
|
sort: u.sort ? e : void 0,
|
|
848
848
|
filter: Ct(u.filter ? t : void 0, u.search ? i : void 0),
|
|
@@ -851,25 +851,25 @@ const Pi = /* @__PURE__ */ at({
|
|
|
851
851
|
skip: s || 0
|
|
852
852
|
} : {}
|
|
853
853
|
});
|
|
854
|
-
|
|
854
|
+
w = C, m = (we = this.$props.total) != null ? we : S;
|
|
855
855
|
}
|
|
856
856
|
const {
|
|
857
|
-
resolvedGroupsCount:
|
|
858
|
-
flattedData:
|
|
859
|
-
} = this.getFlatData(
|
|
860
|
-
this.currentData =
|
|
861
|
-
const
|
|
862
|
-
if (this._virtualTotal =
|
|
857
|
+
resolvedGroupsCount: Xe,
|
|
858
|
+
flattedData: Ye
|
|
859
|
+
} = this.getFlatData(w, Qe, N ? 0 : this.$props.skip || 0, l, h, d, this.$props.dataItemKey);
|
|
860
|
+
this.currentData = Ye;
|
|
861
|
+
const O = this._virtualSkipRef || 0;
|
|
862
|
+
if (this._virtualTotal = m, this.isVirtualScroll) {
|
|
863
863
|
let a = s || 0;
|
|
864
|
-
if ((c || this.$props.pageable) && (a =
|
|
864
|
+
if ((c || this.$props.pageable) && (a = O, this._virtualTotal = this.currentData.length), N || c || this.$props.pageable)
|
|
865
865
|
if (this._virtualPageSize === 0) {
|
|
866
|
-
const
|
|
867
|
-
|
|
866
|
+
const C = Math.min(r || this.$props.pageSize || 20, this.currentData.length);
|
|
867
|
+
f = this.currentData.slice(a, a + C);
|
|
868
868
|
} else
|
|
869
|
-
|
|
869
|
+
f = this.currentData.slice(a, a + this._virtualPageSize);
|
|
870
870
|
}
|
|
871
|
-
this.initializeVirtualization(), this.initColumns(this.$props.dataItems,
|
|
872
|
-
const
|
|
871
|
+
this.initializeVirtualization(), this.initColumns(this.$props.dataItems, Xe), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this._columns, this.columnResize.columnsState = dt(this.currentColumnsState || []), this.dragLogic.columns = this._columns;
|
|
872
|
+
const se = this.$props.toolbar, M = this.$props.noRecords, k = this._columns.filter((a) => a.children.length === 0), re = ie && n(Dt, {
|
|
873
873
|
ref: (a) => {
|
|
874
874
|
this.groupPanelDivRef = a;
|
|
875
875
|
},
|
|
@@ -880,15 +880,29 @@ const Pi = /* @__PURE__ */ at({
|
|
|
880
880
|
onDragHandler: this.dragLogic.dragHandler,
|
|
881
881
|
onReleaseHandler: this.dragLogic.releaseHandler,
|
|
882
882
|
resolveTitle: this.resolveTitle
|
|
883
|
-
}, null),
|
|
883
|
+
}, null), le = (this.dragLogic.reorderable || this.dragLogic.groupable) && X && document && document.body, ae = [le && n(Vt, {
|
|
884
884
|
ref: (a) => {
|
|
885
885
|
this.dropElementClueRef = a;
|
|
886
886
|
}
|
|
887
|
-
}, null),
|
|
887
|
+
}, null), le && n(At, {
|
|
888
888
|
ref: (a) => {
|
|
889
889
|
this.dragElementClueRef = a;
|
|
890
890
|
}
|
|
891
|
-
}, null)],
|
|
891
|
+
}, null)], Ze = this.showLicenseWatermark ? n(ht, {
|
|
892
|
+
message: this.licenseMessage
|
|
893
|
+
}, null) : null, W = this.$attrs.style, et = W && V(W) && W["width"] || "";
|
|
894
|
+
this.tableWidth = parseFloat(et.toString());
|
|
895
|
+
const oe = k.findIndex((a) => typeof a.colSpan == "function") > -1;
|
|
896
|
+
let F;
|
|
897
|
+
oe || (F = this.getCellsToRender(null, k));
|
|
898
|
+
const ne = (this.$props.columnVirtualization ? this.getCellsToRender(null, k).map(({
|
|
899
|
+
columnIndex: a
|
|
900
|
+
}) => k[a]) : k).map(function(a, C) {
|
|
901
|
+
return n("col", {
|
|
902
|
+
key: a.id || `col-${C}`,
|
|
903
|
+
width: a.width !== void 0 ? Math.floor(parseFloat(a.width.toString())) : void 0
|
|
904
|
+
}, null);
|
|
905
|
+
}, this), de = n(Et, {
|
|
892
906
|
size: this.$props.size,
|
|
893
907
|
columnResize: this.columnResize,
|
|
894
908
|
staticHeaders: this.$props.scrollable !== "none",
|
|
@@ -904,13 +918,15 @@ const Pi = /* @__PURE__ */ at({
|
|
|
904
918
|
onSortChange: this.sortChangeHandler,
|
|
905
919
|
filter: t,
|
|
906
920
|
filterable: this.$props.filterable,
|
|
907
|
-
filterOperators: this.$props.filterOperators ||
|
|
921
|
+
filterOperators: this.$props.filterOperators || Oe,
|
|
908
922
|
onFilterChange: this.filterChangeHandler,
|
|
909
923
|
columnMenu: this.$props.columnMenu,
|
|
910
924
|
columnMenuIcon: this.$props.columnMenuIcon,
|
|
911
925
|
columnMenuAnimate: this.$props.columnMenuAnimate,
|
|
912
926
|
onSelectionchange: this.onHeaderSelectionChangeHandler,
|
|
913
927
|
columns: this._columns,
|
|
928
|
+
cellsToRender: F,
|
|
929
|
+
columnVirtualization: this.$props.columnVirtualization,
|
|
914
930
|
columnsInitial: this.$props.columns,
|
|
915
931
|
columnResize: this.columnResize,
|
|
916
932
|
onPressHandler: this.dragLogic.pressHandler,
|
|
@@ -920,12 +936,14 @@ const Pi = /* @__PURE__ */ at({
|
|
|
920
936
|
cellRender: this.$props.headerCellRender,
|
|
921
937
|
isRtl: this.isRtl,
|
|
922
938
|
isColCountDefined: this.getAriaColCount !== void 0,
|
|
923
|
-
filterRow: this.$props.filterable && n(
|
|
939
|
+
filterRow: this.$props.filterable && n(Tt, {
|
|
924
940
|
grid: this,
|
|
925
941
|
size: this.$props.size,
|
|
926
942
|
columns: this._columns,
|
|
943
|
+
cellsToRender: F,
|
|
944
|
+
columnVirtualization: this.$props.columnVirtualization,
|
|
927
945
|
filter: t,
|
|
928
|
-
filterOperators: this.$props.filterOperators ||
|
|
946
|
+
filterOperators: this.$props.filterOperators || Oe,
|
|
929
947
|
onFilterchange: this.filterChangeHandler,
|
|
930
948
|
sort: this.$props.sort,
|
|
931
949
|
cellRender: this.$props.filterCellRender,
|
|
@@ -933,13 +951,8 @@ const Pi = /* @__PURE__ */ at({
|
|
|
933
951
|
ariaRowIndex: this._columnsMap.length + 1
|
|
934
952
|
}, null) || void 0
|
|
935
953
|
}, null),
|
|
936
|
-
cols:
|
|
937
|
-
|
|
938
|
-
key: f.toString(),
|
|
939
|
-
width: a.width !== void 0 ? Math.floor(parseFloat(a.width.toString())) : void 0
|
|
940
|
-
}, null);
|
|
941
|
-
}, this)
|
|
942
|
-
}, null), oe = this._columns.some((a) => !!a.footerCell) ? n(Gt, {
|
|
954
|
+
cols: ne
|
|
955
|
+
}, null), he = this._columns.some((a) => !!a.footerCell) ? n(Gt, {
|
|
943
956
|
size: this.$props.size,
|
|
944
957
|
columnResize: this.columnResize,
|
|
945
958
|
staticHeaders: this.$props.scrollable !== "none",
|
|
@@ -951,64 +964,52 @@ const Pi = /* @__PURE__ */ at({
|
|
|
951
964
|
rowIndex: this.getAriaRowCount + 1,
|
|
952
965
|
columns: this._columns
|
|
953
966
|
}, null),
|
|
954
|
-
cols:
|
|
955
|
-
|
|
956
|
-
key: f.toString(),
|
|
957
|
-
width: a.width !== void 0 ? Math.floor(parseFloat(a.width.toString())) : void 0
|
|
958
|
-
}, null);
|
|
959
|
-
}, this)
|
|
960
|
-
}, null) : n("span", null, null), Ye = this.showLicenseWatermark ? n(ht, {
|
|
961
|
-
message: this.licenseMessage
|
|
962
|
-
}, null) : null, O = this.$attrs.style, Ze = O && A(O) && O["width"] || "";
|
|
963
|
-
this.tableWidth = parseFloat(Ze.toString());
|
|
964
|
-
const ne = z.findIndex((a) => typeof a.colSpan == "function") > -1;
|
|
965
|
-
let W;
|
|
966
|
-
ne || (W = this.getCellsToRender(null, z));
|
|
967
|
-
const et = function(a, f, S, Se, k) {
|
|
967
|
+
cols: ne
|
|
968
|
+
}, null) : n("span", null, null), tt = function(a, C, S, Se, _) {
|
|
968
969
|
let p = !1;
|
|
969
|
-
const
|
|
970
|
-
return
|
|
971
|
-
row:
|
|
970
|
+
const T = this.$props.selectedField, y = T ? Me(T, a.dataItem) : void 0, v = this.$props.highlight && this.$props.dataItemKey && Y(this.$props.dataItemKey)(a.dataItem) !== void 0 ? this.$props.highlight[Y(this.$props.dataItemKey)(a.dataItem)] : void 0;
|
|
971
|
+
return oe && (F = this.getCellsToRender(a.dataItem, k)), {
|
|
972
|
+
row: F.map(function({
|
|
972
973
|
columnIndex: b,
|
|
973
|
-
colSpan:
|
|
974
|
+
colSpan: D
|
|
974
975
|
}) {
|
|
975
976
|
var ke, _e, Ee, ze;
|
|
976
|
-
const o =
|
|
977
|
-
let
|
|
978
|
-
if ((ke = o.rowSpannable) != null && ke.enabled && a.rowType === "data" && o.field &&
|
|
977
|
+
const o = k[b];
|
|
978
|
+
let I;
|
|
979
|
+
if ((ke = o.rowSpannable) != null && ke.enabled && a.rowType === "data" && o.field && _) {
|
|
979
980
|
const g = o.field ? (Ee = (_e = o.rowSpannable).valueGetter) == null ? void 0 : Ee.call(_e, a.dataItem, o.field) : null;
|
|
980
|
-
|
|
981
|
+
I = {
|
|
981
982
|
value: g,
|
|
982
983
|
count: 1
|
|
983
|
-
},
|
|
984
|
+
}, _[o.field] && ((ze = _[o.field]) == null ? void 0 : ze.value) === g && _[o.field] !== null ? (_[o.field].count++, I.count = null) : _[o.field] = I;
|
|
984
985
|
}
|
|
985
|
-
const
|
|
986
|
+
const L = `${o.className ? o.className + " " : ""}${o.locked ? "k-grid-content-sticky" : ""}`, H = o.locked && o.left !== void 0 ? this.isRtl ? {
|
|
986
987
|
left: o.right + "px",
|
|
987
988
|
right: o.left + "px"
|
|
988
989
|
} : {
|
|
989
990
|
left: o.left + "px",
|
|
990
991
|
right: o.right + "px"
|
|
991
|
-
} :
|
|
992
|
+
} : void 0;
|
|
992
993
|
let ye = !1;
|
|
993
994
|
if (o.editable && this.$props.editField) {
|
|
994
|
-
const g =
|
|
995
|
+
const g = Me(this.$props.editField, a.dataItem);
|
|
995
996
|
(g === !0 || g === o.field) && (p = !0, ye = !0);
|
|
996
997
|
}
|
|
997
|
-
let
|
|
998
|
-
o.cell && (
|
|
999
|
-
const He = this.computedCollapsed && this.computedCollapsed[a.level] && this.computedCollapsed[a.level].some((g) => g ===
|
|
998
|
+
let A;
|
|
999
|
+
o.cell && (A = o.cell);
|
|
1000
|
+
const He = this.computedCollapsed && this.computedCollapsed[a.level] && this.computedCollapsed[a.level].some((g) => g === Ue(a.dataItem, this.$props.uniqueField)), q = o.id ? o.id : b, J = He ? !He : a.expanded || a.dataItem.expanded, at = o._type === "expand", Q = z.generateNavigatableId(`${C}-${String(b)}`, R, at || a.rowType === "groupHeader" || a.rowType === "groupFooter" || o.field === "value" ? "nodata" : "cell");
|
|
1000
1001
|
return o.internalCell ? n(o.internalCell, {
|
|
1001
|
-
key:
|
|
1002
|
-
id:
|
|
1003
|
-
colSpan:
|
|
1002
|
+
key: q,
|
|
1003
|
+
id: Q,
|
|
1004
|
+
colSpan: D,
|
|
1004
1005
|
dataItem: a.dataItem,
|
|
1005
1006
|
field: o.field || "",
|
|
1006
1007
|
editor: o.editor,
|
|
1007
1008
|
format: o.format,
|
|
1008
1009
|
readFormat: o.readFormat,
|
|
1009
1010
|
type: o.type,
|
|
1010
|
-
className:
|
|
1011
|
-
render:
|
|
1011
|
+
className: L,
|
|
1012
|
+
render: A || this.$props.cellRender,
|
|
1012
1013
|
onChange: this.itemChange,
|
|
1013
1014
|
onSelectionchange: (g) => this.selectionChangeHandler({
|
|
1014
1015
|
event: g,
|
|
@@ -1020,7 +1021,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1020
1021
|
columnsCount: this._columns.filter((g) => !g.children.length).length,
|
|
1021
1022
|
rowType: a.rowType,
|
|
1022
1023
|
level: a.level,
|
|
1023
|
-
expanded:
|
|
1024
|
+
expanded: J,
|
|
1024
1025
|
dataIndex: a.dataIndex,
|
|
1025
1026
|
style: H,
|
|
1026
1027
|
ariaColumnIndex: o.ariaColumnIndex,
|
|
@@ -1028,19 +1029,19 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1028
1029
|
isSelected: Array.isArray(y) && y.indexOf(b) > -1,
|
|
1029
1030
|
isHighlighted: !!(typeof v != "boolean" && v && o.field && v[o.field] === !0),
|
|
1030
1031
|
group: a.group,
|
|
1031
|
-
rowSpan:
|
|
1032
|
+
rowSpan: I
|
|
1032
1033
|
}, null) : ye ? n(_t, {
|
|
1033
|
-
id:
|
|
1034
|
-
key:
|
|
1035
|
-
colSpan:
|
|
1034
|
+
id: Q,
|
|
1035
|
+
key: q,
|
|
1036
|
+
colSpan: D,
|
|
1036
1037
|
dataItem: a.dataItem,
|
|
1037
1038
|
field: o.field || "",
|
|
1038
1039
|
editor: o.editor,
|
|
1039
1040
|
format: o.format,
|
|
1040
1041
|
readFormat: o.readFormat,
|
|
1041
1042
|
type: o.type,
|
|
1042
|
-
className:
|
|
1043
|
-
render:
|
|
1043
|
+
className: L,
|
|
1044
|
+
render: A || this.$props.cellRender,
|
|
1044
1045
|
onEdit: this.editHandler,
|
|
1045
1046
|
onRemove: this.removeHandler,
|
|
1046
1047
|
onSave: this.saveHandler,
|
|
@@ -1050,21 +1051,21 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1050
1051
|
columnsCount: this._columns.filter((g) => !g.children.length).length,
|
|
1051
1052
|
rowType: a.rowType,
|
|
1052
1053
|
level: a.level,
|
|
1053
|
-
expanded:
|
|
1054
|
+
expanded: J,
|
|
1054
1055
|
dataIndex: a.dataIndex,
|
|
1055
1056
|
style: H
|
|
1056
1057
|
}, null) : n(qt, {
|
|
1057
|
-
key:
|
|
1058
|
-
id:
|
|
1059
|
-
colSpan:
|
|
1058
|
+
key: q,
|
|
1059
|
+
id: Q,
|
|
1060
|
+
colSpan: D,
|
|
1060
1061
|
dataItem: a.dataItem,
|
|
1061
1062
|
field: o.field || "",
|
|
1062
1063
|
editor: o.editor,
|
|
1063
1064
|
format: o.format,
|
|
1064
1065
|
readFormat: o.readFormat,
|
|
1065
1066
|
type: o.type,
|
|
1066
|
-
className:
|
|
1067
|
-
render:
|
|
1067
|
+
className: L,
|
|
1068
|
+
render: A || this.$props.cellRender,
|
|
1068
1069
|
onCellclick: this.cellClickHandler,
|
|
1069
1070
|
onCellkeydown: this.cellKeydownHandler,
|
|
1070
1071
|
onEdit: this.editHandler,
|
|
@@ -1082,10 +1083,10 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1082
1083
|
columnsCount: this._columns.filter((g) => !g.children.length).length,
|
|
1083
1084
|
rowType: a.rowType,
|
|
1084
1085
|
level: a.level,
|
|
1085
|
-
expanded:
|
|
1086
|
+
expanded: J,
|
|
1086
1087
|
dataIndex: a.dataIndex,
|
|
1087
1088
|
style: H,
|
|
1088
|
-
rowSpan:
|
|
1089
|
+
rowSpan: I,
|
|
1089
1090
|
isSelected: Array.isArray(y) && y.indexOf(b) > -1,
|
|
1090
1091
|
isHighlighted: !!(typeof v != "boolean" && v && o.field && v[o.field] === !0)
|
|
1091
1092
|
}, null);
|
|
@@ -1095,53 +1096,53 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1095
1096
|
isHighlighted: typeof v == "boolean" && v
|
|
1096
1097
|
};
|
|
1097
1098
|
};
|
|
1098
|
-
let
|
|
1099
|
-
const U = !this.currentData.length,
|
|
1099
|
+
let it = 0, K = [];
|
|
1100
|
+
const U = !this.currentData.length, pe = (a) => a >= this.currentData.length - it;
|
|
1100
1101
|
let B = 0;
|
|
1101
1102
|
if (this.currentData.length) {
|
|
1102
1103
|
const a = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
|
|
1103
|
-
let
|
|
1104
|
-
const
|
|
1104
|
+
let C = this.$props.skip || 0, S = -1, Se = 0;
|
|
1105
|
+
const _ = this.computedRowSpannable.enabled ? {} : void 0;
|
|
1105
1106
|
if (this.isVirtualScroll) {
|
|
1106
|
-
if (
|
|
1107
|
-
const p = this.currentData.slice(0,
|
|
1108
|
-
S += p,
|
|
1107
|
+
if (O > 0) {
|
|
1108
|
+
const p = this.currentData.slice(0, O).filter((T) => T.rowType === "data").length;
|
|
1109
|
+
S += p, C += p;
|
|
1109
1110
|
}
|
|
1110
|
-
!this.$props.pageable &&
|
|
1111
|
+
!this.$props.pageable && N && (S += this.$props.skip || 0);
|
|
1111
1112
|
}
|
|
1112
|
-
K = (
|
|
1113
|
+
K = (f || this.currentData).map(function(p, T) {
|
|
1113
1114
|
p.rowType === "data" && S++;
|
|
1114
|
-
const y = p.dataIndex % 2 !== 0, v = this.$props.dataItemKey &&
|
|
1115
|
+
const y = p.dataIndex % 2 !== 0, v = this.$props.dataItemKey && Y(this.$props.dataItemKey)(p.dataItem), b = T + C, D = v || "ai" + b, o = D + "_1", I = tt.call(this, p, D, S, y, _), L = k.length - (this.detailExpandable.enabled ? 1 : 0) - ((l == null ? void 0 : l.length) || 0) || 1;
|
|
1115
1116
|
return B = b + a + Se, [n(Jt, {
|
|
1116
|
-
key:
|
|
1117
|
+
key: D,
|
|
1117
1118
|
item: p,
|
|
1118
1119
|
dataIndex: S,
|
|
1119
1120
|
ariaRowIndex: B,
|
|
1120
1121
|
absoluteRowIndex: b,
|
|
1121
1122
|
isAltRow: y,
|
|
1122
|
-
isHidden:
|
|
1123
|
+
isHidden: pe(T),
|
|
1123
1124
|
rowHeight: this.$props.rowHeight,
|
|
1124
|
-
isSelected:
|
|
1125
|
-
isHighlighted:
|
|
1126
|
-
isInEdit:
|
|
1125
|
+
isSelected: I.isSelected,
|
|
1126
|
+
isHighlighted: I.isHighlighted,
|
|
1127
|
+
isInEdit: I.isInEdit,
|
|
1127
1128
|
rowType: p.rowType,
|
|
1128
1129
|
onRowclick: (H) => this.rowClick(H, p),
|
|
1129
1130
|
onRowdblclick: (H) => this.rowDoubleClick(H, p),
|
|
1130
1131
|
render: this.$props.rowRender,
|
|
1131
1132
|
class: this.$props.rowClass ? this.$props.rowClass(p) : ""
|
|
1132
1133
|
}, {
|
|
1133
|
-
default: () => [
|
|
1134
|
+
default: () => [I.row]
|
|
1134
1135
|
}), this.$props.detail && p.rowType === "data" && (p.expanded || p.dataItem.expanded) && n("tr", {
|
|
1135
1136
|
key: o,
|
|
1136
1137
|
class: y ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
|
|
1137
1138
|
style: {
|
|
1138
|
-
visibility:
|
|
1139
|
+
visibility: pe(T) ? "hidden" : "",
|
|
1139
1140
|
height: this.$props.detailRowHeight + "px"
|
|
1140
1141
|
},
|
|
1141
1142
|
role: "row",
|
|
1142
1143
|
"aria-rowindex": B
|
|
1143
1144
|
}, [l == null ? void 0 : l.map(function(H) {
|
|
1144
|
-
return n(
|
|
1145
|
+
return n(ee, {
|
|
1145
1146
|
id: "",
|
|
1146
1147
|
dataIndex: p.dataIndex,
|
|
1147
1148
|
field: H.field,
|
|
@@ -1150,80 +1151,85 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1150
1151
|
group: p.group
|
|
1151
1152
|
}, null);
|
|
1152
1153
|
}, this), (this.$props.expandField || this.detailExpandable.enabled) && n(Ht, {
|
|
1153
|
-
id:
|
|
1154
|
+
id: z.generateNavigatableId(`${o}-dhcell`, R)
|
|
1154
1155
|
}, null), n(kt, {
|
|
1155
1156
|
dataItem: p.dataItem,
|
|
1156
1157
|
dataIndex: p.dataIndex,
|
|
1157
|
-
colSpan:
|
|
1158
|
+
colSpan: L,
|
|
1158
1159
|
ariaColIndex: 2 + (l ? l.length : 0),
|
|
1159
1160
|
detail: this.$props.detail ? this.$props.detail : void 0,
|
|
1160
|
-
id:
|
|
1161
|
+
id: z.generateNavigatableId(`${o}-dcell`, R)
|
|
1161
1162
|
}, null)])];
|
|
1162
1163
|
}, this);
|
|
1163
1164
|
}
|
|
1164
|
-
const
|
|
1165
|
+
const st = this.$props.pageable && n(bt, {
|
|
1165
1166
|
class: "k-grid-pager",
|
|
1166
1167
|
onPagesizechange: this.pageChangeHandler,
|
|
1167
1168
|
onPagechange: this.pageChangeHandler,
|
|
1168
1169
|
size: this.$props.size,
|
|
1169
|
-
total:
|
|
1170
|
+
total: m,
|
|
1170
1171
|
skip: s || 0,
|
|
1171
1172
|
pageSize: (r !== void 0 ? r : this.$props.pageSize) || 10,
|
|
1172
|
-
messagesMap:
|
|
1173
|
+
messagesMap: Je,
|
|
1173
1174
|
settings: $t(this.$props.pageable || {})
|
|
1174
|
-
}, null),
|
|
1175
|
-
h:
|
|
1175
|
+
}, null), ue = Ge.call(this, {
|
|
1176
|
+
h: Te,
|
|
1176
1177
|
template: this.$props.pager,
|
|
1177
|
-
defaultRendering:
|
|
1178
|
+
defaultRendering: st,
|
|
1178
1179
|
additionalProps: {
|
|
1179
1180
|
...this.$props,
|
|
1180
1181
|
skip: this.$props.skip || 0,
|
|
1181
|
-
messagesMap:
|
|
1182
|
+
messagesMap: Je
|
|
1182
1183
|
},
|
|
1183
1184
|
additionalListeners: {
|
|
1184
1185
|
pagesizechange: this.pageChangeHandler,
|
|
1185
1186
|
pagechange: this.pageChangeHandler
|
|
1186
1187
|
}
|
|
1187
|
-
}),
|
|
1188
|
+
}), rt = (a) => e && e.filter((C) => C.field === a).length > 0, ce = n("colgroup", {
|
|
1188
1189
|
ref: G(this, "colGroup")
|
|
1189
|
-
}, [
|
|
1190
|
+
}, [k.map(function(a, C) {
|
|
1190
1191
|
return n("col", {
|
|
1191
|
-
key:
|
|
1192
|
-
class:
|
|
1192
|
+
key: a.id || `col-${C}`,
|
|
1193
|
+
class: rt(a.field) ? "k-sorted" : void 0,
|
|
1193
1194
|
width: a.width !== void 0 ? a.width.toString().indexOf("%") !== -1 ? a.width : Math.floor(parseFloat(a.width.toString())) + "px" : void 0
|
|
1194
1195
|
}, null);
|
|
1195
|
-
}, this)]),
|
|
1196
|
+
}, this)]), ge = {
|
|
1196
1197
|
height: this.getCorrectHeight,
|
|
1197
1198
|
...this.$attrs.style
|
|
1198
|
-
},
|
|
1199
|
-
class: "k-
|
|
1199
|
+
}, lt = n("div", {
|
|
1200
|
+
class: "k-loading-mask"
|
|
1200
1201
|
}, [n("div", {
|
|
1201
|
-
class: "k-
|
|
1202
|
+
class: "k-loading-color"
|
|
1202
1203
|
}, null), n("div", {
|
|
1203
|
-
|
|
1204
|
+
style: {
|
|
1205
|
+
height: "100%",
|
|
1206
|
+
display: "flex",
|
|
1207
|
+
justifyContent: "center",
|
|
1208
|
+
alignItems: "center"
|
|
1209
|
+
}
|
|
1204
1210
|
}, [n(yt, {
|
|
1205
1211
|
size: "large",
|
|
1206
|
-
type: "
|
|
1207
|
-
}, null)])]),
|
|
1208
|
-
h:
|
|
1212
|
+
type: "converging-spinner"
|
|
1213
|
+
}, null)])]), j = this.$props.showLoader && Ge.call(this, {
|
|
1214
|
+
h: Te,
|
|
1209
1215
|
template: this.$props.loader,
|
|
1210
|
-
defaultRendering:
|
|
1216
|
+
defaultRendering: lt
|
|
1211
1217
|
});
|
|
1212
|
-
return this.$props.scrollable === "none" ? n(
|
|
1218
|
+
return this.$props.scrollable === "none" ? n(Ae, {
|
|
1213
1219
|
ref: "navRef",
|
|
1214
1220
|
id: this._gridId,
|
|
1215
1221
|
navigatable: this.$props.navigatable
|
|
1216
1222
|
}, {
|
|
1217
|
-
default: () => [n(
|
|
1223
|
+
default: () => [n(Ve, {
|
|
1218
1224
|
ref: (a) => {
|
|
1219
1225
|
this.gridNavRef = a;
|
|
1220
1226
|
},
|
|
1221
1227
|
currentData: this.currentData,
|
|
1222
1228
|
id: this.$props.id,
|
|
1223
|
-
style:
|
|
1229
|
+
style: ge,
|
|
1224
1230
|
class: this.nonscrollableWrapperClass
|
|
1225
1231
|
}, {
|
|
1226
|
-
default: () => [
|
|
1232
|
+
default: () => [se, re, n("div", {
|
|
1227
1233
|
role: "grid",
|
|
1228
1234
|
class: "k-grid-aria-root",
|
|
1229
1235
|
id: this._gridRoleElementId,
|
|
@@ -1236,36 +1242,36 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1236
1242
|
},
|
|
1237
1243
|
ref: G(this, "table"),
|
|
1238
1244
|
role: "none"
|
|
1239
|
-
}, [
|
|
1245
|
+
}, [De(" "), ce, de, n("tbody", {
|
|
1240
1246
|
class: "k-table-tbody",
|
|
1241
1247
|
"data-keyboardnavbody": !0
|
|
1242
|
-
}, [K,
|
|
1243
|
-
id:
|
|
1248
|
+
}, [K, De(" "), j]), he]), U && n(qe, {
|
|
1249
|
+
id: z.generateNavigatableId("no-records", R)
|
|
1244
1250
|
}, {
|
|
1245
|
-
default: () => [
|
|
1246
|
-
})]),
|
|
1251
|
+
default: () => [M.length ? M : n(je, null, null)]
|
|
1252
|
+
})]), ue, j, ae]
|
|
1247
1253
|
})]
|
|
1248
|
-
}) : n(
|
|
1254
|
+
}) : n(Ae, {
|
|
1249
1255
|
ref: "navRef",
|
|
1250
1256
|
id: this._gridId,
|
|
1251
1257
|
navigatable: this.$props.navigatable
|
|
1252
1258
|
}, {
|
|
1253
|
-
default: () => [n(
|
|
1259
|
+
default: () => [n(Ve, {
|
|
1254
1260
|
ref: (a) => {
|
|
1255
1261
|
this.gridNavRef = a;
|
|
1256
1262
|
},
|
|
1257
1263
|
currentData: this.currentData,
|
|
1258
1264
|
id: this.$props.id,
|
|
1259
|
-
style:
|
|
1265
|
+
style: ge,
|
|
1260
1266
|
class: this.scrollableWrapperClass
|
|
1261
1267
|
}, {
|
|
1262
|
-
default: () => [
|
|
1268
|
+
default: () => [se, re, n("div", {
|
|
1263
1269
|
role: "grid",
|
|
1264
1270
|
class: "k-grid-aria-root",
|
|
1265
1271
|
id: this._gridRoleElementId,
|
|
1266
1272
|
"aria-colcount": this.getAriaColCount,
|
|
1267
1273
|
"aria-rowcount": this.getAriaRowCount
|
|
1268
|
-
}, [
|
|
1274
|
+
}, [de, n("div", {
|
|
1269
1275
|
class: "k-grid-container",
|
|
1270
1276
|
role: "presentation"
|
|
1271
1277
|
}, [n("div", {
|
|
@@ -1280,15 +1286,15 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1280
1286
|
role: "none",
|
|
1281
1287
|
class: this.gridTableClass,
|
|
1282
1288
|
ref: G(this, "table")
|
|
1283
|
-
}, [
|
|
1289
|
+
}, [ce, n("tbody", {
|
|
1284
1290
|
class: "k-table-tbody",
|
|
1285
1291
|
role: "rowgroup",
|
|
1286
1292
|
"data-keyboardnavbody": !0,
|
|
1287
1293
|
ref: G(this, "tableBody")
|
|
1288
|
-
}, [K])]), U && n(
|
|
1289
|
-
id:
|
|
1294
|
+
}, [K])]), U && n(qe, {
|
|
1295
|
+
id: z.generateNavigatableId("no-records", R)
|
|
1290
1296
|
}, {
|
|
1291
|
-
default: () => [
|
|
1297
|
+
default: () => [M.length ? M : n(je, null, null)]
|
|
1292
1298
|
})]), !U && n("div", {
|
|
1293
1299
|
class: "k-height-container",
|
|
1294
1300
|
role: "presentation"
|
|
@@ -1297,7 +1303,7 @@ const Pi = /* @__PURE__ */ at({
|
|
|
1297
1303
|
style: this.$props.scrollable === "virtual" ? {
|
|
1298
1304
|
height: this._containerHeightRef + "px"
|
|
1299
1305
|
} : {}
|
|
1300
|
-
}, null)])])
|
|
1306
|
+
}, null)])])]), he, Ze]), ue, j, ae]
|
|
1301
1307
|
})]
|
|
1302
1308
|
});
|
|
1303
1309
|
}
|