@progress/kendo-react-grid 14.5.0-develop.9 → 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/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"}]},a=e=>e==="isnull"||e==="isnotnull"||e==="isempty"||e==="isnotempty",h=(e,i)=>e.map(t=>({text:i.toLanguageString(t.text,x.messages[t.text]),operator:t.operator})),d="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=(e,i,t)=>{const o=g(t.operators);let r=t.operator;switch(t.filterType){case"numeric":(!r||a(r))&&(r=o);break;case"date":(!r||a(r))&&(r=o);break;case"text":(!r||a(r))&&(r=o);break;default:return}t.onChange({value:e,operator:r,syntheticEvent:i})},g=(e,i)=>i?e[i][0].operator:e[0].operator,v=e=>e||"text",N=(e,i)=>{const t=e.target.value;i({value:t.operator,operator:t.operator===""?"":d,syntheticEvent:e.syntheticEvent})},F=(e,i,t)=>{let o=i;const r=e.target.value;e.target.state.opened&&(a(r.operator)&&(o=null),i===null&&!a(r.operator)&&(o=void 0),t({value:o,operator:r.operator,syntheticEvent:e.syntheticEvent}))},n=(e,i)=>{const t=i||new O.IntlService("en-US");if(e.value){const o=t.parseDate(e.value);o&&(e.value=o)}e.filters&&(e.filters=e.filters.map(o=>{if(o.value){const r=t.parseDate(o.value);r&&(o.value=r)}return o}))},b=(e,i)=>{var o;let t=e;if(t&&Object.keys(t).length===0&&(t=null),t!=null&&t.filters&&Array.isArray(t.filters)){const r=i||{filters:[],logic:"and"},u=r.filters.map(l=>l.field||l.filters[0].field),p=t.filters.every(l=>l.field===(t==null?void 0:t.filters[0]).field),s=p?[{filters:t.filters.map(l=>(n(l),l)),logic:t.logic}]:t.filters.map(l=>{const c=l.filters?l:{logic:e.logic,filters:[l]};return n(c),c}),f=p&&u.includes(s[0].filters[0].field);if(f){const l=r.filters[0];l.filters&&((o=l.filters)==null||o.push(...s[0].filters),l.logic=e.logic)}t={...r,filters:f?r.filters:[...r.filters,...s]}}return t};exports.IsUnaryFilter=a;exports.booleanFilterValues=q;exports.cellBoolDropdownChange=N;exports.cellInputChange=E;exports.cellOperatorChange=F;exports.combineSmartFilters=b;exports.defaultBooleanOperator=d;exports.defaultHideSecondFilter=I;exports.filterLogicList=m;exports.getDefaultOperator=g;exports.getFilterType=v;exports.operatorMap=h;exports.operators=y;exports.parseFilterDates=n;
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 g } from "./messages/index.mjs";
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
- }, a = (e) => e === "isnull" || e === "isnotnull" || e === "isempty" || e === "isnotempty", h = (e, i) => e.map((t) => ({
48
- text: i.toLanguageString(t.text, g[t.text]),
49
- operator: t.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
- ], v = {
54
+ ], I = {
55
55
  text: !1,
56
56
  numeric: !1,
57
57
  date: !1,
58
58
  boolean: !0
59
- }, I = (e, i, t) => {
60
- const o = O(t.operators);
61
- let r = t.operator;
62
- switch (t.filterType) {
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
- (!r || a(r)) && (r = o);
65
+ (!a || s(a)) && (a = o), r && t === null && a === o && (a = "");
68
66
  break;
69
67
  case "text":
70
- (!r || a(r)) && (r = o);
68
+ (!a || s(a)) && (a = o), r && !t && a === o && (a = "");
71
69
  break;
72
70
  default:
73
71
  return;
74
72
  }
75
- t.onChange({ value: e, operator: r, syntheticEvent: i });
76
- }, O = (e, i) => i ? e[i][0].operator : e[0].operator, F = (e) => e || "text", b = (e, i) => {
77
- const t = e.target.value;
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: t.operator,
80
- operator: t.operator === "" ? "" : x,
81
- syntheticEvent: e.syntheticEvent
77
+ value: e.operator,
78
+ operator: e.operator === "" ? "" : x,
79
+ syntheticEvent: t.syntheticEvent
82
80
  });
83
- }, A = (e, i, t) => {
84
- let o = i;
85
- const r = e.target.value;
86
- e.target.state.opened && (a(r.operator) && (o = null), i === null && !a(r.operator) && (o = void 0), t({ value: o, operator: r.operator, syntheticEvent: e.syntheticEvent }));
87
- }, d = (e, i) => {
88
- const t = i || new u("en-US");
89
- if (e.value) {
90
- const o = t.parseDate(e.value);
91
- o && (e.value = o);
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
- e.filters && (e.filters = e.filters.map(
94
- (o) => {
95
- if (o.value) {
96
- const r = t.parseDate(o.value);
97
- r && (o.value = r);
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 o;
97
+ return r;
100
98
  }
101
99
  ));
102
- }, C = (e, i) => {
103
- var o;
104
- let t = e;
105
- if (t && Object.keys(t).length === 0 && (t = null), t != null && t.filters && Array.isArray(t.filters)) {
106
- const r = i || { filters: [], logic: "and" }, c = r.filters.map((l) => l.field || l.filters[0].field), n = t.filters.every((l) => l.field === (t == null ? void 0 : t.filters[0]).field), s = n ? [
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: t.filters.map((l) => (d(l), l)),
109
- logic: t.logic
106
+ filters: e.filters.map((l) => (g(l), l)),
107
+ logic: e.logic
110
108
  }
111
- ] : t.filters.map((l) => {
112
- const f = l.filters ? l : {
113
- logic: e.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(f), f;
117
- }), p = n && c.includes(s[0].filters[0].field);
118
- if (p) {
119
- const l = r.filters[0];
120
- l.filters && ((o = l.filters) == null || o.push(...s[0].filters), l.logic = e.logic);
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
- t = {
123
- ...r,
124
- filters: p ? r.filters : [...r.filters, ...s]
120
+ e = {
121
+ ...o,
122
+ filters: f ? o.filters : [...o.filters, ...n]
125
123
  };
126
124
  }
127
- return t;
125
+ return e;
128
126
  };
129
127
  export {
130
- a as IsUnaryFilter,
128
+ s as IsUnaryFilter,
131
129
  N as booleanFilterValues,
132
130
  b as cellBoolDropdownChange,
133
- I as cellInputChange,
131
+ v as cellInputChange,
134
132
  A as cellOperatorChange,
135
- C as combineSmartFilters,
133
+ L as combineSmartFilters,
136
134
  x as defaultBooleanOperator,
137
- v as defaultHideSecondFilter,
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
- d as parseFilterDates
141
+ g as parseFilterDates
144
142
  };
@@ -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"),c=require("@progress/kendo-react-common"),$=require("@progress/kendo-react-data-tools"),S=require("../messages/index.js"),N=require("@progress/kendo-svg-icons"),d=require("../utils/index.js"),v=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 l=Q(V),U={none:"none",asc:"ascending",desc:"descending"},X=e=>{const i=e.columnsState||[],a=e.unstyled,o=a&&a.uGrid?a.uGrid:c.uGrid;let w=0,P=-1;const O=r=>{if(!e.sort)return null;const n=c.classNames(o.sortIcon({}));return r>=0&&[l.createElement("span",{key:1,className:n},l.createElement(c.IconWrap,{name:"sort-"+e.sort[r].dir+"-small",icon:e.sort[r].dir==="asc"?N.sortAscSmallIcon:N.sortDescSmallIcon})),e.sort.length>1&&l.createElement("span",{key:2,className:n},l.createElement("span",{className:c.classNames(o.sortOrder({}))},r+1))]},D=r=>r.map(n=>{var M,q,G;const t=e.columns[n],u=i[n],m=(q=(M=t.locked)!=null?M:u==null?void 0:u.locked)!=null?q:!1,h=e.sortable&&t.sortable,C=e.sort?e.sort.findIndex(s=>s.field===t.field):-1,T=C>=0&&e.sort[C].dir||"none",k=t.columnMenu===null?null:t.columnMenu||e.columnMenu,j=t.menuIcon||e.columnMenuIcon,A=c.classNames(c.classNames(o.headerTh({first:t.kFirst,filterable:!!k,locked:m,sorted:e.sort&&e.sort.some(s=>s.field===t.field)})),t.headerClassName);m===!1&&(t.left=0);const L=e.localization.toLanguageString(S.sortAriaLabel,S.messages[S.sortAriaLabel]),z=t.isAccessible?{ariaSort:U[T],role:"columnheader",ariaColumnIndex:t.ariaColumnIndex,ariaSelected:!1,ariaDescription:h?L:""}:{role:"presentation"},E=t.declarationIndex>=0?++P:--w,f={field:t.field,title:t.title,selectionValue:(G=t.headerSelectionValue)!=null?G:e.headerSelectionValue,children:O(C),selectionChange:null,columnMenuWrapperProps:{column:{field:t.field,title:t.title,locked:m,filter:t.filter,id:t.id},sortable:h&&e.sortable,sort:e.sort,filter:e.filter,filterable:e.filterable&&t.filterable,filterOperators:e.filterOperators,navigatable:e.navigatable,group:e.group,groupable:e.groupable,columnMenu:k,columnMenuIcon:j}},b={...z,colSpan:t.headerColSpan,rowSpan:t.rowSpan,className:A,columnId:t.id,navigatable:t.navigatable,role:"columnheader"},g=d.clientColumn(t),R={column:g,sortable:e.sortable,sort:e.sort,columnMenuWrapperProps:f.columnMenuWrapperProps},y=t.defaultHeaderCell?t.defaultHeaderCell:_.GridHeaderCell,I=[l.createElement(v.GridHeaderCellContainer,{key:1,...R,isClient:d.isClientReference(y)},l.createElement(y,{...f})),l.createElement(K.HeaderCellResizer,{key:2,column:g})],H=d.resolveCells(e.cells,t.cells);if(H&&H.headerCell){const s=H.headerCell,W=d.isClientReference(s);return l.createElement(v.GridHeaderCellContainer,{key:E,...R,thProps:b,isCustom:!0,isClient:W},l.createElement(s,{...f,thProps:b,index:n},I))}return l.createElement(J.GridHeaderCellElementContainer,{key:E,column:g},l.createElement($.HeaderThElement,{...b},I))}),x=e.columns.map(d.clientColumn);return l.createElement(F.GridHeaderRowContainer,{sortable:e.sortable,sort:e.sort,navigatable:e.navigatable,groupable:e.groupable,columns:x},e.columnsMap.map((r,n)=>l.createElement(B.HeaderRowDraggable,{key:n,className:c.classNames(o.simpleTr({})),ariaRowIndex:n+1},D(r))))};exports.HeaderRow=X;
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;
@@ -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 G, isClientReference as N, resolveCells as X } from "../utils/index.mjs";
15
- import { GridHeaderCellContainer as P } from "./client/GridHeaderCellContainer.mjs";
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 || [], s = e.unstyled, c = s && s.uGrid ? s.uGrid : j;
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(c.sortIcon({}));
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(c.sortOrder({})) }, a + 1))
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 H, M, v;
43
- const l = e.columns[n], i = R[n], m = (M = (H = l.locked) != null ? H : i == null ? void 0 : i.locked) != null ? M : !1, g = e.sortable && l.sortable, d = e.sort ? e.sort.findIndex((r) => r.field === l.field) : -1, W = d >= 0 && e.sort[d].dir || "none", h = l.columnMenu === null ? null : l.columnMenu || e.columnMenu, O = l.menuIcon || e.columnMenuIcon, T = o(
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
- c.headerTh({
45
+ s.headerTh({
46
46
  first: l.kFirst,
47
- filterable: !!h,
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: g ? V : ""
60
+ ariaDescription: h ? V : "",
61
+ ariaHasPopup: u ? "dialog" : void 0
61
62
  } : {
62
63
  role: "presentation"
63
- }, E = l.declarationIndex >= 0 ? ++x : --w, u = {
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: g && e.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: h,
86
+ columnMenu: u,
86
87
  columnMenuIcon: O
87
88
  }
88
- }, f = {
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
- }, C = G(l), S = {
97
- column: C,
97
+ }, b = P(l), S = {
98
+ column: b,
98
99
  sortable: e.sortable,
99
100
  sort: e.sort,
100
- columnMenuWrapperProps: u.columnMenuWrapperProps
101
- }, k = l.defaultHeaderCell ? l.defaultHeaderCell : F, I = [
102
- /* @__PURE__ */ t.createElement(P, { key: 1, ...S, isClient: N(k) }, /* @__PURE__ */ t.createElement(k, { ...u })),
103
- /* @__PURE__ */ t.createElement($, { key: 2, column: C })
104
- ], b = X(e.cells, l.cells);
105
- if (b && b.headerCell) {
106
- const r = b.headerCell, B = N(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
- P,
109
+ N,
109
110
  {
110
111
  key: E,
111
112
  ...S,
112
- thProps: f,
113
+ thProps: C,
113
114
  isCustom: !0,
114
115
  isClient: B
115
116
  },
116
- /* @__PURE__ */ t.createElement(r, { ...u, thProps: f, index: n }, I)
117
+ /* @__PURE__ */ t.createElement(r, { ...f, thProps: C, index: n }, H)
117
118
  );
118
119
  }
119
- return /* @__PURE__ */ t.createElement(_, { key: E, column: C }, /* @__PURE__ */ t.createElement(J, { ...f }, I));
120
- }), L = e.columns.map(G);
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(c.simpleTr({})), ariaRowIndex: n + 1 }, D(a)))
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, GridRowPinChangeEvent };
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, GridRowPinChangeEvent };
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
@@ -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: 1778599546,version:"14.5.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
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;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1778599546,
11
- version: '14.5.0-develop.9',
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": "14.5.0-develop.9",
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,21 +30,21 @@
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": "14.5.0-develop.9",
34
- "@progress/kendo-react-buttons": "14.5.0-develop.9",
35
- "@progress/kendo-react-common": "14.5.0-develop.9",
36
- "@progress/kendo-react-data-tools": "14.5.0-develop.9",
37
- "@progress/kendo-react-dateinputs": "14.5.0-develop.9",
38
- "@progress/kendo-react-indicators": "14.5.0-develop.9",
39
- "@progress/kendo-react-form": "14.5.0-develop.9",
40
- "@progress/kendo-react-labels": "14.5.0-develop.9",
41
- "@progress/kendo-react-dialogs": "14.5.0-develop.9",
42
- "@progress/kendo-react-dropdowns": "14.5.0-develop.9",
43
- "@progress/kendo-react-inputs": "14.5.0-develop.9",
44
- "@progress/kendo-react-intl": "14.5.0-develop.9",
45
- "@progress/kendo-react-popup": "14.5.0-develop.9",
46
- "@progress/kendo-react-layout": "14.5.0-develop.9",
47
- "@progress/kendo-react-conversational-ui": "14.5.0-develop.9",
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
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"
@@ -148,7 +148,7 @@
148
148
  "package": {
149
149
  "productName": "KendoReact",
150
150
  "productCode": "KENDOUIREACT",
151
- "publishDate": 1778599546,
151
+ "publishDate": 1779199650,
152
152
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
153
153
  }
