@progress/kendo-vue-grid 6.4.2-develop.3 → 6.5.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 +239 -233
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +12 -9
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/index.d.mts +47 -1
- package/index.d.ts +47 -1
- 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 +34 -10
package/Grid.mjs
CHANGED
|
@@ -5,38 +5,38 @@
|
|
|
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 { SvgIcon as
|
|
10
|
-
import { tableKeyboardNavigationTools as
|
|
11
|
-
import { Loader as
|
|
12
|
-
import { GridNav as
|
|
13
|
-
import { GridSelectionCell as
|
|
14
|
-
import { GridHierarchyCell as
|
|
15
|
-
import { GridDetailHierarchyCell as
|
|
16
|
-
import { GridDetailCell as
|
|
17
|
-
import { GridEditCell as
|
|
18
|
-
import { Header as
|
|
19
|
-
import { HeaderRow as
|
|
20
|
-
import { FilterRow as
|
|
21
|
-
import { GroupPanel as
|
|
22
|
-
import { Footer as
|
|
23
|
-
import { FooterRow as
|
|
24
|
-
import { operators as
|
|
25
|
-
import { VirtualScroll as
|
|
26
|
-
import { VirtualScrollFixed as
|
|
27
|
-
import { ColumnResize as
|
|
28
|
-
import { CommonDragLogic as
|
|
29
|
-
import { DragClue as
|
|
30
|
-
import { DropClue as
|
|
31
|
-
import { applyExpandedState as
|
|
32
|
-
import { GridCell as
|
|
33
|
-
import { GridGroupCell as
|
|
34
|
-
import { GridRow as
|
|
35
|
-
import { GridHeaderSelectionCell as
|
|
36
|
-
import { GridNoRecords as
|
|
37
|
-
import { packageMetadata as
|
|
8
|
+
import { defineComponent as Ge, createVNode as o, h as le, ref as $, markRaw as E } from "vue";
|
|
9
|
+
import { SvgIcon as De, getDefaultSlots as Te, isObject as M, canUseDOM as U, templateRendering as y, getListeners as R, WatermarkOverlay as Oe, getter as q, getTemplate as ae, setRef as A, hasListener as D, getRef as b, kendoThemeMaps as ne, isRtl as de, validatePackage as Le, shouldShowValidationUI as Ee, guid as he, getNestedValue as pe } from "@progress/kendo-vue-common";
|
|
10
|
+
import { tableKeyboardNavigationTools as I, tableColumnsVirtualization as Me, Pager as Ae, normalize as Pe, TableKeyboardNavigationProvider as ce } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { Loader as Ne } from "@progress/kendo-vue-indicators";
|
|
12
|
+
import { GridNav as ue } from "./GridNav.mjs";
|
|
13
|
+
import { GridSelectionCell as Ve } from "./cells/GridSelectionCell.mjs";
|
|
14
|
+
import { GridHierarchyCell as Be } from "./cells/GridHierarchyCell.mjs";
|
|
15
|
+
import { GridDetailHierarchyCell as We } from "./cells/GridDetailHierarchyCell.mjs";
|
|
16
|
+
import { GridDetailCell as je } from "./cells/GridDetailCell.mjs";
|
|
17
|
+
import { GridEditCell as Ke } from "./cells/GridEditCell.mjs";
|
|
18
|
+
import { Header as Ue } from "./header/Header.mjs";
|
|
19
|
+
import { HeaderRow as qe } from "./header/HeaderRow.mjs";
|
|
20
|
+
import { FilterRow as Je } from "./header/FilterRow.mjs";
|
|
21
|
+
import { GroupPanel as Qe } from "./header/GroupPanel.mjs";
|
|
22
|
+
import { Footer as Xe } from "./footer/Footer.mjs";
|
|
23
|
+
import { FooterRow as Ye } from "./footer/FooterRow.mjs";
|
|
24
|
+
import { operators as ge } from "./filterCommon.mjs";
|
|
25
|
+
import { VirtualScroll as J } from "./VirtualScroll.mjs";
|
|
26
|
+
import { VirtualScrollFixed as Ze, RowHeightService as et } from "./VirtualScrollFixed.mjs";
|
|
27
|
+
import { ColumnResize as tt } from "./drag/ColumnResize.mjs";
|
|
28
|
+
import { CommonDragLogic as st } from "./drag/CommonDragLogic.mjs";
|
|
29
|
+
import { DragClue as it } from "./drag/DragClue.mjs";
|
|
30
|
+
import { DropClue as rt } from "./drag/DropClue.mjs";
|
|
31
|
+
import { applyExpandedState as fe, flatData as ot, readColumns as lt, autoGenerateColumns as at, mapColumns as nt, groupedFirstItemValue as me, firefox as dt, firefoxMaxHeight as ht } from "./utils/main.mjs";
|
|
32
|
+
import { GridCell as pt } from "./cells/GridCell.mjs";
|
|
33
|
+
import { GridGroupCell as $e } from "./cells/GridGroupCell.mjs";
|
|
34
|
+
import { GridRow as ct } from "./rows/GridRow.mjs";
|
|
35
|
+
import { GridHeaderSelectionCell as ut } from "./header/GridHeaderSelectionCell.mjs";
|
|
36
|
+
import { GridNoRecords as gt } from "./GridNoRecords.mjs";
|
|
37
|
+
import { packageMetadata as be } from "./package-metadata.mjs";
|
|
38
38
|
import { pagerMessagesMap as Ce } from "./messages/main.mjs";
|
|
39
|
-
const
|
|
39
|
+
const qt = /* @__PURE__ */ Ge({
|
|
40
40
|
name: "KendoGrid",
|
|
41
41
|
props: {
|
|
42
42
|
topCacheCount: {
|
|
@@ -64,6 +64,7 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
64
64
|
headerCellRender: [String, Function, Object],
|
|
65
65
|
loader: [String, Function, Object, Boolean],
|
|
66
66
|
filter: Object,
|
|
67
|
+
highlight: Object,
|
|
67
68
|
pageable: [Boolean, Object],
|
|
68
69
|
pageSize: Number,
|
|
69
70
|
total: Number,
|
|
@@ -102,7 +103,7 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
102
103
|
return !0;
|
|
103
104
|
}
|
|
104
105
|
},
|
|
105
|
-
columnMenuIcon:
|
|
106
|
+
columnMenuIcon: De,
|
|
106
107
|
dataItemKey: String,
|
|
107
108
|
navigatable: {
|
|
108
109
|
type: Boolean,
|
|
@@ -137,18 +138,18 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
137
138
|
}
|
|
138
139
|
},
|
|
139
140
|
created() {
|
|
140
|
-
|
|
141
|
+
Le(be), this.showLicenseWatermark = Ee(be), this.initialHeight = null, this._columns = [];
|
|
141
142
|
const e = this.currentGroupable, t = this.getVirtualScroll();
|
|
142
|
-
this.vs = new t(e || this.$props.rowHeight === void 0 || this.$props.rowHeight === 0, this.$props.topCacheCount), this.dragLogic = new
|
|
143
|
+
this.vs = new t(e || this.$props.rowHeight === void 0 || this.$props.rowHeight === 0, this.$props.topCacheCount), this.dragLogic = new st(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this)), this.columnResize = new tt(this.onResize.bind(this)), this._columnsMap = [[]], this._header = null, this._footer = null, this.forceUpdateTimeout = void 0, this._gridId = he(), this._gridRoleElementId = he(), this.slicedCurrentData = void 0, this._prevTotal = void 0;
|
|
143
144
|
},
|
|
144
145
|
mounted() {
|
|
145
146
|
this.setRefs();
|
|
146
|
-
const e =
|
|
147
|
+
const e = de(this._element);
|
|
147
148
|
this._prevTotal = this.$props.total, this.isRtl = e, this.initialHeight = this._element.style ? this._element.style.height : null, this.resizeObserver = U && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.resizeObserver && this.resizeObserver.observe(document.body);
|
|
148
149
|
},
|
|
149
150
|
updated() {
|
|
150
151
|
this.setRefs();
|
|
151
|
-
const e =
|
|
152
|
+
const e = de(this._element);
|
|
152
153
|
this.isRtl = e, this._prevTotal = this.$props.total, this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = "");
|
|
153
154
|
},
|
|
154
155
|
unmounted() {
|
|
@@ -162,7 +163,7 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
162
163
|
return {
|
|
163
164
|
"k-grid": !0,
|
|
164
165
|
"k-grid-md": !e,
|
|
165
|
-
[`k-grid-${
|
|
166
|
+
[`k-grid-${ne.sizeMap[e] || e}`]: e
|
|
166
167
|
};
|
|
167
168
|
},
|
|
168
169
|
scrollableWrapperClass() {
|
|
@@ -182,14 +183,14 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
182
183
|
"k-table": !0,
|
|
183
184
|
"k-grid-table": !0,
|
|
184
185
|
"k-grid-md": !e,
|
|
185
|
-
[`k-table-${
|
|
186
|
+
[`k-table-${ne.sizeMap[e] || e}`]: e
|
|
186
187
|
};
|
|
187
188
|
},
|
|
188
189
|
getCorrectHeight() {
|
|
189
190
|
return this.$props.scrollable === "virtual" ? this.initialHeight || "450px" : null;
|
|
190
191
|
},
|
|
191
192
|
currentGroupable() {
|
|
192
|
-
return this.$props.groupable === !0 && this.$props.group && this.$props.group.length ||
|
|
193
|
+
return this.$props.groupable === !0 && this.$props.group && this.$props.group.length || M(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
193
194
|
},
|
|
194
195
|
computedCollapsed() {
|
|
195
196
|
let e = [];
|
|
@@ -245,32 +246,32 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
245
246
|
const {
|
|
246
247
|
declarationIndex: l,
|
|
247
248
|
parentIndex: n,
|
|
248
|
-
depth:
|
|
249
|
-
colSpan:
|
|
250
|
-
rowSpan:
|
|
251
|
-
index:
|
|
252
|
-
kFirst:
|
|
253
|
-
children:
|
|
254
|
-
...
|
|
249
|
+
depth: g,
|
|
250
|
+
colSpan: p,
|
|
251
|
+
rowSpan: C,
|
|
252
|
+
index: k,
|
|
253
|
+
kFirst: S,
|
|
254
|
+
children: x,
|
|
255
|
+
..._
|
|
255
256
|
} = r;
|
|
256
|
-
return
|
|
257
|
-
children: t(
|
|
258
|
-
...
|
|
259
|
-
} :
|
|
257
|
+
return x.length ? {
|
|
258
|
+
children: t(x),
|
|
259
|
+
..._
|
|
260
|
+
} : _;
|
|
260
261
|
}));
|
|
261
262
|
return t(e);
|
|
262
263
|
},
|
|
263
264
|
setRefs() {
|
|
264
265
|
let e = "$el";
|
|
265
|
-
const t =
|
|
266
|
+
const t = b(this, "gridNav");
|
|
266
267
|
t && (this._element = t[e]);
|
|
267
|
-
const i =
|
|
268
|
+
const i = b(this, "groupPanelDiv");
|
|
268
269
|
if (i) {
|
|
269
270
|
let n = i[e] || null;
|
|
270
271
|
this.dragLogic.refGroupPanelDiv(n);
|
|
271
272
|
}
|
|
272
|
-
const r =
|
|
273
|
-
this.dragLogic.refDropElementClue(r), this.dragLogic.refDragElementClue(l), this.columnResize.colGroupMain =
|
|
273
|
+
const r = b(this, "dropElementClue"), l = b(this, "dragElementClue");
|
|
274
|
+
this.dragLogic.refDropElementClue(r), this.dragLogic.refDragElementClue(l), this.columnResize.colGroupMain = b(this, "colGroup"), this._header = b(this, "header"), this._footer = b(this, "footer"), this.vs.containerRef = b(this, "scrollContainer"), this.vs.table = b(this, "scrollTable"), this.resetTableWidth(), this.vs.tableBodyRef = b(this, "scrollTableBody");
|
|
274
275
|
},
|
|
275
276
|
gridUnmounted() {
|
|
276
277
|
clearTimeout(this.forceUpdateTimeout), this.columnResize.columns = [], this.dragLogic.columns = [], this.dragLogic && this.dragLogic.dragElementClue && (this.dragLogic.dragElementClue.$el.remove(), this.dragLogic.dropElementClue.$el.remove()), this.currentData = [], this._columns = [], document != null && document.body && this.resizeObserver && this.resizeObserver.disconnect();
|
|
@@ -279,7 +280,7 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
279
280
|
this.vs.PageChange = this.pageChangeHandler, this.vs.realSkip = this.$props.skip || 0, this.vs.pageSize = (this.$props.take !== void 0 ? this.$props.take : this.$props.pageSize) || 0, this.vs.scrollableVirtual = this.$props.scrollable === "virtual", this.vs.propsSkip = (this.$props.skip || 0) + (this.$props.scrollable === "virtual" ? this.vs.topCacheCount + (this.vs.attendedSkip - (this.$props.skip || 0)) : 0);
|
|
280
281
|
},
|
|
281
282
|
getVirtualScroll() {
|
|
282
|
-
return
|
|
283
|
+
return J;
|
|
283
284
|
},
|
|
284
285
|
isAllData() {
|
|
285
286
|
const {
|
|
@@ -294,11 +295,11 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
294
295
|
else if (this.$props.totalGroupedHeight)
|
|
295
296
|
this.vs.containerHeight = Math.min(1533915, this.$props.totalGroupedHeight);
|
|
296
297
|
else if (this.$props.allGroupedItems && this.$props.allGroupedItems.data) {
|
|
297
|
-
const t = this.totalGroupedRows(
|
|
298
|
+
const t = this.totalGroupedRows(fe(this.$props.allGroupedItems, this.computedCollapsed, this.$props.uniqueField).data);
|
|
298
299
|
this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * t);
|
|
299
300
|
} else
|
|
300
301
|
this.vs.containerHeight = 1533915;
|
|
301
|
-
if (this.slicedCurrentData = void 0, this.vs instanceof
|
|
302
|
+
if (this.slicedCurrentData = void 0, this.vs instanceof Ze) {
|
|
302
303
|
const {
|
|
303
304
|
rowHeight: t = 0,
|
|
304
305
|
detail: i,
|
|
@@ -307,9 +308,9 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
307
308
|
let {
|
|
308
309
|
detailRowHeight: l = 0
|
|
309
310
|
} = this.$props;
|
|
310
|
-
l = i && r ? l : t, this.isAllData() ? (this.vs.total = this.currentData.length, this.slicedCurrentData = this.currentData.slice(this.vs.realSkip, this.vs.realSkip + this.vs.pageSize), this.vs.rowHeightService = this.rowHeightService(this.vs, this.currentData.length, t, l, this.currentData)) : this.vs.rowHeightService = new
|
|
311
|
+
l = i && r ? l : t, this.isAllData() ? (this.vs.total = this.currentData.length, this.slicedCurrentData = this.currentData.slice(this.vs.realSkip, this.vs.realSkip + this.vs.pageSize), this.vs.rowHeightService = this.rowHeightService(this.vs, this.currentData.length, t, l, this.currentData)) : this.vs.rowHeightService = new et(e, t, l);
|
|
311
312
|
const n = this.vs.rowHeightService.totalHeight();
|
|
312
|
-
this.vs.containerHeight =
|
|
313
|
+
this.vs.containerHeight = dt ? Math.min(ht, n) : n;
|
|
313
314
|
}
|
|
314
315
|
},
|
|
315
316
|
onSkipChanged(e, t) {
|
|
@@ -317,11 +318,11 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
317
318
|
},
|
|
318
319
|
onTotalChanged(e, t) {
|
|
319
320
|
const i = this.currentGroupable;
|
|
320
|
-
this.vs.reset(), this.vs = new
|
|
321
|
+
this.vs.reset(), this.vs = new J(i || this.$props.rowHeight === void 0 || this.$props.rowHeight === 0, this.$props.topCacheCount), this.resetVirtual(), this.setRefs();
|
|
321
322
|
},
|
|
322
323
|
onRowHeightChanged(e, t) {
|
|
323
324
|
const i = this.currentGroupable;
|
|
324
|
-
this.vs.reset(), this.vs = new
|
|
325
|
+
this.vs.reset(), this.vs = new J(i || this.$props.rowHeight === void 0 || this.$props.rowHeight === 0, this.$props.topCacheCount), this.resetVirtual(), this.setRefs();
|
|
325
326
|
},
|
|
326
327
|
scrollHandler(e) {
|
|
327
328
|
clearTimeout(this.forceUpdateTimeout), this.$props.columnVirtualization && !this.vs.scrollableVirtual && (this.forceUpdateTimeout = setTimeout(() => {
|
|
@@ -347,22 +348,22 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
347
348
|
},
|
|
348
349
|
updateGroupCollapsed(e) {
|
|
349
350
|
let t = this.computedCollapsed, i = t[e.level];
|
|
350
|
-
const r = this.$props.uniqueField, l = function(
|
|
351
|
-
return
|
|
352
|
-
}, n = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, l, 0, null) : e.dataItem,
|
|
351
|
+
const r = this.$props.uniqueField, l = function(p, C) {
|
|
352
|
+
return p.value === e.dataItem.value && C === e.level;
|
|
353
|
+
}, n = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, l, 0, null) : e.dataItem, g = me(n || e.dataItem, r);
|
|
353
354
|
if (e.value) {
|
|
354
355
|
if (i && i.length) {
|
|
355
|
-
const
|
|
356
|
-
|
|
356
|
+
const p = i.indexOf(g);
|
|
357
|
+
p > -1 && i.splice(p, 1);
|
|
357
358
|
}
|
|
358
359
|
} else
|
|
359
|
-
i ? i.includes(
|
|
360
|
+
i ? i.includes(g) || i.push(g) : i = [g];
|
|
360
361
|
return t;
|
|
361
362
|
},
|
|
362
363
|
itemChange(e) {
|
|
363
|
-
const t =
|
|
364
|
+
const t = D.call(this, "itemchange");
|
|
364
365
|
if (e.field === this.$props.expandField || (this.$props.group || this.$props.detail) && e.field === void 0) {
|
|
365
|
-
|
|
366
|
+
D.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
|
|
366
367
|
...this.getArguments(e.event),
|
|
367
368
|
collapsedGroups: this.updateGroupCollapsed(e),
|
|
368
369
|
dataItem: e.dataItem,
|
|
@@ -470,10 +471,10 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
470
471
|
}, t);
|
|
471
472
|
},
|
|
472
473
|
raiseDataEvent(e, t, i, r) {
|
|
473
|
-
|
|
474
|
+
D.call(this, e) ? this.$emit(e, {
|
|
474
475
|
...this.getArguments(r),
|
|
475
476
|
...t
|
|
476
|
-
}) :
|
|
477
|
+
}) : D.call(this, "datastatechange") && this.$emit("datastatechange", {
|
|
477
478
|
...this.getArguments(r),
|
|
478
479
|
data: {
|
|
479
480
|
...this.getDataState(),
|
|
@@ -482,17 +483,17 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
482
483
|
});
|
|
483
484
|
},
|
|
484
485
|
columnReorder(e, t, i) {
|
|
485
|
-
const r = this._columns[e].depth, l = (
|
|
486
|
+
const r = this._columns[e].depth, l = (p) => {
|
|
486
487
|
do
|
|
487
|
-
|
|
488
|
-
while (
|
|
489
|
-
return
|
|
488
|
+
p++;
|
|
489
|
+
while (p < this._columns.length && this._columns[p].depth > r);
|
|
490
|
+
return p;
|
|
490
491
|
}, n = this._columns.splice(e, l(e) - e);
|
|
491
|
-
this._columns.splice(e < t ? l(t - n.length) : t, 0, ...n), this._columns.filter((
|
|
492
|
-
const
|
|
492
|
+
this._columns.splice(e < t ? l(t - n.length) : t, 0, ...n), this._columns.filter((p) => p.declarationIndex >= 0).forEach((p, C) => p.orderIndex = C);
|
|
493
|
+
const g = this.getColumns();
|
|
493
494
|
this.$emit("columnreorder", {
|
|
494
495
|
target: this,
|
|
495
|
-
columns:
|
|
496
|
+
columns: g,
|
|
496
497
|
event: i,
|
|
497
498
|
prev: e,
|
|
498
499
|
next: t
|
|
@@ -538,19 +539,19 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
538
539
|
});
|
|
539
540
|
},
|
|
540
541
|
initColumns(e, t) {
|
|
541
|
-
const i =
|
|
542
|
-
if (this._columns =
|
|
542
|
+
const i = I.getIdPrefix(this.navigation);
|
|
543
|
+
if (this._columns = lt(e, this.getColumns(), {
|
|
543
544
|
prevId: 0,
|
|
544
545
|
idPrefix: i
|
|
545
546
|
}), this._columns.length === 0) {
|
|
546
|
-
const n =
|
|
547
|
+
const n = at(this.$props.dataItems, this.$props.group, this.$props.expandField, {
|
|
547
548
|
prevId: 0,
|
|
548
549
|
idPrefix: i
|
|
549
550
|
});
|
|
550
551
|
this._columns = n;
|
|
551
552
|
}
|
|
552
553
|
this.$props.selectedField && this._columns.filter((n) => n.field === this.$props.selectedField).forEach((n) => {
|
|
553
|
-
n.width = n.width || "50px", n.internalCell =
|
|
554
|
+
n.width = n.width || "50px", n.internalCell = E(Ve), n.internalHeaderCell = E(ut);
|
|
554
555
|
});
|
|
555
556
|
const r = {
|
|
556
557
|
id: "",
|
|
@@ -573,22 +574,22 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
573
574
|
isAccessible: !0
|
|
574
575
|
};
|
|
575
576
|
let l = 0;
|
|
576
|
-
this.$props.expandField &&
|
|
577
|
+
this.$props.expandField && D.call(this, "expandchange") && this.$props.detail && (this._columns.unshift({
|
|
577
578
|
...r,
|
|
578
|
-
internalCell:
|
|
579
|
+
internalCell: E(Be),
|
|
579
580
|
field: this.$props.expandField,
|
|
580
581
|
headerClassName: "k-hierarchy-cell k-header",
|
|
581
|
-
id:
|
|
582
|
+
id: I.generateNavigatableId(`${this._columns.length}`, i, "column"),
|
|
582
583
|
...this.expandColumn
|
|
583
584
|
}), l++);
|
|
584
585
|
for (let n = 0; n < t; n++)
|
|
585
586
|
this._columns.unshift({
|
|
586
587
|
...r,
|
|
587
588
|
isAccessible: !1,
|
|
588
|
-
internalCell:
|
|
589
|
+
internalCell: E($e),
|
|
589
590
|
field: "value"
|
|
590
591
|
}), l++;
|
|
591
|
-
this._columns.slice(l).forEach((n) => n.parentIndex >= 0 && (n.parentIndex += l)), this._columnsMap =
|
|
592
|
+
this._columns.slice(l).forEach((n) => n.parentIndex >= 0 && (n.parentIndex += l)), this._columnsMap = nt(this._columns), this.columnResize.columns = this._columns, this.dragLogic.columns = this._columns;
|
|
592
593
|
},
|
|
593
594
|
resolveTitle(e) {
|
|
594
595
|
const t = this.findColumnByField(e), i = t && (t.title || t.field);
|
|
@@ -641,7 +642,7 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
641
642
|
}
|
|
642
643
|
},
|
|
643
644
|
setup() {
|
|
644
|
-
const e =
|
|
645
|
+
const e = $(null), t = $(null), i = $(null), r = $(null), l = $(null), n = $(null), g = $(null), p = $(null), C = $(null), k = $(null);
|
|
645
646
|
return {
|
|
646
647
|
groupPanelDivRef: e,
|
|
647
648
|
dropElementClueRef: t,
|
|
@@ -649,27 +650,27 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
649
650
|
headerRef: r,
|
|
650
651
|
footerRef: l,
|
|
651
652
|
gridNavRef: n,
|
|
652
|
-
colGroupRef:
|
|
653
|
-
scrollContainerRef:
|
|
654
|
-
scrollTableRef:
|
|
655
|
-
scrollTableBodyRef:
|
|
653
|
+
colGroupRef: g,
|
|
654
|
+
scrollContainerRef: p,
|
|
655
|
+
scrollTableRef: C,
|
|
656
|
+
scrollTableBodyRef: k
|
|
656
657
|
};
|
|
657
658
|
},
|
|
658
659
|
render() {
|
|
659
|
-
const e =
|
|
660
|
+
const e = Te(this);
|
|
660
661
|
let t = this.$props.total || 0;
|
|
661
|
-
const i =
|
|
662
|
+
const i = I.getIdPrefix(this.navigation);
|
|
662
663
|
let r = [];
|
|
663
|
-
Array.isArray(this.$props.dataItems) ? r = this.$props.dataItems : this.$props.dataItems && (r =
|
|
664
|
-
const l = this.$props.groupable === !0 ||
|
|
664
|
+
Array.isArray(this.$props.dataItems) ? r = this.$props.dataItems : this.$props.dataItems && (r = fe(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField).data, t = t || this.$props.dataItems.total);
|
|
665
|
+
const l = this.$props.groupable === !0 || M(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
665
666
|
this.columnResize.resizable = this.$props.resizable || !1, this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = l, this.initializeVirtualization(t);
|
|
666
|
-
const n =
|
|
667
|
+
const n = M(this.$props.groupable) && this.$props.groupable.footer || "none";
|
|
667
668
|
this.currentData = [];
|
|
668
|
-
const
|
|
669
|
+
const g = ot(this.currentData, r, n, {
|
|
669
670
|
index: this.$props.skip || 0
|
|
670
|
-
}, this.$props.group !== void 0, this.$props.expandField),
|
|
671
|
-
this.notHiddenColumns = this.filterHiddenColumns(this.$props.columns), this.initColumns(this.notHiddenColumns,
|
|
672
|
-
const
|
|
671
|
+
}, this.$props.group !== void 0, this.$props.expandField), p = e || [];
|
|
672
|
+
this.notHiddenColumns = this.filterHiddenColumns(this.$props.columns), this.initColumns(this.notHiddenColumns, g);
|
|
673
|
+
const C = p.filter((s) => s && s.tag && s.tag.toLowerCase().indexOf("toolbar") !== -1 || s.componentOptions && s.componentOptions.tag && s.componentOptions.tag.toLowerCase().indexOf("toolbar") !== -1 || s.type && s.type.name && s.type.name.toLowerCase().indexOf("toolbar") !== -1), k = p.filter((s) => s && s.tag && s.tag.toLowerCase().indexOf("records") !== -1 || s.componentOptions && s.componentOptions.tag && s.componentOptions.tag.toLowerCase().indexOf("records") !== -1 || s.type && s.type.name && s.type.name.toLowerCase().indexOf("records") !== -1), S = this._columns.filter((s) => s.children.length === 0), x = l && o(Qe, {
|
|
673
674
|
ref: (s) => {
|
|
674
675
|
this.groupPanelDivRef = s;
|
|
675
676
|
},
|
|
@@ -680,22 +681,22 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
680
681
|
onDragHandler: this.dragLogic.dragHandler,
|
|
681
682
|
onReleaseHandler: this.dragLogic.releaseHandler,
|
|
682
683
|
resolveTitle: this.resolveTitle
|
|
683
|
-
}, null),
|
|
684
|
+
}, null), _ = (this.dragLogic.reorderable || this.dragLogic.groupable) && U && document && document.body, Q = [_ && o(rt, {
|
|
684
685
|
ref: (s) => {
|
|
685
686
|
this.dropElementClueRef = s;
|
|
686
687
|
}
|
|
687
|
-
}, null),
|
|
688
|
+
}, null), _ && o(it, {
|
|
688
689
|
ref: (s) => {
|
|
689
690
|
this.dragElementClueRef = s;
|
|
690
691
|
}
|
|
691
|
-
}, null)],
|
|
692
|
+
}, null)], X = o(Ue, {
|
|
692
693
|
size: this.$props.size,
|
|
693
694
|
columnResize: this.columnResize,
|
|
694
695
|
staticHeaders: this.$props.scrollable !== "none",
|
|
695
696
|
ref: (s) => {
|
|
696
697
|
this.headerRef = s;
|
|
697
698
|
},
|
|
698
|
-
headerRow: o(
|
|
699
|
+
headerRow: o(qe, {
|
|
699
700
|
grid: this,
|
|
700
701
|
sort: this.$props.sort,
|
|
701
702
|
groupable: this.$props.groupable,
|
|
@@ -704,7 +705,7 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
704
705
|
onSortChange: this.sortChangeHandler,
|
|
705
706
|
filter: this.$props.filter,
|
|
706
707
|
filterable: this.$props.filterable,
|
|
707
|
-
filterOperators: this.$props.filterOperators ||
|
|
708
|
+
filterOperators: this.$props.filterOperators || ge,
|
|
708
709
|
onFilterChange: this.filterChangeHandler,
|
|
709
710
|
columnMenu: this.$props.columnMenu,
|
|
710
711
|
columnMenuIcon: this.$props.columnMenuIcon,
|
|
@@ -720,12 +721,12 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
720
721
|
cellRender: this.$props.headerCellRender,
|
|
721
722
|
isRtl: this.isRtl,
|
|
722
723
|
isColCountDefined: this.getAriaColCount !== void 0,
|
|
723
|
-
filterRow: this.$props.filterable && o(
|
|
724
|
+
filterRow: this.$props.filterable && o(Je, {
|
|
724
725
|
grid: this,
|
|
725
726
|
size: this.$props.size,
|
|
726
727
|
columns: this._columns,
|
|
727
728
|
filter: this.$props.filter,
|
|
728
|
-
filterOperators: this.$props.filterOperators ||
|
|
729
|
+
filterOperators: this.$props.filterOperators || ge,
|
|
729
730
|
onFilterchange: this.filterChangeHandler,
|
|
730
731
|
sort: this.$props.sort,
|
|
731
732
|
cellRender: this.$props.filterCellRender,
|
|
@@ -733,130 +734,131 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
733
734
|
ariaRowIndex: this._columnsMap.length + 1
|
|
734
735
|
}, null) || void 0
|
|
735
736
|
}, null),
|
|
736
|
-
cols:
|
|
737
|
+
cols: S.map(function(s, d) {
|
|
737
738
|
return o("col", {
|
|
738
739
|
key: d.toString(),
|
|
739
740
|
width: s.width !== void 0 ? Math.floor(parseFloat(s.width.toString())) + "px" : void 0
|
|
740
741
|
}, null);
|
|
741
742
|
}, this)
|
|
742
|
-
}, null),
|
|
743
|
+
}, null), Y = this._columns.some((s) => !!s.footerCell) ? o(Xe, {
|
|
743
744
|
size: this.$props.size,
|
|
744
745
|
columnResize: this.columnResize,
|
|
745
746
|
staticHeaders: this.$props.scrollable !== "none",
|
|
746
747
|
ref: (s) => {
|
|
747
748
|
this.footerRef = s;
|
|
748
749
|
},
|
|
749
|
-
row: o(
|
|
750
|
+
row: o(Ye, {
|
|
750
751
|
isRtl: this.isRtl,
|
|
751
752
|
rowIndex: this.getAriaRowCount + 1,
|
|
752
753
|
columns: this._columns.map(function(s) {
|
|
753
754
|
return {
|
|
754
755
|
...s,
|
|
755
|
-
footerCell:
|
|
756
|
+
footerCell: y.call(this, s.footerCell, R.call(this))
|
|
756
757
|
};
|
|
757
758
|
}, this)
|
|
758
759
|
}, null),
|
|
759
|
-
cols:
|
|
760
|
+
cols: S.map(function(s, d) {
|
|
760
761
|
return o("col", {
|
|
761
762
|
key: d.toString(),
|
|
762
763
|
width: s.width !== void 0 ? Math.floor(parseFloat(s.width.toString())) + "px" : void 0
|
|
763
764
|
}, null);
|
|
764
765
|
}, this)
|
|
765
|
-
}, null) : o("span", null, null),
|
|
766
|
-
colSpans:
|
|
766
|
+
}, null) : o("span", null, null), P = y.call(this, this.$props.cellRender, R.call(this)), ve = this.showLicenseWatermark ? o(Oe, null, null) : null, N = this.$attrs.style, Ie = N && M(N) && N["width"] || "", we = parseFloat(Ie.toString()), ye = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, {
|
|
767
|
+
colSpans: V,
|
|
767
768
|
hiddenColumns: Re
|
|
768
|
-
} =
|
|
769
|
+
} = Me({
|
|
769
770
|
enabled: this.$props.columnVirtualization,
|
|
770
771
|
columns: this._columns,
|
|
771
|
-
tableViewPortWidth:
|
|
772
|
-
scrollLeft:
|
|
773
|
-
}),
|
|
774
|
-
let
|
|
775
|
-
const
|
|
772
|
+
tableViewPortWidth: we,
|
|
773
|
+
scrollLeft: ye
|
|
774
|
+
}), He = function(s, d, v) {
|
|
775
|
+
let F = !1;
|
|
776
|
+
const H = this.$props.selectedField, f = H ? pe(H, s.dataItem) : void 0, u = this.$props.highlight && this.$props.dataItemKey && q(this.$props.dataItemKey)(s.dataItem) !== void 0 ? this.$props.highlight[q(this.$props.dataItemKey)(s.dataItem)] : void 0;
|
|
776
777
|
return {
|
|
777
|
-
row: this._columns.map(function(a,
|
|
778
|
-
if (Re[
|
|
778
|
+
row: this._columns.map(function(a, h) {
|
|
779
|
+
if (Re[h])
|
|
779
780
|
return null;
|
|
780
|
-
const
|
|
781
|
+
const z = `${a.className ? a.className + " " : ""}${a.locked ? "k-grid-content-sticky" : ""}`, G = a.left !== void 0 ? this.isRtl ? {
|
|
781
782
|
left: a.right + "px",
|
|
782
783
|
right: a.left + "px"
|
|
783
784
|
} : {
|
|
784
785
|
left: a.left + "px",
|
|
785
786
|
right: a.right + "px"
|
|
786
787
|
} : {};
|
|
787
|
-
let
|
|
788
|
+
let w = !1;
|
|
788
789
|
if (a.editable && this.$props.editField) {
|
|
789
|
-
const c =
|
|
790
|
-
(c === !0 || c === a.field) && (
|
|
790
|
+
const c = pe(this.$props.editField, s.dataItem);
|
|
791
|
+
(c === !0 || c === a.field) && (F = !0, w = !0);
|
|
791
792
|
}
|
|
792
|
-
let
|
|
793
|
-
a.cell && (
|
|
794
|
-
const
|
|
793
|
+
let m;
|
|
794
|
+
a.cell && (m = y.call(this, a.cell, R.call(this)));
|
|
795
|
+
const L = this.computedCollapsed && this.computedCollapsed[s.level] && this.computedCollapsed[s.level].some((c) => c === me(s.dataItem, this.$props.uniqueField)), K = L ? !L : s.expanded;
|
|
795
796
|
return a.internalCell ? o(a.internalCell, {
|
|
796
|
-
key:
|
|
797
|
-
id:
|
|
798
|
-
colSpan:
|
|
797
|
+
key: h,
|
|
798
|
+
id: I.generateNavigatableId(`${d}-${String(h)}`, i),
|
|
799
|
+
colSpan: V[h],
|
|
799
800
|
dataItem: s.dataItem,
|
|
800
801
|
field: a.field || "",
|
|
801
802
|
editor: a.editor,
|
|
802
803
|
format: a.format,
|
|
803
804
|
readFormat: a.readFormat,
|
|
804
805
|
type: a.type,
|
|
805
|
-
className:
|
|
806
|
-
render:
|
|
806
|
+
className: z,
|
|
807
|
+
render: m || P,
|
|
807
808
|
onChange: this.itemChange,
|
|
808
809
|
onSelectionchange: (c) => this.selectionChangeHandler({
|
|
809
810
|
event: c,
|
|
810
811
|
dataItem: s.dataItem,
|
|
811
|
-
dataIndex:
|
|
812
|
-
columnIndex:
|
|
812
|
+
dataIndex: v,
|
|
813
|
+
columnIndex: h
|
|
813
814
|
}),
|
|
814
|
-
columnIndex:
|
|
815
|
+
columnIndex: h,
|
|
815
816
|
columnsCount: this._columns.filter((c) => !c.children.length).length,
|
|
816
817
|
rowType: s.rowType,
|
|
817
818
|
level: s.level,
|
|
818
819
|
expanded: K,
|
|
819
820
|
dataIndex: s.dataIndex,
|
|
820
|
-
style:
|
|
821
|
+
style: G,
|
|
821
822
|
ariaColumnIndex: a.ariaColumnIndex,
|
|
822
823
|
isRtl: this.isRtl,
|
|
823
|
-
isSelected: Array.isArray(
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
824
|
+
isSelected: Array.isArray(f) && f.indexOf(h) > -1,
|
|
825
|
+
isHighlighted: !!(typeof u != "boolean" && u && a.field && u[a.field] === !0)
|
|
826
|
+
}, null) : w ? o(Ke, {
|
|
827
|
+
id: I.generateNavigatableId(`${d}-${String(h)}`, i),
|
|
828
|
+
key: h,
|
|
829
|
+
colSpan: V[h],
|
|
828
830
|
dataItem: s.dataItem,
|
|
829
831
|
field: a.field || "",
|
|
830
832
|
editor: a.editor,
|
|
831
833
|
format: a.format,
|
|
832
834
|
readFormat: a.readFormat,
|
|
833
835
|
type: a.type,
|
|
834
|
-
className:
|
|
835
|
-
render:
|
|
836
|
+
className: z,
|
|
837
|
+
render: m || P,
|
|
836
838
|
onEdit: this.editHandler,
|
|
837
839
|
onRemove: this.removeHandler,
|
|
838
840
|
onSave: this.saveHandler,
|
|
839
841
|
onCancel: this.cancelHandler,
|
|
840
842
|
onChange: this.itemChange,
|
|
841
|
-
columnIndex:
|
|
843
|
+
columnIndex: h,
|
|
842
844
|
columnsCount: this._columns.filter((c) => !c.children.length).length,
|
|
843
845
|
rowType: s.rowType,
|
|
844
846
|
level: s.level,
|
|
845
847
|
expanded: K,
|
|
846
848
|
dataIndex: s.dataIndex,
|
|
847
|
-
style:
|
|
848
|
-
}, null) : o(
|
|
849
|
-
key:
|
|
850
|
-
id:
|
|
851
|
-
colSpan:
|
|
849
|
+
style: G
|
|
850
|
+
}, null) : o(pt, {
|
|
851
|
+
key: h,
|
|
852
|
+
id: I.generateNavigatableId(`${d}-${String(h)}`, i),
|
|
853
|
+
colSpan: V[h],
|
|
852
854
|
dataItem: s.dataItem,
|
|
853
855
|
field: a.field || "",
|
|
854
856
|
editor: a.editor,
|
|
855
857
|
format: a.format,
|
|
856
858
|
readFormat: a.readFormat,
|
|
857
859
|
type: a.type,
|
|
858
|
-
className:
|
|
859
|
-
render:
|
|
860
|
+
className: z,
|
|
861
|
+
render: m || P,
|
|
860
862
|
onCellclick: this.cellClickHandler,
|
|
861
863
|
onCellkeydown: this.cellKeydownHandler,
|
|
862
864
|
onEdit: this.editHandler,
|
|
@@ -867,97 +869,101 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
867
869
|
onSelectionchange: (c) => this.selectionChangeHandler({
|
|
868
870
|
event: c,
|
|
869
871
|
dataItem: s.dataItem,
|
|
870
|
-
dataIndex:
|
|
871
|
-
columnIndex:
|
|
872
|
+
dataIndex: v,
|
|
873
|
+
columnIndex: h
|
|
872
874
|
}),
|
|
873
|
-
columnIndex:
|
|
875
|
+
columnIndex: h,
|
|
874
876
|
columnsCount: this._columns.filter((c) => !c.children.length).length,
|
|
875
877
|
rowType: s.rowType,
|
|
876
878
|
level: s.level,
|
|
877
879
|
expanded: K,
|
|
878
880
|
dataIndex: s.dataIndex,
|
|
879
|
-
style:
|
|
881
|
+
style: G,
|
|
882
|
+
isSelected: Array.isArray(f) && f.indexOf(h) > -1,
|
|
883
|
+
isHighlighted: !!(typeof u != "boolean" && u && a.field && u[a.field] === !0)
|
|
880
884
|
}, null);
|
|
881
885
|
}, this),
|
|
882
|
-
isInEdit:
|
|
883
|
-
isSelected: typeof
|
|
886
|
+
isInEdit: F,
|
|
887
|
+
isSelected: typeof f == "boolean" && f,
|
|
888
|
+
isHighlighted: typeof u == "boolean" && u
|
|
884
889
|
};
|
|
885
890
|
};
|
|
886
|
-
let
|
|
891
|
+
let Z = 0;
|
|
887
892
|
if (this.$props.scrollable === "virtual" && this.totalGroupedRows(this.currentData) / 2 > this.$props.take) {
|
|
888
893
|
const s = this.vs.topCacheCount + this.vs.attendedSkip - (this.$props.skip || 0);
|
|
889
894
|
for (let d = 0; d < s; ) {
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
892
|
-
this.currentData.push(
|
|
895
|
+
const v = this.currentData.shift();
|
|
896
|
+
if (v)
|
|
897
|
+
this.currentData.push(v), Z++, v.rowType === "groupHeader" && d--;
|
|
893
898
|
else
|
|
894
899
|
break;
|
|
895
900
|
d++;
|
|
896
901
|
}
|
|
897
902
|
}
|
|
898
|
-
const
|
|
903
|
+
const ee = (s) => s >= this.currentData.length - Z, ke = y.call(this, this.$props.detail, R.call(this));
|
|
899
904
|
let B = this.vs.propsSkip || 0;
|
|
900
|
-
const
|
|
901
|
-
let
|
|
902
|
-
const
|
|
905
|
+
const T = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
|
|
906
|
+
let O, W = -1, j = 0;
|
|
907
|
+
const te = this.currentData.length && this.currentData.map(function(s, d) {
|
|
903
908
|
s.rowType === "data" && (B++, W++), this.$props.alternatePerGroup && s.rowType === "groupHeader" && (B = 0);
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
const
|
|
907
|
-
let
|
|
908
|
-
this.$props.detail && s.rowType === "data" && s.expanded && (
|
|
909
|
-
const
|
|
910
|
-
return [o(
|
|
911
|
-
key:
|
|
909
|
+
const v = B % 2 === 0, F = this.$props.dataItemKey && q(this.$props.dataItemKey)(s.dataItem), H = d + (this.vs.propsSkip || 0), f = F || "ai" + H, u = f + "_1";
|
|
910
|
+
O = H + T + j;
|
|
911
|
+
const a = y.call(this, this.$props.rowRender, R.call(this));
|
|
912
|
+
let h;
|
|
913
|
+
this.$props.detail && s.rowType === "data" && s.expanded && (h = S.length - (this.$props.expandField ? 1 : 0) - (this.$props.group ? this.$props.group.length : 0) || 1, j++, O = H + T + j);
|
|
914
|
+
const z = d * 2 + T, G = d * 2 + T + 1, w = He.call(this, s, f, W);
|
|
915
|
+
return [o(ct, {
|
|
916
|
+
key: f,
|
|
912
917
|
dataItem: s.dataItem,
|
|
913
|
-
isAltRow:
|
|
914
|
-
isInEdit:
|
|
915
|
-
isSelected:
|
|
918
|
+
isAltRow: v,
|
|
919
|
+
isInEdit: w.isInEdit,
|
|
920
|
+
isSelected: w.isSelected,
|
|
921
|
+
isHighlighted: w.isHighlighted,
|
|
916
922
|
rowType: s.rowType,
|
|
917
|
-
isHidden:
|
|
918
|
-
onRowclick: (
|
|
919
|
-
onRowdblclick: (
|
|
923
|
+
isHidden: ee(d),
|
|
924
|
+
onRowclick: (m) => this.rowClick(m, s),
|
|
925
|
+
onRowdblclick: (m) => this.rowDoubleClick(m, s),
|
|
920
926
|
selectedField: this.$props.selectedField,
|
|
921
927
|
rowHeight: this.$props.rowHeight,
|
|
922
|
-
render:
|
|
923
|
-
ariaRowIndex: this.$props.detail ?
|
|
928
|
+
render: a,
|
|
929
|
+
ariaRowIndex: this.$props.detail ? z : O,
|
|
924
930
|
dataIndex: W,
|
|
925
931
|
class: this.$props.rowClass ? this.$props.rowClass(s) : ""
|
|
926
932
|
}, {
|
|
927
|
-
default: () => [
|
|
933
|
+
default: () => [w.row]
|
|
928
934
|
}), this.$props.detail && s.rowType === "data" && s.expanded && o("tr", {
|
|
929
|
-
key:
|
|
930
|
-
class:
|
|
935
|
+
key: u,
|
|
936
|
+
class: v ? "k-table-row k-table-alt-row k-detail-row k-alt" : "k-table-row k-detail-row",
|
|
931
937
|
style: {
|
|
932
|
-
visibility:
|
|
938
|
+
visibility: ee(d) ? "hidden" : "",
|
|
933
939
|
height: this.$props.detailRowHeight + "px"
|
|
934
940
|
},
|
|
935
941
|
role: "row",
|
|
936
|
-
"aria-rowindex": this.$props.detail ?
|
|
937
|
-
}, [this.$props.group && this.$props.group.map(function(
|
|
938
|
-
return o(
|
|
942
|
+
"aria-rowindex": this.$props.detail ? G : O
|
|
943
|
+
}, [this.$props.group && this.$props.group.map(function(m, L) {
|
|
944
|
+
return o($e, {
|
|
939
945
|
id: "",
|
|
940
946
|
dataIndex: s.dataIndex,
|
|
941
|
-
field:
|
|
947
|
+
field: m.field,
|
|
942
948
|
dataItem: s.dataItem,
|
|
943
|
-
key:
|
|
949
|
+
key: L
|
|
944
950
|
}, null);
|
|
945
|
-
}, this), this.$props.expandField && o(
|
|
946
|
-
id:
|
|
947
|
-
}, null), o(
|
|
951
|
+
}, this), this.$props.expandField && o(We, {
|
|
952
|
+
id: I.generateNavigatableId(`${u}-dhcell`, i)
|
|
953
|
+
}, null), o(je, {
|
|
948
954
|
dataItem: s.dataItem,
|
|
949
955
|
dataIndex: s.dataIndex,
|
|
950
|
-
colSpan:
|
|
956
|
+
colSpan: h,
|
|
951
957
|
ariaColIndex: 2 + (this.$props.group ? this.$props.group.length : 0),
|
|
952
958
|
detail: this.$props.detail ? ke : void 0,
|
|
953
|
-
id:
|
|
959
|
+
id: I.generateNavigatableId(`${u}-dcell`, i)
|
|
954
960
|
}, null)])];
|
|
955
961
|
}, this) || o("tr", {
|
|
956
962
|
class: "k-table-row k-grid-norecords"
|
|
957
963
|
}, [o("td", {
|
|
958
964
|
class: "k-table-td",
|
|
959
965
|
colspan: this._columns.filter((s) => !s.children.length).length
|
|
960
|
-
}, [
|
|
966
|
+
}, [k.length ? k : o(gt, null, null)])]), Se = y.call(this, this.$props.pager, R.call(this)), xe = this.$props.pageable && o(Ae, {
|
|
961
967
|
class: "k-grid-pager",
|
|
962
968
|
onPagesizechange: this.pageChangeHandler,
|
|
963
969
|
onPagechange: this.pageChangeHandler,
|
|
@@ -966,11 +972,11 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
966
972
|
skip: this.vs.propsSkip || 0,
|
|
967
973
|
pageSize: (this.$props.take !== void 0 ? this.$props.take : this.$props.pageSize) || 10,
|
|
968
974
|
messagesMap: Ce,
|
|
969
|
-
settings:
|
|
970
|
-
}, null),
|
|
971
|
-
h:
|
|
972
|
-
template:
|
|
973
|
-
defaultRendering:
|
|
975
|
+
settings: Pe(this.$props.pageable || {})
|
|
976
|
+
}, null), se = ae.call(this, {
|
|
977
|
+
h: le,
|
|
978
|
+
template: Se,
|
|
979
|
+
defaultRendering: xe,
|
|
974
980
|
additionalProps: {
|
|
975
981
|
...this.$props,
|
|
976
982
|
skip: this.vs.propsSkip || 0,
|
|
@@ -980,44 +986,44 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
980
986
|
pagesizechange: this.pageChangeHandler,
|
|
981
987
|
pagechange: this.pageChangeHandler
|
|
982
988
|
}
|
|
983
|
-
}),
|
|
984
|
-
ref:
|
|
985
|
-
}, [
|
|
989
|
+
}), _e = (s) => this.$props.sort && this.$props.sort.filter((d) => d.field === s).length > 0, ie = o("colgroup", {
|
|
990
|
+
ref: A(this, "colGroup")
|
|
991
|
+
}, [S.map(function(s, d) {
|
|
986
992
|
return o("col", {
|
|
987
993
|
key: d.toString(),
|
|
988
|
-
class:
|
|
994
|
+
class: _e(s.field) ? "k-sorted" : void 0,
|
|
989
995
|
width: s.width !== void 0 ? s.width.toString().indexOf("%") !== -1 ? s.width : Math.floor(parseFloat(s.width.toString())) + "px" : void 0
|
|
990
996
|
}, null);
|
|
991
|
-
}, this)]),
|
|
997
|
+
}, this)]), re = {
|
|
992
998
|
height: this.getCorrectHeight
|
|
993
|
-
},
|
|
999
|
+
}, Fe = y.call(this, this.$props.loader, R.call(this)), ze = this.$props.loader && o("div", {
|
|
994
1000
|
class: "k-loader-container k-loader-container-md k-loader-top"
|
|
995
1001
|
}, [o("div", {
|
|
996
1002
|
class: "k-loader-container-overlay k-overlay-light"
|
|
997
1003
|
}, null), o("div", {
|
|
998
1004
|
class: "k-loader-container-inner"
|
|
999
|
-
}, [o(
|
|
1005
|
+
}, [o(Ne, {
|
|
1000
1006
|
size: "large",
|
|
1001
1007
|
type: "infinite-spinner"
|
|
1002
|
-
}, null)])]),
|
|
1003
|
-
h:
|
|
1004
|
-
template:
|
|
1005
|
-
defaultRendering:
|
|
1008
|
+
}, null)])]), oe = ae.call(this, {
|
|
1009
|
+
h: le,
|
|
1010
|
+
template: Fe,
|
|
1011
|
+
defaultRendering: ze
|
|
1006
1012
|
});
|
|
1007
|
-
return this.$props.scrollable === "none" ? o(
|
|
1013
|
+
return this.$props.scrollable === "none" ? o(ce, {
|
|
1008
1014
|
ref: "navRef",
|
|
1009
1015
|
id: this._gridId,
|
|
1010
1016
|
navigatable: this.$props.navigatable
|
|
1011
1017
|
}, {
|
|
1012
|
-
default: () => [o(
|
|
1018
|
+
default: () => [o(ue, {
|
|
1013
1019
|
ref: (s) => {
|
|
1014
1020
|
this.gridNavRef = s;
|
|
1015
1021
|
},
|
|
1016
1022
|
currentData: this.currentData,
|
|
1017
|
-
style:
|
|
1023
|
+
style: re,
|
|
1018
1024
|
class: this.nonscrollableWrapperClass
|
|
1019
1025
|
}, {
|
|
1020
|
-
default: () => [
|
|
1026
|
+
default: () => [C, x, o("div", {
|
|
1021
1027
|
role: "grid",
|
|
1022
1028
|
class: "k-grid-aria-root",
|
|
1023
1029
|
id: this._gridRoleElementId,
|
|
@@ -1029,36 +1035,36 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
1029
1035
|
tableLayout: "fixed"
|
|
1030
1036
|
},
|
|
1031
1037
|
role: "none"
|
|
1032
|
-
}, [
|
|
1038
|
+
}, [ie, X, o("tbody", {
|
|
1033
1039
|
class: "k-table-tbody",
|
|
1034
1040
|
"data-keyboardnavbody": !0
|
|
1035
|
-
}, [
|
|
1041
|
+
}, [te, oe]), Y])]), se, Q]
|
|
1036
1042
|
})]
|
|
1037
|
-
}) : o(
|
|
1043
|
+
}) : o(ce, {
|
|
1038
1044
|
ref: "navRef",
|
|
1039
1045
|
id: this._gridId,
|
|
1040
1046
|
navigatable: this.$props.navigatable
|
|
1041
1047
|
}, {
|
|
1042
|
-
default: () => [o(
|
|
1048
|
+
default: () => [o(ue, {
|
|
1043
1049
|
ref: (s) => {
|
|
1044
1050
|
this.gridNavRef = s;
|
|
1045
1051
|
},
|
|
1046
1052
|
currentData: this.currentData,
|
|
1047
|
-
style:
|
|
1053
|
+
style: re,
|
|
1048
1054
|
class: this.scrollableWrapperClass
|
|
1049
1055
|
}, {
|
|
1050
|
-
default: () => [
|
|
1056
|
+
default: () => [C, x, o("div", {
|
|
1051
1057
|
role: "grid",
|
|
1052
1058
|
class: "k-grid-aria-root",
|
|
1053
1059
|
id: this._gridRoleElementId,
|
|
1054
1060
|
"aria-colcount": this.getAriaColCount,
|
|
1055
1061
|
"aria-rowcount": this.getAriaRowCount
|
|
1056
|
-
}, [
|
|
1062
|
+
}, [X, o("div", {
|
|
1057
1063
|
class: "k-grid-container",
|
|
1058
1064
|
role: "presentation"
|
|
1059
1065
|
}, [o("div", {
|
|
1060
1066
|
role: "presentation",
|
|
1061
|
-
ref:
|
|
1067
|
+
ref: A(this, "scrollContainer"),
|
|
1062
1068
|
class: "k-grid-content k-virtual-content",
|
|
1063
1069
|
onScroll: this.scrollHandler
|
|
1064
1070
|
}, [o("div", {
|
|
@@ -1067,24 +1073,24 @@ const Ut = /* @__PURE__ */ Fe({
|
|
|
1067
1073
|
}, [o("table", {
|
|
1068
1074
|
role: "none",
|
|
1069
1075
|
class: this.gridTableClass,
|
|
1070
|
-
ref:
|
|
1071
|
-
}, [
|
|
1076
|
+
ref: A(this, "scrollTable")
|
|
1077
|
+
}, [ie, o("tbody", {
|
|
1072
1078
|
class: "k-table-tbody",
|
|
1073
1079
|
role: "rowgroup",
|
|
1074
1080
|
"data-keyboardnavbody": !0,
|
|
1075
|
-
ref:
|
|
1076
|
-
}, [
|
|
1081
|
+
ref: A(this, "scrollTableBody")
|
|
1082
|
+
}, [te])])]), o("div", {
|
|
1077
1083
|
class: "k-height-container",
|
|
1078
1084
|
role: "presentation"
|
|
1079
1085
|
}, [o("div", {
|
|
1080
1086
|
style: this.$props.scrollable === "virtual" ? {
|
|
1081
1087
|
height: this.vs.containerHeight + "px"
|
|
1082
1088
|
} : {}
|
|
1083
|
-
}, null)])]),
|
|
1089
|
+
}, null)])]), oe]), Y, ve]), se, Q]
|
|
1084
1090
|
})]
|
|
1085
1091
|
});
|
|
1086
1092
|
}
|
|
1087
1093
|
});
|
|
1088
1094
|
export {
|
|
1089
|
-
|
|
1095
|
+
qt as Grid
|
|
1090
1096
|
};
|