@progress/kendo-react-grid 12.0.3-develop.1 → 12.1.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/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1758723629,version:"12.1.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "12.0
|
|
13
|
+
publishDate: 1758723629,
|
|
14
|
+
version: "12.1.0-develop.1",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.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",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"@progress/kendo-data-query": "^1.0.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
30
|
"@progress/kendo-licensing": "^1.7.0",
|
|
31
|
-
"@progress/kendo-react-animation": "12.0
|
|
32
|
-
"@progress/kendo-react-buttons": "12.0
|
|
33
|
-
"@progress/kendo-react-common": "12.0
|
|
34
|
-
"@progress/kendo-react-data-tools": "12.0
|
|
35
|
-
"@progress/kendo-react-dateinputs": "12.0
|
|
36
|
-
"@progress/kendo-react-indicators": "12.0
|
|
37
|
-
"@progress/kendo-react-form": "12.0
|
|
38
|
-
"@progress/kendo-react-labels": "12.0
|
|
39
|
-
"@progress/kendo-react-dialogs": "12.0
|
|
40
|
-
"@progress/kendo-react-dropdowns": "12.0
|
|
41
|
-
"@progress/kendo-react-inputs": "12.0
|
|
42
|
-
"@progress/kendo-react-intl": "12.0
|
|
43
|
-
"@progress/kendo-react-popup": "12.0
|
|
44
|
-
"@progress/kendo-react-layout": "12.0
|
|
45
|
-
"@progress/kendo-react-conversational-ui": "12.0
|
|
31
|
+
"@progress/kendo-react-animation": "12.1.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-buttons": "12.1.0-develop.1",
|
|
33
|
+
"@progress/kendo-react-common": "12.1.0-develop.1",
|
|
34
|
+
"@progress/kendo-react-data-tools": "12.1.0-develop.1",
|
|
35
|
+
"@progress/kendo-react-dateinputs": "12.1.0-develop.1",
|
|
36
|
+
"@progress/kendo-react-indicators": "12.1.0-develop.1",
|
|
37
|
+
"@progress/kendo-react-form": "12.1.0-develop.1",
|
|
38
|
+
"@progress/kendo-react-labels": "12.1.0-develop.1",
|
|
39
|
+
"@progress/kendo-react-dialogs": "12.1.0-develop.1",
|
|
40
|
+
"@progress/kendo-react-dropdowns": "12.1.0-develop.1",
|
|
41
|
+
"@progress/kendo-react-inputs": "12.1.0-develop.1",
|
|
42
|
+
"@progress/kendo-react-intl": "12.1.0-develop.1",
|
|
43
|
+
"@progress/kendo-react-popup": "12.1.0-develop.1",
|
|
44
|
+
"@progress/kendo-react-layout": "12.1.0-develop.1",
|
|
45
|
+
"@progress/kendo-react-conversational-ui": "12.1.0-develop.1",
|
|
46
46
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
47
47
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
48
48
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"package": {
|
|
148
148
|
"productName": "KendoReact",
|
|
149
149
|
"productCode": "KENDOUIREACT",
|
|
150
|
-
"publishDate":
|
|
150
|
+
"publishDate": 1758723629,
|
|
151
151
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
152
152
|
}
|
|
153
153
|
},
|
|
@@ -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 ae=require("react"),ie=require("../utils/GridContext.js"),le=require("@progress/kendo-react-buttons"),ce=require("@progress/kendo-svg-icons"),
|
|
9
|
-
`);E([{id:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ae=require("react"),ie=require("../utils/GridContext.js"),le=require("@progress/kendo-react-buttons"),ce=require("@progress/kendo-svg-icons"),v=require("axios"),ue=require("@progress/kendo-react-intl"),i=require("../messages/index.js"),G=require("@progress/kendo-react-common"),de=require("@progress/kendo-react-dialogs"),pe=require("./ai-tool/GridAIPrompt.js"),D=require("../filterCommon.js");function ge(s){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(u,t,c.get?c:{enumerable:!0,get:()=>s[t]})}}return u.default=s,Object.freeze(u)}const o=ge(ae),fe=(s,u)=>s.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}),L=o.forwardRef((s,u)=>{const t=o.useContext(ie.GridContext),c=ue.useLocalization(),{requestUrl:p,requestOptions:d,onPromptRequest:y,onResponseSuccess:O,onResponseError:P,role:W="user",gridAIPrompt:B=pe.GridAIPrompt,icon:x,svgIcon:F,onCloseWindow:A,promptPlaceHolder:M,suggestionsList:z,streaming:H,loading:N,outputs:_,enableSpeechToText:$}=s,[R,E]=o.useState([]),K=o.useMemo(()=>t&&Array.isArray(t.columnsRef)?t.columnsRef.map(e=>({field:e.field})):[],[t]),[U,h]=o.useState(!1),[I,w]=o.useState(!1),[X,Y]=o.useState(),[J,Q]=o.useState(),g=o.useRef(null),k=o.useRef(null),V=e=>{e.preventDefault(),w(!I)},C=o.useMemo(()=>{var e;return(e=s.show)!=null?e:I},[s.show,I]),b=o.useCallback(()=>{var e;A&&A(),E([]),w(!1),g.current&&((e=g.current.element)==null||e.focus())},[A]),Z=(e,r,f)=>{var l,S;if(h(!1),e!=null&&e.data){if(t.sortable&&e.data.sort)if(e.data.sort.length===0)t.sortChange([],e);else{const a=(l=t.sort)!=null?l:[],n=[];a.forEach(m=>{e.data.sort.some(T=>T.field===m.field)||n.push(m)}),n.push(...e.data.sort),t.sortChange(n,e)}if(e.data.filter){const a=D.combineSmartFilters(e.data.filter,t.filter);t.filterChange(a,e)}if(e.data.highlight){let a=e.data.highlight;Array.isArray(a)&&(a=a.map(n=>(n!=null&&n.filters&&Array.isArray(n.filters)&&D.parseFilterDates(n),n))),t.applyHighlightDescriptor(a)}if(t&&e.data.group)if(e.data.group.length===0)t.groupChange([],e);else{const a=(S=t.group)!=null?S:[],n=[];a.forEach(m=>{e.data.group.some(T=>T.field===m.field)||n.push(m)}),n.push(...e.data.group),t.groupChange(n,e)}if(e.data.messages){const a=[c.toLanguageString(i.aIResponseData,i.messages[i.aIResponseData])],n=fe(e.data.messages,t.columnsRef).join(`
|
|
9
|
+
`);E([{id:R.length+1,title:c.toLanguageString(i.generatedWithAI,i.messages[i.generatedWithAI]),subTitle:r,prompt:r,responseContent:a.concat(n).join(""),isRetry:f},...R])}}O&&O(e,r,f)},q=e=>{P&&P(e),h(!1)},ee=(e,r)=>{const f=v.CancelToken.source(),l={role:"user",columns:K||[],headers:{Accept:"*/*","Content-Type":"application/json"},promptMessage:e,requestOptions:{url:p,method:"POST",withCredentials:!1,responseType:"json",cancelToken:f.token,...d}};y&&y(l,r),l.requestOptions.url!==void 0&&(h(!0),v({...l.requestOptions,headers:l.headers,data:{role:W||l.role,contents:[{$type:"text",text:l.promptMessage}],columns:l.columns||[]},...s.requestOptions}).then(S=>Z(S,l.promptMessage,r)).catch(q),k.current=f)},te=o.useCallback(()=>{k.current&&k.current.cancel("Request cancelled by user."),h(!1)},[]),[oe,j]=G.useCustomComponent(B),ne=Object.keys(j).length>0?j:{},se=o.createElement(oe,{onPromptRequest:ee,onCancel:te,onClose:b,streaming:H||U,loading:N,outputs:_||R,promptPlaceHolder:M,suggestionsList:z,enableSpeechToText:$,...ne}),re=o.createElement(le.Button,{ref:g,togglable:!0,themeColor:"primary",rounded:"full",selected:C,svgIcon:F||(x?void 0:ce.sparklesIcon),icon:x,size:t.mobileMode?"large":"medium",className:G.classNames("k-toolbar-button",{"k-icon-button":t.mobileMode}),title:c.toLanguageString(i.toolbarAI,i.messages[i.toolbarAI]),onClick:V});return o.useEffect(()=>{var e;if(g.current&&C){const r=(e=g.current.element)==null?void 0:e.getBoundingClientRect();r&&(Y(r.top+window.scrollY+r.height),Q(r.left+window.scrollX+r.width))}},[C]),o.useImperativeHandle(u,()=>({show:()=>w(!0),hide:()=>b()}),[b]),o.createElement(o.Fragment,null,re,C&&o.createElement(de.Window,{autoFocus:!1,title:c.toLanguageString(i.toolbarAI,i.messages[i.toolbarAI]),initialTop:X,initialLeft:J,initialWidth:520,initialHeight:500,onClose:b,resizable:!0,draggable:!0,className:"k-grid-assistant-window"},se))});L.displayName="KendoReactGridToolbarAIAssistant";exports.GridToolbarAIAssistant=L;
|
|
@@ -9,9 +9,9 @@ import * as e from "react";
|
|
|
9
9
|
import { GridContext as at } from "../utils/GridContext.mjs";
|
|
10
10
|
import { Button as it } from "@progress/kendo-react-buttons";
|
|
11
11
|
import { sparklesIcon as lt } from "@progress/kendo-svg-icons";
|
|
12
|
-
import
|
|
12
|
+
import G from "axios";
|
|
13
13
|
import { useLocalization as ut } from "@progress/kendo-react-intl";
|
|
14
|
-
import { toolbarAI as S, messages as w, aIResponseData as
|
|
14
|
+
import { toolbarAI as S, messages as w, aIResponseData as F, generatedWithAI as W } from "../messages/index.mjs";
|
|
15
15
|
import { useCustomComponent as ct, classNames as pt } from "@progress/kendo-react-common";
|
|
16
16
|
import { Window as dt } from "@progress/kendo-react-dialogs";
|
|
17
17
|
import { GridAIPrompt as ft } from "./ai-tool/GridAIPrompt.mjs";
|
|
@@ -26,29 +26,29 @@ const ht = (l, b) => l.map((u) => {
|
|
|
26
26
|
const o = e.useContext(at), u = ut(), {
|
|
27
27
|
requestUrl: c,
|
|
28
28
|
requestOptions: i,
|
|
29
|
-
onPromptRequest:
|
|
30
|
-
onResponseSuccess:
|
|
31
|
-
onResponseError:
|
|
32
|
-
role:
|
|
33
|
-
gridAIPrompt:
|
|
34
|
-
icon:
|
|
35
|
-
svgIcon:
|
|
36
|
-
onCloseWindow:
|
|
37
|
-
promptPlaceHolder:
|
|
29
|
+
onPromptRequest: P,
|
|
30
|
+
onResponseSuccess: E,
|
|
31
|
+
onResponseError: O,
|
|
32
|
+
role: j = "user",
|
|
33
|
+
gridAIPrompt: B = ft,
|
|
34
|
+
icon: x,
|
|
35
|
+
svgIcon: D,
|
|
36
|
+
onCloseWindow: A,
|
|
37
|
+
promptPlaceHolder: H,
|
|
38
38
|
suggestionsList: z,
|
|
39
39
|
streaming: M,
|
|
40
40
|
loading: N,
|
|
41
41
|
outputs: $,
|
|
42
42
|
enableSpeechToText: K
|
|
43
|
-
} = l, [
|
|
44
|
-
t.preventDefault(),
|
|
43
|
+
} = l, [R, L] = e.useState([]), U = e.useMemo(() => o && Array.isArray(o.columnsRef) ? o.columnsRef.map((t) => ({ field: t.field })) : [], [o]), [X, m] = e.useState(!1), [T, k] = e.useState(!1), [Y, J] = e.useState(), [Q, V] = e.useState(), p = e.useRef(null), I = e.useRef(null), Z = (t) => {
|
|
44
|
+
t.preventDefault(), k(!T);
|
|
45
45
|
}, g = e.useMemo(() => {
|
|
46
46
|
var t;
|
|
47
|
-
return (t = l.show) != null ? t :
|
|
48
|
-
}, [l.show,
|
|
47
|
+
return (t = l.show) != null ? t : T;
|
|
48
|
+
}, [l.show, T]), h = e.useCallback(() => {
|
|
49
49
|
var t;
|
|
50
|
-
|
|
51
|
-
}, [
|
|
50
|
+
A && A(), L([]), k(!1), p.current && ((t = p.current.element) == null || t.focus());
|
|
51
|
+
}, [A]), _ = (t, n, d) => {
|
|
52
52
|
var a, C;
|
|
53
53
|
if (m(!1), t != null && t.data) {
|
|
54
54
|
if (o.sortable && t.data.sort)
|
|
@@ -57,7 +57,7 @@ const ht = (l, b) => l.map((u) => {
|
|
|
57
57
|
else {
|
|
58
58
|
const r = (a = o.sort) != null ? a : [], s = [];
|
|
59
59
|
r.forEach((f) => {
|
|
60
|
-
t.data.sort.some((
|
|
60
|
+
t.data.sort.some((y) => y.field === f.field) || s.push(f);
|
|
61
61
|
}), s.push(...t.data.sort), o.sortChange(s, t);
|
|
62
62
|
}
|
|
63
63
|
if (t.data.filter) {
|
|
@@ -74,34 +74,34 @@ const ht = (l, b) => l.map((u) => {
|
|
|
74
74
|
else {
|
|
75
75
|
const r = (C = o.group) != null ? C : [], s = [];
|
|
76
76
|
r.forEach((f) => {
|
|
77
|
-
t.data.group.some((
|
|
77
|
+
t.data.group.some((y) => y.field === f.field) || s.push(f);
|
|
78
78
|
}), s.push(...t.data.group), o.groupChange(s, t);
|
|
79
79
|
}
|
|
80
80
|
if (t.data.messages) {
|
|
81
81
|
const r = [
|
|
82
|
-
u.toLanguageString(
|
|
82
|
+
u.toLanguageString(F, w[F])
|
|
83
83
|
], s = ht(t.data.messages, o.columnsRef).join(
|
|
84
84
|
`
|
|
85
85
|
`
|
|
86
86
|
);
|
|
87
87
|
L([
|
|
88
88
|
{
|
|
89
|
-
id:
|
|
90
|
-
title: u.toLanguageString(
|
|
89
|
+
id: R.length + 1,
|
|
90
|
+
title: u.toLanguageString(W, w[W]),
|
|
91
91
|
subTitle: n,
|
|
92
92
|
prompt: n,
|
|
93
93
|
responseContent: r.concat(s).join(""),
|
|
94
94
|
isRetry: d
|
|
95
95
|
},
|
|
96
|
-
...
|
|
96
|
+
...R
|
|
97
97
|
]);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
E && E(t, n, d);
|
|
101
101
|
}, q = (t) => {
|
|
102
|
-
|
|
102
|
+
O && O(t), m(!1);
|
|
103
103
|
}, tt = (t, n) => {
|
|
104
|
-
const d =
|
|
104
|
+
const d = G.CancelToken.source(), a = {
|
|
105
105
|
role: "user",
|
|
106
106
|
columns: U || [],
|
|
107
107
|
headers: {
|
|
@@ -118,11 +118,11 @@ const ht = (l, b) => l.map((u) => {
|
|
|
118
118
|
...i
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
P && P(a, n), a.requestOptions.url !== void 0 && (m(!0), G({
|
|
122
122
|
...a.requestOptions,
|
|
123
123
|
headers: a.headers,
|
|
124
124
|
data: {
|
|
125
|
-
role:
|
|
125
|
+
role: j || a.role,
|
|
126
126
|
contents: [
|
|
127
127
|
{
|
|
128
128
|
$type: "text",
|
|
@@ -135,9 +135,9 @@ const ht = (l, b) => l.map((u) => {
|
|
|
135
135
|
}).then((C) => _(C, a.promptMessage, n)).catch(q), I.current = d);
|
|
136
136
|
}, et = e.useCallback(() => {
|
|
137
137
|
I.current && I.current.cancel("Request cancelled by user."), m(!1);
|
|
138
|
-
}, []), [ot,
|
|
139
|
-
|
|
140
|
-
), st = Object.keys(
|
|
138
|
+
}, []), [ot, v] = ct(
|
|
139
|
+
B
|
|
140
|
+
), st = Object.keys(v).length > 0 ? v : {}, nt = /* @__PURE__ */ e.createElement(
|
|
141
141
|
ot,
|
|
142
142
|
{
|
|
143
143
|
onPromptRequest: tt,
|
|
@@ -145,8 +145,8 @@ const ht = (l, b) => l.map((u) => {
|
|
|
145
145
|
onClose: h,
|
|
146
146
|
streaming: M || X,
|
|
147
147
|
loading: N,
|
|
148
|
-
outputs: $ ||
|
|
149
|
-
promptPlaceHolder:
|
|
148
|
+
outputs: $ || R,
|
|
149
|
+
promptPlaceHolder: H,
|
|
150
150
|
suggestionsList: z,
|
|
151
151
|
enableSpeechToText: K,
|
|
152
152
|
...st
|
|
@@ -159,8 +159,8 @@ const ht = (l, b) => l.map((u) => {
|
|
|
159
159
|
themeColor: "primary",
|
|
160
160
|
rounded: "full",
|
|
161
161
|
selected: g,
|
|
162
|
-
svgIcon:
|
|
163
|
-
icon:
|
|
162
|
+
svgIcon: D || (x ? void 0 : lt),
|
|
163
|
+
icon: x,
|
|
164
164
|
size: o.mobileMode ? "large" : "medium",
|
|
165
165
|
className: pt("k-toolbar-button", { "k-icon-button": o.mobileMode }),
|
|
166
166
|
title: u.toLanguageString(S, w[S]),
|
|
@@ -176,7 +176,7 @@ const ht = (l, b) => l.map((u) => {
|
|
|
176
176
|
}, [g]), e.useImperativeHandle(
|
|
177
177
|
b,
|
|
178
178
|
() => ({
|
|
179
|
-
show: () =>
|
|
179
|
+
show: () => k(!0),
|
|
180
180
|
hide: () => h()
|
|
181
181
|
}),
|
|
182
182
|
[h]
|