@progress/kendo-vue-grid 8.1.0-develop.4 → 8.1.0-develop.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Grid.d.ts +30 -17
- package/Grid.js +1 -1
- package/Grid.mjs +567 -449
- package/GridState.d.ts +15 -1
- package/GridState.js +1 -1
- package/GridState.mjs +84 -71
- package/RootGrid.d.ts +10 -0
- package/cells/GridCell.d.ts +2 -0
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +35 -30
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +20 -20
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +42 -37
- package/cells/GridGroupCell.d.ts +2 -0
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +69 -55
- package/cells/GridHierarchyCell.d.ts +2 -0
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +51 -41
- package/cells/GridSelectionCell.d.ts +2 -0
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +35 -24
- package/cells/pincell/GridPinCell.d.ts +72 -0
- package/cells/pincell/GridPinCell.js +8 -0
- package/cells/pincell/GridPinCell.mjs +111 -0
- package/cells/pincell/GridPinDropdownButton.d.ts +27 -0
- package/cells/pincell/GridPinDropdownButton.js +8 -0
- package/cells/pincell/GridPinDropdownButton.mjs +111 -0
- package/common.d.ts +5 -0
- package/common.js +1 -1
- package/common.mjs +7 -2
- package/components/PinnedRowsTable.d.ts +63 -0
- package/components/PinnedRowsTable.js +8 -0
- package/components/PinnedRowsTable.mjs +141 -0
- package/components/StickyGroupTable.d.ts +0 -1
- package/components/StickyGroupTable.js +1 -1
- package/components/StickyGroupTable.mjs +24 -30
- package/constants/main.d.ts +15 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/drag/ColumnResize.d.ts +2 -0
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +139 -123
- package/footer/FooterCell.js +1 -1
- package/footer/FooterCell.mjs +22 -20
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +50 -48
- package/header/FilterRow.d.ts +4 -0
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +52 -50
- package/header/HeaderRow.d.ts +4 -0
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +114 -105
- package/index.js +1 -1
- package/index.mjs +15 -14
- package/interfaces/ColumnType.d.ts +1 -1
- package/interfaces/GridCellProps.d.ts +5 -0
- package/interfaces/GridCellsSettings.d.ts +23 -0
- package/interfaces/GridColumnProps.d.ts +2 -2
- package/interfaces/GridProps.d.ts +88 -31
- package/interfaces/GridRowProps.d.ts +13 -4
- package/interfaces/GridRowsSettings.d.ts +48 -0
- package/interfaces/events.d.ts +19 -2
- package/messages/main.d.ts +30 -0
- package/messages/main.js +2 -2
- package/messages/main.mjs +108 -96
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -12
- package/rows/GridRow.d.ts +4 -10
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +24 -23
- package/utils/main.d.ts +5 -0
- package/utils/main.js +1 -1
- package/utils/main.mjs +199 -167
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +121 -105
package/cells/GridFilterCell.mjs
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as v, createVNode as i, createTextVNode as b, h as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { filterClearButton as
|
|
11
|
-
import { DropDownList as
|
|
8
|
+
import { defineComponent as v, createVNode as i, createTextVNode as b, h as S, inject as c } from "vue";
|
|
9
|
+
import { Button as $ } from "@progress/kendo-vue-buttons";
|
|
10
|
+
import { filterClearButton as h, messages as u, filterChooseOperator as g } from "../messages/main.mjs";
|
|
11
|
+
import { DropDownList as d } from "@progress/kendo-vue-dropdowns";
|
|
12
12
|
import { TextBox as L, NumericTextBox as k } from "@progress/kendo-vue-inputs";
|
|
13
13
|
import { DatePicker as z } from "@progress/kendo-vue-dateinputs";
|
|
14
|
-
import { filterClearIcon as x, filterIcon as
|
|
15
|
-
import { provideLocalizationService as
|
|
16
|
-
import { cellBoolDropdownChange as
|
|
17
|
-
import {
|
|
18
|
-
const
|
|
14
|
+
import { filterClearIcon as x, filterIcon as w } from "@progress/kendo-svg-icons";
|
|
15
|
+
import { provideLocalizationService as D } from "@progress/kendo-vue-intl";
|
|
16
|
+
import { cellBoolDropdownChange as I, cellOperatorChange as y, cellInputChange as F } from "../filterCommon.mjs";
|
|
17
|
+
import { getTemplate as T } from "@progress/kendo-vue-common";
|
|
18
|
+
const K = /* @__PURE__ */ v({
|
|
19
19
|
name: "KendoGridFilterCell",
|
|
20
20
|
inheritAttrs: !1,
|
|
21
21
|
props: {
|
|
@@ -48,11 +48,11 @@ const H = /* @__PURE__ */ v({
|
|
|
48
48
|
this.triggerChange(o);
|
|
49
49
|
},
|
|
50
50
|
operatorChange(e, t) {
|
|
51
|
-
const o =
|
|
51
|
+
const o = y(e.value.operator, t, this.$props.value);
|
|
52
52
|
this.triggerChange(o);
|
|
53
53
|
},
|
|
54
54
|
boolDropdownChange(e, t) {
|
|
55
|
-
const o =
|
|
55
|
+
const o = I(e.value.operator, t);
|
|
56
56
|
this.triggerChange(o);
|
|
57
57
|
},
|
|
58
58
|
clear(e) {
|
|
@@ -67,41 +67,41 @@ const H = /* @__PURE__ */ v({
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
setup() {
|
|
70
|
-
const e =
|
|
70
|
+
const e = c("kendoIntlService", {}), t = c("kendoLocalizationService", {});
|
|
71
71
|
return {
|
|
72
72
|
kendoIntlService: e,
|
|
73
73
|
kendoLocalizationService: t
|
|
74
74
|
};
|
|
75
75
|
},
|
|
76
76
|
render() {
|
|
77
|
-
const e =
|
|
77
|
+
const e = D(this), {
|
|
78
78
|
size: t
|
|
79
|
-
} = this.$props, o = this.$props.operators.find((
|
|
79
|
+
} = this.$props, o = this.$props.operators.find((n) => n.operator === this.$props.operator) || null, f = function() {
|
|
80
80
|
if (this.$props.filterType !== "boolean")
|
|
81
|
-
return i(
|
|
81
|
+
return i(d, {
|
|
82
82
|
onChange: this.operatorChange,
|
|
83
83
|
value: o,
|
|
84
84
|
size: t,
|
|
85
85
|
class: "k-dropdown-operator",
|
|
86
86
|
icon: "filter",
|
|
87
|
-
svgIcon:
|
|
87
|
+
svgIcon: w,
|
|
88
88
|
iconClassName: "filter k-button-icon",
|
|
89
89
|
"data-items": this.$props.operators,
|
|
90
90
|
textField: "text",
|
|
91
|
-
title: e.toLanguageString(
|
|
91
|
+
title: e.toLanguageString(g, u[g]),
|
|
92
92
|
popupSettings: {
|
|
93
93
|
width: "",
|
|
94
94
|
anchor: ""
|
|
95
95
|
},
|
|
96
96
|
ariaLabel: this.ariaLabel
|
|
97
97
|
}, null);
|
|
98
|
-
},
|
|
98
|
+
}, m = function(n, a) {
|
|
99
99
|
let l;
|
|
100
|
-
switch (
|
|
100
|
+
switch (n) {
|
|
101
101
|
case "numeric":
|
|
102
102
|
return i(k, {
|
|
103
103
|
size: t,
|
|
104
|
-
value:
|
|
104
|
+
value: a,
|
|
105
105
|
onChange: (r) => {
|
|
106
106
|
this.inputChange(r.value, r.event);
|
|
107
107
|
},
|
|
@@ -111,7 +111,7 @@ const H = /* @__PURE__ */ v({
|
|
|
111
111
|
case "date":
|
|
112
112
|
return i(z, {
|
|
113
113
|
size: t,
|
|
114
|
-
value:
|
|
114
|
+
value: a,
|
|
115
115
|
onChange: (r) => {
|
|
116
116
|
this.inputChange(r.value, r);
|
|
117
117
|
},
|
|
@@ -119,10 +119,10 @@ const H = /* @__PURE__ */ v({
|
|
|
119
119
|
ariaLabel: this.ariaLabel
|
|
120
120
|
}, null);
|
|
121
121
|
case "boolean":
|
|
122
|
-
return l = this.$props.booleanValues, i(
|
|
122
|
+
return l = this.$props.booleanValues, i(d, {
|
|
123
123
|
onChange: this.boolDropdownChange,
|
|
124
124
|
size: t,
|
|
125
|
-
value: l.find((r) => r.operator === (
|
|
125
|
+
value: l.find((r) => r.operator === (a !== null ? a : "")),
|
|
126
126
|
"data-items": l,
|
|
127
127
|
textField: "text",
|
|
128
128
|
title: this.$props.title,
|
|
@@ -130,7 +130,7 @@ const H = /* @__PURE__ */ v({
|
|
|
130
130
|
}, null);
|
|
131
131
|
default:
|
|
132
132
|
return i(L, {
|
|
133
|
-
value:
|
|
133
|
+
value: a || "",
|
|
134
134
|
size: t,
|
|
135
135
|
onInput: (r) => {
|
|
136
136
|
this.inputChange(r.target.value, r);
|
|
@@ -139,14 +139,14 @@ const H = /* @__PURE__ */ v({
|
|
|
139
139
|
"aria-label": this.ariaLabel
|
|
140
140
|
}, null);
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, s = {
|
|
143
143
|
class: "k-filtercell",
|
|
144
144
|
style: this.$attrs.style
|
|
145
|
-
},
|
|
145
|
+
}, p = i("div", {
|
|
146
146
|
class: "k-filtercell-wrapper"
|
|
147
|
-
}, [
|
|
147
|
+
}, [m.call(this, this.$props.filterType, this.$props.value), i("div", {
|
|
148
148
|
class: "k-filtercell-operator"
|
|
149
|
-
}, [
|
|
149
|
+
}, [f.call(this), b(" "), i($, {
|
|
150
150
|
type: "button",
|
|
151
151
|
size: t,
|
|
152
152
|
icon: "filter-clear",
|
|
@@ -155,20 +155,25 @@ const H = /* @__PURE__ */ v({
|
|
|
155
155
|
/* button is always visible if there is either value or operator */
|
|
156
156
|
"k-disabled": !(!(this.$props.value === null || this.$props.value === "") || this.$props.operator)
|
|
157
157
|
},
|
|
158
|
-
title: e.toLanguageString(
|
|
158
|
+
title: e.toLanguageString(h, u[h]),
|
|
159
159
|
onClick: this.clear
|
|
160
|
-
}, null)])])
|
|
161
|
-
return
|
|
162
|
-
h:
|
|
163
|
-
template:
|
|
164
|
-
defaultRendering:
|
|
165
|
-
additionalProps:
|
|
160
|
+
}, null)])]), C = i("div", s, [p]);
|
|
161
|
+
return T.call(this, {
|
|
162
|
+
h: S,
|
|
163
|
+
template: this.$props.render,
|
|
164
|
+
defaultRendering: C,
|
|
165
|
+
additionalProps: {
|
|
166
|
+
...this.$props,
|
|
167
|
+
tdProps: s
|
|
168
|
+
},
|
|
166
169
|
additionalListeners: {
|
|
167
170
|
change: this.triggerChange
|
|
168
|
-
}
|
|
171
|
+
},
|
|
172
|
+
defaultSlots: p,
|
|
173
|
+
swapDefaultSlots: !0
|
|
169
174
|
});
|
|
170
175
|
}
|
|
171
176
|
});
|
|
172
177
|
export {
|
|
173
|
-
|
|
178
|
+
K as GridFilterCell
|
|
174
179
|
};
|
package/cells/GridGroupCell.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const GridGroupCell: import('vue').DefineComponent<import('vue').Extract
|
|
|
30
30
|
ariaColumnIndex: PropType<number>;
|
|
31
31
|
group: PropType<import('@progress/kendo-vue-data-tools').GroupState>;
|
|
32
32
|
render: PropType<any>;
|
|
33
|
+
cells: PropType<import('..').GridCellsSettings>;
|
|
33
34
|
}>, {}, {}, {
|
|
34
35
|
tdClass(): {
|
|
35
36
|
[x: number]: any;
|
|
@@ -71,6 +72,7 @@ declare const GridGroupCell: import('vue').DefineComponent<import('vue').Extract
|
|
|
71
72
|
ariaColumnIndex: PropType<number>;
|
|
72
73
|
group: PropType<import('@progress/kendo-vue-data-tools').GroupState>;
|
|
73
74
|
render: PropType<any>;
|
|
75
|
+
cells: PropType<import('..').GridCellsSettings>;
|
|
74
76
|
}>> & Readonly<{
|
|
75
77
|
onChange?: (...args: any[] | unknown[]) => any;
|
|
76
78
|
onCellkeydown?: (...args: any[] | unknown[]) => any;
|
package/cells/GridGroupCell.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 a=require("vue"),i=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),i=require("@progress/kendo-vue-common"),f=require("@progress/kendo-vue-data-tools"),o=require("../messages/main.js"),S=require("@progress/kendo-vue-intl"),k=require("@progress/kendo-svg-icons"),x=e=>{var t,l;return(l=(t=e.cells)==null?void 0:t.groupHeader)==null?void 0:l[e.rowType||"data"]},A=a.defineComponent({name:"KendoGridGroupCell",inheritAttrs:!1,props:{id:String,field:String,dataItem:Object,format:String,type:String,colSpan:Number,className:String,columnIndex:Number,columnsCount:Number,rowType:String,level:Number,locked:Boolean,expanded:Boolean,editor:String,dataIndex:Number,isSelected:Boolean,isRtl:Boolean,ariaColumnIndex:Number,group:Object,render:[String,Function,Object],cells:Object},emits:{change:null,cellkeydown:null},inject:{kendo:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:i.noop}},computed:{tdClass(){const{className:e,locked:t}=this.$props;return{"k-table-td":!0,"k-grid-content-sticky":t,[e]:e}},tdStyle(){const{locked:e}=this.$props,t=e?{position:"sticky",zIndex:2}:{};return{...this.$attrs.style,...t}},groupTdClass(){const{className:e,locked:t}=this.$props;return{"k-table-td":!0,"k-group-cell":!0,"k-grid-content-sticky":t,[e]:e}}},methods:{triggerStateChange(){var t;const e=this.kendo;(t=e==null?void 0:e.dispatchGroupExpand)==null||t.call(e,{type:f.GROUP_EXPAND_ACTION.TOGGLE,group:this.$props.group})},triggerKeydown(e,t){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,field:this.$props.field,expanded:this.$props.expanded}),!e.defaultPrevented&&e.keyCode===i.Keys.enter&&(e.preventDefault(),this.$emit("change",{dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,event:e,level:this.$props.level,field:void 0,value:!t}),this.triggerStateChange())},clickHandler(e,t,l){e.preventDefault(),this.$emit("change",{dataItem:t,dataIndex:this.$props.dataIndex,event:e,level:this.$props.level,field:void 0,value:!l}),this.triggerStateChange()}},render(){let e=null,t,l,s=null;const{columnIndex:n,level:c,columnsCount:p,rowType:v,dataItem:d,field:u,expanded:r,render:$,locked:g}=this.$props,h=this.getKeyboardNavigationAttributes(this.$props.id),b=S.provideLocalizationService(this).toLanguageString(o.groupCaretAriaLabelCollapse,o.messages[o.groupCaretAriaLabelCollapse]),y=S.provideLocalizationService(this).toLanguageString(o.groupCaretAriaLabelExpand,o.messages[o.groupCaretAriaLabelExpand]);if(n===void 0||c===void 0||n<c||p===void 0||v!=="groupHeader"||d[u]===void 0)t={style:this.$attrs.style,key:"g"+n,class:this.groupTdClass},e=a.createVNode("td",t,null);else if(n<=c){t={style:this.tdStyle,key:"g-colspan",class:g?"k-table-td":this.tdClass,colspan:g?0:p-n,role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,"aria-selected":this.$props.isSelected,"aria-expanded":r,"data-grid-col-index":this.$props.columnIndex,tabindex:h.tabIndex,"data-keyboardnavlevel":h[f.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":h[f.KEYBOARD_NAV_DATA_ID]},s=a.createVNode("p",{class:"k-reset"},[a.createVNode("a",{onClick:m=>{this.clickHandler(m,d,r)},href:"#",tabindex:-1,title:r?b:y,"aria-label":r?b:y},[a.createVNode(i.Icon,{name:r?"caret-alt-down":this.isRtl?"caret-alt-left":"caret-alt-right",icon:r?k.caretAltDownIcon:this.isRtl?k.caretAltLeftIcon:k.caretAltRightIcon},null)]),d[u]?d[u].toString():""]);const C=a.createVNode("td",a.mergeProps(t,{onKeydown:m=>{this.triggerKeydown(m,r)}}),[s]);l={className:"k-table-td",role:"gridcell",colSpan:p-n,style:{borderLeftWidth:0,borderRightWidth:0}};const I=g?a.createVNode("td",l,null):null;e=I?[C,I]:C}return i.getTemplate.call(this,{h:a.h,template:$||x(this.$props),defaultRendering:e,additionalProps:{...this.$props,tdProps:t,td2Props:l},additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler},defaultSlots:s,swapDefaultSlots:!0})}});exports.GridGroupCell=A;
|
package/cells/GridGroupCell.mjs
CHANGED
|
@@ -5,13 +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
|
|
10
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
11
|
-
import { groupCaretAriaLabelCollapse as
|
|
12
|
-
import { provideLocalizationService as
|
|
13
|
-
import { caretAltDownIcon as
|
|
14
|
-
const
|
|
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 D } from "@progress/kendo-vue-common";
|
|
10
|
+
import { KEYBOARD_NAV_DATA_ID as K, KEYBOARD_NAV_DATA_LEVEL as R, GROUP_EXPAND_ACTION as T } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { groupCaretAriaLabelCollapse as y, messages as b, groupCaretAriaLabelExpand as I } from "../messages/main.mjs";
|
|
12
|
+
import { provideLocalizationService as S } from "@progress/kendo-vue-intl";
|
|
13
|
+
import { caretAltDownIcon as E, caretAltRightIcon as O, caretAltLeftIcon as G } from "@progress/kendo-svg-icons";
|
|
14
|
+
const _ = (e) => {
|
|
15
|
+
var t, l;
|
|
16
|
+
return (l = (t = e.cells) == null ? void 0 : t.groupHeader) == null ? void 0 : l[e.rowType || "data"];
|
|
17
|
+
}, W = /* @__PURE__ */ x({
|
|
15
18
|
name: "KendoGridGroupCell",
|
|
16
19
|
inheritAttrs: !1,
|
|
17
20
|
props: {
|
|
@@ -34,7 +37,8 @@ const P = /* @__PURE__ */ S({
|
|
|
34
37
|
isRtl: Boolean,
|
|
35
38
|
ariaColumnIndex: Number,
|
|
36
39
|
group: Object,
|
|
37
|
-
render: [String, Function, Object]
|
|
40
|
+
render: [String, Function, Object],
|
|
41
|
+
cells: Object
|
|
38
42
|
},
|
|
39
43
|
emits: {
|
|
40
44
|
change: null,
|
|
@@ -51,7 +55,7 @@ const P = /* @__PURE__ */ S({
|
|
|
51
55
|
default: null
|
|
52
56
|
},
|
|
53
57
|
getKeyboardNavigationAttributes: {
|
|
54
|
-
default:
|
|
58
|
+
default: N
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
computed: {
|
|
@@ -96,7 +100,7 @@ const P = /* @__PURE__ */ S({
|
|
|
96
100
|
var t;
|
|
97
101
|
const e = this.kendo;
|
|
98
102
|
(t = e == null ? void 0 : e.dispatchGroupExpand) == null || t.call(e, {
|
|
99
|
-
type:
|
|
103
|
+
type: T.TOGGLE,
|
|
100
104
|
group: this.$props.group
|
|
101
105
|
});
|
|
102
106
|
},
|
|
@@ -107,7 +111,7 @@ const P = /* @__PURE__ */ S({
|
|
|
107
111
|
dataIndex: this.$props.dataIndex,
|
|
108
112
|
field: this.$props.field,
|
|
109
113
|
expanded: this.$props.expanded
|
|
110
|
-
}), !e.defaultPrevented && e.keyCode ===
|
|
114
|
+
}), !e.defaultPrevented && e.keyCode === D.enter && (e.preventDefault(), this.$emit("change", {
|
|
111
115
|
dataItem: this.$props.dataItem,
|
|
112
116
|
dataIndex: this.$props.dataIndex,
|
|
113
117
|
event: e,
|
|
@@ -116,89 +120,99 @@ const P = /* @__PURE__ */ S({
|
|
|
116
120
|
value: !t
|
|
117
121
|
}), this.triggerStateChange());
|
|
118
122
|
},
|
|
119
|
-
clickHandler(e, t,
|
|
123
|
+
clickHandler(e, t, l) {
|
|
120
124
|
e.preventDefault(), this.$emit("change", {
|
|
121
125
|
dataItem: t,
|
|
122
126
|
dataIndex: this.$props.dataIndex,
|
|
123
127
|
event: e,
|
|
124
128
|
level: this.$props.level,
|
|
125
129
|
field: void 0,
|
|
126
|
-
value: !
|
|
130
|
+
value: !l
|
|
127
131
|
}), this.triggerStateChange();
|
|
128
132
|
}
|
|
129
133
|
},
|
|
130
134
|
render() {
|
|
131
|
-
let e = null;
|
|
135
|
+
let e = null, t, l, o = null;
|
|
132
136
|
const {
|
|
133
|
-
columnIndex:
|
|
134
|
-
level:
|
|
135
|
-
columnsCount:
|
|
136
|
-
rowType:
|
|
137
|
-
dataItem:
|
|
138
|
-
field:
|
|
137
|
+
columnIndex: r,
|
|
138
|
+
level: d,
|
|
139
|
+
columnsCount: s,
|
|
140
|
+
rowType: C,
|
|
141
|
+
dataItem: i,
|
|
142
|
+
field: p,
|
|
139
143
|
expanded: a,
|
|
140
|
-
render:
|
|
141
|
-
locked:
|
|
142
|
-
} = this.$props,
|
|
143
|
-
if (
|
|
144
|
-
|
|
144
|
+
render: $,
|
|
145
|
+
locked: c
|
|
146
|
+
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h = S(this).toLanguageString(y, b[y]), m = S(this).toLanguageString(I, b[I]);
|
|
147
|
+
if (r === void 0 || d === void 0 || r < d || s === void 0 || C !== "groupHeader" || i[p] === void 0)
|
|
148
|
+
t = {
|
|
145
149
|
style: this.$attrs.style,
|
|
146
|
-
key: "g" +
|
|
150
|
+
key: "g" + r,
|
|
147
151
|
class: this.groupTdClass
|
|
148
|
-
}, null);
|
|
149
|
-
else if (
|
|
150
|
-
|
|
152
|
+
}, e = n("td", t, null);
|
|
153
|
+
else if (r <= d) {
|
|
154
|
+
t = {
|
|
151
155
|
style: this.tdStyle,
|
|
152
|
-
onKeydown: (p) => {
|
|
153
|
-
this.triggerKeydown(p, a);
|
|
154
|
-
},
|
|
155
156
|
key: "g-colspan",
|
|
156
|
-
class:
|
|
157
|
-
colspan:
|
|
157
|
+
class: c ? "k-table-td" : this.tdClass,
|
|
158
|
+
colspan: c ? 0 : s - r,
|
|
158
159
|
role: "gridcell",
|
|
159
160
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
160
161
|
"aria-selected": this.$props.isSelected,
|
|
161
162
|
"aria-expanded": a,
|
|
162
163
|
"data-grid-col-index": this.$props.columnIndex,
|
|
163
|
-
tabindex:
|
|
164
|
-
"data-keyboardnavlevel":
|
|
165
|
-
"data-keyboardnavid":
|
|
166
|
-
},
|
|
164
|
+
tabindex: u.tabIndex,
|
|
165
|
+
"data-keyboardnavlevel": u[R],
|
|
166
|
+
"data-keyboardnavid": u[K]
|
|
167
|
+
}, o = n("p", {
|
|
167
168
|
class: "k-reset"
|
|
168
|
-
}, [
|
|
169
|
-
onClick: (
|
|
170
|
-
this.clickHandler(
|
|
169
|
+
}, [n("a", {
|
|
170
|
+
onClick: (g) => {
|
|
171
|
+
this.clickHandler(g, i, a);
|
|
171
172
|
},
|
|
172
173
|
href: "#",
|
|
173
174
|
tabindex: -1,
|
|
174
|
-
title: a ?
|
|
175
|
-
"aria-label": a ?
|
|
176
|
-
}, [
|
|
175
|
+
title: a ? h : m,
|
|
176
|
+
"aria-label": a ? h : m
|
|
177
|
+
}, [n(L, {
|
|
177
178
|
name: a ? "caret-alt-down" : this.isRtl ? "caret-alt-left" : "caret-alt-right",
|
|
178
|
-
icon: a ?
|
|
179
|
-
}, null)]),
|
|
179
|
+
icon: a ? E : this.isRtl ? G : O
|
|
180
|
+
}, null)]), i[p] ? i[p].toString() : ""]);
|
|
181
|
+
const f = n("td", A(t, {
|
|
182
|
+
onKeydown: (g) => {
|
|
183
|
+
this.triggerKeydown(g, a);
|
|
184
|
+
}
|
|
185
|
+
}), [o]);
|
|
186
|
+
l = {
|
|
180
187
|
className: "k-table-td",
|
|
181
188
|
role: "gridcell",
|
|
182
|
-
colSpan:
|
|
189
|
+
colSpan: s - r,
|
|
183
190
|
style: {
|
|
184
191
|
borderLeftWidth: 0,
|
|
185
192
|
borderRightWidth: 0
|
|
186
193
|
}
|
|
187
|
-
}
|
|
188
|
-
|
|
194
|
+
};
|
|
195
|
+
const k = c ? n("td", l, null) : null;
|
|
196
|
+
e = k ? [f, k] : f;
|
|
189
197
|
}
|
|
190
|
-
return
|
|
191
|
-
h:
|
|
192
|
-
template:
|
|
198
|
+
return w.call(this, {
|
|
199
|
+
h: v,
|
|
200
|
+
template: $ || _(this.$props),
|
|
193
201
|
defaultRendering: e,
|
|
194
|
-
additionalProps:
|
|
202
|
+
additionalProps: {
|
|
203
|
+
...this.$props,
|
|
204
|
+
tdProps: t,
|
|
205
|
+
td2Props: l
|
|
206
|
+
},
|
|
195
207
|
additionalListeners: {
|
|
196
208
|
keydown: this.triggerKeydown,
|
|
197
209
|
click: this.clickHandler
|
|
198
|
-
}
|
|
210
|
+
},
|
|
211
|
+
defaultSlots: o,
|
|
212
|
+
swapDefaultSlots: !0
|
|
199
213
|
});
|
|
200
214
|
}
|
|
201
215
|
});
|
|
202
216
|
export {
|
|
203
|
-
|
|
217
|
+
W as GridGroupCell
|
|
204
218
|
};
|
|
@@ -28,6 +28,7 @@ declare const GridHierarchyCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
28
28
|
ariaColumnIndex: PropType<number>;
|
|
29
29
|
render: PropType<any>;
|
|
30
30
|
isRtl: PropType<boolean>;
|
|
31
|
+
cells: PropType<import('..').GridCellsSettings>;
|
|
31
32
|
}>, {}, {}, {
|
|
32
33
|
wrapperClass(): {
|
|
33
34
|
[x: number]: any;
|
|
@@ -60,6 +61,7 @@ declare const GridHierarchyCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
60
61
|
ariaColumnIndex: PropType<number>;
|
|
61
62
|
render: PropType<any>;
|
|
62
63
|
isRtl: PropType<boolean>;
|
|
64
|
+
cells: PropType<import('..').GridCellsSettings>;
|
|
63
65
|
}>> & Readonly<{
|
|
64
66
|
onChange?: (...args: any[] | unknown[]) => any;
|
|
65
67
|
onCellkeydown?: (...args: any[] | unknown[]) => 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 i=require("vue"),l=require("@progress/kendo-vue-common"),
|
|
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"]},f=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,swapDefaultSlots:!0})}});exports.GridHierarchyCell=f;
|
|
@@ -5,13 +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
|
|
10
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
11
|
-
import { provideLocalizationService as
|
|
12
|
-
import { collapseDetailAriaLabel as
|
|
13
|
-
import { minusIcon as
|
|
14
|
-
const
|
|
8
|
+
import { defineComponent as m, createVNode as i, mergeProps as h, h as g } from "vue";
|
|
9
|
+
import { noop as f, Icon as y, getTemplate as I, Keys as b } from "@progress/kendo-vue-common";
|
|
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
|
+
import { provideLocalizationService as x } from "@progress/kendo-vue-intl";
|
|
12
|
+
import { collapseDetailAriaLabel as p, messages as c, expandDetailAriaLabel as u } from "../messages/main.mjs";
|
|
13
|
+
import { minusIcon as A, plusIcon as C } from "@progress/kendo-svg-icons";
|
|
14
|
+
const v = (e) => {
|
|
15
|
+
var t, a;
|
|
16
|
+
return (a = (t = e.cells) == null ? void 0 : t.hierarchy) == null ? void 0 : a[e.rowType || "data"];
|
|
17
|
+
}, E = /* @__PURE__ */ m({
|
|
15
18
|
name: "KendoGridHierarchyCell",
|
|
16
19
|
inheritAttrs: !1,
|
|
17
20
|
props: {
|
|
@@ -32,7 +35,8 @@ const K = /* @__PURE__ */ c({
|
|
|
32
35
|
dataIndex: Number,
|
|
33
36
|
ariaColumnIndex: Number,
|
|
34
37
|
render: [String, Function, Object],
|
|
35
|
-
isRtl: Boolean
|
|
38
|
+
isRtl: Boolean,
|
|
39
|
+
cells: Object
|
|
36
40
|
},
|
|
37
41
|
emits: {
|
|
38
42
|
change: null,
|
|
@@ -49,14 +53,14 @@ const K = /* @__PURE__ */ c({
|
|
|
49
53
|
default: null
|
|
50
54
|
},
|
|
51
55
|
getKeyboardNavigationAttributes: {
|
|
52
|
-
default:
|
|
56
|
+
default: f
|
|
53
57
|
}
|
|
54
58
|
},
|
|
55
59
|
methods: {
|
|
56
60
|
triggerStateChange() {
|
|
57
61
|
const e = this.kendo;
|
|
58
62
|
e.dataItemKey && this.$props.dataItem[e.dataItemKey] !== void 0 && (e == null || e.dispatchDetailExpand({
|
|
59
|
-
type:
|
|
63
|
+
type: k.TOGGLE,
|
|
60
64
|
id: this.$props.dataItem[e.dataItemKey]
|
|
61
65
|
}));
|
|
62
66
|
},
|
|
@@ -66,7 +70,7 @@ const K = /* @__PURE__ */ c({
|
|
|
66
70
|
dataItem: this.$props.dataItem,
|
|
67
71
|
field: this.$props.field,
|
|
68
72
|
expanded: t
|
|
69
|
-
}), !e.defaultPrevented && e.keyCode ===
|
|
73
|
+
}), !e.defaultPrevented && e.keyCode === b.enter && (e.preventDefault(), this.$emit("change", {
|
|
70
74
|
dataItem: this.$props.dataItem,
|
|
71
75
|
dataIndex: this.$props.dataIndex,
|
|
72
76
|
event: e,
|
|
@@ -74,12 +78,12 @@ const K = /* @__PURE__ */ c({
|
|
|
74
78
|
value: !t
|
|
75
79
|
}), this.triggerStateChange());
|
|
76
80
|
},
|
|
77
|
-
clickHandler(e, t,
|
|
81
|
+
clickHandler(e, t, a) {
|
|
78
82
|
e.preventDefault(), this.$emit("change", {
|
|
79
83
|
dataItem: t,
|
|
80
84
|
event: e,
|
|
81
85
|
field: void 0,
|
|
82
|
-
value: !
|
|
86
|
+
value: !a
|
|
83
87
|
}), this.triggerStateChange();
|
|
84
88
|
}
|
|
85
89
|
},
|
|
@@ -93,51 +97,57 @@ const K = /* @__PURE__ */ c({
|
|
|
93
97
|
}
|
|
94
98
|
},
|
|
95
99
|
render() {
|
|
96
|
-
let e = null;
|
|
97
|
-
const
|
|
100
|
+
let e = null, t, a = null;
|
|
101
|
+
const n = this.getKeyboardNavigationAttributes(this.$props.id), s = x(this), o = s.toLanguageString(p, c[p]), d = s.toLanguageString(u, c[u]);
|
|
98
102
|
if (this.$props.rowType === "groupFooter")
|
|
99
|
-
|
|
103
|
+
t = {
|
|
100
104
|
class: this.wrapperClass
|
|
101
|
-
}, null);
|
|
105
|
+
}, e = i("td", t, null);
|
|
102
106
|
else if (this.$props.rowType !== "groupHeader") {
|
|
103
|
-
const
|
|
104
|
-
|
|
107
|
+
const r = this.$props.expanded;
|
|
108
|
+
t = {
|
|
105
109
|
style: this.$attrs.style,
|
|
106
|
-
onKeydown: (n) => {
|
|
107
|
-
this.triggerKeydown(n, a);
|
|
108
|
-
},
|
|
109
110
|
class: this.wrapperClass,
|
|
110
|
-
"aria-expanded":
|
|
111
|
+
"aria-expanded": r ? "true" : "false",
|
|
111
112
|
role: "gridcell",
|
|
112
113
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
113
|
-
tabindex:
|
|
114
|
-
"data-keyboardnavlevel":
|
|
115
|
-
"data-keyboardnavid":
|
|
116
|
-
},
|
|
117
|
-
onClick: (
|
|
118
|
-
this.clickHandler(
|
|
114
|
+
tabindex: n.tabIndex,
|
|
115
|
+
"data-keyboardnavlevel": n[$],
|
|
116
|
+
"data-keyboardnavid": n[S]
|
|
117
|
+
}, a = i("a", {
|
|
118
|
+
onClick: (l) => {
|
|
119
|
+
this.clickHandler(l, this.$props.dataItem, r);
|
|
119
120
|
},
|
|
120
121
|
href: "#",
|
|
121
122
|
tabindex: -1,
|
|
122
|
-
title:
|
|
123
|
-
"aria-label":
|
|
124
|
-
}, [
|
|
125
|
-
name:
|
|
126
|
-
icon:
|
|
127
|
-
}, null)])
|
|
123
|
+
title: r ? o : d,
|
|
124
|
+
"aria-label": r ? o : d
|
|
125
|
+
}, [i(y, {
|
|
126
|
+
name: r ? "minus" : "plus",
|
|
127
|
+
icon: r ? A : C
|
|
128
|
+
}, null)]), e = i("td", h(t, {
|
|
129
|
+
onKeydown: (l) => {
|
|
130
|
+
this.triggerKeydown(l, r);
|
|
131
|
+
}
|
|
132
|
+
}), [a]);
|
|
128
133
|
}
|
|
129
|
-
return
|
|
130
|
-
h:
|
|
131
|
-
template: this.$props.render,
|
|
134
|
+
return I.call(this, {
|
|
135
|
+
h: g,
|
|
136
|
+
template: this.$props.render || v(this.$props),
|
|
132
137
|
defaultRendering: e,
|
|
133
|
-
additionalProps:
|
|
138
|
+
additionalProps: {
|
|
139
|
+
...this.$props,
|
|
140
|
+
tdProps: t
|
|
141
|
+
},
|
|
134
142
|
additionalListeners: {
|
|
135
143
|
keydown: this.triggerKeydown,
|
|
136
144
|
click: this.clickHandler
|
|
137
|
-
}
|
|
145
|
+
},
|
|
146
|
+
defaultSlots: a,
|
|
147
|
+
swapDefaultSlots: !0
|
|
138
148
|
});
|
|
139
149
|
}
|
|
140
150
|
});
|
|
141
151
|
export {
|
|
142
|
-
|
|
152
|
+
E as GridHierarchyCell
|
|
143
153
|
};
|
|
@@ -27,6 +27,7 @@ declare const GridSelectionCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
27
27
|
ariaColumnIndex: PropType<number>;
|
|
28
28
|
editor: PropType<string>;
|
|
29
29
|
isRtl: PropType<boolean>;
|
|
30
|
+
cells: PropType<import('..').GridCellsSettings>;
|
|
30
31
|
}>, {}, {
|
|
31
32
|
inputId: any;
|
|
32
33
|
}, {
|
|
@@ -58,6 +59,7 @@ declare const GridSelectionCell: import('vue').DefineComponent<import('vue').Ext
|
|
|
58
59
|
ariaColumnIndex: PropType<number>;
|
|
59
60
|
editor: PropType<string>;
|
|
60
61
|
isRtl: PropType<boolean>;
|
|
62
|
+
cells: PropType<import('..').GridCellsSettings>;
|
|
61
63
|
}>> & Readonly<{
|
|
62
64
|
onSelectionchange?: (...args: any[] | unknown[]) => any;
|
|
63
65
|
onCellkeydown?: (...args: any[] | unknown[]) => any;
|