@progress/kendo-react-grid 13.4.0-develop.5 → 14.0.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/BaseCSVExport.d.ts +31 -0
  2. package/BaseCSVExport.js +8 -0
  3. package/BaseCSVExport.mjs +82 -0
  4. package/Grid.d.ts +33 -0
  5. package/GridClientWrapper.js +1 -1
  6. package/GridClientWrapper.mjs +313 -289
  7. package/GridComponent.js +1 -1
  8. package/GridComponent.mjs +247 -252
  9. package/GridCsvExportButton.d.ts +13 -0
  10. package/GridCsvExportButton.js +8 -0
  11. package/GridCsvExportButton.mjs +35 -0
  12. package/columnMenu/GridColumnMenuFilter.mjs +2 -2
  13. package/columnMenu/adaptiveContent/GridAdaptiveColumnMenu.js +1 -1
  14. package/columnMenu/adaptiveContent/GridAdaptiveColumnMenu.mjs +4 -4
  15. package/components/noRecords/GridNoRecordsContainer.mjs +1 -1
  16. package/constants/index.mjs +2 -2
  17. package/dist/cdn/js/kendo-react-grid.js +1 -1
  18. package/hooks/index.d.ts +8 -0
  19. package/hooks/useGridAIRequest.d.ts +150 -0
  20. package/hooks/useGridAIRequest.js +8 -0
  21. package/hooks/useGridAIRequest.mjs +93 -0
  22. package/index.d.mts +5 -2
  23. package/index.d.ts +5 -2
  24. package/index.js +1 -1
  25. package/index.mjs +71 -63
  26. package/interfaces/GridProps.d.ts +81 -0
  27. package/messages/index.d.ts +80 -0
  28. package/messages/index.js +2 -2
  29. package/messages/index.mjs +126 -94
  30. package/package-metadata.js +1 -1
  31. package/package-metadata.mjs +1 -1
  32. package/package.json +19 -19
  33. package/toolbar-tools/GridToolbarAIAssistant.d.ts +2 -34
  34. package/toolbar-tools/GridToolbarAIAssistant.js +2 -2
  35. package/toolbar-tools/GridToolbarAIAssistant.mjs +167 -164
  36. package/toolbar-tools/GridToolbarFilter.mjs +5 -5
  37. package/toolbar-tools/smartbox/SegmentedControl.d.ts +13 -0
  38. package/toolbar-tools/smartbox/SegmentedControl.js +8 -0
  39. package/toolbar-tools/smartbox/SegmentedControl.mjs +109 -0
  40. package/toolbar-tools/smartbox/SmartBox.d.ts +20 -0
  41. package/toolbar-tools/smartbox/SmartBox.js +8 -0
  42. package/toolbar-tools/smartbox/SmartBox.mjs +380 -0
  43. package/toolbar-tools/smartbox/defaultConfigs.d.ts +30 -0
  44. package/toolbar-tools/smartbox/defaultConfigs.js +8 -0
  45. package/toolbar-tools/smartbox/defaultConfigs.mjs +36 -0
  46. package/toolbar-tools/smartbox/hooks/index.d.ts +17 -0
  47. package/toolbar-tools/smartbox/hooks/useDebounce.d.ts +11 -0
  48. package/toolbar-tools/smartbox/hooks/useDebounce.js +9 -0
  49. package/toolbar-tools/smartbox/hooks/useDebounce.mjs +21 -0
  50. package/toolbar-tools/smartbox/hooks/useSmartBoxGridState.d.ts +245 -0
  51. package/toolbar-tools/smartbox/hooks/useSmartBoxGridState.js +9 -0
  52. package/toolbar-tools/smartbox/hooks/useSmartBoxGridState.mjs +54 -0
  53. package/toolbar-tools/smartbox/hooks/useSmartBoxHistory.d.ts +80 -0
  54. package/toolbar-tools/smartbox/hooks/useSmartBoxHistory.js +9 -0
  55. package/toolbar-tools/smartbox/hooks/useSmartBoxHistory.mjs +66 -0
  56. package/toolbar-tools/smartbox/hooks/useSmartBoxInput.d.ts +96 -0
  57. package/toolbar-tools/smartbox/hooks/useSmartBoxLabels.d.ts +93 -0
  58. package/toolbar-tools/smartbox/hooks/useSmartBoxLabels.js +9 -0
  59. package/toolbar-tools/smartbox/hooks/useSmartBoxLabels.mjs +61 -0
  60. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.d.ts +163 -0
  61. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.js +9 -0
  62. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.mjs +102 -0
  63. package/toolbar-tools/smartbox/hooks/useSmartBoxModes.d.ts +115 -0
  64. package/toolbar-tools/smartbox/hooks/useSmartBoxModes.js +9 -0
  65. package/toolbar-tools/smartbox/hooks/useSmartBoxModes.mjs +65 -0
  66. package/toolbar-tools/smartbox/hooks/useSmartBoxPopup.d.ts +56 -0
  67. package/toolbar-tools/smartbox/hooks/useSmartBoxPopup.js +9 -0
  68. package/toolbar-tools/smartbox/hooks/useSmartBoxPopup.mjs +25 -0
  69. package/toolbar-tools/smartbox/hooks/useSmartBoxSearch.d.ts +82 -0
  70. package/toolbar-tools/smartbox/hooks/useSmartBoxSearch.js +9 -0
  71. package/toolbar-tools/smartbox/hooks/useSmartBoxSearch.mjs +67 -0
  72. package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.d.ts +70 -0
  73. package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.js +9 -0
  74. package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.mjs +57 -0
  75. package/toolbar-tools/smartbox/index.d.ts +10 -0
  76. package/toolbar-tools/smartbox/interfaces/SearchTypes.d.ts +45 -0
  77. package/toolbar-tools/smartbox/interfaces/SegmentedControlTypes.d.ts +66 -0
  78. package/toolbar-tools/smartbox/interfaces/SmartBoxTypes.d.ts +461 -0
  79. package/toolbar-tools/smartbox/interfaces/index.d.ts +11 -0
  80. package/toolbar-tools/smartbox/interfaces/utilTypes.d.ts +25 -0
  81. package/toolbar-tools/smartbox/listItemRenders.d.ts +165 -0
  82. package/toolbar-tools/smartbox/listItemRenders.js +8 -0
  83. package/toolbar-tools/smartbox/listItemRenders.mjs +68 -0
  84. package/toolbar-tools/smartbox/utils.d.ts +14 -0
  85. package/toolbar-tools/smartbox/utils.js +8 -0
  86. package/toolbar-tools/smartbox/utils.mjs +14 -0
  87. package/utils/dataProcessing.d.ts +67 -0
  88. package/utils/dataProcessing.js +8 -0
  89. package/utils/dataProcessing.mjs +49 -0
