@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.
Files changed (35) hide show
  1. package/GridClientWrapper.js +1 -1
  2. package/GridClientWrapper.mjs +84 -84
  3. package/GridWebMcpProps.d.ts +82 -0
  4. package/README.md +4 -4
  5. package/cells/datacell/utils.js +1 -1
  6. package/cells/datacell/utils.mjs +19 -13
  7. package/cells/groupcell/GridGroupCellToggle.js +1 -1
  8. package/cells/groupcell/GridGroupCellToggle.mjs +23 -23
  9. package/cells/pincell/GridPinDropdownButton.js +1 -1
  10. package/cells/pincell/GridPinDropdownButton.mjs +14 -14
  11. package/columnMenu/GridColumnMenuFilterCell.js +1 -1
  12. package/columnMenu/GridColumnMenuFilterCell.mjs +4 -4
  13. package/columnMenu/GridColumnMenuWrapper.js +1 -1
  14. package/columnMenu/GridColumnMenuWrapper.mjs +46 -46
  15. package/contextMenu/GridContextMenu.js +1 -1
  16. package/contextMenu/GridContextMenu.mjs +44 -44
  17. package/dist/cdn/js/kendo-react-grid.js +1 -1
  18. package/filterCommon.d.ts +1 -1
  19. package/filterCommon.js +1 -1
  20. package/filterCommon.mjs +56 -58
  21. package/header/HeaderRow.js +1 -1
  22. package/header/HeaderRow.mjs +30 -29
  23. package/index.d.mts +3 -1
  24. package/index.d.ts +3 -1
  25. package/interfaces/GridProps.d.ts +22 -0
  26. package/package-metadata.js +1 -1
  27. package/package-metadata.mjs +2 -2
  28. package/package.json +23 -18
  29. package/toolbar-tools/smartbox/SmartBox.js +1 -1
  30. package/toolbar-tools/smartbox/SmartBox.mjs +1 -1
  31. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.js +1 -1
  32. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.mjs +7 -7
  33. package/toolbar-tools/smartbox/listItemRenders.js +1 -1
  34. package/toolbar-tools/smartbox/listItemRenders.mjs +1 -1
  35. package/utils/handleAIResponse.d.ts +7 -3
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),h=require("@progress/kendo-react-intl"),x=require("@progress/kendo-svg-icons"),a=require("../../../messages/index.js");function D(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const l=D(S);function M({selectedView:o,searchModeEnabled:r,semanticSearchModeEnabled:s,promptSuggestions:i,currentHistory:p,currentHistorySettings:e}){const t=h.useLocalization(),u=h.useInternationalization(),g=t.toLanguageString(a.smartBoxSuggestedPrompts,a.messages[a.smartBoxSuggestedPrompts]),n=o==="aiAssistant"?t.toLanguageString(a.smartBoxPreviouslyAsked,a.messages[a.smartBoxPreviouslyAsked]):t.toLanguageString(a.smartBoxPreviouslySearched,a.messages[a.smartBoxPreviouslySearched]),f=l.useMemo(()=>r&&s?[{text:t.toLanguageString(a.smartBoxSearchModeText,a.messages[a.smartBoxSearchModeText]),description:t.toLanguageString(a.smartBoxSearchModeDescription,a.messages[a.smartBoxSearchModeDescription]),selected:o==="search",mode:"search"},{text:t.toLanguageString(a.smartBoxSemanticSearchModeText,a.messages[a.smartBoxSemanticSearchModeText]),description:t.toLanguageString(a.smartBoxSemanticSearchModeDescription,a.messages[a.smartBoxSemanticSearchModeDescription]),selected:o==="semanticSearch",mode:"semanticSearch"}]:[],[r,s,o,t]),B=l.useMemo(()=>{const m=[];return i.forEach((c,d)=>{m.push({id:`suggestion-${d}`,text:c,group:g,groupSvgIcon:x.lightbulbOutlineIcon,isHistoryItem:!1})}),p.forEach((c,d)=>{m.push({id:`history-${d}`,text:c.text,description:u.formatDate(c.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:c.timestamp})}),m},[i,p,g,n,u,e==null?void 0:e.timestampFormat]),L=l.useMemo(()=>p.map((m,c)=>({id:`history-${c}`,text:m.text,description:u.formatDate(m.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:m.timestamp})),[p,n,u,e==null?void 0:e.timestampFormat]);return{searchListData:f,aiAssistantListData:B,searchHistoryListData:L,suggestedPromptsLabel:g,historyLabel:n}}exports.useSmartBoxListData=M;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),h=require("@progress/kendo-react-intl"),x=require("@progress/kendo-svg-icons"),a=require("../../../messages/index.js");function D(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const l=D(S);function M({selectedView:o,searchModeEnabled:r,semanticSearchModeEnabled:s,promptSuggestions:i,currentHistory:p,currentHistorySettings:e}){const t=h.useLocalization(),g=h.useInternationalization(),u=t.toLanguageString(a.smartBoxSuggestedPrompts,a.messages[a.smartBoxSuggestedPrompts]),n=o==="aiAssistant"?t.toLanguageString(a.smartBoxPreviouslyAsked,a.messages[a.smartBoxPreviouslyAsked]):t.toLanguageString(a.smartBoxPreviouslySearched,a.messages[a.smartBoxPreviouslySearched]),f=l.useMemo(()=>r&&s?[{text:t.toLanguageString(a.smartBoxSearchModeText,a.messages[a.smartBoxSearchModeText]),description:t.toLanguageString(a.smartBoxSearchModeDescription,a.messages[a.smartBoxSearchModeDescription]),selected:o==="search",mode:"search"},{text:t.toLanguageString(a.smartBoxSemanticSearchModeText,a.messages[a.smartBoxSemanticSearchModeText]),description:t.toLanguageString(a.smartBoxSemanticSearchModeDescription,a.messages[a.smartBoxSemanticSearchModeDescription]),selected:o==="semanticSearch",mode:"semanticSearch"}]:[],[r,s,o,t]),B=l.useMemo(()=>{const m=[];return i.forEach((c,d)=>{m.push({id:`suggestion-${d}`,text:c,group:u,groupSvgIcon:x.lightbulbIcon,isHistoryItem:!1})}),p.forEach((c,d)=>{m.push({id:`history-${d}`,text:c.text,description:g.formatDate(c.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:c.timestamp})}),m},[i,p,u,n,g,e==null?void 0:e.timestampFormat]),L=l.useMemo(()=>p.map((m,c)=>({id:`history-${c}`,text:m.text,description:g.formatDate(m.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:m.timestamp})),[p,n,g,e==null?void 0:e.timestampFormat]);return{searchListData:f,aiAssistantListData:B,searchHistoryListData:L,suggestedPromptsLabel:u,historyLabel:n}}exports.useSmartBoxListData=M;
@@ -8,13 +8,13 @@
8
8
  "use client";
9
9
  import * as L from "react";
10
10
  import { useLocalization as P, useInternationalization as z } from "@progress/kendo-react-intl";
11
- import { lightbulbOutlineIcon as $, clockArrowRotateIcon as f } from "@progress/kendo-svg-icons";
11
+ import { lightbulbIcon as $, clockArrowRotateIcon as f } from "@progress/kendo-svg-icons";
12
12
  import { smartBoxSuggestedPrompts as l, messages as e, smartBoxPreviouslyAsked as n, smartBoxPreviouslySearched as r, smartBoxSearchModeDescription as B, smartBoxSearchModeText as D, smartBoxSemanticSearchModeDescription as v, smartBoxSemanticSearchModeText as I } from "../../../messages/index.mjs";
13
13
  function T({
14
14
  selectedView: p,
15
15
  searchModeEnabled: h,
16
- semanticSearchModeEnabled: u,
17
- promptSuggestions: d,
16
+ semanticSearchModeEnabled: d,
17
+ promptSuggestions: u,
18
18
  currentHistory: i,
19
19
  currentHistorySettings: a
20
20
  }) {
@@ -27,7 +27,7 @@ function T({
27
27
  ) : o.toLanguageString(
28
28
  r,
29
29
  e[r]
30
- ), M = L.useMemo(() => h && u ? [
30
+ ), M = L.useMemo(() => h && d ? [
31
31
  {
32
32
  text: o.toLanguageString(
33
33
  D,
@@ -52,9 +52,9 @@ function T({
52
52
  selected: p === "semanticSearch",
53
53
  mode: "semanticSearch"
54
54
  }
55
- ] : [], [h, u, p, o]), A = L.useMemo(() => {
55
+ ] : [], [h, d, p, o]), A = L.useMemo(() => {
56
56
  const m = [];
57
- return d.forEach((t, c) => {
57
+ return u.forEach((t, c) => {
58
58
  m.push({
59
59
  id: `suggestion-${c}`,
60
60
  text: t,
@@ -74,7 +74,7 @@ function T({
74
74
  });
75
75
  }), m;
76
76
  }, [
77
- d,
77
+ u,
78
78
  i,
79
79
  g,
80
80
  s,
@@ -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 u=require("react"),c=require("@progress/kendo-react-common"),i=require("@progress/kendo-svg-icons"),p=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function d(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const e=d(u);function g({historyItemRender:t,promptSuggestionRender:a,handleListItemClick:n}){return(s,l)=>{const r=l.dataItem;return r.isHistoryItem&&t?t({text:r.text,timestamp:r.timestamp},()=>n(r.text)):!r.isHistoryItem&&a?a(r.text,()=>n(r.text)):e.cloneElement(s,{...s.props,title:r.text,onMouseDown:m=>m.preventDefault()},e.createElement(e.Fragment,null,e.createElement("span",{className:"k-list-item-text"},r.text),r.description&&e.createElement("span",{className:"k-list-item-description"},r.description)))}}function x(t,a){const n=a.dataItem;return e.cloneElement(t,{...t.props,onMouseDown:s=>s.preventDefault()},e.createElement(e.Fragment,null,n.selected&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon k-smart-box-check-icon",icon:i.checkIcon})),e.createElement("span",{className:"k-list-item-text"},n.text),e.createElement("span",{className:"k-list-item-description"},n.description)))}function f(t,a){const n=a.groupItem,s=n==null?void 0:n.groupSvgIcon;return e.cloneElement(t,t.props,e.createElement(e.Fragment,null,s&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon",icon:s})),e.createElement("span",{className:"k-list-item-text"},a.group)))}function k({selectedView:t}){const a=p.useLocalization();return e.createElement("span",{className:"k-no-data k-smart-box-no-data"},e.createElement(c.IconWrap,{icon:i.fileClockOutlineIcon,size:"xxxlarge"}),e.createElement("span",null,t==="aiAssistant"?a.toLanguageString(o.smartBoxNoPreviousPrompts,o.messages[o.smartBoxNoPreviousPrompts]):a.toLanguageString(o.smartBoxNoPreviousSearches,o.messages[o.smartBoxNoPreviousSearches])))}exports.NoDataRender=k;exports.createListItemRender=g;exports.listGroupHeaderRender=f;exports.searchModeItemRender=x;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),c=require("@progress/kendo-react-common"),i=require("@progress/kendo-svg-icons"),p=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function d(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const e=d(u);function g({historyItemRender:t,promptSuggestionRender:a,handleListItemClick:n}){return(s,l)=>{const r=l.dataItem;return r.isHistoryItem&&t?t({text:r.text,timestamp:r.timestamp},()=>n(r.text)):!r.isHistoryItem&&a?a(r.text,()=>n(r.text)):e.cloneElement(s,{...s.props,title:r.text,onMouseDown:m=>m.preventDefault()},e.createElement(e.Fragment,null,e.createElement("span",{className:"k-list-item-text"},r.text),r.description&&e.createElement("span",{className:"k-list-item-description"},r.description)))}}function x(t,a){const n=a.dataItem;return e.cloneElement(t,{...t.props,onMouseDown:s=>s.preventDefault()},e.createElement(e.Fragment,null,n.selected&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon k-smart-box-check-icon",icon:i.checkIcon})),e.createElement("span",{className:"k-list-item-text"},n.text),e.createElement("span",{className:"k-list-item-description"},n.description)))}function f(t,a){const n=a.groupItem,s=n==null?void 0:n.groupSvgIcon;return e.cloneElement(t,t.props,e.createElement(e.Fragment,null,s&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon",icon:s})),e.createElement("span",{className:"k-list-item-text"},a.group)))}function k({selectedView:t}){const a=p.useLocalization();return e.createElement("span",{className:"k-no-data k-smart-box-no-data"},e.createElement(c.IconWrap,{icon:i.fileClockIcon,size:"xxxlarge"}),e.createElement("span",null,t==="aiAssistant"?a.toLanguageString(o.smartBoxNoPreviousPrompts,o.messages[o.smartBoxNoPreviousPrompts]):a.toLanguageString(o.smartBoxNoPreviousSearches,o.messages[o.smartBoxNoPreviousSearches])))}exports.NoDataRender=k;exports.createListItemRender=g;exports.listGroupHeaderRender=f;exports.searchModeItemRender=x;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as e from "react";
9
9
  import { IconWrap as o } from "@progress/kendo-react-common";
10
- import { checkIcon as u, fileClockOutlineIcon as x } from "@progress/kendo-svg-icons";
10
+ import { checkIcon as u, fileClockIcon as x } from "@progress/kendo-svg-icons";
11
11
  import { useLocalization as E } from "@progress/kendo-react-intl";
12
12
  import { smartBoxNoPreviousPrompts as c, messages as m, smartBoxNoPreviousSearches as i } from "../../messages/index.mjs";
13
13
  function g({
@@ -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);