@progress/kendo-vue-grid 8.1.0-develop.6 → 8.1.0-develop.8
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 +2 -0
- package/Grid.js +1 -1
- package/Grid.mjs +2 -1
- package/GridState.d.ts +2 -0
- package/RootGrid.d.ts +19 -0
- package/RootGrid.js +1 -1
- package/RootGrid.mjs +23 -8
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +4 -5
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +8 -9
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +11 -12
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +14 -15
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +4 -5
- package/common.d.ts +1 -0
- package/common.js +1 -1
- package/common.mjs +1 -0
- package/components/PinnedRowsTable.d.ts +0 -1
- package/components/PinnedRowsTable.js +1 -1
- package/components/PinnedRowsTable.mjs +31 -37
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +11 -12
- package/interfaces/GridProps.d.ts +14 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/rows/GridRow.d.ts +2 -0
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +16 -12
package/cells/GridGroupCell.mjs
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as x, createVNode as n, mergeProps as A, h as v } from "vue";
|
|
9
|
-
import { noop as N, Icon as L, getTemplate as w, Keys as
|
|
10
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
9
|
+
import { noop as N, Icon as L, getTemplate as w, Keys as K } from "@progress/kendo-vue-common";
|
|
10
|
+
import { KEYBOARD_NAV_DATA_ID as R, KEYBOARD_NAV_DATA_LEVEL as T, GROUP_EXPAND_ACTION as D } from "@progress/kendo-vue-data-tools";
|
|
11
11
|
import { groupCaretAriaLabelCollapse as y, messages as b, groupCaretAriaLabelExpand as I } from "../messages/main.mjs";
|
|
12
|
-
import { provideLocalizationService as
|
|
12
|
+
import { provideLocalizationService as C } from "@progress/kendo-vue-intl";
|
|
13
13
|
import { caretAltDownIcon as E, caretAltRightIcon as O, caretAltLeftIcon as G } from "@progress/kendo-svg-icons";
|
|
14
14
|
const _ = (e) => {
|
|
15
15
|
var t, l;
|
|
@@ -100,7 +100,7 @@ const _ = (e) => {
|
|
|
100
100
|
var t;
|
|
101
101
|
const e = this.kendo;
|
|
102
102
|
(t = e == null ? void 0 : e.dispatchGroupExpand) == null || t.call(e, {
|
|
103
|
-
type:
|
|
103
|
+
type: D.TOGGLE,
|
|
104
104
|
group: this.$props.group
|
|
105
105
|
});
|
|
106
106
|
},
|
|
@@ -111,7 +111,7 @@ const _ = (e) => {
|
|
|
111
111
|
dataIndex: this.$props.dataIndex,
|
|
112
112
|
field: this.$props.field,
|
|
113
113
|
expanded: this.$props.expanded
|
|
114
|
-
}), !e.defaultPrevented && e.keyCode ===
|
|
114
|
+
}), !e.defaultPrevented && e.keyCode === K.enter && (e.preventDefault(), this.$emit("change", {
|
|
115
115
|
dataItem: this.$props.dataItem,
|
|
116
116
|
dataIndex: this.$props.dataIndex,
|
|
117
117
|
event: e,
|
|
@@ -137,14 +137,14 @@ const _ = (e) => {
|
|
|
137
137
|
columnIndex: r,
|
|
138
138
|
level: d,
|
|
139
139
|
columnsCount: s,
|
|
140
|
-
rowType:
|
|
140
|
+
rowType: S,
|
|
141
141
|
dataItem: i,
|
|
142
142
|
field: p,
|
|
143
143
|
expanded: a,
|
|
144
144
|
render: $,
|
|
145
145
|
locked: c
|
|
146
|
-
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h =
|
|
147
|
-
if (r === void 0 || d === void 0 || r < d || s === void 0 ||
|
|
146
|
+
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h = C(this).toLanguageString(y, b[y]), m = C(this).toLanguageString(I, b[I]);
|
|
147
|
+
if (r === void 0 || d === void 0 || r < d || s === void 0 || S !== "groupHeader" || i[p] === void 0)
|
|
148
148
|
t = {
|
|
149
149
|
style: this.$attrs.style,
|
|
150
150
|
key: "g" + r,
|
|
@@ -162,8 +162,8 @@ const _ = (e) => {
|
|
|
162
162
|
"aria-expanded": a,
|
|
163
163
|
"data-grid-col-index": this.$props.columnIndex,
|
|
164
164
|
tabindex: u.tabIndex,
|
|
165
|
-
"data-keyboardnavlevel": u[
|
|
166
|
-
"data-keyboardnavid": u[
|
|
165
|
+
"data-keyboardnavlevel": u[T],
|
|
166
|
+
"data-keyboardnavid": u[R]
|
|
167
167
|
}, o = n("p", {
|
|
168
168
|
class: "k-reset"
|
|
169
169
|
}, [n("a", {
|
|
@@ -208,8 +208,7 @@ const _ = (e) => {
|
|
|
208
208
|
keydown: this.triggerKeydown,
|
|
209
209
|
click: this.clickHandler
|
|
210
210
|
},
|
|
211
|
-
defaultSlots: o
|
|
212
|
-
swapDefaultSlots: !0
|
|
211
|
+
defaultSlots: o
|
|
213
212
|
});
|
|
214
213
|
}
|
|
215
214
|
});
|
|
@@ -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 i=require("vue"),l=require("@progress/kendo-vue-common"),d=require("@progress/kendo-vue-data-tools"),g=require("@progress/kendo-vue-intl"),n=require("../messages/main.js"),h=require("@progress/kendo-svg-icons"),m=e=>{var t,a;return(a=(t=e.cells)==null?void 0:t.hierarchy)==null?void 0:a[e.rowType||"data"]},
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),l=require("@progress/kendo-vue-common"),d=require("@progress/kendo-vue-data-tools"),g=require("@progress/kendo-vue-intl"),n=require("../messages/main.js"),h=require("@progress/kendo-svg-icons"),m=e=>{var t,a;return(a=(t=e.cells)==null?void 0:t.hierarchy)==null?void 0:a[e.rowType||"data"]},y=i.defineComponent({name:"KendoGridHierarchyCell",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,editor:String,isSelected:Boolean,dataIndex:Number,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean,cells:Object},emits:{change:null,cellkeydown:null},inject:{kendo:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:l.noop}},methods:{triggerStateChange(){const e=this.kendo;e.dataItemKey&&this.$props.dataItem[e.dataItemKey]!==void 0&&(e==null||e.dispatchDetailExpand({type:d.DETAIL_EXPAND_ACTION.TOGGLE,id:this.$props.dataItem[e.dataItemKey]}))},triggerKeydown(e,t){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field,expanded:t}),!e.defaultPrevented&&e.keyCode===l.Keys.enter&&(e.preventDefault(),this.$emit("change",{dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,event:e,field:this.$props.field,value:!t}),this.triggerStateChange())},clickHandler(e,t,a){e.preventDefault(),this.$emit("change",{dataItem:t,event:e,field:void 0,value:!a}),this.triggerStateChange()}},computed:{wrapperClass(){return{"k-table-td":!0,"k-hierarchy-cell":!0,[this.className||""]:this.className}}},render(){let e=null,t,a=null;const s=this.getKeyboardNavigationAttributes(this.$props.id),c=g.provideLocalizationService(this),p=c.toLanguageString(n.collapseDetailAriaLabel,n.messages[n.collapseDetailAriaLabel]),u=c.toLanguageString(n.expandDetailAriaLabel,n.messages[n.expandDetailAriaLabel]);if(this.$props.rowType==="groupFooter")t={class:this.wrapperClass},e=i.createVNode("td",t,null);else if(this.$props.rowType!=="groupHeader"){const r=this.$props.expanded;t={style:this.$attrs.style,class:this.wrapperClass,"aria-expanded":r?"true":"false",role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,tabindex:s.tabIndex,"data-keyboardnavlevel":s[d.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":s[d.KEYBOARD_NAV_DATA_ID]},a=i.createVNode("a",{onClick:o=>{this.clickHandler(o,this.$props.dataItem,r)},href:"#",tabindex:-1,title:r?p:u,"aria-label":r?p:u},[i.createVNode(l.Icon,{name:r?"minus":"plus",icon:r?h.minusIcon:h.plusIcon},null)]),e=i.createVNode("td",i.mergeProps(t,{onKeydown:o=>{this.triggerKeydown(o,r)}}),[a])}return l.getTemplate.call(this,{h:i.h,template:this.$props.render||m(this.$props),defaultRendering:e,additionalProps:{...this.$props,tdProps:t},additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler},defaultSlots:a})}});exports.GridHierarchyCell=y;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as m, createVNode as
|
|
8
|
+
import { defineComponent as m, createVNode as r, mergeProps as h, h as g } from "vue";
|
|
9
9
|
import { noop as f, Icon as y, getTemplate as I, Keys as b } from "@progress/kendo-vue-common";
|
|
10
10
|
import { KEYBOARD_NAV_DATA_ID as S, KEYBOARD_NAV_DATA_LEVEL as $, DETAIL_EXPAND_ACTION as k } from "@progress/kendo-vue-data-tools";
|
|
11
11
|
import { provideLocalizationService as x } from "@progress/kendo-vue-intl";
|
|
@@ -102,32 +102,32 @@ const v = (e) => {
|
|
|
102
102
|
if (this.$props.rowType === "groupFooter")
|
|
103
103
|
t = {
|
|
104
104
|
class: this.wrapperClass
|
|
105
|
-
}, e =
|
|
105
|
+
}, e = r("td", t, null);
|
|
106
106
|
else if (this.$props.rowType !== "groupHeader") {
|
|
107
|
-
const
|
|
107
|
+
const i = this.$props.expanded;
|
|
108
108
|
t = {
|
|
109
109
|
style: this.$attrs.style,
|
|
110
110
|
class: this.wrapperClass,
|
|
111
|
-
"aria-expanded":
|
|
111
|
+
"aria-expanded": i ? "true" : "false",
|
|
112
112
|
role: "gridcell",
|
|
113
113
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
114
114
|
tabindex: n.tabIndex,
|
|
115
115
|
"data-keyboardnavlevel": n[$],
|
|
116
116
|
"data-keyboardnavid": n[S]
|
|
117
|
-
}, a =
|
|
117
|
+
}, a = r("a", {
|
|
118
118
|
onClick: (l) => {
|
|
119
|
-
this.clickHandler(l, this.$props.dataItem,
|
|
119
|
+
this.clickHandler(l, this.$props.dataItem, i);
|
|
120
120
|
},
|
|
121
121
|
href: "#",
|
|
122
122
|
tabindex: -1,
|
|
123
|
-
title:
|
|
124
|
-
"aria-label":
|
|
125
|
-
}, [
|
|
126
|
-
name:
|
|
127
|
-
icon:
|
|
128
|
-
}, null)]), e =
|
|
123
|
+
title: i ? o : d,
|
|
124
|
+
"aria-label": i ? o : d
|
|
125
|
+
}, [r(y, {
|
|
126
|
+
name: i ? "minus" : "plus",
|
|
127
|
+
icon: i ? A : C
|
|
128
|
+
}, null)]), e = r("td", h(t, {
|
|
129
129
|
onKeydown: (l) => {
|
|
130
|
-
this.triggerKeydown(l,
|
|
130
|
+
this.triggerKeydown(l, i);
|
|
131
131
|
}
|
|
132
132
|
}), [a]);
|
|
133
133
|
}
|
|
@@ -143,8 +143,7 @@ const v = (e) => {
|
|
|
143
143
|
keydown: this.triggerKeydown,
|
|
144
144
|
click: this.clickHandler
|
|
145
145
|
},
|
|
146
|
-
defaultSlots: a
|
|
147
|
-
swapDefaultSlots: !0
|
|
146
|
+
defaultSlots: a
|
|
148
147
|
});
|
|
149
148
|
}
|
|
150
149
|
});
|
|
@@ -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"),c=require("../utils/main.js"),r=require("@progress/kendo-vue-common"),a=require("@progress/kendo-vue-data-tools"),p=e=>{var n,
|
|
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,o;return(o=(n=e.cells)==null?void 0:n.select)==null?void 0:o[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 o=this.$props.isSelected||c.getNestedValue(this.$props.field,this.$props.dataItem),s=typeof o=="boolean"&&o,i=this.$props.render,l=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:l.tabIndex,"data-keyboardnavlevel":l[a.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":l[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})}});exports.GridSelectionCell=u;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as i, createVNode as l, Fragment as d, mergeProps as
|
|
8
|
+
import { defineComponent as i, createVNode as l, Fragment as d, mergeProps as c, h as p } from "vue";
|
|
9
9
|
import { getNestedValue as h } from "../utils/main.mjs";
|
|
10
10
|
import { noop as u, getTemplate as m, guid as g } from "@progress/kendo-vue-common";
|
|
11
11
|
import { KEYBOARD_NAV_DATA_ID as b, KEYBOARD_NAV_DATA_LEVEL as f } from "@progress/kendo-vue-data-tools";
|
|
@@ -100,11 +100,11 @@ const y = (e) => {
|
|
|
100
100
|
}, null)]), l("label", {
|
|
101
101
|
class: "k-checkbox-label",
|
|
102
102
|
for: this.inputId
|
|
103
|
-
}, null)]), l("td",
|
|
103
|
+
}, null)]), l("td", c(e, {
|
|
104
104
|
onKeydown: this.triggerKeydown
|
|
105
105
|
}), [t])) : null;
|
|
106
106
|
return m.call(this, {
|
|
107
|
-
h:
|
|
107
|
+
h: p,
|
|
108
108
|
template: s || y(this.$props),
|
|
109
109
|
defaultRendering: a,
|
|
110
110
|
additionalProps: {
|
|
@@ -115,8 +115,7 @@ const y = (e) => {
|
|
|
115
115
|
keydown: this.triggerKeydown,
|
|
116
116
|
change: this.handleOnChange
|
|
117
117
|
},
|
|
118
|
-
defaultSlots: t
|
|
119
|
-
swapDefaultSlots: !0
|
|
118
|
+
defaultSlots: t
|
|
120
119
|
});
|
|
121
120
|
}
|
|
122
121
|
});
|
package/common.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ declare const gridProps: {
|
|
|
33
33
|
default: () => any;
|
|
34
34
|
};
|
|
35
35
|
cells: PropType<import('.').GridCellsSettings>;
|
|
36
|
+
rows: PropType<import('./interfaces/GridRowsSettings').GridRowsSettings>;
|
|
36
37
|
defaultColumnsState: {
|
|
37
38
|
type: PropType<import('.').GridColumnState[]>;
|
|
38
39
|
default: () => any;
|
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,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;
|
|
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,rows: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
|
@@ -37,7 +37,6 @@ export declare const PinnedRowsTable: import('vue').DefineComponent<import('vue'
|
|
|
37
37
|
isTop: import('vue').ComputedRef<boolean>;
|
|
38
38
|
pinnedRef: import('vue').ComputedRef<any>;
|
|
39
39
|
handlePinnedScroll: (event: UIEvent) => void;
|
|
40
|
-
rowTemplateSettings: import('vue').ComputedRef<import('../interfaces/GridRowsSettings').GridRowsSettings>;
|
|
41
40
|
pinnedRows: import('vue').ComputedRef<import("vue/jsx-runtime").JSX.Element[]>;
|
|
42
41
|
containerClassName: import('vue').ComputedRef<string>;
|
|
43
42
|
tableClassName: import('vue').ComputedRef<string>;
|
|
@@ -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"),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"),
|
|
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"),T=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 s=n.getRef(this,"table");s&&(s.style.width=e?e+"px":"")},setScrollLeft(e){const s=n.getRef(this,"pinnedRef");s&&s.scrollLeft!==e&&(s.scrollLeft=e)}},setup(e){const s=t.inject("kendo",{}),d=t.computed(()=>e.position==="top"),R=t.computed(()=>d.value?s.pinnedTopRef:s.pinnedBottomRef),m=t.ref(!1),p=a=>{const o=s.containerElementRef;if(!o||m.value)return;const i=a.currentTarget.scrollLeft;o.scrollLeft!==i&&(o.scrollLeft=i)},g=t.computed(()=>!e.pinnedItems||!e.dataRowContext?[]:e.pinnedItems.map((a,o)=>{const i={dataItem:a,rowType:"data",level:0,expanded:!1,dataIndex:o},r=e.dataRowContext.dataItemKey,u="pinned_"+((r?n.getter(r)(a):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,rows:e.rows},{default:()=>[f.row]})})),h=t.computed(()=>n.classNames("k-grid-pinned-container",{"k-pos-bottom":!d.value})),w=t.computed(()=>n.classNames(n.uGrid.table({size:e.size}))),S=a=>{var i,r;const o=(i=e.pinnedItems)==null?void 0:i[a.startRowIndex];o&&((r=s.pinnedSelectionRelease)==null||r.call(s,a,o))},y=t.computed(()=>e.selectable?{...typeof e.selectable=="object"?e.selectable:{},enabled:!0,drag:!1}:e.selectable),N=t.computed(()=>d.value?c.tableKeyboardNavigationTopPinnedAttributes:c.tableKeyboardNavigationBottomPinnedAttributes);return{isTop:d,pinnedRef:R,handlePinnedScroll:p,pinnedRows:g,containerClassName:h,tableClassName:w,handleSelectionRelease:S,pinnedSelectable:y,pinnedBodyAttributes:N}},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=T;
|
|
@@ -5,14 +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 { setRef as c, classNames as f, uGrid as
|
|
10
|
-
import { TableSelection as
|
|
11
|
-
import { provideLocalizationService as
|
|
12
|
-
import { GridRow as
|
|
13
|
-
import { getRowContents as
|
|
14
|
-
import { pinnedTopRowsAriaLabel as
|
|
15
|
-
const
|
|
8
|
+
import { defineComponent as N, createVNode as s, mergeProps as k, inject as G, computed as a, ref as P } from "vue";
|
|
9
|
+
import { setRef as c, classNames as f, uGrid as p, getter as j, getRef as l } from "@progress/kendo-vue-common";
|
|
10
|
+
import { TableSelection as x, tableKeyboardNavigationTopPinnedAttributes as K, tableKeyboardNavigationBottomPinnedAttributes as z } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { provideLocalizationService as u } from "@progress/kendo-vue-intl";
|
|
12
|
+
import { GridRow as B } from "../rows/GridRow.mjs";
|
|
13
|
+
import { getRowContents as E } from "../getRowContents.mjs";
|
|
14
|
+
import { pinnedTopRowsAriaLabel as R, messages as h, pinnedBottomRowsAriaLabel as w } from "../messages/main.mjs";
|
|
15
|
+
const D = /* @__PURE__ */ N({
|
|
16
16
|
name: "PinnedRowsTable",
|
|
17
17
|
props: {
|
|
18
18
|
size: String,
|
|
@@ -49,27 +49,21 @@ const J = /* @__PURE__ */ k({
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
setup(e) {
|
|
52
|
-
const n =
|
|
52
|
+
const n = G("kendo", {}), d = a(() => e.position === "top"), g = a(() => d.value ? n.pinnedTopRef : n.pinnedBottomRef), y = P(!1), S = (o) => {
|
|
53
53
|
const t = n.containerElementRef;
|
|
54
|
-
if (!t ||
|
|
54
|
+
if (!t || y.value)
|
|
55
55
|
return;
|
|
56
56
|
const i = o.currentTarget.scrollLeft;
|
|
57
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) => {
|
|
58
|
+
}, I = a(() => !e.pinnedItems || !e.dataRowContext ? [] : e.pinnedItems.map((o, t) => {
|
|
65
59
|
const i = {
|
|
66
60
|
dataItem: o,
|
|
67
61
|
rowType: "data",
|
|
68
62
|
level: 0,
|
|
69
63
|
expanded: !1,
|
|
70
64
|
dataIndex: t
|
|
71
|
-
}, r = e.dataRowContext.dataItemKey, b = "pinned_" + ((r ?
|
|
72
|
-
return s(
|
|
65
|
+
}, r = e.dataRowContext.dataItemKey, b = "pinned_" + ((r ? j(r)(o) : void 0) || "ai" + t), m = E(e.dataRowContext, i, b, t);
|
|
66
|
+
return s(B, {
|
|
73
67
|
key: b,
|
|
74
68
|
rowType: "data",
|
|
75
69
|
item: i,
|
|
@@ -79,34 +73,34 @@ const J = /* @__PURE__ */ k({
|
|
|
79
73
|
isAltRow: t % 2 !== 0,
|
|
80
74
|
isHidden: !1,
|
|
81
75
|
rowHeight: e.rowHeight,
|
|
82
|
-
isSelected: m.isSelected
|
|
76
|
+
isSelected: m.isSelected,
|
|
77
|
+
rows: e.rows
|
|
83
78
|
}, {
|
|
84
79
|
default: () => [m.row]
|
|
85
80
|
});
|
|
86
|
-
})),
|
|
81
|
+
})), L = a(() => f("k-grid-pinned-container", {
|
|
87
82
|
"k-pos-bottom": !d.value
|
|
88
|
-
})), v = a(() => f(
|
|
83
|
+
})), v = a(() => f(p.table({
|
|
89
84
|
size: e.size
|
|
90
|
-
}))),
|
|
85
|
+
}))), T = (o) => {
|
|
91
86
|
var i, r;
|
|
92
87
|
const t = (i = e.pinnedItems) == null ? void 0 : i[o.startRowIndex];
|
|
93
88
|
t && ((r = n.pinnedSelectionRelease) == null || r.call(n, o, t));
|
|
94
|
-
},
|
|
89
|
+
}, C = a(() => e.selectable ? {
|
|
95
90
|
...typeof e.selectable == "object" ? e.selectable : {},
|
|
96
91
|
enabled: !0,
|
|
97
92
|
drag: !1
|
|
98
|
-
} : e.selectable),
|
|
93
|
+
} : e.selectable), A = a(() => d.value ? K : z);
|
|
99
94
|
return {
|
|
100
95
|
isTop: d,
|
|
101
96
|
pinnedRef: g,
|
|
102
|
-
handlePinnedScroll:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
containerClassName: T,
|
|
97
|
+
handlePinnedScroll: S,
|
|
98
|
+
pinnedRows: I,
|
|
99
|
+
containerClassName: L,
|
|
106
100
|
tableClassName: v,
|
|
107
|
-
handleSelectionRelease:
|
|
108
|
-
pinnedSelectable:
|
|
109
|
-
pinnedBodyAttributes:
|
|
101
|
+
handleSelectionRelease: T,
|
|
102
|
+
pinnedSelectable: C,
|
|
103
|
+
pinnedBodyAttributes: A
|
|
110
104
|
};
|
|
111
105
|
},
|
|
112
106
|
render() {
|
|
@@ -120,22 +114,22 @@ const J = /* @__PURE__ */ k({
|
|
|
120
114
|
class: "k-grid-pinned-wrap",
|
|
121
115
|
ref: c(this, "pinnedRef"),
|
|
122
116
|
onScroll: this.handlePinnedScroll
|
|
123
|
-
}, [s(
|
|
117
|
+
}, [s(x, {
|
|
124
118
|
selectable: this.pinnedSelectable,
|
|
125
119
|
onRelease: this.handleSelectionRelease
|
|
126
120
|
}, {
|
|
127
121
|
default: () => [s("table", {
|
|
128
122
|
ref: c(this, "table"),
|
|
129
123
|
class: this.tableClassName,
|
|
130
|
-
"aria-label": this.isTop ?
|
|
124
|
+
"aria-label": this.isTop ? u(this).toLanguageString(R, h[R]) : u(this).toLanguageString(w, h[w])
|
|
131
125
|
}, [s("colgroup", {
|
|
132
126
|
ref: c(this, "colGroup")
|
|
133
|
-
}, [this.$props.cols]), s("tbody",
|
|
134
|
-
class: f(
|
|
127
|
+
}, [this.$props.cols]), s("tbody", k({
|
|
128
|
+
class: f(p.tbody({}))
|
|
135
129
|
}, this.pinnedBodyAttributes), [this.pinnedRows])])]
|
|
136
130
|
})])]);
|
|
137
131
|
}
|
|
138
132
|
});
|
|
139
133
|
export {
|
|
140
|
-
|
|
134
|
+
D as PinnedRowsTable
|
|
141
135
|
};
|