@progress/kendo-vue-grid 8.1.2-develop.2 → 8.2.0
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 +36 -3
- package/Grid.js +1 -1
- package/Grid.mjs +706 -496
- package/GridSearchBox.js +1 -1
- package/GridSearchBox.mjs +5 -5
- package/GridState.d.ts +6 -0
- package/RootGrid.d.ts +6 -10
- package/cells/GridCell.d.ts +2 -0
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +52 -43
- package/cells/GridDetailCell.d.ts +4 -1
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +27 -18
- package/cells/GridEditCell.d.ts +2 -0
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +21 -14
- package/cells/GridGroupCell.d.ts +1 -0
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +45 -40
- package/cells/GridHierarchyCell.d.ts +1 -0
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +25 -20
- package/cells/GridSelectionCell.d.ts +4 -1
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +31 -21
- package/cells/pincell/GridPinCell.d.ts +6 -2
- package/cells/pincell/GridPinCell.js +1 -1
- package/cells/pincell/GridPinCell.mjs +67 -42
- package/cells/pincell/GridPinDropdownButton.js +1 -1
- package/cells/pincell/GridPinDropdownButton.mjs +25 -25
- package/common.d.ts +3 -0
- package/common.js +1 -1
- package/common.mjs +4 -1
- package/components/PinnedRowsTable.js +1 -1
- package/components/PinnedRowsTable.mjs +46 -34
- package/components/table/GridTable.js +1 -1
- package/components/table/GridTable.mjs +6 -6
- package/components/table/GridTableScrollable.js +1 -1
- package/components/table/GridTableScrollable.mjs +4 -4
- package/contextMenu/GridContextMenu.d.ts +155 -0
- package/contextMenu/GridContextMenu.js +8 -0
- package/contextMenu/GridContextMenu.mjs +336 -0
- package/contextMenu/enums.d.ts +40 -0
- package/contextMenu/enums.js +8 -0
- package/contextMenu/enums.mjs +12 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/header/HeaderRow.d.ts +1 -0
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +92 -81
- package/index.d.mts +3 -0
- package/index.d.ts +3 -0
- package/index.js +1 -1
- package/index.mjs +61 -53
- package/interfaces/GridProps.d.ts +31 -1
- package/interfaces/events.d.ts +38 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
package/cells/GridGroupCell.mjs
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
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 S, createVNode as a, mergeProps as A, h as v } from "vue";
|
|
9
9
|
import { noop as N, Icon as L, getTemplate as w, Keys as K } from "@progress/kendo-vue-common";
|
|
10
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
|
-
import { groupCaretAriaLabelCollapse as
|
|
12
|
-
import { provideLocalizationService as
|
|
11
|
+
import { groupCaretAriaLabelCollapse as x, messages as y, groupCaretAriaLabelExpand as C } from "../messages/main.mjs";
|
|
12
|
+
import { provideLocalizationService as b } 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;
|
|
16
|
-
return (l = (t = e.cells) == null ? void 0 : t.
|
|
17
|
-
},
|
|
16
|
+
return (l = (t = e.cells) == null ? void 0 : t.group) == null ? void 0 : l[e.rowType || "data"];
|
|
17
|
+
}, M = /* @__PURE__ */ S({
|
|
18
18
|
name: "KendoGridGroupCell",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: {
|
|
@@ -45,7 +45,7 @@ const _ = (e) => {
|
|
|
45
45
|
cellkeydown: null
|
|
46
46
|
},
|
|
47
47
|
inject: {
|
|
48
|
-
|
|
48
|
+
gridContext: {
|
|
49
49
|
default: null
|
|
50
50
|
},
|
|
51
51
|
kendoIntlService: {
|
|
@@ -98,7 +98,7 @@ const _ = (e) => {
|
|
|
98
98
|
methods: {
|
|
99
99
|
triggerStateChange() {
|
|
100
100
|
var t;
|
|
101
|
-
const e = this.
|
|
101
|
+
const e = this.gridContext;
|
|
102
102
|
(t = e == null ? void 0 : e.dispatchGroupExpand) == null || t.call(e, {
|
|
103
103
|
type: D.TOGGLE,
|
|
104
104
|
group: this.$props.group
|
|
@@ -129,70 +129,74 @@ const _ = (e) => {
|
|
|
129
129
|
field: void 0,
|
|
130
130
|
value: !l
|
|
131
131
|
}), this.triggerStateChange();
|
|
132
|
+
},
|
|
133
|
+
triggerContextMenu(e) {
|
|
134
|
+
var t, l;
|
|
135
|
+
(l = (t = this.gridContext) == null ? void 0 : t.onContextMenu) == null || l.call(t, e, this.$props.dataItem, this.$props.field);
|
|
132
136
|
}
|
|
133
137
|
},
|
|
134
138
|
render() {
|
|
135
|
-
let e = null, t, l,
|
|
139
|
+
let e = null, t, l, d = null;
|
|
136
140
|
const {
|
|
137
141
|
columnIndex: r,
|
|
138
|
-
level:
|
|
139
|
-
columnsCount:
|
|
140
|
-
rowType:
|
|
142
|
+
level: s,
|
|
143
|
+
columnsCount: p,
|
|
144
|
+
rowType: I,
|
|
141
145
|
dataItem: i,
|
|
142
|
-
field:
|
|
143
|
-
expanded:
|
|
146
|
+
field: c,
|
|
147
|
+
expanded: n,
|
|
144
148
|
render: $,
|
|
145
|
-
locked:
|
|
146
|
-
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h =
|
|
147
|
-
if (r === void 0 ||
|
|
149
|
+
locked: o
|
|
150
|
+
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h = b(this).toLanguageString(x, y[x]), m = b(this).toLanguageString(C, y[C]);
|
|
151
|
+
if (r === void 0 || s === void 0 || r < s || p === void 0 || I !== "groupHeader" || i[c] === void 0)
|
|
148
152
|
t = {
|
|
149
153
|
style: this.$attrs.style,
|
|
150
154
|
key: "g" + r,
|
|
151
155
|
class: this.groupTdClass
|
|
152
|
-
}, e =
|
|
153
|
-
else if (r <=
|
|
156
|
+
}, e = a("td", t, null);
|
|
157
|
+
else if (r <= s) {
|
|
154
158
|
t = {
|
|
155
159
|
style: this.tdStyle,
|
|
156
160
|
key: "g-colspan",
|
|
157
|
-
class:
|
|
158
|
-
colspan:
|
|
161
|
+
class: o ? "k-table-td" : this.tdClass,
|
|
162
|
+
colspan: o ? 0 : p - r,
|
|
159
163
|
role: "gridcell",
|
|
160
164
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
161
165
|
"aria-selected": this.$props.isSelected,
|
|
162
|
-
"aria-expanded":
|
|
166
|
+
"aria-expanded": n,
|
|
163
167
|
"data-grid-col-index": this.$props.columnIndex,
|
|
164
168
|
tabindex: u.tabIndex,
|
|
165
169
|
"data-keyboardnavlevel": u[T],
|
|
166
170
|
"data-keyboardnavid": u[R]
|
|
167
|
-
},
|
|
171
|
+
}, d = a("p", {
|
|
168
172
|
class: "k-reset"
|
|
169
|
-
}, [
|
|
173
|
+
}, [a("a", {
|
|
170
174
|
onClick: (g) => {
|
|
171
|
-
this.clickHandler(g, i,
|
|
175
|
+
this.clickHandler(g, i, n);
|
|
172
176
|
},
|
|
173
177
|
href: "#",
|
|
174
178
|
tabindex: -1,
|
|
175
|
-
title:
|
|
176
|
-
"aria-label":
|
|
177
|
-
}, [
|
|
178
|
-
name:
|
|
179
|
-
icon:
|
|
180
|
-
}, null)]), i[
|
|
181
|
-
const f =
|
|
179
|
+
title: n ? h : m,
|
|
180
|
+
"aria-label": n ? h : m
|
|
181
|
+
}, [a(L, {
|
|
182
|
+
name: n ? "caret-alt-down" : this.isRtl ? "caret-alt-left" : "caret-alt-right",
|
|
183
|
+
icon: n ? E : this.isRtl ? G : O
|
|
184
|
+
}, null)]), i[c] ? i[c].toString() : ""]);
|
|
185
|
+
const f = a("td", A(t, {
|
|
182
186
|
onKeydown: (g) => {
|
|
183
|
-
this.triggerKeydown(g,
|
|
187
|
+
this.triggerKeydown(g, n);
|
|
184
188
|
}
|
|
185
|
-
}), [
|
|
186
|
-
l = {
|
|
189
|
+
}), [d]);
|
|
190
|
+
o && (l = {
|
|
187
191
|
className: "k-table-td",
|
|
188
192
|
role: "gridcell",
|
|
189
|
-
colSpan:
|
|
193
|
+
colSpan: p - r,
|
|
190
194
|
style: {
|
|
191
195
|
borderLeftWidth: 0,
|
|
192
196
|
borderRightWidth: 0
|
|
193
197
|
}
|
|
194
|
-
};
|
|
195
|
-
const k =
|
|
198
|
+
});
|
|
199
|
+
const k = o ? a("td", l, null) : null;
|
|
196
200
|
e = k ? [f, k] : f;
|
|
197
201
|
}
|
|
198
202
|
return w.call(this, {
|
|
@@ -206,12 +210,13 @@ const _ = (e) => {
|
|
|
206
210
|
},
|
|
207
211
|
additionalListeners: {
|
|
208
212
|
keydown: this.triggerKeydown,
|
|
209
|
-
click: this.clickHandler
|
|
213
|
+
click: this.clickHandler,
|
|
214
|
+
contextmenu: this.triggerContextMenu
|
|
210
215
|
},
|
|
211
|
-
defaultSlots:
|
|
216
|
+
defaultSlots: d
|
|
212
217
|
});
|
|
213
218
|
}
|
|
214
219
|
});
|
|
215
220
|
export {
|
|
216
|
-
|
|
221
|
+
M as GridGroupCell
|
|
217
222
|
};
|
|
@@ -39,6 +39,7 @@ declare const GridHierarchyCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
39
39
|
triggerStateChange(): void;
|
|
40
40
|
triggerKeydown(event: any, expanded: boolean | undefined): void;
|
|
41
41
|
clickHandler(e: any, dataItem: any, expanded: boolean | undefined): void;
|
|
42
|
+
triggerContextMenu(e: MouseEvent): void;
|
|
42
43
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
43
44
|
change: any;
|
|
44
45
|
cellkeydown: any;
|
|
@@ -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"),l=require("@progress/kendo-vue-common"),d=require("@progress/kendo-vue-data-tools"),h=require("@progress/kendo-vue-intl"),n=require("../messages/main.js"),g=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"]},f=r.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:{gridContext:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:l.noop}},methods:{triggerStateChange(){const e=this.gridContext;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()},triggerContextMenu(e){var t,a;(a=(t=this.gridContext)==null?void 0:t.onContextMenu)==null||a.call(t,e,this.$props.dataItem,this.$props.field)}},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=h.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=r.createVNode("td",t,null);else if(this.$props.rowType!=="groupHeader"){const i=this.$props.expanded;t={style:this.$attrs.style,class:this.wrapperClass,"aria-expanded":i?"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=r.createVNode("a",{onClick:o=>{this.clickHandler(o,this.$props.dataItem,i)},href:"#",tabindex:-1,title:i?p:u,"aria-label":i?p:u},[r.createVNode(l.Icon,{name:i?"minus":"plus",icon:i?g.minusIcon:g.plusIcon},null)]),e=r.createVNode("td",r.mergeProps(t,{onKeydown:o=>{this.triggerKeydown(o,i)}}),[a])}return l.getTemplate.call(this,{h:r.h,template:this.$props.render||m(this.$props),defaultRendering:e,additionalProps:{...this.$props,tdProps:t},additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler,contextmenu:this.triggerContextMenu},defaultSlots:a})}});exports.GridHierarchyCell=f;
|
|
@@ -5,16 +5,16 @@
|
|
|
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 { noop as f, Icon as y, getTemplate as I, Keys as
|
|
10
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
11
|
-
import { provideLocalizationService as
|
|
8
|
+
import { defineComponent as h, createVNode as r, mergeProps as m, h as g } from "vue";
|
|
9
|
+
import { noop as f, Icon as y, getTemplate as I, Keys as x } from "@progress/kendo-vue-common";
|
|
10
|
+
import { KEYBOARD_NAV_DATA_ID as C, KEYBOARD_NAV_DATA_LEVEL as b, DETAIL_EXPAND_ACTION as $ } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { provideLocalizationService as S } from "@progress/kendo-vue-intl";
|
|
12
12
|
import { collapseDetailAriaLabel as p, messages as c, expandDetailAriaLabel as u } from "../messages/main.mjs";
|
|
13
|
-
import { minusIcon as A, plusIcon as
|
|
14
|
-
const
|
|
13
|
+
import { minusIcon as A, plusIcon as v } from "@progress/kendo-svg-icons";
|
|
14
|
+
const N = (e) => {
|
|
15
15
|
var t, a;
|
|
16
16
|
return (a = (t = e.cells) == null ? void 0 : t.hierarchy) == null ? void 0 : a[e.rowType || "data"];
|
|
17
|
-
}, E = /* @__PURE__ */
|
|
17
|
+
}, E = /* @__PURE__ */ h({
|
|
18
18
|
name: "KendoGridHierarchyCell",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: {
|
|
@@ -43,7 +43,7 @@ const v = (e) => {
|
|
|
43
43
|
cellkeydown: null
|
|
44
44
|
},
|
|
45
45
|
inject: {
|
|
46
|
-
|
|
46
|
+
gridContext: {
|
|
47
47
|
default: null
|
|
48
48
|
},
|
|
49
49
|
kendoIntlService: {
|
|
@@ -58,9 +58,9 @@ const v = (e) => {
|
|
|
58
58
|
},
|
|
59
59
|
methods: {
|
|
60
60
|
triggerStateChange() {
|
|
61
|
-
const e = this.
|
|
61
|
+
const e = this.gridContext;
|
|
62
62
|
e.dataItemKey && this.$props.dataItem[e.dataItemKey] !== void 0 && (e == null || e.dispatchDetailExpand({
|
|
63
|
-
type:
|
|
63
|
+
type: $.TOGGLE,
|
|
64
64
|
id: this.$props.dataItem[e.dataItemKey]
|
|
65
65
|
}));
|
|
66
66
|
},
|
|
@@ -70,7 +70,7 @@ const v = (e) => {
|
|
|
70
70
|
dataItem: this.$props.dataItem,
|
|
71
71
|
field: this.$props.field,
|
|
72
72
|
expanded: t
|
|
73
|
-
}), !e.defaultPrevented && e.keyCode ===
|
|
73
|
+
}), !e.defaultPrevented && e.keyCode === x.enter && (e.preventDefault(), this.$emit("change", {
|
|
74
74
|
dataItem: this.$props.dataItem,
|
|
75
75
|
dataIndex: this.$props.dataIndex,
|
|
76
76
|
event: e,
|
|
@@ -85,6 +85,10 @@ const v = (e) => {
|
|
|
85
85
|
field: void 0,
|
|
86
86
|
value: !a
|
|
87
87
|
}), this.triggerStateChange();
|
|
88
|
+
},
|
|
89
|
+
triggerContextMenu(e) {
|
|
90
|
+
var t, a;
|
|
91
|
+
(a = (t = this.gridContext) == null ? void 0 : t.onContextMenu) == null || a.call(t, e, this.$props.dataItem, this.$props.field);
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
94
|
computed: {
|
|
@@ -98,7 +102,7 @@ const v = (e) => {
|
|
|
98
102
|
},
|
|
99
103
|
render() {
|
|
100
104
|
let e = null, t, a = null;
|
|
101
|
-
const n = this.getKeyboardNavigationAttributes(this.$props.id),
|
|
105
|
+
const n = this.getKeyboardNavigationAttributes(this.$props.id), o = S(this), s = o.toLanguageString(p, c[p]), d = o.toLanguageString(u, c[u]);
|
|
102
106
|
if (this.$props.rowType === "groupFooter")
|
|
103
107
|
t = {
|
|
104
108
|
class: this.wrapperClass
|
|
@@ -112,20 +116,20 @@ const v = (e) => {
|
|
|
112
116
|
role: "gridcell",
|
|
113
117
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
114
118
|
tabindex: n.tabIndex,
|
|
115
|
-
"data-keyboardnavlevel": n[
|
|
116
|
-
"data-keyboardnavid": n[
|
|
119
|
+
"data-keyboardnavlevel": n[b],
|
|
120
|
+
"data-keyboardnavid": n[C]
|
|
117
121
|
}, a = r("a", {
|
|
118
122
|
onClick: (l) => {
|
|
119
123
|
this.clickHandler(l, this.$props.dataItem, i);
|
|
120
124
|
},
|
|
121
125
|
href: "#",
|
|
122
126
|
tabindex: -1,
|
|
123
|
-
title: i ?
|
|
124
|
-
"aria-label": i ?
|
|
127
|
+
title: i ? s : d,
|
|
128
|
+
"aria-label": i ? s : d
|
|
125
129
|
}, [r(y, {
|
|
126
130
|
name: i ? "minus" : "plus",
|
|
127
|
-
icon: i ? A :
|
|
128
|
-
}, null)]), e = r("td",
|
|
131
|
+
icon: i ? A : v
|
|
132
|
+
}, null)]), e = r("td", m(t, {
|
|
129
133
|
onKeydown: (l) => {
|
|
130
134
|
this.triggerKeydown(l, i);
|
|
131
135
|
}
|
|
@@ -133,7 +137,7 @@ const v = (e) => {
|
|
|
133
137
|
}
|
|
134
138
|
return I.call(this, {
|
|
135
139
|
h: g,
|
|
136
|
-
template: this.$props.render ||
|
|
140
|
+
template: this.$props.render || N(this.$props),
|
|
137
141
|
defaultRendering: e,
|
|
138
142
|
additionalProps: {
|
|
139
143
|
...this.$props,
|
|
@@ -141,7 +145,8 @@ const v = (e) => {
|
|
|
141
145
|
},
|
|
142
146
|
additionalListeners: {
|
|
143
147
|
keydown: this.triggerKeydown,
|
|
144
|
-
click: this.clickHandler
|
|
148
|
+
click: this.clickHandler,
|
|
149
|
+
contextmenu: this.triggerContextMenu
|
|
145
150
|
},
|
|
146
151
|
defaultSlots: a
|
|
147
152
|
});
|
|
@@ -28,7 +28,9 @@ declare const GridSelectionCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
28
28
|
editor: PropType<string>;
|
|
29
29
|
isRtl: PropType<boolean>;
|
|
30
30
|
cells: PropType<import('..').GridCellsSettings>;
|
|
31
|
-
}>, {
|
|
31
|
+
}>, {
|
|
32
|
+
gridContext: any;
|
|
33
|
+
}, {
|
|
32
34
|
inputId: any;
|
|
33
35
|
}, {
|
|
34
36
|
tdClass(): {
|
|
@@ -38,6 +40,7 @@ declare const GridSelectionCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
38
40
|
}, {
|
|
39
41
|
triggerKeydown(e: any): void;
|
|
40
42
|
handleOnChange(event: any): void;
|
|
43
|
+
triggerContextMenu(e: MouseEvent): void;
|
|
41
44
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
42
45
|
selectionchange: any;
|
|
43
46
|
cellkeydown: any;
|
|
@@ -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 n=require("vue"),c=require("../utils/main.js"),l=require("@progress/kendo-vue-common"),i=require("@progress/kendo-vue-data-tools"),u=e=>{var t,o;return(o=(t=e.cells)==null?void 0:t.select)==null?void 0:o[e.rowType||"data"]},p=n.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:l.noop}},data(){return{inputId:l.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})},triggerContextMenu(e){var t,o;(o=(t=this.gridContext)==null?void 0:t.onContextMenu)==null||o.call(t,e,this.$props.dataItem,this.$props.field)}},setup(){return{gridContext:n.inject("gridContext",null)}},render(){let e,t=null;const o=this.$props.isSelected||c.getNestedValue(this.$props.field,this.$props.dataItem),s=typeof o=="boolean"&&o,a=this.$props.render,r=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:r.tabIndex,"data-keyboardnavlevel":r[i.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":r[i.KEYBOARD_NAV_DATA_ID]},t=n.createVNode(n.Fragment,null,[n.createVNode("span",{class:"k-checkbox-wrap"},[n.createVNode("input",{checked:s,id:this.inputId,type:"checkbox",class:"k-checkbox k-checkbox-md k-rounded-md",onChange:this.handleOnChange},null)]),n.createVNode("label",{class:"k-checkbox-label",for:this.inputId},null)]),n.createVNode("td",n.mergeProps(e,{onKeydown:this.triggerKeydown}),[t])):null;return l.getTemplate.call(this,{h:n.h,template:a||u(this.$props),defaultRendering:d,additionalProps:{...this.$props,tdProps:e},additionalListeners:{keydown:this.triggerKeydown,change:this.handleOnChange,contextmenu:this.triggerContextMenu},defaultSlots:t})}});exports.GridSelectionCell=p;
|
|
@@ -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
|
|
8
|
+
import { defineComponent as a, createVNode as o, Fragment as d, mergeProps as p, h as c, inject as u } from "vue";
|
|
9
9
|
import { getNestedValue as h } from "../utils/main.mjs";
|
|
10
|
-
import { noop as
|
|
11
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
12
|
-
const
|
|
10
|
+
import { noop as g, getTemplate as m, guid as b } from "@progress/kendo-vue-common";
|
|
11
|
+
import { KEYBOARD_NAV_DATA_ID as C, KEYBOARD_NAV_DATA_LEVEL as x } from "@progress/kendo-vue-data-tools";
|
|
12
|
+
const f = (e) => {
|
|
13
13
|
var t, n;
|
|
14
14
|
return (n = (t = e.cells) == null ? void 0 : t.select) == null ? void 0 : n[e.rowType || "data"];
|
|
15
|
-
},
|
|
15
|
+
}, S = /* @__PURE__ */ a({
|
|
16
16
|
name: "KendoGridSelectionCell",
|
|
17
17
|
inheritAttrs: !1,
|
|
18
18
|
props: {
|
|
@@ -44,12 +44,12 @@ const y = (e) => {
|
|
|
44
44
|
default: null
|
|
45
45
|
},
|
|
46
46
|
getKeyboardNavigationAttributes: {
|
|
47
|
-
default:
|
|
47
|
+
default: g
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
data() {
|
|
51
51
|
return {
|
|
52
|
-
inputId:
|
|
52
|
+
inputId: b()
|
|
53
53
|
};
|
|
54
54
|
},
|
|
55
55
|
computed: {
|
|
@@ -76,49 +76,59 @@ const y = (e) => {
|
|
|
76
76
|
event: e,
|
|
77
77
|
dataItem: this.$props.dataItem
|
|
78
78
|
});
|
|
79
|
+
},
|
|
80
|
+
triggerContextMenu(e) {
|
|
81
|
+
var t, n;
|
|
82
|
+
(n = (t = this.gridContext) == null ? void 0 : t.onContextMenu) == null || n.call(t, e, this.$props.dataItem, this.$props.field);
|
|
79
83
|
}
|
|
80
84
|
},
|
|
85
|
+
setup() {
|
|
86
|
+
return {
|
|
87
|
+
gridContext: u("gridContext", null)
|
|
88
|
+
};
|
|
89
|
+
},
|
|
81
90
|
render() {
|
|
82
91
|
let e, t = null;
|
|
83
|
-
const n = this.$props.isSelected || h(this.$props.field, this.$props.dataItem),
|
|
92
|
+
const n = this.$props.isSelected || h(this.$props.field, this.$props.dataItem), i = typeof n == "boolean" && n, l = this.$props.render, r = this.getKeyboardNavigationAttributes(this.$props.id), s = this.$props.rowType !== "groupHeader" ? (e = {
|
|
84
93
|
style: this.$attrs.style,
|
|
85
94
|
colspan: this.$props.colSpan,
|
|
86
95
|
class: this.tdClass,
|
|
87
96
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
88
97
|
role: "gridcell",
|
|
89
|
-
tabindex:
|
|
90
|
-
"data-keyboardnavlevel":
|
|
91
|
-
"data-keyboardnavid":
|
|
92
|
-
}, t =
|
|
98
|
+
tabindex: r.tabIndex,
|
|
99
|
+
"data-keyboardnavlevel": r[x],
|
|
100
|
+
"data-keyboardnavid": r[C]
|
|
101
|
+
}, t = o(d, null, [o("span", {
|
|
93
102
|
class: "k-checkbox-wrap"
|
|
94
|
-
}, [
|
|
95
|
-
checked:
|
|
103
|
+
}, [o("input", {
|
|
104
|
+
checked: i,
|
|
96
105
|
id: this.inputId,
|
|
97
106
|
type: "checkbox",
|
|
98
107
|
class: "k-checkbox k-checkbox-md k-rounded-md",
|
|
99
108
|
onChange: this.handleOnChange
|
|
100
|
-
}, null)]),
|
|
109
|
+
}, null)]), o("label", {
|
|
101
110
|
class: "k-checkbox-label",
|
|
102
111
|
for: this.inputId
|
|
103
|
-
}, null)]),
|
|
112
|
+
}, null)]), o("td", p(e, {
|
|
104
113
|
onKeydown: this.triggerKeydown
|
|
105
114
|
}), [t])) : null;
|
|
106
115
|
return m.call(this, {
|
|
107
|
-
h:
|
|
108
|
-
template:
|
|
109
|
-
defaultRendering:
|
|
116
|
+
h: c,
|
|
117
|
+
template: l || f(this.$props),
|
|
118
|
+
defaultRendering: s,
|
|
110
119
|
additionalProps: {
|
|
111
120
|
...this.$props,
|
|
112
121
|
tdProps: e
|
|
113
122
|
},
|
|
114
123
|
additionalListeners: {
|
|
115
124
|
keydown: this.triggerKeydown,
|
|
116
|
-
change: this.handleOnChange
|
|
125
|
+
change: this.handleOnChange,
|
|
126
|
+
contextmenu: this.triggerContextMenu
|
|
117
127
|
},
|
|
118
128
|
defaultSlots: t
|
|
119
129
|
});
|
|
120
130
|
}
|
|
121
131
|
});
|
|
122
132
|
export {
|
|
123
|
-
|
|
133
|
+
S as GridSelectionCell
|
|
124
134
|
};
|
|
@@ -42,8 +42,12 @@ export declare const GridPinCell: import('vue').DefineComponent<import('vue').Ex
|
|
|
42
42
|
isRtl: PropType<boolean>;
|
|
43
43
|
}>, {
|
|
44
44
|
getKeyboardNavigationAttributes: () => void;
|
|
45
|
-
|
|
46
|
-
}, {}, {}, {
|
|
45
|
+
gridContext: any;
|
|
46
|
+
}, {}, {}, {
|
|
47
|
+
triggerClick(): void;
|
|
48
|
+
triggerKeydown(e: any): void;
|
|
49
|
+
triggerContextMenu(e: MouseEvent): void;
|
|
50
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
47
51
|
id: PropType<string>;
|
|
48
52
|
field: PropType<string>;
|
|
49
53
|
dataItem: PropType<any>;
|
|
@@ -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 n=require("vue"),o=require("@progress/kendo-vue-data-tools"),a=require("@progress/kendo-vue-common"),m=require("./GridPinDropdownButton.js"),s=e=>{var t,i;return(i=(t=e.cells)==null?void 0:t.pin)==null?void 0:i[e.rowType||"data"]},p=n.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:a.noop}},setup(){const e=n.inject("getKeyboardNavigationAttributes",a.noop),t=n.inject("gridContext",null);return{getKeyboardNavigationAttributes:e,gridContext:t}},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})},triggerContextMenu(e){var t,i;(i=(t=this.gridContext)==null?void 0:t.onContextMenu)==null||i.call(t,e,this.$props.dataItem,this.$props.field)}},render(){var l,d;const e=this.$props;let t=null;const i=this.getKeyboardNavigationAttributes(e.id);let r={};if(e.rowType==="groupFooter")r={class:e.className,tabindex:i.tabIndex,"data-keyboardnavlevel":i[o.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":i[o.KEYBOARD_NAV_DATA_ID]},t=n.createVNode("td",n.mergeProps(r,{onClick:this.triggerClick,onKeydown:this.triggerKeydown,onContextmenu:this.triggerContextMenu}),null);else if(e.rowType!=="groupHeader"){const c=(d=(l=e.unstyled)==null?void 0:l.uGrid)!=null?d:a.uGrid,u=a.classNames(c.td({selected:e.isSelected,highlighted:e.isHighlighted,sorted:e.isSorted,alt:e.isAlt}),e.className);r={style:this.$attrs.style,colspan:e.colSpan,class:u,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[o.TABLE_COL_INDEX_ATTRIBUTE]:e.columnIndex,tabindex:i.tabIndex,"data-keyboardnavlevel":i[o.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":i[o.KEYBOARD_NAV_DATA_ID]},t=n.createVNode("td",n.mergeProps(r,{onClick:this.triggerClick,onKeydown:this.triggerKeydown,onContextmenu:this.triggerContextMenu}),[n.createVNode(m.GridPinDropdownButton,{dataItem:e.dataItem},null)])}const g=s(e);return a.getTemplate.call(this,{h:n.h,template:g,defaultRendering:t,additionalProps:{...e,tdProps:r},additionalListeners:{click:this.triggerClick,keydown:this.triggerKeydown,contextmenu:this.triggerContextMenu}})}});exports.GridPinCell=p;exports.getCustomCell=s;
|
|
@@ -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 { KEYBOARD_NAV_DATA_ID as s, KEYBOARD_NAV_DATA_LEVEL as
|
|
10
|
-
import { noop as
|
|
11
|
-
import { GridPinDropdownButton as
|
|
12
|
-
const
|
|
13
|
-
var
|
|
14
|
-
return (
|
|
15
|
-
},
|
|
8
|
+
import { defineComponent as h, createVNode as r, mergeProps as l, h as C, inject as d } from "vue";
|
|
9
|
+
import { KEYBOARD_NAV_DATA_ID as s, KEYBOARD_NAV_DATA_LEVEL as g, TABLE_COL_INDEX_ATTRIBUTE as b } from "@progress/kendo-vue-data-tools";
|
|
10
|
+
import { noop as c, uGrid as y, classNames as x, getTemplate as N } from "@progress/kendo-vue-common";
|
|
11
|
+
import { GridPinDropdownButton as f } from "./GridPinDropdownButton.mjs";
|
|
12
|
+
const I = (e) => {
|
|
13
|
+
var t, i;
|
|
14
|
+
return (i = (t = e.cells) == null ? void 0 : t.pin) == null ? void 0 : i[e.rowType || "data"];
|
|
15
|
+
}, v = /* @__PURE__ */ h({
|
|
16
16
|
name: "GridPinCell",
|
|
17
17
|
inheritAttrs: !1,
|
|
18
18
|
props: {
|
|
@@ -41,71 +41,96 @@ const f = (e) => {
|
|
|
41
41
|
},
|
|
42
42
|
inject: {
|
|
43
43
|
getKeyboardNavigationAttributes: {
|
|
44
|
-
default:
|
|
45
|
-
},
|
|
46
|
-
triggerCellContextMenu: {
|
|
47
|
-
default: a
|
|
44
|
+
default: c
|
|
48
45
|
}
|
|
49
46
|
},
|
|
50
47
|
setup() {
|
|
51
|
-
const e = d("getKeyboardNavigationAttributes",
|
|
48
|
+
const e = d("getKeyboardNavigationAttributes", c), t = d("gridContext", null);
|
|
52
49
|
return {
|
|
53
50
|
getKeyboardNavigationAttributes: e,
|
|
54
|
-
|
|
51
|
+
gridContext: t
|
|
55
52
|
};
|
|
56
53
|
},
|
|
54
|
+
methods: {
|
|
55
|
+
triggerClick() {
|
|
56
|
+
this.$emit("cellclick", {
|
|
57
|
+
dataItem: this.$props.dataItem,
|
|
58
|
+
field: this.$props.field
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
triggerKeydown(e) {
|
|
62
|
+
this.$emit("cellkeydown", {
|
|
63
|
+
event: e,
|
|
64
|
+
dataItem: this.$props.dataItem,
|
|
65
|
+
field: this.$props.field
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
triggerContextMenu(e) {
|
|
69
|
+
var t, i;
|
|
70
|
+
(i = (t = this.gridContext) == null ? void 0 : t.onContextMenu) == null || i.call(t, e, this.$props.dataItem, this.$props.field);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
57
73
|
render() {
|
|
58
|
-
var
|
|
74
|
+
var o, a;
|
|
59
75
|
const e = this.$props;
|
|
60
|
-
let
|
|
61
|
-
const
|
|
62
|
-
let
|
|
76
|
+
let t = null;
|
|
77
|
+
const i = this.getKeyboardNavigationAttributes(e.id);
|
|
78
|
+
let n = {};
|
|
63
79
|
if (e.rowType === "groupFooter")
|
|
64
|
-
|
|
80
|
+
n = {
|
|
65
81
|
class: e.className,
|
|
66
|
-
tabindex:
|
|
67
|
-
"data-keyboardnavlevel":
|
|
68
|
-
"data-keyboardnavid":
|
|
69
|
-
},
|
|
82
|
+
tabindex: i.tabIndex,
|
|
83
|
+
"data-keyboardnavlevel": i[g],
|
|
84
|
+
"data-keyboardnavid": i[s]
|
|
85
|
+
}, t = r("td", l(n, {
|
|
86
|
+
onClick: this.triggerClick,
|
|
87
|
+
onKeydown: this.triggerKeydown,
|
|
88
|
+
onContextmenu: this.triggerContextMenu
|
|
89
|
+
}), null);
|
|
70
90
|
else if (e.rowType !== "groupHeader") {
|
|
71
|
-
const
|
|
91
|
+
const u = (a = (o = e.unstyled) == null ? void 0 : o.uGrid) != null ? a : y, p = x(u.td({
|
|
72
92
|
selected: e.isSelected,
|
|
73
93
|
highlighted: e.isHighlighted,
|
|
74
94
|
sorted: e.isSorted,
|
|
75
95
|
alt: e.isAlt
|
|
76
96
|
}), e.className);
|
|
77
|
-
|
|
97
|
+
n = {
|
|
78
98
|
style: this.$attrs.style,
|
|
79
99
|
colspan: e.colSpan,
|
|
80
|
-
class:
|
|
100
|
+
class: p,
|
|
81
101
|
role: "gridcell",
|
|
82
102
|
"aria-colindex": e.ariaColumnIndex,
|
|
83
103
|
"aria-selected": e.isSelected,
|
|
84
|
-
[
|
|
85
|
-
tabindex:
|
|
86
|
-
"data-keyboardnavlevel":
|
|
87
|
-
"data-keyboardnavid":
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
104
|
+
[b]: e.columnIndex,
|
|
105
|
+
tabindex: i.tabIndex,
|
|
106
|
+
"data-keyboardnavlevel": i[g],
|
|
107
|
+
"data-keyboardnavid": i[s]
|
|
108
|
+
}, t = r("td", l(n, {
|
|
109
|
+
onClick: this.triggerClick,
|
|
110
|
+
onKeydown: this.triggerKeydown,
|
|
111
|
+
onContextmenu: this.triggerContextMenu
|
|
112
|
+
}), [r(f, {
|
|
92
113
|
dataItem: e.dataItem
|
|
93
114
|
}, null)]);
|
|
94
115
|
}
|
|
95
|
-
const
|
|
96
|
-
return
|
|
116
|
+
const m = I(e);
|
|
117
|
+
return N.call(this, {
|
|
97
118
|
h: C,
|
|
98
|
-
template:
|
|
99
|
-
defaultRendering:
|
|
119
|
+
template: m,
|
|
120
|
+
defaultRendering: t,
|
|
100
121
|
additionalProps: {
|
|
101
122
|
...e,
|
|
102
|
-
tdProps:
|
|
123
|
+
tdProps: n
|
|
103
124
|
},
|
|
104
|
-
additionalListeners: {
|
|
125
|
+
additionalListeners: {
|
|
126
|
+
click: this.triggerClick,
|
|
127
|
+
keydown: this.triggerKeydown,
|
|
128
|
+
contextmenu: this.triggerContextMenu
|
|
129
|
+
}
|
|
105
130
|
});
|
|
106
131
|
}
|
|
107
132
|
});
|
|
108
133
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
134
|
+
v as GridPinCell,
|
|
135
|
+
I as getCustomCell
|
|
111
136
|
};
|