@progress/kendo-react-webmcp 15.0.0-develop.2
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/LICENSE.md +11 -0
- package/NOTICE.txt +383 -0
- package/README.md +72 -0
- package/WebMcpProvider.d.ts +49 -0
- package/WebMcpProvider.js +8 -0
- package/WebMcpProvider.mjs +138 -0
- package/adapters/aiprompt.d.ts +15 -0
- package/adapters/aiprompt.js +8 -0
- package/adapters/aiprompt.mjs +63 -0
- package/adapters/autocomplete.d.ts +18 -0
- package/adapters/autocomplete.js +8 -0
- package/adapters/autocomplete.mjs +69 -0
- package/adapters/button.d.ts +18 -0
- package/adapters/button.js +8 -0
- package/adapters/button.mjs +46 -0
- package/adapters/calendar.d.ts +16 -0
- package/adapters/calendar.js +8 -0
- package/adapters/calendar.mjs +61 -0
- package/adapters/chart.d.ts +29 -0
- package/adapters/chart.js +8 -0
- package/adapters/chart.mjs +95 -0
- package/adapters/chat.d.ts +16 -0
- package/adapters/chat.js +8 -0
- package/adapters/chat.mjs +66 -0
- package/adapters/colorpicker.d.ts +16 -0
- package/adapters/colorpicker.js +8 -0
- package/adapters/colorpicker.mjs +60 -0
- package/adapters/combobox.d.ts +20 -0
- package/adapters/combobox.js +8 -0
- package/adapters/combobox.mjs +87 -0
- package/adapters/dashboard.d.ts +18 -0
- package/adapters/dashboard.js +8 -0
- package/adapters/dashboard.mjs +41 -0
- package/adapters/datepicker.d.ts +17 -0
- package/adapters/datepicker.js +8 -0
- package/adapters/datepicker.mjs +59 -0
- package/adapters/daterangepicker.d.ts +19 -0
- package/adapters/daterangepicker.js +8 -0
- package/adapters/daterangepicker.mjs +70 -0
- package/adapters/datetimepicker.d.ts +16 -0
- package/adapters/datetimepicker.js +8 -0
- package/adapters/datetimepicker.mjs +59 -0
- package/adapters/dialog.d.ts +15 -0
- package/adapters/dialog.js +8 -0
- package/adapters/dialog.mjs +58 -0
- package/adapters/drawer.d.ts +33 -0
- package/adapters/drawer.js +8 -0
- package/adapters/drawer.mjs +86 -0
- package/adapters/dropdownlist.d.ts +19 -0
- package/adapters/dropdownlist.js +8 -0
- package/adapters/dropdownlist.mjs +74 -0
- package/adapters/dropdowntree.d.ts +22 -0
- package/adapters/dropdowntree.js +8 -0
- package/adapters/dropdowntree.mjs +108 -0
- package/adapters/editor.d.ts +30 -0
- package/adapters/editor.js +8 -0
- package/adapters/editor.mjs +109 -0
- package/adapters/form.d.ts +20 -0
- package/adapters/form.js +10 -0
- package/adapters/form.mjs +115 -0
- package/adapters/gantt.d.ts +65 -0
- package/adapters/gantt.js +8 -0
- package/adapters/gantt.mjs +370 -0
- package/adapters/grid.d.ts +102 -0
- package/adapters/grid.js +8 -0
- package/adapters/grid.mjs +692 -0
- package/adapters/listbox.d.ts +18 -0
- package/adapters/listbox.js +8 -0
- package/adapters/listbox.mjs +87 -0
- package/adapters/listview.d.ts +22 -0
- package/adapters/listview.js +8 -0
- package/adapters/listview.mjs +80 -0
- package/adapters/map.d.ts +32 -0
- package/adapters/map.js +8 -0
- package/adapters/map.mjs +88 -0
- package/adapters/maskedtextbox.d.ts +17 -0
- package/adapters/maskedtextbox.js +8 -0
- package/adapters/maskedtextbox.mjs +57 -0
- package/adapters/menu.d.ts +16 -0
- package/adapters/menu.js +8 -0
- package/adapters/menu.mjs +50 -0
- package/adapters/multiselect.d.ts +19 -0
- package/adapters/multiselect.js +8 -0
- package/adapters/multiselect.mjs +75 -0
- package/adapters/notification.d.ts +17 -0
- package/adapters/notification.js +8 -0
- package/adapters/notification.mjs +57 -0
- package/adapters/numerictextbox.d.ts +19 -0
- package/adapters/numerictextbox.js +8 -0
- package/adapters/numerictextbox.mjs +78 -0
- package/adapters/panelbar.d.ts +17 -0
- package/adapters/panelbar.js +8 -0
- package/adapters/panelbar.mjs +66 -0
- package/adapters/pivotgrid.d.ts +16 -0
- package/adapters/pivotgrid.js +8 -0
- package/adapters/pivotgrid.mjs +126 -0
- package/adapters/rangeslider.d.ts +21 -0
- package/adapters/rangeslider.js +8 -0
- package/adapters/rangeslider.mjs +55 -0
- package/adapters/rating.d.ts +16 -0
- package/adapters/rating.js +8 -0
- package/adapters/rating.mjs +60 -0
- package/adapters/scheduler.d.ts +45 -0
- package/adapters/scheduler.js +8 -0
- package/adapters/scheduler.mjs +165 -0
- package/adapters/scrollview.d.ts +21 -0
- package/adapters/scrollview.js +8 -0
- package/adapters/scrollview.mjs +74 -0
- package/adapters/signature.d.ts +16 -0
- package/adapters/signature.js +8 -0
- package/adapters/signature.mjs +47 -0
- package/adapters/slider.d.ts +19 -0
- package/adapters/slider.js +8 -0
- package/adapters/slider.mjs +47 -0
- package/adapters/sortable.d.ts +17 -0
- package/adapters/sortable.js +8 -0
- package/adapters/sortable.mjs +67 -0
- package/adapters/spreadsheet.d.ts +32 -0
- package/adapters/spreadsheet.js +8 -0
- package/adapters/spreadsheet.mjs +256 -0
- package/adapters/stepper.d.ts +23 -0
- package/adapters/stepper.js +8 -0
- package/adapters/stepper.mjs +47 -0
- package/adapters/switch.d.ts +17 -0
- package/adapters/switch.js +8 -0
- package/adapters/switch.mjs +48 -0
- package/adapters/tabstrip.d.ts +19 -0
- package/adapters/tabstrip.js +8 -0
- package/adapters/tabstrip.mjs +47 -0
- package/adapters/taskboard.d.ts +20 -0
- package/adapters/taskboard.js +8 -0
- package/adapters/taskboard.mjs +104 -0
- package/adapters/textarea.d.ts +16 -0
- package/adapters/textarea.js +8 -0
- package/adapters/textarea.mjs +57 -0
- package/adapters/textbox.d.ts +19 -0
- package/adapters/textbox.js +8 -0
- package/adapters/textbox.mjs +61 -0
- package/adapters/timepicker.d.ts +16 -0
- package/adapters/timepicker.js +8 -0
- package/adapters/timepicker.mjs +59 -0
- package/adapters/treelist.d.ts +81 -0
- package/adapters/treelist.js +8 -0
- package/adapters/treelist.mjs +403 -0
- package/adapters/treeview.d.ts +25 -0
- package/adapters/treeview.js +9 -0
- package/adapters/treeview.mjs +212 -0
- package/adapters/upload.d.ts +15 -0
- package/adapters/upload.js +8 -0
- package/adapters/upload.mjs +52 -0
- package/adapters/utils.d.ts +16 -0
- package/adapters/utils.js +8 -0
- package/adapters/utils.mjs +25 -0
- package/adapters/window.d.ts +17 -0
- package/adapters/window.js +8 -0
- package/adapters/window.mjs +99 -0
- package/commands/aiprompt.d.ts +30 -0
- package/commands/aiprompt.js +8 -0
- package/commands/aiprompt.mjs +54 -0
- package/commands/autocomplete.d.ts +26 -0
- package/commands/autocomplete.js +8 -0
- package/commands/autocomplete.mjs +36 -0
- package/commands/button.d.ts +19 -0
- package/commands/button.js +8 -0
- package/commands/button.mjs +21 -0
- package/commands/calendar.d.ts +29 -0
- package/commands/calendar.js +8 -0
- package/commands/calendar.mjs +52 -0
- package/commands/chart.d.ts +27 -0
- package/commands/chart.js +8 -0
- package/commands/chart.mjs +43 -0
- package/commands/chat.d.ts +22 -0
- package/commands/chat.js +8 -0
- package/commands/chat.mjs +30 -0
- package/commands/checkbox.d.ts +26 -0
- package/commands/checkbox.js +8 -0
- package/commands/checkbox.mjs +36 -0
- package/commands/colorpicker.d.ts +26 -0
- package/commands/colorpicker.js +8 -0
- package/commands/colorpicker.mjs +36 -0
- package/commands/combobox.d.ts +34 -0
- package/commands/combobox.js +8 -0
- package/commands/combobox.mjs +48 -0
- package/commands/dashboard.d.ts +19 -0
- package/commands/dashboard.js +8 -0
- package/commands/dashboard.mjs +21 -0
- package/commands/datepicker.d.ts +26 -0
- package/commands/datepicker.js +8 -0
- package/commands/datepicker.mjs +36 -0
- package/commands/daterangepicker.d.ts +27 -0
- package/commands/daterangepicker.js +8 -0
- package/commands/daterangepicker.mjs +37 -0
- package/commands/datetimepicker.d.ts +26 -0
- package/commands/datetimepicker.js +8 -0
- package/commands/datetimepicker.mjs +36 -0
- package/commands/dialog.d.ts +23 -0
- package/commands/dialog.js +8 -0
- package/commands/dialog.mjs +25 -0
- package/commands/drawer.d.ts +30 -0
- package/commands/drawer.js +8 -0
- package/commands/drawer.mjs +38 -0
- package/commands/dropdownlist.d.ts +30 -0
- package/commands/dropdownlist.js +8 -0
- package/commands/dropdownlist.mjs +42 -0
- package/commands/dropdowntree.d.ts +34 -0
- package/commands/dropdowntree.js +8 -0
- package/commands/dropdowntree.mjs +48 -0
- package/commands/editor.d.ts +26 -0
- package/commands/editor.js +8 -0
- package/commands/editor.mjs +36 -0
- package/commands/form.d.ts +34 -0
- package/commands/form.js +8 -0
- package/commands/form.mjs +54 -0
- package/commands/gantt.d.ts +119 -0
- package/commands/gantt.js +8 -0
- package/commands/gantt.mjs +156 -0
- package/commands/grid.d.ts +209 -0
- package/commands/grid.js +8 -0
- package/commands/grid.mjs +280 -0
- package/commands/index.d.ts +58 -0
- package/commands/listbox.d.ts +31 -0
- package/commands/listbox.js +8 -0
- package/commands/listbox.mjs +69 -0
- package/commands/listview.d.ts +22 -0
- package/commands/listview.js +8 -0
- package/commands/listview.mjs +29 -0
- package/commands/map.d.ts +43 -0
- package/commands/map.js +8 -0
- package/commands/map.mjs +77 -0
- package/commands/maskedtextbox.d.ts +26 -0
- package/commands/maskedtextbox.js +8 -0
- package/commands/maskedtextbox.mjs +36 -0
- package/commands/menu.d.ts +22 -0
- package/commands/menu.js +8 -0
- package/commands/menu.mjs +30 -0
- package/commands/multicolumncombobox.d.ts +34 -0
- package/commands/multicolumncombobox.js +8 -0
- package/commands/multicolumncombobox.mjs +48 -0
- package/commands/multiselect.d.ts +41 -0
- package/commands/multiselect.js +8 -0
- package/commands/multiselect.mjs +57 -0
- package/commands/notification.d.ts +27 -0
- package/commands/notification.js +8 -0
- package/commands/notification.mjs +46 -0
- package/commands/numerictextbox.d.ts +34 -0
- package/commands/numerictextbox.js +8 -0
- package/commands/numerictextbox.mjs +48 -0
- package/commands/panelbar.d.ts +29 -0
- package/commands/panelbar.js +8 -0
- package/commands/panelbar.mjs +43 -0
- package/commands/pivotgrid.d.ts +56 -0
- package/commands/pivotgrid.js +8 -0
- package/commands/pivotgrid.mjs +87 -0
- package/commands/rangeslider.d.ts +23 -0
- package/commands/rangeslider.js +8 -0
- package/commands/rangeslider.mjs +25 -0
- package/commands/rating.d.ts +26 -0
- package/commands/rating.js +8 -0
- package/commands/rating.mjs +36 -0
- package/commands/scheduler.d.ts +45 -0
- package/commands/scheduler.js +8 -0
- package/commands/scheduler.mjs +59 -0
- package/commands/scrollview.d.ts +30 -0
- package/commands/scrollview.js +8 -0
- package/commands/scrollview.mjs +46 -0
- package/commands/signature.d.ts +19 -0
- package/commands/signature.js +8 -0
- package/commands/signature.mjs +21 -0
- package/commands/slider.d.ts +22 -0
- package/commands/slider.js +8 -0
- package/commands/slider.mjs +24 -0
- package/commands/sortable.d.ts +23 -0
- package/commands/sortable.js +8 -0
- package/commands/sortable.mjs +32 -0
- package/commands/spreadsheet.d.ts +92 -0
- package/commands/spreadsheet.js +8 -0
- package/commands/spreadsheet.mjs +181 -0
- package/commands/stepper.d.ts +22 -0
- package/commands/stepper.js +8 -0
- package/commands/stepper.mjs +35 -0
- package/commands/switch.d.ts +26 -0
- package/commands/switch.js +8 -0
- package/commands/switch.mjs +36 -0
- package/commands/tabstrip.d.ts +23 -0
- package/commands/tabstrip.js +8 -0
- package/commands/tabstrip.mjs +30 -0
- package/commands/taskboard.d.ts +48 -0
- package/commands/taskboard.js +8 -0
- package/commands/taskboard.mjs +90 -0
- package/commands/textarea.d.ts +26 -0
- package/commands/textarea.js +8 -0
- package/commands/textarea.mjs +36 -0
- package/commands/textbox.d.ts +26 -0
- package/commands/textbox.js +8 -0
- package/commands/textbox.mjs +36 -0
- package/commands/timepicker.d.ts +26 -0
- package/commands/timepicker.js +8 -0
- package/commands/timepicker.mjs +36 -0
- package/commands/treelist.d.ts +135 -0
- package/commands/treelist.js +8 -0
- package/commands/treelist.mjs +177 -0
- package/commands/treeview.d.ts +44 -0
- package/commands/treeview.js +8 -0
- package/commands/treeview.mjs +84 -0
- package/commands/upload.d.ts +19 -0
- package/commands/upload.js +8 -0
- package/commands/upload.mjs +21 -0
- package/commands/window.d.ts +35 -0
- package/commands/window.js +8 -0
- package/commands/window.mjs +45 -0
- package/dist/cdn/js/kendo-react-webmcp.js +15 -0
- package/grid-mcp-tools.d.ts +26 -0
- package/grid-mcp-tools.js +8 -0
- package/grid-mcp-tools.mjs +75 -0
- package/index.d.mts +68 -0
- package/index.d.ts +68 -0
- package/index.js +8 -0
- package/index.mjs +308 -0
- package/mcp-types.d.ts +12 -0
- package/package.json +64 -0
- package/schemas/common.d.ts +27 -0
- package/schemas/common.js +8 -0
- package/schemas/common.mjs +113 -0
- package/schemas/gantt.d.ts +10 -0
- package/schemas/gantt.js +8 -0
- package/schemas/gantt.mjs +51 -0
- package/schemas/grid.d.ts +10 -0
- package/schemas/grid.js +8 -0
- package/schemas/grid.mjs +46 -0
- package/schemas/index.d.ts +13 -0
- package/schemas/input.d.ts +19 -0
- package/schemas/input.js +8 -0
- package/schemas/input.mjs +137 -0
- package/schemas/scheduler.d.ts +11 -0
- package/schemas/scheduler.js +8 -0
- package/schemas/scheduler.mjs +58 -0
- package/schemas/table.d.ts +12 -0
- package/schemas/table.js +8 -0
- package/schemas/table.mjs +87 -0
- package/types.d.ts +39 -0
|
@@ -0,0 +1,156 @@
|
|
|
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 { getEmptySchema as a, getExpandCollapseSchema as o, getSortSchema as m, getFilterSchema as u } from "../schemas/common.mjs";
|
|
9
|
+
import { getColumnIdSchema as s, getColumnResizeSchema as c, getColumnReorderSchema as i } from "../schemas/table.mjs";
|
|
10
|
+
import { getDeleteTaskSchema as d, getCreateTaskSchema as p, getChangeViewSchema as S } from "../schemas/gantt.mjs";
|
|
11
|
+
const e = {
|
|
12
|
+
/**
|
|
13
|
+
* Applies a filter to the Gantt data based on column field values.
|
|
14
|
+
*
|
|
15
|
+
* Parameters:
|
|
16
|
+
* - `field` *(string, required)* — The field name to filter by.
|
|
17
|
+
* - `operator` *(string, required)* — The filter operator (e.g. "contains", "eq").
|
|
18
|
+
* - `value` *(any, required)* — The value to filter for.
|
|
19
|
+
*/
|
|
20
|
+
Filter: "GanttFilter",
|
|
21
|
+
/**
|
|
22
|
+
* Clears all active filters from the Gantt.
|
|
23
|
+
*/
|
|
24
|
+
ClearFilter: "GanttClearFilter",
|
|
25
|
+
/**
|
|
26
|
+
* Sorts the Gantt data by a specified field.
|
|
27
|
+
*
|
|
28
|
+
* Parameters:
|
|
29
|
+
* - `field` *(string, required)* — The field name to sort by.
|
|
30
|
+
* - `dir` *(string, required)* — Sort direction: "asc" or "desc".
|
|
31
|
+
*/
|
|
32
|
+
Sort: "GanttSort",
|
|
33
|
+
/**
|
|
34
|
+
* Clears all active sorting from the Gantt.
|
|
35
|
+
*/
|
|
36
|
+
ClearSort: "GanttClearSort",
|
|
37
|
+
/**
|
|
38
|
+
* Moves a column to a new position in the Gantt.
|
|
39
|
+
*
|
|
40
|
+
* Parameters:
|
|
41
|
+
* - `columnId` *(string, required)* — The ID of the column to move.
|
|
42
|
+
* - `targetIndex` *(number, required)* — The target position index.
|
|
43
|
+
*/
|
|
44
|
+
ColumnReorder: "GanttColumnReorder",
|
|
45
|
+
/**
|
|
46
|
+
* Resizes a column to a specified width.
|
|
47
|
+
*
|
|
48
|
+
* Parameters:
|
|
49
|
+
* - `columnId` *(string, required)* — The ID of the column to resize.
|
|
50
|
+
* - `width` *(number, required)* — The new width in pixels.
|
|
51
|
+
*/
|
|
52
|
+
ColumnResize: "GanttColumnResize",
|
|
53
|
+
/**
|
|
54
|
+
* Shows a hidden column by its ID.
|
|
55
|
+
*
|
|
56
|
+
* Parameters:
|
|
57
|
+
* - `columnId` *(string, required)* — The ID of the column to show.
|
|
58
|
+
*/
|
|
59
|
+
ColumnShow: "GanttColumnShow",
|
|
60
|
+
/**
|
|
61
|
+
* Hides a visible column by its ID.
|
|
62
|
+
*
|
|
63
|
+
* Parameters:
|
|
64
|
+
* - `columnId` *(string, required)* — The ID of the column to hide.
|
|
65
|
+
*/
|
|
66
|
+
ColumnHide: "GanttColumnHide",
|
|
67
|
+
/**
|
|
68
|
+
* Expands a task row to show its children.
|
|
69
|
+
*
|
|
70
|
+
* Parameters:
|
|
71
|
+
* - `field` *(string, required)* — The field name used to identify the row.
|
|
72
|
+
* - `value` *(any, required)* — The field value of the row to expand.
|
|
73
|
+
*/
|
|
74
|
+
Expand: "GanttExpand",
|
|
75
|
+
/**
|
|
76
|
+
* Collapses a task row to hide its children.
|
|
77
|
+
*
|
|
78
|
+
* Parameters:
|
|
79
|
+
* - `field` *(string, required)* — The field name used to identify the row.
|
|
80
|
+
* - `value` *(any, required)* — The field value of the row to collapse.
|
|
81
|
+
*/
|
|
82
|
+
Collapse: "GanttCollapse",
|
|
83
|
+
/**
|
|
84
|
+
* Expands all task rows in the Gantt.
|
|
85
|
+
*/
|
|
86
|
+
ExpandAll: "GanttExpandAll",
|
|
87
|
+
/**
|
|
88
|
+
* Collapses all task rows in the Gantt.
|
|
89
|
+
*/
|
|
90
|
+
CollapseAll: "GanttCollapseAll",
|
|
91
|
+
/**
|
|
92
|
+
* Switches the Gantt to a different timeline view.
|
|
93
|
+
*
|
|
94
|
+
* Parameters:
|
|
95
|
+
* - `view` *(string, required)* — The view to switch to (e.g. "day", "week", "month", "year").
|
|
96
|
+
*/
|
|
97
|
+
ChangeView: "GanttChangeView",
|
|
98
|
+
/**
|
|
99
|
+
* Creates a new task in the Gantt.
|
|
100
|
+
*
|
|
101
|
+
* Parameters:
|
|
102
|
+
* - `title` *(string, required)* — The task title.
|
|
103
|
+
* - `start` *(string, required)* — Start date (ISO 8601).
|
|
104
|
+
* - `end` *(string, required)* — End date (ISO 8601).
|
|
105
|
+
*/
|
|
106
|
+
CreateTask: "GanttCreateTask",
|
|
107
|
+
/**
|
|
108
|
+
* Deletes a task from the Gantt.
|
|
109
|
+
*
|
|
110
|
+
* Parameters:
|
|
111
|
+
* - `field` *(string, required)* — The field used to identify the task.
|
|
112
|
+
* - `value` *(any, required)* — The field value of the task to delete.
|
|
113
|
+
*/
|
|
114
|
+
DeleteTask: "GanttDeleteTask"
|
|
115
|
+
};
|
|
116
|
+
function f(C, l) {
|
|
117
|
+
const t = l.map((n) => n.field).filter(Boolean), r = l.map((n) => n.id).filter(Boolean);
|
|
118
|
+
switch (C) {
|
|
119
|
+
case e.Filter:
|
|
120
|
+
return u(t);
|
|
121
|
+
case e.ClearFilter:
|
|
122
|
+
return a();
|
|
123
|
+
case e.Sort:
|
|
124
|
+
return m(t);
|
|
125
|
+
case e.ClearSort:
|
|
126
|
+
return a();
|
|
127
|
+
case e.ColumnReorder:
|
|
128
|
+
return i(r);
|
|
129
|
+
case e.ColumnResize:
|
|
130
|
+
return c(r);
|
|
131
|
+
case e.ColumnShow:
|
|
132
|
+
return s(r);
|
|
133
|
+
case e.ColumnHide:
|
|
134
|
+
return s(r);
|
|
135
|
+
case e.Expand:
|
|
136
|
+
return o(t);
|
|
137
|
+
case e.Collapse:
|
|
138
|
+
return o(t);
|
|
139
|
+
case e.ExpandAll:
|
|
140
|
+
return a();
|
|
141
|
+
case e.CollapseAll:
|
|
142
|
+
return a();
|
|
143
|
+
case e.ChangeView:
|
|
144
|
+
return S();
|
|
145
|
+
case e.CreateTask:
|
|
146
|
+
return p();
|
|
147
|
+
case e.DeleteTask:
|
|
148
|
+
return d(t);
|
|
149
|
+
default:
|
|
150
|
+
return a();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
e as GanttCommands,
|
|
155
|
+
f as getGanttToolSchema
|
|
156
|
+
};
|
|
@@ -0,0 +1,209 @@
|
|
|
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 { McpColumnInfo } from '../mcp-types';
|
|
9
|
+
/**
|
|
10
|
+
* Command constants for the Grid component.
|
|
11
|
+
* These commands allow AI agents to filter, sort, group, page, select, export, and manage columns and detail/group rows in the Grid.
|
|
12
|
+
*/
|
|
13
|
+
export declare const GridCommands: {
|
|
14
|
+
/**
|
|
15
|
+
* Applies a filter to the Grid data based on column field values.
|
|
16
|
+
*
|
|
17
|
+
* Parameters:
|
|
18
|
+
* - `field` *(string, required)* — The field name to filter by.
|
|
19
|
+
* - `operator` *(string, required)* — The filter operator (e.g. "contains", "eq", "gt").
|
|
20
|
+
* - `value` *(any, required)* — The value to filter for.
|
|
21
|
+
*/
|
|
22
|
+
readonly Filter: "GridFilter";
|
|
23
|
+
/**
|
|
24
|
+
* Clears all active filters from the Grid.
|
|
25
|
+
*/
|
|
26
|
+
readonly ClearFilter: "GridClearFilter";
|
|
27
|
+
/**
|
|
28
|
+
* Sorts the Grid data by a specified field.
|
|
29
|
+
*
|
|
30
|
+
* Parameters:
|
|
31
|
+
* - `field` *(string, required)* — The field name to sort by.
|
|
32
|
+
* - `dir` *(string, required)* — Sort direction: "asc" or "desc".
|
|
33
|
+
*/
|
|
34
|
+
readonly Sort: "GridSort";
|
|
35
|
+
/**
|
|
36
|
+
* Clears all active sorting from the Grid.
|
|
37
|
+
*/
|
|
38
|
+
readonly ClearSort: "GridClearSort";
|
|
39
|
+
/**
|
|
40
|
+
* Groups the Grid data by a specified field.
|
|
41
|
+
*
|
|
42
|
+
* Parameters:
|
|
43
|
+
* - `field` *(string, required)* — The field name to group by.
|
|
44
|
+
*/
|
|
45
|
+
readonly Group: "GridGroup";
|
|
46
|
+
/**
|
|
47
|
+
* Clears all active grouping from the Grid.
|
|
48
|
+
*/
|
|
49
|
+
readonly ClearGroup: "GridClearGroup";
|
|
50
|
+
/**
|
|
51
|
+
* Highlights specific rows in the Grid matching given field criteria.
|
|
52
|
+
*
|
|
53
|
+
* Parameters:
|
|
54
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
55
|
+
* - `value` *(any, required)* — The value to match for highlighting.
|
|
56
|
+
*/
|
|
57
|
+
readonly Highlight: "GridHighlight";
|
|
58
|
+
/**
|
|
59
|
+
* Clears all highlighted rows in the Grid.
|
|
60
|
+
*/
|
|
61
|
+
readonly ClearHighlight: "GridClearHighlight";
|
|
62
|
+
/**
|
|
63
|
+
* Selects rows in the Grid matching the specified field criteria.
|
|
64
|
+
*
|
|
65
|
+
* Parameters:
|
|
66
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
67
|
+
* - `value` *(any, required)* — The value to match for selection.
|
|
68
|
+
*/
|
|
69
|
+
readonly Select: "GridSelect";
|
|
70
|
+
/**
|
|
71
|
+
* Clears all selected rows in the Grid.
|
|
72
|
+
*/
|
|
73
|
+
readonly ClearSelect: "GridClearSelect";
|
|
74
|
+
/**
|
|
75
|
+
* Navigates the Grid to a specific page.
|
|
76
|
+
*
|
|
77
|
+
* Parameters:
|
|
78
|
+
* - `page` *(number, required)* — The 1-based page number to navigate to.
|
|
79
|
+
*/
|
|
80
|
+
readonly Page: "GridPage";
|
|
81
|
+
/**
|
|
82
|
+
* Changes the number of rows displayed per page.
|
|
83
|
+
*
|
|
84
|
+
* Parameters:
|
|
85
|
+
* - `pageSize` *(number, required)* — The number of rows per page.
|
|
86
|
+
*/
|
|
87
|
+
readonly PageSize: "GridPageSize";
|
|
88
|
+
/**
|
|
89
|
+
* Moves a column to a new position in the Grid.
|
|
90
|
+
*
|
|
91
|
+
* Parameters:
|
|
92
|
+
* - `columnId` *(string, required)* — The ID of the column to move.
|
|
93
|
+
* - `targetIndex` *(number, required)* — The target position index.
|
|
94
|
+
*/
|
|
95
|
+
readonly ColumnReorder: "GridColumnReorder";
|
|
96
|
+
/**
|
|
97
|
+
* Resizes a column to a specified width.
|
|
98
|
+
*
|
|
99
|
+
* Parameters:
|
|
100
|
+
* - `columnId` *(string, required)* — The ID of the column to resize.
|
|
101
|
+
* - `width` *(number, required)* — The new width in pixels.
|
|
102
|
+
*/
|
|
103
|
+
readonly ColumnResize: "GridColumnResize";
|
|
104
|
+
/**
|
|
105
|
+
* Shows a hidden column by its ID.
|
|
106
|
+
*
|
|
107
|
+
* Parameters:
|
|
108
|
+
* - `columnId` *(string, required)* — The ID of the column to show.
|
|
109
|
+
*/
|
|
110
|
+
readonly ColumnShow: "GridColumnShow";
|
|
111
|
+
/**
|
|
112
|
+
* Hides a visible column by its ID.
|
|
113
|
+
*
|
|
114
|
+
* Parameters:
|
|
115
|
+
* - `columnId` *(string, required)* — The ID of the column to hide.
|
|
116
|
+
*/
|
|
117
|
+
readonly ColumnHide: "GridColumnHide";
|
|
118
|
+
/**
|
|
119
|
+
* Locks (freezes) a column so it stays visible during horizontal scrolling.
|
|
120
|
+
*
|
|
121
|
+
* Parameters:
|
|
122
|
+
* - `columnId` *(string, required)* — The ID of the column to lock.
|
|
123
|
+
*/
|
|
124
|
+
readonly ColumnLock: "GridColumnLock";
|
|
125
|
+
/**
|
|
126
|
+
* Unlocks a previously locked column.
|
|
127
|
+
*
|
|
128
|
+
* Parameters:
|
|
129
|
+
* - `columnId` *(string, required)* — The ID of the column to unlock.
|
|
130
|
+
*/
|
|
131
|
+
readonly ColumnUnlock: "GridColumnUnlock";
|
|
132
|
+
/**
|
|
133
|
+
* Exports the Grid data to an Excel file.
|
|
134
|
+
*/
|
|
135
|
+
readonly ExportExcel: "GridExportExcel";
|
|
136
|
+
/**
|
|
137
|
+
* Exports the Grid to a PDF document.
|
|
138
|
+
*/
|
|
139
|
+
readonly ExportPDF: "GridExportPDF";
|
|
140
|
+
/**
|
|
141
|
+
* Exports the Grid data to a CSV file.
|
|
142
|
+
*/
|
|
143
|
+
readonly ExportCSV: "GridExportCSV";
|
|
144
|
+
/**
|
|
145
|
+
* Selects all rows in the current Grid view.
|
|
146
|
+
*/
|
|
147
|
+
readonly SelectAll: "GridSelectAll";
|
|
148
|
+
/**
|
|
149
|
+
* Expands the detail row for a specific data item.
|
|
150
|
+
*
|
|
151
|
+
* Parameters:
|
|
152
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
153
|
+
* - `value` *(any, required)* — The value identifying the row to expand.
|
|
154
|
+
*/
|
|
155
|
+
readonly DetailExpand: "GridDetailExpand";
|
|
156
|
+
/**
|
|
157
|
+
* Collapses the detail row for a specific data item.
|
|
158
|
+
*
|
|
159
|
+
* Parameters:
|
|
160
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
161
|
+
* - `value` *(any, required)* — The value identifying the row to collapse.
|
|
162
|
+
*/
|
|
163
|
+
readonly DetailCollapse: "GridDetailCollapse";
|
|
164
|
+
/**
|
|
165
|
+
* Expands all detail rows in the Grid.
|
|
166
|
+
*/
|
|
167
|
+
readonly DetailExpandAll: "GridDetailExpandAll";
|
|
168
|
+
/**
|
|
169
|
+
* Collapses all detail rows in the Grid.
|
|
170
|
+
*/
|
|
171
|
+
readonly DetailCollapseAll: "GridDetailCollapseAll";
|
|
172
|
+
/**
|
|
173
|
+
* Expands a specific group header row.
|
|
174
|
+
*
|
|
175
|
+
* Parameters:
|
|
176
|
+
* - `field` *(string, required)* — The field name of the group.
|
|
177
|
+
* - `value` *(any, required)* — The group value to expand.
|
|
178
|
+
*/
|
|
179
|
+
readonly GroupExpand: "GridGroupExpand";
|
|
180
|
+
/**
|
|
181
|
+
* Collapses a specific group header row.
|
|
182
|
+
*
|
|
183
|
+
* Parameters:
|
|
184
|
+
* - `field` *(string, required)* — The field name of the group.
|
|
185
|
+
* - `value` *(any, required)* — The group value to collapse.
|
|
186
|
+
*/
|
|
187
|
+
readonly GroupCollapse: "GridGroupCollapse";
|
|
188
|
+
/**
|
|
189
|
+
* Expands all group header rows in the Grid.
|
|
190
|
+
*/
|
|
191
|
+
readonly GroupExpandAll: "GridGroupExpandAll";
|
|
192
|
+
/**
|
|
193
|
+
* Collapses all group header rows in the Grid.
|
|
194
|
+
*/
|
|
195
|
+
readonly GroupCollapseAll: "GridGroupCollapseAll";
|
|
196
|
+
/**
|
|
197
|
+
* Configures aggregate functions for one or more fields in the Grid footer.
|
|
198
|
+
*
|
|
199
|
+
* Parameters:
|
|
200
|
+
* - `aggregates` *(array, required)* — Array of aggregate descriptors with `field` and `aggregate` type.
|
|
201
|
+
*/
|
|
202
|
+
readonly SetAggregates: "GridSetAggregates";
|
|
203
|
+
/**
|
|
204
|
+
* Retrieves the current data displayed in the Grid (after filtering, sorting, and paging).
|
|
205
|
+
*/
|
|
206
|
+
readonly GetData: "GridGetData";
|
|
207
|
+
};
|
|
208
|
+
/** @hidden */
|
|
209
|
+
export declare function getGridToolSchema(commandType: string, columns: McpColumnInfo[], pageSizes?: number[]): object;
|
package/commands/grid.js
ADDED
|
@@ -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"});const r=require("../schemas/common.js"),a=require("../schemas/table.js"),o=require("../schemas/grid.js"),e={Filter:"GridFilter",ClearFilter:"GridClearFilter",Sort:"GridSort",ClearSort:"GridClearSort",Group:"GridGroup",ClearGroup:"GridClearGroup",Highlight:"GridHighlight",ClearHighlight:"GridClearHighlight",Select:"GridSelect",ClearSelect:"GridClearSelect",Page:"GridPage",PageSize:"GridPageSize",ColumnReorder:"GridColumnReorder",ColumnResize:"GridColumnResize",ColumnShow:"GridColumnShow",ColumnHide:"GridColumnHide",ColumnLock:"GridColumnLock",ColumnUnlock:"GridColumnUnlock",ExportExcel:"GridExportExcel",ExportPDF:"GridExportPDF",ExportCSV:"GridExportCSV",SelectAll:"GridSelectAll",DetailExpand:"GridDetailExpand",DetailCollapse:"GridDetailCollapse",DetailExpandAll:"GridDetailExpandAll",DetailCollapseAll:"GridDetailCollapseAll",GroupExpand:"GridGroupExpand",GroupCollapse:"GridGroupCollapse",GroupExpandAll:"GridGroupExpandAll",GroupCollapseAll:"GridGroupCollapseAll",SetAggregates:"GridSetAggregates",GetData:"GridGetData"};function m(n,i,u=[]){const t=i.map(c=>c.field).filter(Boolean),l=i.map(c=>c.id).filter(Boolean);switch(n){case e.Filter:return r.getFilterSchema(t);case e.ClearFilter:return r.getEmptySchema();case e.Sort:return r.getSortSchema(t);case e.ClearSort:return r.getEmptySchema();case e.Group:return o.getGroupSchema(t);case e.ClearGroup:return r.getEmptySchema();case e.Highlight:return a.getRowMatchSchema(t);case e.ClearHighlight:return r.getEmptySchema();case e.Select:return a.getRowMatchSchema(t);case e.ClearSelect:return r.getEmptySchema();case e.Page:return r.getPageSchema();case e.PageSize:return r.getPageSizeSchema(u);case e.ColumnReorder:return a.getColumnReorderSchema(l);case e.ColumnResize:return a.getColumnResizeSchema(l);case e.ColumnShow:return a.getColumnIdSchema(l);case e.ColumnHide:return a.getColumnIdSchema(l);case e.ColumnLock:return a.getColumnIdSchema(l);case e.ColumnUnlock:return a.getColumnIdSchema(l);case e.ExportExcel:return r.getExportSchema();case e.ExportPDF:return r.getExportSchema();case e.ExportCSV:return r.getExportSchema();case e.SelectAll:return r.getEmptySchema();case e.DetailExpand:return a.getRowMatchSchema(t);case e.DetailCollapse:return a.getRowMatchSchema(t);case e.DetailExpandAll:return r.getEmptySchema();case e.DetailCollapseAll:return r.getEmptySchema();case e.GroupExpand:return o.getGroupExpandSchema(t);case e.GroupCollapse:return o.getGroupExpandSchema(t);case e.GroupExpandAll:return r.getEmptySchema();case e.GroupCollapseAll:return r.getEmptySchema();case e.SetAggregates:return o.getAggregateSchema(t);case e.GetData:return r.getEmptySchema();default:return r.getEmptySchema()}}exports.GridCommands=e;exports.getGridToolSchema=m;
|
|
@@ -0,0 +1,280 @@
|
|
|
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 { getEmptySchema as r, getExportSchema as n, getPageSizeSchema as s, getPageSchema as G, getSortSchema as C, getFilterSchema as g } from "../schemas/common.mjs";
|
|
9
|
+
import { getRowMatchSchema as a, getColumnIdSchema as o, getColumnResizeSchema as m, getColumnReorderSchema as S } from "../schemas/table.mjs";
|
|
10
|
+
import { getAggregateSchema as h, getGroupExpandSchema as c, getGroupSchema as x } from "../schemas/grid.mjs";
|
|
11
|
+
const e = {
|
|
12
|
+
/**
|
|
13
|
+
* Applies a filter to the Grid data based on column field values.
|
|
14
|
+
*
|
|
15
|
+
* Parameters:
|
|
16
|
+
* - `field` *(string, required)* — The field name to filter by.
|
|
17
|
+
* - `operator` *(string, required)* — The filter operator (e.g. "contains", "eq", "gt").
|
|
18
|
+
* - `value` *(any, required)* — The value to filter for.
|
|
19
|
+
*/
|
|
20
|
+
Filter: "GridFilter",
|
|
21
|
+
/**
|
|
22
|
+
* Clears all active filters from the Grid.
|
|
23
|
+
*/
|
|
24
|
+
ClearFilter: "GridClearFilter",
|
|
25
|
+
/**
|
|
26
|
+
* Sorts the Grid data by a specified field.
|
|
27
|
+
*
|
|
28
|
+
* Parameters:
|
|
29
|
+
* - `field` *(string, required)* — The field name to sort by.
|
|
30
|
+
* - `dir` *(string, required)* — Sort direction: "asc" or "desc".
|
|
31
|
+
*/
|
|
32
|
+
Sort: "GridSort",
|
|
33
|
+
/**
|
|
34
|
+
* Clears all active sorting from the Grid.
|
|
35
|
+
*/
|
|
36
|
+
ClearSort: "GridClearSort",
|
|
37
|
+
/**
|
|
38
|
+
* Groups the Grid data by a specified field.
|
|
39
|
+
*
|
|
40
|
+
* Parameters:
|
|
41
|
+
* - `field` *(string, required)* — The field name to group by.
|
|
42
|
+
*/
|
|
43
|
+
Group: "GridGroup",
|
|
44
|
+
/**
|
|
45
|
+
* Clears all active grouping from the Grid.
|
|
46
|
+
*/
|
|
47
|
+
ClearGroup: "GridClearGroup",
|
|
48
|
+
/**
|
|
49
|
+
* Highlights specific rows in the Grid matching given field criteria.
|
|
50
|
+
*
|
|
51
|
+
* Parameters:
|
|
52
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
53
|
+
* - `value` *(any, required)* — The value to match for highlighting.
|
|
54
|
+
*/
|
|
55
|
+
Highlight: "GridHighlight",
|
|
56
|
+
/**
|
|
57
|
+
* Clears all highlighted rows in the Grid.
|
|
58
|
+
*/
|
|
59
|
+
ClearHighlight: "GridClearHighlight",
|
|
60
|
+
/**
|
|
61
|
+
* Selects rows in the Grid matching the specified field criteria.
|
|
62
|
+
*
|
|
63
|
+
* Parameters:
|
|
64
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
65
|
+
* - `value` *(any, required)* — The value to match for selection.
|
|
66
|
+
*/
|
|
67
|
+
Select: "GridSelect",
|
|
68
|
+
/**
|
|
69
|
+
* Clears all selected rows in the Grid.
|
|
70
|
+
*/
|
|
71
|
+
ClearSelect: "GridClearSelect",
|
|
72
|
+
/**
|
|
73
|
+
* Navigates the Grid to a specific page.
|
|
74
|
+
*
|
|
75
|
+
* Parameters:
|
|
76
|
+
* - `page` *(number, required)* — The 1-based page number to navigate to.
|
|
77
|
+
*/
|
|
78
|
+
Page: "GridPage",
|
|
79
|
+
/**
|
|
80
|
+
* Changes the number of rows displayed per page.
|
|
81
|
+
*
|
|
82
|
+
* Parameters:
|
|
83
|
+
* - `pageSize` *(number, required)* — The number of rows per page.
|
|
84
|
+
*/
|
|
85
|
+
PageSize: "GridPageSize",
|
|
86
|
+
/**
|
|
87
|
+
* Moves a column to a new position in the Grid.
|
|
88
|
+
*
|
|
89
|
+
* Parameters:
|
|
90
|
+
* - `columnId` *(string, required)* — The ID of the column to move.
|
|
91
|
+
* - `targetIndex` *(number, required)* — The target position index.
|
|
92
|
+
*/
|
|
93
|
+
ColumnReorder: "GridColumnReorder",
|
|
94
|
+
/**
|
|
95
|
+
* Resizes a column to a specified width.
|
|
96
|
+
*
|
|
97
|
+
* Parameters:
|
|
98
|
+
* - `columnId` *(string, required)* — The ID of the column to resize.
|
|
99
|
+
* - `width` *(number, required)* — The new width in pixels.
|
|
100
|
+
*/
|
|
101
|
+
ColumnResize: "GridColumnResize",
|
|
102
|
+
/**
|
|
103
|
+
* Shows a hidden column by its ID.
|
|
104
|
+
*
|
|
105
|
+
* Parameters:
|
|
106
|
+
* - `columnId` *(string, required)* — The ID of the column to show.
|
|
107
|
+
*/
|
|
108
|
+
ColumnShow: "GridColumnShow",
|
|
109
|
+
/**
|
|
110
|
+
* Hides a visible column by its ID.
|
|
111
|
+
*
|
|
112
|
+
* Parameters:
|
|
113
|
+
* - `columnId` *(string, required)* — The ID of the column to hide.
|
|
114
|
+
*/
|
|
115
|
+
ColumnHide: "GridColumnHide",
|
|
116
|
+
/**
|
|
117
|
+
* Locks (freezes) a column so it stays visible during horizontal scrolling.
|
|
118
|
+
*
|
|
119
|
+
* Parameters:
|
|
120
|
+
* - `columnId` *(string, required)* — The ID of the column to lock.
|
|
121
|
+
*/
|
|
122
|
+
ColumnLock: "GridColumnLock",
|
|
123
|
+
/**
|
|
124
|
+
* Unlocks a previously locked column.
|
|
125
|
+
*
|
|
126
|
+
* Parameters:
|
|
127
|
+
* - `columnId` *(string, required)* — The ID of the column to unlock.
|
|
128
|
+
*/
|
|
129
|
+
ColumnUnlock: "GridColumnUnlock",
|
|
130
|
+
/**
|
|
131
|
+
* Exports the Grid data to an Excel file.
|
|
132
|
+
*/
|
|
133
|
+
ExportExcel: "GridExportExcel",
|
|
134
|
+
/**
|
|
135
|
+
* Exports the Grid to a PDF document.
|
|
136
|
+
*/
|
|
137
|
+
ExportPDF: "GridExportPDF",
|
|
138
|
+
/**
|
|
139
|
+
* Exports the Grid data to a CSV file.
|
|
140
|
+
*/
|
|
141
|
+
ExportCSV: "GridExportCSV",
|
|
142
|
+
/**
|
|
143
|
+
* Selects all rows in the current Grid view.
|
|
144
|
+
*/
|
|
145
|
+
SelectAll: "GridSelectAll",
|
|
146
|
+
/**
|
|
147
|
+
* Expands the detail row for a specific data item.
|
|
148
|
+
*
|
|
149
|
+
* Parameters:
|
|
150
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
151
|
+
* - `value` *(any, required)* — The value identifying the row to expand.
|
|
152
|
+
*/
|
|
153
|
+
DetailExpand: "GridDetailExpand",
|
|
154
|
+
/**
|
|
155
|
+
* Collapses the detail row for a specific data item.
|
|
156
|
+
*
|
|
157
|
+
* Parameters:
|
|
158
|
+
* - `field` *(string, required)* — The field name to match against.
|
|
159
|
+
* - `value` *(any, required)* — The value identifying the row to collapse.
|
|
160
|
+
*/
|
|
161
|
+
DetailCollapse: "GridDetailCollapse",
|
|
162
|
+
/**
|
|
163
|
+
* Expands all detail rows in the Grid.
|
|
164
|
+
*/
|
|
165
|
+
DetailExpandAll: "GridDetailExpandAll",
|
|
166
|
+
/**
|
|
167
|
+
* Collapses all detail rows in the Grid.
|
|
168
|
+
*/
|
|
169
|
+
DetailCollapseAll: "GridDetailCollapseAll",
|
|
170
|
+
/**
|
|
171
|
+
* Expands a specific group header row.
|
|
172
|
+
*
|
|
173
|
+
* Parameters:
|
|
174
|
+
* - `field` *(string, required)* — The field name of the group.
|
|
175
|
+
* - `value` *(any, required)* — The group value to expand.
|
|
176
|
+
*/
|
|
177
|
+
GroupExpand: "GridGroupExpand",
|
|
178
|
+
/**
|
|
179
|
+
* Collapses a specific group header row.
|
|
180
|
+
*
|
|
181
|
+
* Parameters:
|
|
182
|
+
* - `field` *(string, required)* — The field name of the group.
|
|
183
|
+
* - `value` *(any, required)* — The group value to collapse.
|
|
184
|
+
*/
|
|
185
|
+
GroupCollapse: "GridGroupCollapse",
|
|
186
|
+
/**
|
|
187
|
+
* Expands all group header rows in the Grid.
|
|
188
|
+
*/
|
|
189
|
+
GroupExpandAll: "GridGroupExpandAll",
|
|
190
|
+
/**
|
|
191
|
+
* Collapses all group header rows in the Grid.
|
|
192
|
+
*/
|
|
193
|
+
GroupCollapseAll: "GridGroupCollapseAll",
|
|
194
|
+
/**
|
|
195
|
+
* Configures aggregate functions for one or more fields in the Grid footer.
|
|
196
|
+
*
|
|
197
|
+
* Parameters:
|
|
198
|
+
* - `aggregates` *(array, required)* — Array of aggregate descriptors with `field` and `aggregate` type.
|
|
199
|
+
*/
|
|
200
|
+
SetAggregates: "GridSetAggregates",
|
|
201
|
+
/**
|
|
202
|
+
* Retrieves the current data displayed in the Grid (after filtering, sorting, and paging).
|
|
203
|
+
*/
|
|
204
|
+
GetData: "GridGetData"
|
|
205
|
+
};
|
|
206
|
+
function P(p, u, d = []) {
|
|
207
|
+
const l = u.map((i) => i.field).filter(Boolean), t = u.map((i) => i.id).filter(Boolean);
|
|
208
|
+
switch (p) {
|
|
209
|
+
case e.Filter:
|
|
210
|
+
return g(l);
|
|
211
|
+
case e.ClearFilter:
|
|
212
|
+
return r();
|
|
213
|
+
case e.Sort:
|
|
214
|
+
return C(l);
|
|
215
|
+
case e.ClearSort:
|
|
216
|
+
return r();
|
|
217
|
+
case e.Group:
|
|
218
|
+
return x(l);
|
|
219
|
+
case e.ClearGroup:
|
|
220
|
+
return r();
|
|
221
|
+
case e.Highlight:
|
|
222
|
+
return a(l);
|
|
223
|
+
case e.ClearHighlight:
|
|
224
|
+
return r();
|
|
225
|
+
case e.Select:
|
|
226
|
+
return a(l);
|
|
227
|
+
case e.ClearSelect:
|
|
228
|
+
return r();
|
|
229
|
+
case e.Page:
|
|
230
|
+
return G();
|
|
231
|
+
case e.PageSize:
|
|
232
|
+
return s(d);
|
|
233
|
+
case e.ColumnReorder:
|
|
234
|
+
return S(t);
|
|
235
|
+
case e.ColumnResize:
|
|
236
|
+
return m(t);
|
|
237
|
+
case e.ColumnShow:
|
|
238
|
+
return o(t);
|
|
239
|
+
case e.ColumnHide:
|
|
240
|
+
return o(t);
|
|
241
|
+
case e.ColumnLock:
|
|
242
|
+
return o(t);
|
|
243
|
+
case e.ColumnUnlock:
|
|
244
|
+
return o(t);
|
|
245
|
+
case e.ExportExcel:
|
|
246
|
+
return n();
|
|
247
|
+
case e.ExportPDF:
|
|
248
|
+
return n();
|
|
249
|
+
case e.ExportCSV:
|
|
250
|
+
return n();
|
|
251
|
+
case e.SelectAll:
|
|
252
|
+
return r();
|
|
253
|
+
case e.DetailExpand:
|
|
254
|
+
return a(l);
|
|
255
|
+
case e.DetailCollapse:
|
|
256
|
+
return a(l);
|
|
257
|
+
case e.DetailExpandAll:
|
|
258
|
+
return r();
|
|
259
|
+
case e.DetailCollapseAll:
|
|
260
|
+
return r();
|
|
261
|
+
case e.GroupExpand:
|
|
262
|
+
return c(l);
|
|
263
|
+
case e.GroupCollapse:
|
|
264
|
+
return c(l);
|
|
265
|
+
case e.GroupExpandAll:
|
|
266
|
+
return r();
|
|
267
|
+
case e.GroupCollapseAll:
|
|
268
|
+
return r();
|
|
269
|
+
case e.SetAggregates:
|
|
270
|
+
return h(l);
|
|
271
|
+
case e.GetData:
|
|
272
|
+
return r();
|
|
273
|
+
default:
|
|
274
|
+
return r();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
export {
|
|
278
|
+
e as GridCommands,
|
|
279
|
+
P as getGridToolSchema
|
|
280
|
+
};
|