@progress/kendo-vue-grid 9.2.0-develop.2 → 9.2.0-develop.3
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/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +70 -70
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
package/getRowContents.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("vue"),oe=require("./cells/GridCell.js"),ie=require("./cells/GridEditCell.js"),n=require("@progress/kendo-vue-common"),R=require("./utils/main.js"),ce=require("@progress/kendo-vue-data-tools"),m=({leafColumns:a,editField:l,item:o})=>{if(!l)return!1;for(const d of a)if(d.editable){const i=n.getNestedValue(l,o.dataItem);if(i===!0||i===d.field)return!0}return!1},G=({selectedField:a,dataItemKey:l,select:o,item:d})=>{if(a){const i=n.getNestedValue(a,d.dataItem);return typeof i=="boolean"&&i}if(o&&l&&n.getter(l)(d.dataItem)!==void 0){const i=o[n.getter(l)(d.dataItem)];return typeof i=="boolean"&&i}return!1},$=({highlight:a,dataItemKey:l,item:o})=>{if(a&&l&&n.getter(l)(o.dataItem)!==void 0){const d=a[n.getter(l)(o.dataItem)];return typeof d=="boolean"&&d}return!1},se=(a,l,o,d,i,s)=>{const{leafColumns:p,selectedField:I,dataItemKey:c,select:y,highlight:h,editField:v,cellRender:A,cells:D,itemChange:P,selectionChangeHandler:B,editHandler:O,removeHandler:_,saveHandler:j,cancelHandler:M,cellClickHandler:z,cellKeydownHandler:J,computedCollapsed:C,uniqueField:K,columnsRef:L,isRtl:H,idPrefix:Q}=a,U=y&&c&&n.getter(c)(l.dataItem)!==void 0?y[n.getter(c)(l.dataItem)]:void 0,S=I?n.getNestedValue(I,l.dataItem):U,b=h&&c&&n.getter(c)(l.dataItem)!==void 0?h[n.getter(c)(l.dataItem)]:void 0,W=m({leafColumns:p,editField:v,item:l}),X=G({selectedField:I,dataItemKey:c,select:y,item:l}),Y=$({highlight:h,dataItemKey:c,item:l});return{row:(a.hasDynamicColSpan?a.getCellsToRender(l.dataItem,p):a.cellsToRender).map(({columnIndex:u,colSpan:Z})=>{var w,x,E,F,q;const e=p[u];let f;if((w=e.rowSpannable)!=null&&w.enabled&&l.rowType==="data"&&e.field&&s){const r=e.field?(E=(x=e.rowSpannable).valueGetter)==null?void 0:E.call(x,l.dataItem,e.field):null;f={value:r,count:1},s[e.field]&&((F=s[e.field])==null?void 0:F.value)===r&&s[e.field]!==null?(s[e.field].count++,f.count=null):s[e.field]=f}const ee=`${e.className?e.className+" ":""}${e.locked?"k-grid-content-sticky":""}`,le=H?{left:e.right+"px",right:e.left+"px"}:{left:e.left+"px",right:e.right+"px"},te=e.locked&&(e.left!==void 0||e.right!==void 0)?le:void 0;let N=!1;if(e.editable&&v){const r=n.getNestedValue(v,l.dataItem);(r===!0||r===e.field)&&(N=!0)}const t=R.resolveCells(D,e.cells);let g;l.rowType==="groupFooter"?g=(t==null?void 0:t.groupFooter)||e.cell:l.rowType==="groupHeader"?g=(t==null?void 0:t.groupHeader)||e.cell:(e.cell||t!=null&&t.data)&&(g=e.cell||(t==null?void 0:t.data));const k=(q=C==null?void 0:C[l.level])==null?void 0:q.some(r=>r===R.groupedFirstItemValue(l.dataItem,K)),ae=e.id?e.id:u,ne=k?!k:l.expanded||l.dataItem.expanded,de=e._type==="expand",re=ce.tableKeyboardNavigationTools.generateNavigatableId(`${o}-${String(u)}`,Q,de||l.rowType==="groupHeader"||l.rowType==="groupFooter"||e.field==="value"?"nodata":"cell"),T={locked:e.locked,key:ae,id:re,colSpan:Z,dataItem:l.dataItem,field:e.field||"",editor:e.editor,format:e.format,readFormat:e.readFormat,type:e.type,columnType:e.columnType,className:ee,render:g||A,onChange:P,onSelectionchange:r=>B({event:r,dataItem:l.dataItem,dataIndex:d,columnIndex:u}),onCellclick:z,onCellkeydown:J,onEdit:O,onRemove:_,onSave:j,onCancel:M,cells:t,columnIndex:u,columnsCount:L.filter(r=>!r.children.length).length,rowType:l.rowType,level:l.level,expanded:ne,dataIndex:l.dataIndex,style:te,ariaColumnIndex:e.ariaColumnIndex,isRtl:H,isSelected:!!((e==null?void 0:e._type)==="edit"?S:Array.isArray(S)&&S.indexOf(u)>-1),isHighlighted:!!(typeof b!="boolean"&&b&&(e!=null&&e.field)&&b[e.field]===!0),group:l.group,rowSpan:f};return e.defaultCell?V.createVNode(e.defaultCell,T,null):N?V.createVNode(ie.GridEditCell,T,null):V.createVNode(oe.GridCell,T,null)}),isInEdit:W,isSelected:X,isHighlighted:Y}};exports.calculateIsHighlighted=$;exports.calculateIsInEdit=m;exports.calculateIsSelected=G;exports.getRowContents=se;
|
package/getRowContents.mjs
CHANGED
|
@@ -5,59 +5,59 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { createVNode as
|
|
8
|
+
import { createVNode as H } from "vue";
|
|
9
9
|
import { GridCell as ne } from "./cells/GridCell.mjs";
|
|
10
|
-
import { GridEditCell as
|
|
11
|
-
import { getter as
|
|
12
|
-
import { resolveCells as
|
|
10
|
+
import { GridEditCell as de } from "./cells/GridEditCell.mjs";
|
|
11
|
+
import { getter as c, getNestedValue as g } from "@progress/kendo-vue-common";
|
|
12
|
+
import { resolveCells as oe, groupedFirstItemValue as re } from "./utils/main.mjs";
|
|
13
13
|
import { tableKeyboardNavigationTools as ie } from "@progress/kendo-vue-data-tools";
|
|
14
14
|
const ce = ({
|
|
15
|
-
leafColumns:
|
|
15
|
+
leafColumns: a,
|
|
16
16
|
editField: l,
|
|
17
17
|
item: o
|
|
18
18
|
}) => {
|
|
19
19
|
if (!l)
|
|
20
20
|
return !1;
|
|
21
|
-
for (const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
21
|
+
for (const n of a)
|
|
22
|
+
if (n.editable) {
|
|
23
|
+
const r = g(l, o.dataItem);
|
|
24
|
+
if (r === !0 || r === n.field)
|
|
25
25
|
return !0;
|
|
26
26
|
}
|
|
27
27
|
return !1;
|
|
28
|
-
},
|
|
29
|
-
selectedField:
|
|
28
|
+
}, fe = ({
|
|
29
|
+
selectedField: a,
|
|
30
30
|
dataItemKey: l,
|
|
31
31
|
select: o,
|
|
32
|
-
item:
|
|
32
|
+
item: n
|
|
33
33
|
}) => {
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
return typeof
|
|
34
|
+
if (a) {
|
|
35
|
+
const r = g(a, n.dataItem);
|
|
36
|
+
return typeof r == "boolean" && r;
|
|
37
37
|
}
|
|
38
|
-
if (o && l &&
|
|
39
|
-
const
|
|
40
|
-
return typeof
|
|
38
|
+
if (o && l && c(l)(n.dataItem) !== void 0) {
|
|
39
|
+
const r = o[c(l)(n.dataItem)];
|
|
40
|
+
return typeof r == "boolean" && r;
|
|
41
41
|
}
|
|
42
42
|
return !1;
|
|
43
|
-
},
|
|
44
|
-
highlight:
|
|
43
|
+
}, se = ({
|
|
44
|
+
highlight: a,
|
|
45
45
|
dataItemKey: l,
|
|
46
46
|
item: o
|
|
47
47
|
}) => {
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
return typeof
|
|
48
|
+
if (a && l && c(l)(o.dataItem) !== void 0) {
|
|
49
|
+
const n = a[c(l)(o.dataItem)];
|
|
50
|
+
return typeof n == "boolean" && n;
|
|
51
51
|
}
|
|
52
52
|
return !1;
|
|
53
|
-
},
|
|
53
|
+
}, be = (a, l, o, n, r, f) => {
|
|
54
54
|
const {
|
|
55
|
-
leafColumns:
|
|
56
|
-
selectedField:
|
|
57
|
-
dataItemKey:
|
|
55
|
+
leafColumns: I,
|
|
56
|
+
selectedField: y,
|
|
57
|
+
dataItemKey: i,
|
|
58
58
|
select: h,
|
|
59
|
-
highlight:
|
|
60
|
-
editField:
|
|
59
|
+
highlight: v,
|
|
60
|
+
editField: S,
|
|
61
61
|
cellRender: $,
|
|
62
62
|
cells: A,
|
|
63
63
|
itemChange: G,
|
|
@@ -68,41 +68,41 @@ const ce = ({
|
|
|
68
68
|
cancelHandler: q,
|
|
69
69
|
cellClickHandler: O,
|
|
70
70
|
cellKeydownHandler: j,
|
|
71
|
-
computedCollapsed:
|
|
71
|
+
computedCollapsed: b,
|
|
72
72
|
uniqueField: z,
|
|
73
73
|
columnsRef: J,
|
|
74
|
-
isRtl:
|
|
74
|
+
isRtl: x,
|
|
75
75
|
idPrefix: K
|
|
76
|
-
} =
|
|
77
|
-
leafColumns:
|
|
78
|
-
editField:
|
|
76
|
+
} = a, L = h && i && c(i)(l.dataItem) !== void 0 ? h[c(i)(l.dataItem)] : void 0, C = y ? g(y, l.dataItem) : L, T = v && i && c(i)(l.dataItem) !== void 0 ? v[c(i)(l.dataItem)] : void 0, M = ce({
|
|
77
|
+
leafColumns: I,
|
|
78
|
+
editField: S,
|
|
79
79
|
item: l
|
|
80
|
-
}), Q =
|
|
81
|
-
selectedField:
|
|
82
|
-
dataItemKey:
|
|
80
|
+
}), Q = fe({
|
|
81
|
+
selectedField: y,
|
|
82
|
+
dataItemKey: i,
|
|
83
83
|
select: h,
|
|
84
84
|
item: l
|
|
85
|
-
}), U =
|
|
86
|
-
highlight:
|
|
87
|
-
dataItemKey:
|
|
85
|
+
}), U = se({
|
|
86
|
+
highlight: v,
|
|
87
|
+
dataItemKey: i,
|
|
88
88
|
item: l
|
|
89
89
|
});
|
|
90
90
|
return {
|
|
91
|
-
row: (
|
|
92
|
-
columnIndex:
|
|
91
|
+
row: (a.hasDynamicColSpan ? a.getCellsToRender(l.dataItem, I) : a.cellsToRender).map(({
|
|
92
|
+
columnIndex: s,
|
|
93
93
|
colSpan: W
|
|
94
94
|
}) => {
|
|
95
95
|
var E, V, F, N, R;
|
|
96
|
-
const e =
|
|
96
|
+
const e = I[s];
|
|
97
97
|
let u;
|
|
98
|
-
if ((E = e.rowSpannable) != null && E.enabled && l.rowType === "data" && e.field &&
|
|
99
|
-
const
|
|
98
|
+
if ((E = e.rowSpannable) != null && E.enabled && l.rowType === "data" && e.field && f) {
|
|
99
|
+
const d = e.field ? (F = (V = e.rowSpannable).valueGetter) == null ? void 0 : F.call(V, l.dataItem, e.field) : null;
|
|
100
100
|
u = {
|
|
101
|
-
value:
|
|
101
|
+
value: d,
|
|
102
102
|
count: 1
|
|
103
|
-
},
|
|
103
|
+
}, f[e.field] && ((N = f[e.field]) == null ? void 0 : N.value) === d && f[e.field] !== null ? (f[e.field].count++, u.count = null) : f[e.field] = u;
|
|
104
104
|
}
|
|
105
|
-
const X = `${e.className ? e.className + " " : ""}${e.locked ? "k-grid-content-sticky" : ""}`, Y =
|
|
105
|
+
const X = `${e.className ? e.className + " " : ""}${e.locked ? "k-grid-content-sticky" : ""}`, Y = x ? {
|
|
106
106
|
left: e.right + "px",
|
|
107
107
|
right: e.left + "px"
|
|
108
108
|
} : {
|
|
@@ -110,14 +110,14 @@ const ce = ({
|
|
|
110
110
|
right: e.right + "px"
|
|
111
111
|
}, Z = e.locked && (e.left !== void 0 || e.right !== void 0) ? Y : void 0;
|
|
112
112
|
let k = !1;
|
|
113
|
-
if (e.editable &&
|
|
114
|
-
const
|
|
115
|
-
(
|
|
113
|
+
if (e.editable && S) {
|
|
114
|
+
const d = g(S, l.dataItem);
|
|
115
|
+
(d === !0 || d === e.field) && (k = !0);
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
let
|
|
119
|
-
l.rowType === "groupFooter" ?
|
|
120
|
-
const w = (R =
|
|
117
|
+
const t = oe(A, e.cells);
|
|
118
|
+
let p;
|
|
119
|
+
l.rowType === "groupFooter" ? p = (t == null ? void 0 : t.groupFooter) || e.cell : l.rowType === "groupHeader" ? p = (t == null ? void 0 : t.groupHeader) || e.cell : (e.cell || t != null && t.data) && (p = e.cell || (t == null ? void 0 : t.data));
|
|
120
|
+
const w = (R = b == null ? void 0 : b[l.level]) == null ? void 0 : R.some((d) => d === re(l.dataItem, z)), ee = e.id ? e.id : s, le = w ? !w : l.expanded || l.dataItem.expanded, te = e._type === "expand", ae = ie.generateNavigatableId(`${o}-${String(s)}`, K, te || l.rowType === "groupHeader" || l.rowType === "groupFooter" || e.field === "value" ? "nodata" : "cell"), m = {
|
|
121
121
|
locked: e.locked,
|
|
122
122
|
key: ee,
|
|
123
123
|
id: ae,
|
|
@@ -130,13 +130,13 @@ const ce = ({
|
|
|
130
130
|
type: e.type,
|
|
131
131
|
columnType: e.columnType,
|
|
132
132
|
className: X,
|
|
133
|
-
render:
|
|
133
|
+
render: p || $,
|
|
134
134
|
onChange: G,
|
|
135
|
-
onSelectionchange: (
|
|
136
|
-
event:
|
|
135
|
+
onSelectionchange: (d) => B({
|
|
136
|
+
event: d,
|
|
137
137
|
dataItem: l.dataItem,
|
|
138
|
-
dataIndex:
|
|
139
|
-
columnIndex:
|
|
138
|
+
dataIndex: n,
|
|
139
|
+
columnIndex: s
|
|
140
140
|
}),
|
|
141
141
|
onCellclick: O,
|
|
142
142
|
onCellkeydown: j,
|
|
@@ -144,22 +144,22 @@ const ce = ({
|
|
|
144
144
|
onRemove: P,
|
|
145
145
|
onSave: _,
|
|
146
146
|
onCancel: q,
|
|
147
|
-
cells:
|
|
148
|
-
columnIndex:
|
|
149
|
-
columnsCount: J.filter((
|
|
147
|
+
cells: t,
|
|
148
|
+
columnIndex: s,
|
|
149
|
+
columnsCount: J.filter((d) => !d.children.length).length,
|
|
150
150
|
rowType: l.rowType,
|
|
151
151
|
level: l.level,
|
|
152
152
|
expanded: le,
|
|
153
153
|
dataIndex: l.dataIndex,
|
|
154
154
|
style: Z,
|
|
155
155
|
ariaColumnIndex: e.ariaColumnIndex,
|
|
156
|
-
isRtl:
|
|
157
|
-
isSelected: !!((e == null ? void 0 : e._type) === "edit" ?
|
|
158
|
-
isHighlighted: !!(typeof
|
|
156
|
+
isRtl: x,
|
|
157
|
+
isSelected: !!((e == null ? void 0 : e._type) === "edit" ? C : Array.isArray(C) && C.indexOf(s) > -1),
|
|
158
|
+
isHighlighted: !!(typeof T != "boolean" && T && (e != null && e.field) && T[e.field] === !0),
|
|
159
159
|
group: l.group,
|
|
160
160
|
rowSpan: u
|
|
161
161
|
};
|
|
162
|
-
return e.defaultCell ?
|
|
162
|
+
return e.defaultCell ? H(e.defaultCell, m, null) : k ? H(de, m, null) : H(ne, m, null);
|
|
163
163
|
}),
|
|
164
164
|
isInEdit: M,
|
|
165
165
|
isSelected: Q,
|
|
@@ -167,8 +167,8 @@ const ce = ({
|
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
export {
|
|
170
|
-
|
|
170
|
+
se as calculateIsHighlighted,
|
|
171
171
|
ce as calculateIsInEdit,
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
fe as calculateIsSelected,
|
|
173
|
+
be as getRowContents
|
|
174
174
|
};
|
package/package-metadata.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 e={name:"@progress/kendo-vue-grid",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-grid",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1785936763,version:"9.2.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "9.2.0-develop.
|
|
13
|
+
publishDate: 1785936763,
|
|
14
|
+
version: "9.2.0-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-grid",
|
|
3
|
-
"version": "9.2.0-develop.
|
|
3
|
+
"version": "9.2.0-develop.3",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.1",
|
|
30
30
|
"@progress/kendo-file-saver": "^1.1.2",
|
|
31
31
|
"@progress/kendo-licensing": "^1.7.2",
|
|
32
|
-
"@progress/kendo-vue-animation": "9.2.0-develop.
|
|
33
|
-
"@progress/kendo-vue-buttons": "9.2.0-develop.
|
|
34
|
-
"@progress/kendo-vue-common": "9.2.0-develop.
|
|
35
|
-
"@progress/kendo-vue-data-tools": "9.2.0-develop.
|
|
36
|
-
"@progress/kendo-vue-dateinputs": "9.2.0-develop.
|
|
37
|
-
"@progress/kendo-vue-indicators": "9.2.0-develop.
|
|
38
|
-
"@progress/kendo-vue-dropdowns": "9.2.0-develop.
|
|
39
|
-
"@progress/kendo-vue-inputs": "9.2.0-develop.
|
|
40
|
-
"@progress/kendo-vue-intl": "9.2.0-develop.
|
|
41
|
-
"@progress/kendo-vue-popup": "9.2.0-develop.
|
|
42
|
-
"@progress/kendo-vue-layout": "9.2.0-develop.
|
|
32
|
+
"@progress/kendo-vue-animation": "9.2.0-develop.3",
|
|
33
|
+
"@progress/kendo-vue-buttons": "9.2.0-develop.3",
|
|
34
|
+
"@progress/kendo-vue-common": "9.2.0-develop.3",
|
|
35
|
+
"@progress/kendo-vue-data-tools": "9.2.0-develop.3",
|
|
36
|
+
"@progress/kendo-vue-dateinputs": "9.2.0-develop.3",
|
|
37
|
+
"@progress/kendo-vue-indicators": "9.2.0-develop.3",
|
|
38
|
+
"@progress/kendo-vue-dropdowns": "9.2.0-develop.3",
|
|
39
|
+
"@progress/kendo-vue-inputs": "9.2.0-develop.3",
|
|
40
|
+
"@progress/kendo-vue-intl": "9.2.0-develop.3",
|
|
41
|
+
"@progress/kendo-vue-popup": "9.2.0-develop.3",
|
|
42
|
+
"@progress/kendo-vue-layout": "9.2.0-develop.3",
|
|
43
43
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
44
44
|
"vue": "^3.0.2"
|
|
45
45
|
},
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"package": {
|
|
61
61
|
"productName": "Kendo UI for Vue",
|
|
62
62
|
"productCode": "KENDOUIVUE",
|
|
63
|
-
"publishDate":
|
|
63
|
+
"publishDate": 1785936763,
|
|
64
64
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/"
|
|
65
65
|
}
|
|
66
66
|
},
|