@progress/kendo-vue-grid 6.4.2-develop.3 → 6.5.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Grid.js +1 -1
- package/Grid.mjs +239 -233
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +12 -9
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/index.d.mts +47 -1
- package/index.d.ts +47 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +34 -10
package/cells/GridCell.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"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),o=require("../utils/main.js"),a=require("@progress/kendo-vue-intl"),s=require("@progress/kendo-vue-common"),l=require("@progress/kendo-vue-data-tools"),d=r.defineComponent({name:"GridCell",inheritAttrs:!1,emits:{cellclick:null,cellkeydown:null},props:{id:String,field:String,dataItem:Object,format:String,readFormat:String,className:String,colSpan:Number,columnIndex:Number,columnsCount:Number,dataIndex:Number,rowType:String,level:Number,expanded:Boolean,type:String,editor:String,isSelected:Boolean,isHighlighted:Boolean,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean,onEdit:Function,onSave:Function,onRemove:Function,onCancel:Function,onChange:Function,onSelectionchange:Function},inject:{kendoIntlService:{default:null},getKeyboardNavigationAttributes:{default:s.noop}},methods:{triggerClick(){this.$emit("cellclick",{dataItem:this.$props.dataItem,field:this.$props.field})},triggerKeydown(e){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field})},triggerEdit(e){this.$emit("edit",e)},triggerAdd(e){this.$emit("add",e)},triggerCancel(e){this.$emit("cancel",e)},triggerSave(e){this.$emit("save",e)},triggerRemove(e){this.$emit("remove",e)}},created(){this._intl=a.provideIntlService(this)},computed:{tdClass(){const{className:e,isHighlighted:t}=this.$props;return{"k-table-td":!0,"k-highlighted":t,[e]:e}}},setup(){return{kendoIntlService:r.inject("kendoIntlService",{})}},render(){let e=null;const t=this.getKeyboardNavigationAttributes(this.$props.id);if(this.$props.rowType==="groupFooter")e=r.createVNode("td",{class:this.tdClass},null);else if(this.$props.field!==void 0&&this.$props.rowType!=="groupHeader"){const i=o.getNestedValue(this.$props.field,this.$props.dataItem);let n="";i!=null&&(n=this.$props.format?this.$props.type?this._intl.format(this.$props.format,o.parsers[this.$props.type](i,this._intl,this.$props.readFormat)):this._intl.format(this.$props.format,i):i.toString()),e=r.createVNode("td",{style:this.$attrs.style,colspan:this.$props.colSpan,class:this.tdClass,onKeydown:this.triggerKeydown,onClick:this.triggerClick,role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,"aria-selected":this.$props.isSelected,"data-grid-col-index":this.$props.columnIndex,tabindex:t.tabIndex,"data-keyboardnavlevel":t[l.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":t[l.KEYBOARD_NAV_DATA_ID]},[n])}return s.getTemplate.call(this,{h:r.h,template:this.$props.render,defaultRendering:e,additionalProps:this.$props,additionalListeners:{click:this.triggerClick,keydown:this.triggerKeydown,edit:this.triggerEdit,add:this.triggerAdd,cancel:this.triggerCancel,save:this.triggerSave,remove:this.triggerRemove}})}});exports.GridCell=d;
|
package/cells/GridCell.mjs
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as o, createVNode as n, h as s, inject as a } from "vue";
|
|
9
|
-
import { getNestedValue as
|
|
9
|
+
import { getNestedValue as l, parsers as d } from "../utils/main.mjs";
|
|
10
10
|
import { provideIntlService as p } from "@progress/kendo-vue-intl";
|
|
11
11
|
import { noop as c, getTemplate as g } from "@progress/kendo-vue-common";
|
|
12
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
12
|
+
import { KEYBOARD_NAV_DATA_ID as h, KEYBOARD_NAV_DATA_LEVEL as m } from "@progress/kendo-vue-data-tools";
|
|
13
13
|
const y = /* @__PURE__ */ o({
|
|
14
14
|
name: "GridCell",
|
|
15
15
|
inheritAttrs: !1,
|
|
@@ -34,6 +34,7 @@ const y = /* @__PURE__ */ o({
|
|
|
34
34
|
type: String,
|
|
35
35
|
editor: String,
|
|
36
36
|
isSelected: Boolean,
|
|
37
|
+
isHighlighted: Boolean,
|
|
37
38
|
ariaColumnIndex: Number,
|
|
38
39
|
render: [String, Function, Object],
|
|
39
40
|
isRtl: Boolean,
|
|
@@ -88,10 +89,12 @@ const y = /* @__PURE__ */ o({
|
|
|
88
89
|
computed: {
|
|
89
90
|
tdClass() {
|
|
90
91
|
const {
|
|
91
|
-
className: t
|
|
92
|
+
className: t,
|
|
93
|
+
isHighlighted: e
|
|
92
94
|
} = this.$props;
|
|
93
95
|
return {
|
|
94
96
|
"k-table-td": !0,
|
|
97
|
+
"k-highlighted": e,
|
|
95
98
|
[t]: t
|
|
96
99
|
};
|
|
97
100
|
}
|
|
@@ -103,15 +106,15 @@ const y = /* @__PURE__ */ o({
|
|
|
103
106
|
},
|
|
104
107
|
render() {
|
|
105
108
|
let t = null;
|
|
106
|
-
const
|
|
109
|
+
const e = this.getKeyboardNavigationAttributes(this.$props.id);
|
|
107
110
|
if (this.$props.rowType === "groupFooter")
|
|
108
111
|
t = n("td", {
|
|
109
112
|
class: this.tdClass
|
|
110
113
|
}, null);
|
|
111
114
|
else if (this.$props.field !== void 0 && this.$props.rowType !== "groupHeader") {
|
|
112
|
-
const
|
|
115
|
+
const i = l(this.$props.field, this.$props.dataItem);
|
|
113
116
|
let r = "";
|
|
114
|
-
|
|
117
|
+
i != null && (r = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, d[this.$props.type](i, this._intl, this.$props.readFormat)) : this._intl.format(this.$props.format, i) : i.toString()), t = n("td", {
|
|
115
118
|
style: this.$attrs.style,
|
|
116
119
|
colspan: this.$props.colSpan,
|
|
117
120
|
class: this.tdClass,
|
|
@@ -121,9 +124,9 @@ const y = /* @__PURE__ */ o({
|
|
|
121
124
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
122
125
|
"aria-selected": this.$props.isSelected,
|
|
123
126
|
"data-grid-col-index": this.$props.columnIndex,
|
|
124
|
-
tabindex:
|
|
125
|
-
"data-keyboardnavlevel":
|
|
126
|
-
"data-keyboardnavid":
|
|
127
|
+
tabindex: e.tabIndex,
|
|
128
|
+
"data-keyboardnavlevel": e[m],
|
|
129
|
+
"data-keyboardnavid": e[h]
|
|
127
130
|
}, [r]);
|
|
128
131
|
}
|
|
129
132
|
return g.call(this, {
|