@progress/kendo-react-grid 11.4.0-develop.6 → 11.4.0-develop.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +59 -59
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +185 -185
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +24 -24
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +18 -18
- package/toolbar-tools/GridToolbarAIAssistant.js +2 -2
- package/toolbar-tools/GridToolbarAIAssistant.mjs +24 -16
- package/toolbar-tools/ai-tool/GridAIPrompt.js +1 -1
- package/toolbar-tools/ai-tool/GridAIPrompt.mjs +5 -5
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={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1754642772,version:"11.4.0-develop.8",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 = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "11.4.0-develop.
|
|
13
|
+
publishDate: 1754642772,
|
|
14
|
+
version: "11.4.0-develop.8",
|
|
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": "11.4.0-develop.
|
|
3
|
+
"version": "11.4.0-develop.8",
|
|
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",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-data-query": "^1.0.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
|
-
"@progress/kendo-licensing": "^1.
|
|
31
|
-
"@progress/kendo-react-animation": "11.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-buttons": "11.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "11.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-data-tools": "11.4.0-develop.
|
|
35
|
-
"@progress/kendo-react-dateinputs": "11.4.0-develop.
|
|
36
|
-
"@progress/kendo-react-indicators": "11.4.0-develop.
|
|
37
|
-
"@progress/kendo-react-form": "11.4.0-develop.
|
|
38
|
-
"@progress/kendo-react-labels": "11.4.0-develop.
|
|
39
|
-
"@progress/kendo-react-dialogs": "11.4.0-develop.
|
|
40
|
-
"@progress/kendo-react-dropdowns": "11.4.0-develop.
|
|
41
|
-
"@progress/kendo-react-inputs": "11.4.0-develop.
|
|
42
|
-
"@progress/kendo-react-intl": "11.4.0-develop.
|
|
43
|
-
"@progress/kendo-react-popup": "11.4.0-develop.
|
|
44
|
-
"@progress/kendo-react-layout": "11.4.0-develop.
|
|
45
|
-
"@progress/kendo-react-conversational-ui": "11.4.0-develop.
|
|
30
|
+
"@progress/kendo-licensing": "^1.7.0",
|
|
31
|
+
"@progress/kendo-react-animation": "11.4.0-develop.8",
|
|
32
|
+
"@progress/kendo-react-buttons": "11.4.0-develop.8",
|
|
33
|
+
"@progress/kendo-react-common": "11.4.0-develop.8",
|
|
34
|
+
"@progress/kendo-react-data-tools": "11.4.0-develop.8",
|
|
35
|
+
"@progress/kendo-react-dateinputs": "11.4.0-develop.8",
|
|
36
|
+
"@progress/kendo-react-indicators": "11.4.0-develop.8",
|
|
37
|
+
"@progress/kendo-react-form": "11.4.0-develop.8",
|
|
38
|
+
"@progress/kendo-react-labels": "11.4.0-develop.8",
|
|
39
|
+
"@progress/kendo-react-dialogs": "11.4.0-develop.8",
|
|
40
|
+
"@progress/kendo-react-dropdowns": "11.4.0-develop.8",
|
|
41
|
+
"@progress/kendo-react-inputs": "11.4.0-develop.8",
|
|
42
|
+
"@progress/kendo-react-intl": "11.4.0-develop.8",
|
|
43
|
+
"@progress/kendo-react-popup": "11.4.0-develop.8",
|
|
44
|
+
"@progress/kendo-react-layout": "11.4.0-develop.8",
|
|
45
|
+
"@progress/kendo-react-conversational-ui": "11.4.0-develop.8",
|
|
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"
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"package": {
|
|
147
147
|
"productName": "KendoReact",
|
|
148
148
|
"productCode": "KENDOUIREACT",
|
|
149
|
-
"publishDate":
|
|
149
|
+
"publishDate": 1754642772,
|
|
150
150
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
151
151
|
}
|
|
152
152
|
},
|
|
@@ -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 oe=require("react"),ne=require("../utils/GridContext.js"),se=require("@progress/kendo-react-buttons"),re=require("@progress/kendo-svg-icons"),j=require("axios"),ae=require("@progress/kendo-react-intl"),a=require("../messages/index.js"),x=require("@progress/kendo-react-common"),ie=require("@progress/kendo-react-dialogs"),le=require("./ai-tool/GridAIPrompt.js"),D=require("../filterCommon.js");function ce(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(t,l,d.get?d:{enumerable:!0,get:()=>n[l]})}}return t.default=n,Object.freeze(t)}const o=ce(oe),ue=(n,t)=>n.map(d=>{let
|
|
9
|
-
`);y([
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("react"),ne=require("../utils/GridContext.js"),se=require("@progress/kendo-react-buttons"),re=require("@progress/kendo-svg-icons"),j=require("axios"),ae=require("@progress/kendo-react-intl"),a=require("../messages/index.js"),x=require("@progress/kendo-react-common"),ie=require("@progress/kendo-react-dialogs"),le=require("./ai-tool/GridAIPrompt.js"),D=require("../filterCommon.js");function ce(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(t,l,d.get?d:{enumerable:!0,get:()=>n[l]})}}return t.default=n,Object.freeze(t)}const o=ce(oe),ue=(n,t)=>n.map(d=>{let g=d;return t.forEach(c=>{c.field&&g.includes(c.field)&&(g=g.replace(new RegExp(c.field,"g"),c.title||c.field))}),g}),E=n=>{const t=o.useContext(ne.GridContext),l=ae.useLocalization(),{requestUrl:d,requestOptions:g,onPromptRequest:c,onResponseSuccess:w,onResponseError:I,role:G="user",gridAIPrompt:v=le.GridAIPrompt,icon:L,svgIcon:b,onCloseWindow:k,promptPlaceHolder:W,suggestionsList:B,streaming:F,loading:M,outputs:z}=n,[S,y]=o.useState([]),N=o.useMemo(()=>t&&Array.isArray(t.columnsRef)?t.columnsRef.map(e=>({field:e.field})):[],[t]),[H,m]=o.useState(!1),[h,T]=o.useState(!1),[_,$]=o.useState(),[K,U]=o.useState(),p=o.useRef(null),A=o.useRef(null),X=e=>{e.preventDefault(),T(!h)},R=o.useMemo(()=>{var e;return(e=n.show)!=null?e:h},[n.show,h]),O=()=>{var e;k&&k(),y([]),T(!1),p.current&&((e=p.current.element)==null||e.focus())},Y=(e,s,f)=>{var i,C;if(m(!1),e!=null&&e.data){if(t.sortable&&e.data.sort){if(e.data.sort.length===0){t.sortChange([],e);return}const r=(i=t.sort)!=null?i:[];t.sortChange([...r,...e.data.sort],e)}if(e.data.filter){const r=D.combineSmartFilters(e.data.filter,t.filter);t.filterChange(r,e)}if(e.data.highlight){let r=e.data.highlight;Array.isArray(r)&&(r=r.map(u=>(u!=null&&u.filters&&Array.isArray(u.filters)&&D.parseFilterDates(u),u))),t.applyHighlightDescriptor(r)}if(t&&e.data.group){if(e.data.group.length===0){t.groupChange([],e);return}const r=(C=t.group)!=null?C:[];t.groupChange([...r,...e.data.group],e)}if(e.data.messages){const r=[l.toLanguageString(a.aIResponseData,a.messages[a.aIResponseData])],u=ue(e.data.messages,t.columnsRef).join(`
|
|
9
|
+
`);y([{id:S.length+1,title:l.toLanguageString(a.generatedWithAI,a.messages[a.generatedWithAI]),subTitle:s,prompt:s,responseContent:r.concat(u).join(""),isRetry:f},...S])}}w&&w(e,s,f)},J=e=>{I&&I(e),m(!1)},Q=(e,s)=>{const f=j.CancelToken.source(),i={role:"user",columns:N||[],headers:{Accept:"*/*","Content-Type":"application/json"},promptMessage:e,requestOptions:{url:d,method:"POST",withCredentials:!1,responseType:"json",cancelToken:f.token,...g}};c&&c(i,s),i.requestOptions.url!==void 0&&(m(!0),j({...i.requestOptions,headers:i.headers,data:{role:G||i.role,contents:[{$type:"text",text:i.promptMessage}],columns:i.columns||[]},...n.requestOptions}).then(C=>Y(C,i.promptMessage,s)).catch(J),A.current=f)},V=()=>{A.current&&A.current.cancel("Request cancelled by user."),m(!1)},[Z,P]=x.useCustomComponent(v),q=Object.keys(P).length>0?P:{},ee=o.createElement(Z,{onPromptRequest:Q,onCancel:V,onClose:O,streaming:F||H,loading:M,outputs:z||S,promptPlaceHolder:W,suggestionsList:B,...q}),te=o.createElement(se.Button,{ref:p,togglable:!0,themeColor:"primary",rounded:"full",selected:R,svgIcon:b!=null?b:re.sparklesIcon,icon:L,size:t.mobileMode?"large":"medium",className:x.classNames("k-toolbar-button",{"k-icon-button":t.mobileMode}),title:l.toLanguageString(a.toolbarAI,a.messages[a.toolbarAI]),onClick:X});return o.useEffect(()=>{var e;if(p.current&&R){const s=(e=p.current.element)==null?void 0:e.getBoundingClientRect();s&&($(s.top+window.scrollY+s.height),U(s.left+window.scrollX+s.width))}},[R]),o.createElement(o.Fragment,null,te,h&&o.createElement(ie.Window,{autoFocus:!1,title:l.toLanguageString(a.toolbarAI,a.messages[a.toolbarAI]),initialTop:_,initialLeft:K,initialWidth:520,initialHeight:500,onClose:O,resizable:!0,draggable:!0,className:"k-grid-assistant-window"},ee))};E.displayName="KendoReactGridToolbarAIAssistant";exports.GridToolbarAIAssistant=E;
|
|
@@ -21,7 +21,7 @@ const dt = (l, e) => l.map((S) => {
|
|
|
21
21
|
return e.forEach((a) => {
|
|
22
22
|
a.field && u.includes(a.field) && (u = u.replace(new RegExp(a.field, "g"), a.title || a.field));
|
|
23
23
|
}), u;
|
|
24
|
-
}),
|
|
24
|
+
}), ft = (l) => {
|
|
25
25
|
const e = o.useContext(ot), c = rt(), {
|
|
26
26
|
requestUrl: S,
|
|
27
27
|
requestOptions: u,
|
|
@@ -38,18 +38,22 @@ const dt = (l, e) => l.map((S) => {
|
|
|
38
38
|
streaming: D,
|
|
39
39
|
loading: z,
|
|
40
40
|
outputs: H
|
|
41
|
-
} = l, [A, P] = o.useState([]), M = o.useMemo(() => e && Array.isArray(e.columnsRef) ? e.columnsRef.map((t) => ({ field: t.field })) : [], [e]), [N,
|
|
42
|
-
t.preventDefault(), I(!
|
|
41
|
+
} = l, [A, P] = o.useState([]), M = o.useMemo(() => e && Array.isArray(e.columnsRef) ? e.columnsRef.map((t) => ({ field: t.field })) : [], [e]), [N, f] = o.useState(!1), [m, I] = o.useState(!1), [$, K] = o.useState(), [U, X] = o.useState(), p = o.useRef(null), b = o.useRef(null), Y = (t) => {
|
|
42
|
+
t.preventDefault(), I(!m);
|
|
43
43
|
}, R = o.useMemo(() => {
|
|
44
44
|
var t;
|
|
45
|
-
return (t = l.show) != null ? t :
|
|
46
|
-
}, [l.show,
|
|
45
|
+
return (t = l.show) != null ? t : m;
|
|
46
|
+
}, [l.show, m]), O = () => {
|
|
47
47
|
var t;
|
|
48
48
|
k && k(), P([]), I(!1), p.current && ((t = p.current.element) == null || t.focus());
|
|
49
49
|
}, J = (t, n, d) => {
|
|
50
50
|
var r, g;
|
|
51
|
-
if (
|
|
51
|
+
if (f(!1), t != null && t.data) {
|
|
52
52
|
if (e.sortable && t.data.sort) {
|
|
53
|
+
if (t.data.sort.length === 0) {
|
|
54
|
+
e.sortChange([], t);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
53
57
|
const s = (r = e.sort) != null ? r : [];
|
|
54
58
|
e.sortChange([...s, ...t.data.sort], t);
|
|
55
59
|
}
|
|
@@ -62,6 +66,10 @@ const dt = (l, e) => l.map((S) => {
|
|
|
62
66
|
Array.isArray(s) && (s = s.map((i) => (i != null && i.filters && Array.isArray(i.filters) && pt(i), i))), e.applyHighlightDescriptor(s);
|
|
63
67
|
}
|
|
64
68
|
if (e && t.data.group) {
|
|
69
|
+
if (t.data.group.length === 0) {
|
|
70
|
+
e.groupChange([], t);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
65
73
|
const s = (g = e.group) != null ? g : [];
|
|
66
74
|
e.groupChange([...s, ...t.data.group], t);
|
|
67
75
|
}
|
|
@@ -71,7 +79,6 @@ const dt = (l, e) => l.map((S) => {
|
|
|
71
79
|
`
|
|
72
80
|
);
|
|
73
81
|
P([
|
|
74
|
-
...A,
|
|
75
82
|
{
|
|
76
83
|
id: A.length + 1,
|
|
77
84
|
title: c.toLanguageString(F, C[F]),
|
|
@@ -79,13 +86,14 @@ const dt = (l, e) => l.map((S) => {
|
|
|
79
86
|
prompt: n,
|
|
80
87
|
responseContent: s.concat(i).join(""),
|
|
81
88
|
isRetry: d
|
|
82
|
-
}
|
|
89
|
+
},
|
|
90
|
+
...A
|
|
83
91
|
]);
|
|
84
92
|
}
|
|
85
93
|
}
|
|
86
94
|
T && T(t, n, d);
|
|
87
95
|
}, Q = (t) => {
|
|
88
|
-
y && y(t),
|
|
96
|
+
y && y(t), f(!1);
|
|
89
97
|
}, V = (t, n) => {
|
|
90
98
|
const d = E.CancelToken.source(), r = {
|
|
91
99
|
role: "user",
|
|
@@ -104,7 +112,7 @@ const dt = (l, e) => l.map((S) => {
|
|
|
104
112
|
...u
|
|
105
113
|
}
|
|
106
114
|
};
|
|
107
|
-
a && a(r, n), r.requestOptions.url !== void 0 && (
|
|
115
|
+
a && a(r, n), r.requestOptions.url !== void 0 && (f(!0), E({
|
|
108
116
|
...r.requestOptions,
|
|
109
117
|
headers: r.headers,
|
|
110
118
|
data: {
|
|
@@ -120,7 +128,7 @@ const dt = (l, e) => l.map((S) => {
|
|
|
120
128
|
...l.requestOptions
|
|
121
129
|
}).then((g) => J(g, r.promptMessage, n)).catch(Q), b.current = d);
|
|
122
130
|
}, Z = () => {
|
|
123
|
-
b.current && b.current.cancel("Request cancelled by user."),
|
|
131
|
+
b.current && b.current.cancel("Request cancelled by user."), f(!1);
|
|
124
132
|
}, [_, x] = at(
|
|
125
133
|
W
|
|
126
134
|
), q = Object.keys(x).length > 0 ? x : {}, tt = /* @__PURE__ */ o.createElement(
|
|
@@ -158,24 +166,24 @@ const dt = (l, e) => l.map((S) => {
|
|
|
158
166
|
const n = (t = p.current.element) == null ? void 0 : t.getBoundingClientRect();
|
|
159
167
|
n && (K(n.top + window.scrollY + n.height), X(n.left + window.scrollX + n.width));
|
|
160
168
|
}
|
|
161
|
-
}, [R]), /* @__PURE__ */ o.createElement(o.Fragment, null, et,
|
|
169
|
+
}, [R]), /* @__PURE__ */ o.createElement(o.Fragment, null, et, m && /* @__PURE__ */ o.createElement(
|
|
162
170
|
lt,
|
|
163
171
|
{
|
|
164
172
|
autoFocus: !1,
|
|
165
173
|
title: c.toLanguageString(h, C[h]),
|
|
166
174
|
initialTop: $,
|
|
167
175
|
initialLeft: U,
|
|
176
|
+
initialWidth: 520,
|
|
177
|
+
initialHeight: 500,
|
|
168
178
|
onClose: O,
|
|
169
179
|
resizable: !0,
|
|
170
180
|
draggable: !0,
|
|
171
|
-
initialWidth: 437,
|
|
172
|
-
initialHeight: null,
|
|
173
181
|
className: "k-grid-assistant-window"
|
|
174
182
|
},
|
|
175
183
|
tt
|
|
176
184
|
));
|
|
177
185
|
};
|
|
178
|
-
|
|
186
|
+
ft.displayName = "KendoReactGridToolbarAIAssistant";
|
|
179
187
|
export {
|
|
180
|
-
|
|
188
|
+
ft as GridToolbarAIAssistant
|
|
181
189
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),s=require("@progress/kendo-react-conversational-ui"),S=require("@progress/kendo-react-buttons"),h=require("@progress/kendo-react-inputs"),D=require("@progress/kendo-svg-icons"),u=require("../../messages/index.js"),E=require("@progress/kendo-react-intl");function x(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const r=x(O),j=t=>{const{responseContent:o}=t,n=o.split(`
|
|
9
|
-
`);return r.createElement("div",{className:"k-card-body"},n.map((a,c)=>r.createElement("div",{key:a.trim()+c,className:"k-card-text"},a)))},z=t=>{const{activeView:o,onActiveViewChange:n,toolbarItems:a,outputs:c,promptValue:d,promptInput:g,generateButton:f,onCopy:b,onOutputRating:y,onPromptRequest:i,suggestionsList:A,outputCard:I,promptPlaceHolder:w,streaming:k,loading:v,onCancel:C,onClose:
|
|
9
|
+
`);return r.createElement("div",{className:"k-card-body"},n.map((a,c)=>r.createElement("div",{key:a.trim()+c,className:"k-card-text"},a)))},z=t=>{const{activeView:o,onActiveViewChange:n,toolbarItems:a,outputs:c,promptValue:d,promptInput:g,generateButton:f,onCopy:b,onOutputRating:y,onPromptRequest:i,suggestionsList:A,outputCard:I,promptPlaceHolder:w,streaming:k,loading:v,onCancel:C,onClose:l}=t,p=E.useLocalization(),[V,m]=r.useState(s.promptViewDefaults.name),q=(e,B)=>{e&&(i&&i(e),m(s.outputViewDefaults.name))},P=e=>{n&&n(e),m(e)},R=e=>{e.key==="Escape"&&l&&l()};return r.useEffect(()=>{const e=document.querySelector(".k-prompt-view .k-textarea textarea");e&&e.focus()},[]),r.createElement(s.AIPrompt,{style:{maxHeight:"100%"},activeView:o!=null?o:V,onActiveViewChange:P,onPromptRequest:q,toolbarItems:a||[s.promptViewDefaults,s.outputViewDefaults],streaming:k,loading:v,onCancel:C,onKeyDown:R},r.createElement(s.AIPromptView,{promptSuggestions:A,promptValue:d,promptInput:g||r.createElement(h.TextArea,{placeholder:w,rows:2}),generateButton:f||r.createElement(S.Button,{svgIcon:D.tableWizardIcon,icon:"table-wizard",type:"button",title:p.toLanguageString(u.toolbarAIApply,u.messages[u.toolbarAIApply])},p.toLanguageString(u.toolbarAIApply,u.messages[u.toolbarAIApply]))}),r.createElement(s.AIPromptOutputView,{outputs:c,showOutputRating:!0,onCopy:b,onOutputRating:y,outputCard:I||{body:j}}))};exports.GridAIPrompt=z;
|
|
@@ -27,20 +27,20 @@ const H = (s) => {
|
|
|
27
27
|
generateButton: A,
|
|
28
28
|
onCopy: y,
|
|
29
29
|
onOutputRating: C,
|
|
30
|
-
onPromptRequest:
|
|
30
|
+
onPromptRequest: u,
|
|
31
31
|
suggestionsList: I,
|
|
32
32
|
outputCard: V,
|
|
33
33
|
promptPlaceHolder: h,
|
|
34
34
|
streaming: E,
|
|
35
35
|
loading: b,
|
|
36
36
|
onCancel: v,
|
|
37
|
-
onClose:
|
|
37
|
+
onClose: p
|
|
38
38
|
} = s, m = B(), [x, c] = e.useState(l.name), P = (t, K) => {
|
|
39
|
-
t && (
|
|
39
|
+
t && (u && u(t), c(g.name));
|
|
40
40
|
}, k = (t) => {
|
|
41
41
|
r && r(t), c(t);
|
|
42
42
|
}, R = (t) => {
|
|
43
|
-
t.key === "Escape" &&
|
|
43
|
+
t.key === "Escape" && p && p();
|
|
44
44
|
};
|
|
45
45
|
return e.useEffect(() => {
|
|
46
46
|
const t = document.querySelector(".k-prompt-view .k-textarea textarea");
|
|
@@ -48,7 +48,7 @@ const H = (s) => {
|
|
|
48
48
|
}, []), /* @__PURE__ */ e.createElement(
|
|
49
49
|
D,
|
|
50
50
|
{
|
|
51
|
-
style: { maxHeight: "
|
|
51
|
+
style: { maxHeight: "100%" },
|
|
52
52
|
activeView: o != null ? o : x,
|
|
53
53
|
onActiveViewChange: k,
|
|
54
54
|
onPromptRequest: P,
|