154
154
  },
@@ -108,7 +108,7 @@ export interface GridAIResponseResult {
108
108
  * This is a pure function that takes the current state and AI response,
109
109
  * and returns a new state object with all the changes applied.
110
110
  *
111
- * @param response - The axios response from the AI service containing commands
111
+ * @param response - The response from the AI service containing commands
112
112
  * @param currentState - The current grid state
113
113
  * @param gridRef - Reference to grid methods (getTotal, getLeafDataItems, exportAsPdf)
114
114
  * @returns Object containing the new state, messages, and export flag
@@ -127,8 +127,12 @@ export interface GridAIResponseResult {
127
127
  * const gridRef = useRef<GridHandle>(null);
128
128
  *
129
129
  * const handleAIRequest = async (prompt: string) => {
130
- * const response = await axios.post('/api/ai/grid', { prompt, columns: gridState.columnsState });
131
- * const result = handleAIResponse(response, gridState, gridRef.current);
130
+ * const data = await fetch('/api/ai/grid', {
131
+ * method: 'POST',
132
+ * headers: { 'Content-Type': 'application/json' },
133
+ * body: JSON.stringify({ prompt, columns: gridState.columnsState })
134
+ * }).then((res) => res.json());
135
+ * const result = handleAIResponse({ data }, gridState, gridRef.current);
132
136
  *
133
137
  * // Update state with AI changes
134
138
  * setGridState(result.state);