@progress/kendo-vue-grid 8.1.2-develop.1 → 8.2.0-develop.1
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/NOTICE.txt +117 -53
- 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
|
@@ -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
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),m=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},gridContext:{default:null}},setup(l){const e=o.inject("kendoLocalizationService",{}),s=o.inject("gridContext",{}),i=o.ref(!1),T="#",P=m.guid(),a=o.computed(()=>s!=null&&s.getRowPinPosition?s.getRowPinPosition(l.dataItem):"none"),p=o.computed(()=>a.value!=="none"),r=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]}),c=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:c.value,svgIcon:u.unpinOutlineIcon,data:{action:"unpin"}}),a.value!=="top"&&n.push({text:r.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:r,unpinText:c,menuItems:I,handleToggle:n=>{n.preventDefault(),i.value=!i.value},handleClose:n=>{n.isAnchorClicked||(i.value=!1)},handleMenuSelect:n=>{var d,h,g;const v=(h=(d=n.item)==null?void 0:d.data)==null?void 0:h.action;(g=s==null?void 0:s.onRowPin)==null||g.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(m.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;
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as M, createVNode as u, inject as P, ref as O, computed as e } from "vue";
|
|
9
|
-
import { Icon as
|
|
10
|
-
import { Popup as
|
|
11
|
-
import { unpinOutlineIcon as I, pinOutlineIcon as
|
|
12
|
-
import { messages as
|
|
9
|
+
import { Icon as C, guid as j } from "@progress/kendo-vue-common";
|
|
10
|
+
import { Popup as D } from "@progress/kendo-vue-popup";
|
|
11
|
+
import { unpinOutlineIcon as I, pinOutlineIcon as R, pinOutlineTopIcon as V, pinOutlineBottomIcon as A } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { messages as i, gridPinToTop as l, gridPinToBottom as p, gridUnpin as r } from "../../messages/main.mjs";
|
|
13
13
|
import { Menu as G } from "@progress/kendo-vue-layout";
|
|
14
14
|
const Q = /* @__PURE__ */ M({
|
|
15
15
|
name: "GridPinDropdownButton",
|
|
@@ -20,21 +20,21 @@ const Q = /* @__PURE__ */ M({
|
|
|
20
20
|
kendoLocalizationService: {
|
|
21
21
|
default: null
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
gridContext: {
|
|
24
24
|
default: null
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const t = P("kendoLocalizationService", {}), o = P("
|
|
27
|
+
setup(h) {
|
|
28
|
+
const t = P("kendoLocalizationService", {}), o = P("gridContext", {}), s = O(!1), w = "#", v = j(), a = e(() => o != null && o.getRowPinPosition ? o.getRowPinPosition(h.dataItem) : "none"), c = e(() => a.value !== "none"), m = e(() => {
|
|
29
29
|
var n;
|
|
30
|
-
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, l,
|
|
31
|
-
}),
|
|
30
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, l, i[l])) || i[l];
|
|
31
|
+
}), x = e(() => {
|
|
32
32
|
var n;
|
|
33
|
-
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, p,
|
|
33
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, p, i[p])) || i[p];
|
|
34
34
|
}), d = e(() => {
|
|
35
35
|
var n;
|
|
36
|
-
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t,
|
|
37
|
-
}),
|
|
36
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, r, i[r])) || i[r];
|
|
37
|
+
}), B = e(() => {
|
|
38
38
|
const n = [];
|
|
39
39
|
return c.value && n.push({
|
|
40
40
|
text: d.value,
|
|
@@ -44,13 +44,13 @@ const Q = /* @__PURE__ */ M({
|
|
|
44
44
|
}
|
|
45
45
|
}), a.value !== "top" && n.push({
|
|
46
46
|
text: m.value,
|
|
47
|
-
svgIcon:
|
|
47
|
+
svgIcon: V,
|
|
48
48
|
data: {
|
|
49
49
|
action: "pinTop"
|
|
50
50
|
}
|
|
51
51
|
}), a.value !== "bottom" && n.push({
|
|
52
|
-
text:
|
|
53
|
-
svgIcon:
|
|
52
|
+
text: x.value,
|
|
53
|
+
svgIcon: A,
|
|
54
54
|
data: {
|
|
55
55
|
action: "pinBottom"
|
|
56
56
|
}
|
|
@@ -58,22 +58,22 @@ const Q = /* @__PURE__ */ M({
|
|
|
58
58
|
});
|
|
59
59
|
return {
|
|
60
60
|
anchor: v,
|
|
61
|
-
showPopup:
|
|
61
|
+
showPopup: s,
|
|
62
62
|
hrefValue: w,
|
|
63
63
|
isPinned: c,
|
|
64
64
|
pinToTopText: m,
|
|
65
65
|
unpinText: d,
|
|
66
|
-
menuItems:
|
|
66
|
+
menuItems: B,
|
|
67
67
|
handleToggle: (n) => {
|
|
68
|
-
n.preventDefault(),
|
|
68
|
+
n.preventDefault(), s.value = !s.value;
|
|
69
69
|
},
|
|
70
70
|
handleClose: (n) => {
|
|
71
|
-
n.isAnchorClicked || (
|
|
71
|
+
n.isAnchorClicked || (s.value = !1);
|
|
72
72
|
},
|
|
73
73
|
handleMenuSelect: (n) => {
|
|
74
|
-
var
|
|
75
|
-
const
|
|
76
|
-
(T = o == null ? void 0 : o.onRowPin) == null || T.call(o,
|
|
74
|
+
var g, f, T;
|
|
75
|
+
const b = (f = (g = n.item) == null ? void 0 : g.data) == null ? void 0 : f.action;
|
|
76
|
+
(T = o == null ? void 0 : o.onRowPin) == null || T.call(o, b, h.dataItem), s.value = !1;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
},
|
|
@@ -85,10 +85,10 @@ const Q = /* @__PURE__ */ M({
|
|
|
85
85
|
tabindex: -1,
|
|
86
86
|
onClick: this.handleToggle,
|
|
87
87
|
"aria-label": this.isPinned ? this.unpinText : this.pinToTopText
|
|
88
|
-
}, [u(
|
|
88
|
+
}, [u(C, {
|
|
89
89
|
name: this.isPinned ? "unpin" : "pin",
|
|
90
|
-
icon: this.isPinned ? I :
|
|
91
|
-
}, null)]), u(
|
|
90
|
+
icon: this.isPinned ? I : R
|
|
91
|
+
}, null)]), u(D, {
|
|
92
92
|
anchor: this.anchor,
|
|
93
93
|
show: this.showPopup,
|
|
94
94
|
anchorAlign: {
|
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
|
+
contextMenu: PropType<boolean | import('.').GridContextMenuOptions | ((options: import('.').GridCellBaseOptions) => boolean | import('.').GridContextMenuOptions)>;
|
|
36
37
|
rows: PropType<import('./interfaces/GridRowsSettings').GridRowsSettings>;
|
|
37
38
|
defaultColumnsState: {
|
|
38
39
|
type: PropType<import('.').GridColumnState[]>;
|
|
@@ -191,5 +192,7 @@ declare const gridProps: {
|
|
|
191
192
|
onSearchchange: PropType<(event: import('.').GridSearchChangeEvent) => void>;
|
|
192
193
|
onGroupexpandchange: PropType<(event: import('.').GridGroupExpandChangeEvent) => void>;
|
|
193
194
|
onDetailexpandchange: PropType<(event: import('.').GridDetailExpandChangeEvent) => void>;
|
|
195
|
+
onContextmenu: PropType<(event: import('.').GridContextMenuEvent) => void>;
|
|
196
|
+
onContextmenuitemclick: PropType<(event: import('.').GridContextMenuItemClickEvent) => void>;
|
|
194
197
|
};
|
|
195
198
|
export { gridProps };
|
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,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;
|
|
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,contextMenu:[Boolean,Object,Function],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,onContextmenu:Function,onContextmenuitemclick:Function};exports.gridProps=n;
|
package/common.mjs
CHANGED
|
@@ -31,6 +31,7 @@ const a = {
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
cells: Object,
|
|
34
|
+
contextMenu: [Boolean, Object, Function],
|
|
34
35
|
rows: Object,
|
|
35
36
|
defaultColumnsState: {
|
|
36
37
|
type: Array,
|
|
@@ -128,7 +129,9 @@ const a = {
|
|
|
128
129
|
onGroupchange: Function,
|
|
129
130
|
onSearchchange: Function,
|
|
130
131
|
onGroupexpandchange: Function,
|
|
131
|
-
onDetailexpandchange: Function
|
|
132
|
+
onDetailexpandchange: Function,
|
|
133
|
+
onContextmenu: Function,
|
|
134
|
+
onContextmenuitemclick: Function
|
|
132
135
|
};
|
|
133
136
|
export {
|
|
134
137
|
a as gridProps
|
|
@@ -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"),o=require("@progress/kendo-vue-common"),c=require("@progress/kendo-vue-data-tools"),b=require("@progress/kendo-vue-intl"),T=require("../rows/GridRow.js"),I=require("../getRowContents.js"),l=require("../messages/main.js"),C=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=o.getRef(this,"table"),this.colGroupRefEl=o.getRef(this,"colGroup")},updated(){this.tableRef=o.getRef(this,"table"),this.colGroupRefEl=o.getRef(this,"colGroup")},methods:{setWidth(e){const a=o.getRef(this,"table");a&&(a.style.width=e?e+"px":"")},setScrollLeft(e){const a=o.getRef(this,"pinnedRef");a&&a.scrollLeft!==e&&(a.scrollLeft=e)}},setup(e){const a=t.inject("gridContext",{}),d=t.computed(()=>e.position==="top"),m=t.computed(()=>d.value?a.pinnedTopRef:a.pinnedBottomRef),w=t.ref(!1),g=i=>{const n=a.containerElementRef;if(!n||w.value)return;const s=i.currentTarget.scrollLeft;n.scrollLeft!==s&&(n.scrollLeft=s)},h=t.computed(()=>{if(!e.rows)return;const{pinnedData:i,...n}=e.rows;return i?{...n,data:i}:e.rows}),p=t.computed(()=>!e.pinnedItems||!e.dataRowContext?[]:e.pinnedItems.map((i,n)=>{var R;const s={dataItem:i,rowType:"data",level:0,expanded:!1,dataIndex:n},r=e.dataRowContext.dataItemKey,u="pinned_"+((r?o.getter(r)(i):void 0)||"ai"+n),f=I.getRowContents(e.dataRowContext,s,u,n);return(R=e.rows)!=null&&R.pinnedData?{...e.rows,data:e.rows.pinnedData}:e.rows,t.createVNode(T.GridRow,{key:u,rowType:"data",isPinned:!0,item:s,dataIndex:n,ariaRowIndex:n+1,absoluteRowIndex:n,isAltRow:n%2!==0,isHidden:!1,rowHeight:e.rowHeight,isSelected:f.isSelected,rows:h.value},{default:()=>[f.row]})})),S=t.computed(()=>o.classNames("k-grid-pinned-container",{"k-pos-bottom":!d.value})),y=t.computed(()=>o.classNames(o.uGrid.table({size:e.size}))),N=i=>{var s,r;const n=(s=e.pinnedItems)==null?void 0:s[i.startRowIndex];n&&((r=a.pinnedSelectionRelease)==null||r.call(a,i,n))},v=t.computed(()=>e.selectable?{...typeof e.selectable=="object"?e.selectable:{},enabled:!0,drag:!1}:e.selectable),L=t.computed(()=>d.value?c.tableKeyboardNavigationTopPinnedAttributes:c.tableKeyboardNavigationBottomPinnedAttributes);return{isTop:d,pinnedRef:m,handlePinnedScroll:g,pinnedRows:p,containerClassName:S,tableClassName:y,handleSelectionRelease:N,pinnedSelectable:v,pinnedBodyAttributes:L}},render(){return t.createVNode("div",{class:this.containerClassName,role:"presentation",style:this.pinnedRows.length?void 0:{display:"none"}},[t.createVNode("div",{class:"k-grid-pinned-wrap",ref:o.setRef(this,"pinnedRef"),onScroll:this.handlePinnedScroll},[t.createVNode(c.TableSelection,{selectable:this.pinnedSelectable,onRelease:this.handleSelectionRelease},{default:()=>[t.createVNode("table",{ref:o.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:o.setRef(this,"colGroup")},[this.$props.cols]),t.createVNode("tbody",t.mergeProps({class:o.classNames(o.uGrid.tbody({}))},this.pinnedBodyAttributes),[this.pinnedRows])])]})])])}});exports.PinnedRowsTable=C;
|