@progress/kendo-vue-grid 8.3.0-develop.3 → 8.3.0-develop.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Grid.d.ts +1 -0
- package/Grid.js +1 -1
- package/Grid.mjs +127 -122
- package/cells/GridSelectionCell.d.ts +1 -1
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +24 -21
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
package/Grid.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as bt, createVNode as d, h as Le, Fragment as Ke, createTextVNode as St, ref as R, inject as It, computed as _e, markRaw as H } from "vue";
|
|
9
|
-
import { isObject as q, cloneArray as xt, canUseDOM as B, WatermarkOverlay as $t, getter as M, getTemplate as Ae, setRef as y, hasListener as L, getComponentElementRef as Be, getRef as S, RowHeightService as
|
|
9
|
+
import { isObject as q, cloneArray as xt, canUseDOM as B, WatermarkOverlay as $t, getter as M, getTemplate as Ae, setRef as y, hasListener as L, getComponentElementRef as Be, getRef as S, RowHeightService as vt, 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
10
|
import { tableKeyboardNavigationTools as E, combineFilters as Mt, Pager as Et, 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";
|
|
@@ -28,7 +28,7 @@ import { ColumnResize as is } from "./drag/ColumnResize.mjs";
|
|
|
28
28
|
import { CommonDragLogic as os } from "./drag/CommonDragLogic.mjs";
|
|
29
29
|
import { DragClue as ns } from "./drag/DragClue.mjs";
|
|
30
30
|
import { DropClue as rs } from "./drag/DropClue.mjs";
|
|
31
|
-
import { applyExpandedState as
|
|
31
|
+
import { applyExpandedState as as, getColSpan as ls, autoGenerateColumns as ds, mapColumns as hs, getFlatColumnsState as Ze, getRowSpanOptions as et, getDataAsArray as cs, groupedFirstItemValue as ps, calcRowHeight as us, flatData as fs, readColumns as ms } from "./utils/main.mjs";
|
|
32
32
|
import { GridGroupCell as tt } from "./cells/GridGroupCell.mjs";
|
|
33
33
|
import { GridRow as gs } from "./rows/GridRow.mjs";
|
|
34
34
|
import { gridProps as Rs } from "./common.mjs";
|
|
@@ -40,12 +40,12 @@ import { pagerMessagesMap as nt } from "./messages/messagesMap.mjs";
|
|
|
40
40
|
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
|
-
import { StickyGroupTable as
|
|
43
|
+
import { StickyGroupTable as at } from "./components/StickyGroupTable.mjs";
|
|
44
44
|
import { getRowContents as Is } from "./getRowContents.mjs";
|
|
45
45
|
import { useStickyGroups as xs } from "./hooks/useStickyGroups.mjs";
|
|
46
|
-
import { PinnedRowsTable as
|
|
46
|
+
import { PinnedRowsTable as lt } from "./components/PinnedRowsTable.mjs";
|
|
47
47
|
import { GridPinCell as $s } from "./cells/pincell/GridPinCell.mjs";
|
|
48
|
-
import { contextMenuItemsMap as
|
|
48
|
+
import { contextMenuItemsMap as vs, GridContextMenu as ws, getDefaultBodyContextMenuItems as ys, getDefaultHeadContextMenuItems as ks } from "./contextMenu/GridContextMenu.mjs";
|
|
49
49
|
import { GridContextMenuItemNames as J, GridContextMenuAnchorPart as dt } from "./contextMenu/enums.mjs";
|
|
50
50
|
const Ri = /* @__PURE__ */ bt({
|
|
51
51
|
name: "KendoGrid",
|
|
@@ -329,15 +329,15 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
329
329
|
field: o,
|
|
330
330
|
...typeof this.$props.clipboard != "boolean" ? this.$props.clipboard : {},
|
|
331
331
|
...s
|
|
332
|
-
}, r = this.getLeafDataItems(),
|
|
332
|
+
}, r = this.getLeafDataItems(), a = Bt({
|
|
333
333
|
event: n,
|
|
334
334
|
data: r,
|
|
335
335
|
selectedState: (p = (u = this.$props.select) != null ? u : (h = this.gridStateContext.select) == null ? void 0 : h.value) != null ? p : {},
|
|
336
336
|
previousCopiedItems: this.previousCopiedItems
|
|
337
337
|
});
|
|
338
|
-
e !== he.paste && (this.previousCopiedItems =
|
|
338
|
+
e !== he.paste && (this.previousCopiedItems = a.copiedItems), L.call(this, "clipboard") && this.$emit("clipboard", {
|
|
339
339
|
...n,
|
|
340
|
-
...
|
|
340
|
+
...a
|
|
341
341
|
});
|
|
342
342
|
},
|
|
343
343
|
handleContextMenuSelect(e) {
|
|
@@ -349,7 +349,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
349
349
|
},
|
|
350
350
|
renderContextMenu() {
|
|
351
351
|
var e;
|
|
352
|
-
return d(
|
|
352
|
+
return d(ws, {
|
|
353
353
|
show: !!(this.contextMenuState.show && ((e = this.contextMenuItems) != null && e.length)),
|
|
354
354
|
dataItem: this.contextMenuState.dataItem,
|
|
355
355
|
field: this.contextMenuState.field,
|
|
@@ -361,17 +361,17 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
361
361
|
},
|
|
362
362
|
filterPinContextMenuItems(e) {
|
|
363
363
|
var h, u;
|
|
364
|
-
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),
|
|
364
|
+
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
365
|
return e.map((p) => {
|
|
366
|
-
const c = typeof p == "string" ?
|
|
366
|
+
const c = typeof p == "string" ? vs[p] : p;
|
|
367
367
|
return (c == null ? void 0 : c.name) === J.pinRow && c.items ? {
|
|
368
368
|
...c,
|
|
369
|
-
items: c.items.filter((f) => f.name === J.pinTop ? !r : f.name === J.pinBottom ? !
|
|
369
|
+
items: c.items.filter((f) => f.name === J.pinTop ? !r : f.name === J.pinBottom ? !a : f.name === J.unpin ? r || a : !0)
|
|
370
370
|
} : p;
|
|
371
371
|
});
|
|
372
372
|
},
|
|
373
373
|
handleContextMenuItemClick(e) {
|
|
374
|
-
var i, o, n, r,
|
|
374
|
+
var i, o, n, r, a, h, u, p;
|
|
375
375
|
const t = e.event.event.item, s = {
|
|
376
376
|
event: e.event,
|
|
377
377
|
menuItem: t,
|
|
@@ -381,11 +381,11 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
381
381
|
switch (this.$emit("contextmenuitemclick", s), (i = t.data) == null ? void 0 : i.action) {
|
|
382
382
|
case "SortCommand":
|
|
383
383
|
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, x = c ? "asc" : m, C = t.name ? x : void 0, $ = (((r = this.gridStateContext.sort) == null ? void 0 : r.value) || []).filter((
|
|
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, x = c ? "asc" : m, C = t.name ? x : void 0, $ = (((r = this.gridStateContext.sort) == null ? void 0 : r.value) || []).filter((w) => {
|
|
385
385
|
var I;
|
|
386
|
-
return
|
|
386
|
+
return w.field !== ((I = this.contextMenuColumn) == null ? void 0 : I.field);
|
|
387
387
|
});
|
|
388
|
-
C && ((
|
|
388
|
+
C && ((a = this.contextMenuColumn) != null && a.field) && $.push({
|
|
389
389
|
field: this.contextMenuColumn.field,
|
|
390
390
|
dir: C
|
|
391
391
|
}), this.sortChangeHandler($, {
|
|
@@ -396,14 +396,14 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
396
396
|
case "SelectRowCommand": {
|
|
397
397
|
const c = e.dataItem;
|
|
398
398
|
if (this.computedSelectable.enabled && c && this.$props.dataItemKey) {
|
|
399
|
-
const m = M(this.$props.dataItemKey)(c), x = this.getLeafDataItems(), C = x.findIndex((z) => z[this.$props.dataItemKey] === c[this.$props.dataItemKey]),
|
|
399
|
+
const m = M(this.$props.dataItemKey)(c), x = this.getLeafDataItems(), C = x.findIndex((z) => z[this.$props.dataItemKey] === c[this.$props.dataItemKey]), v = 0, $ = this.columnsRef.length - 1, w = {
|
|
400
400
|
...this.getArguments(e.event),
|
|
401
401
|
dataItem: c,
|
|
402
402
|
startDataItem: C,
|
|
403
403
|
endDataItem: C,
|
|
404
404
|
startRowIndex: C,
|
|
405
405
|
endRowIndex: C,
|
|
406
|
-
startColIndex:
|
|
406
|
+
startColIndex: v,
|
|
407
407
|
endColIndex: $,
|
|
408
408
|
dataItems: x,
|
|
409
409
|
ctrlKey: !1,
|
|
@@ -418,7 +418,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
418
418
|
}, I = this.computedSelectable.mode === "multiple" ? {
|
|
419
419
|
...(u = (h = this.gridStateContext.select) == null ? void 0 : h.value) != null ? u : {}
|
|
420
420
|
} : {};
|
|
421
|
-
I[m] === !0 || Array.isArray(I[m]) && I[m].length === this.columnsRef.length ? delete I[m] : I[m] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0, this.raiseSelectionEvent(
|
|
421
|
+
I[m] === !0 || Array.isArray(I[m]) && I[m].length === this.columnsRef.length ? delete I[m] : I[m] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0, this.raiseSelectionEvent(w, I);
|
|
422
422
|
}
|
|
423
423
|
break;
|
|
424
424
|
}
|
|
@@ -426,8 +426,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
426
426
|
if (this.computedSelectable.enabled && this.$props.dataItemKey) {
|
|
427
427
|
const c = this.getLeafDataItems(), f = {}, m = c[0], x = c[c.length - 1];
|
|
428
428
|
c.forEach((C) => {
|
|
429
|
-
const
|
|
430
|
-
f[
|
|
429
|
+
const v = M(this.$props.dataItemKey)(C);
|
|
430
|
+
f[v] = this.computedSelectable.cell ? [...Array(this.columnsRef.length).keys()] : !0;
|
|
431
431
|
}), this.raiseSelectionEvent({
|
|
432
432
|
...this.getArguments(e.event),
|
|
433
433
|
dataItems: c,
|
|
@@ -567,11 +567,11 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
567
567
|
})];
|
|
568
568
|
},
|
|
569
569
|
getFlatData(e, t, s, i, o, n, r) {
|
|
570
|
-
const
|
|
570
|
+
const a = [], h = fs(a, e, t, {
|
|
571
571
|
index: s
|
|
572
572
|
}, i !== void 0, o, n, this.groupExpandable.defaultExpand, r, this.$props.expandField);
|
|
573
573
|
return {
|
|
574
|
-
flattedData:
|
|
574
|
+
flattedData: a,
|
|
575
575
|
resolvedGroupsCount: h
|
|
576
576
|
};
|
|
577
577
|
},
|
|
@@ -609,7 +609,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
609
609
|
declarationIndex: o,
|
|
610
610
|
parentIndex: n,
|
|
611
611
|
depth: r,
|
|
612
|
-
colSpan:
|
|
612
|
+
colSpan: a,
|
|
613
613
|
rowSpan: h,
|
|
614
614
|
index: u,
|
|
615
615
|
kFirst: p,
|
|
@@ -624,7 +624,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
624
624
|
return t(e);
|
|
625
625
|
},
|
|
626
626
|
setRefs() {
|
|
627
|
-
var n, r,
|
|
627
|
+
var n, r, a, h;
|
|
628
628
|
let e = "$el";
|
|
629
629
|
const t = S(this, "gridNav");
|
|
630
630
|
t && (this._element = t[e]);
|
|
@@ -635,7 +635,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
635
635
|
}
|
|
636
636
|
this.stickyHeaderRef = S(this, "stickyHeader"), this.stickyFooterRef = S(this, "stickyFooter"), this.pinnedTopRef = S(this, "pinnedTop"), this.pinnedBottomRef = S(this, "pinnedBottom");
|
|
637
637
|
const i = S(this, "dropElementClue"), o = S(this, "dragElementClue");
|
|
638
|
-
this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(o), this.columnResize.colGroupMain = S(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 = (
|
|
638
|
+
this.dragLogic.refDropElementClue(i), this.dragLogic.refDragElementClue(o), this.columnResize.colGroupMain = S(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 = S(this, "header"), this._footer = S(this, "footer"), this.resetTableWidth(), wt();
|
|
639
639
|
},
|
|
640
640
|
gridUnmounted() {
|
|
641
641
|
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,7 +657,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
657
657
|
},
|
|
658
658
|
initializeVirtualization() {
|
|
659
659
|
const e = this.vsRef, t = this.$props.rowHeight || this._minRowHeightRef || 0;
|
|
660
|
-
this.tableBodyRef = S(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 = S(this, "scrollContainer"), e.tableBody = this.tableBodyRef, e.scrollHeightContainer = S(this, "scrollHeightContainer"), e.table = this.scrollTableRef, (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new
|
|
660
|
+
this.tableBodyRef = S(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 = S(this, "scrollContainer"), e.tableBody = this.tableBodyRef, e.scrollHeightContainer = S(this, "scrollHeightContainer"), e.table = this.scrollTableRef, (!e.rowHeightService || e.total !== this._virtualTotal) && t && (e.total = this._virtualTotal, e.rowHeightService = new vt(this._virtualTotal, t)));
|
|
661
661
|
},
|
|
662
662
|
setContainerHeight() {
|
|
663
663
|
const e = S(this, "scrollContainer");
|
|
@@ -709,13 +709,13 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
709
709
|
},
|
|
710
710
|
updateGroupCollapsed(e) {
|
|
711
711
|
let t = this.computedCollapsed, s = t[e.level];
|
|
712
|
-
const i = this.$props.uniqueField, o = function(
|
|
713
|
-
return
|
|
712
|
+
const i = this.$props.uniqueField, o = function(a, h) {
|
|
713
|
+
return a.value === e.dataItem.value && h === e.level;
|
|
714
714
|
}, n = this.allGroupedItems ? this.loopGroupedItems(this.allGroupedItems.data, o, 0, null) : e.dataItem, r = ps(n || e.dataItem, i);
|
|
715
715
|
if (e.value) {
|
|
716
716
|
if (s && s.length) {
|
|
717
|
-
const
|
|
718
|
-
|
|
717
|
+
const a = s.indexOf(r);
|
|
718
|
+
a > -1 && s.splice(a, 1);
|
|
719
719
|
}
|
|
720
720
|
} else
|
|
721
721
|
s ? s.includes(r) || s.push(r) : s = [r];
|
|
@@ -749,6 +749,9 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
749
749
|
cellKeydownHandler(e) {
|
|
750
750
|
this.$emit("cellkeydown", e);
|
|
751
751
|
},
|
|
752
|
+
navigationActionHandler(e) {
|
|
753
|
+
this.$emit("navigationaction", e);
|
|
754
|
+
},
|
|
752
755
|
editHandler(e) {
|
|
753
756
|
this.$emit("edit", {
|
|
754
757
|
dataItem: e
|
|
@@ -776,12 +779,12 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
776
779
|
event: o,
|
|
777
780
|
dataItem: n,
|
|
778
781
|
dataIndex: r,
|
|
779
|
-
columnIndex:
|
|
782
|
+
columnIndex: a
|
|
780
783
|
} = e, h = {
|
|
781
784
|
...this.getArguments(o),
|
|
782
785
|
dataItem: n,
|
|
783
|
-
startColIndex:
|
|
784
|
-
endColIndex:
|
|
786
|
+
startColIndex: a,
|
|
787
|
+
endColIndex: a,
|
|
785
788
|
startRowIndex: r,
|
|
786
789
|
endRowIndex: r,
|
|
787
790
|
dataItems: this.getLeafDataItems(),
|
|
@@ -823,19 +826,19 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
823
826
|
});
|
|
824
827
|
if (i === t)
|
|
825
828
|
return;
|
|
826
|
-
const o = e.target, n = je(o, "TD"), r = je(o, "TR"),
|
|
827
|
-
if (
|
|
829
|
+
const o = e.target, n = je(o, "TD"), r = je(o, "TR"), a = _t(n), h = At(r);
|
|
830
|
+
if (a !== void 0 && h !== void 0) {
|
|
828
831
|
const c = (p = cs(this.$props.dataItems)) == null ? void 0 : p[h];
|
|
829
832
|
this.gridStateContext.selectionchange({
|
|
830
833
|
...s,
|
|
831
834
|
select: i,
|
|
832
835
|
dataItem: c,
|
|
833
836
|
startRowIndex: h,
|
|
834
|
-
startColIndex:
|
|
837
|
+
startColIndex: a,
|
|
835
838
|
startDataItem: c,
|
|
836
839
|
endDataItem: c,
|
|
837
840
|
endRowIndex: h,
|
|
838
|
-
endColIndex:
|
|
841
|
+
endColIndex: a,
|
|
839
842
|
ctrlKey: e.ctrlKey,
|
|
840
843
|
altKey: e.altKey,
|
|
841
844
|
metaKey: e.metaKey,
|
|
@@ -859,7 +862,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
859
862
|
selectionRelease(e) {
|
|
860
863
|
var t, s, i;
|
|
861
864
|
if (this.computedSelectable.enabled) {
|
|
862
|
-
const o = this.getLeafDataItems(), n = o[e.startRowIndex], r = o[e.endRowIndex],
|
|
865
|
+
const o = this.getLeafDataItems(), n = o[e.startRowIndex], r = o[e.endRowIndex], a = {
|
|
863
866
|
event: void 0,
|
|
864
867
|
target: this,
|
|
865
868
|
selectedField: "",
|
|
@@ -870,13 +873,13 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
870
873
|
endDataItem: r,
|
|
871
874
|
...e
|
|
872
875
|
}, h = Ue({
|
|
873
|
-
event:
|
|
876
|
+
event: a,
|
|
874
877
|
selectedState: (i = (s = this.$props.select) != null ? s : (t = this.gridStateContext.select) == null ? void 0 : t.value) != null ? i : {},
|
|
875
878
|
// Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
|
|
876
879
|
// it does work correctly even without it
|
|
877
880
|
dataItemKey: this.$props.dataItemKey
|
|
878
881
|
});
|
|
879
|
-
this.raiseSelectionEvent(
|
|
882
|
+
this.raiseSelectionEvent(a, h);
|
|
880
883
|
}
|
|
881
884
|
},
|
|
882
885
|
clearSelection(e) {
|
|
@@ -889,8 +892,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
889
892
|
});
|
|
890
893
|
},
|
|
891
894
|
moveToNextPage(e) {
|
|
892
|
-
var o, n, r,
|
|
893
|
-
const t = (r = (n = (o = this.gridStateContext.take) == null ? void 0 : o.value) != null ? n : this.$props.pageSize) != null ? r : 0, s = (((
|
|
895
|
+
var o, n, r, a;
|
|
896
|
+
const t = (r = (n = (o = this.gridStateContext.take) == null ? void 0 : o.value) != null ? n : this.$props.pageSize) != null ? r : 0, s = (((a = this.gridStateContext.skip) == null ? void 0 : a.value) || 0) + t, i = this.getTotal();
|
|
894
897
|
s < i && this.pageChangeHandler({
|
|
895
898
|
skip: s,
|
|
896
899
|
take: t
|
|
@@ -986,8 +989,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
986
989
|
p++;
|
|
987
990
|
while (p < this.columnsRef.length && this.columnsRef[p].depth > n);
|
|
988
991
|
return p;
|
|
989
|
-
},
|
|
990
|
-
this.columnsRef.splice(e < t ? r(t -
|
|
992
|
+
}, a = this.columnsRef.splice(e, r(e) - e);
|
|
993
|
+
this.columnsRef.splice(e < t ? r(t - a.length) : t, 0, ...a), this.columnsRef.filter((p) => p.declarationIndex >= 0).forEach((p, c) => {
|
|
991
994
|
p.orderIndex = c;
|
|
992
995
|
const f = o.find((m) => m.id === p.id);
|
|
993
996
|
f && (f.orderIndex = c);
|
|
@@ -1128,7 +1131,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1128
1131
|
locked: this.$props.lockGroups,
|
|
1129
1132
|
columnMenu: !1
|
|
1130
1133
|
};
|
|
1131
|
-
e.unshift(r), this.currentColumnsState.unshift(s.find((
|
|
1134
|
+
e.unshift(r), this.currentColumnsState.unshift(s.find((a) => a.id === r.id) || r);
|
|
1132
1135
|
}
|
|
1133
1136
|
e.slice(o).forEach((n) => {
|
|
1134
1137
|
n.parentIndex >= 0 && (n.parentIndex += o), n.rowSpannable = n.rowSpannable !== void 0 ? et(n.rowSpannable) : this.computedRowSpannable;
|
|
@@ -1170,8 +1173,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1170
1173
|
return null;
|
|
1171
1174
|
},
|
|
1172
1175
|
getDataState() {
|
|
1173
|
-
var n, r,
|
|
1174
|
-
const e = (n = this.gridStateContext.sort) == null ? void 0 : n.value, t = (r = this.gridStateContext.filter) == null ? void 0 : r.value, s = (
|
|
1176
|
+
var n, r, a, h, u;
|
|
1177
|
+
const e = (n = this.gridStateContext.sort) == null ? void 0 : n.value, t = (r = this.gridStateContext.filter) == null ? void 0 : r.value, s = (a = this.gridStateContext.skip) == null ? void 0 : a.value, i = (h = this.gridStateContext.take) == null ? void 0 : h.value, o = (u = this.gridStateContext.group) == null ? void 0 : u.value;
|
|
1175
1178
|
return {
|
|
1176
1179
|
filter: t,
|
|
1177
1180
|
sort: e,
|
|
@@ -1225,24 +1228,24 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1225
1228
|
var n;
|
|
1226
1229
|
const s = [];
|
|
1227
1230
|
let i = null, o = 0;
|
|
1228
|
-
if (t.forEach((r,
|
|
1231
|
+
if (t.forEach((r, a) => {
|
|
1229
1232
|
const h = parseFloat((r.width || "").toString()) || 10;
|
|
1230
1233
|
if (o) {
|
|
1231
1234
|
o--, i && (i.width += h);
|
|
1232
1235
|
return;
|
|
1233
1236
|
}
|
|
1234
|
-
const u = Math.min(
|
|
1237
|
+
const u = Math.min(ls(r, e), t.length - a);
|
|
1235
1238
|
o = u - 1, i = {
|
|
1236
1239
|
width: h,
|
|
1237
1240
|
colSpan: u,
|
|
1238
|
-
columnIndex:
|
|
1241
|
+
columnIndex: a
|
|
1239
1242
|
}, s.push(i);
|
|
1240
1243
|
}), this.$props.columnVirtualization) {
|
|
1241
|
-
const r = this.scrollLeftRef || 0,
|
|
1244
|
+
const r = this.scrollLeftRef || 0, a = this.tableWidth || parseFloat((((n = this.$attrs.style) == null ? void 0 : n.width) || "").toString());
|
|
1242
1245
|
return Ss({
|
|
1243
1246
|
cellModels: s,
|
|
1244
1247
|
columns: t,
|
|
1245
|
-
tableViewPortWidth:
|
|
1248
|
+
tableViewPortWidth: a,
|
|
1246
1249
|
scrollLeft: r
|
|
1247
1250
|
});
|
|
1248
1251
|
}
|
|
@@ -1273,7 +1276,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1273
1276
|
if (!t || !e)
|
|
1274
1277
|
return "none";
|
|
1275
1278
|
const o = e[t];
|
|
1276
|
-
return s != null && s.some((
|
|
1279
|
+
return s != null && s.some((a) => a[t] === o) ? "top" : i != null && i.some((a) => a[t] === o) ? "bottom" : "none";
|
|
1277
1280
|
},
|
|
1278
1281
|
handleRowPin(e, t) {
|
|
1279
1282
|
var u, p, c, f;
|
|
@@ -1281,27 +1284,27 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1281
1284
|
return;
|
|
1282
1285
|
const {
|
|
1283
1286
|
dataItemKey: s = ""
|
|
1284
|
-
} = this.$props, i = ((u = this.gridStateContext.pinnedTopRows) == null ? void 0 : u.value) || [], o = ((p = this.gridStateContext.pinnedBottomRows) == null ? void 0 : p.value) || [], n = t[s], r = i.filter((m) => m[s] !== n),
|
|
1287
|
+
} = this.$props, i = ((u = this.gridStateContext.pinnedTopRows) == null ? void 0 : u.value) || [], o = ((p = this.gridStateContext.pinnedBottomRows) == null ? void 0 : p.value) || [], n = t[s], r = i.filter((m) => m[s] !== n), a = o.filter((m) => m[s] !== n);
|
|
1285
1288
|
let h;
|
|
1286
1289
|
switch (e) {
|
|
1287
1290
|
case "pinTop":
|
|
1288
1291
|
h = {
|
|
1289
1292
|
pinnedTopRows: [...r, t],
|
|
1290
|
-
pinnedBottomRows:
|
|
1293
|
+
pinnedBottomRows: a,
|
|
1291
1294
|
dataItem: t
|
|
1292
1295
|
};
|
|
1293
1296
|
break;
|
|
1294
1297
|
case "pinBottom":
|
|
1295
1298
|
h = {
|
|
1296
1299
|
pinnedTopRows: r,
|
|
1297
|
-
pinnedBottomRows: [...
|
|
1300
|
+
pinnedBottomRows: [...a, t],
|
|
1298
1301
|
dataItem: t
|
|
1299
1302
|
};
|
|
1300
1303
|
break;
|
|
1301
1304
|
case "unpin":
|
|
1302
1305
|
h = {
|
|
1303
1306
|
pinnedTopRows: r,
|
|
1304
|
-
pinnedBottomRows:
|
|
1307
|
+
pinnedBottomRows: a,
|
|
1305
1308
|
dataItem: t
|
|
1306
1309
|
};
|
|
1307
1310
|
break;
|
|
@@ -1341,7 +1344,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1341
1344
|
};
|
|
1342
1345
|
},
|
|
1343
1346
|
setup(e) {
|
|
1344
|
-
const t = R(null), s = R(null), i = R(null), o = R(null), n = R(null), r = R(null),
|
|
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), x = R(null), C = R(null), v = R(!0), $ = R(!1), w = new ss(), I = R(0), z = It(bs, {}), X = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, Y = typeof e.groupable == "object" && !!e.groupable.stickyFooters, P = R([]), Q = _e(() => {
|
|
1345
1348
|
var K, W;
|
|
1346
1349
|
return !!((W = (K = z.group) == null ? void 0 : K.value) != null && W.length);
|
|
1347
1350
|
}), V = null, D = R(void 0), T = R({
|
|
@@ -1361,7 +1364,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1361
1364
|
rowHeight: e.rowHeight,
|
|
1362
1365
|
isGrouped: Q,
|
|
1363
1366
|
virtualSkipRef: I,
|
|
1364
|
-
rowHeightServiceRef: _e(() =>
|
|
1367
|
+
rowHeightServiceRef: _e(() => w == null ? void 0 : w.rowHeightService)
|
|
1365
1368
|
});
|
|
1366
1369
|
return {
|
|
1367
1370
|
rowIndexRef: D,
|
|
@@ -1373,14 +1376,14 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1373
1376
|
headerRef: o,
|
|
1374
1377
|
footerRef: n,
|
|
1375
1378
|
gridNavRef: r,
|
|
1376
|
-
colGroupRef:
|
|
1379
|
+
colGroupRef: a,
|
|
1377
1380
|
scrollContainerRef: p,
|
|
1378
1381
|
tableBodyRef: C,
|
|
1379
1382
|
gridStateContext: z,
|
|
1380
|
-
shouldUpdateLeftRightRef:
|
|
1383
|
+
shouldUpdateLeftRightRef: v,
|
|
1381
1384
|
resizedRef: $,
|
|
1382
1385
|
currentColumnsState: e.columnsState,
|
|
1383
|
-
vsRef:
|
|
1386
|
+
vsRef: w,
|
|
1384
1387
|
virtualSkipRef: I,
|
|
1385
1388
|
stickyHeaderItems: h,
|
|
1386
1389
|
stickyHeaderRef: c,
|
|
@@ -1394,8 +1397,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1394
1397
|
};
|
|
1395
1398
|
},
|
|
1396
1399
|
render() {
|
|
1397
|
-
var Ce, be, Se, Ie, xe, $e,
|
|
1398
|
-
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 = (Ie = this.gridStateContext.select) == null ? void 0 : Ie.value, o = (xe = this.gridStateContext.skip) == null ? void 0 : xe.value, n = ($e = this.gridStateContext.take) == null ? void 0 : $e.value, r = (
|
|
1400
|
+
var Ce, be, Se, Ie, xe, $e, ve, we, ye, ke, He, Te, Me, Ee, Pe, ze, De, Ge;
|
|
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 = (Ie = this.gridStateContext.select) == null ? void 0 : Ie.value, o = (xe = this.gridStateContext.skip) == null ? void 0 : xe.value, n = ($e = this.gridStateContext.take) == null ? void 0 : $e.value, r = (ve = this.gridStateContext.group) == null ? void 0 : ve.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);
|
|
1399
1402
|
let m;
|
|
1400
1403
|
this.currentColumnsState = (ke = this.gridStateContext.columnsState) == null ? void 0 : ke.value;
|
|
1401
1404
|
const x = this.$props.autoProcessData === !0 ? {
|
|
@@ -1406,21 +1409,21 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1406
1409
|
page: !0
|
|
1407
1410
|
} : this.$props.autoProcessData;
|
|
1408
1411
|
let C;
|
|
1409
|
-
const
|
|
1412
|
+
const v = E.getIdPrefix(this.navigation);
|
|
1410
1413
|
let $ = [];
|
|
1411
|
-
Array.isArray(this.$props.dataItems) ? ($ = this.$props.dataItems, C = (He = this.$props.total) != null ? He : $.length) : ($ = ((Te =
|
|
1412
|
-
const
|
|
1413
|
-
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable =
|
|
1414
|
+
Array.isArray(this.$props.dataItems) ? ($ = this.$props.dataItems, C = (He = this.$props.total) != null ? He : $.length) : ($ = ((Te = as(this.$props.dataItems, this.$props.collapsedGroups.length ? this.computedCollapsed : [], this.$props.uniqueField)) == null ? void 0 : Te.data) || [], C = (Pe = (Ee = this.$props.total) != null ? Ee : (Me = this.$props.dataItems) == null ? void 0 : Me.total) != null ? Pe : $.length);
|
|
1415
|
+
const w = this.$props.groupable === !0 || q(this.$props.groupable) && this.$props.groupable.enabled !== !1;
|
|
1416
|
+
this.dragLogic.reorderable = this.$props.reorderable || !1, this.dragLogic.groupable = w, this._virtualPageSize = this.calcVirtualPageSize();
|
|
1414
1417
|
const I = $.length === C, z = q(this.$props.groupable) && this.$props.groupable.footer || "none";
|
|
1415
1418
|
if (x) {
|
|
1416
|
-
const
|
|
1419
|
+
const l = x.page && !(this.isVirtualScroll && !this.$props.pageable), {
|
|
1417
1420
|
data: b,
|
|
1418
1421
|
total: k
|
|
1419
1422
|
} = Cs($, {
|
|
1420
1423
|
group: x.group ? r : void 0,
|
|
1421
1424
|
sort: x.sort ? e : void 0,
|
|
1422
1425
|
filter: Mt(x.filter ? t : void 0, x.search ? s : void 0),
|
|
1423
|
-
...
|
|
1426
|
+
...l ? {
|
|
1424
1427
|
take: this.$props.pageable ? n || 10 : n,
|
|
1425
1428
|
skip: o || 0
|
|
1426
1429
|
} : {}
|
|
@@ -1430,24 +1433,24 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1430
1433
|
const {
|
|
1431
1434
|
resolvedGroupsCount: X,
|
|
1432
1435
|
flattedData: Y
|
|
1433
|
-
} = this.getFlatData($, z, I ? 0 : this.$props.skip || 0, r, h,
|
|
1436
|
+
} = this.getFlatData($, z, I ? 0 : this.$props.skip || 0, r, h, a, this.$props.dataItemKey);
|
|
1434
1437
|
this.dataRef = Y;
|
|
1435
1438
|
const P = this.virtualSkipRef || 0;
|
|
1436
1439
|
if (this._virtualTotal = C, this.isVirtualScroll) {
|
|
1437
|
-
let
|
|
1438
|
-
if ((f || this.$props.pageable) && (
|
|
1440
|
+
let l = o || 0;
|
|
1441
|
+
if ((f || this.$props.pageable) && (l = P, this._virtualTotal = this.dataRef.length), I || f || this.$props.pageable)
|
|
1439
1442
|
if (this._virtualPageSize === 0) {
|
|
1440
1443
|
const b = Math.min(n || this.$props.pageSize || 20, this.dataRef.length);
|
|
1441
|
-
m = this.dataRef.slice(
|
|
1444
|
+
m = this.dataRef.slice(l, l + b);
|
|
1442
1445
|
} else
|
|
1443
|
-
m = this.dataRef.slice(
|
|
1446
|
+
m = this.dataRef.slice(l, l + this._virtualPageSize);
|
|
1444
1447
|
}
|
|
1445
1448
|
this.initializeVirtualization();
|
|
1446
1449
|
const Q = (De = this.selectable) != null && De.drag ? "none" : void 0;
|
|
1447
1450
|
this.initColumns(this.$props.dataItems, X), this.columnResize.resizable = this.$props.resizable || !1, this.columnResize.columns = this.columnsRef, this.columnResize.columnsState = xt(this.currentColumnsState || []), this.dragLogic.columns = this.columnsRef;
|
|
1448
|
-
const V = this.$props.toolbar, D = this.$props.noRecords, T = this.columnsRef.filter((
|
|
1449
|
-
ref: (
|
|
1450
|
-
this.groupPanelDivRef =
|
|
1451
|
+
const V = this.$props.toolbar, D = this.$props.noRecords, T = this.columnsRef.filter((l) => l.children.length === 0), O = w && d(Yt, {
|
|
1452
|
+
ref: (l) => {
|
|
1453
|
+
this.groupPanelDivRef = l;
|
|
1451
1454
|
},
|
|
1452
1455
|
group: r || [],
|
|
1453
1456
|
ariaControls: this._gridRoleElementId,
|
|
@@ -1457,31 +1460,31 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1457
1460
|
onReleaseHandler: this.dragLogic.releaseHandler,
|
|
1458
1461
|
resolveTitle: this.resolveTitle
|
|
1459
1462
|
}, null), N = (this.dragLogic.reorderable || this.dragLogic.groupable) && B && document && document.body, K = [N && d(rs, {
|
|
1460
|
-
ref: (
|
|
1461
|
-
this.dropElementClueRef =
|
|
1463
|
+
ref: (l) => {
|
|
1464
|
+
this.dropElementClueRef = l;
|
|
1462
1465
|
}
|
|
1463
1466
|
}, null), N && d(ns, {
|
|
1464
|
-
ref: (
|
|
1465
|
-
this.dragElementClueRef =
|
|
1467
|
+
ref: (l) => {
|
|
1468
|
+
this.dragElementClueRef = l;
|
|
1466
1469
|
}
|
|
1467
1470
|
}, null)], W = this.showLicenseWatermark ? d($t, {
|
|
1468
1471
|
message: this.licenseMessage
|
|
1469
1472
|
}, null) : null, Z = this.$attrs.style, ht = Z && q(Z) && Z["width"] || "";
|
|
1470
1473
|
this.tableWidth = parseFloat(ht.toString());
|
|
1471
|
-
const ct = T.findIndex((
|
|
1474
|
+
const ct = T.findIndex((l) => typeof l.colSpan == "function") > -1;
|
|
1472
1475
|
let U;
|
|
1473
1476
|
U = this.getCellsToRender({}, T);
|
|
1474
|
-
const G = T.map(function(
|
|
1477
|
+
const G = T.map(function(l, b) {
|
|
1475
1478
|
return d("col", {
|
|
1476
|
-
key:
|
|
1477
|
-
width:
|
|
1479
|
+
key: l.id || `col-${b}`,
|
|
1480
|
+
width: l.width !== void 0 ? Math.floor(parseFloat(l.width.toString())) : void 0
|
|
1478
1481
|
}, null);
|
|
1479
1482
|
}, this), pe = d(qt, {
|
|
1480
1483
|
size: this.$props.size,
|
|
1481
1484
|
columnResize: this.columnResize,
|
|
1482
1485
|
staticHeaders: this.$props.scrollable !== "none",
|
|
1483
|
-
ref: (
|
|
1484
|
-
this.headerRef =
|
|
1486
|
+
ref: (l) => {
|
|
1487
|
+
this.headerRef = l;
|
|
1485
1488
|
},
|
|
1486
1489
|
onHeaderscroll: this.onHeaderScroll,
|
|
1487
1490
|
headerRow: d(Jt, {
|
|
@@ -1512,7 +1515,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1512
1515
|
cells: this.$props.cells,
|
|
1513
1516
|
isRtl: this.isRtl,
|
|
1514
1517
|
isColCountDefined: this.getAriaColCount !== void 0,
|
|
1515
|
-
headerSelectionValue: !!(i && this.dataRef.filter((
|
|
1518
|
+
headerSelectionValue: !!(i && this.dataRef.filter((l) => l.rowType === "data").every((l) => i && this.$props.dataItemKey && M(this.$props.dataItemKey)(l.dataItem) !== void 0 ? i[M(this.$props.dataItemKey)(l.dataItem)] : void 0)),
|
|
1516
1519
|
filterRow: this.$props.filterable && d(Xt, {
|
|
1517
1520
|
grid: this,
|
|
1518
1521
|
size: this.$props.size,
|
|
@@ -1531,15 +1534,15 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1531
1534
|
}, null) || void 0
|
|
1532
1535
|
}, null),
|
|
1533
1536
|
cols: G
|
|
1534
|
-
}, null), ue = this.columnsRef.some((
|
|
1537
|
+
}, null), ue = this.columnsRef.some((l) => {
|
|
1535
1538
|
var b;
|
|
1536
|
-
return !!(
|
|
1539
|
+
return !!(l.footerCell || (b = l.cells) != null && b.footerCell);
|
|
1537
1540
|
}) || (Ge = this.$props.cells) != null && Ge.footerCell ? d(Qt, {
|
|
1538
1541
|
size: this.$props.size,
|
|
1539
1542
|
columnResize: this.columnResize,
|
|
1540
1543
|
staticHeaders: this.$props.scrollable !== "none",
|
|
1541
|
-
ref: (
|
|
1542
|
-
this.footerRef =
|
|
1544
|
+
ref: (l) => {
|
|
1545
|
+
this.footerRef = l;
|
|
1543
1546
|
},
|
|
1544
1547
|
row: d(Zt, {
|
|
1545
1548
|
isRtl: this.isRtl,
|
|
@@ -1572,15 +1575,15 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1572
1575
|
uniqueField: this.$props.uniqueField,
|
|
1573
1576
|
columnsRef: this.columnsRef,
|
|
1574
1577
|
isRtl: this.isRtl,
|
|
1575
|
-
idPrefix:
|
|
1576
|
-
}, pt = function(
|
|
1577
|
-
return Is(_,
|
|
1578
|
+
idPrefix: v
|
|
1579
|
+
}, pt = function(l, b, k, oe, ne) {
|
|
1580
|
+
return Is(_, l, b, k, oe, ne);
|
|
1578
1581
|
};
|
|
1579
1582
|
let ut = 0, ee = [];
|
|
1580
|
-
const te = !this.dataRef.length, fe = (
|
|
1583
|
+
const te = !this.dataRef.length, fe = (l) => l >= this.dataRef.length - ut;
|
|
1581
1584
|
let se = 0;
|
|
1582
1585
|
if (this.dataRef.length) {
|
|
1583
|
-
const
|
|
1586
|
+
const l = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;
|
|
1584
1587
|
let b = this.$props.skip || 0, k = -1, oe = 0;
|
|
1585
1588
|
const ne = this.computedRowSpannable.enabled ? {} : void 0;
|
|
1586
1589
|
if (this.isVirtualScroll) {
|
|
@@ -1592,13 +1595,13 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1592
1595
|
}
|
|
1593
1596
|
ee = (m || this.dataRef).map(function(g, A) {
|
|
1594
1597
|
g.rowType === "data" && k++;
|
|
1595
|
-
const re = g.dataIndex % 2 !== 0, Fe = this.$props.dataItemKey && M(this.$props.dataItemKey)(g.dataItem),
|
|
1596
|
-
return se =
|
|
1597
|
-
key:
|
|
1598
|
+
const re = g.dataIndex % 2 !== 0, Fe = this.$props.dataItemKey && M(this.$props.dataItemKey)(g.dataItem), ae = A + b, le = Fe || "ai" + ae, de = le + "_1", j = pt.call(this, g, le, k, 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
|
+
return se = ae + l + oe, [d(gs, {
|
|
1600
|
+
key: le,
|
|
1598
1601
|
item: g,
|
|
1599
1602
|
dataIndex: k,
|
|
1600
1603
|
ariaRowIndex: se,
|
|
1601
|
-
absoluteRowIndex:
|
|
1604
|
+
absoluteRowIndex: ae,
|
|
1602
1605
|
isAltRow: re,
|
|
1603
1606
|
isHidden: fe(A),
|
|
1604
1607
|
rowHeight: this.$props.rowHeight,
|
|
@@ -1634,14 +1637,14 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1634
1637
|
group: g.group
|
|
1635
1638
|
}, null);
|
|
1636
1639
|
}, this), (this.$props.expandField || this.detailExpandable.enabled) && d(Ut, {
|
|
1637
|
-
id: E.generateNavigatableId(`${de}-dhcell`,
|
|
1640
|
+
id: E.generateNavigatableId(`${de}-dhcell`, v)
|
|
1638
1641
|
}, null), d(jt, {
|
|
1639
1642
|
dataItem: g.dataItem,
|
|
1640
1643
|
dataIndex: g.dataIndex,
|
|
1641
1644
|
colSpan: Ct,
|
|
1642
1645
|
ariaColIndex: 2 + (r ? r.length : 0),
|
|
1643
1646
|
detail: this.$props.detail ? this.$props.detail : void 0,
|
|
1644
|
-
id: E.generateNavigatableId(`${de}-dcell`,
|
|
1647
|
+
id: E.generateNavigatableId(`${de}-dcell`, v)
|
|
1645
1648
|
}, null)])];
|
|
1646
1649
|
}, this);
|
|
1647
1650
|
}
|
|
@@ -1668,13 +1671,13 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1668
1671
|
pagesizechange: this.pageChangeHandler,
|
|
1669
1672
|
pagechange: this.pageChangeHandler
|
|
1670
1673
|
}
|
|
1671
|
-
}), mt = (
|
|
1674
|
+
}), mt = (l) => e && e.filter((b) => b.field === l).length > 0, ge = d("colgroup", {
|
|
1672
1675
|
ref: y(this, "colGroup")
|
|
1673
|
-
}, [T.map(function(
|
|
1676
|
+
}, [T.map(function(l, b) {
|
|
1674
1677
|
return d("col", {
|
|
1675
|
-
key:
|
|
1676
|
-
class: mt(
|
|
1677
|
-
width:
|
|
1678
|
+
key: l.id || `col-${b}`,
|
|
1679
|
+
class: mt(l.field) ? "k-sorted" : void 0,
|
|
1680
|
+
width: l.width !== void 0 ? l.width.toString().indexOf("%") !== -1 ? l.width : Math.floor(parseFloat(l.width.toString())) + "px" : void 0
|
|
1678
1681
|
}, null);
|
|
1679
1682
|
}, this)]), Re = {
|
|
1680
1683
|
height: this.getCorrectHeight,
|
|
@@ -1706,8 +1709,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1706
1709
|
columnVirtualization: this.$props.columnVirtualization
|
|
1707
1710
|
}, {
|
|
1708
1711
|
default: () => [d(Je, {
|
|
1709
|
-
ref: (
|
|
1710
|
-
this.gridNavRef =
|
|
1712
|
+
ref: (l) => {
|
|
1713
|
+
this.gridNavRef = l;
|
|
1711
1714
|
},
|
|
1712
1715
|
columnsRef: this.columnsRef,
|
|
1713
1716
|
dataRef: this.dataRef,
|
|
@@ -1718,7 +1721,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1718
1721
|
onMovetonextpage: this.moveToNextPage,
|
|
1719
1722
|
onMovetoprevpage: this.moveToPrevPage,
|
|
1720
1723
|
onColumnreorder: this.columnReorder,
|
|
1721
|
-
onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler
|
|
1724
|
+
onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler,
|
|
1725
|
+
onNavigationaction: this.navigationActionHandler
|
|
1722
1726
|
}, {
|
|
1723
1727
|
default: () => [V, O, d("div", {
|
|
1724
1728
|
role: "grid",
|
|
@@ -1737,7 +1741,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1737
1741
|
ref: y(this, "tableBody")
|
|
1738
1742
|
}, [ee, St(" "), ie]), ue]
|
|
1739
1743
|
}), te && d(ot, {
|
|
1740
|
-
id: E.generateNavigatableId("no-records",
|
|
1744
|
+
id: E.generateNavigatableId("no-records", v)
|
|
1741
1745
|
}, {
|
|
1742
1746
|
default: () => [D.length ? D : d(it, null, null)]
|
|
1743
1747
|
})]), me, ie, K]
|
|
@@ -1750,8 +1754,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1750
1754
|
columnVirtualization: this.$props.columnVirtualization
|
|
1751
1755
|
}, {
|
|
1752
1756
|
default: () => [d(Je, {
|
|
1753
|
-
ref: (
|
|
1754
|
-
this.gridNavRef =
|
|
1757
|
+
ref: (l) => {
|
|
1758
|
+
this.gridNavRef = l;
|
|
1755
1759
|
},
|
|
1756
1760
|
dataRef: this.dataRef,
|
|
1757
1761
|
id: this.$props.id,
|
|
@@ -1762,7 +1766,8 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1762
1766
|
onMovetoprevpage: this.moveToPrevPage,
|
|
1763
1767
|
onColumnreorder: this.columnReorder,
|
|
1764
1768
|
onKeyboardselectionchange: this.onKeyboardSelectionChangeHandler,
|
|
1765
|
-
onSetcurrentontop: this.setCurrentOnTop
|
|
1769
|
+
onSetcurrentontop: this.setCurrentOnTop,
|
|
1770
|
+
onNavigationaction: this.navigationActionHandler
|
|
1766
1771
|
}, {
|
|
1767
1772
|
default: () => [V, O, d("div", {
|
|
1768
1773
|
role: "grid",
|
|
@@ -1770,7 +1775,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1770
1775
|
id: this._gridRoleElementId,
|
|
1771
1776
|
"aria-colcount": this.getAriaColCount,
|
|
1772
1777
|
"aria-rowcount": this.getAriaRowCount
|
|
1773
|
-
}, [pe, this.hasPinnedTopRows && d(
|
|
1778
|
+
}, [pe, this.hasPinnedTopRows && d(lt, {
|
|
1774
1779
|
ref: y(this, "pinnedTop"),
|
|
1775
1780
|
size: this.$props.size,
|
|
1776
1781
|
cols: G,
|
|
@@ -1783,7 +1788,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1783
1788
|
}, null), d("div", {
|
|
1784
1789
|
class: "k-grid-container",
|
|
1785
1790
|
role: "presentation"
|
|
1786
|
-
}, [f && p && d(
|
|
1791
|
+
}, [f && p && d(at, {
|
|
1787
1792
|
ref: y(this, "stickyHeader"),
|
|
1788
1793
|
size: this.$props.size,
|
|
1789
1794
|
cols: G,
|
|
@@ -1814,7 +1819,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1814
1819
|
ref: y(this, "tableBody")
|
|
1815
1820
|
}, [ee])]
|
|
1816
1821
|
}), te && d(ot, {
|
|
1817
|
-
id: E.generateNavigatableId("no-records",
|
|
1822
|
+
id: E.generateNavigatableId("no-records", v)
|
|
1818
1823
|
}, {
|
|
1819
1824
|
default: () => [D.length ? D : d(it, null, null)]
|
|
1820
1825
|
})]), !te && d("div", {
|
|
@@ -1825,7 +1830,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1825
1830
|
style: this.$props.scrollable === "virtual" ? {
|
|
1826
1831
|
height: this._containerHeightRef + "px"
|
|
1827
1832
|
} : {}
|
|
1828
|
-
}, null)])]), f && c && d(
|
|
1833
|
+
}, null)])]), f && c && d(at, {
|
|
1829
1834
|
ref: y(this, "stickyFooter"),
|
|
1830
1835
|
size: this.$props.size,
|
|
1831
1836
|
cols: G,
|
|
@@ -1833,7 +1838,7 @@ const Ri = /* @__PURE__ */ bt({
|
|
|
1833
1838
|
position: "bottom",
|
|
1834
1839
|
groupLevelCount: u,
|
|
1835
1840
|
rowHeight: this.$props.rowHeight
|
|
1836
|
-
}, null)]), this.hasPinnedBottomRows && d(
|
|
1841
|
+
}, null)]), this.hasPinnedBottomRows && d(lt, {
|
|
1837
1842
|
ref: y(this, "pinnedBottom"),
|
|
1838
1843
|
size: this.$props.size,
|
|
1839
1844
|
cols: G,
|