@progress/kendo-vue-grid 8.1.2-develop.2 → 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/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
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as s, createVNode as m } from "vue";
|
|
9
|
+
import { provideLocalizationService as d } from "@progress/kendo-vue-intl";
|
|
10
|
+
import { ContextMenu as p } from "@progress/kendo-vue-layout";
|
|
11
|
+
import { sortDescSmallIcon as x, sortAscSmallIcon as I, fileExcelIcon as u, filePdfIcon as f, caretAltUpIcon as g, caretAltDownIcon as C, caretAltToTopIcon as h, caretAltToBottomIcon as w, caretAltExpandIcon as S, clipboardIcon as v, fileTxtIcon as R, pageHeaderSectionIcon as y, unpinOutlineIcon as c, pinOutlineBottomIcon as i, pinOutlineTopIcon as r, pinOutlineIcon as b, tableRowGroupsIcon as A, gridIcon as E, tableUnmergeIcon as D, tableBodyIcon as P, trashIcon as T, pencilIcon as B, plusIcon as H } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { GridContextMenuItemNames as t } from "./enums.mjs";
|
|
13
|
+
const M = {
|
|
14
|
+
[t.create]: {
|
|
15
|
+
name: "create",
|
|
16
|
+
text: "Add",
|
|
17
|
+
icon: "plus",
|
|
18
|
+
svgIcon: H,
|
|
19
|
+
data: {
|
|
20
|
+
action: "AddCommand"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
[t.edit]: {
|
|
24
|
+
name: "edit",
|
|
25
|
+
text: "Edit",
|
|
26
|
+
icon: "pencil",
|
|
27
|
+
svgIcon: B,
|
|
28
|
+
data: {
|
|
29
|
+
action: "EditCommand"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
[t.delete]: {
|
|
33
|
+
name: "delete",
|
|
34
|
+
text: "Delete",
|
|
35
|
+
icon: "trash",
|
|
36
|
+
svgIcon: T,
|
|
37
|
+
data: {
|
|
38
|
+
action: "DeleteCommand"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
[t.select]: {
|
|
42
|
+
name: "select",
|
|
43
|
+
text: "Select",
|
|
44
|
+
icon: "table-body",
|
|
45
|
+
svgIcon: P,
|
|
46
|
+
items: [{
|
|
47
|
+
name: "selectRow",
|
|
48
|
+
text: "Row",
|
|
49
|
+
icon: "table-row-groups",
|
|
50
|
+
svgIcon: A,
|
|
51
|
+
data: {
|
|
52
|
+
action: "SelectRowCommand"
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
name: "selectAllRows",
|
|
56
|
+
text: "All rows",
|
|
57
|
+
icon: "grid",
|
|
58
|
+
svgIcon: E,
|
|
59
|
+
data: {
|
|
60
|
+
action: "SelectAllRowsCommand"
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
name: "clearSelection",
|
|
64
|
+
text: "Clear selection",
|
|
65
|
+
icon: "table-unmerge",
|
|
66
|
+
svgIcon: D,
|
|
67
|
+
data: {
|
|
68
|
+
action: "ClearSelectionCommand"
|
|
69
|
+
}
|
|
70
|
+
}]
|
|
71
|
+
},
|
|
72
|
+
[t.pinRow]: {
|
|
73
|
+
name: "pinRow",
|
|
74
|
+
text: "Pin row",
|
|
75
|
+
icon: "pin-outline",
|
|
76
|
+
svgIcon: b,
|
|
77
|
+
items: [{
|
|
78
|
+
name: "pinTop",
|
|
79
|
+
text: "Pin to Top",
|
|
80
|
+
icon: "pin-outline-top",
|
|
81
|
+
svgIcon: r,
|
|
82
|
+
data: {
|
|
83
|
+
action: "PinTopCommand"
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
name: "pinBottom",
|
|
87
|
+
text: "Pin to Bottom",
|
|
88
|
+
icon: "pin-outline-bottom",
|
|
89
|
+
svgIcon: i,
|
|
90
|
+
data: {
|
|
91
|
+
action: "PinBottomCommand"
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
name: "unpin",
|
|
95
|
+
text: "Unpin",
|
|
96
|
+
icon: "unpin-outline",
|
|
97
|
+
svgIcon: c,
|
|
98
|
+
data: {
|
|
99
|
+
action: "UnpinCommand"
|
|
100
|
+
}
|
|
101
|
+
}]
|
|
102
|
+
},
|
|
103
|
+
[t.pinTop]: {
|
|
104
|
+
name: "pinTop",
|
|
105
|
+
text: "Pin to Top",
|
|
106
|
+
icon: "pin-outline-top",
|
|
107
|
+
svgIcon: r,
|
|
108
|
+
data: {
|
|
109
|
+
action: "PinTopCommand"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
[t.pinBottom]: {
|
|
113
|
+
name: "pinBottom",
|
|
114
|
+
text: "Pin to Bottom",
|
|
115
|
+
icon: "pin-outline-bottom",
|
|
116
|
+
svgIcon: i,
|
|
117
|
+
data: {
|
|
118
|
+
action: "PinBottomCommand"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
[t.unpin]: {
|
|
122
|
+
name: "unpin",
|
|
123
|
+
text: "Unpin",
|
|
124
|
+
icon: "unpin-outline",
|
|
125
|
+
svgIcon: c,
|
|
126
|
+
data: {
|
|
127
|
+
action: "UnpinCommand"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
[t.copySelection]: {
|
|
131
|
+
name: "copySelection",
|
|
132
|
+
text: "Copy selection",
|
|
133
|
+
icon: "page-header-section",
|
|
134
|
+
svgIcon: y,
|
|
135
|
+
data: {
|
|
136
|
+
action: "CopySelectionCommand"
|
|
137
|
+
},
|
|
138
|
+
options: "withHeaders"
|
|
139
|
+
},
|
|
140
|
+
[t.copySelectionNoHeaders]: {
|
|
141
|
+
name: "copySelectionNoHeaders",
|
|
142
|
+
text: "Copy selection (No Headers)",
|
|
143
|
+
icon: "file-txt",
|
|
144
|
+
svgIcon: R,
|
|
145
|
+
data: {
|
|
146
|
+
action: "CopySelectionCommand"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
[t.paste]: {
|
|
150
|
+
name: "paste",
|
|
151
|
+
text: "Paste (use CTRL/⌘ + V)",
|
|
152
|
+
icon: "clipboard",
|
|
153
|
+
svgIcon: v,
|
|
154
|
+
data: {
|
|
155
|
+
action: "PasteCommand"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
[t.reorderRow]: {
|
|
159
|
+
name: "reorderRow",
|
|
160
|
+
text: "Reorder row",
|
|
161
|
+
icon: "caret-alt-expand",
|
|
162
|
+
svgIcon: S,
|
|
163
|
+
items: [{
|
|
164
|
+
name: "reorderRowUp",
|
|
165
|
+
text: "Up",
|
|
166
|
+
icon: "caret-alt-up",
|
|
167
|
+
svgIcon: g,
|
|
168
|
+
data: {
|
|
169
|
+
action: "ReorderRowCommand"
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
name: "reorderRowDown",
|
|
173
|
+
text: "Down",
|
|
174
|
+
icon: "caret-alt-down",
|
|
175
|
+
svgIcon: C,
|
|
176
|
+
data: {
|
|
177
|
+
action: "ReorderRowCommand"
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
name: "reorderRowTop",
|
|
181
|
+
text: "Top",
|
|
182
|
+
icon: "caret-alt-to-top",
|
|
183
|
+
svgIcon: h,
|
|
184
|
+
data: {
|
|
185
|
+
action: "ReorderRowCommand"
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
name: "reorderRowBottom",
|
|
189
|
+
text: "Bottom",
|
|
190
|
+
icon: "caret-alt-to-bottom",
|
|
191
|
+
svgIcon: w,
|
|
192
|
+
data: {
|
|
193
|
+
action: "ReorderRowCommand"
|
|
194
|
+
}
|
|
195
|
+
}]
|
|
196
|
+
},
|
|
197
|
+
[t.exportPDF]: {
|
|
198
|
+
name: "exportPDF",
|
|
199
|
+
text: "Export to PDF",
|
|
200
|
+
icon: "file-pdf",
|
|
201
|
+
svgIcon: f,
|
|
202
|
+
data: {
|
|
203
|
+
action: "ExportPDFCommand"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
[t.exportExcel]: {
|
|
207
|
+
name: "exportExcel",
|
|
208
|
+
text: "Export to Excel",
|
|
209
|
+
icon: "file-excel",
|
|
210
|
+
svgIcon: u,
|
|
211
|
+
items: [{
|
|
212
|
+
name: "exportToExcelAll",
|
|
213
|
+
text: "All",
|
|
214
|
+
data: {
|
|
215
|
+
action: "ExportExcelCommand"
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
name: "exportToExcelSelection",
|
|
219
|
+
text: "Selection",
|
|
220
|
+
data: {
|
|
221
|
+
action: "ExportExcelCommand"
|
|
222
|
+
},
|
|
223
|
+
options: "selection,withHeaders"
|
|
224
|
+
}, {
|
|
225
|
+
name: "exportToExcelSelectionNoHeaders",
|
|
226
|
+
text: "Selection (No Headers)",
|
|
227
|
+
data: {
|
|
228
|
+
action: "ExportExcelCommand"
|
|
229
|
+
},
|
|
230
|
+
options: "selection"
|
|
231
|
+
}]
|
|
232
|
+
},
|
|
233
|
+
[t.separator]: {
|
|
234
|
+
name: "separator",
|
|
235
|
+
separator: !0
|
|
236
|
+
},
|
|
237
|
+
[t.sortAsc]: {
|
|
238
|
+
name: "sortAsc",
|
|
239
|
+
text: "Sort Ascending",
|
|
240
|
+
icon: "sort-asc-small",
|
|
241
|
+
svgIcon: I,
|
|
242
|
+
data: {
|
|
243
|
+
action: "SortCommand"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
[t.sortDesc]: {
|
|
247
|
+
name: "sortDesc",
|
|
248
|
+
text: "Sort Descending",
|
|
249
|
+
icon: "sort-desc-small",
|
|
250
|
+
svgIcon: x,
|
|
251
|
+
data: {
|
|
252
|
+
action: "SortCommand"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}, z = (o) => {
|
|
256
|
+
let e = [];
|
|
257
|
+
return o.sortable && (e = e.concat([t.sortAsc, t.sortDesc])), o.pdf && (e.length && (e = e.concat([t.separator])), e = e.concat([t.exportPDF])), e;
|
|
258
|
+
}, G = (o) => {
|
|
259
|
+
let e = [];
|
|
260
|
+
return o.clipboard && (e = e.concat([t.copySelection, t.copySelectionNoHeaders, t.paste])), o.editable && (e.length && (e = e.concat([t.separator])), e = e.concat([t.create, t.edit, t.delete])), o.selectable && (e.length && (e = e.concat([t.separator])), e = e.concat([t.select])), o.rowReorderable && (e.length && (e = e.concat([t.separator])), e = e.concat([t.reorderRow])), o.pdf && (e.length && (e = e.concat([t.separator])), e = e.concat([t.exportPDF])), o.pinnable && (e.length && (e = e.concat([t.separator])), e = e.concat([t.pinRow])), e;
|
|
261
|
+
}, L = /* @__PURE__ */ s({
|
|
262
|
+
name: "GridContextMenu",
|
|
263
|
+
props: {
|
|
264
|
+
show: {
|
|
265
|
+
type: Boolean,
|
|
266
|
+
default: !1
|
|
267
|
+
},
|
|
268
|
+
offset: {
|
|
269
|
+
type: Object,
|
|
270
|
+
default: () => ({
|
|
271
|
+
left: 0,
|
|
272
|
+
top: 0
|
|
273
|
+
})
|
|
274
|
+
},
|
|
275
|
+
dataItem: {
|
|
276
|
+
type: Object,
|
|
277
|
+
default: void 0
|
|
278
|
+
},
|
|
279
|
+
field: {
|
|
280
|
+
type: String,
|
|
281
|
+
default: void 0
|
|
282
|
+
},
|
|
283
|
+
items: {
|
|
284
|
+
type: Array,
|
|
285
|
+
default: void 0
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
inject: {
|
|
289
|
+
kendoLocalizationService: {
|
|
290
|
+
default: null
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
emits: ["close", "select"],
|
|
294
|
+
methods: {
|
|
295
|
+
localizeItem(o, e) {
|
|
296
|
+
const n = {
|
|
297
|
+
...o
|
|
298
|
+
};
|
|
299
|
+
return n.text && n.name && (n.text = e.toLanguageString(`contextMenu.${n.name}`, n.text || "")), n.items && Array.isArray(n.items) && (n.items = n.items.map((a) => this.localizeItem(a, e))), n;
|
|
300
|
+
},
|
|
301
|
+
menuItems() {
|
|
302
|
+
if (this.$props.items)
|
|
303
|
+
return this.$props.items.map((o) => typeof o == "string" ? {
|
|
304
|
+
...M[o]
|
|
305
|
+
} : {
|
|
306
|
+
...o
|
|
307
|
+
});
|
|
308
|
+
},
|
|
309
|
+
handleSelect(o) {
|
|
310
|
+
this.$emit("select", {
|
|
311
|
+
event: o,
|
|
312
|
+
dataItem: this.$props.dataItem,
|
|
313
|
+
field: this.$props.field
|
|
314
|
+
});
|
|
315
|
+
},
|
|
316
|
+
handleClose() {
|
|
317
|
+
this.$emit("close");
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
render() {
|
|
321
|
+
const o = d(this), e = this.menuItems(), n = e == null ? void 0 : e.map((l) => this.localizeItem(l, o)), a = !!(this.$props.show && (n != null && n.length));
|
|
322
|
+
return m(p, {
|
|
323
|
+
show: a,
|
|
324
|
+
offset: this.$props.offset,
|
|
325
|
+
items: n,
|
|
326
|
+
onClose: this.handleClose,
|
|
327
|
+
onSelect: this.handleSelect
|
|
328
|
+
}, null);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
export {
|
|
332
|
+
L as GridContextMenu,
|
|
333
|
+
M as contextMenuItemsMap,
|
|
334
|
+
G as getDefaultBodyContextMenuItems,
|
|
335
|
+
z as getDefaultHeadContextMenuItems
|
|
336
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Represents the available types for the `GridContextMenuAnchorPart`.
|
|
10
|
+
*
|
|
11
|
+
* The available anchor parts are:
|
|
12
|
+
* - `head`
|
|
13
|
+
* - `body`
|
|
14
|
+
*/
|
|
15
|
+
export declare enum GridContextMenuAnchorPart {
|
|
16
|
+
head = "head",
|
|
17
|
+
body = "body"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents the available predefined items names for the `GridContextMenu` items.
|
|
21
|
+
*/
|
|
22
|
+
export declare enum GridContextMenuItemNames {
|
|
23
|
+
create = "create",
|
|
24
|
+
edit = "edit",
|
|
25
|
+
delete = "delete",
|
|
26
|
+
select = "select",
|
|
27
|
+
copySelection = "copySelection",
|
|
28
|
+
copySelectionNoHeaders = "copySelectionNoHeaders",
|
|
29
|
+
paste = "paste",
|
|
30
|
+
reorderRow = "reorderRow",
|
|
31
|
+
exportPDF = "exportPDF",
|
|
32
|
+
exportExcel = "exportExcel",
|
|
33
|
+
separator = "separator",
|
|
34
|
+
sortAsc = "sortAsc",
|
|
35
|
+
sortDesc = "sortDesc",
|
|
36
|
+
pinRow = "pinRow",
|
|
37
|
+
pinTop = "pinTop",
|
|
38
|
+
pinBottom = "pinBottom",
|
|
39
|
+
unpin = "unpin"
|
|
40
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var p=(o=>(o.head="head",o.body="body",o))(p||{}),c=(o=>(o.create="create",o.edit="edit",o.delete="delete",o.select="select",o.copySelection="copySelection",o.copySelectionNoHeaders="copySelectionNoHeaders",o.paste="paste",o.reorderRow="reorderRow",o.exportPDF="exportPDF",o.exportExcel="exportExcel",o.separator="separator",o.sortAsc="sortAsc",o.sortDesc="sortDesc",o.pinRow="pinRow",o.pinTop="pinTop",o.pinBottom="pinBottom",o.unpin="unpin",o))(c||{});exports.GridContextMenuAnchorPart=p;exports.GridContextMenuItemNames=c;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
var c = /* @__PURE__ */ ((p) => (p.head = "head", p.body = "body", p))(c || {}), o = /* @__PURE__ */ ((p) => (p.create = "create", p.edit = "edit", p.delete = "delete", p.select = "select", p.copySelection = "copySelection", p.copySelectionNoHeaders = "copySelectionNoHeaders", p.paste = "paste", p.reorderRow = "reorderRow", p.exportPDF = "exportPDF", p.exportExcel = "exportExcel", p.separator = "separator", p.sortAsc = "sortAsc", p.sortDesc = "sortDesc", p.pinRow = "pinRow", p.pinTop = "pinTop", p.pinBottom = "pinBottom", p.unpin = "unpin", p))(o || {});
|
|
9
|
+
export {
|
|
10
|
+
c as GridContextMenuAnchorPart,
|
|
11
|
+
o as GridContextMenuItemNames
|
|
12
|
+
};
|