@progress/kendo-react-grid 14.5.0-develop.8 → 15.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/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +84 -84
- package/GridWebMcpProps.d.ts +82 -0
- package/README.md +4 -4
- package/cells/datacell/utils.js +1 -1
- package/cells/datacell/utils.mjs +19 -13
- package/cells/groupcell/GridGroupCellToggle.js +1 -1
- package/cells/groupcell/GridGroupCellToggle.mjs +23 -23
- package/cells/pincell/GridPinDropdownButton.js +1 -1
- package/cells/pincell/GridPinDropdownButton.mjs +14 -14
- package/columnMenu/GridColumnMenuFilterCell.js +1 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +4 -4
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +46 -46
- package/contextMenu/GridContextMenu.js +1 -1
- package/contextMenu/GridContextMenu.mjs +44 -44
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/filterCommon.d.ts +1 -1
- package/filterCommon.js +1 -1
- package/filterCommon.mjs +56 -58
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +30 -29
- package/index.d.mts +3 -1
- package/index.d.ts +3 -1
- package/interfaces/GridProps.d.ts +22 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +23 -18
- package/toolbar-tools/smartbox/SmartBox.js +1 -1
- package/toolbar-tools/smartbox/SmartBox.mjs +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxListData.js +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxListData.mjs +7 -7
- package/toolbar-tools/smartbox/listItemRenders.js +1 -1
- package/toolbar-tools/smartbox/listItemRenders.mjs +1 -1
- package/utils/handleAIResponse.d.ts +7 -3
package/filterCommon.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare const defaultHideSecondFilter: {
|
|
|
58
58
|
/**
|
|
59
59
|
* Normalize data for calling onChange.
|
|
60
60
|
*/
|
|
61
|
-
export declare const cellInputChange: (value: any, e: React.SyntheticEvent<any>, props: any) => void;
|
|
61
|
+
export declare const cellInputChange: (value: any, e: React.SyntheticEvent<any>, props: any, clearOperatorOnClear?: boolean) => void;
|
|
62
62
|
/**
|
|
63
63
|
* @hidden
|
|
64
64
|
*/
|
package/filterCommon.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 x=require("./messages/index.js"),O=require("@progress/kendo-react-intl"),m=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],y={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./messages/index.js"),O=require("@progress/kendo-react-intl"),m=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],y={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},s=t=>t==="isnull"||t==="isnotnull"||t==="isempty"||t==="isnotempty",h=(t,i)=>t.map(e=>({text:i.toLanguageString(e.text,x.messages[e.text]),operator:e.operator})),g="eq",q=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],I={text:!1,numeric:!1,date:!1,boolean:!0},E=(t,i,e,r=!0)=>{const o=u(e.operators);let a=e.operator;switch(e.filterType){case"numeric":case"date":(!a||s(a))&&(a=o),r&&t===null&&a===o&&(a="");break;case"text":(!a||s(a))&&(a=o),r&&!t&&a===o&&(a="");break;default:return}e.onChange({value:t,operator:a,syntheticEvent:i})},u=(t,i)=>i?t[i][0].operator:t[0].operator,N=t=>t||"text",F=(t,i)=>{const e=t.target.value;i({value:e.operator,operator:e.operator===""?"":g,syntheticEvent:t.syntheticEvent})},v=(t,i,e)=>{let r=i;const o=t.target.value;t.target.state.opened&&(s(o.operator)&&(r=null),i===null&&!s(o.operator)&&(r=void 0),e({value:r,operator:o.operator,syntheticEvent:t.syntheticEvent}))},p=(t,i)=>{const e=i||new O.IntlService("en-US");if(t.value){const r=e.parseDate(t.value);r&&(t.value=r)}t.filters&&(t.filters=t.filters.map(r=>{if(r.value){const o=e.parseDate(r.value);o&&(r.value=o)}return r}))},b=(t,i)=>{var r;let e=t;if(e&&Object.keys(e).length===0&&(e=null),e!=null&&e.filters&&Array.isArray(e.filters)){const o=i||{filters:[],logic:"and"},a=o.filters.map(l=>l.field||l.filters[0].field),f=e.filters.every(l=>l.field===(e==null?void 0:e.filters[0]).field),n=f?[{filters:e.filters.map(l=>(p(l),l)),logic:e.logic}]:e.filters.map(l=>{const c=l.filters?l:{logic:t.logic,filters:[l]};return p(c),c}),d=f&&a.includes(n[0].filters[0].field);if(d){const l=o.filters[0];l.filters&&((r=l.filters)==null||r.push(...n[0].filters),l.logic=t.logic)}e={...o,filters:d?o.filters:[...o.filters,...n]}}return e};exports.IsUnaryFilter=s;exports.booleanFilterValues=q;exports.cellBoolDropdownChange=F;exports.cellInputChange=E;exports.cellOperatorChange=v;exports.combineSmartFilters=b;exports.defaultBooleanOperator=g;exports.defaultHideSecondFilter=I;exports.filterLogicList=m;exports.getDefaultOperator=u;exports.getFilterType=N;exports.operatorMap=h;exports.operators=y;exports.parseFilterDates=p;
|
package/filterCommon.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { messages as
|
|
8
|
+
import { messages as c } from "./messages/index.mjs";
|
|
9
9
|
import { IntlService as u } from "@progress/kendo-react-intl";
|
|
10
10
|
const q = [
|
|
11
11
|
{ text: "grid.filterAndLogic", operator: "and" },
|
|
@@ -44,101 +44,99 @@ const q = [
|
|
|
44
44
|
{ text: "grid.filterIsNotNullOperator", operator: "isnotnull" }
|
|
45
45
|
],
|
|
46
46
|
boolean: [{ text: "grid.filterEqOperator", operator: "eq" }]
|
|
47
|
-
},
|
|
48
|
-
text: i.toLanguageString(
|
|
49
|
-
operator:
|
|
47
|
+
}, s = (t) => t === "isnull" || t === "isnotnull" || t === "isempty" || t === "isnotempty", h = (t, i) => t.map((e) => ({
|
|
48
|
+
text: i.toLanguageString(e.text, c[e.text]),
|
|
49
|
+
operator: e.operator
|
|
50
50
|
})), x = "eq", N = [
|
|
51
51
|
{ text: "grid.filterBooleanAll", operator: "" },
|
|
52
52
|
{ text: "grid.filterIsTrue", operator: !0 },
|
|
53
53
|
{ text: "grid.filterIsFalse", operator: !1 }
|
|
54
|
-
],
|
|
54
|
+
], I = {
|
|
55
55
|
text: !1,
|
|
56
56
|
numeric: !1,
|
|
57
57
|
date: !1,
|
|
58
58
|
boolean: !0
|
|
59
|
-
},
|
|
60
|
-
const o = O(
|
|
61
|
-
let
|
|
62
|
-
switch (
|
|
59
|
+
}, v = (t, i, e, r = !0) => {
|
|
60
|
+
const o = O(e.operators);
|
|
61
|
+
let a = e.operator;
|
|
62
|
+
switch (e.filterType) {
|
|
63
63
|
case "numeric":
|
|
64
|
-
(!r || a(r)) && (r = o);
|
|
65
|
-
break;
|
|
66
64
|
case "date":
|
|
67
|
-
(!
|
|
65
|
+
(!a || s(a)) && (a = o), r && t === null && a === o && (a = "");
|
|
68
66
|
break;
|
|
69
67
|
case "text":
|
|
70
|
-
(!
|
|
68
|
+
(!a || s(a)) && (a = o), r && !t && a === o && (a = "");
|
|
71
69
|
break;
|
|
72
70
|
default:
|
|
73
71
|
return;
|
|
74
72
|
}
|
|
75
|
-
|
|
76
|
-
}, O = (
|
|
77
|
-
const
|
|
73
|
+
e.onChange({ value: t, operator: a, syntheticEvent: i });
|
|
74
|
+
}, O = (t, i) => i ? t[i][0].operator : t[0].operator, F = (t) => t || "text", b = (t, i) => {
|
|
75
|
+
const e = t.target.value;
|
|
78
76
|
i({
|
|
79
|
-
value:
|
|
80
|
-
operator:
|
|
81
|
-
syntheticEvent:
|
|
77
|
+
value: e.operator,
|
|
78
|
+
operator: e.operator === "" ? "" : x,
|
|
79
|
+
syntheticEvent: t.syntheticEvent
|
|
82
80
|
});
|
|
83
|
-
}, A = (
|
|
84
|
-
let
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
|
|
81
|
+
}, A = (t, i, e) => {
|
|
82
|
+
let r = i;
|
|
83
|
+
const o = t.target.value;
|
|
84
|
+
t.target.state.opened && (s(o.operator) && (r = null), i === null && !s(o.operator) && (r = void 0), e({ value: r, operator: o.operator, syntheticEvent: t.syntheticEvent }));
|
|
85
|
+
}, g = (t, i) => {
|
|
86
|
+
const e = i || new u("en-US");
|
|
87
|
+
if (t.value) {
|
|
88
|
+
const r = e.parseDate(t.value);
|
|
89
|
+
r && (t.value = r);
|
|
92
90
|
}
|
|
93
|
-
|
|
94
|
-
(
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
|
|
91
|
+
t.filters && (t.filters = t.filters.map(
|
|
92
|
+
(r) => {
|
|
93
|
+
if (r.value) {
|
|
94
|
+
const o = e.parseDate(r.value);
|
|
95
|
+
o && (r.value = o);
|
|
98
96
|
}
|
|
99
|
-
return
|
|
97
|
+
return r;
|
|
100
98
|
}
|
|
101
99
|
));
|
|
102
|
-
},
|
|
103
|
-
var
|
|
104
|
-
let
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
100
|
+
}, L = (t, i) => {
|
|
101
|
+
var r;
|
|
102
|
+
let e = t;
|
|
103
|
+
if (e && Object.keys(e).length === 0 && (e = null), e != null && e.filters && Array.isArray(e.filters)) {
|
|
104
|
+
const o = i || { filters: [], logic: "and" }, a = o.filters.map((l) => l.field || l.filters[0].field), p = e.filters.every((l) => l.field === (e == null ? void 0 : e.filters[0]).field), n = p ? [
|
|
107
105
|
{
|
|
108
|
-
filters:
|
|
109
|
-
logic:
|
|
106
|
+
filters: e.filters.map((l) => (g(l), l)),
|
|
107
|
+
logic: e.logic
|
|
110
108
|
}
|
|
111
|
-
] :
|
|
112
|
-
const
|
|
113
|
-
logic:
|
|
109
|
+
] : e.filters.map((l) => {
|
|
110
|
+
const d = l.filters ? l : {
|
|
111
|
+
logic: t.logic,
|
|
114
112
|
filters: [l]
|
|
115
113
|
};
|
|
116
|
-
return d
|
|
117
|
-
}),
|
|
118
|
-
if (
|
|
119
|
-
const l =
|
|
120
|
-
l.filters && ((
|
|
114
|
+
return g(d), d;
|
|
115
|
+
}), f = p && a.includes(n[0].filters[0].field);
|
|
116
|
+
if (f) {
|
|
117
|
+
const l = o.filters[0];
|
|
118
|
+
l.filters && ((r = l.filters) == null || r.push(...n[0].filters), l.logic = t.logic);
|
|
121
119
|
}
|
|
122
|
-
|
|
123
|
-
...
|
|
124
|
-
filters:
|
|
120
|
+
e = {
|
|
121
|
+
...o,
|
|
122
|
+
filters: f ? o.filters : [...o.filters, ...n]
|
|
125
123
|
};
|
|
126
124
|
}
|
|
127
|
-
return
|
|
125
|
+
return e;
|
|
128
126
|
};
|
|
129
127
|
export {
|
|
130
|
-
|
|
128
|
+
s as IsUnaryFilter,
|
|
131
129
|
N as booleanFilterValues,
|
|
132
130
|
b as cellBoolDropdownChange,
|
|
133
|
-
|
|
131
|
+
v as cellInputChange,
|
|
134
132
|
A as cellOperatorChange,
|
|
135
|
-
|
|
133
|
+
L as combineSmartFilters,
|
|
136
134
|
x as defaultBooleanOperator,
|
|
137
|
-
|
|
135
|
+
I as defaultHideSecondFilter,
|
|
138
136
|
q as filterLogicList,
|
|
139
137
|
O as getDefaultOperator,
|
|
140
138
|
F as getFilterType,
|
|
141
139
|
h as operatorMap,
|
|
142
140
|
E as operators,
|
|
143
|
-
|
|
141
|
+
g as parseFilterDates
|
|
144
142
|
};
|
package/header/HeaderRow.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 V=require("react"),_=require("./GridHeaderCell.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),_=require("./GridHeaderCell.js"),s=require("@progress/kendo-react-common"),$=require("@progress/kendo-react-data-tools"),h=require("../messages/index.js"),G=require("@progress/kendo-svg-icons"),d=require("../utils/index.js"),N=require("./client/GridHeaderCellContainer.js"),B=require("./client/HeaderRowDraggable.js"),F=require("./client/GridHeaderRowContainer.js"),J=require("./client/GridHeaderCellElementContainer.js"),K=require("./client/HeaderCellResizer.js");function Q(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return i.default=e,Object.freeze(i)}const t=Q(V),U={none:"none",asc:"ascending",desc:"descending"},X=e=>{const i=e.columnsState||[],a=e.unstyled,o=a&&a.uGrid?a.uGrid:s.uGrid;let P=0,w=-1;const O=r=>{if(!e.sort)return null;const n=s.classNames(o.sortIcon({}));return r>=0&&[t.createElement("span",{key:1,className:n},t.createElement(s.IconWrap,{name:"sort-"+e.sort[r].dir+"-small",icon:e.sort[r].dir==="asc"?G.sortAscSmallIcon:G.sortDescSmallIcon})),e.sort.length>1&&t.createElement("span",{key:2,className:n},t.createElement("span",{className:s.classNames(o.sortOrder({}))},r+1))]},D=r=>r.map(n=>{var M,q,v;const l=e.columns[n],u=i[n],m=(q=(M=l.locked)!=null?M:u==null?void 0:u.locked)!=null?q:!1,k=e.sortable&&l.sortable,C=e.sort?e.sort.findIndex(c=>c.field===l.field):-1,T=C>=0&&e.sort[C].dir||"none",f=l.columnMenu===null?null:l.columnMenu||e.columnMenu,j=l.menuIcon||e.columnMenuIcon,A=s.classNames(s.classNames(o.headerTh({first:l.kFirst,filterable:!!f,locked:m,sorted:e.sort&&e.sort.some(c=>c.field===l.field)})),l.headerClassName);m===!1&&(l.left=0);const L=e.localization.toLanguageString(h.sortAriaLabel,h.messages[h.sortAriaLabel]),z=l.isAccessible?{ariaSort:U[T],role:"columnheader",ariaColumnIndex:l.ariaColumnIndex,ariaSelected:!1,ariaDescription:k?L:"",ariaHasPopup:f?"dialog":void 0}:{role:"presentation"},E=l.declarationIndex>=0?++w:--P,b={field:l.field,title:l.title,selectionValue:(v=l.headerSelectionValue)!=null?v:e.headerSelectionValue,children:O(C),selectionChange:null,columnMenuWrapperProps:{column:{field:l.field,title:l.title,locked:m,filter:l.filter,id:l.id},sortable:k&&e.sortable,sort:e.sort,filter:e.filter,filterable:e.filterable&&l.filterable,filterOperators:e.filterOperators,navigatable:e.navigatable,group:e.group,groupable:e.groupable,columnMenu:f,columnMenuIcon:j}},g={...z,colSpan:l.headerColSpan,rowSpan:l.rowSpan,className:A,columnId:l.id,navigatable:l.navigatable,role:"columnheader"},H=d.clientColumn(l),R={column:H,sortable:e.sortable,sort:e.sort,columnMenuWrapperProps:b.columnMenuWrapperProps},y=l.defaultHeaderCell?l.defaultHeaderCell:_.GridHeaderCell,I=[t.createElement(N.GridHeaderCellContainer,{key:1,...R,isClient:d.isClientReference(y)},t.createElement(y,{...b})),t.createElement(K.HeaderCellResizer,{key:2,column:H})],S=d.resolveCells(e.cells,l.cells);if(S&&S.headerCell){const c=S.headerCell,W=d.isClientReference(c);return t.createElement(N.GridHeaderCellContainer,{key:E,...R,thProps:g,isCustom:!0,isClient:W},t.createElement(c,{...b,thProps:g,index:n},I))}return t.createElement(J.GridHeaderCellElementContainer,{key:E,column:H},t.createElement($.HeaderThElement,{...g},I))}),x=e.columns.map(d.clientColumn);return t.createElement(F.GridHeaderRowContainer,{sortable:e.sortable,sort:e.sort,navigatable:e.navigatable,groupable:e.groupable,columns:x},e.columnsMap.map((r,n)=>t.createElement(B.HeaderRowDraggable,{key:n,className:s.classNames(o.simpleTr({})),ariaRowIndex:n+1},D(r))))};exports.HeaderRow=X;
|
package/header/HeaderRow.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import { uGrid as j, classNames as o, IconWrap as q } from "@progress/kendo-reac
|
|
|
11
11
|
import { HeaderThElement as J } from "@progress/kendo-react-data-tools";
|
|
12
12
|
import { sortAriaLabel as y, messages as K } from "../messages/index.mjs";
|
|
13
13
|
import { sortAscSmallIcon as Q, sortDescSmallIcon as U } from "@progress/kendo-svg-icons";
|
|
14
|
-
import { clientColumn as
|
|
15
|
-
import { GridHeaderCellContainer as
|
|
14
|
+
import { clientColumn as P, isClientReference as G, resolveCells as X } from "../utils/index.mjs";
|
|
15
|
+
import { GridHeaderCellContainer as N } from "./client/GridHeaderCellContainer.mjs";
|
|
16
16
|
import { HeaderRowDraggable as Y } from "./client/HeaderRowDraggable.mjs";
|
|
17
17
|
import { GridHeaderRowContainer as Z } from "./client/GridHeaderRowContainer.mjs";
|
|
18
18
|
import { GridHeaderCellElementContainer as _ } from "./client/GridHeaderCellElementContainer.mjs";
|
|
@@ -22,12 +22,12 @@ const p = {
|
|
|
22
22
|
asc: "ascending",
|
|
23
23
|
desc: "descending"
|
|
24
24
|
}, de = (e) => {
|
|
25
|
-
const R = e.columnsState || [],
|
|
25
|
+
const R = e.columnsState || [], c = e.unstyled, s = c && c.uGrid ? c.uGrid : j;
|
|
26
26
|
let w = 0, x = -1;
|
|
27
27
|
const A = (a) => {
|
|
28
28
|
if (!e.sort)
|
|
29
29
|
return null;
|
|
30
|
-
const n = o(
|
|
30
|
+
const n = o(s.sortIcon({}));
|
|
31
31
|
return a >= 0 && [
|
|
32
32
|
/* @__PURE__ */ t.createElement("span", { key: 1, className: n }, /* @__PURE__ */ t.createElement(
|
|
33
33
|
q,
|
|
@@ -36,15 +36,15 @@ const p = {
|
|
|
36
36
|
icon: e.sort[a].dir === "asc" ? Q : U
|
|
37
37
|
}
|
|
38
38
|
)),
|
|
39
|
-
e.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className: o(
|
|
39
|
+
e.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className: o(s.sortOrder({})) }, a + 1))
|
|
40
40
|
];
|
|
41
41
|
}, D = (a) => a.map((n) => {
|
|
42
|
-
var
|
|
43
|
-
const l = e.columns[n], i = R[n], m = (M = (
|
|
42
|
+
var I, M, v;
|
|
43
|
+
const l = e.columns[n], i = R[n], m = (M = (I = l.locked) != null ? I : i == null ? void 0 : i.locked) != null ? M : !1, h = e.sortable && l.sortable, d = e.sort ? e.sort.findIndex((r) => r.field === l.field) : -1, W = d >= 0 && e.sort[d].dir || "none", u = l.columnMenu === null ? null : l.columnMenu || e.columnMenu, O = l.menuIcon || e.columnMenuIcon, T = o(
|
|
44
44
|
o(
|
|
45
|
-
|
|
45
|
+
s.headerTh({
|
|
46
46
|
first: l.kFirst,
|
|
47
|
-
filterable: !!
|
|
47
|
+
filterable: !!u,
|
|
48
48
|
locked: m,
|
|
49
49
|
sorted: e.sort && e.sort.some((r) => r.field === l.field)
|
|
50
50
|
})
|
|
@@ -57,10 +57,11 @@ const p = {
|
|
|
57
57
|
role: "columnheader",
|
|
58
58
|
ariaColumnIndex: l.ariaColumnIndex,
|
|
59
59
|
ariaSelected: !1,
|
|
60
|
-
ariaDescription:
|
|
60
|
+
ariaDescription: h ? V : "",
|
|
61
|
+
ariaHasPopup: u ? "dialog" : void 0
|
|
61
62
|
} : {
|
|
62
63
|
role: "presentation"
|
|
63
|
-
}, E = l.declarationIndex >= 0 ? ++x : --w,
|
|
64
|
+
}, E = l.declarationIndex >= 0 ? ++x : --w, f = {
|
|
64
65
|
field: l.field,
|
|
65
66
|
title: l.title,
|
|
66
67
|
selectionValue: (v = l.headerSelectionValue) != null ? v : e.headerSelectionValue,
|
|
@@ -74,7 +75,7 @@ const p = {
|
|
|
74
75
|
filter: l.filter,
|
|
75
76
|
id: l.id
|
|
76
77
|
},
|
|
77
|
-
sortable:
|
|
78
|
+
sortable: h && e.sortable,
|
|
78
79
|
sort: e.sort,
|
|
79
80
|
filter: e.filter,
|
|
80
81
|
filterable: e.filterable && l.filterable,
|
|
@@ -82,10 +83,10 @@ const p = {
|
|
|
82
83
|
navigatable: e.navigatable,
|
|
83
84
|
group: e.group,
|
|
84
85
|
groupable: e.groupable,
|
|
85
|
-
columnMenu:
|
|
86
|
+
columnMenu: u,
|
|
86
87
|
columnMenuIcon: O
|
|
87
88
|
}
|
|
88
|
-
},
|
|
89
|
+
}, C = {
|
|
89
90
|
...z,
|
|
90
91
|
colSpan: l.headerColSpan,
|
|
91
92
|
rowSpan: l.rowSpan,
|
|
@@ -93,31 +94,31 @@ const p = {
|
|
|
93
94
|
columnId: l.id,
|
|
94
95
|
navigatable: l.navigatable,
|
|
95
96
|
role: "columnheader"
|
|
96
|
-
},
|
|
97
|
-
column:
|
|
97
|
+
}, b = P(l), S = {
|
|
98
|
+
column: b,
|
|
98
99
|
sortable: e.sortable,
|
|
99
100
|
sort: e.sort,
|
|
100
|
-
columnMenuWrapperProps:
|
|
101
|
-
}, k = l.defaultHeaderCell ? l.defaultHeaderCell : F,
|
|
102
|
-
/* @__PURE__ */ t.createElement(
|
|
103
|
-
/* @__PURE__ */ t.createElement($, { key: 2, column:
|
|
104
|
-
],
|
|
105
|
-
if (
|
|
106
|
-
const r =
|
|
101
|
+
columnMenuWrapperProps: f.columnMenuWrapperProps
|
|
102
|
+
}, k = l.defaultHeaderCell ? l.defaultHeaderCell : F, H = [
|
|
103
|
+
/* @__PURE__ */ t.createElement(N, { key: 1, ...S, isClient: G(k) }, /* @__PURE__ */ t.createElement(k, { ...f })),
|
|
104
|
+
/* @__PURE__ */ t.createElement($, { key: 2, column: b })
|
|
105
|
+
], g = X(e.cells, l.cells);
|
|
106
|
+
if (g && g.headerCell) {
|
|
107
|
+
const r = g.headerCell, B = G(r);
|
|
107
108
|
return /* @__PURE__ */ t.createElement(
|
|
108
|
-
|
|
109
|
+
N,
|
|
109
110
|
{
|
|
110
111
|
key: E,
|
|
111
112
|
...S,
|
|
112
|
-
thProps:
|
|
113
|
+
thProps: C,
|
|
113
114
|
isCustom: !0,
|
|
114
115
|
isClient: B
|
|
115
116
|
},
|
|
116
|
-
/* @__PURE__ */ t.createElement(r, { ...
|
|
117
|
+
/* @__PURE__ */ t.createElement(r, { ...f, thProps: C, index: n }, H)
|
|
117
118
|
);
|
|
118
119
|
}
|
|
119
|
-
return /* @__PURE__ */ t.createElement(_, { key: E, column:
|
|
120
|
-
}), L = e.columns.map(
|
|
120
|
+
return /* @__PURE__ */ t.createElement(_, { key: E, column: b }, /* @__PURE__ */ t.createElement(J, { ...C }, H));
|
|
121
|
+
}), L = e.columns.map(P);
|
|
121
122
|
return /* @__PURE__ */ t.createElement(
|
|
122
123
|
Z,
|
|
123
124
|
{
|
|
@@ -127,7 +128,7 @@ const p = {
|
|
|
127
128
|
groupable: e.groupable,
|
|
128
129
|
columns: L
|
|
129
130
|
},
|
|
130
|
-
e.columnsMap.map((a, n) => /* @__PURE__ */ t.createElement(Y, { key: n, className: o(
|
|
131
|
+
e.columnsMap.map((a, n) => /* @__PURE__ */ t.createElement(Y, { key: n, className: o(s.simpleTr({})), ariaRowIndex: n + 1 }, D(a)))
|
|
131
132
|
);
|
|
132
133
|
};
|
|
133
134
|
export {
|
package/index.d.mts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Grid, GridHandle } from './Grid.js';
|
|
9
9
|
import { GridProps, GridCSVExportOptions } from './interfaces/GridProps';
|
|
10
|
+
import { GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers } from './GridWebMcpProps';
|
|
11
|
+
import { McpToolOption } from '@progress/kendo-react-common';
|
|
10
12
|
import { GridColumn } from './GridColumn.js';
|
|
11
13
|
import { GridColumnProps } from './interfaces/GridColumnProps';
|
|
12
14
|
import { GridColSpanProps } from './interfaces/GridColSpanProps';
|
|
@@ -92,6 +94,6 @@ export * from './GridSearchBox.js';
|
|
|
92
94
|
export * from './GridPdfExportButton.js';
|
|
93
95
|
export * from './GridCsvExportButton.js';
|
|
94
96
|
export * from './toolbar-tools/smartbox/index.js';
|
|
95
|
-
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient
|
|
97
|
+
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent, GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers, McpToolOption, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient };
|
|
96
98
|
export { GridPinCell, GridHeaderPinCell };
|
|
97
99
|
export * from './interfaces/GridStackedLayoutSettings';
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Grid, GridHandle } from './Grid.js';
|
|
9
9
|
import { GridProps, GridCSVExportOptions } from './interfaces/GridProps';
|
|
10
|
+
import { GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers } from './GridWebMcpProps';
|
|
11
|
+
import { McpToolOption } from '@progress/kendo-react-common';
|
|
10
12
|
import { GridColumn } from './GridColumn.js';
|
|
11
13
|
import { GridColumnProps } from './interfaces/GridColumnProps';
|
|
12
14
|
import { GridColSpanProps } from './interfaces/GridColSpanProps';
|
|
@@ -92,6 +94,6 @@ export * from './GridSearchBox.js';
|
|
|
92
94
|
export * from './GridPdfExportButton.js';
|
|
93
95
|
export * from './GridCsvExportButton.js';
|
|
94
96
|
export * from './toolbar-tools/smartbox/index.js';
|
|
95
|
-
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient
|
|
97
|
+
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent, GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers, McpToolOption, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient };
|
|
96
98
|
export { GridPinCell, GridHeaderPinCell };
|
|
97
99
|
export * from './interfaces/GridStackedLayoutSettings';
|
|
@@ -9,6 +9,7 @@ import { ComponentType } from 'react';
|
|
|
9
9
|
import { DataResult, SortDescriptor, CompositeFilterDescriptor, GroupDescriptor } from '@progress/kendo-data-query';
|
|
10
10
|
import { CSVExportOptions } from '@progress/kendo-csv';
|
|
11
11
|
import { GridGroupableSettings } from './GridGroupableSettings';
|
|
12
|
+
import { GridWebMcpProps } from '../GridWebMcpProps';
|
|
12
13
|
import { GridSortChangeEvent, GridFilterChangeEvent, GridPageChangeEvent, GridSelectionChangeEvent, GridHeaderSelectionChangeEvent, GridRowClickEvent, GridItemChangeEvent, GridDataStateChangeEvent, GridColumnResizeEvent, GridColumnReorderEvent, GridGroupChangeEvent, GridEvent, GridRowDoubleClickEvent, GridNavigationActionEvent, GridKeyDownEvent, GridContextMenuEvent, GridContextMenuItemClickEvent, GridEditChangeEvent, GridDetailExpandChangeEvent, GridGroupExpandChangeEvent, GridRowReorderEvent, GridSearchChangeEvent, GridColumnsStateChangeEvent, GridHighlightChangeEvent, GridRowPinChangeEvent } from './events';
|
|
13
14
|
import { ScrollMode } from '../ScrollMode';
|
|
14
15
|
import { GridSortSettings } from './GridSortSettings';
|
|
@@ -1171,6 +1172,27 @@ export interface GridProps extends KendoReactComponentBaseProps {
|
|
|
1171
1172
|
* ```
|
|
1172
1173
|
*/
|
|
1173
1174
|
stackedLayoutSettings?: GridStackedLayoutSettings;
|
|
1175
|
+
/**
|
|
1176
|
+
* Enables Web MCP tools for browser-native AI agent interaction (Chrome 146+).
|
|
1177
|
+
*
|
|
1178
|
+
* When enabled, the Grid registers tools that AI agents can discover and invoke.
|
|
1179
|
+
* Data reading tools (`get_data`, `get_state`) are always registered.
|
|
1180
|
+
* Additional tools are registered based on Grid props:
|
|
1181
|
+
* - `sortable` → `sort` and `clear_sort` tools.
|
|
1182
|
+
*
|
|
1183
|
+
* Pass `true` for defaults or an object for fine-grained control.
|
|
1184
|
+
* AI agents are multilingual — `dataName` accepts any language.
|
|
1185
|
+
*
|
|
1186
|
+
* @example
|
|
1187
|
+
* ```tsx
|
|
1188
|
+
* // Boolean: generic "data" label
|
|
1189
|
+
* <Grid webMcp sortable />
|
|
1190
|
+
*
|
|
1191
|
+
* // Config object: explicit name
|
|
1192
|
+
* <Grid webMcp={{ dataName: 'employees' }} sortable />
|
|
1193
|
+
* ```
|
|
1194
|
+
*/
|
|
1195
|
+
webMcp?: GridWebMcpProps;
|
|
1174
1196
|
}
|
|
1175
1197
|
/**
|
|
1176
1198
|
* @hidden
|
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=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1779199650,version:"15.0.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '
|
|
10
|
+
publishDate: 1779199650,
|
|
11
|
+
version: '15.0.0-develop.1',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0-develop.1",
|
|
4
4
|
"description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -30,22 +30,22 @@
|
|
|
30
30
|
"@progress/kendo-drawing": "^1.21.2",
|
|
31
31
|
"@progress/kendo-file-saver": "^1.1.1",
|
|
32
32
|
"@progress/kendo-licensing": "^1.7.2",
|
|
33
|
-
"@progress/kendo-react-animation": "
|
|
34
|
-
"@progress/kendo-react-buttons": "
|
|
35
|
-
"@progress/kendo-react-common": "
|
|
36
|
-
"@progress/kendo-react-data-tools": "
|
|
37
|
-
"@progress/kendo-react-dateinputs": "
|
|
38
|
-
"@progress/kendo-react-indicators": "
|
|
39
|
-
"@progress/kendo-react-form": "
|
|
40
|
-
"@progress/kendo-react-labels": "
|
|
41
|
-
"@progress/kendo-react-dialogs": "
|
|
42
|
-
"@progress/kendo-react-dropdowns": "
|
|
43
|
-
"@progress/kendo-react-inputs": "
|
|
44
|
-
"@progress/kendo-react-intl": "
|
|
45
|
-
"@progress/kendo-react-popup": "
|
|
46
|
-
"@progress/kendo-react-layout": "
|
|
47
|
-
"@progress/kendo-react-conversational-ui": "
|
|
48
|
-
"@progress/kendo-svg-icons": "^4.0.0",
|
|
33
|
+
"@progress/kendo-react-animation": "15.0.0-develop.1",
|
|
34
|
+
"@progress/kendo-react-buttons": "15.0.0-develop.1",
|
|
35
|
+
"@progress/kendo-react-common": "15.0.0-develop.1",
|
|
36
|
+
"@progress/kendo-react-data-tools": "15.0.0-develop.1",
|
|
37
|
+
"@progress/kendo-react-dateinputs": "15.0.0-develop.1",
|
|
38
|
+
"@progress/kendo-react-indicators": "15.0.0-develop.1",
|
|
39
|
+
"@progress/kendo-react-form": "15.0.0-develop.1",
|
|
40
|
+
"@progress/kendo-react-labels": "15.0.0-develop.1",
|
|
41
|
+
"@progress/kendo-react-dialogs": "15.0.0-develop.1",
|
|
42
|
+
"@progress/kendo-react-dropdowns": "15.0.0-develop.1",
|
|
43
|
+
"@progress/kendo-react-inputs": "15.0.0-develop.1",
|
|
44
|
+
"@progress/kendo-react-intl": "15.0.0-develop.1",
|
|
45
|
+
"@progress/kendo-react-popup": "15.0.0-develop.1",
|
|
46
|
+
"@progress/kendo-react-layout": "15.0.0-develop.1",
|
|
47
|
+
"@progress/kendo-react-conversational-ui": "15.0.0-develop.1",
|
|
48
|
+
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
49
49
|
"react": "^18.0.0 || ^19.0.0",
|
|
50
50
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
51
51
|
},
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"package": {
|
|
149
149
|
"productName": "KendoReact",
|
|
150
150
|
"productCode": "KENDOUIREACT",
|
|
151
|
-
"publishDate":
|
|
151
|
+
"publishDate": 1779199650,
|
|
152
152
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -158,5 +158,10 @@
|
|
|
158
158
|
"repository": {
|
|
159
159
|
"type": "git",
|
|
160
160
|
"url": "git+https://github.com/telerik/kendo-react.git"
|
|
161
|
+
},
|
|
162
|
+
"peerDependenciesMeta": {
|
|
163
|
+
"@progress/kendo-svg-icons": {
|
|
164
|
+
"optional": true
|
|
165
|
+
}
|
|
161
166
|
}
|
|
162
167
|
}
|
|
@@ -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 Ae=require("react"),_=require("@progress/kendo-react-buttons"),M=require("@progress/kendo-svg-icons"),d=require("@progress/kendo-react-common"),et=require("@progress/kendo-react-intl"),J=require("@progress/kendo-react-dropdowns"),tt=require("@progress/kendo-react-popup"),R=require("./listItemRenders.js"),o=require("../../messages/index.js"),nt=require("../../hooks/useGridAIRequest.js"),st=require("../../utils/GridContext.js"),rt=require("./hooks/useSmartBoxModes.js"),at=require("./hooks/useSmartBoxHistory.js"),ot=require("./hooks/useSmartBoxPopup.js"),ct=require("./hooks/useSmartBoxGridState.js"),it=require("./hooks/useSmartBoxLabels.js"),lt=require("./hooks/useSmartBoxListData.js"),ut=require("./hooks/useSmartBoxSegmentedControl.js"),pt=require("./hooks/useSmartBoxSearch.js"),dt=require("./hooks/useDebounce.js");function mt(m){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const f in m)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(m,f);Object.defineProperty(x,f,I.get?I:{enumerable:!0,get:()=>m[f]})}}return x.default=m,Object.freeze(x)}const e=mt(Ae),ge=e.forwardRef((m,x)=>{var de;const{searchConfig:f,semanticSearchConfig:I,aiAssistantConfig:he,activeMode:fe,dir:Se="ltr",size:Q="medium",placeholder:ke,history:xe,loading:Ce=!1,promptSuggestionRender:X,historyItemRender:Y,onOpen:be,onClose:Be,onFocus:v,onBlur:q,onSearch:Re,onSemanticSearch:Ie,onAIPromptRequest:N,onAIResponseSuccess:F,onAIResponseError:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=require("react"),_=require("@progress/kendo-react-buttons"),M=require("@progress/kendo-svg-icons"),d=require("@progress/kendo-react-common"),et=require("@progress/kendo-react-intl"),J=require("@progress/kendo-react-dropdowns"),tt=require("@progress/kendo-react-popup"),R=require("./listItemRenders.js"),o=require("../../messages/index.js"),nt=require("../../hooks/useGridAIRequest.js"),st=require("../../utils/GridContext.js"),rt=require("./hooks/useSmartBoxModes.js"),at=require("./hooks/useSmartBoxHistory.js"),ot=require("./hooks/useSmartBoxPopup.js"),ct=require("./hooks/useSmartBoxGridState.js"),it=require("./hooks/useSmartBoxLabels.js"),lt=require("./hooks/useSmartBoxListData.js"),ut=require("./hooks/useSmartBoxSegmentedControl.js"),pt=require("./hooks/useSmartBoxSearch.js"),dt=require("./hooks/useDebounce.js");function mt(m){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const f in m)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(m,f);Object.defineProperty(x,f,I.get?I:{enumerable:!0,get:()=>m[f]})}}return x.default=m,Object.freeze(x)}const e=mt(Ae),ge=e.forwardRef((m,x)=>{var de;const{searchConfig:f,semanticSearchConfig:I,aiAssistantConfig:he,activeMode:fe,dir:Se="ltr",size:Q="medium",placeholder:ke,history:xe,loading:Ce=!1,promptSuggestionRender:X,historyItemRender:Y,onOpen:be,onClose:Be,onFocus:v,onBlur:q,onSearch:Re,onSemanticSearch:Ie,onAIPromptRequest:N,onAIResponseSuccess:F,onAIResponseError:z,onAICancelRequest:w}=m,C=et.useLocalization(),b=e.useContext(st.GridContext),ve=e.useRef(`k-${d.guid()}`),S=e.useRef(null),B=e.useRef(null),Z=e.useRef(null),[c,g]=e.useState(""),[qe,D]=e.useState(!1),[we,A]=e.useState(void 0),[De,ee]=e.useState(null),{searchMode:i,semanticSearchMode:u,aiAssistantMode:r,selectedView:n,setSelectedViewState:O,lastSearchMode:Pe,searchHistorySettings:te,semanticSearchHistorySettings:ne,aiAssistantHistorySettings:G,speechToTextButtonSettings:se,currentSearchDelay:ye}=rt.useSmartBoxModes({searchConfigProp:f,semanticSearchConfigProp:I,aiAssistantConfigProp:he,activeModeProp:fe,sharedHistory:xe}),{currentHistory:P,currentHistorySettings:Ee,addToHistory:V}=at.useSmartBoxHistory({selectedView:n,searchHistorySettings:te,semanticSearchHistorySettings:ne,aiAssistantHistorySettings:G}),{isOpen:W,togglePopup:a}=ot.useSmartBoxPopup({onOpen:be,onClose:Be}),{columns:re,gridState:Le,gridRef:Te,handleStateChange:He}=ct.useSmartBoxGridState(b),j=e.useMemo(()=>(r==null?void 0:r.promptSuggestions)||[],[r==null?void 0:r.promptSuggestions]),{inputPlaceholder:Ne,prefixIcon:Fe}=it.useSmartBoxLabels({selectedView:n,searchMode:i,semanticSearchMode:u,aiAssistantMode:r,sharedPlaceholder:ke}),{searchListData:k,aiAssistantListData:y,searchHistoryListData:E}=lt.useSmartBoxListData({selectedView:n,searchModeEnabled:i==null?void 0:i.enabled,semanticSearchModeEnabled:u==null?void 0:u.enabled,promptSuggestions:j,currentHistory:P,currentHistorySettings:Ee}),L=ut.useSmartBoxSegmentedControl({searchMode:i,semanticSearchMode:u,aiAssistantMode:r,selectedView:n,lastSearchMode:Pe,setSelectedViewState:O,setInputValue:g});e.useEffect(()=>{const t=S.current;if(!t)return;A(t.offsetWidth);const s=new ResizeObserver(()=>{t&&A(t.offsetWidth)});return s.observe(t),()=>{s.disconnect()}},[]);const h=Ce||qe,U=!n,ze=!(i!=null&&i.enabled)&&!(u!=null&&u.enabled)&&!(r!=null&&r.enabled),Oe=d.kendoThemeMaps.sizeMap[Q]||"md",{emitSearchEvent:p}=pt.useSmartBoxSearch({selectedView:n,searchMode:i,columns:re,gridContext:b,searchHistorySettings:te,semanticSearchHistorySettings:ne,addToHistory:V,onSearch:Re,onSemanticSearch:Ie}),{sendRequest:ae,cancelRequest:oe}=nt.useGridAIRequest({requestUrl:r==null?void 0:r.requestUrl,requestOptions:r==null?void 0:r.requestOptions,httpClient:r==null?void 0:r.httpClient,columns:re,gridState:Le,gridRef:Te,onPromptRequest:t=>{N==null||N({requestData:t})},onResponseSuccess:t=>{D(!1),F==null||F({response:t})},onResponseError:t=>{D(!1),z==null||z({error:t})},onStateChange:He,onExportPdf:()=>b==null?void 0:b.exportAsPdf()});e.useImperativeHandle(x,()=>({show:()=>a(!0),hide:()=>a(!1)}),[a]);const $=dt.useDebounce(De,ye),ce=e.useRef(p);ce.current=p,e.useEffect(()=>{$!==null&&ce.current($)},[$]);const Ge=e.useCallback(t=>{const s=t.target.value;g(s),a(!s),(n==="search"||n==="semanticSearch")&&ee(s)},[a,n]),Ve=e.useCallback(()=>{v==null||v(),c||a(!0)},[v,a,c]),We=e.useCallback(t=>{var me;const s=S.current,l=(me=Z.current)==null?void 0:me.element,H=t.relatedTarget,Ye=H&&(s==null?void 0:s.contains(H)),Ze=H&&(l==null?void 0:l.contains(H));!Ye&&!Ze&&(q==null||q(),a(!1))},[q,a]),je=e.useCallback(()=>{c||a(!0)},[a,c]),ie=!!((de=r==null?void 0:r.requestOptions)!=null&&de.url||r!=null&&r.requestUrl),K=e.useCallback(()=>{if(h){w==null||w(),oe(),D(!1);return}c.trim()&&(ie&&D(!0),V("aiAssistant",c,G),a(!1),ae(c.trim()),g(""))},[h,c,G,a,V,ae,oe,ie,w]),Ue=e.useCallback(t=>{t.key==="Enter"&&(n==="aiAssistant"?K():n==="semanticSearch"&&p(c))},[n,c,p,K]),$e=e.useCallback(()=>{var t;a(!W),(t=B.current)==null||t.focus()},[W,a]),Ke=e.useCallback(t=>{var s;t.stopPropagation(),t.preventDefault(),g(""),(s=B.current)==null||s.focus(),a(!0),p("")},[a,p]),le=e.useCallback(t=>{var s;O(t),g(""),ee(null),(s=B.current)==null||s.focus()},[O]),T=e.useCallback(t=>{var s;g(t),a(!1),(s=B.current)==null||s.focus(),n!=="aiAssistant"&&p(t)},[n,a,p]),_e=e.useCallback(t=>{if(t.isFinal&&t.alternatives.length>0){const s=t.alternatives[0].transcript;g(l=>l?`${l} ${s}`:s)}},[]),Me=e.useMemo(()=>n==="aiAssistant"?P.length===0&&j.length===0:n==="search"||n==="semanticSearch"?P.length===0&&k.length===0:!1,[n,P.length,j.length,k.length]),ue=e.useCallback(t=>{const l=(n==="aiAssistant"?y:E)[t];l&&T(l.text)},[n,y,E,T]),Je=e.useCallback(t=>{const s=k[t];s&&le(s.mode)},[k,le]),pe=e.useMemo(()=>R.createListItemRender({historyItemRender:Y,promptSuggestionRender:X,handleListItemClick:T}),[Y,X,T]),Qe=W&&!ze,Xe=()=>e.createElement(e.Fragment,null,L.items.length>0&&e.createElement(_.SegmentedControl,{items:L.items,value:L.value,onChange:L.onChange,size:Q,layoutMode:"stretch"}),(n==="search"||n==="semanticSearch")&&k.length>0&&e.createElement(J.List,{data:k,textField:"text",descriptionField:"description",onClick:Je,itemRender:R.searchModeItemRender,show:!0,wrapperCssClass:"k-list k-list-md"}),n==="aiAssistant"&&y.length>0&&e.createElement(J.List,{data:y,textField:"text",groupField:"group",svgIconField:"groupSvgIcon",descriptionField:"description",onClick:ue,itemRender:pe,groupHeaderItemRender:R.listGroupHeaderRender,showFirstGroupHeader:!0,show:!0,wrapperCssClass:"k-list k-list-md"}),(n==="search"||n==="semanticSearch")&&E.length>0&&e.createElement(J.List,{data:E,textField:"text",groupField:"group",svgIconField:"groupSvgIcon",descriptionField:"description",onClick:ue,itemRender:pe,groupHeaderItemRender:R.listGroupHeaderRender,showFirstGroupHeader:!0,show:!0,wrapperCssClass:"k-list k-list-md"}),Me&&e.createElement(R.NoDataRender,{selectedView:n}));return e.createElement("div",{ref:S,className:"k-smart-box-wrapper",dir:Se,onBlur:We},e.createElement("span",{className:d.classNames("k-smart-box","k-input",`k-input-${Oe}`,{"k-loading":h})},!U&&e.createElement("span",{className:"k-input-prefix k-input-prefix-horizontal"},e.createElement(d.IconWrap,{className:d.classNames("k-icon",{"k-accent-icon":n==="aiAssistant"||n==="semanticSearch"}),icon:Fe.svgIcon,onClick:$e,onMouseDown:t=>{"preventDefault"in t&&t.preventDefault()}})),e.createElement("input",{ref:B,type:"text",className:d.classNames("k-input-inner",{"k-disabled":U}),id:ve.current,placeholder:Ne,value:c,disabled:U,onChange:Ge,onFocus:Ve,onClick:je,onKeyDown:Ue}),c.length>0&&(n==="search"||n==="semanticSearch")&&e.createElement("span",{className:"k-clear-value",title:C.toLanguageString(o.smartBoxClearTitle,o.messages[o.smartBoxClearTitle]),role:"button",tabIndex:-1,onClick:Ke,onMouseDown:t=>t.preventDefault()},e.createElement(d.IconWrap,{className:"k-icon",icon:M.xIcon})),n==="aiAssistant"&&e.createElement("span",{className:"k-input-suffix k-input-suffix-horizontal"},se&&e.createElement(_.SpeechToTextButton,{...se,"aria-label":C.toLanguageString(o.smartBoxSpeechToTextButton,o.messages[o.smartBoxSpeechToTextButton]),title:C.toLanguageString(o.smartBoxSpeechToTextButton,o.messages[o.smartBoxSpeechToTextButton]),onResult:_e}),e.createElement(_.Button,{className:d.classNames("k-smart-box-send",{"k-processing":h,"k-active":h}),type:"button",rounded:"full",size:"small",title:C.toLanguageString(o.smartBoxSubmitPromptButton,o.messages[o.smartBoxSubmitPromptButton]),"aria-label":C.toLanguageString(o.smartBoxSubmitPromptButton,o.messages[o.smartBoxSubmitPromptButton]),"aria-disabled":c.length===0,svgIcon:h?M.stopIcon:M.arrowUpIcon,disabled:c.length===0&&!h,onClick:K}))),e.createElement(tt.Popup,{ref:Z,anchor:S.current,show:Qe,popupClass:"k-smart-box-popup",style:{width:we},anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},margin:{horizontal:0,vertical:2},onMouseDownOutside:t=>{const s=t.event.target;S.current&&!S.current.contains(s)&&a(!1)}},Xe()))});ge.displayName="KendoReactSmartBox";exports.SmartBox=ge;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import { SpeechToTextButton as et, Button as tt, SegmentedControl as nt } from "@progress/kendo-react-buttons";
|
|
10
|
-
import { xIcon as rt,
|
|
10
|
+
import { xIcon as rt, stopIcon as at, arrowUpIcon as st } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { guid as ot, kendoThemeMaps as it, classNames as B, IconWrap as ce } from "@progress/kendo-react-common";
|
|
12
12
|
import { useLocalization as lt } from "@progress/kendo-react-intl";
|
|
13
13
|
import { List as $ } from "@progress/kendo-react-dropdowns";
|