@progress/kendo-vue-grid 7.1.0-develop.7 → 8.0.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.js +1 -1
- package/Grid.mjs +235 -234
- package/GridSearchBox.js +1 -1
- package/GridSearchBox.mjs +18 -18
- package/GridState.js +1 -1
- package/GridState.mjs +2 -2
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +6 -6
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +71 -60
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +99 -89
- package/index.d.mts +7 -9
- package/index.d.ts +7 -9
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/utils/main.js +1 -1
- package/utils/main.mjs +171 -146
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +40 -20
package/header/HeaderRow.mjs
CHANGED
|
@@ -5,25 +5,26 @@
|
|
|
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 { normalize as
|
|
10
|
-
import { ColumnResizer as
|
|
11
|
-
import { ColumnDraggable as
|
|
12
|
-
import { GridHeaderCell as
|
|
13
|
-
import { ColumnMenu as
|
|
14
|
-
import { noop as
|
|
15
|
-
import { HeaderThElement as
|
|
16
|
-
import { sortableColumnAriaLabel as
|
|
17
|
-
import { provideLocalizationService as
|
|
18
|
-
import { sortAscSmallIcon as
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
import { defineComponent as _, createVNode as r, isVNode as P } from "vue";
|
|
9
|
+
import { normalize as q } from "../interfaces/GridSortSettings.mjs";
|
|
10
|
+
import { ColumnResizer as E } from "../drag/ColumnResizer.mjs";
|
|
11
|
+
import { ColumnDraggable as G } from "../drag/ColumnDraggable.mjs";
|
|
12
|
+
import { GridHeaderCell as U } from "./GridHeaderCell.mjs";
|
|
13
|
+
import { ColumnMenu as J } from "../columnMenu/ColumnMenu.mjs";
|
|
14
|
+
import { noop as Q, templateRendering as W, getListeners as X, Keys as M, hasListener as Y, Icon as Z } from "@progress/kendo-vue-common";
|
|
15
|
+
import { HeaderThElement as ee } from "@progress/kendo-vue-data-tools";
|
|
16
|
+
import { sortableColumnAriaLabel as O, messages as k, sortableColumnAscendingAriaLabel as I, sortableColumnDescendingAriaLabel as z } from "../messages/main.mjs";
|
|
17
|
+
import { provideLocalizationService as ne } from "@progress/kendo-vue-intl";
|
|
18
|
+
import { sortAscSmallIcon as te, sortDescSmallIcon as le } from "@progress/kendo-svg-icons";
|
|
19
|
+
import { getVirtualHeaderCellsToRender as re } from "../utils/virtualColumns.mjs";
|
|
20
|
+
function H(n) {
|
|
21
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !P(n);
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
+
const S = {
|
|
23
24
|
none: "none",
|
|
24
25
|
asc: "ascending",
|
|
25
26
|
desc: "descending"
|
|
26
|
-
},
|
|
27
|
+
}, oe = {
|
|
27
28
|
true: {
|
|
28
29
|
asc: "desc",
|
|
29
30
|
desc: "",
|
|
@@ -34,7 +35,7 @@ const k = {
|
|
|
34
35
|
desc: "asc",
|
|
35
36
|
"": "asc"
|
|
36
37
|
}
|
|
37
|
-
},
|
|
38
|
+
}, $e = /* @__PURE__ */ _({
|
|
38
39
|
name: "KendoHeaderRow",
|
|
39
40
|
props: {
|
|
40
41
|
grid: Object,
|
|
@@ -51,6 +52,8 @@ const k = {
|
|
|
51
52
|
filterChange: Function,
|
|
52
53
|
filterRow: Object,
|
|
53
54
|
columns: Array,
|
|
55
|
+
cellsToRender: Array,
|
|
56
|
+
columnVirtualization: Boolean,
|
|
54
57
|
columnsMap: Array,
|
|
55
58
|
columnResize: Object,
|
|
56
59
|
columnMenu: [Boolean, String, Function, Object],
|
|
@@ -75,7 +78,7 @@ const k = {
|
|
|
75
78
|
},
|
|
76
79
|
inject: {
|
|
77
80
|
onNavFocus: {
|
|
78
|
-
default:
|
|
81
|
+
default: Q
|
|
79
82
|
},
|
|
80
83
|
kendoLocalizationService: {
|
|
81
84
|
default: null
|
|
@@ -90,51 +93,51 @@ const k = {
|
|
|
90
93
|
this.serviceIndex = 0, this.index = -1, this._element = null, this.cellClick = this.cellClick.bind(this);
|
|
91
94
|
},
|
|
92
95
|
methods: {
|
|
93
|
-
pressHandler(
|
|
94
|
-
this.$emit("pressHandler",
|
|
96
|
+
pressHandler(n, t) {
|
|
97
|
+
this.$emit("pressHandler", n, t);
|
|
95
98
|
},
|
|
96
|
-
dragHandler(
|
|
97
|
-
this.$emit("dragHandler",
|
|
99
|
+
dragHandler(n, t) {
|
|
100
|
+
this.$emit("dragHandler", n, t);
|
|
98
101
|
},
|
|
99
|
-
releaseHandler(
|
|
100
|
-
this.$emit("releaseHandler",
|
|
102
|
+
releaseHandler(n) {
|
|
103
|
+
this.$emit("releaseHandler", n);
|
|
101
104
|
},
|
|
102
|
-
selectionChangeHandler(
|
|
103
|
-
this.$emit("selectionchange",
|
|
105
|
+
selectionChangeHandler(n) {
|
|
106
|
+
this.$emit("selectionchange", n);
|
|
104
107
|
},
|
|
105
|
-
cellClick(
|
|
106
|
-
if (
|
|
108
|
+
cellClick(n, t) {
|
|
109
|
+
if (n.preventDefault(), !Y.call(this, "sortChange"))
|
|
107
110
|
return;
|
|
108
111
|
const {
|
|
109
112
|
allowUnsort: u,
|
|
110
113
|
mode: h
|
|
111
|
-
} =
|
|
112
|
-
|
|
113
|
-
field:
|
|
114
|
-
dir:
|
|
115
|
-
}), this.sortChangeHandler(
|
|
116
|
-
event:
|
|
117
|
-
field:
|
|
114
|
+
} = q(this.$props.sortable || !1, t.sortable || !1), s = (this.$props.sort || []).filter((o) => o.field === t.field)[0], c = oe[u][s && s.dir || ""], f = h === "single" ? [] : (this.$props.sort || []).filter((o) => o.field !== t.field);
|
|
115
|
+
c !== "" && t.field && f.push({
|
|
116
|
+
field: t.field,
|
|
117
|
+
dir: c
|
|
118
|
+
}), this.sortChangeHandler(f, {
|
|
119
|
+
event: n,
|
|
120
|
+
field: t.field
|
|
118
121
|
});
|
|
119
122
|
},
|
|
120
|
-
sortChangeHandler(
|
|
121
|
-
this.$emit("sortChange",
|
|
123
|
+
sortChangeHandler(n, t) {
|
|
124
|
+
this.$emit("sortChange", n, t);
|
|
122
125
|
},
|
|
123
|
-
filterChangeHandler(
|
|
124
|
-
this.$emit("filterChange",
|
|
126
|
+
filterChangeHandler(n, t) {
|
|
127
|
+
this.$emit("filterChange", n, t);
|
|
125
128
|
},
|
|
126
|
-
cellClass(
|
|
127
|
-
const h =
|
|
128
|
-
let
|
|
129
|
-
return this.$props.sort && this.$props.sort.filter((
|
|
129
|
+
cellClass(n, t, u) {
|
|
130
|
+
const h = t ? " " + t : "";
|
|
131
|
+
let s = "k-header" + (u ? " k-grid-header-sticky" : "") + h;
|
|
132
|
+
return this.$props.sort && this.$props.sort.filter((c) => c.field === n).length > 0 && (s += " k-sorted"), s;
|
|
130
133
|
},
|
|
131
|
-
cellKeyDown(
|
|
132
|
-
|
|
133
|
-
[
|
|
134
|
+
cellKeyDown(n, t) {
|
|
135
|
+
n.defaultPrevented || (n.keyCode === M.enter && this.cellClick(n, t), n.altKey && n.keyCode === M.down && t.field && (n.preventDefault(), this.columnMenuOpened = {
|
|
136
|
+
[t.field]: !0
|
|
134
137
|
}));
|
|
135
138
|
},
|
|
136
|
-
getTemplate(
|
|
137
|
-
return
|
|
139
|
+
getTemplate(n) {
|
|
140
|
+
return W.call(this.$props.grid, n, X.call(this.$props.grid));
|
|
138
141
|
},
|
|
139
142
|
columnMenuClose() {
|
|
140
143
|
this.onNavFocus({}), this.columnMenuOpened = {};
|
|
@@ -150,70 +153,77 @@ const k = {
|
|
|
150
153
|
};
|
|
151
154
|
}
|
|
152
155
|
},
|
|
153
|
-
render(
|
|
154
|
-
const n =
|
|
156
|
+
render() {
|
|
157
|
+
const n = ne(this), t = n.toLanguageString(O, k[O]), u = n.toLanguageString(I, k[I]), h = n.toLanguageString(z, k[z]);
|
|
155
158
|
this.serviceIndex = 0, this.index = -1;
|
|
156
|
-
const s = function(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
const s = this.$props.columnsMap && this.$props.columnsMap.length === 1, c = this.$props.columnVirtualization && s, f = function(o, m) {
|
|
160
|
+
const i = re({
|
|
161
|
+
cellsToRender: this.$props.cellsToRender || [],
|
|
162
|
+
columns: this.$props.columns,
|
|
163
|
+
rowIndex: m,
|
|
164
|
+
enableVirtualization: c
|
|
165
|
+
}), R = i.columnsToRender.length > 0, L = R ? i.columnsToRender : o, w = R ? i.colSpans : [];
|
|
166
|
+
return L.map(function(A, D) {
|
|
167
|
+
var y;
|
|
168
|
+
const e = this.$props.columns[A], g = this.$props.sortable && e.sortable, C = this.$props.sort ? this.$props.sort.findIndex((l) => l.field === e.field) : -1, $ = C >= 0 && this.$props.sort[C].dir || "none", d = function(l) {
|
|
159
169
|
if (!this.$props.sort)
|
|
160
170
|
return null;
|
|
161
|
-
const
|
|
171
|
+
const b = l >= 0 ? this.$props.sort[l].dir : "";
|
|
162
172
|
return l >= 0 && [r("span", {
|
|
163
173
|
key: 1,
|
|
164
174
|
class: "k-sort-icon"
|
|
165
|
-
}, [r(
|
|
166
|
-
name: "sort-" +
|
|
167
|
-
icon:
|
|
175
|
+
}, [r(Z, {
|
|
176
|
+
name: "sort-" + b + "-small",
|
|
177
|
+
icon: b === "asc" ? te : le
|
|
168
178
|
}, null)]), this.$props.sort.length > 1 && r("span", {
|
|
169
179
|
key: 2,
|
|
170
180
|
class: "k-sort-icon"
|
|
171
181
|
}, [r("span", {
|
|
172
182
|
class: "k-sort-order"
|
|
173
183
|
}, [l + 1])])];
|
|
174
|
-
}.call(this,
|
|
184
|
+
}.call(this, C), a = e.columnMenu || e.columnMenu === !1 ? e.columnMenu : this.$props.columnMenu, j = e.menuIcon || this.$props.columnMenuIcon, x = (e.kFirst ? "k-first " : "") + this.cellClass(e.field, e.headerClassName, e.locked) + (a ? " k-filterable" : ""), F = !a || typeof a == "boolean" ? !!a : this.getTemplate(a), v = e.locked && e.left !== void 0 ? this.$props.isRtl ? {
|
|
175
185
|
left: e.right + "px",
|
|
176
186
|
right: e.left + "px"
|
|
177
187
|
} : {
|
|
178
188
|
left: e.left + "px",
|
|
179
189
|
right: e.right + "px"
|
|
180
|
-
} :
|
|
190
|
+
} : void 0, T = S[$] === "none" ? t : S[$] === "ascending" ? u : h;
|
|
181
191
|
let p = e.isAccessible ? {
|
|
182
|
-
ariaSort:
|
|
183
|
-
ariaLabel:
|
|
192
|
+
ariaSort: S[$],
|
|
193
|
+
ariaLabel: T,
|
|
184
194
|
role: "columnheader",
|
|
185
195
|
ariaColumnIndex: this.$props.isColCountDefined ? this.$props.columnsInitial.findIndex((l) => l.field === e.field) + 1 : void 0,
|
|
186
196
|
ariaSelected: !1,
|
|
187
|
-
ariaHaspopup:
|
|
197
|
+
ariaHaspopup: a ? "menu" : this.$props.filterable && e.filterable ? "dialog" : void 0
|
|
188
198
|
} : {
|
|
189
199
|
role: "columnheader"
|
|
190
200
|
};
|
|
191
|
-
const
|
|
192
|
-
return r(
|
|
193
|
-
ariaSort:
|
|
194
|
-
ariaLabel:
|
|
201
|
+
const V = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, B = e.columnMenuOpened !== void 0 ? e.columnMenuOpened : this.columnMenuOpened[e.field], K = (y = w[D]) != null ? y : e.headerColSpan;
|
|
202
|
+
return r(ee, {
|
|
203
|
+
ariaSort: g ? p.ariaSort : void 0,
|
|
204
|
+
ariaLabel: g ? p.ariaLabel : void 0,
|
|
195
205
|
role: p.role,
|
|
196
206
|
ariaColumnIndex: p.ariaColumnIndex,
|
|
197
207
|
ariaSelected: p.ariaSelected,
|
|
198
208
|
ariaHaspopup: p.ariaHaspopup,
|
|
199
|
-
key:
|
|
200
|
-
colSpan:
|
|
209
|
+
key: V,
|
|
210
|
+
colSpan: K,
|
|
201
211
|
rowSpan: e.rowSpan,
|
|
202
|
-
class:
|
|
203
|
-
style:
|
|
212
|
+
class: x,
|
|
213
|
+
style: v,
|
|
204
214
|
columnId: e.id,
|
|
205
215
|
navigatable: e.navigatable,
|
|
206
216
|
onKeydown: (l) => this.cellKeyDown(l, e)
|
|
207
217
|
}, {
|
|
208
|
-
default: () => [[e.children.length === 0 &&
|
|
218
|
+
default: () => [[e.children.length === 0 && a && r(J, {
|
|
209
219
|
key: 0,
|
|
210
220
|
column: {
|
|
211
221
|
field: e.field,
|
|
212
222
|
filter: e.filter
|
|
213
223
|
},
|
|
214
|
-
opened:
|
|
224
|
+
opened: B,
|
|
215
225
|
animate: this.$props.columnMenuAnimate,
|
|
216
|
-
sortable:
|
|
226
|
+
sortable: g,
|
|
217
227
|
sort: this.$props.sort,
|
|
218
228
|
onClose: this.columnMenuClose,
|
|
219
229
|
onSortchange: this.sortChangeHandler,
|
|
@@ -221,36 +231,36 @@ const k = {
|
|
|
221
231
|
filterable: this.$props.filterable && e.filterable,
|
|
222
232
|
filterOperators: this.$props.filterOperators,
|
|
223
233
|
onFilterchange: this.filterChangeHandler,
|
|
224
|
-
render:
|
|
225
|
-
columnMenuIcon:
|
|
234
|
+
render: F,
|
|
235
|
+
columnMenuIcon: j
|
|
226
236
|
}, null), e.internalHeaderCell && r("span", {
|
|
227
237
|
class: "k-cell-inner"
|
|
228
238
|
}, [r(e.internalHeaderCell, {
|
|
229
239
|
key: 1,
|
|
230
240
|
field: e.field,
|
|
231
|
-
sortable:
|
|
241
|
+
sortable: g,
|
|
232
242
|
onHeadercellclick: (l) => this.cellClick(l, e),
|
|
233
243
|
onSelectionchange: this.selectionChangeHandler,
|
|
234
244
|
selectionValue: e.headerSelectionValue,
|
|
235
245
|
title: e.title,
|
|
236
246
|
render: (e.headerCell || this.$props.cellRender) && this.getTemplate(e.headerCell || this.$props.cellRender)
|
|
237
|
-
},
|
|
247
|
+
}, H(d) ? d : {
|
|
238
248
|
default: () => [d]
|
|
239
249
|
})]) || r("span", {
|
|
240
250
|
class: "k-cell-inner"
|
|
241
|
-
}, [r(
|
|
251
|
+
}, [r(U, {
|
|
242
252
|
key: 1,
|
|
243
253
|
field: e.field,
|
|
244
|
-
sortable:
|
|
254
|
+
sortable: g,
|
|
245
255
|
onHeadercellclick: (l) => this.cellClick(l, e),
|
|
246
256
|
selectionValue: e.headerSelectionValue,
|
|
247
257
|
title: e.title,
|
|
248
258
|
render: (e.headerCell || this.$props.cellRender) && this.getTemplate(e.headerCell || this.$props.cellRender)
|
|
249
|
-
},
|
|
259
|
+
}, H(d) ? d : {
|
|
250
260
|
default: () => [d]
|
|
251
|
-
})]), this.$props.columnResize && this.$props.columnResize.resizable && e.resizable && r(
|
|
261
|
+
})]), this.$props.columnResize && this.$props.columnResize.resizable && e.resizable && r(E, {
|
|
252
262
|
key: 2,
|
|
253
|
-
onResize: (l,
|
|
263
|
+
onResize: (l, b, N) => this.$props.columnResize && this.$props.columnResize.dragHandler(l, e, b, N)
|
|
254
264
|
}, null)]]
|
|
255
265
|
});
|
|
256
266
|
}, this);
|
|
@@ -259,23 +269,23 @@ const k = {
|
|
|
259
269
|
role: "rowgroup",
|
|
260
270
|
class: this.theadClasses,
|
|
261
271
|
"data-keyboardnavheader": !0
|
|
262
|
-
}, [this.$props.columnsMap.map(function(
|
|
263
|
-
let
|
|
264
|
-
return (this.$props.groupable || this.$props.reorderable) && r(
|
|
265
|
-
key:
|
|
272
|
+
}, [this.$props.columnsMap.map(function(o, m) {
|
|
273
|
+
let i;
|
|
274
|
+
return (this.$props.groupable || this.$props.reorderable) && r(G, {
|
|
275
|
+
key: m,
|
|
266
276
|
onPressHandler: this.pressHandler,
|
|
267
277
|
onDragHandler: this.dragHandler,
|
|
268
278
|
onReleaseHandler: this.releaseHandler
|
|
269
|
-
},
|
|
270
|
-
default: () => [
|
|
279
|
+
}, H(i = f.call(this, o, m)) ? i : {
|
|
280
|
+
default: () => [i]
|
|
271
281
|
}) || r("tr", {
|
|
272
282
|
class: "k-table-row",
|
|
273
283
|
role: "row",
|
|
274
284
|
"aria-rowindex": this.columnsMap.length
|
|
275
|
-
}, [
|
|
285
|
+
}, [f.call(this, o, m)]);
|
|
276
286
|
}, this), this.$props.filterRow]);
|
|
277
287
|
}
|
|
278
288
|
});
|
|
279
289
|
export {
|
|
280
|
-
|
|
290
|
+
$e as HeaderRow
|
|
281
291
|
};
|
package/index.d.mts
CHANGED
|
@@ -190,9 +190,6 @@ rowIndex: PropType<number>;
|
|
|
190
190
|
columnStyles(column: ExtendedColumnProps): {
|
|
191
191
|
left: string;
|
|
192
192
|
right: string;
|
|
193
|
-
} | {
|
|
194
|
-
left?: undefined;
|
|
195
|
-
right?: undefined;
|
|
196
193
|
};
|
|
197
194
|
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
198
195
|
isRtl: PropType<boolean>;
|
|
@@ -326,8 +323,8 @@ defaultGroup: PropType<GroupDescriptor[]>;
|
|
|
326
323
|
groupable: PropType<boolean | GridGroupableSettings_2>;
|
|
327
324
|
groupExpand: PropType<GroupExpandDescriptor[]>;
|
|
328
325
|
defaultGroupExpand: PropType<GroupExpandDescriptor[]>;
|
|
329
|
-
detailExpand: PropType<
|
|
330
|
-
defaultDetailExpand: PropType<
|
|
326
|
+
detailExpand: PropType<DetailExpandDescriptor>;
|
|
327
|
+
defaultDetailExpand: PropType<DetailExpandDescriptor>;
|
|
331
328
|
editField: PropType<string>;
|
|
332
329
|
rowClass: PropType<Function>;
|
|
333
330
|
scrollable: {
|
|
@@ -508,8 +505,8 @@ defaultGroup: PropType<GroupDescriptor[]>;
|
|
|
508
505
|
groupable: PropType<boolean | GridGroupableSettings_2>;
|
|
509
506
|
groupExpand: PropType<GroupExpandDescriptor[]>;
|
|
510
507
|
defaultGroupExpand: PropType<GroupExpandDescriptor[]>;
|
|
511
|
-
detailExpand: PropType<
|
|
512
|
-
defaultDetailExpand: PropType<
|
|
508
|
+
detailExpand: PropType<DetailExpandDescriptor>;
|
|
509
|
+
defaultDetailExpand: PropType<DetailExpandDescriptor>;
|
|
513
510
|
editField: PropType<string>;
|
|
514
511
|
rowClass: PropType<Function>;
|
|
515
512
|
scrollable: {
|
|
@@ -2600,7 +2597,7 @@ export declare interface GridProps {
|
|
|
2600
2597
|
* <Grid :detail-expand="{ 1: true, 3: true }" />
|
|
2601
2598
|
* ```
|
|
2602
2599
|
*/
|
|
2603
|
-
detailExpand?:
|
|
2600
|
+
detailExpand?: DetailExpandDescriptor;
|
|
2604
2601
|
/**
|
|
2605
2602
|
* The default `detailExpand` state applied to the Grid when using uncontrolled mode.
|
|
2606
2603
|
*
|
|
@@ -2609,7 +2606,7 @@ export declare interface GridProps {
|
|
|
2609
2606
|
* <Grid :default-detail-expand="{ 2: true, 4: true }" />
|
|
2610
2607
|
* ```
|
|
2611
2608
|
*/
|
|
2612
|
-
defaultDetailExpand?:
|
|
2609
|
+
defaultDetailExpand?: DetailExpandDescriptor;
|
|
2613
2610
|
/**
|
|
2614
2611
|
* Fires when the user expands or collapses a detail row.
|
|
2615
2612
|
*/
|
|
@@ -3271,6 +3268,7 @@ export declare function mapColumns(columns: Array<{
|
|
|
3271
3268
|
right: number;
|
|
3272
3269
|
rightBorder: boolean;
|
|
3273
3270
|
ariaColumnIndex: number;
|
|
3271
|
+
virtualColumnOffset?: number;
|
|
3274
3272
|
}>, changedColumnLength?: boolean): number[][];
|
|
3275
3273
|
|
|
3276
3274
|
/**
|
package/index.d.ts
CHANGED
|
@@ -190,9 +190,6 @@ rowIndex: PropType<number>;
|
|
|
190
190
|
columnStyles(column: ExtendedColumnProps): {
|
|
191
191
|
left: string;
|
|
192
192
|
right: string;
|
|
193
|
-
} | {
|
|
194
|
-
left?: undefined;
|
|
195
|
-
right?: undefined;
|
|
196
193
|
};
|
|
197
194
|
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
198
195
|
isRtl: PropType<boolean>;
|
|
@@ -326,8 +323,8 @@ defaultGroup: PropType<GroupDescriptor[]>;
|
|
|
326
323
|
groupable: PropType<boolean | GridGroupableSettings_2>;
|
|
327
324
|
groupExpand: PropType<GroupExpandDescriptor[]>;
|
|
328
325
|
defaultGroupExpand: PropType<GroupExpandDescriptor[]>;
|
|
329
|
-
detailExpand: PropType<
|
|
330
|
-
defaultDetailExpand: PropType<
|
|
326
|
+
detailExpand: PropType<DetailExpandDescriptor>;
|
|
327
|
+
defaultDetailExpand: PropType<DetailExpandDescriptor>;
|
|
331
328
|
editField: PropType<string>;
|
|
332
329
|
rowClass: PropType<Function>;
|
|
333
330
|
scrollable: {
|
|
@@ -508,8 +505,8 @@ defaultGroup: PropType<GroupDescriptor[]>;
|
|
|
508
505
|
groupable: PropType<boolean | GridGroupableSettings_2>;
|
|
509
506
|
groupExpand: PropType<GroupExpandDescriptor[]>;
|
|
510
507
|
defaultGroupExpand: PropType<GroupExpandDescriptor[]>;
|
|
511
|
-
detailExpand: PropType<
|
|
512
|
-
defaultDetailExpand: PropType<
|
|
508
|
+
detailExpand: PropType<DetailExpandDescriptor>;
|
|
509
|
+
defaultDetailExpand: PropType<DetailExpandDescriptor>;
|
|
513
510
|
editField: PropType<string>;
|
|
514
511
|
rowClass: PropType<Function>;
|
|
515
512
|
scrollable: {
|
|
@@ -2600,7 +2597,7 @@ export declare interface GridProps {
|
|
|
2600
2597
|
* <Grid :detail-expand="{ 1: true, 3: true }" />
|
|
2601
2598
|
* ```
|
|
2602
2599
|
*/
|
|
2603
|
-
detailExpand?:
|
|
2600
|
+
detailExpand?: DetailExpandDescriptor;
|
|
2604
2601
|
/**
|
|
2605
2602
|
* The default `detailExpand` state applied to the Grid when using uncontrolled mode.
|
|
2606
2603
|
*
|
|
@@ -2609,7 +2606,7 @@ export declare interface GridProps {
|
|
|
2609
2606
|
* <Grid :default-detail-expand="{ 2: true, 4: true }" />
|
|
2610
2607
|
* ```
|
|
2611
2608
|
*/
|
|
2612
|
-
defaultDetailExpand?:
|
|
2609
|
+
defaultDetailExpand?: DetailExpandDescriptor;
|
|
2613
2610
|
/**
|
|
2614
2611
|
* Fires when the user expands or collapses a detail row.
|
|
2615
2612
|
*/
|
|
@@ -3271,6 +3268,7 @@ export declare function mapColumns(columns: Array<{
|
|
|
3271
3268
|
right: number;
|
|
3272
3269
|
rightBorder: boolean;
|
|
3273
3270
|
ariaColumnIndex: number;
|
|
3271
|
+
virtualColumnOffset?: number;
|
|
3274
3272
|
}>, changedColumnLength?: boolean): number[][];
|
|
3275
3273
|
|
|
3276
3274
|
/**
|
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: 1770361088,version:"8.0.0-develop.1",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: "
|
|
13
|
+
publishDate: 1770361088,
|
|
14
|
+
version: "8.0.0-develop.1",
|
|
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": "
|
|
3
|
+
"version": "8.0.0-develop.1",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"@progress/kendo-data-query": "^1.7.0",
|
|
22
22
|
"@progress/kendo-drawing": "^1.21.1",
|
|
23
23
|
"@progress/kendo-licensing": "^1.7.2",
|
|
24
|
-
"@progress/kendo-vue-animation": "
|
|
25
|
-
"@progress/kendo-vue-buttons": "
|
|
26
|
-
"@progress/kendo-vue-common": "
|
|
27
|
-
"@progress/kendo-vue-data-tools": "
|
|
28
|
-
"@progress/kendo-vue-dateinputs": "
|
|
29
|
-
"@progress/kendo-vue-indicators": "
|
|
30
|
-
"@progress/kendo-vue-dropdowns": "
|
|
31
|
-
"@progress/kendo-vue-inputs": "
|
|
32
|
-
"@progress/kendo-vue-intl": "
|
|
33
|
-
"@progress/kendo-vue-popup": "
|
|
24
|
+
"@progress/kendo-vue-animation": "8.0.0-develop.1",
|
|
25
|
+
"@progress/kendo-vue-buttons": "8.0.0-develop.1",
|
|
26
|
+
"@progress/kendo-vue-common": "8.0.0-develop.1",
|
|
27
|
+
"@progress/kendo-vue-data-tools": "8.0.0-develop.1",
|
|
28
|
+
"@progress/kendo-vue-dateinputs": "8.0.0-develop.1",
|
|
29
|
+
"@progress/kendo-vue-indicators": "8.0.0-develop.1",
|
|
30
|
+
"@progress/kendo-vue-dropdowns": "8.0.0-develop.1",
|
|
31
|
+
"@progress/kendo-vue-inputs": "8.0.0-develop.1",
|
|
32
|
+
"@progress/kendo-vue-intl": "8.0.0-develop.1",
|
|
33
|
+
"@progress/kendo-vue-popup": "8.0.0-develop.1",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.4.0",
|
|
35
35
|
"vue": "^3.0.2"
|
|
36
36
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"package": {
|
|
52
52
|
"productName": "Kendo UI for Vue",
|
|
53
53
|
"productCode": "KENDOUIVUE",
|
|
54
|
-
"publishDate":
|
|
54
|
+
"publishDate": 1770361088,
|
|
55
55
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/"
|
|
56
56
|
}
|
|
57
57
|
},
|
package/utils/main.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 w=require("@progress/kendo-vue-data-tools"),I=require("@progress/kendo-vue-common"),D=require("../GridColumn.js"),S="string";function v(e,t){const n=e.split(".");let i=t;return n.forEach(o=>{i=i?i[o]:void 0}),i}function R(e,t,n,i,o,l,r,d,s,f,c=0,h){let p=c;for(let a=0;a<t.length;a++){let x;if(!o||t[a].value===void 0||t[a].items===void 0){const C=s?!!(l!=null&&l[I.getter(s)(t[a])]):!1;e[e.length]={dataIndex:i.index,dataItem:t[a],rowType:"data",level:c,group:h,expanded:f!==void 0?v(f,t[a]):C!=null?C:!1},i.index++;continue}else{let C;h!=null&&h.parents?C=[{field:h.field,value:h.value},...h.parents]:h?C=[h]:C=[],x={field:t[a].field,value:t[a].value,parents:C}}p=Math.max(p,c+1);let g=!1;const u=w.findGroupExpand(r||[],x);f?g=f===void 0||v(f,t[a])===void 0||v(f,t[a]):g=u?u.expanded!==!1:d!==!1,e[e.length]={dataIndex:-1,dataItem:t[a],level:c,group:x,rowType:"groupHeader",expanded:g},g&&(x.expanded=g,p=Math.max(R(e,t[a].items,n,i,o,l,r,d,s,f,c+1,x),p)),(n==="always"||g&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[a],rowType:"groupFooter",level:c,expanded:g})}return p}function O(e){return e&&getComputedStyle(e).direction==="rtl"||!1}function k(e,t){if(!t||!e||!e.originalEvent||!I.canUseDOM)return-1;let n=document.elementFromPoint(e.clientX,e.originalEvent.clientY);for(;n&&n.parentElement!==t;)n=n.parentElement;const i=t.children;for(let o=0;o<i.length;o++)if(i[o]===n)return o;return-1}const A=["sortChange","filterChange","groupChange","pageChange","expandChange","selectionChange","headerSelectionChange","rowClick","itemChange","dataStateChange","columnResize","columnReorder"],N=(e,t)=>`The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;function H(e){for(let t=0;t<A.length;t++){const n=A[t];if(e[n]!==void 0){const i="on"+n.charAt(0).toUpperCase()+n.slice(1);console.warn(N(n,i))}}}function j(e,t){const n=[[]];let i=0;for(let r=e.length-1;r>=0;r--)i=Math.max(i,e[r].depth),e[r].headerColSpan=e[r].headerColSpan||1,e[r].children.length>0&&(e[r].headerColSpan=e[r].children.reduce((d,s)=>s.hidden?d:d+s.headerColSpan,0));const o=[];let l=1;return e.forEach((r,d)=>{n[r.depth]=n[r.depth]||[];let s=!1;n[r.depth].length===0&&(l<=1?l=1+(r.children.length>0?0:i-r.depth):(l--,s=!0)),r.rowSpan=1+(r.children.length>0?0:i-r.depth),r.kFirst=s,r.index=n[r.depth].length,r.ariaColumnIndex=o[r.depth]?o[r.depth]+1:1;let f=0;const c=[];let h=r.parentIndex;for(;h>=0;)c.unshift(h),h=e[h].parentIndex;for(let a=0;a<c.length;a++){const x=c[a],g=e[x],u=n[g.depth],C=u.indexOf(x);for(let y=0;y<C;y++){const b=u[y];f+=e[b].headerColSpan}}for(let a=0;a<r.depth;a++){const x=n[a]||[];for(let g=0;g<x.length;g++){const u=x[g],C=e[u];C.depth+C.rowSpan-1>=r.depth&&(c.includes(u)||(f+=C.headerColSpan))}}const p=n[r.depth];for(let a=0;a<p.length;a++){const x=p[a],g=e[x];g.parentIndex===r.parentIndex&&(f+=g.headerColSpan)}r.virtualColumnOffset=f,n[r.depth].push(d);for(let a=r.depth;a<r.depth+r.rowSpan;a++)o[a]=(o[a]||0)+r.headerColSpan}),w.updateLeft(n,e,t),w.updateRight(n,e,t),n}function M(e,t,n,i=0,o=!1){const l=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((d,s)=>{d=d;const f=d.id?d.id:w.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),c=I.canUseDOM&&d.media&&window.matchMedia?!window.matchMedia(d.media).matches:!1,h=o||c||d.hidden,p=t==null?void 0:t.find(x=>x.id===f),a=M(d.children,(p==null?void 0:p.children)||[],n,i+1,h);l.push({depth:i,...D.gridDefaultProps,...a.length?{cell:()=>null,filterCell:()=>null}:{},...d,id:f,declarationIndex:l.length,children:a,headerColSpan:0,rowSpan:0,columnType:d.columnType||"data",colSpan:d.colSpan||1,isAccessible:!0,hidden:h,left:null,right:null,rowSpannable:d.rowSpannable,...p?{width:p.width,orderIndex:p.orderIndex}:{}})});const r=(d,s)=>d.orderIndex===s.orderIndex?d.declarationIndex-s.declarationIndex:(d.orderIndex||0)-(s.orderIndex||0);if(l.sort(r),i===0){const d=[],s=(f,c)=>f.forEach(h=>{h.parentIndex=c,s(h.children,d.push(h)-1)});return s(l,-1),d}return l}const T=e=>Array.isArray(e)?e:e?e.data:[];function L(e,t,n,i){const o=T(e),l=[];if(o.length>0){let r=o[0];if(t)for(let s=0;s<t.length;s++)r=r.items&&r.items[0];Object.getOwnPropertyNames(r).forEach(s=>{s!==n.column&&l.push({id:w.tableKeyboardNavigationTools.generateNavigatableId(`${i.prevId++}`,i.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0,...D.gridDefaultProps,field:s})})}return l}const V=(e,t)=>{let n=e[t.parentIndex];for(;n;){if(n.footerCell)return!0;n=e[n.parentIndex]}return!1},K=e=>e.filter(t=>V(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),$={number:function(e,t,n){return typeof e===S&&e.toLowerCase()==="null"?null:t.parseNumber(e,n)},date:function(e,t,n){return typeof e===S&&e.toLowerCase()==="null"?null:t.parseDate(e,n)},boolean:function(e){return typeof e===S?e.toLowerCase()==="null"?null:e.toLowerCase()==="true":e!=null?!!e:e},string:function(e){return typeof e===S&&e.toLowerCase()==="null"?null:e!=null?e+"":e},default:function(e){return e}};function F(e,t,n,i){return e.forEach(o=>{o.expanded=t[i]&&!t[i].includes(E(o,n)),o.items&&o.items.length&&(o.items=F(o.items,t,n,i+1))}),e}function z(e,t,n){return t&&t.length&&e.data.forEach(i=>{i.expanded=i.expanded!==void 0?i.expanded:t[0]&&!t[0].includes(E(i,n)),i.items&&i.items.length&&(i.items=F(i.items,t,n,1))}),e}function E(e,t){let n=e;for(;n.items&&n.items.length;)n=n.items[0];return t?n[t]:e.value}const B=e=>{const t=[],n=i=>i==null?void 0:i.forEach(o=>{t.push(o),n(o.children)});return n(e),t},P=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),U=17895697,q=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,W=(e,t)=>t&&t.filter(n=>n.field===e).length>0,m=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:i,depth:o,headerColSpan:l,rowSpan:r,index:d,kFirst:s,children:f,...c}=t;return f.length?{children:m(f),...c}:c})),X=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1,Y=e=>{var i,o;const t=typeof e=="object"?(i=e.enabled)!=null?i:!0:e!=null?e:!1,n=typeof e=="object"?(o=e.valueGetter)!=null?o:(l,r)=>I.getter(r)(l):(l,r)=>I.getter(r)(l);return{enabled:t,valueGetter:n}},J=e=>{let t=0;if(e){const n=e.insertRow(0),i=n.insertCell(0);i.textContent=" ",t=n.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.applyExpandedState=z;exports.autoGenerateColumns=L;exports.calcRowHeight=J;exports.checkPropCompatibility=H;exports.firefox=P;exports.firefoxMaxHeight=U;exports.flatData=R;exports.footerColumns=K;exports.getColSpan=X;exports.getColumnWidth=q;exports.getDataAsArray=T;exports.getFlatColumnsState=B;exports.getIndex=k;exports.getNestedValue=v;exports.getRowSpanOptions=Y;exports.groupedFirstItemValue=E;exports.isRtl=O;exports.isSorted=W;exports.mapColumns=j;exports.parsers=$;exports.readColumns=M;exports.sanitizeColumns=m;
|