@@ -11,6 +11,7 @@ import { AxiosResponse, AxiosRequestConfig } from 'axios';
11
11
  import { CustomComponent } from '@progress/kendo-react-common';
12
12
  import { AIPromptOutputInterface } from '@progress/kendo-react-conversational-ui';
13
13
  import { GridAIPromptProps } from './ai-tool/GridAIPrompt.js';
14
+ import { GridAIRequestData } from '../hooks/useGridAIRequest.js';
14
15
  import * as React from 'react';
15
16
  /**
16
17
  * Represents the handle interface for the GridToolbarAIAssistant component.
@@ -28,37 +29,7 @@ export interface GridToolbarAIAssistantHandle {
28
29
  /**
29
30
  * Represents the request data structure for the GridToolbarAIAssistant component.
30
31
  */
31
- export interface GridToolbarAIAssistantRequestData {
32
- /**
33
- * The role or context for the AI request.
34
- */
35
- role: string;
36
- /**
37
- * The array of column definitions with their field names.
38
- */
39
- columns: Array<{
40
- field: string;
41
- }>;
42
- /**
43
- * The headers object containing key-value pairs for the request.
44
- */
45
- headers: Record<string, string>;
46
- /**
47
- * The prompt message sent to the AI assistant.
48
- */
49
- promptMessage: string;
50
- /**
51
- * The request configuration options for the HTTP request.
52
- */
53
- requestOptions: {
54
- url?: string;
55
- method?: string;
56
- withCredentials?: boolean;
57
- responseType?: string;
58
- cancelToken?: any;
59
- [key: string]: any;
60
- };
61
- }
32
+ export type GridToolbarAIAssistantRequestData = GridAIRequestData;
62
33
  /**
63
34
  * Represents the props interface for the GridToolbarAIAssistant component.
64
35
  * This component provides AI-powered functionality for grid operations through natural language prompts.
@@ -239,8 +210,5 @@ export interface GridToolbarAIAssistantProps {
239
210
  */
240
211
  onCloseWindow?: () => void;
241
212
  }
242
- /**
243
- * Represents the GridToolbarAIAssistant component.
244
- */
245
213
  declare const GridToolbarAIAssistant: React.ForwardRefExoticComponent<GridToolbarAIAssistantProps & React.RefAttributes<GridToolbarAIAssistantHandle>>;
246
214
  export { GridToolbarAIAssistant };
