@progress/kendo-vue-grid 8.3.0 → 8.4.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/BaseCSVExport.d.ts +98 -0
- package/BaseCSVExport.js +8 -0
- package/BaseCSVExport.mjs +121 -0
- package/Grid.d.ts +17 -14
- package/Grid.js +1 -1
- package/Grid.mjs +195 -177
- package/GridCsvExportButton.d.ts +98 -0
- package/GridCsvExportButton.js +8 -0
- package/GridCsvExportButton.mjs +71 -0
- package/GridState.d.ts +6 -14
- package/RootGrid.d.ts +6 -14
- package/common.d.ts +3 -7
- package/common.js +1 -1
- package/common.mjs +3 -1
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/index.mjs +27 -24
- package/interfaces/GridProps.d.ts +83 -7
- package/messages/main.d.ts +5 -0
- package/messages/main.js +2 -2
- package/messages/main.mjs +111 -109
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +15 -13
- package/utils/dataProcessing.d.ts +68 -0
- package/utils/dataProcessing.js +8 -0
- package/utils/dataProcessing.mjs +49 -0
package/Grid.mjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as bt, createVNode as d, h as Le, Fragment as Ke, createTextVNode as St, ref as R, inject as
|
|
9
|
-
import { isObject as
|
|
10
|
-
import { tableKeyboardNavigationTools as
|
|
8
|
+
import { defineComponent as bt, createVNode as d, h as Le, Fragment as Ke, createTextVNode as St, ref as R, inject as xt, computed as _e, markRaw as k } from "vue";
|
|
9
|
+
import { isObject as Y, cloneArray as It, canUseDOM as B, WatermarkOverlay as vt, getter as E, getTemplate as Ae, setRef as w, hasListener as K, getComponentElementRef as Be, getRef as x, RowHeightService as $t, setScrollbarWidth as wt, kendoThemeMaps as Ve, uGrid as yt, isRtl as Oe, validatePackage as kt, shouldShowValidationUI as Ht, getLicenseMessage as Tt, guid as Ne } from "@progress/kendo-vue-common";
|
|
10
|
+
import { tableKeyboardNavigationTools as M, combineFilters as Et, Pager as Mt, normalize as Pt, TableKeyboardNavigationProvider as We, HeaderCell as zt, updateLeft as Dt, updateRight as Gt, groupExpandReducer as Ft, detailExpandReducer as Lt, getSelectedState as Ue, getSelectedStateFromKeyDown as Kt, closestTagName as je, getColumnIndex as _t, getRowIndex as At, ClipboardActionType as he, populateClipboardData as Bt, getDetailExpandableOptions as Vt, getSelectionOptions as Ot, getGroupExpandableOptions as Nt, ClipboardService as qe } from "@progress/kendo-vue-data-tools";
|
|
11
11
|
import { Loader as Wt } from "@progress/kendo-vue-indicators";
|
|
12
12
|
import { GridNav as Je } from "./GridNav.mjs";
|
|
13
13
|
import { GridSelectionCell as Xe } from "./cells/GridSelectionCell.mjs";
|
|
@@ -41,13 +41,14 @@ import { process as Cs, orderBy as rt } from "@progress/kendo-data-query";
|
|
|
41
41
|
import { KendoKey as bs } from "./key.mjs";
|
|
42
42
|
import { getVirtualCellsToRender as Ss } from "./utils/virtualColumns.mjs";
|
|
43
43
|
import { StickyGroupTable as at } from "./components/StickyGroupTable.mjs";
|
|
44
|
-
import { getRowContents as
|
|
45
|
-
import { useStickyGroups as
|
|
44
|
+
import { getRowContents as xs } from "./getRowContents.mjs";
|
|
45
|
+
import { useStickyGroups as Is } from "./hooks/useStickyGroups.mjs";
|
|
46
46
|
import { PinnedRowsTable as lt } from "./components/PinnedRowsTable.mjs";
|
|
47
|
-
import { GridPinCell as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
|
|
47
|
+
import { GridPinCell as vs } from "./cells/pincell/GridPinCell.mjs";
|
|
48
|
+
import { BaseCSVExport as $s } from "./BaseCSVExport.mjs";
|
|
49
|
+
import { contextMenuItemsMap as ws, GridContextMenu as ys, getDefaultBodyContextMenuItems as ks, getDefaultHeadContextMenuItems as Hs } from "./contextMenu/GridContextMenu.mjs";
|
|
50
|
+
import { GridContextMenuItemNames as Q, GridContextMenuAnchorPart as dt } from "./contextMenu/enums.mjs";
|
|
51
|
+
const bi = /* @__PURE__ */ bt({
|
|
51
52
|
name: "KendoGrid",
|
|
52
53
|
inheritAttrs: !1,
|
|
53
54
|
props: {
|
|
@@ -193,7 +194,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
193
194
|
currentGroupable() {
|
|
194
195
|
var t;
|
|
195
196
|
const e = (t = this.gridStateContext.group) == null ? void 0 : t.value;
|
|
196
|
-
return this.$props.groupable === !0 && (e == null ? void 0 : e.length) ||
|
|
197
|
+
return this.$props.groupable === !0 && (e == null ? void 0 : e.length) || Y(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
197
198
|
},
|
|
198
199
|
computedCollapsed() {
|
|
199
200
|
let e = [];
|
|
@@ -251,14 +252,14 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
251
252
|
headMenuItems() {
|
|
252
253
|
var t;
|
|
253
254
|
const e = this.$props.sortable && ((t = this.contextMenuColumn) == null ? void 0 : t.sortable);
|
|
254
|
-
return
|
|
255
|
+
return Hs({
|
|
255
256
|
sortable: !!e,
|
|
256
257
|
selectable: this.computedSelectable.enabled
|
|
257
258
|
});
|
|
258
259
|
},
|
|
259
260
|
bodyMenuItems() {
|
|
260
261
|
var e;
|
|
261
|
-
return this.$props.sortable && ((e = this.contextMenuColumn) == null || e.sortable),
|
|
262
|
+
return this.$props.sortable && ((e = this.contextMenuColumn) == null || e.sortable), ks({
|
|
262
263
|
selectable: this.computedSelectable.enabled,
|
|
263
264
|
pinnable: !!this.$props.pinnable,
|
|
264
265
|
clipboard: !!this.$props.clipboard
|
|
@@ -335,7 +336,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
335
336
|
selectedState: (p = (u = this.$props.select) != null ? u : (h = this.gridStateContext.select) == null ? void 0 : h.value) != null ? p : {},
|
|
336
337
|
previousCopiedItems: this.previousCopiedItems
|
|
337
338
|
});
|
|
338
|
-
e !== he.paste && (this.previousCopiedItems = a.copiedItems),
|
|
339
|
+
e !== he.paste && (this.previousCopiedItems = a.copiedItems), K.call(this, "clipboard") && this.$emit("clipboard", {
|
|
339
340
|
...n,
|
|
340
341
|
...a
|
|
341
342
|
});
|
|
@@ -349,7 +350,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
349
350
|
},
|
|
350
351
|
renderContextMenu() {
|
|
351
352
|
var e;
|
|
352
|
-
return d(
|
|
353
|
+
return d(ys, {
|
|
353
354
|
show: !!(this.contextMenuState.show && ((e = this.contextMenuItems) != null && e.length)),
|
|
354
355
|
dataItem: this.contextMenuState.dataItem,
|
|
355
356
|
field: this.contextMenuState.field,
|
|
@@ -363,10 +364,10 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
363
364
|
var h, u;
|
|
364
365
|
const t = this.$props.dataItemKey || "", s = this.contextMenuState.dataItem, i = ((h = this.gridStateContext.pinnedTopRows) == null ? void 0 : h.value) || [], o = ((u = this.gridStateContext.pinnedBottomRows) == null ? void 0 : u.value) || [], n = t ? s[t] : void 0, r = n !== void 0 && i.some((p) => p[t] === n), a = n !== void 0 && o.some((p) => p[t] === n);
|
|
365
366
|
return e.map((p) => {
|
|
366
|
-
const c = typeof p == "string" ?
|
|
367
|
-
return (c == null ? void 0 : c.name) ===
|
|
367
|
+
const c = typeof p == "string" ? ws[p] : p;
|
|
368
|
+
return (c == null ? void 0 : c.name) === Q.pinRow && c.items ? {
|
|
368
369
|
...c,
|
|
369
|
-
items: c.items.filter((f) => f.name ===
|
|
370
|
+
items: c.items.filter((f) => f.name === Q.pinTop ? !r : f.name === Q.pinBottom ? !a : f.name === Q.unpin ? r || a : !0)
|
|
370
371
|
} : p;
|
|
371
372
|
});
|
|
372
373
|
},
|
|
@@ -381,14 +382,14 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
381
382
|
switch (this.$emit("contextmenuitemclick", s), (i = t.data) == null ? void 0 : i.action) {
|
|
382
383
|
case "SortCommand":
|
|
383
384
|
if (this.contextMenuColumn) {
|
|
384
|
-
const c = (o = t.name) == null ? void 0 : o.toLowerCase().includes("asc"), m = ((n = t.name) == null ? void 0 : n.toLowerCase().includes("desc")) ? "desc" : void 0,
|
|
385
|
-
var
|
|
386
|
-
return
|
|
385
|
+
const c = (o = t.name) == null ? void 0 : o.toLowerCase().includes("asc"), m = ((n = t.name) == null ? void 0 : n.toLowerCase().includes("desc")) ? "desc" : void 0, I = c ? "asc" : m, C = t.name ? I : void 0, v = (((r = this.gridStateContext.sort) == null ? void 0 : r.value) || []).filter((H) => {
|
|
386
|
+
var b;
|
|
387
|
+
return H.field !== ((b = this.contextMenuColumn) == null ? void 0 : b.field);
|
|
387
388
|
});
|
|
388
|
-
C && ((a = this.contextMenuColumn) != null && a.field) &&
|
|
389
|
+
C && ((a = this.contextMenuColumn) != null && a.field) && v.push({
|
|
389
390
|
field: this.contextMenuColumn.field,
|
|
390
391
|
dir: C
|
|
391
|
-
}), this.sortChangeHandler(
|
|
392
|
+
}), this.sortChangeHandler(v, {
|
|
392
393
|
event: e.event
|
|
393
394
|
});
|
|
394
395
|
}
|
|
@@ -396,16 +397,16 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
396
397
|
case "SelectRowCommand": {
|
|
397
398
|
const c = e.dataItem;
|
|
398
399
|
if (this.computedSelectable.enabled && c && this.$props.dataItemKey) {
|
|
399
|
-
const m =
|
|
400
|
+
const m = E(this.$props.dataItemKey)(c), I = this.getLeafDataItems(), C = I.findIndex((P) => P[this.$props.dataItemKey] === c[this.$props.dataItemKey]), $ = 0, v = this.columnsRef.length - 1, H = {
|
|
400
401
|
...this.getArguments(e.event),
|
|
401
402
|
dataItem: c,
|
|
402
403
|
startDataItem: C,
|
|
403
404
|
endDataItem: C,
|
|
404
405
|
startRowIndex: C,
|
|
405
406
|
endRowIndex: C,
|
|
406
|
-
startColIndex:
|
|
407
|
-
endColIndex:
|
|
408
|
-
dataItems:
|
|
407
|
+
startColIndex: $,
|
|
408
|
+
endColIndex: v,
|
|
409
|
+
dataItems: I,
|
|
409
410
|
ctrlKey: !1,
|
|
410
411
|
altKey: !1,
|
|
411
412
|
metaKey: !1,
|
|
@@ -415,25 +416,25 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
415
416
|
cell: this.computedSelectable.cell,
|
|
416
417
|
componentId: this.$props.id || this._gridId,
|
|
417
418
|
selectedField: this.$props.selectedField || ""
|
|
418
|
-
},
|
|
419
|
+
}, b = this.computedSelectable.mode === "multiple" ? {
|
|
419
420
|
...(u = (h = this.gridStateContext.select) == null ? void 0 : h.value) != null ? u : {}
|
|
420
421
|
} : {};
|
|
421
|
-
|
|
422
|
+
b[m] === !0 || Array.isArray(b[m]) && b[m].length === this.columnsRef.length ? delete b[m] : b[m] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0, this.raiseSelectionEvent(H, b);
|
|
422
423
|
}
|
|
423
424
|
break;
|
|
424
425
|
}
|
|
425
426
|
case "SelectAllRowsCommand": {
|
|
426
427
|
if (this.computedSelectable.enabled && this.$props.dataItemKey) {
|
|
427
|
-
const c = this.getLeafDataItems(), f = {}, m = c[0],
|
|
428
|
+
const c = this.getLeafDataItems(), f = {}, m = c[0], I = c[c.length - 1];
|
|
428
429
|
c.forEach((C) => {
|
|
429
|
-
const
|
|
430
|
-
f[
|
|
430
|
+
const $ = E(this.$props.dataItemKey)(C);
|
|
431
|
+
f[$] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0;
|
|
431
432
|
}), this.raiseSelectionEvent({
|
|
432
433
|
...this.getArguments(e.event),
|
|
433
434
|
dataItems: c,
|
|
434
435
|
dataItem: m,
|
|
435
436
|
startDataItem: m,
|
|
436
|
-
endDataItem:
|
|
437
|
+
endDataItem: I,
|
|
437
438
|
startRowIndex: 0,
|
|
438
439
|
endRowIndex: c.length - 1,
|
|
439
440
|
startColIndex: 0,
|
|
@@ -540,6 +541,12 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
540
541
|
let e = this.$props.total || 0;
|
|
541
542
|
return Array.isArray(this.$props.dataItems) ? e = e || this.$props.dataItems.length : this.$props.dataItems && (e = e || this.$props.dataItems.total), e;
|
|
542
543
|
},
|
|
544
|
+
exportAsCsv() {
|
|
545
|
+
this.csvExportRef && this.csvExportRef.save();
|
|
546
|
+
},
|
|
547
|
+
getCsvBlob() {
|
|
548
|
+
return this.csvExportRef ? this.csvExportRef.getBlob() : null;
|
|
549
|
+
},
|
|
543
550
|
readColumnElements() {
|
|
544
551
|
return ms(this.$props.columns, this.currentColumnsState, {
|
|
545
552
|
prevId: 0,
|
|
@@ -626,16 +633,16 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
626
633
|
setRefs() {
|
|
627
634
|
var n, r, a, h;
|
|
628
635
|
let e = "$el";
|
|
629
|
-
const t =
|
|
636
|
+
const t = x(this, "gridNav");
|
|
630
637
|
t && (this._element = t[e]);
|
|
631
|
-
const s =
|
|
638
|
+
const s = x(this, "groupPanelDiv");
|
|
632
639
|
if (s) {
|
|
633
640
|
let u = s[e] || null;
|
|
634
641
|
this.dragLogic.refGroupPanelDiv(u);
|
|
635
642
|
}
|
|
636
|
-
this.stickyHeaderRef =
|
|
637
|
-
const i =
|
|
638
|
-
this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(o), this.columnResize.colGroupMain =
|
|
643
|
+
this.stickyHeaderRef = x(this, "stickyHeader"), this.stickyFooterRef = x(this, "stickyFooter"), this.pinnedTopRef = x(this, "pinnedTop"), this.pinnedBottomRef = x(this, "pinnedBottom");
|
|
644
|
+
const i = x(this, "dropElementClue"), o = x(this, "dragElementClue");
|
|
645
|
+
this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(o), this.columnResize.colGroupMain = x(this, "colGroup"), this.columnResize.colGroupStickyHeader = (n = this.stickyHeaderRef) == null ? void 0 : n.colGroupRef, this.columnResize.colGroupStickyFooter = (r = this.stickyFooterRef) == null ? void 0 : r.colGroupRef, this.columnResize.colGroupPinnedTop = (a = this.pinnedTopRef) == null ? void 0 : a.colGroupRef, this.columnResize.colGroupPinnedBottom = (h = this.pinnedBottomRef) == null ? void 0 : h.colGroupRef, this._header = x(this, "header"), this._footer = x(this, "footer"), this.resetTableWidth(), wt();
|
|
639
646
|
},
|
|
640
647
|
gridUnmounted() {
|
|
641
648
|
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), this.clipboardServiceRef && (this.clipboardServiceRef.removeEventListeners(document), this.clipboardServiceRef = null);
|
|
@@ -657,15 +664,15 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
657
664
|
},
|
|
658
665
|
initializeVirtualization() {
|
|
659
666
|
const e = this.vsRef, t = this.$props.rowHeight || this._minRowHeightRef || 0;
|
|
660
|
-
this.tableBodyRef =
|
|
667
|
+
this.tableBodyRef = x(this, "tableBody"), this.scrollTableRef = Be(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 = x(this, "scrollContainer"), e.tableBody = this.tableBodyRef, e.scrollHeightContainer = x(this, "scrollHeightContainer"), e.table = this.scrollTableRef, (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new $t(this._virtualTotal, t)));
|
|
661
668
|
},
|
|
662
669
|
setContainerHeight() {
|
|
663
|
-
const e =
|
|
670
|
+
const e = x(this, "scrollContainer");
|
|
664
671
|
this._containerHeightRef = (e == null ? void 0 : e.offsetHeight) || 0;
|
|
665
672
|
},
|
|
666
673
|
setMinRowHeight() {
|
|
667
674
|
if (!this._minRowHeightRef && !this.$props.rowHeight) {
|
|
668
|
-
const t = us(
|
|
675
|
+
const t = us(x(this, "tableBody"));
|
|
669
676
|
t && (this._minRowHeightRef = t, this.$forceUpdate());
|
|
670
677
|
}
|
|
671
678
|
},
|
|
@@ -673,7 +680,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
673
680
|
this.setRefs();
|
|
674
681
|
},
|
|
675
682
|
onHeaderScroll(e) {
|
|
676
|
-
const s = e.target.scrollLeft, i =
|
|
683
|
+
const s = e.target.scrollLeft, i = x(this, "scrollContainer");
|
|
677
684
|
i && (i.scrollLeft = s), this.scrollLeftRef = s;
|
|
678
685
|
},
|
|
679
686
|
scrollHandler(e) {
|
|
@@ -723,9 +730,9 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
723
730
|
},
|
|
724
731
|
itemChange(e) {
|
|
725
732
|
var i;
|
|
726
|
-
const t =
|
|
733
|
+
const t = K.call(this, "itemchange"), s = (i = this.gridStateContext.group) == null ? void 0 : i.value;
|
|
727
734
|
if (e.field === this.$props.expandField || (s || this.$props.detail) && e.field === void 0) {
|
|
728
|
-
|
|
735
|
+
K.call(this, "expandchange") && e.dataItem && this.$emit("expandchange", {
|
|
729
736
|
...this.getArguments(e.event),
|
|
730
737
|
collapsedGroups: this.updateGroupCollapsed(e),
|
|
731
738
|
dataItem: e.dataItem,
|
|
@@ -851,7 +858,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
851
858
|
if (this.computedSelectable.enabled) {
|
|
852
859
|
const t = this.getLeafDataItems();
|
|
853
860
|
this.gridStateContext.headerselectionchange({
|
|
854
|
-
select: e.event.target.checked ? t.reduce((s, i) => (this.$props.dataItemKey &&
|
|
861
|
+
select: e.event.target.checked ? t.reduce((s, i) => (this.$props.dataItemKey && E(this.$props.dataItemKey)(i) !== void 0 && (s[E(this.$props.dataItemKey)(i)] = !0), s), {}) : {},
|
|
855
862
|
field: e.field,
|
|
856
863
|
event: e.event,
|
|
857
864
|
target: this,
|
|
@@ -966,12 +973,12 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
966
973
|
...this.getArguments(i),
|
|
967
974
|
...t
|
|
968
975
|
});
|
|
969
|
-
else if (
|
|
976
|
+
else if (K.call(this, e))
|
|
970
977
|
this.$emit(e, {
|
|
971
978
|
...this.getArguments(i),
|
|
972
979
|
...t
|
|
973
980
|
});
|
|
974
|
-
else if (
|
|
981
|
+
else if (K.call(this, "datastatechange")) {
|
|
975
982
|
const o = {
|
|
976
983
|
...this.getDataState(),
|
|
977
984
|
...s
|
|
@@ -1073,11 +1080,11 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1073
1080
|
},
|
|
1074
1081
|
configureColumns(e, t) {
|
|
1075
1082
|
e.filter((n) => n.columnType === "checkbox").forEach((n) => {
|
|
1076
|
-
n.width = n.width || "50px", n.defaultCell =
|
|
1083
|
+
n.width = n.width || "50px", n.defaultCell = k(Xe), n.defaultHeaderCell = k(st), n._type = "edit", n.columnMenu = !1;
|
|
1077
1084
|
}), this.$props.selectedField && this.columnsRef.filter((n) => n.field === this.$props.selectedField).forEach((n) => {
|
|
1078
|
-
n.width = n.width || "50px", n.defaultCell =
|
|
1085
|
+
n.width = n.width || "50px", n.defaultCell = k(Xe), n.defaultHeaderCell = k(st), n.columnMenu = !1;
|
|
1079
1086
|
}), this.$props.pinnable && e.filter((n) => n.columnType === "pin").forEach((n) => {
|
|
1080
|
-
n.width = n.width || "48px", n.defaultCell =
|
|
1087
|
+
n.width = n.width || "48px", n.defaultCell = k(vs), n.defaultHeaderCell = k(zt), n.sortable = !1, n.filterable = !1, n.editable = !1;
|
|
1081
1088
|
});
|
|
1082
1089
|
const s = Ze(this.currentColumnsState);
|
|
1083
1090
|
this.initColumnsState(e, s);
|
|
@@ -1106,27 +1113,27 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1106
1113
|
const n = {
|
|
1107
1114
|
...i,
|
|
1108
1115
|
_type: "expand",
|
|
1109
|
-
id:
|
|
1110
|
-
defaultCell:
|
|
1116
|
+
id: M.generateNavigatableId(`${o++}`, "expand", "column"),
|
|
1117
|
+
defaultCell: k(Ye),
|
|
1111
1118
|
field: this.detailExpandable.column,
|
|
1112
1119
|
headerClassName: this.hierarchClass
|
|
1113
1120
|
};
|
|
1114
1121
|
e.unshift(n), this.currentColumnsState.unshift(s.find((r) => r.id === n.id) || n);
|
|
1115
1122
|
}
|
|
1116
|
-
this.$props.expandField &&
|
|
1123
|
+
this.$props.expandField && K.call(this, "expandchange") && this.$props.detail && (e.unshift({
|
|
1117
1124
|
...i,
|
|
1118
|
-
defaultCell:
|
|
1125
|
+
defaultCell: k(Ye),
|
|
1119
1126
|
field: this.$props.expandField,
|
|
1120
1127
|
headerClassName: "k-hierarchy-cell k-header",
|
|
1121
|
-
id:
|
|
1128
|
+
id: M.generateNavigatableId(`${e.length}`, this.idPrefix, "column"),
|
|
1122
1129
|
...this.expandColumn
|
|
1123
1130
|
}), o++);
|
|
1124
1131
|
for (let n = 0; n < t; n++) {
|
|
1125
1132
|
const r = {
|
|
1126
1133
|
...i,
|
|
1127
1134
|
isAccessible: !1,
|
|
1128
|
-
defaultCell:
|
|
1129
|
-
id:
|
|
1135
|
+
defaultCell: k(tt),
|
|
1136
|
+
id: M.generateNavigatableId(`${o++}`, "group", "column"),
|
|
1130
1137
|
field: "value",
|
|
1131
1138
|
locked: this.$props.lockGroups,
|
|
1132
1139
|
columnMenu: !1
|
|
@@ -1317,7 +1324,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1317
1324
|
const s = this.$props.dataItemKey;
|
|
1318
1325
|
if (!s || !t)
|
|
1319
1326
|
return;
|
|
1320
|
-
const i =
|
|
1327
|
+
const i = E(s), o = this.getLeafDataItems().findIndex((n) => i(n) === i(t));
|
|
1321
1328
|
o !== -1 && this.selectionRelease({
|
|
1322
1329
|
...e,
|
|
1323
1330
|
startRowIndex: o,
|
|
@@ -1338,38 +1345,39 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1338
1345
|
getCellPositionStyle: this.getCellPositionStyle,
|
|
1339
1346
|
onRowPin: this.handleRowPin,
|
|
1340
1347
|
getRowPinPosition: this.getRowPinPosition,
|
|
1341
|
-
onContextMenu: this.triggerCellContextMenu
|
|
1348
|
+
onContextMenu: this.triggerCellContextMenu,
|
|
1349
|
+
exportAsCsv: this.exportAsCsv
|
|
1342
1350
|
},
|
|
1343
1351
|
sticky: this.sticky
|
|
1344
1352
|
};
|
|
1345
1353
|
},
|
|
1346
1354
|
setup(e) {
|
|
1347
|
-
const t = R(null), s = R(null), i = R(null), o = R(null), n = R(null), r = R(null), a = R(null), h = R([]), u = R([]), p = R(null), c = R(null), f = R(null), m = R(null),
|
|
1348
|
-
var
|
|
1349
|
-
return !!((
|
|
1350
|
-
}),
|
|
1355
|
+
const t = R(null), s = R(null), i = R(null), o = R(null), n = R(null), r = R(null), a = R(null), h = R([]), u = R([]), p = R(null), c = R(null), f = R(null), m = R(null), I = R(null), C = R(null), $ = R(null), v = R(!0), H = R(!1), b = new ss(), P = R(0), V = xt(bs, {}), Z = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, z = typeof e.groupable == "object" && !!e.groupable.stickyFooters, O = R([]), N = _e(() => {
|
|
1356
|
+
var q, G;
|
|
1357
|
+
return !!((G = (q = V.group) == null ? void 0 : q.value) != null && G.length);
|
|
1358
|
+
}), D = null, T = R(void 0), W = R({
|
|
1351
1359
|
headerItems: [],
|
|
1352
1360
|
footerItems: []
|
|
1353
1361
|
}), {
|
|
1354
|
-
scrollToStickyGroup:
|
|
1355
|
-
update:
|
|
1356
|
-
} =
|
|
1357
|
-
enabled:
|
|
1358
|
-
enabledFooters:
|
|
1359
|
-
flatData:
|
|
1362
|
+
scrollToStickyGroup: U,
|
|
1363
|
+
update: j
|
|
1364
|
+
} = Is({
|
|
1365
|
+
enabled: Z,
|
|
1366
|
+
enabledFooters: z,
|
|
1367
|
+
flatData: O,
|
|
1360
1368
|
containerRef: p,
|
|
1361
1369
|
stickyHeaderRef: c,
|
|
1362
1370
|
stickyFooterRef: f,
|
|
1363
1371
|
tableBodyRef: C,
|
|
1364
1372
|
rowHeight: e.rowHeight,
|
|
1365
|
-
isGrouped:
|
|
1366
|
-
virtualSkipRef:
|
|
1367
|
-
rowHeightServiceRef: _e(() =>
|
|
1373
|
+
isGrouped: N,
|
|
1374
|
+
virtualSkipRef: P,
|
|
1375
|
+
rowHeightServiceRef: _e(() => b == null ? void 0 : b.rowHeightService)
|
|
1368
1376
|
});
|
|
1369
1377
|
return {
|
|
1370
|
-
rowIndexRef:
|
|
1371
|
-
observerRef:
|
|
1372
|
-
dataRef:
|
|
1378
|
+
rowIndexRef: T,
|
|
1379
|
+
observerRef: D,
|
|
1380
|
+
dataRef: O,
|
|
1373
1381
|
groupPanelDivRef: t,
|
|
1374
1382
|
dropElementClueRef: s,
|
|
1375
1383
|
dragElementClueRef: i,
|
|
@@ -1379,29 +1387,30 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1379
1387
|
colGroupRef: a,
|
|
1380
1388
|
scrollContainerRef: p,
|
|
1381
1389
|
tableBodyRef: C,
|
|
1382
|
-
gridStateContext:
|
|
1390
|
+
gridStateContext: V,
|
|
1383
1391
|
shouldUpdateLeftRightRef: v,
|
|
1384
|
-
resizedRef:
|
|
1392
|
+
resizedRef: H,
|
|
1385
1393
|
currentColumnsState: e.columnsState,
|
|
1386
|
-
vsRef:
|
|
1387
|
-
virtualSkipRef:
|
|
1394
|
+
vsRef: b,
|
|
1395
|
+
virtualSkipRef: P,
|
|
1388
1396
|
stickyHeaderItems: h,
|
|
1389
1397
|
stickyHeaderRef: c,
|
|
1390
1398
|
stickyFooterItems: u,
|
|
1391
1399
|
stickyFooterRef: f,
|
|
1392
1400
|
pinnedTopRef: m,
|
|
1393
|
-
pinnedBottomRef:
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1401
|
+
pinnedBottomRef: I,
|
|
1402
|
+
csvExportRef: $,
|
|
1403
|
+
sticky: W,
|
|
1404
|
+
scrollToStickyGroup: U,
|
|
1405
|
+
updateStickyGroups: j
|
|
1397
1406
|
};
|
|
1398
1407
|
},
|
|
1399
1408
|
render() {
|
|
1400
|
-
var Ce, be, Se, Ie,
|
|
1401
|
-
const e = (Ce = this.gridStateContext.sort) == null ? void 0 : Ce.value, t = (be = this.gridStateContext.filter) == null ? void 0 : be.value, s = (Se = this.gridStateContext.search) == null ? void 0 : Se.value, i = (
|
|
1409
|
+
var Ce, be, Se, xe, Ie, ve, $e, we, ye, ke, He, Te, Ee, Me, Pe, ze, De, Ge;
|
|
1410
|
+
const e = (Ce = this.gridStateContext.sort) == null ? void 0 : Ce.value, t = (be = this.gridStateContext.filter) == null ? void 0 : be.value, s = (Se = this.gridStateContext.search) == null ? void 0 : Se.value, i = (xe = this.gridStateContext.select) == null ? void 0 : xe.value, o = (Ie = this.gridStateContext.skip) == null ? void 0 : Ie.value, n = (ve = this.gridStateContext.take) == null ? void 0 : ve.value, r = ($e = this.gridStateContext.group) == null ? void 0 : $e.value, a = (we = this.gridStateContext.groupExpand) == null ? void 0 : we.value, h = (ye = this.gridStateContext.detailExpand) == null ? void 0 : ye.value, u = (r == null ? void 0 : r.length) || 0, p = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyHeaders, c = typeof this.$props.groupable == "object" && !!this.$props.groupable.stickyFooters, f = !!(r != null && r.length);
|
|
1402
1411
|
let m;
|
|
1403
1412
|
this.currentColumnsState = (ke = this.gridStateContext.columnsState) == null ? void 0 : ke.value;
|
|
1404
|
-
const
|
|
1413
|
+
const I = this.$props.autoProcessData === !0 ? {
|
|
1405
1414
|
group: !0,
|
|
1406
1415
|
sort: !0,
|
|
1407
1416
|
filter: !0,
|
|
@@ -1409,46 +1418,46 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1409
1418
|
page: !0
|
|
1410
1419
|
} : this.$props.autoProcessData;
|
|
1411
1420
|
let C;
|
|
1412
|
-
const
|
|
1413
|
-
let
|
|
1414
|
-
Array.isArray(this.$props.dataItems) ? (
|
|
1415
|
-
const
|
|
1416
|
-
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable =
|
|
1417
|
-
const
|
|
1418
|
-
if (
|
|
1419
|
-
const l =
|
|
1420
|
-
data:
|
|
1421
|
-
total:
|
|
1422
|
-
} = Cs(
|
|
1423
|
-
group:
|
|
1424
|
-
sort:
|
|
1425
|
-
filter:
|
|
1421
|
+
const $ = M.getIdPrefix(this.navigation);
|
|
1422
|
+
let v = [];
|
|
1423
|
+
Array.isArray(this.$props.dataItems) ? (v = this.$props.dataItems, C = (He = this.$props.total) != null ? He : v.length) : (v = ((Te = as(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField)) == null ? void 0 : Te.data) || [], C = (Pe = (Me = this.$props.total) != null ? Me : (Ee = this.$props.dataItems) == null ? void 0 : Ee.total) != null ? Pe : v.length);
|
|
1424
|
+
const H = this.$props.groupable === !0 || Y(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
1425
|
+
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = H, this._virtualPageSize = this.calcVirtualPageSize();
|
|
1426
|
+
const b = v.length === C, P = Y(this.$props.groupable) && this.$props.groupable.footer || "none";
|
|
1427
|
+
if (I) {
|
|
1428
|
+
const l = I.page && !(this.isVirtualScroll && !this.$props.pageable), {
|
|
1429
|
+
data: S,
|
|
1430
|
+
total: y
|
|
1431
|
+
} = Cs(v, {
|
|
1432
|
+
group: I.group ? r : void 0,
|
|
1433
|
+
sort: I.sort ? e : void 0,
|
|
1434
|
+
filter: Et(I.filter ? t : void 0, I.search ? s : void 0),
|
|
1426
1435
|
...l ? {
|
|
1427
1436
|
take: this.$props.pageable ? n || 10 : n,
|
|
1428
1437
|
skip: o || 0
|
|
1429
1438
|
} : {}
|
|
1430
1439
|
});
|
|
1431
|
-
|
|
1440
|
+
v = S, C = (ze = this.$props.total) != null ? ze : y;
|
|
1432
1441
|
}
|
|
1433
1442
|
const {
|
|
1434
|
-
resolvedGroupsCount:
|
|
1435
|
-
flattedData:
|
|
1436
|
-
} = this.getFlatData(
|
|
1437
|
-
this.dataRef =
|
|
1438
|
-
const
|
|
1443
|
+
resolvedGroupsCount: V,
|
|
1444
|
+
flattedData: Z
|
|
1445
|
+
} = this.getFlatData(v, P, b ? 0 : this.$props.skip || 0, r, h, a, this.$props.dataItemKey);
|
|
1446
|
+
this.dataRef = Z;
|
|
1447
|
+
const z = this.virtualSkipRef || 0;
|
|
1439
1448
|
if (this._virtualTotal = C, this.isVirtualScroll) {
|
|
1440
1449
|
let l = o || 0;
|
|
1441
|
-
if ((f || this.$props.pageable) && (l =
|
|
1450
|
+
if ((f || this.$props.pageable) && (l = z, this._virtualTotal = this.dataRef.length), b || f || this.$props.pageable)
|
|
1442
1451
|
if (this._virtualPageSize === 0) {
|
|
1443
|
-
const
|
|
1444
|
-
m = this.dataRef.slice(l, l +
|
|
1452
|
+
const S = Math.min(n || this.$props.pageSize || 20, this.dataRef.length);
|
|
1453
|
+
m = this.dataRef.slice(l, l + S);
|
|
1445
1454
|
} else
|
|
1446
1455
|
m = this.dataRef.slice(l, l + this._virtualPageSize);
|
|
1447
1456
|
}
|
|
1448
1457
|
this.initializeVirtualization();
|
|
1449
|
-
const
|
|
1450
|
-
this.initColumns(this.$props.dataItems,
|
|
1451
|
-
const
|
|
1458
|
+
const O = (De = this.selectable) != null && De.drag ? "none" : void 0;
|
|
1459
|
+
this.initColumns(this.$props.dataItems, V), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this.columnsRef, this.columnResize.columnsState = It(this.currentColumnsState || []), this.dragLogic.columns = this.columnsRef;
|
|
1460
|
+
const N = this.$props.toolbar, D = this.$props.noRecords, T = this.columnsRef.filter((l) => l.children.length === 0), W = H && d(Yt, {
|
|
1452
1461
|
ref: (l) => {
|
|
1453
1462
|
this.groupPanelDivRef = l;
|
|
1454
1463
|
},
|
|
@@ -1459,24 +1468,24 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1459
1468
|
onDragHandler: this.dragLogic.dragHandler,
|
|
1460
1469
|
onReleaseHandler: this.dragLogic.releaseHandler,
|
|
1461
1470
|
resolveTitle: this.resolveTitle
|
|
1462
|
-
}, null),
|
|
1471
|
+
}, null), U = (this.dragLogic.reorderable || this.dragLogic.groupable) && B && document && document.body, j = [U && d(rs, {
|
|
1463
1472
|
ref: (l) => {
|
|
1464
1473
|
this.dropElementClueRef = l;
|
|
1465
1474
|
}
|
|
1466
|
-
}, null),
|
|
1475
|
+
}, null), U && d(ns, {
|
|
1467
1476
|
ref: (l) => {
|
|
1468
1477
|
this.dragElementClueRef = l;
|
|
1469
1478
|
}
|
|
1470
|
-
}, null)],
|
|
1479
|
+
}, null)], q = this.showLicenseWatermark ? d(vt, {
|
|
1471
1480
|
message: this.licenseMessage
|
|
1472
|
-
}, null) : null,
|
|
1481
|
+
}, null) : null, G = this.$attrs.style, ht = G && Y(G) && G["width"] || "";
|
|
1473
1482
|
this.tableWidth = parseFloat(ht.toString());
|
|
1474
1483
|
const ct = T.findIndex((l) => typeof l.colSpan == "function") > -1;
|
|
1475
|
-
let
|
|
1476
|
-
|
|
1477
|
-
const
|
|
1484
|
+
let J;
|
|
1485
|
+
J = this.getCellsToRender({}, T);
|
|
1486
|
+
const F = T.map(function(l, S) {
|
|
1478
1487
|
return d("col", {
|
|
1479
|
-
key: l.id || `col-${
|
|
1488
|
+
key: l.id || `col-${S}`,
|
|
1480
1489
|
width: l.width !== void 0 ? Math.floor(parseFloat(l.width.toString())) : void 0
|
|
1481
1490
|
}, null);
|
|
1482
1491
|
}, this), pe = d(qt, {
|
|
@@ -1503,7 +1512,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1503
1512
|
columnMenuAnimate: this.$props.columnMenuAnimate,
|
|
1504
1513
|
onSelectionchange: this.onHeaderSelectionChangeHandler,
|
|
1505
1514
|
columns: this.columnsRef,
|
|
1506
|
-
cellsToRender:
|
|
1515
|
+
cellsToRender: J,
|
|
1507
1516
|
columnVirtualization: this.$props.columnVirtualization,
|
|
1508
1517
|
columnsInitial: this.$props.columns,
|
|
1509
1518
|
columnResize: this.columnResize,
|
|
@@ -1515,13 +1524,13 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1515
1524
|
cells: this.$props.cells,
|
|
1516
1525
|
isRtl: this.isRtl,
|
|
1517
1526
|
isColCountDefined: this.getAriaColCount !== void 0,
|
|
1518
|
-
headerSelectionValue: !!(i && this.dataRef.filter((l) => l.rowType === "data").every((l) => i && this.$props.dataItemKey &&
|
|
1527
|
+
headerSelectionValue: !!(i && this.dataRef.filter((l) => l.rowType === "data").every((l) => i && this.$props.dataItemKey && E(this.$props.dataItemKey)(l.dataItem) !== void 0 ? i[E(this.$props.dataItemKey)(l.dataItem)] : void 0)),
|
|
1519
1528
|
filterRow: this.$props.filterable && d(Xt, {
|
|
1520
1529
|
grid: this,
|
|
1521
1530
|
size: this.$props.size,
|
|
1522
1531
|
columns: this.columnsRef,
|
|
1523
1532
|
columnsMap: this._columnsMap,
|
|
1524
|
-
cellsToRender:
|
|
1533
|
+
cellsToRender: J,
|
|
1525
1534
|
columnVirtualization: this.$props.columnVirtualization,
|
|
1526
1535
|
filter: t,
|
|
1527
1536
|
filterOperators: this.$props.filterOperators || Qe,
|
|
@@ -1533,10 +1542,10 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1533
1542
|
ariaRowIndex: this._columnsMap.length + 1
|
|
1534
1543
|
}, null) || void 0
|
|
1535
1544
|
}, null),
|
|
1536
|
-
cols:
|
|
1545
|
+
cols: F
|
|
1537
1546
|
}, null), ue = this.columnsRef.some((l) => {
|
|
1538
|
-
var
|
|
1539
|
-
return !!(l.footerCell || (
|
|
1547
|
+
var S;
|
|
1548
|
+
return !!(l.footerCell || (S = l.cells) != null && S.footerCell);
|
|
1540
1549
|
}) || (Ge = this.$props.cells) != null && Ge.footerCell ? d(Qt, {
|
|
1541
1550
|
size: this.$props.size,
|
|
1542
1551
|
columnResize: this.columnResize,
|
|
@@ -1550,10 +1559,10 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1550
1559
|
columns: this.columnsRef,
|
|
1551
1560
|
cells: this.$props.cells
|
|
1552
1561
|
}, null),
|
|
1553
|
-
cols:
|
|
1562
|
+
cols: F
|
|
1554
1563
|
}, null) : d("span", null, null), _ = {
|
|
1555
1564
|
leafColumns: T,
|
|
1556
|
-
cellsToRender:
|
|
1565
|
+
cellsToRender: J,
|
|
1557
1566
|
selectedField: this.$props.selectedField,
|
|
1558
1567
|
dataItemKey: this.$props.dataItemKey,
|
|
1559
1568
|
select: i,
|
|
@@ -1575,48 +1584,48 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1575
1584
|
uniqueField: this.$props.uniqueField,
|
|
1576
1585
|
columnsRef: this.columnsRef,
|
|
1577
1586
|
isRtl: this.isRtl,
|
|
1578
|
-
idPrefix:
|
|
1579
|
-
}, pt = function(l,
|
|
1580
|
-
return
|
|
1587
|
+
idPrefix: $
|
|
1588
|
+
}, pt = function(l, S, y, oe, ne) {
|
|
1589
|
+
return xs(_, l, S, y, oe, ne);
|
|
1581
1590
|
};
|
|
1582
1591
|
let ut = 0, ee = [];
|
|
1583
1592
|
const te = !this.dataRef.length, fe = (l) => l >= this.dataRef.length - ut;
|
|
1584
1593
|
let se = 0;
|
|
1585
1594
|
if (this.dataRef.length) {
|
|
1586
1595
|
const l = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
|
|
1587
|
-
let
|
|
1596
|
+
let S = this.$props.skip || 0, y = -1, oe = 0;
|
|
1588
1597
|
const ne = this.computedRowSpannable.enabled ? {} : void 0;
|
|
1589
1598
|
if (this.isVirtualScroll) {
|
|
1590
|
-
if (
|
|
1591
|
-
const g = this.dataRef.slice(0,
|
|
1592
|
-
|
|
1599
|
+
if (z > 0) {
|
|
1600
|
+
const g = this.dataRef.slice(0, z).filter((A) => A.rowType === "data").length;
|
|
1601
|
+
y += g, S += z;
|
|
1593
1602
|
}
|
|
1594
|
-
!this.$props.pageable &&
|
|
1603
|
+
!this.$props.pageable && b && (y += this.$props.skip || 0);
|
|
1595
1604
|
}
|
|
1596
1605
|
ee = (m || this.dataRef).map(function(g, A) {
|
|
1597
|
-
g.rowType === "data" &&
|
|
1598
|
-
const re = g.dataIndex % 2 !== 0, Fe = this.$props.dataItemKey &&
|
|
1606
|
+
g.rowType === "data" && y++;
|
|
1607
|
+
const re = g.dataIndex % 2 !== 0, Fe = this.$props.dataItemKey && E(this.$props.dataItemKey)(g.dataItem), ae = A + S, le = Fe || "ai" + ae, de = le + "_1", X = pt.call(this, g, le, y, re, ne), Rt = g.rowType === "data" ? this.pinnedSourceSet.has(g.dataItem) : !1, Ct = T.length - (this.detailExpandable.enabled ? 1 : 0) - ((r == null ? void 0 : r.length) || 0) || 1;
|
|
1599
1608
|
return se = ae + l + oe, [d(gs, {
|
|
1600
1609
|
key: le,
|
|
1601
1610
|
item: g,
|
|
1602
|
-
dataIndex:
|
|
1611
|
+
dataIndex: y,
|
|
1603
1612
|
ariaRowIndex: se,
|
|
1604
1613
|
absoluteRowIndex: ae,
|
|
1605
1614
|
isAltRow: re,
|
|
1606
1615
|
isHidden: fe(A),
|
|
1607
1616
|
rowHeight: this.$props.rowHeight,
|
|
1608
|
-
isSelected:
|
|
1609
|
-
isHighlighted:
|
|
1610
|
-
isInEdit:
|
|
1617
|
+
isSelected: X.isSelected,
|
|
1618
|
+
isHighlighted: X.isHighlighted,
|
|
1619
|
+
isInEdit: X.isInEdit,
|
|
1611
1620
|
rowType: g.rowType,
|
|
1612
|
-
onRowclick: (
|
|
1613
|
-
onRowdblclick: (
|
|
1621
|
+
onRowclick: (L) => this.rowClick(L, g),
|
|
1622
|
+
onRowdblclick: (L) => this.rowDoubleClick(L, g),
|
|
1614
1623
|
render: this.$props.rowRender,
|
|
1615
1624
|
class: this.$props.rowClass ? this.$props.rowClass(g) : "",
|
|
1616
1625
|
isPinned: Rt,
|
|
1617
1626
|
rows: this.$props.rows
|
|
1618
1627
|
}, {
|
|
1619
|
-
default: () => [
|
|
1628
|
+
default: () => [X.row]
|
|
1620
1629
|
}), this.$props.detail && g.rowType === "data" && (g.expanded || g.dataItem.expanded) && d("tr", {
|
|
1621
1630
|
key: de,
|
|
1622
1631
|
class: re ? "k-table-row k-table-alt-row k-detail-row" : "k-table-row k-detail-row",
|
|
@@ -1626,29 +1635,29 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1626
1635
|
},
|
|
1627
1636
|
role: "row",
|
|
1628
1637
|
"aria-rowindex": se
|
|
1629
|
-
}, [r == null ? void 0 : r.map(function(
|
|
1638
|
+
}, [r == null ? void 0 : r.map(function(L) {
|
|
1630
1639
|
return d(tt, {
|
|
1631
1640
|
id: "",
|
|
1632
1641
|
dataIndex: g.dataIndex,
|
|
1633
|
-
field:
|
|
1642
|
+
field: L.field,
|
|
1634
1643
|
dataItem: g.dataItem,
|
|
1635
|
-
key: `group-${
|
|
1644
|
+
key: `group-${L.field}-${g.dataIndex}`,
|
|
1636
1645
|
locked: this.$props.lockGroups,
|
|
1637
1646
|
group: g.group
|
|
1638
1647
|
}, null);
|
|
1639
1648
|
}, this), (this.$props.expandField || this.detailExpandable.enabled) && d(Ut, {
|
|
1640
|
-
id:
|
|
1649
|
+
id: M.generateNavigatableId(`${de}-dhcell`, $)
|
|
1641
1650
|
}, null), d(jt, {
|
|
1642
1651
|
dataItem: g.dataItem,
|
|
1643
1652
|
dataIndex: g.dataIndex,
|
|
1644
1653
|
colSpan: Ct,
|
|
1645
1654
|
ariaColIndex: 2 + (r ? r.length : 0),
|
|
1646
1655
|
detail: this.$props.detail ? this.$props.detail : void 0,
|
|
1647
|
-
id:
|
|
1656
|
+
id: M.generateNavigatableId(`${de}-dcell`, $)
|
|
1648
1657
|
}, null)])];
|
|
1649
1658
|
}, this);
|
|
1650
1659
|
}
|
|
1651
|
-
const ft = this.$props.pageable && d(
|
|
1660
|
+
const ft = this.$props.pageable && d(Mt, {
|
|
1652
1661
|
class: "k-grid-pager",
|
|
1653
1662
|
onPagesizechange: this.pageChangeHandler,
|
|
1654
1663
|
onPagechange: this.pageChangeHandler,
|
|
@@ -1671,11 +1680,11 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1671
1680
|
pagesizechange: this.pageChangeHandler,
|
|
1672
1681
|
pagechange: this.pageChangeHandler
|
|
1673
1682
|
}
|
|
1674
|
-
}), mt = (l) => e && e.filter((
|
|
1675
|
-
ref:
|
|
1676
|
-
}, [T.map(function(l,
|
|
1683
|
+
}), mt = (l) => e && e.filter((S) => S.field === l).length > 0, ge = d("colgroup", {
|
|
1684
|
+
ref: w(this, "colGroup")
|
|
1685
|
+
}, [T.map(function(l, S) {
|
|
1677
1686
|
return d("col", {
|
|
1678
|
-
key: l.id || `col-${
|
|
1687
|
+
key: l.id || `col-${S}`,
|
|
1679
1688
|
class: mt(l.field) ? "k-sorted" : void 0,
|
|
1680
1689
|
width: l.width !== void 0 ? l.width.toString().indexOf("%") !== -1 ? l.width : Math.floor(parseFloat(l.width.toString())) + "px" : void 0
|
|
1681
1690
|
}, null);
|
|
@@ -1724,7 +1733,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1724
1733
|
onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler,
|
|
1725
1734
|
onNavigationaction: this.navigationActionHandler
|
|
1726
1735
|
}, {
|
|
1727
|
-
default: () => [
|
|
1736
|
+
default: () => [N, W, d("div", {
|
|
1728
1737
|
role: "grid",
|
|
1729
1738
|
class: "k-grid-aria-root",
|
|
1730
1739
|
id: this._gridRoleElementId,
|
|
@@ -1733,18 +1742,18 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1733
1742
|
}, [d(es, {
|
|
1734
1743
|
selectable: this.computedSelectable,
|
|
1735
1744
|
class: "k-table",
|
|
1736
|
-
ref:
|
|
1745
|
+
ref: w(this, "table")
|
|
1737
1746
|
}, {
|
|
1738
1747
|
default: () => [ge, pe, d("tbody", {
|
|
1739
1748
|
class: "k-table-tbody",
|
|
1740
1749
|
"data-keyboardnavbody": !0,
|
|
1741
|
-
ref:
|
|
1750
|
+
ref: w(this, "tableBody")
|
|
1742
1751
|
}, [ee, St(" "), ie]), ue]
|
|
1743
1752
|
}), te && d(ot, {
|
|
1744
|
-
id:
|
|
1753
|
+
id: M.generateNavigatableId("no-records", $)
|
|
1745
1754
|
}, {
|
|
1746
1755
|
default: () => [D.length ? D : d(it, null, null)]
|
|
1747
|
-
})]), me, ie,
|
|
1756
|
+
})]), me, ie, j]
|
|
1748
1757
|
})]
|
|
1749
1758
|
}), this.renderContextMenu()]) : d(Ke, null, [d(We, {
|
|
1750
1759
|
ref: "navRef",
|
|
@@ -1769,16 +1778,16 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1769
1778
|
onSetcurrentontop: this.setCurrentOnTop,
|
|
1770
1779
|
onNavigationaction: this.navigationActionHandler
|
|
1771
1780
|
}, {
|
|
1772
|
-
default: () => [
|
|
1781
|
+
default: () => [N, W, d("div", {
|
|
1773
1782
|
role: "grid",
|
|
1774
1783
|
class: "k-grid-aria-root",
|
|
1775
1784
|
id: this._gridRoleElementId,
|
|
1776
1785
|
"aria-colcount": this.getAriaColCount,
|
|
1777
1786
|
"aria-rowcount": this.getAriaRowCount
|
|
1778
1787
|
}, [pe, this.hasPinnedTopRows && d(lt, {
|
|
1779
|
-
ref:
|
|
1788
|
+
ref: w(this, "pinnedTop"),
|
|
1780
1789
|
size: this.$props.size,
|
|
1781
|
-
cols:
|
|
1790
|
+
cols: F,
|
|
1782
1791
|
dataRowContext: _,
|
|
1783
1792
|
position: "top",
|
|
1784
1793
|
pinnedItems: this.sortedPinnedTopRows,
|
|
@@ -1789,16 +1798,16 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1789
1798
|
class: "k-grid-container",
|
|
1790
1799
|
role: "presentation"
|
|
1791
1800
|
}, [f && p && d(at, {
|
|
1792
|
-
ref:
|
|
1801
|
+
ref: w(this, "stickyHeader"),
|
|
1793
1802
|
size: this.$props.size,
|
|
1794
|
-
cols:
|
|
1803
|
+
cols: F,
|
|
1795
1804
|
dataRowContext: _,
|
|
1796
1805
|
position: "top",
|
|
1797
1806
|
groupLevelCount: u,
|
|
1798
1807
|
rowHeight: this.$props.rowHeight
|
|
1799
1808
|
}, null), d("div", {
|
|
1800
1809
|
role: "presentation",
|
|
1801
|
-
ref:
|
|
1810
|
+
ref: w(this, "scrollContainer"),
|
|
1802
1811
|
class: "k-grid-content k-virtual-content",
|
|
1803
1812
|
onScroll: this.scrollHandler
|
|
1804
1813
|
}, [d("div", {
|
|
@@ -1808,51 +1817,60 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1808
1817
|
selectable: this.computedSelectable,
|
|
1809
1818
|
tableClassName: this.gridTableClass,
|
|
1810
1819
|
tableStyle: {
|
|
1811
|
-
userSelect:
|
|
1820
|
+
userSelect: O
|
|
1812
1821
|
},
|
|
1813
|
-
ref:
|
|
1822
|
+
ref: w(this, "table")
|
|
1814
1823
|
}, {
|
|
1815
1824
|
default: () => [ge, d("tbody", {
|
|
1816
1825
|
class: "k-table-tbody",
|
|
1817
1826
|
role: "rowgroup",
|
|
1818
1827
|
"data-keyboardnavbody": !0,
|
|
1819
|
-
ref:
|
|
1828
|
+
ref: w(this, "tableBody")
|
|
1820
1829
|
}, [ee])]
|
|
1821
1830
|
}), te && d(ot, {
|
|
1822
|
-
id:
|
|
1831
|
+
id: M.generateNavigatableId("no-records", $)
|
|
1823
1832
|
}, {
|
|
1824
1833
|
default: () => [D.length ? D : d(it, null, null)]
|
|
1825
1834
|
})]), !te && d("div", {
|
|
1826
1835
|
class: "k-height-container",
|
|
1827
1836
|
role: "presentation"
|
|
1828
1837
|
}, [d("div", {
|
|
1829
|
-
ref:
|
|
1838
|
+
ref: w(this, "scrollHeightContainer"),
|
|
1830
1839
|
style: this.$props.scrollable === "virtual" ? {
|
|
1831
1840
|
height: this._containerHeightRef + "px"
|
|
1832
1841
|
} : {}
|
|
1833
1842
|
}, null)])]), f && c && d(at, {
|
|
1834
|
-
ref:
|
|
1843
|
+
ref: w(this, "stickyFooter"),
|
|
1835
1844
|
size: this.$props.size,
|
|
1836
|
-
cols:
|
|
1845
|
+
cols: F,
|
|
1837
1846
|
dataRowContext: _,
|
|
1838
1847
|
position: "bottom",
|
|
1839
1848
|
groupLevelCount: u,
|
|
1840
1849
|
rowHeight: this.$props.rowHeight
|
|
1841
1850
|
}, null)]), this.hasPinnedBottomRows && d(lt, {
|
|
1842
|
-
ref:
|
|
1851
|
+
ref: w(this, "pinnedBottom"),
|
|
1843
1852
|
size: this.$props.size,
|
|
1844
|
-
cols:
|
|
1853
|
+
cols: F,
|
|
1845
1854
|
dataRowContext: _,
|
|
1846
1855
|
position: "bottom",
|
|
1847
1856
|
pinnedItems: this.sortedPinnedBottomRows,
|
|
1848
1857
|
rowHeight: this.$props.rowHeight,
|
|
1849
1858
|
rows: this.$props.rows,
|
|
1850
1859
|
selectable: this.computedSelectable
|
|
1851
|
-
}, null), ue,
|
|
1860
|
+
}, null), ue, q]), me, ie, j]
|
|
1852
1861
|
})]
|
|
1853
|
-
}), this.renderContextMenu()
|
|
1862
|
+
}), this.renderContextMenu(), this.$props.csv && d($s, {
|
|
1863
|
+
ref: (l) => {
|
|
1864
|
+
this.csvExportRef = l;
|
|
1865
|
+
},
|
|
1866
|
+
gridProps: this.$props,
|
|
1867
|
+
csv: this.$props.csv,
|
|
1868
|
+
fileName: typeof this.$props.csv == "object" ? this.$props.csv.fileName : void 0,
|
|
1869
|
+
onCsvexport: this.$props.onCsvexport,
|
|
1870
|
+
columnsState: this.currentColumnsState
|
|
1871
|
+
}, null)]);
|
|
1854
1872
|
}
|
|
1855
1873
|
});
|
|
1856
1874
|
export {
|
|
1857
|
-
|
|
1875
|
+
bi as Grid
|
|
1858
1876
|
};
|