@progress/kendo-vue-grid 8.1.0-develop.5 → 8.1.0-develop.6
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 +30 -17
- package/Grid.js +1 -1
- package/Grid.mjs +567 -449
- package/GridState.d.ts +15 -1
- package/GridState.js +1 -1
- package/GridState.mjs +84 -71
- package/RootGrid.d.ts +10 -0
- package/cells/GridCell.d.ts +2 -0
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +35 -30
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +20 -20
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +42 -37
- package/cells/GridGroupCell.d.ts +2 -0
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +69 -55
- package/cells/GridHierarchyCell.d.ts +2 -0
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +51 -41
- package/cells/GridSelectionCell.d.ts +2 -0
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +35 -24
- package/cells/pincell/GridPinCell.d.ts +72 -0
- package/cells/pincell/GridPinCell.js +8 -0
- package/cells/pincell/GridPinCell.mjs +111 -0
- package/cells/pincell/GridPinDropdownButton.d.ts +27 -0
- package/cells/pincell/GridPinDropdownButton.js +8 -0
- package/cells/pincell/GridPinDropdownButton.mjs +111 -0
- package/common.d.ts +5 -0
- package/common.js +1 -1
- package/common.mjs +7 -2
- package/components/PinnedRowsTable.d.ts +63 -0
- package/components/PinnedRowsTable.js +8 -0
- package/components/PinnedRowsTable.mjs +141 -0
- package/components/StickyGroupTable.d.ts +0 -1
- package/components/StickyGroupTable.js +1 -1
- package/components/StickyGroupTable.mjs +24 -30
- package/constants/main.d.ts +15 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/drag/ColumnResize.d.ts +2 -0
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +139 -123
- package/footer/FooterCell.js +1 -1
- package/footer/FooterCell.mjs +22 -20
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +50 -48
- package/header/FilterRow.d.ts +4 -0
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +52 -50
- package/header/HeaderRow.d.ts +4 -0
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +114 -105
- package/index.js +1 -1
- package/index.mjs +15 -14
- package/interfaces/ColumnType.d.ts +1 -1
- package/interfaces/GridCellProps.d.ts +5 -0
- package/interfaces/GridCellsSettings.d.ts +23 -0
- package/interfaces/GridColumnProps.d.ts +2 -2
- package/interfaces/GridProps.d.ts +88 -31
- package/interfaces/GridRowProps.d.ts +13 -4
- package/interfaces/GridRowsSettings.d.ts +48 -0
- package/interfaces/events.d.ts +19 -2
- package/messages/main.d.ts +30 -0
- package/messages/main.js +2 -2
- package/messages/main.mjs +108 -96
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -12
- package/rows/GridRow.d.ts +4 -10
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +24 -23
- package/utils/main.d.ts +5 -0
- package/utils/main.js +1 -1
- package/utils/main.mjs +199 -167
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +121 -105
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as k, createVNode as s, mergeProps as G, inject as P, computed as a, ref as j } from "vue";
|
|
9
|
+
import { setRef as c, classNames as f, uGrid as u, getter as x, getRef as l } from "@progress/kendo-vue-common";
|
|
10
|
+
import { TableSelection as K, tableKeyboardNavigationTopPinnedAttributes as z, tableKeyboardNavigationBottomPinnedAttributes as B } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { provideLocalizationService as R } from "@progress/kendo-vue-intl";
|
|
12
|
+
import { GridRow as E } from "../rows/GridRow.mjs";
|
|
13
|
+
import { getRowContents as H } from "../getRowContents.mjs";
|
|
14
|
+
import { pinnedTopRowsAriaLabel as p, messages as h, pinnedBottomRowsAriaLabel as w } from "../messages/main.mjs";
|
|
15
|
+
const J = /* @__PURE__ */ k({
|
|
16
|
+
name: "PinnedRowsTable",
|
|
17
|
+
props: {
|
|
18
|
+
size: String,
|
|
19
|
+
cols: Array,
|
|
20
|
+
dataRowContext: Object,
|
|
21
|
+
position: String,
|
|
22
|
+
pinnedItems: Array,
|
|
23
|
+
rowHeight: Number,
|
|
24
|
+
rows: Object,
|
|
25
|
+
selectable: Object
|
|
26
|
+
},
|
|
27
|
+
inject: {
|
|
28
|
+
gridContext: {
|
|
29
|
+
default: () => ({})
|
|
30
|
+
},
|
|
31
|
+
kendoLocalizationService: {
|
|
32
|
+
default: null
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
mounted() {
|
|
36
|
+
this.tableRef = l(this, "table"), this.colGroupRefEl = l(this, "colGroup");
|
|
37
|
+
},
|
|
38
|
+
updated() {
|
|
39
|
+
this.tableRef = l(this, "table"), this.colGroupRefEl = l(this, "colGroup");
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
setWidth(e) {
|
|
43
|
+
const n = l(this, "table");
|
|
44
|
+
n && (n.style.width = e ? e + "px" : "");
|
|
45
|
+
},
|
|
46
|
+
setScrollLeft(e) {
|
|
47
|
+
const n = l(this, "pinnedRef");
|
|
48
|
+
n && n.scrollLeft !== e && (n.scrollLeft = e);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
setup(e) {
|
|
52
|
+
const n = P("kendo", {}), d = a(() => e.position === "top"), g = a(() => d.value ? n.pinnedTopRef : n.pinnedBottomRef), S = j(!1), y = (o) => {
|
|
53
|
+
const t = n.containerElementRef;
|
|
54
|
+
if (!t || S.value)
|
|
55
|
+
return;
|
|
56
|
+
const i = o.currentTarget.scrollLeft;
|
|
57
|
+
t.scrollLeft !== i && (t.scrollLeft = i);
|
|
58
|
+
}, I = a(() => {
|
|
59
|
+
var o;
|
|
60
|
+
return (o = e.rows) != null && o.pinnedData ? {
|
|
61
|
+
...e.rows,
|
|
62
|
+
data: e.rows.pinnedData
|
|
63
|
+
} : e.rows;
|
|
64
|
+
}), L = a(() => !e.pinnedItems || !e.dataRowContext ? [] : e.pinnedItems.map((o, t) => {
|
|
65
|
+
const i = {
|
|
66
|
+
dataItem: o,
|
|
67
|
+
rowType: "data",
|
|
68
|
+
level: 0,
|
|
69
|
+
expanded: !1,
|
|
70
|
+
dataIndex: t
|
|
71
|
+
}, r = e.dataRowContext.dataItemKey, b = "pinned_" + ((r ? x(r)(o) : void 0) || "ai" + t), m = H(e.dataRowContext, i, b, t);
|
|
72
|
+
return s(E, {
|
|
73
|
+
key: b,
|
|
74
|
+
rowType: "data",
|
|
75
|
+
item: i,
|
|
76
|
+
dataIndex: t,
|
|
77
|
+
ariaRowIndex: t + 1,
|
|
78
|
+
absoluteRowIndex: t,
|
|
79
|
+
isAltRow: t % 2 !== 0,
|
|
80
|
+
isHidden: !1,
|
|
81
|
+
rowHeight: e.rowHeight,
|
|
82
|
+
isSelected: m.isSelected
|
|
83
|
+
}, {
|
|
84
|
+
default: () => [m.row]
|
|
85
|
+
});
|
|
86
|
+
})), T = a(() => f("k-grid-pinned-container", {
|
|
87
|
+
"k-pos-bottom": !d.value
|
|
88
|
+
})), v = a(() => f(u.table({
|
|
89
|
+
size: e.size
|
|
90
|
+
}))), C = (o) => {
|
|
91
|
+
var i, r;
|
|
92
|
+
const t = (i = e.pinnedItems) == null ? void 0 : i[o.startRowIndex];
|
|
93
|
+
t && ((r = n.pinnedSelectionRelease) == null || r.call(n, o, t));
|
|
94
|
+
}, A = a(() => e.selectable ? {
|
|
95
|
+
...typeof e.selectable == "object" ? e.selectable : {},
|
|
96
|
+
enabled: !0,
|
|
97
|
+
drag: !1
|
|
98
|
+
} : e.selectable), N = a(() => d.value ? z : B);
|
|
99
|
+
return {
|
|
100
|
+
isTop: d,
|
|
101
|
+
pinnedRef: g,
|
|
102
|
+
handlePinnedScroll: y,
|
|
103
|
+
rowTemplateSettings: I,
|
|
104
|
+
pinnedRows: L,
|
|
105
|
+
containerClassName: T,
|
|
106
|
+
tableClassName: v,
|
|
107
|
+
handleSelectionRelease: C,
|
|
108
|
+
pinnedSelectable: A,
|
|
109
|
+
pinnedBodyAttributes: N
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
render() {
|
|
113
|
+
return s("div", {
|
|
114
|
+
class: this.containerClassName,
|
|
115
|
+
role: "presentation",
|
|
116
|
+
style: {
|
|
117
|
+
display: this.pinnedRows.length ? "" : "none"
|
|
118
|
+
}
|
|
119
|
+
}, [s("div", {
|
|
120
|
+
class: "k-grid-pinned-wrap",
|
|
121
|
+
ref: c(this, "pinnedRef"),
|
|
122
|
+
onScroll: this.handlePinnedScroll
|
|
123
|
+
}, [s(K, {
|
|
124
|
+
selectable: this.pinnedSelectable,
|
|
125
|
+
onRelease: this.handleSelectionRelease
|
|
126
|
+
}, {
|
|
127
|
+
default: () => [s("table", {
|
|
128
|
+
ref: c(this, "table"),
|
|
129
|
+
class: this.tableClassName,
|
|
130
|
+
"aria-label": this.isTop ? R(this).toLanguageString(p, h[p]) : R(this).toLanguageString(w, h[w])
|
|
131
|
+
}, [s("colgroup", {
|
|
132
|
+
ref: c(this, "colGroup")
|
|
133
|
+
}, [this.$props.cols]), s("tbody", G({
|
|
134
|
+
class: f(u.tbody({}))
|
|
135
|
+
}, this.pinnedBodyAttributes), [this.pinnedRows])])]
|
|
136
|
+
})])]);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
export {
|
|
140
|
+
J as PinnedRowsTable
|
|
141
|
+
};
|
|
@@ -64,7 +64,6 @@ export declare const StickyGroupTable: import('vue').DefineComponent<import('vue
|
|
|
64
64
|
}, {
|
|
65
65
|
setWidth(width: number): void;
|
|
66
66
|
setScrollLeft(scrollLeft: number): void;
|
|
67
|
-
renderRows(): any;
|
|
68
67
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
69
68
|
size: StringConstructor;
|
|
70
69
|
items: ArrayConstructor;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),e=require("@progress/kendo-vue-common"),c=require("../rows/GridRow.js"),d=require("../getRowContents.js"),u=o.defineComponent({name:"StickyGroupTable",props:{size:String,items:Array,cols:Array,dataRowContext:{type:Object,required:!0},position:{type:String,required:!0},isStackedMode:Boolean,groupLevelCount:Number,rowHeight:Number},inject:{sticky:{default:null}},mounted(){this.tableRef=e.getRef(this,"table"),this.colGroupRef=e.getRef(this,"colGroup")},updated(){this.tableRef=e.getRef(this,"table"),this.colGroupRef=e.getRef(this,"colGroup")},computed:{isTop(){return this.position==="top"},stickyItems(){return this.isTop?this.sticky.headerItems||[]:this.sticky.footerItems||[]},hasContent(){return this.stickyItems.length>0},containerClassName(){return e.classNames(e.uGrid.stickyContainer({bottom:!this.isTop}))},tableClassName(){return e.classNames(e.uGrid.table({size:this.size}))}},methods:{setWidth(s){const t=e.getRef(this,"tableRef");t&&(t.style.width=s?s+"px":"")},setScrollLeft(s){const t=this.$el;t&&t.scrollLeft!==s&&(t.scrollLeft=s)}},render(){return o.createVNode("div",{class:this.containerClassName},[o.createVNode("table",{ref:e.setRef(this,"table"),class:this.tableClassName},[o.createVNode("colgroup",{ref:e.setRef(this,"colGroup")},[this.$props.cols]),o.createVNode("tbody",{class:e.classNames(e.uGrid.tbody({}))},[this.stickyItems.map((s,t)=>{const{item:i,flatIndex:r}=s,a=this.dataRowContext.dataItemKey&&e.getter(this.dataRowContext.dataItemKey)(i.dataItem)||"ai"+r,n=d.getRowContents(this.dataRowContext,i,a,t),l=this.isTop?"groupHeader":"groupFooter";return o.createVNode(c.GridRow,{key:a,rowType:l,item:i,dataIndex:-1,ariaRowIndex:t,absoluteRowIndex:r,isAltRow:!1,isHidden:!1,rowHeight:this.$props.rowHeight,isSelected:!1,isInEdit:!1},{default:()=>[n.row]})})])])])}});exports.StickyGroupTable=u;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
8
|
+
import { defineComponent as h, createVNode as s } from "vue";
|
|
9
9
|
import { setRef as d, classNames as r, uGrid as a, getter as m, getRef as o } from "@progress/kendo-vue-common";
|
|
10
10
|
import { GridRow as u } from "../rows/GridRow.mjs";
|
|
11
11
|
import { getRowContents as f } from "../getRowContents.mjs";
|
|
12
|
-
const g = /* @__PURE__ */
|
|
12
|
+
const g = /* @__PURE__ */ h({
|
|
13
13
|
name: "StickyGroupTable",
|
|
14
14
|
props: {
|
|
15
15
|
size: String,
|
|
@@ -67,37 +67,11 @@ const g = /* @__PURE__ */ p({
|
|
|
67
67
|
setScrollLeft(e) {
|
|
68
68
|
const t = this.$el;
|
|
69
69
|
t && t.scrollLeft !== e && (t.scrollLeft = e);
|
|
70
|
-
},
|
|
71
|
-
renderRows() {
|
|
72
|
-
return this.stickyItems.map((e, t) => {
|
|
73
|
-
const {
|
|
74
|
-
item: i,
|
|
75
|
-
flatIndex: n
|
|
76
|
-
} = e, l = this.dataRowContext.dataItemKey && m(this.dataRowContext.dataItemKey)(i.dataItem) || "ai" + n, c = f(this.dataRowContext, i, l, t), h = this.isTop ? "groupHeader" : "groupFooter";
|
|
77
|
-
return s(u, {
|
|
78
|
-
key: l,
|
|
79
|
-
rowType: h,
|
|
80
|
-
item: i,
|
|
81
|
-
dataIndex: -1,
|
|
82
|
-
ariaRowIndex: t,
|
|
83
|
-
absoluteRowIndex: n,
|
|
84
|
-
isAltRow: !1,
|
|
85
|
-
isHidden: !1,
|
|
86
|
-
rowHeight: this.$props.rowHeight,
|
|
87
|
-
isSelected: !1,
|
|
88
|
-
isInEdit: !1
|
|
89
|
-
}, {
|
|
90
|
-
default: () => [c.row]
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
70
|
}
|
|
94
71
|
},
|
|
95
72
|
render() {
|
|
96
73
|
return s("div", {
|
|
97
|
-
class: this.containerClassName
|
|
98
|
-
style: {
|
|
99
|
-
display: this.hasContent ? "" : "none"
|
|
100
|
-
}
|
|
74
|
+
class: this.containerClassName
|
|
101
75
|
}, [s("table", {
|
|
102
76
|
ref: d(this, "table"),
|
|
103
77
|
class: this.tableClassName
|
|
@@ -105,7 +79,27 @@ const g = /* @__PURE__ */ p({
|
|
|
105
79
|
ref: d(this, "colGroup")
|
|
106
80
|
}, [this.$props.cols]), s("tbody", {
|
|
107
81
|
class: r(a.tbody({}))
|
|
108
|
-
}, [this.
|
|
82
|
+
}, [this.stickyItems.map((e, t) => {
|
|
83
|
+
const {
|
|
84
|
+
item: i,
|
|
85
|
+
flatIndex: n
|
|
86
|
+
} = e, l = this.dataRowContext.dataItemKey && m(this.dataRowContext.dataItemKey)(i.dataItem) || "ai" + n, c = f(this.dataRowContext, i, l, t), p = this.isTop ? "groupHeader" : "groupFooter";
|
|
87
|
+
return s(u, {
|
|
88
|
+
key: l,
|
|
89
|
+
rowType: p,
|
|
90
|
+
item: i,
|
|
91
|
+
dataIndex: -1,
|
|
92
|
+
ariaRowIndex: t,
|
|
93
|
+
absoluteRowIndex: n,
|
|
94
|
+
isAltRow: !1,
|
|
95
|
+
isHidden: !1,
|
|
96
|
+
rowHeight: this.$props.rowHeight,
|
|
97
|
+
isSelected: !1,
|
|
98
|
+
isInEdit: !1
|
|
99
|
+
}, {
|
|
100
|
+
default: () => [c.row]
|
|
101
|
+
});
|
|
102
|
+
})])])]);
|
|
109
103
|
}
|
|
110
104
|
});
|
|
111
105
|
export {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/** The attribute required by the Grid selection on Grid `tr` elements. */
|
|
9
|
+
export { TABLE_ROW_INDEX_ATTRIBUTE as GRID_ROW_INDEX_ATTRIBUTE } from '@progress/kendo-vue-data-tools';
|
|
10
|
+
/** The attribute required by the Grid selection on Grid `td` elements. */
|
|
11
|
+
export { TABLE_COL_INDEX_ATTRIBUTE as GRID_COL_INDEX_ATTRIBUTE } from '@progress/kendo-vue-data-tools';
|
|
12
|
+
/** Attribute which disable selection start from this element. */
|
|
13
|
+
export { TABLE_PREVENT_SELECTION_ELEMENT as GRID_PREVENT_SELECTION_ELEMENT } from '@progress/kendo-vue-data-tools';
|
|
14
|
+
/** @hidden */
|
|
15
|
+
export declare const SAFARI_REGEX: RegExp;
|