@@ -5,5 +5,5 @@
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 ue=require("react"),de=require("../utils/GridContext.js"),pe=require("@progress/kendo-react-buttons"),ge=require("@progress/kendo-svg-icons"),v=require("axios"),fe=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),E=require("@progress/kendo-react-common"),me=require("@progress/kendo-react-dialogs"),he=require("./ai-tool/GridAIPrompt.js"),Ce=require("../utils/handleAIResponse.js");function Se(i){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(u,e,c.get?c:{enumerable:!0,get:()=>i[e]})}}return u.default=i,Object.freeze(u)}const n=Se(ue),L=768,Ie=(i,u)=>i.map(c=>{let p=c;return u.forEach(d=>{d.field&&p.includes(d.field)&&(p=p.replace(new RegExp(d.field,"g"),d.title||d.field))}),p}),be=()=>null,j=n.forwardRef((i,u)=>{const e=n.useContext(de.GridContext),c=fe.useLocalization(),{requestUrl:p,requestOptions:d,onPromptRequest:y,onResponseSuccess:P,onResponseError:b,role:D="user",gridAIPrompt:B=he.GridAIPrompt,icon:x,svgIcon:G,onCloseWindow:k,promptPlaceHolder:M,suggestionsList:z,streaming:N,loading:H,outputs:K,enableSpeechToText:_}=i,[A,O]=n.useState([]),F=n.useMemo(()=>e&&Array.isArray(e.columnsRef)&&Array.isArray(e.hiddenColumnsRef)?[...e.columnsRef,...e.hiddenColumnsRef].map(t=>{var o;return{id:t.id,field:t.field,values:(o=t.values)!=null?o:[]}}):[],[e]),[U,f]=n.useState(!1),[X,m]=n.useState(!1),[R,w]=n.useState(!1),[Y,$]=n.useState(),[J,Q]=n.useState(),[q,V]=n.useState(()=>{const t=window.innerWidth;return t<L?t*.8:560}),g=n.useRef(null),T=n.useRef(null),Z=t=>{t.preventDefault(),w(!R)},h=n.useMemo(()=>{var t;return(t=i.show)!=null?t:R},[i.show,R]),C=n.useCallback(()=>{var t;k&&k(),O([]),w(!1),g.current&&((t=g.current.element)==null||t.focus())},[k]),ee=(t,o,l)=>{const a=[c.toLanguageString(r.aIResponseData,r.messages[r.aIResponseData])],s=Ie([t],e.columnsRef).join(`
9
- `);O([{id:A.length+1,title:c.toLanguageString(r.generatedWithAI,r.messages[r.generatedWithAI]),subTitle:o,prompt:o,responseContent:a.concat(s).join(""),isRetry:l},...A])},te=(t,o,l)=>{var S,I;f(!1),m(!1);const a={getTotal:()=>e.getTotal(),getLeafDataItems:()=>e.getLeafDataItems(),exportAsPdf:()=>e.exportAsPdf(),props:{dataItemKey:e.dataItemKey}},s=Ce.handleAIResponse(t,e,a);s.state.sort!==e.sort&&e.sortChange(s.state.sort,t),s.state.filter!==e.filter&&e.filterChange(s.state.filter,t),s.state.group!==e.group&&e.groupChange(s.state.group,t),s.state.highlight!==e.highlight&&e.applyHighlightDescriptor(s.state.highlight),s.state.select!==e.select&&e.applySelectionDescriptor(s.state.select),s.state.columnsState!==e.columnsState&&e.onColumnsStateChange(s.state.columnsState),(s.state.skip!==e.skip||s.state.take!==e.take)&&e.pagerPageChange({skip:(S=s.state.skip)!=null?S:0,take:(I=s.state.take)!=null?I:0,syntheticEvent:t}),s.shouldExportPdf&&e.exportAsPdf(),s.messages.length>0&&s.messages.forEach(ce=>{ee(ce,o,l)}),P&&P(t,o,l)},se=t=>{b==null||b(t),f(!1),m(!1)},ne=(t,o)=>{const l=v.CancelToken.source(),a={role:D||"user",columns:F||[],headers:{Accept:"*/*","Content-Type":"application/json"},promptMessage:t,requestOptions:{url:p,method:"POST",withCredentials:!1,responseType:"json",cancelToken:l.token,...d}};if(y&&y(a,o),a.requestOptions.url!==void 0){f(!0),m(!0);const{url:s,...S}=a.requestOptions;s&&(v(s,{...S,headers:a.headers,data:{columns:a.columns,contents:[{text:a.promptMessage}]},responseType:"json"}).then(I=>te(I,a.promptMessage,o)).catch(se),T.current=l)}},oe=n.useCallback(()=>{T.current&&T.current.cancel("Request cancelled by user."),f(!1),m(!1)},[]),[ae,W]=E.useCustomComponent(B),re=Object.keys(W).length>0?W:{},ie=n.createElement(ae,{onPromptRequest:ne,onCancel:oe,onClose:C,streaming:N||U,loading:H||X,outputs:K||A,promptPlaceHolder:M,suggestionsList:z,enableSpeechToText:_,...re}),le=n.createElement(pe.Button,{ref:g,togglable:!0,themeColor:"primary",rounded:"full",selected:h,svgIcon:G||(x?void 0:ge.sparklesIcon),icon:x,size:e.mobileMode?"large":"medium",className:E.classNames("k-toolbar-button",{"k-icon-button":e.mobileMode}),title:c.toLanguageString(r.toolbarAI,r.messages[r.toolbarAI]),onClick:Z});return n.useEffect(()=>{var t;if(g.current&&h){const o=(t=g.current.element)==null?void 0:t.getBoundingClientRect();if(o){$(o.top+window.scrollY+o.height),Q(o.left+window.scrollX+o.width);const l=window.innerWidth,a=l<L?l*.75:560;V(a)}}},[h]),n.useImperativeHandle(u,()=>({show:()=>w(!0),hide:()=>C()}),[C]),n.createElement(n.Fragment,null,le,h&&n.createElement(me.Window,{key:q,autoFocus:!1,title:c.toLanguageString(r.toolbarAI,r.messages[r.toolbarAI]),initialTop:Y,initialLeft:J,initialWidth:q,style:{height:"auto",minWidth:"90px",minHeight:"50px"},onClose:C,resizable:!0,draggable:!0,className:"k-grid-assistant-window",maximizeButton:be},ie))});j.displayName="KendoReactGridToolbarAIAssistant";exports.GridToolbarAIAssistant=j;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ae=require("react"),le=require("../utils/GridContext.js"),ue=require("@progress/kendo-react-buttons"),ce=require("@progress/kendo-svg-icons"),de=require("@progress/kendo-react-intl"),n=require("../messages/index.js"),y=require("@progress/kendo-react-common"),ge=require("@progress/kendo-react-dialogs"),pe=require("./ai-tool/GridAIPrompt.js"),me=require("../hooks/useGridAIRequest.js");function fe(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(a,e,i.get?i:{enumerable:!0,get:()=>r[e]})}}return a.default=r,Object.freeze(a)}const o=fe(ae),P=768,he=(r,a)=>r.map(i=>{let c=i;return a.forEach(l=>{l.field&&c.includes(l.field)&&(c=c.replace(new RegExp(l.field,"g"),l.title||l.field))}),c}),Ce=()=>null,q=o.forwardRef((r,a)=>{const e=o.useContext(le.GridContext),i=de.useLocalization(),{requestUrl:c,requestOptions:l,onPromptRequest:v,onResponseSuccess:x,onResponseError:T,role:E="user",gridAIPrompt:W=pe.GridAIPrompt,icon:k,svgIcon:O,onCloseWindow:m,promptPlaceHolder:L,suggestionsList:M,streaming:B,loading:D,outputs:G,enableSpeechToText:S}=r,[j,I]=o.useState([]),z=o.useMemo(()=>e&&Array.isArray(e.columnsRef)&&Array.isArray(e.hiddenColumnsRef)?[...e.columnsRef,...e.hiddenColumnsRef].map(t=>{var s;return{id:t.id,field:t.field,values:(s=t.values)!=null?s:[]}}):[],[e]),N=o.useMemo(()=>({sort:e.sort,filter:e.filter,group:e.group,highlight:e.highlight,select:e.select,columnsState:e.columnsState,skip:e.skip,take:e.take}),[e]),H=o.useMemo(()=>({getTotal:()=>e.getTotal(),getLeafDataItems:()=>e.getLeafDataItems(),exportAsPdf:()=>e.exportAsPdf(),props:{dataItemKey:e.dataItemKey}}),[e]),[f,h]=o.useState(!1),[K,_]=o.useState(),[F,w]=o.useState(),[b,U]=o.useState(()=>{const t=window.innerWidth;return t<P?t*.8:560}),d=o.useRef(null),X=o.useCallback(t=>{var s,u;t.sort!==void 0&&t.sort!==e.sort&&e.sortChange(t.sort,{}),t.filter!==e.filter&&e.filterChange(t.filter,{}),t.group!==void 0&&t.group!==e.group&&e.groupChange(t.group,{}),t.highlight!==void 0&&t.highlight!==e.highlight&&e.applyHighlightDescriptor(t.highlight),t.select!==void 0&&t.select!==e.select&&e.applySelectionDescriptor(t.select),t.columnsState!==void 0&&t.columnsState!==e.columnsState&&e.onColumnsStateChange(t.columnsState),(t.skip!==void 0&&t.skip!==e.skip||t.take!==void 0&&t.take!==e.take)&&e.pagerPageChange({skip:(s=t.skip)!=null?s:0,take:(u=t.take)!=null?u:0,syntheticEvent:{}})},[e]),Y=o.useCallback((t,s,u)=>{const C=[i.toLanguageString(n.aIResponseData,n.messages[n.aIResponseData])];t.forEach(re=>{const ie=he([re],e.columnsRef).join(`
9
+ `);I(A=>[{id:A.length+1,title:i.toLanguageString(n.generatedWithAI,n.messages[n.generatedWithAI]),subTitle:s,prompt:s,responseContent:C.concat(ie).join(""),isRetry:u},...A])})},[i,e.columnsRef]),$=o.useCallback(()=>{e.exportAsPdf()},[e]),{loading:J,streaming:Q,sendRequest:V,cancelRequest:Z}=me.useGridAIRequest({requestUrl:c,requestOptions:l,role:E,columns:z,gridState:N,gridRef:H,onPromptRequest:v,onResponseSuccess:x,onResponseError:T,onStateChange:X,onMessages:Y,onExportPdf:$}),ee=t=>{t.preventDefault(),h(!f)},g=o.useMemo(()=>{var t;return(t=r.show)!=null?t:f},[r.show,f]),p=o.useCallback(()=>{var t;m&&m(),I([]),h(!1),d.current&&((t=d.current.element)==null||t.focus())},[m]),[te,R]=y.useCustomComponent(W),oe=Object.keys(R).length>0?R:{},se=o.createElement(te,{onPromptRequest:V,onCancel:Z,onClose:p,streaming:B||Q,loading:D||J,outputs:G||j,promptPlaceHolder:L,suggestionsList:M,enableSpeechToText:S,...oe}),ne=o.createElement(ue.Button,{ref:d,togglable:!0,themeColor:"primary",rounded:"full",selected:g,svgIcon:O||(k?void 0:ce.sparklesIcon),icon:k,size:e.mobileMode?"large":"medium",className:y.classNames("k-toolbar-button",{"k-icon-button":e.mobileMode}),title:i.toLanguageString(n.toolbarAI,n.messages[n.toolbarAI]),onClick:ee});return o.useEffect(()=>{var t;if(d.current&&g){const s=(t=d.current.element)==null?void 0:t.getBoundingClientRect();if(s){_(s.top+window.scrollY+s.height),w(s.left+window.scrollX+s.width);const u=window.innerWidth,C=u<P?u*.75:560;U(C)}}},[g]),o.useImperativeHandle(a,()=>({show:()=>h(!0),hide:()=>p()}),[p]),o.createElement(o.Fragment,null,ne,g&&o.createElement(ge.Window,{key:b,autoFocus:!1,title:i.toLanguageString(n.toolbarAI,n.messages[n.toolbarAI]),initialTop:K,initialLeft:F,initialWidth:b,style:{height:"auto",minWidth:"90px",minHeight:"50px"},onClose:p,resizable:!0,draggable:!0,className:"k-grid-assistant-window",maximizeButton:Ce},se))});q.displayName="KendoReactGridToolbarAIAssistant";exports.GridToolbarAIAssistant=q;
@@ -6,200 +6,203 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as o from "react";
9
- import { GridContext as de } from "../utils/GridContext.mjs";
10
- import { Button as pe } from "@progress/kendo-react-buttons";
11
- import { sparklesIcon as me } from "@progress/kendo-svg-icons";
12
- import v from "axios";
13
- import { useLocalization as fe } from "@progress/kendo-react-intl";
14
- import { toolbarAI as S, messages as k, aIResponseData as B, generatedWithAI as D } from "../messages/index.mjs";
15
- import { useCustomComponent as ge, classNames as he } from "@progress/kendo-react-common";
16
- import { Window as Ce } from "@progress/kendo-react-dialogs";
17
- import { GridAIPrompt as Se } from "./ai-tool/GridAIPrompt.mjs";
18
- import { handleAIResponse as ke } from "../utils/handleAIResponse.mjs";
19
- const M = 768, we = (u, w) => u.map((l) => {
20
- let c = l;
21
- return w.forEach((i) => {
22
- i.field && c.includes(i.field) && (c = c.replace(new RegExp(i.field, "g"), i.title || i.field));
23
- }), c;
24
- }), Ie = () => null, Ae = o.forwardRef(
25
- (u, w) => {
26
- const e = o.useContext(de), l = fe(), {
27
- requestUrl: c,
28
- requestOptions: i,
29
- onPromptRequest: y,
30
- onResponseSuccess: P,
31
- onResponseError: I,
32
- role: j = "user",
33
- gridAIPrompt: z = Se,
34
- icon: E,
35
- svgIcon: G,
36
- onCloseWindow: A,
37
- promptPlaceHolder: N,
38
- suggestionsList: q,
39
- streaming: H,
40
- loading: K,
41
- outputs: F,
42
- enableSpeechToText: U
43
- } = u, [R, L] = o.useState([]), X = o.useMemo(() => e && Array.isArray(e.columnsRef) && Array.isArray(e.hiddenColumnsRef) ? [...e.columnsRef, ...e.hiddenColumnsRef].map((t) => {
44
- var n;
9
+ import { GridContext as at } from "../utils/GridContext.mjs";
10
+ import { Button as ut } from "@progress/kendo-react-buttons";
11
+ import { sparklesIcon as ct } from "@progress/kendo-svg-icons";
12
+ import { useLocalization as dt } from "@progress/kendo-react-intl";
13
+ import { aIResponseData as x, messages as m, generatedWithAI as y, toolbarAI as g } from "../messages/index.mjs";
14
+ import { useCustomComponent as mt, classNames as gt } from "@progress/kendo-react-common";
15
+ import { Window as pt } from "@progress/kendo-react-dialogs";
16
+ import { GridAIPrompt as ft } from "./ai-tool/GridAIPrompt.mjs";
17
+ import { useGridAIRequest as ht } from "../hooks/useGridAIRequest.mjs";
18
+ const E = 768, Ct = (a, p) => a.map((i) => {
19
+ let l = i;
20
+ return p.forEach((n) => {
21
+ n.field && l.includes(n.field) && (l = l.replace(new RegExp(n.field, "g"), n.title || n.field));
22
+ }), l;
23
+ }), kt = () => null, It = o.forwardRef(
24
+ (a, p) => {
25
+ const t = o.useContext(at), i = dt(), {
26
+ requestUrl: l,
27
+ requestOptions: n,
28
+ onPromptRequest: v,
29
+ onResponseSuccess: T,
30
+ onResponseError: W,
31
+ role: L = "user",
32
+ gridAIPrompt: B = ft,
33
+ icon: I,
34
+ svgIcon: M,
35
+ onCloseWindow: f,
36
+ promptPlaceHolder: q,
37
+ suggestionsList: O,
38
+ streaming: z,
39
+ loading: D,
40
+ outputs: G,
41
+ enableSpeechToText: N
42
+ } = a, [S, R] = o.useState([]), H = o.useMemo(() => t && Array.isArray(t.columnsRef) && Array.isArray(t.hiddenColumnsRef) ? [...t.columnsRef, ...t.hiddenColumnsRef].map((e) => {
43
+ var s;
45
44
  return {
46
- id: t.id,
47
- field: t.field,
48
- values: (n = t.values) != null ? n : []
45
+ id: e.id,
46
+ field: e.field,
47
+ values: (s = e.values) != null ? s : []
49
48
  };
50
- }) : [], [e]), [Y, p] = o.useState(!1), [_, m] = o.useState(!1), [T, b] = o.useState(!1), [$, J] = o.useState(), [Q, V] = o.useState(), [W, Z] = o.useState(() => {
51
- const t = window.innerWidth;
52
- return t < M ? t * 0.8 : 560;
53
- }), d = o.useRef(null), x = o.useRef(null), ee = (t) => {
54
- t.preventDefault(), b(!T);
55
- }, f = o.useMemo(() => {
56
- var t;
57
- return (t = u.show) != null ? t : T;
58
- }, [u.show, T]), g = o.useCallback(() => {
59
- var t;
60
- A && A(), L([]), b(!1), d.current && ((t = d.current.element) == null || t.focus());
61
- }, [A]), te = (t, n, r) => {
62
- const a = [l.toLanguageString(B, k[B])], s = we([t], e.columnsRef).join(`
63
- `);
64
- L([
65
- {
66
- id: R.length + 1,
67
- title: l.toLanguageString(D, k[D]),
68
- subTitle: n,
69
- prompt: n,
70
- responseContent: a.concat(s).join(""),
71
- isRetry: r
72
- },
73
- ...R
74
- ]);
75
- }, se = (t, n, r) => {
76
- var h, C;
77
- p(!1), m(!1);
78
- const a = {
79
- getTotal: () => e.getTotal(),
80
- getLeafDataItems: () => e.getLeafDataItems(),
81
- exportAsPdf: () => e.exportAsPdf(),
49
+ }) : [], [t]), K = o.useMemo(
50
+ () => ({
51
+ sort: t.sort,
52
+ filter: t.filter,
53
+ group: t.group,
54
+ highlight: t.highlight,
55
+ select: t.select,
56
+ columnsState: t.columnsState,
57
+ skip: t.skip,
58
+ take: t.take
59
+ }),
60
+ [t]
61
+ ), j = o.useMemo(
62
+ () => ({
63
+ getTotal: () => t.getTotal(),
64
+ getLeafDataItems: () => t.getLeafDataItems(),
65
+ exportAsPdf: () => t.exportAsPdf(),
82
66
  props: {
83
- dataItemKey: e.dataItemKey
84
- }
85
- }, s = ke(t, e, a);
86
- s.state.sort !== e.sort && e.sortChange(s.state.sort, t), s.state.filter !== e.filter && e.filterChange(s.state.filter, t), s.state.group !== e.group && e.groupChange(s.state.group, t), s.state.highlight !== e.highlight && e.applyHighlightDescriptor(s.state.highlight), s.state.select !== e.select && e.applySelectionDescriptor(s.state.select), s.state.columnsState !== e.columnsState && e.onColumnsStateChange(s.state.columnsState), (s.state.skip !== e.skip || s.state.take !== e.take) && e.pagerPageChange({
87
- skip: (h = s.state.skip) != null ? h : 0,
88
- take: (C = s.state.take) != null ? C : 0,
89
- syntheticEvent: t
90
- }), s.shouldExportPdf && e.exportAsPdf(), s.messages.length > 0 && s.messages.forEach((ue) => {
91
- te(ue, n, r);
92
- }), P && P(t, n, r);
93
- }, oe = (t) => {
94
- I == null || I(t), p(!1), m(!1);
95
- }, ne = (t, n) => {
96
- const r = v.CancelToken.source(), a = {
97
- role: j || "user",
98
- columns: X || [],
99
- headers: {
100
- Accept: "*/*",
101
- "Content-Type": "application/json"
102
- },
103
- promptMessage: t,
104
- requestOptions: {
105
- url: c,
106
- method: "POST",
107
- withCredentials: !1,
108
- responseType: "json",
109
- cancelToken: r.token,
110
- ...i
67
+ dataItemKey: t.dataItemKey
111
68
  }
112
- };
113
- if (y && y(a, n), a.requestOptions.url !== void 0) {
114
- p(!0), m(!0);
115
- const { url: s, ...h } = a.requestOptions;
116
- s && (v(s, {
117
- ...h,
118
- headers: a.headers,
119
- data: {
120
- columns: a.columns,
121
- contents: [{ text: a.promptMessage }]
122
- },
123
- responseType: "json"
124
- // Ensure correct type
125
- }).then((C) => se(C, a.promptMessage, n)).catch(oe), x.current = r);
126
- }
127
- }, ae = o.useCallback(() => {
128
- x.current && x.current.cancel("Request cancelled by user."), p(!1), m(!1);
129
- }, []), [re, O] = ge(
130
- z
131
- ), ie = Object.keys(O).length > 0 ? O : {}, le = /* @__PURE__ */ o.createElement(
132
- re,
69
+ }),
70
+ [t]
71
+ ), [h, C] = o.useState(!1), [F, U] = o.useState(), [X, Y] = o.useState(), [A, _] = o.useState(() => {
72
+ const e = window.innerWidth;
73
+ return e < E ? e * 0.8 : 560;
74
+ }), u = o.useRef(null), $ = o.useCallback(
75
+ (e) => {
76
+ var s, r;
77
+ e.sort !== void 0 && e.sort !== t.sort && t.sortChange(e.sort, {}), e.filter !== t.filter && t.filterChange(e.filter, {}), e.group !== void 0 && e.group !== t.group && t.groupChange(e.group, {}), e.highlight !== void 0 && e.highlight !== t.highlight && t.applyHighlightDescriptor(e.highlight), e.select !== void 0 && e.select !== t.select && t.applySelectionDescriptor(e.select), e.columnsState !== void 0 && e.columnsState !== t.columnsState && t.onColumnsStateChange(e.columnsState), (e.skip !== void 0 && e.skip !== t.skip || e.take !== void 0 && e.take !== t.take) && t.pagerPageChange({
78
+ skip: (s = e.skip) != null ? s : 0,
79
+ take: (r = e.take) != null ? r : 0,
80
+ syntheticEvent: {}
81
+ });
82
+ },
83
+ [t]
84
+ ), w = o.useCallback(
85
+ (e, s, r) => {
86
+ const k = [i.toLanguageString(x, m[x])];
87
+ e.forEach((rt) => {
88
+ const lt = Ct([rt], t.columnsRef).join(`
89
+ `);
90
+ R((P) => [
91
+ {
92
+ id: P.length + 1,
93
+ title: i.toLanguageString(y, m[y]),
94
+ subTitle: s,
95
+ prompt: s,
96
+ responseContent: k.concat(lt).join(""),
97
+ isRetry: r
98
+ },
99
+ ...P
100
+ ]);
101
+ });
102
+ },
103
+ [i, t.columnsRef]
104
+ ), J = o.useCallback(() => {
105
+ t.exportAsPdf();
106
+ }, [t]), {
107
+ loading: Q,
108
+ streaming: V,
109
+ sendRequest: Z,
110
+ cancelRequest: tt
111
+ } = ht({
112
+ requestUrl: l,
113
+ requestOptions: n,
114
+ role: L,
115
+ columns: H,
116
+ gridState: K,
117
+ gridRef: j,
118
+ onPromptRequest: v,
119
+ onResponseSuccess: T,
120
+ onResponseError: W,
121
+ onStateChange: $,
122
+ onMessages: w,
123
+ onExportPdf: J
124
+ }), et = (e) => {
125
+ e.preventDefault(), C(!h);
126
+ }, c = o.useMemo(() => {
127
+ var e;
128
+ return (e = a.show) != null ? e : h;
129
+ }, [a.show, h]), d = o.useCallback(() => {
130
+ var e;
131
+ f && f(), R([]), C(!1), u.current && ((e = u.current.element) == null || e.focus());
132
+ }, [f]), [ot, b] = mt(
133
+ B
134
+ ), st = Object.keys(b).length > 0 ? b : {}, it = /* @__PURE__ */ o.createElement(
135
+ ot,
133
136
  {
134
- onPromptRequest: ne,
135
- onCancel: ae,
136
- onClose: g,
137
- streaming: H || Y,
138
- loading: K || _,
139
- outputs: F || R,
140
- promptPlaceHolder: N,
141
- suggestionsList: q,
142
- enableSpeechToText: U,
143
- ...ie
137
+ onPromptRequest: Z,
138
+ onCancel: tt,
139
+ onClose: d,
140
+ streaming: z || V,
141
+ loading: D || Q,
142
+ outputs: G || S,
143
+ promptPlaceHolder: q,
144
+ suggestionsList: O,
145
+ enableSpeechToText: N,
146
+ ...st
144
147
  }
145
- ), ce = /* @__PURE__ */ o.createElement(
146
- pe,
148
+ ), nt = /* @__PURE__ */ o.createElement(
149
+ ut,
147
150
  {
148
- ref: d,
151
+ ref: u,
149
152
  togglable: !0,
150
153
  themeColor: "primary",
151
154
  rounded: "full",
152
- selected: f,
153
- svgIcon: G || (E ? void 0 : me),
154
- icon: E,
155
- size: e.mobileMode ? "large" : "medium",
156
- className: he("k-toolbar-button", { "k-icon-button": e.mobileMode }),
157
- title: l.toLanguageString(S, k[S]),
158
- onClick: ee
155
+ selected: c,
156
+ svgIcon: M || (I ? void 0 : ct),
157
+ icon: I,
158
+ size: t.mobileMode ? "large" : "medium",
159
+ className: gt("k-toolbar-button", { "k-icon-button": t.mobileMode }),
160
+ title: i.toLanguageString(g, m[g]),
161
+ onClick: et
159
162
  }
160
163
  );
161
164
  return o.useEffect(() => {
162
- var t;
163
- if (d.current && f) {
164
- const n = (t = d.current.element) == null ? void 0 : t.getBoundingClientRect();
165
- if (n) {
166
- J(n.top + window.scrollY + n.height), V(n.left + window.scrollX + n.width);
167
- const r = window.innerWidth, a = r < M ? r * 0.75 : 560;
168
- Z(a);
165
+ var e;
166
+ if (u.current && c) {
167
+ const s = (e = u.current.element) == null ? void 0 : e.getBoundingClientRect();
168
+ if (s) {
169
+ U(s.top + window.scrollY + s.height), Y(s.left + window.scrollX + s.width);
170
+ const r = window.innerWidth, k = r < E ? r * 0.75 : 560;
171
+ _(k);
169
172
  }
170
173
  }
171
- }, [f]), o.useImperativeHandle(
172
- w,
174
+ }, [c]), o.useImperativeHandle(
175
+ p,
173
176
  () => ({
174
- show: () => b(!0),
175
- hide: () => g()
177
+ show: () => C(!0),
178
+ hide: () => d()
176
179
  }),
177
- [g]
178
- ), /* @__PURE__ */ o.createElement(o.Fragment, null, ce, f && /* @__PURE__ */ o.createElement(
179
- Ce,
180
+ [d]
181
+ ), /* @__PURE__ */ o.createElement(o.Fragment, null, nt, c && /* @__PURE__ */ o.createElement(
182
+ pt,
180
183
  {
181
- key: W,
184
+ key: A,
182
185
  autoFocus: !1,
183
- title: l.toLanguageString(S, k[S]),
184
- initialTop: $,
185
- initialLeft: Q,
186
- initialWidth: W,
186
+ title: i.toLanguageString(g, m[g]),
187
+ initialTop: F,
188
+ initialLeft: X,
189
+ initialWidth: A,
187
190
  style: {
188
191
  height: "auto",
189
192
  minWidth: "90px",
190
193
  minHeight: "50px"
191
194
  },
192
- onClose: g,
195
+ onClose: d,
193
196
  resizable: !0,
194
197
  draggable: !0,
195
198
  className: "k-grid-assistant-window",
196
- maximizeButton: Ie
199
+ maximizeButton: kt
197
200
  },
198
- le
201
+ it
199
202
  ));
200
203
  }
201
204
  );
202
- Ae.displayName = "KendoReactGridToolbarAIAssistant";
205
+ It.displayName = "KendoReactGridToolbarAIAssistant";
203
206
  export {
204
- Ae as GridToolbarAIAssistant
207
+ It as GridToolbarAIAssistant
205
208
  };
@@ -13,7 +13,7 @@ import { GridColumnMenuItemContent as je } from "../columnMenu/GridColumnMenuIte
13
13
  import { GridColumnMenuItemGroup as qe } from "../columnMenu/GridColumnMenuItemGroup.mjs";
14
14
  import { GridContext as Je } from "../utils/GridContext.mjs";
15
15
  import { filterIcon as me, filterClearIcon as Qe } from "@progress/kendo-svg-icons";
16
- import { getFilterType as de, operatorMap as V, booleanFilterValues as We, filterLogicList as Xe, defaultHideSecondFilter as Ye, IsUnaryFilter as b, getDefaultOperator as Ze } from "../filterCommon.mjs";
16
+ import { getFilterType as de, operatorMap as V, defaultHideSecondFilter as We, IsUnaryFilter as b, getDefaultOperator as Xe, filterLogicList as Ye, booleanFilterValues as Ze } from "../filterCommon.mjs";
17
17
  import { Button as k } from "@progress/kendo-react-buttons";
18
18
  import { GridColumnMenuFilterUI as $e } from "../columnMenu/GridColumnMenuFilterUI.mjs";
19
19
  import { toolbarFilter as M, messages as F, filterSubmitButton as ge, filterClearButton as pe, filterClearAllButton as he } from "../messages/index.mjs";
@@ -49,7 +49,7 @@ const nt = (c) => {
49
49
  var o, i, l, s, ce, ue;
50
50
  let e;
51
51
  if (r != null && r.current && ((o = r == null ? void 0 : r.current) != null && o.field)) {
52
- const Ge = de((i = r == null ? void 0 : r.current) == null ? void 0 : i.filter), v = Ze(n.filterOperators, Ge);
52
+ const Ge = de((i = r == null ? void 0 : r.current) == null ? void 0 : i.filter), v = Xe(n.filterOperators, Ge);
53
53
  e = Re((l = r == null ? void 0 : r.current) == null ? void 0 : l.field, n.filter), e = e ? {
54
54
  ...e,
55
55
  filters: e.filters.map((O) => ({ ...O }))
@@ -90,7 +90,7 @@ const nt = (c) => {
90
90
  ...u,
91
91
  filters: i
92
92
  });
93
- }, [u, B] = t.useState(q()), a = u == null ? void 0 : u.filters, C = de((re = r == null ? void 0 : r.current) == null ? void 0 : re.filter), A = V(n.filterOperators[C], f), Q = V(We, f), ke = {
93
+ }, [u, B] = t.useState(q()), a = u == null ? void 0 : u.filters, C = de((re = r == null ? void 0 : r.current) == null ? void 0 : re.filter), A = V(n.filterOperators[C], f), Q = V(Ze, f), ke = {
94
94
  field: (oe = r == null ? void 0 : r.current) == null ? void 0 : oe.field,
95
95
  value: a == null ? void 0 : a[0].value,
96
96
  operator: a == null ? void 0 : a[0].operator,
@@ -109,11 +109,11 @@ const nt = (c) => {
109
109
  }, we = (e) => {
110
110
  let o = e.target.value;
111
111
  e.target.tagName === "SPAN" && (o = e.target.parentElement.value), B({ ...u, logic: o });
112
- }, W = u == null ? void 0 : u.logic, X = V(Xe, f), T = {
112
+ }, W = u == null ? void 0 : u.logic, X = V(Ye, f), T = {
113
113
  value: X.find((e) => e.operator === (W === null ? "" : W)),
114
114
  onChange: we,
115
115
  data: X
116
- }, Se = c.hideSecondFilter !== void 0 ? c.hideSecondFilter : Ye[C], N = c.filterUI, L = {
116
+ }, Se = c.hideSecondFilter !== void 0 ? c.hideSecondFilter : We[C], N = c.filterUI, L = {
117
117
  firstFilterProps: ke,
118
118
  secondFilterProps: Me,
119
119
  logicData: T.data,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { SegmentedControlHandle, SegmentedControlProps } from './interfaces/index.js';
9
+ import * as React from 'react';
10
+ /**
11
+ * @hidden
12
+ */
13
+ export declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<SegmentedControlHandle>>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),i=require("@progress/kendo-react-common");function W(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(a,r,l.get?l:{enumerable:!0,get:()=>s[r]})}}return a.default=s,Object.freeze(a)}const e=W(T),P=void 0,I=e.forwardRef((s,a)=>{const{buttons:r=[],size:l=P,stretched:z}=s,N=l?i.kendoThemeMaps.sizeMap[l]:void 0,f=e.useRef(null),R=e.useRef(null),[O,u]=e.useState({}),d=e.useCallback(()=>{const t=f.current,n=R.current;if(!t||!n)return;const m=t.querySelector(".k-segmented-control-button.k-selected");if(!m)return;const g=t.offsetWidth,p=m.offsetWidth,b=m.offsetLeft;n.style.left=`${b}px`,n.style.right=`${g-b-p}px`},[]);return e.useLayoutEffect(()=>{d()},[r,d]),e.useEffect(()=>{const t=f.current;if(!t)return;const n=new ResizeObserver(()=>{d()});return n.observe(t),()=>{n.disconnect()}},[d]),e.useImperativeHandle(a,()=>({element:f.current}),[]),e.createElement("div",{ref:f,className:i.classNames("k-segmented-control",N&&`k-segmented-control-${N}`,{"k-segmented-control-stretched":z})},e.createElement("div",{className:"k-segmented-control-thumb",ref:R,"aria-hidden":"true"}),r.map(({buttonId:t,disabled:n,text:m,svgIcon:g,selected:p,accentIcon:b,type:E="button",onClick:h,onMouseEnter:k,onMouseLeave:v,onFocus:S,onBlur:y,...j})=>e.createElement("button",{key:t,type:E,className:i.classNames("k-segmented-control-button",{"k-selected":p,"k-hover":O.hoveredId===t&&!n,"k-focus":O.focusedId===t&&!n,"k-disabled":n}),disabled:n,onClick:c=>{h==null||h(c),d()},onMouseEnter:c=>{u(o=>({...o,hoveredId:t})),k==null||k(c)},onMouseLeave:c=>{u(o=>({...o,hoveredId:void 0})),v==null||v(c)},onFocus:c=>{u(o=>({...o,focusedId:t})),S==null||S(c)},onBlur:c=>{u(o=>({...o,focusedId:void 0})),y==null||y(c)},...j},g&&e.createElement(i.IconWrap,{className:i.classNames("k-segmented-control-button-icon",{"k-accent-icon":p&&b}),icon:g}),e.createElement("span",{className:"k-segmented-control-button-text"},m))))});I.displayName="KendoReactSegmentedControl";exports.SegmentedControl=I;
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import * as e from "react";
9
+ import { kendoThemeMaps as x, classNames as g, IconWrap as T } from "@progress/kendo-react-common";
10
+ const $ = void 0, w = e.forwardRef((S, y) => {
11
+ const { buttons: v = [], size: b = $, stretched: E } = S, R = b ? x.sizeMap[b] : void 0, a = e.useRef(null), I = e.useRef(null), [N, m] = e.useState({}), r = e.useCallback(() => {
12
+ const t = a.current, s = I.current;
13
+ if (!t || !s)
14
+ return;
15
+ const o = t.querySelector(".k-segmented-control-button.k-selected");
16
+ if (!o)
17
+ return;
18
+ const d = t.offsetWidth, l = o.offsetWidth, i = o.offsetLeft;
19
+ s.style.left = `${i}px`, s.style.right = `${d - i - l}px`;
20
+ }, []);
21
+ return e.useLayoutEffect(() => {
22
+ r();
23
+ }, [v, r]), e.useEffect(() => {
24
+ const t = a.current;
25
+ if (!t)
26
+ return;
27
+ const s = new ResizeObserver(() => {
28
+ r();
29
+ });
30
+ return s.observe(t), () => {
31
+ s.disconnect();
32
+ };
33
+ }, [r]), e.useImperativeHandle(
34
+ y,
35
+ () => ({
36
+ element: a.current
37
+ }),
38
+ []
39
+ ), /* @__PURE__ */ e.createElement(
40
+ "div",
41
+ {
42
+ ref: a,
43
+ className: g("k-segmented-control", R && `k-segmented-control-${R}`, {
44
+ "k-segmented-control-stretched": E
45
+ })
46
+ },
47
+ /* @__PURE__ */ e.createElement("div", { className: "k-segmented-control-thumb", ref: I, "aria-hidden": "true" }),
48
+ v.map(
49
+ ({
50
+ buttonId: t,
51
+ disabled: s,
52
+ text: o,
53
+ svgIcon: d,
54
+ selected: l,
55
+ accentIcon: i,
56
+ type: z = "button",
57
+ onClick: f,
58
+ onMouseEnter: u,
59
+ onMouseLeave: h,
60
+ onFocus: k,
61
+ onBlur: p,
62
+ ...W
63
+ }) => /* @__PURE__ */ e.createElement(
64
+ "button",
65
+ {
66
+ key: t,
67
+ type: z,
68
+ className: g("k-segmented-control-button", {
69
+ "k-selected": l,
70
+ "k-hover": N.hoveredId === t && !s,
71
+ "k-focus": N.focusedId === t && !s,
72
+ "k-disabled": s
73
+ }),
74
+ disabled: s,
75
+ onClick: (n) => {
76
+ f == null || f(n), r();
77
+ },
78
+ onMouseEnter: (n) => {
79
+ m((c) => ({ ...c, hoveredId: t })), u == null || u(n);
80
+ },
81
+ onMouseLeave: (n) => {
82
+ m((c) => ({ ...c, hoveredId: void 0 })), h == null || h(n);
83
+ },
84
+ onFocus: (n) => {
85
+ m((c) => ({ ...c, focusedId: t })), k == null || k(n);
86
+ },
87
+ onBlur: (n) => {
88
+ m((c) => ({ ...c, focusedId: void 0 })), p == null || p(n);
89
+ },
90
+ ...W
91
+ },
92
+ d && /* @__PURE__ */ e.createElement(
93
+ T,
94
+ {
95
+ className: g("k-segmented-control-button-icon", {
96
+ "k-accent-icon": l && i
97
+ }),
98
+ icon: d
99
+ }
100
+ ),
101
+ /* @__PURE__ */ e.createElement("span", { className: "k-segmented-control-button-text" }, o)
102
+ )
103
+ )
104
+ );
105
+ });
106
+ w.displayName = "KendoReactSegmentedControl";
107
+ export {
108
+ w as SegmentedControl
109
+ };