@progress/kendo-vue-grid 8.1.0-develop.4 → 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
|
@@ -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 t=require("vue"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("../utils/main.js"),r=require("@progress/kendo-vue-common"),a=require("@progress/kendo-vue-data-tools"),p=e=>{var n,l;return(l=(n=e.cells)==null?void 0:n.select)==null?void 0:l[e.rowType||"data"]},u=t.defineComponent({name:"KendoGridSelectionCell",inheritAttrs:!1,props:{id:String,field:String,dataItem:Object,format:String,type:String,className:String,colSpan:Number,columnIndex:Number,columnsCount:Number,rowType:String,level:Number,expanded:Boolean,render:[String,Function,Object],isSelected:Boolean,ariaColumnIndex:Number,editor:String,isRtl:Boolean,cells:Object},emits:{selectionchange:null,cellkeydown:null},inject:{kendoIntlService:{default:null},getKeyboardNavigationAttributes:{default:r.noop}},data(){return{inputId:r.guid()}},computed:{tdClass(){const{className:e}=this.$props;return{"k-table-td":!0,[e]:e}}},methods:{triggerKeydown(e){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field})},handleOnChange(e){this.$emit("selectionchange",{event:e,dataItem:this.$props.dataItem})}},render(){let e,n=null;const l=this.$props.isSelected||c.getNestedValue(this.$props.field,this.$props.dataItem),s=typeof l=="boolean"&&l,i=this.$props.render,o=this.getKeyboardNavigationAttributes(this.$props.id),d=this.$props.rowType!=="groupHeader"?(e={style:this.$attrs.style,colspan:this.$props.colSpan,class:this.tdClass,"aria-colindex":this.$props.ariaColumnIndex,role:"gridcell",tabindex:o.tabIndex,"data-keyboardnavlevel":o[a.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":o[a.KEYBOARD_NAV_DATA_ID]},n=t.createVNode(t.Fragment,null,[t.createVNode("span",{class:"k-checkbox-wrap"},[t.createVNode("input",{checked:s,id:this.inputId,type:"checkbox",class:"k-checkbox k-checkbox-md k-rounded-md",onChange:this.handleOnChange},null)]),t.createVNode("label",{class:"k-checkbox-label",for:this.inputId},null)]),t.createVNode("td",t.mergeProps(e,{onKeydown:this.triggerKeydown}),[n])):null;return r.getTemplate.call(this,{h:t.h,template:i||p(this.$props),defaultRendering:d,additionalProps:{...this.$props,tdProps:e},additionalListeners:{keydown:this.triggerKeydown,change:this.handleOnChange},defaultSlots:n,swapDefaultSlots:!0})}});exports.GridSelectionCell=u;
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { getNestedValue as
|
|
10
|
-
import { noop as
|
|
11
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
12
|
-
const y =
|
|
8
|
+
import { defineComponent as i, createVNode as l, Fragment as d, mergeProps as p, h as c } from "vue";
|
|
9
|
+
import { getNestedValue as h } from "../utils/main.mjs";
|
|
10
|
+
import { noop as u, getTemplate as m, guid as g } from "@progress/kendo-vue-common";
|
|
11
|
+
import { KEYBOARD_NAV_DATA_ID as b, KEYBOARD_NAV_DATA_LEVEL as f } from "@progress/kendo-vue-data-tools";
|
|
12
|
+
const y = (e) => {
|
|
13
|
+
var t, n;
|
|
14
|
+
return (n = (t = e.cells) == null ? void 0 : t.select) == null ? void 0 : n[e.rowType || "data"];
|
|
15
|
+
}, I = /* @__PURE__ */ i({
|
|
13
16
|
name: "KendoGridSelectionCell",
|
|
14
17
|
inheritAttrs: !1,
|
|
15
18
|
props: {
|
|
@@ -29,7 +32,8 @@ const y = /* @__PURE__ */ r({
|
|
|
29
32
|
isSelected: Boolean,
|
|
30
33
|
ariaColumnIndex: Number,
|
|
31
34
|
editor: String,
|
|
32
|
-
isRtl: Boolean
|
|
35
|
+
isRtl: Boolean,
|
|
36
|
+
cells: Object
|
|
33
37
|
},
|
|
34
38
|
emits: {
|
|
35
39
|
selectionchange: null,
|
|
@@ -40,12 +44,12 @@ const y = /* @__PURE__ */ r({
|
|
|
40
44
|
default: null
|
|
41
45
|
},
|
|
42
46
|
getKeyboardNavigationAttributes: {
|
|
43
|
-
default:
|
|
47
|
+
default: u
|
|
44
48
|
}
|
|
45
49
|
},
|
|
46
50
|
data() {
|
|
47
51
|
return {
|
|
48
|
-
inputId:
|
|
52
|
+
inputId: g()
|
|
49
53
|
};
|
|
50
54
|
},
|
|
51
55
|
computed: {
|
|
@@ -75,40 +79,47 @@ const y = /* @__PURE__ */ r({
|
|
|
75
79
|
}
|
|
76
80
|
},
|
|
77
81
|
render() {
|
|
78
|
-
|
|
82
|
+
let e, t = null;
|
|
83
|
+
const n = this.$props.isSelected || h(this.$props.field, this.$props.dataItem), r = typeof n == "boolean" && n, s = this.$props.render, o = this.getKeyboardNavigationAttributes(this.$props.id), a = this.$props.rowType !== "groupHeader" ? (e = {
|
|
79
84
|
style: this.$attrs.style,
|
|
80
|
-
onKeydown: this.triggerKeydown,
|
|
81
85
|
colspan: this.$props.colSpan,
|
|
82
86
|
class: this.tdClass,
|
|
83
87
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
84
88
|
role: "gridcell",
|
|
85
|
-
tabindex:
|
|
86
|
-
"data-keyboardnavlevel":
|
|
87
|
-
"data-keyboardnavid":
|
|
88
|
-
},
|
|
89
|
+
tabindex: o.tabIndex,
|
|
90
|
+
"data-keyboardnavlevel": o[f],
|
|
91
|
+
"data-keyboardnavid": o[b]
|
|
92
|
+
}, t = l(d, null, [l("span", {
|
|
89
93
|
class: "k-checkbox-wrap"
|
|
90
|
-
}, [
|
|
91
|
-
checked:
|
|
94
|
+
}, [l("input", {
|
|
95
|
+
checked: r,
|
|
92
96
|
id: this.inputId,
|
|
93
97
|
type: "checkbox",
|
|
94
98
|
class: "k-checkbox k-checkbox-md k-rounded-md",
|
|
95
99
|
onChange: this.handleOnChange
|
|
96
|
-
}, null)]),
|
|
100
|
+
}, null)]), l("label", {
|
|
97
101
|
class: "k-checkbox-label",
|
|
98
102
|
for: this.inputId
|
|
99
|
-
}, null)])
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
}, null)]), l("td", p(e, {
|
|
104
|
+
onKeydown: this.triggerKeydown
|
|
105
|
+
}), [t])) : null;
|
|
106
|
+
return m.call(this, {
|
|
107
|
+
h: c,
|
|
108
|
+
template: s || y(this.$props),
|
|
103
109
|
defaultRendering: a,
|
|
104
|
-
additionalProps:
|
|
110
|
+
additionalProps: {
|
|
111
|
+
...this.$props,
|
|
112
|
+
tdProps: e
|
|
113
|
+
},
|
|
105
114
|
additionalListeners: {
|
|
106
115
|
keydown: this.triggerKeydown,
|
|
107
116
|
change: this.handleOnChange
|
|
108
|
-
}
|
|
117
|
+
},
|
|
118
|
+
defaultSlots: t,
|
|
119
|
+
swapDefaultSlots: !0
|
|
109
120
|
});
|
|
110
121
|
}
|
|
111
122
|
});
|
|
112
123
|
export {
|
|
113
|
-
|
|
124
|
+
I as GridSelectionCell
|
|
114
125
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { PropType } from 'vue';
|
|
9
|
+
import { GridCellProps } from '../../interfaces/GridCellProps';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export declare const getCustomCell: (props: GridCellProps) => any;
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export declare const GridPinCell: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
18
|
+
id: PropType<string>;
|
|
19
|
+
field: PropType<string>;
|
|
20
|
+
dataItem: PropType<any>;
|
|
21
|
+
format: PropType<string>;
|
|
22
|
+
readFormat: PropType<string>;
|
|
23
|
+
className: PropType<string>;
|
|
24
|
+
columnType: PropType<import('../../interfaces/ColumnType').GridColumnType>;
|
|
25
|
+
colSpan: PropType<number>;
|
|
26
|
+
columnIndex: PropType<number>;
|
|
27
|
+
columnsCount: PropType<number>;
|
|
28
|
+
dataIndex: PropType<number>;
|
|
29
|
+
rowType: PropType<string>;
|
|
30
|
+
level: PropType<number>;
|
|
31
|
+
expanded: PropType<boolean>;
|
|
32
|
+
type: PropType<string>;
|
|
33
|
+
editor: PropType<string>;
|
|
34
|
+
rowSpan: PropType<{
|
|
35
|
+
count: number;
|
|
36
|
+
value: any;
|
|
37
|
+
}>;
|
|
38
|
+
isSelected: PropType<boolean>;
|
|
39
|
+
isHighlighted: PropType<boolean>;
|
|
40
|
+
ariaColumnIndex: PropType<number>;
|
|
41
|
+
render: PropType<any>;
|
|
42
|
+
isRtl: PropType<boolean>;
|
|
43
|
+
}>, {
|
|
44
|
+
getKeyboardNavigationAttributes: () => void;
|
|
45
|
+
triggerCellContextMenu: () => void;
|
|
46
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
47
|
+
id: PropType<string>;
|
|
48
|
+
field: PropType<string>;
|
|
49
|
+
dataItem: PropType<any>;
|
|
50
|
+
format: PropType<string>;
|
|
51
|
+
readFormat: PropType<string>;
|
|
52
|
+
className: PropType<string>;
|
|
53
|
+
columnType: PropType<import('../../interfaces/ColumnType').GridColumnType>;
|
|
54
|
+
colSpan: PropType<number>;
|
|
55
|
+
columnIndex: PropType<number>;
|
|
56
|
+
columnsCount: PropType<number>;
|
|
57
|
+
dataIndex: PropType<number>;
|
|
58
|
+
rowType: PropType<string>;
|
|
59
|
+
level: PropType<number>;
|
|
60
|
+
expanded: PropType<boolean>;
|
|
61
|
+
type: PropType<string>;
|
|
62
|
+
editor: PropType<string>;
|
|
63
|
+
rowSpan: PropType<{
|
|
64
|
+
count: number;
|
|
65
|
+
value: any;
|
|
66
|
+
}>;
|
|
67
|
+
isSelected: PropType<boolean>;
|
|
68
|
+
isHighlighted: PropType<boolean>;
|
|
69
|
+
ariaColumnIndex: PropType<number>;
|
|
70
|
+
render: PropType<any>;
|
|
71
|
+
isRtl: PropType<boolean>;
|
|
72
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),i=require("@progress/kendo-vue-data-tools"),r=require("@progress/kendo-vue-common"),p=require("./GridPinDropdownButton.js"),s=e=>{var n,t;return(t=(n=e.cells)==null?void 0:n.pin)==null?void 0:t[e.rowType||"data"]},b=o.defineComponent({name:"GridPinCell",inheritAttrs:!1,props:{id:String,field:String,dataItem:Object,format:String,readFormat:String,className:String,columnType:String,colSpan:Number,columnIndex:Number,columnsCount:Number,dataIndex:Number,rowType:String,level:Number,expanded:Boolean,type:String,editor:String,rowSpan:[Number,Object],isSelected:Boolean,isHighlighted:Boolean,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean},inject:{getKeyboardNavigationAttributes:{default:r.noop},triggerCellContextMenu:{default:r.noop}},setup(){const e=o.inject("getKeyboardNavigationAttributes",r.noop),n=o.inject("triggerCellContextMenu",r.noop);return{getKeyboardNavigationAttributes:e,triggerCellContextMenu:n}},render(){var l,d;const e=this.$props;let n=null;const t=this.getKeyboardNavigationAttributes(e.id);let a={};if(e.rowType==="groupFooter")a={class:e.className,tabindex:t.tabIndex,"data-keyboardnavlevel":t[i.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":t[i.KEYBOARD_NAV_DATA_ID]},n=o.createVNode("td",a,null);else if(e.rowType!=="groupHeader"){const c=(d=(l=e.unstyled)==null?void 0:l.uGrid)!=null?d:r.uGrid,g=r.classNames(c.td({selected:e.isSelected,highlighted:e.isHighlighted,sorted:e.isSorted,alt:e.isAlt}),e.className);a={style:this.$attrs.style,colspan:e.colSpan,class:g,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[i.TABLE_COL_INDEX_ATTRIBUTE]:e.columnIndex,tabindex:t.tabIndex,"data-keyboardnavlevel":t[i.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":t[i.KEYBOARD_NAV_DATA_ID],onContextmenu:m=>{this.triggerCellContextMenu(m,e.dataItem,e.field)}},n=o.createVNode("td",a,[o.createVNode(p.GridPinDropdownButton,{dataItem:e.dataItem},null)])}const u=s(e);return r.getTemplate.call(this,{h:o.h,template:u,defaultRendering:n,additionalProps:{...e,tdProps:a},additionalListeners:{}})}});exports.GridPinCell=b;exports.getCustomCell=s;
|
|
@@ -0,0 +1,111 @@
|
|
|
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 b, createVNode as i, h as C, inject as d } from "vue";
|
|
9
|
+
import { KEYBOARD_NAV_DATA_ID as s, KEYBOARD_NAV_DATA_LEVEL as u, TABLE_COL_INDEX_ATTRIBUTE as N } from "@progress/kendo-vue-data-tools";
|
|
10
|
+
import { noop as a, uGrid as x, classNames as y, getTemplate as A } from "@progress/kendo-vue-common";
|
|
11
|
+
import { GridPinDropdownButton as S } from "./GridPinDropdownButton.mjs";
|
|
12
|
+
const f = (e) => {
|
|
13
|
+
var n, t;
|
|
14
|
+
return (t = (n = e.cells) == null ? void 0 : n.pin) == null ? void 0 : t[e.rowType || "data"];
|
|
15
|
+
}, B = /* @__PURE__ */ b({
|
|
16
|
+
name: "GridPinCell",
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
props: {
|
|
19
|
+
id: String,
|
|
20
|
+
field: String,
|
|
21
|
+
dataItem: Object,
|
|
22
|
+
format: String,
|
|
23
|
+
readFormat: String,
|
|
24
|
+
className: String,
|
|
25
|
+
columnType: String,
|
|
26
|
+
colSpan: Number,
|
|
27
|
+
columnIndex: Number,
|
|
28
|
+
columnsCount: Number,
|
|
29
|
+
dataIndex: Number,
|
|
30
|
+
rowType: String,
|
|
31
|
+
level: Number,
|
|
32
|
+
expanded: Boolean,
|
|
33
|
+
type: String,
|
|
34
|
+
editor: String,
|
|
35
|
+
rowSpan: [Number, Object],
|
|
36
|
+
isSelected: Boolean,
|
|
37
|
+
isHighlighted: Boolean,
|
|
38
|
+
ariaColumnIndex: Number,
|
|
39
|
+
render: [String, Function, Object],
|
|
40
|
+
isRtl: Boolean
|
|
41
|
+
},
|
|
42
|
+
inject: {
|
|
43
|
+
getKeyboardNavigationAttributes: {
|
|
44
|
+
default: a
|
|
45
|
+
},
|
|
46
|
+
triggerCellContextMenu: {
|
|
47
|
+
default: a
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
setup() {
|
|
51
|
+
const e = d("getKeyboardNavigationAttributes", a), n = d("triggerCellContextMenu", a);
|
|
52
|
+
return {
|
|
53
|
+
getKeyboardNavigationAttributes: e,
|
|
54
|
+
triggerCellContextMenu: n
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
render() {
|
|
58
|
+
var l, o;
|
|
59
|
+
const e = this.$props;
|
|
60
|
+
let n = null;
|
|
61
|
+
const t = this.getKeyboardNavigationAttributes(e.id);
|
|
62
|
+
let r = {};
|
|
63
|
+
if (e.rowType === "groupFooter")
|
|
64
|
+
r = {
|
|
65
|
+
class: e.className,
|
|
66
|
+
tabindex: t.tabIndex,
|
|
67
|
+
"data-keyboardnavlevel": t[u],
|
|
68
|
+
"data-keyboardnavid": t[s]
|
|
69
|
+
}, n = i("td", r, null);
|
|
70
|
+
else if (e.rowType !== "groupHeader") {
|
|
71
|
+
const c = (o = (l = e.unstyled) == null ? void 0 : l.uGrid) != null ? o : x, m = y(c.td({
|
|
72
|
+
selected: e.isSelected,
|
|
73
|
+
highlighted: e.isHighlighted,
|
|
74
|
+
sorted: e.isSorted,
|
|
75
|
+
alt: e.isAlt
|
|
76
|
+
}), e.className);
|
|
77
|
+
r = {
|
|
78
|
+
style: this.$attrs.style,
|
|
79
|
+
colspan: e.colSpan,
|
|
80
|
+
class: m,
|
|
81
|
+
role: "gridcell",
|
|
82
|
+
"aria-colindex": e.ariaColumnIndex,
|
|
83
|
+
"aria-selected": e.isSelected,
|
|
84
|
+
[N]: e.columnIndex,
|
|
85
|
+
tabindex: t.tabIndex,
|
|
86
|
+
"data-keyboardnavlevel": t[u],
|
|
87
|
+
"data-keyboardnavid": t[s],
|
|
88
|
+
onContextmenu: (p) => {
|
|
89
|
+
this.triggerCellContextMenu(p, e.dataItem, e.field);
|
|
90
|
+
}
|
|
91
|
+
}, n = i("td", r, [i(S, {
|
|
92
|
+
dataItem: e.dataItem
|
|
93
|
+
}, null)]);
|
|
94
|
+
}
|
|
95
|
+
const g = f(e);
|
|
96
|
+
return A.call(this, {
|
|
97
|
+
h: C,
|
|
98
|
+
template: g,
|
|
99
|
+
defaultRendering: n,
|
|
100
|
+
additionalProps: {
|
|
101
|
+
...e,
|
|
102
|
+
tdProps: r
|
|
103
|
+
},
|
|
104
|
+
additionalListeners: {}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
export {
|
|
109
|
+
B as GridPinCell,
|
|
110
|
+
f as getCustomCell
|
|
111
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { PropType } from 'vue';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const GridPinDropdownButton: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
13
|
+
dataItem: PropType<any>;
|
|
14
|
+
}>, {
|
|
15
|
+
anchor: string;
|
|
16
|
+
showPopup: import('vue').Ref<boolean, boolean>;
|
|
17
|
+
hrefValue: string;
|
|
18
|
+
isPinned: import('vue').ComputedRef<boolean>;
|
|
19
|
+
pinToTopText: import('vue').ComputedRef<any>;
|
|
20
|
+
unpinText: import('vue').ComputedRef<any>;
|
|
21
|
+
menuItems: import('vue').ComputedRef<any[]>;
|
|
22
|
+
handleToggle: (e: MouseEvent) => void;
|
|
23
|
+
handleClose: (e: any) => void;
|
|
24
|
+
handleMenuSelect: (event: any) => void;
|
|
25
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
26
|
+
dataItem: PropType<any>;
|
|
27
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),g=require("@progress/kendo-vue-common"),w=require("@progress/kendo-vue-popup"),u=require("@progress/kendo-svg-icons"),t=require("../../messages/main.js"),B=require("@progress/kendo-vue-layout"),V=o.defineComponent({name:"GridPinDropdownButton",props:{dataItem:Object},inject:{kendoLocalizationService:{default:null},kendo:{default:null}},setup(l){const e=o.inject("kendoLocalizationService",{}),s=o.inject("kendo",{}),i=o.ref(!1),T="#",P=g.guid(),a=o.computed(()=>s!=null&&s.getRowPinPosition?s.getRowPinPosition(l.dataItem):"none"),p=o.computed(()=>a.value!=="none"),c=o.computed(()=>{var n;return((n=e==null?void 0:e.toLanguageString)==null?void 0:n.call(e,t.gridPinToTop,t.messages[t.gridPinToTop]))||t.messages[t.gridPinToTop]}),f=o.computed(()=>{var n;return((n=e==null?void 0:e.toLanguageString)==null?void 0:n.call(e,t.gridPinToBottom,t.messages[t.gridPinToBottom]))||t.messages[t.gridPinToBottom]}),r=o.computed(()=>{var n;return((n=e==null?void 0:e.toLanguageString)==null?void 0:n.call(e,t.gridUnpin,t.messages[t.gridUnpin]))||t.messages[t.gridUnpin]}),I=o.computed(()=>{const n=[];return p.value&&n.push({text:r.value,svgIcon:u.unpinOutlineIcon,data:{action:"unpin"}}),a.value!=="top"&&n.push({text:c.value,svgIcon:u.pinOutlineTopIcon,data:{action:"pinTop"}}),a.value!=="bottom"&&n.push({text:f.value,svgIcon:u.pinOutlineBottomIcon,data:{action:"pinBottom"}}),n});return{anchor:P,showPopup:i,hrefValue:T,isPinned:p,pinToTopText:c,unpinText:r,menuItems:I,handleToggle:n=>{n.preventDefault(),i.value=!i.value},handleClose:n=>{n.isAnchorClicked||(i.value=!1)},handleMenuSelect:n=>{var d,h,m;const v=(h=(d=n.item)==null?void 0:d.data)==null?void 0:h.action;(m=s==null?void 0:s.onRowPin)==null||m.call(s,v,l.dataItem),i.value=!1}}},render(){return[o.createVNode("a",{class:"k-pin-cell",ref:this.anchor,href:this.hrefValue,tabindex:-1,onClick:this.handleToggle,"aria-label":this.isPinned?this.unpinText:this.pinToTopText},[o.createVNode(g.Icon,{name:this.isPinned?"unpin":"pin",icon:this.isPinned?u.unpinOutlineIcon:u.pinOutlineIcon},null)]),o.createVNode(w.Popup,{anchor:this.anchor,show:this.showPopup,anchorAlign:{vertical:"bottom",horizontal:"right"},popupClass:"k-menu-popup",onMousedownoutside:this.handleClose},{default:()=>[o.createVNode(B.Menu,{vertical:!0,items:this.menuItems,onSelect:this.handleMenuSelect},null)]})]}});exports.GridPinDropdownButton=V;
|
|
@@ -0,0 +1,111 @@
|
|
|
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 M, createVNode as u, inject as P, ref as O, computed as e } from "vue";
|
|
9
|
+
import { Icon as j, guid as D } from "@progress/kendo-vue-common";
|
|
10
|
+
import { Popup as R } from "@progress/kendo-vue-popup";
|
|
11
|
+
import { unpinOutlineIcon as I, pinOutlineIcon as V, pinOutlineTopIcon as A, pinOutlineBottomIcon as C } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { messages as s, gridPinToTop as l, gridPinToBottom as p, gridUnpin as h } from "../../messages/main.mjs";
|
|
13
|
+
import { Menu as G } from "@progress/kendo-vue-layout";
|
|
14
|
+
const Q = /* @__PURE__ */ M({
|
|
15
|
+
name: "GridPinDropdownButton",
|
|
16
|
+
props: {
|
|
17
|
+
dataItem: Object
|
|
18
|
+
},
|
|
19
|
+
inject: {
|
|
20
|
+
kendoLocalizationService: {
|
|
21
|
+
default: null
|
|
22
|
+
},
|
|
23
|
+
kendo: {
|
|
24
|
+
default: null
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(r) {
|
|
28
|
+
const t = P("kendoLocalizationService", {}), o = P("kendo", {}), i = O(!1), w = "#", v = D(), a = e(() => o != null && o.getRowPinPosition ? o.getRowPinPosition(r.dataItem) : "none"), c = e(() => a.value !== "none"), m = e(() => {
|
|
29
|
+
var n;
|
|
30
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, l, s[l])) || s[l];
|
|
31
|
+
}), B = e(() => {
|
|
32
|
+
var n;
|
|
33
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, p, s[p])) || s[p];
|
|
34
|
+
}), d = e(() => {
|
|
35
|
+
var n;
|
|
36
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, h, s[h])) || s[h];
|
|
37
|
+
}), b = e(() => {
|
|
38
|
+
const n = [];
|
|
39
|
+
return c.value && n.push({
|
|
40
|
+
text: d.value,
|
|
41
|
+
svgIcon: I,
|
|
42
|
+
data: {
|
|
43
|
+
action: "unpin"
|
|
44
|
+
}
|
|
45
|
+
}), a.value !== "top" && n.push({
|
|
46
|
+
text: m.value,
|
|
47
|
+
svgIcon: A,
|
|
48
|
+
data: {
|
|
49
|
+
action: "pinTop"
|
|
50
|
+
}
|
|
51
|
+
}), a.value !== "bottom" && n.push({
|
|
52
|
+
text: B.value,
|
|
53
|
+
svgIcon: C,
|
|
54
|
+
data: {
|
|
55
|
+
action: "pinBottom"
|
|
56
|
+
}
|
|
57
|
+
}), n;
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
anchor: v,
|
|
61
|
+
showPopup: i,
|
|
62
|
+
hrefValue: w,
|
|
63
|
+
isPinned: c,
|
|
64
|
+
pinToTopText: m,
|
|
65
|
+
unpinText: d,
|
|
66
|
+
menuItems: b,
|
|
67
|
+
handleToggle: (n) => {
|
|
68
|
+
n.preventDefault(), i.value = !i.value;
|
|
69
|
+
},
|
|
70
|
+
handleClose: (n) => {
|
|
71
|
+
n.isAnchorClicked || (i.value = !1);
|
|
72
|
+
},
|
|
73
|
+
handleMenuSelect: (n) => {
|
|
74
|
+
var f, g, T;
|
|
75
|
+
const x = (g = (f = n.item) == null ? void 0 : f.data) == null ? void 0 : g.action;
|
|
76
|
+
(T = o == null ? void 0 : o.onRowPin) == null || T.call(o, x, r.dataItem), i.value = !1;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
render() {
|
|
81
|
+
return [u("a", {
|
|
82
|
+
class: "k-pin-cell",
|
|
83
|
+
ref: this.anchor,
|
|
84
|
+
href: this.hrefValue,
|
|
85
|
+
tabindex: -1,
|
|
86
|
+
onClick: this.handleToggle,
|
|
87
|
+
"aria-label": this.isPinned ? this.unpinText : this.pinToTopText
|
|
88
|
+
}, [u(j, {
|
|
89
|
+
name: this.isPinned ? "unpin" : "pin",
|
|
90
|
+
icon: this.isPinned ? I : V
|
|
91
|
+
}, null)]), u(R, {
|
|
92
|
+
anchor: this.anchor,
|
|
93
|
+
show: this.showPopup,
|
|
94
|
+
anchorAlign: {
|
|
95
|
+
vertical: "bottom",
|
|
96
|
+
horizontal: "right"
|
|
97
|
+
},
|
|
98
|
+
popupClass: "k-menu-popup",
|
|
99
|
+
onMousedownoutside: this.handleClose
|
|
100
|
+
}, {
|
|
101
|
+
default: () => [u(G, {
|
|
102
|
+
vertical: !0,
|
|
103
|
+
items: this.menuItems,
|
|
104
|
+
onSelect: this.handleMenuSelect
|
|
105
|
+
}, null)]
|
|
106
|
+
})];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
Q as GridPinDropdownButton
|
|
111
|
+
};
|
package/common.d.ts
CHANGED
|
@@ -52,6 +52,11 @@ declare const gridProps: {
|
|
|
52
52
|
};
|
|
53
53
|
loader: PropType<string | Object | Function>;
|
|
54
54
|
lockGroups: PropType<boolean>;
|
|
55
|
+
pinnable: PropType<boolean>;
|
|
56
|
+
defaultPinnedTopRows: PropType<any[]>;
|
|
57
|
+
defaultPinnedBottomRows: PropType<any[]>;
|
|
58
|
+
pinnedTopRows: PropType<any[]>;
|
|
59
|
+
pinnedBottomRows: PropType<any[]>;
|
|
55
60
|
defaultFilter: PropType<import('@progress/kendo-data-query').CompositeFilterDescriptor>;
|
|
56
61
|
filter: PropType<import('@progress/kendo-data-query').CompositeFilterDescriptor>;
|
|
57
62
|
defaultSearch: PropType<import('@progress/kendo-data-query').CompositeFilterDescriptor>;
|
package/common.js
CHANGED
|
@@ -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"});require("vue");const t=require("@progress/kendo-vue-common"),n={id:String,autoProcessData:[Boolean,Object],topCacheCount:{type:Number,default:0},collapsedGroups:{type:Array,default:function(){return[]}},uniqueField:String,totalGroupedHeight:Number,allGroupedItems:Object,alternatePerGroup:Boolean,columns:Array,columnsState:{type:Array,default:function(){}},cells:Object,defaultColumnsState:{type:Array,default:function(){}},columnVirtualization:Boolean,dataItems:[Array,Object],sortable:[Boolean,Object],defaultSort:Array,sort:Array,filterable:Boolean,filterOperators:Object,filterCellRender:[String,Function,Object],headerCellRender:[String,Function,Object],showLoader:{type:Boolean,default:void 0},loader:[String,Function,Object],lockGroups:Boolean,defaultFilter:Object,filter:Object,defaultSearch:Object,search:Object,searchFields:Array,highlight:Object,pageable:[Boolean,Object],pageSize:Number,total:Number,fixedScroll:Boolean,skip:Number,defaultSkip:Number,take:Number,defaultTake:Number,expandField:String,expandColumn:Object,selectedField:String,cellRender:[String,Function,Object],rowRender:[String,Function,Object],rowSpannable:[Boolean,Object],resizable:Boolean,reorderable:Boolean,group:Array,defaultGroup:Array,groupable:[Boolean,Object],groupExpand:Array,defaultGroupExpand:Array,detailExpand:Object,defaultDetailExpand:Object,editField:String,rowClass:Function,select:Object,defaultSelect:Object,selectable:[Boolean,Object],scrollable:{type:String,default:"scrollable"},size:{type:String,default:"medium",validator:function(e){return["small","medium"].includes(e)}},pager:[String,Function,Object],rowHeight:Number,detailRowHeight:Number,detail:[String,Function,Object],columnMenu:[Boolean,String,Function,Object],columnMenuAnimate:{type:[Boolean,Object],default:function(){return!0}},columnMenuIcon:t.SvgIcon,dataItemKey:String,navigatable:{type:Boolean,default:!1},onItemchange:Function,onExpandchange:Function,onDatastatechange:Function,onPagechange:Function,onSortchange:Function,onFilterchange:Function,onGroupchange:Function,onSearchchange:Function,onGroupexpandchange:Function,onDetailexpandchange:Function};exports.gridProps=n;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const t=require("@progress/kendo-vue-common"),n={id:String,autoProcessData:[Boolean,Object],topCacheCount:{type:Number,default:0},collapsedGroups:{type:Array,default:function(){return[]}},uniqueField:String,totalGroupedHeight:Number,allGroupedItems:Object,alternatePerGroup:Boolean,columns:Array,columnsState:{type:Array,default:function(){}},cells:Object,defaultColumnsState:{type:Array,default:function(){}},columnVirtualization:Boolean,dataItems:[Array,Object],sortable:[Boolean,Object],defaultSort:Array,sort:Array,filterable:Boolean,filterOperators:Object,filterCellRender:[String,Function,Object],headerCellRender:[String,Function,Object],showLoader:{type:Boolean,default:void 0},loader:[String,Function,Object],lockGroups:Boolean,pinnable:Boolean,defaultPinnedTopRows:Array,defaultPinnedBottomRows:Array,pinnedTopRows:Array,pinnedBottomRows:Array,defaultFilter:Object,filter:Object,defaultSearch:Object,search:Object,searchFields:Array,highlight:Object,pageable:[Boolean,Object],pageSize:Number,total:Number,fixedScroll:Boolean,skip:Number,defaultSkip:Number,take:Number,defaultTake:Number,expandField:String,expandColumn:Object,selectedField:String,cellRender:[String,Function,Object],rowRender:[String,Function,Object],rowSpannable:[Boolean,Object],resizable:Boolean,reorderable:Boolean,group:Array,defaultGroup:Array,groupable:[Boolean,Object],groupExpand:Array,defaultGroupExpand:Array,detailExpand:Object,defaultDetailExpand:Object,editField:String,rowClass:Function,select:Object,defaultSelect:Object,selectable:[Boolean,Object],scrollable:{type:String,default:"scrollable"},size:{type:String,default:"medium",validator:function(e){return["small","medium"].includes(e)}},pager:[String,Function,Object],rowHeight:Number,detailRowHeight:Number,detail:[String,Function,Object],columnMenu:[Boolean,String,Function,Object],columnMenuAnimate:{type:[Boolean,Object],default:function(){return!0}},columnMenuIcon:t.SvgIcon,dataItemKey:String,navigatable:{type:Boolean,default:!1},onItemchange:Function,onExpandchange:Function,onDatastatechange:Function,onPagechange:Function,onSortchange:Function,onFilterchange:Function,onGroupchange:Function,onSearchchange:Function,onGroupexpandchange:Function,onDetailexpandchange:Function};exports.gridProps=n;
|
package/common.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import "vue";
|
|
9
9
|
import { SvgIcon as t } from "@progress/kendo-vue-common";
|
|
10
|
-
const
|
|
10
|
+
const a = {
|
|
11
11
|
id: String,
|
|
12
12
|
autoProcessData: [Boolean, Object],
|
|
13
13
|
topCacheCount: {
|
|
@@ -51,6 +51,11 @@ const o = {
|
|
|
51
51
|
},
|
|
52
52
|
loader: [String, Function, Object],
|
|
53
53
|
lockGroups: Boolean,
|
|
54
|
+
pinnable: Boolean,
|
|
55
|
+
defaultPinnedTopRows: Array,
|
|
56
|
+
defaultPinnedBottomRows: Array,
|
|
57
|
+
pinnedTopRows: Array,
|
|
58
|
+
pinnedBottomRows: Array,
|
|
54
59
|
defaultFilter: Object,
|
|
55
60
|
filter: Object,
|
|
56
61
|
defaultSearch: Object,
|
|
@@ -125,5 +130,5 @@ const o = {
|
|
|
125
130
|
onDetailexpandchange: Function
|
|
126
131
|
};
|
|
127
132
|
export {
|
|
128
|
-
|
|
133
|
+
a as gridProps
|
|
129
134
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { PropType } from 'vue';
|
|
9
|
+
import { DataRowContext } from '../getRowContents';
|
|
10
|
+
import { GridRowProps } from '../interfaces/GridRowProps';
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export interface PinnedRowsTableProps {
|
|
15
|
+
size?: string;
|
|
16
|
+
cols?: any[];
|
|
17
|
+
dataRowContext: DataRowContext;
|
|
18
|
+
position: 'top' | 'bottom';
|
|
19
|
+
pinnedItems: any[];
|
|
20
|
+
rowHeight?: number;
|
|
21
|
+
rows?: GridRowProps['rows'];
|
|
22
|
+
selectable?: object;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare const PinnedRowsTable: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
28
|
+
size: PropType<string>;
|
|
29
|
+
cols: PropType<any[]>;
|
|
30
|
+
dataRowContext: PropType<DataRowContext>;
|
|
31
|
+
position: PropType<"bottom" | "top">;
|
|
32
|
+
pinnedItems: PropType<any[]>;
|
|
33
|
+
rowHeight: NumberConstructor;
|
|
34
|
+
rows: PropType<import('../interfaces/GridRowsSettings').GridRowsSettings>;
|
|
35
|
+
selectable: PropType<object>;
|
|
36
|
+
}>, {
|
|
37
|
+
isTop: import('vue').ComputedRef<boolean>;
|
|
38
|
+
pinnedRef: import('vue').ComputedRef<any>;
|
|
39
|
+
handlePinnedScroll: (event: UIEvent) => void;
|
|
40
|
+
rowTemplateSettings: import('vue').ComputedRef<import('../interfaces/GridRowsSettings').GridRowsSettings>;
|
|
41
|
+
pinnedRows: import('vue').ComputedRef<import("vue/jsx-runtime").JSX.Element[]>;
|
|
42
|
+
containerClassName: import('vue').ComputedRef<string>;
|
|
43
|
+
tableClassName: import('vue').ComputedRef<string>;
|
|
44
|
+
handleSelectionRelease: (event: any) => void;
|
|
45
|
+
pinnedSelectable: import('vue').ComputedRef<object>;
|
|
46
|
+
pinnedBodyAttributes: import('vue').ComputedRef<{
|
|
47
|
+
"data-keyboardnavtoppinned": boolean;
|
|
48
|
+
} | {
|
|
49
|
+
"data-keyboardnavbottompinned": boolean;
|
|
50
|
+
}>;
|
|
51
|
+
}, {}, {}, {
|
|
52
|
+
setWidth(width: number): void;
|
|
53
|
+
setScrollLeft(scrollLeft: number): void;
|
|
54
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
55
|
+
size: PropType<string>;
|
|
56
|
+
cols: PropType<any[]>;
|
|
57
|
+
dataRowContext: PropType<DataRowContext>;
|
|
58
|
+
position: PropType<"bottom" | "top">;
|
|
59
|
+
pinnedItems: PropType<any[]>;
|
|
60
|
+
rowHeight: NumberConstructor;
|
|
61
|
+
rows: PropType<import('../interfaces/GridRowsSettings').GridRowsSettings>;
|
|
62
|
+
selectable: PropType<object>;
|
|
63
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("@progress/kendo-vue-common"),c=require("@progress/kendo-vue-data-tools"),b=require("@progress/kendo-vue-intl"),v=require("../rows/GridRow.js"),L=require("../getRowContents.js"),l=require("../messages/main.js"),I=t.defineComponent({name:"PinnedRowsTable",props:{size:String,cols:Array,dataRowContext:Object,position:String,pinnedItems:Array,rowHeight:Number,rows:Object,selectable:Object},inject:{gridContext:{default:()=>({})},kendoLocalizationService:{default:null}},mounted(){this.tableRef=n.getRef(this,"table"),this.colGroupRefEl=n.getRef(this,"colGroup")},updated(){this.tableRef=n.getRef(this,"table"),this.colGroupRefEl=n.getRef(this,"colGroup")},methods:{setWidth(e){const a=n.getRef(this,"table");a&&(a.style.width=e?e+"px":"")},setScrollLeft(e){const a=n.getRef(this,"pinnedRef");a&&a.scrollLeft!==e&&(a.scrollLeft=e)}},setup(e){const a=t.inject("kendo",{}),d=t.computed(()=>e.position==="top"),R=t.computed(()=>d.value?a.pinnedTopRef:a.pinnedBottomRef),m=t.ref(!1),p=s=>{const o=a.containerElementRef;if(!o||m.value)return;const i=s.currentTarget.scrollLeft;o.scrollLeft!==i&&(o.scrollLeft=i)},w=t.computed(()=>{var s;return(s=e.rows)!=null&&s.pinnedData?{...e.rows,data:e.rows.pinnedData}:e.rows}),g=t.computed(()=>!e.pinnedItems||!e.dataRowContext?[]:e.pinnedItems.map((s,o)=>{const i={dataItem:s,rowType:"data",level:0,expanded:!1,dataIndex:o},r=e.dataRowContext.dataItemKey,u="pinned_"+((r?n.getter(r)(s):void 0)||"ai"+o),f=L.getRowContents(e.dataRowContext,i,u,o);return t.createVNode(v.GridRow,{key:u,rowType:"data",item:i,dataIndex:o,ariaRowIndex:o+1,absoluteRowIndex:o,isAltRow:o%2!==0,isHidden:!1,rowHeight:e.rowHeight,isSelected:f.isSelected},{default:()=>[f.row]})})),h=t.computed(()=>n.classNames("k-grid-pinned-container",{"k-pos-bottom":!d.value})),S=t.computed(()=>n.classNames(n.uGrid.table({size:e.size}))),y=s=>{var i,r;const o=(i=e.pinnedItems)==null?void 0:i[s.startRowIndex];o&&((r=a.pinnedSelectionRelease)==null||r.call(a,s,o))},N=t.computed(()=>e.selectable?{...typeof e.selectable=="object"?e.selectable:{},enabled:!0,drag:!1}:e.selectable),T=t.computed(()=>d.value?c.tableKeyboardNavigationTopPinnedAttributes:c.tableKeyboardNavigationBottomPinnedAttributes);return{isTop:d,pinnedRef:R,handlePinnedScroll:p,rowTemplateSettings:w,pinnedRows:g,containerClassName:h,tableClassName:S,handleSelectionRelease:y,pinnedSelectable:N,pinnedBodyAttributes:T}},render(){return t.createVNode("div",{class:this.containerClassName,role:"presentation",style:{display:this.pinnedRows.length?"":"none"}},[t.createVNode("div",{class:"k-grid-pinned-wrap",ref:n.setRef(this,"pinnedRef"),onScroll:this.handlePinnedScroll},[t.createVNode(c.TableSelection,{selectable:this.pinnedSelectable,onRelease:this.handleSelectionRelease},{default:()=>[t.createVNode("table",{ref:n.setRef(this,"table"),class:this.tableClassName,"aria-label":this.isTop?b.provideLocalizationService(this).toLanguageString(l.pinnedTopRowsAriaLabel,l.messages[l.pinnedTopRowsAriaLabel]):b.provideLocalizationService(this).toLanguageString(l.pinnedBottomRowsAriaLabel,l.messages[l.pinnedBottomRowsAriaLabel])},[t.createVNode("colgroup",{ref:n.setRef(this,"colGroup")},[this.$props.cols]),t.createVNode("tbody",t.mergeProps({class:n.classNames(n.uGrid.tbody({}))},this.pinnedBodyAttributes),[this.pinnedRows])])]})])])}});exports.PinnedRowsTable=I;
|