@progress/kendo-react-conversational-ui 14.2.1-develop.3 → 14.2.1-develop.4

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 (44) hide show
  1. package/ai-prompt/AIPrompt.d.ts +1 -1
  2. package/ai-prompt/AIPrompt.js +1 -1
  3. package/ai-prompt/AIPrompt.mjs +11 -11
  4. package/ai-prompt/AIPromptContent.d.ts +1 -1
  5. package/ai-prompt/AIPromptContent.js +1 -1
  6. package/ai-prompt/AIPromptContent.mjs +6 -6
  7. package/ai-prompt/AIPromptContext.d.ts +1 -1
  8. package/ai-prompt/AIPromptContext.js +1 -1
  9. package/ai-prompt/AIPromptContext.mjs +5 -5
  10. package/ai-prompt/AIPromptExpander.d.ts +1 -1
  11. package/ai-prompt/AIPromptExpander.js +1 -1
  12. package/ai-prompt/AIPromptExpander.mjs +3 -3
  13. package/ai-prompt/AIPromptFooter.d.ts +1 -1
  14. package/ai-prompt/AIPromptFooter.js +1 -1
  15. package/ai-prompt/AIPromptFooter.mjs +3 -3
  16. package/ai-prompt/AIPromptHeader.d.ts +1 -1
  17. package/ai-prompt/AIPromptHeader.js +1 -1
  18. package/ai-prompt/AIPromptHeader.mjs +7 -7
  19. package/ai-prompt/views/AIPromptCommandsView.d.ts +1 -1
  20. package/ai-prompt/views/AIPromptCommandsView.js +1 -1
  21. package/ai-prompt/views/AIPromptCommandsView.mjs +11 -11
  22. package/ai-prompt/views/AIPromptOutputView.d.ts +1 -1
  23. package/ai-prompt/views/AIPromptOutputView.js +1 -1
  24. package/ai-prompt/views/AIPromptOutputView.mjs +9 -9
  25. package/ai-prompt/views/AIPromptView.d.ts +1 -1
  26. package/ai-prompt/views/AIPromptView.js +2 -2
  27. package/ai-prompt/views/AIPromptView.mjs +7 -7
  28. package/ai-prompt/views/AIPromptViewRender.d.ts +1 -1
  29. package/chat/utils.d.ts +1 -1
  30. package/chat/utils.js +1 -1
  31. package/chat/utils.mjs +10 -10
  32. package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
  33. package/inline-ai-prompt/InlineAIPrompt.d.ts +1 -1
  34. package/inline-ai-prompt/InlineAIPrompt.js +1 -1
  35. package/inline-ai-prompt/InlineAIPrompt.mjs +25 -25
  36. package/inline-ai-prompt/InlineAIPromptInput.d.ts +1 -1
  37. package/inline-ai-prompt/InlineAIPromptInput.js +2 -2
  38. package/inline-ai-prompt/InlineAIPromptInput.mjs +12 -12
  39. package/inline-ai-prompt/InlineAIPromptPopup.d.ts +1 -1
  40. package/inline-ai-prompt/InlineAIPromptPopup.js +1 -1
  41. package/inline-ai-prompt/InlineAIPromptPopup.mjs +14 -14
  42. package/package-metadata.js +1 -1
  43. package/package-metadata.mjs +1 -1
  44. package/package.json +11 -11
@@ -5,11 +5,11 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { AIPromptToolbarItemInterface } from './AIPromptHeader.js';
10
9
  import { promptViewDefaults, outputViewDefaults, commandsViewDefaults } from './views/constants.js';
11
10
  import { CommandInterface } from './views/AIPromptCommandsView.js';
12
11
  import { SuggestionsView } from '../chat/components/SuggestionsGroup.js';
12
+ import * as React from 'react';
13
13
  /**
14
14
  * Props of the AIPrompt component.
15
15
  */
@@ -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=require("react"),E=require("./AIPromptHeader.js"),r=require("./views/constants.js"),b=require("./AIPromptContext.js"),t=require("@progress/kendo-react-common"),n=require("../package-metadata.js"),x=i=>{const m=!t.validatePackage(n.packageMetadata,{component:"AIPrompt"}),l=t.getLicenseMessage(n.packageMetadata),{activeView:o,toolbarItems:p,children:u,onActiveViewChange:c,onPromptRequest:d,onCommandExecute:g,style:v,dir:P,className:w,streaming:k,loading:A,onCancel:I,suggestionsView:a,...S}=i,q=p||[r.promptViewDefaults,r.outputViewDefaults],[C,V]=e.useState({activeView:o}),s={...C,activeView:o,streaming:k,loading:A,suggestionsView:a!=null?a:"classic",onCancel:I,onActiveViewChange:c,onPromptRequest:d,onCommandExecute:g},h=M=>{V(M)};return e.createElement(b.AIPromptContext.Provider,{value:[s,h]},e.createElement("div",{className:t.classNames("k-prompt",w),style:v,dir:P,...S},e.createElement(E.PromptHeader,{activeView:s.activeView,toolbarItems:q,activeViewChange:c}),u,m&&e.createElement(t.WatermarkOverlay,{message:l})))};exports.AIPrompt=x;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),O=require("./AIPromptHeader.js"),l=require("./views/constants.js"),V=require("./AIPromptContext.js"),n=require("@progress/kendo-react-common"),m=require("../package-metadata.js");function h(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const c=h(M),j=e=>{const a=!n.validatePackage(m.packageMetadata,{component:"AIPrompt"}),t=n.getLicenseMessage(m.packageMetadata),{activeView:o,toolbarItems:u,children:p,onActiveViewChange:s,onPromptRequest:d,onCommandExecute:g,style:P,dir:f,className:v,streaming:b,loading:w,onCancel:S,suggestionsView:r,...k}=e,A=u||[l.promptViewDefaults,l.outputViewDefaults],[I,q]=c.useState({activeView:o}),i={...I,activeView:o,streaming:b,loading:w,suggestionsView:r!=null?r:"classic",onCancel:S,onActiveViewChange:s,onPromptRequest:d,onCommandExecute:g},y=C=>{q(C)};return c.createElement(V.AIPromptContext.Provider,{value:[i,y]},c.createElement("div",{className:n.classNames("k-prompt",v),style:P,dir:f,...k},c.createElement(O.PromptHeader,{activeView:i.activeView,toolbarItems:A,activeViewChange:s}),p,a&&c.createElement(n.WatermarkOverlay,{message:t})))};exports.AIPrompt=j;
@@ -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 e from "react";
8
+ import * as e from "react";
9
9
  import { PromptHeader as E } from "./AIPromptHeader.mjs";
10
10
  import { promptViewDefaults as I, outputViewDefaults as x } from "./views/constants.mjs";
11
11
  import { AIPromptContext as L } from "./AIPromptContext.mjs";
@@ -18,29 +18,29 @@ const O = (c) => {
18
18
  children: l,
19
19
  onActiveViewChange: o,
20
20
  onPromptRequest: p,
21
- onCommandExecute: d,
22
- style: g,
23
- dir: u,
24
- className: v,
25
- streaming: f,
26
- loading: w,
21
+ onCommandExecute: g,
22
+ style: v,
23
+ dir: d,
24
+ className: u,
25
+ streaming: w,
26
+ loading: f,
27
27
  onCancel: P,
28
28
  suggestionsView: t,
29
29
  ...V
30
30
  } = c, h = i || [I, x], [S, k] = e.useState({ activeView: a }), r = {
31
31
  ...S,
32
32
  activeView: a,
33
- streaming: f,
34
- loading: w,
33
+ streaming: w,
34
+ loading: f,
35
35
  suggestionsView: t != null ? t : "classic",
36
36
  onCancel: P,
37
37
  onActiveViewChange: o,
38
38
  onPromptRequest: p,
39
- onCommandExecute: d
39
+ onCommandExecute: g
40
40
  }, A = (C) => {
41
41
  k(C);
42
42
  };
43
- return /* @__PURE__ */ e.createElement(L.Provider, { value: [r, A] }, /* @__PURE__ */ e.createElement("div", { className: b("k-prompt", v), style: g, dir: u, ...V }, /* @__PURE__ */ e.createElement(
43
+ return /* @__PURE__ */ e.createElement(L.Provider, { value: [r, A] }, /* @__PURE__ */ e.createElement("div", { className: b("k-prompt", u), style: v, dir: d, ...V }, /* @__PURE__ */ e.createElement(
44
44
  E,
45
45
  {
46
46
  activeView: r.activeView,
@@ -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 { default as React } from 'react';
8
+ import * as React from 'react';
9
9
  /**
10
10
  * The props of the AIPromptContent component.
11
11
  */
@@ -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 t=require("react"),g=require("@progress/kendo-svg-icons"),I=require("@progress/kendo-react-buttons"),n=require("../messages/index.js"),k=require("@progress/kendo-react-intl"),C=require("./AIPromptContext.js"),w=require("./views/constants.js"),s=t.forwardRef((i,r)=>{const{children:l,streaming:u,onCancel:e}=i,a=k.useLocalization().toLanguageString(n.aIPromptCancel,n.messages[n.aIPromptCancel]),[m]=C.useAIPromptContext(),p=m.activeView===w.outputViewDefaults.name,o=u&&p,d=t.useCallback(c=>{c.key==="Escape"&&o&&e&&(c.preventDefault(),e())},[o,e]);return t.createElement("div",{className:"k-prompt-content",ref:r,onKeyDown:d},o&&t.createElement(I.FloatingActionButton,{onClick:e,svgIcon:g.stopSmIcon,icon:"stop-sm",size:"medium",positionMode:"absolute",className:"k-prompt-stop-fab k-generating","aria-label":a,title:a}),t.createElement("div",{className:"k-prompt-view"},l))});s.displayName="KendoReactAIPromptContent";exports.AIPromptContent=s;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),f=require("@progress/kendo-svg-icons"),b=require("@progress/kendo-react-buttons"),s=require("../messages/index.js"),k=require("@progress/kendo-react-intl"),I=require("./AIPromptContext.js"),C=require("./views/constants.js");function P(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=P(g),u=o.forwardRef((e,n)=>{const{children:t,streaming:a,onCancel:c}=e,i=k.useLocalization().toLanguageString(s.aIPromptCancel,s.messages[s.aIPromptCancel]),[m]=I.useAIPromptContext(),p=m.activeView===C.outputViewDefaults.name,r=a&&p,d=o.useCallback(l=>{l.key==="Escape"&&r&&c&&(l.preventDefault(),c())},[r,c]);return o.createElement("div",{className:"k-prompt-content",ref:n,onKeyDown:d},r&&o.createElement(b.FloatingActionButton,{onClick:c,svgIcon:f.stopSmIcon,icon:"stop-sm",size:"medium",positionMode:"absolute",className:"k-prompt-stop-fab k-generating","aria-label":i,title:i}),o.createElement("div",{className:"k-prompt-view"},t))});u.displayName="KendoReactAIPromptContent";exports.AIPromptContent=u;
@@ -5,22 +5,22 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import t from "react";
8
+ import * as t from "react";
9
9
  import { stopSmIcon as f } from "@progress/kendo-svg-icons";
10
- import { FloatingActionButton as d } from "@progress/kendo-react-buttons";
11
- import { aIPromptCancel as i, messages as g } from "../messages/index.mjs";
10
+ import { FloatingActionButton as g } from "@progress/kendo-react-buttons";
11
+ import { aIPromptCancel as i, messages as d } from "../messages/index.mjs";
12
12
  import { useLocalization as w } from "@progress/kendo-react-intl";
13
13
  import { useAIPromptContext as k } from "./AIPromptContext.mjs";
14
14
  import { outputViewDefaults as C } from "./views/constants.mjs";
15
15
  const I = t.forwardRef((m, r) => {
16
- const { children: c, streaming: s, onCancel: o } = m, n = w().toLanguageString(i, g[i]), [l] = k(), p = l.activeView === C.name, e = s && p, u = t.useCallback(
16
+ const { children: s, streaming: c, onCancel: o } = m, n = w().toLanguageString(i, d[i]), [l] = k(), p = l.activeView === C.name, e = c && p, u = t.useCallback(
17
17
  (a) => {
18
18
  a.key === "Escape" && e && o && (a.preventDefault(), o());
19
19
  },
20
20
  [e, o]
21
21
  );
22
22
  return /* @__PURE__ */ t.createElement("div", { className: "k-prompt-content", ref: r, onKeyDown: u }, e && /* @__PURE__ */ t.createElement(
23
- d,
23
+ g,
24
24
  {
25
25
  onClick: o,
26
26
  svgIcon: f,
@@ -31,7 +31,7 @@ const I = t.forwardRef((m, r) => {
31
31
  "aria-label": n,
32
32
  title: n
33
33
  }
34
- ), /* @__PURE__ */ t.createElement("div", { className: "k-prompt-view" }, c));
34
+ ), /* @__PURE__ */ t.createElement("div", { className: "k-prompt-view" }, s));
35
35
  });
36
36
  I.displayName = "KendoReactAIPromptContent";
37
37
  export {
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { AIPromptOutputInterface } from './AIPrompt.js';
10
9
  import { CommandInterface } from './views/AIPromptCommandsView.js';
11
10
  import { SuggestionsView } from '../chat/components/SuggestionsGroup.js';
11
+ import * as React from 'react';
12
12
  /**
13
13
  * @hidden
14
14
  */
@@ -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 t=require("react"),e=t.createContext([{},()=>{}]),o=()=>t.useContext(e);exports.AIPromptContext=e;exports.useAIPromptContext=o;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react");function a(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const r=a(u),c=r.createContext([{},()=>{}]),s=()=>r.useContext(c);exports.AIPromptContext=c;exports.useAIPromptContext=s;
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import t from "react";
9
- const e = t.createContext([{}, () => {
10
- }]), n = () => t.useContext(e);
8
+ import * as t from "react";
9
+ const o = t.createContext([{}, () => {
10
+ }]), e = () => t.useContext(o);
11
11
  export {
12
- e as AIPromptContext,
13
- n as useAIPromptContext
12
+ o as AIPromptContext,
13
+ e as useAIPromptContext
14
14
  };
@@ -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 { default as React } from 'react';
8
+ import * as React from 'react';
9
9
  export interface AIPromptExpanderProps {
10
10
  /**
11
11
  * The content to be displayed inside the expander when it is expanded.
@@ -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 t=require("react"),d=require("@progress/kendo-react-buttons"),r=require("@progress/kendo-svg-icons"),i=n=>{const[e,c]=t.useState(!0),{children:a,title:o}=n;return t.createElement("div",{className:"k-prompt-expander"},t.createElement(d.Button,{"aria-controls":n.id,fillMode:"flat",svgIcon:e?r.chevronUpIcon:r.chevronDownIcon,title:o,onClick:()=>c(!e),"aria-expanded":e},o),e&&t.createElement("div",{id:n.id,className:"k-prompt-expander-content"},a))};exports.AIPromptExpander=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),i=require("@progress/kendo-react-buttons"),a=require("@progress/kendo-svg-icons");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=l(d),s=e=>{const[t,n]=o.useState(!0),{children:r,title:c}=e;return o.createElement("div",{className:"k-prompt-expander"},o.createElement(i.Button,{"aria-controls":e.id,fillMode:"flat",svgIcon:t?a.chevronUpIcon:a.chevronDownIcon,title:c,onClick:()=>n(!t),"aria-expanded":t},c),t&&o.createElement("div",{id:e.id,className:"k-prompt-expander-content"},r))};exports.AIPromptExpander=s;
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import t from "react";
8
+ import * as t from "react";
9
9
  import { Button as c } from "@progress/kendo-react-buttons";
10
10
  import { chevronUpIcon as d, chevronDownIcon as i } from "@progress/kendo-svg-icons";
11
- const s = (n) => {
11
+ const p = (n) => {
12
12
  const [e, r] = t.useState(!0), { children: a, title: o } = n;
13
13
  return /* @__PURE__ */ t.createElement("div", { className: "k-prompt-expander" }, /* @__PURE__ */ t.createElement(
14
14
  c,
@@ -24,5 +24,5 @@ const s = (n) => {
24
24
  ), e && /* @__PURE__ */ t.createElement("div", { id: n.id, className: "k-prompt-expander-content" }, a));
25
25
  };
26
26
  export {
27
- s as AIPromptExpander
27
+ p as AIPromptExpander
28
28
  };
@@ -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 { default as React } from 'react';
8
+ import * as React from 'react';
9
9
  /**
10
10
  * The props of the AIPromptFooter component.
11
11
  */
@@ -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 t=require("react"),r=e=>{const{children:o}=e;return t.createElement("div",{className:"k-prompt-footer"},t.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal k-prompt-actions"},o))};exports.AIPromptFooter=r;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const n=a(c),s=e=>{const{children:t}=e;return n.createElement("div",{className:"k-prompt-footer"},n.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal k-prompt-actions"},t))};exports.AIPromptFooter=s;
@@ -5,11 +5,11 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import t from "react";
9
- const a = (o) => {
8
+ import * as t from "react";
9
+ const r = (o) => {
10
10
  const { children: e } = o;
11
11
  return /* @__PURE__ */ t.createElement("div", { className: "k-prompt-footer" }, /* @__PURE__ */ t.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal k-prompt-actions" }, e));
12
12
  };
13
13
  export {
14
- a as AIPromptFooter
14
+ r as AIPromptFooter
15
15
  };
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { SVGIcon } from '@progress/kendo-svg-icons';
9
+ import * as React from 'react';
10
10
  /**
11
11
  * An interface for the AIPromptToolbarItem.
12
12
  */
@@ -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 t=require("react"),a=require("@progress/kendo-react-buttons"),s=l=>{const{activeView:r,toolbarItems:n,activeViewChange:o}=l,c=e=>{o==null||o.call(null,e)};return t.createElement("div",{className:"k-prompt-header"},t.createElement(a.Toolbar,{keyboardNavigation:!1,role:"toolbar",className:"k-toolbar-flat"},n.map(e=>t.isValidElement(e)?e:t.createElement(a.Button,{key:e.name,className:r===e.name?"k-selected":"",size:"medium",themeColor:"primary",fillMode:"flat",rounded:"full",title:e.buttonText,svgIcon:e.buttonIcon,onClick:()=>c(e.name)},e.buttonText))))};exports.PromptHeader=s;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),l=require("@progress/kendo-react-buttons");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const n=u(s),d=t=>{const{activeView:r,toolbarItems:o,activeViewChange:a}=t,c=e=>{a==null||a.call(null,e)};return n.createElement("div",{className:"k-prompt-header"},n.createElement(l.Toolbar,{keyboardNavigation:!1,role:"toolbar",className:"k-toolbar-flat"},o.map(e=>n.isValidElement(e)?e:n.createElement(l.Button,{key:e.name,className:r===e.name?"k-selected":"",size:"medium",themeColor:"primary",fillMode:"flat",rounded:"full",title:e.buttonText,svgIcon:e.buttonIcon,onClick:()=>c(e.name)},e.buttonText))))};exports.PromptHeader=d;
@@ -5,18 +5,18 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import o from "react";
9
- import { Toolbar as c, Button as m } from "@progress/kendo-react-buttons";
10
- const u = (l) => {
11
- const { activeView: a, toolbarItems: r, activeViewChange: t } = l, n = (e) => {
8
+ import * as o from "react";
9
+ import { Toolbar as c, Button as s } from "@progress/kendo-react-buttons";
10
+ const d = (a) => {
11
+ const { activeView: l, toolbarItems: r, activeViewChange: t } = a, n = (e) => {
12
12
  t == null || t.call(null, e);
13
13
  };
14
14
  return /* @__PURE__ */ o.createElement("div", { className: "k-prompt-header" }, /* @__PURE__ */ o.createElement(c, { keyboardNavigation: !1, role: "toolbar", className: "k-toolbar-flat" }, r.map(
15
15
  (e) => o.isValidElement(e) ? e : /* @__PURE__ */ o.createElement(
16
- m,
16
+ s,
17
17
  {
18
18
  key: e.name,
19
- className: a === e.name ? "k-selected" : "",
19
+ className: l === e.name ? "k-selected" : "",
20
20
  size: "medium",
21
21
  themeColor: "primary",
22
22
  fillMode: "flat",
@@ -30,5 +30,5 @@ const u = (l) => {
30
30
  )));
31
31
  };
32
32
  export {
33
- u as PromptHeader
33
+ d as PromptHeader
34
34
  };
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { SVGIcon } from '@progress/kendo-react-common';
9
+ import * as React from 'react';
10
10
  /**
11
11
  * The props of the AIPromptCommandsView component.
12
12
  */
@@ -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 n=require("react"),p=require("../AIPromptContent.js"),C=require("./AIPromptViewRender.js"),I=require("../AIPromptContext.js"),i=require("@progress/kendo-react-layout"),P=require("./constants.js"),s=t=>t==null?void 0:t.map(e=>n.createElement(i.PanelBarItem,{title:e.text,key:e.id,svgIcon:e.svgIcon,data:e},e.children&&s(e.children||[]))),d=t=>{const{commands:e}=t,[r]=I.useAIPromptContext(),u=m=>{var a,c,l;const o=(c=(a=m.target)==null?void 0:a.props)==null?void 0:c.data;(l=o.children)!=null&&l.length||r.onCommandExecute&&r.onCommandExecute.call(null,o)};return n.createElement(C.AIPromptViewRender,{name:P.commandsViewDefaults.name},n.createElement(p.AIPromptContent,{streaming:r.streaming,onCancel:r.onCancel},n.createElement("div",{className:"k-prompt-view"},n.createElement(i.PanelBar,{onSelect:u,selected:""},s(e!=null?e:[])))))};exports.AIPromptCommandsView=d;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),d=require("../AIPromptContent.js"),P=require("./AIPromptViewRender.js"),g=require("../AIPromptContext.js"),s=require("@progress/kendo-react-layout"),f=require("./constants.js");function C(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const r=C(p),u=t=>t==null?void 0:t.map(e=>r.createElement(s.PanelBarItem,{title:e.text,key:e.id,svgIcon:e.svgIcon,data:e},e.children&&u(e.children||[]))),I=t=>{const{commands:e}=t,[n]=g.useAIPromptContext(),o=m=>{var a,l,i;const c=(l=(a=m.target)==null?void 0:a.props)==null?void 0:l.data;(i=c.children)!=null&&i.length||n.onCommandExecute&&n.onCommandExecute.call(null,c)};return r.createElement(P.AIPromptViewRender,{name:f.commandsViewDefaults.name},r.createElement(d.AIPromptContent,{streaming:n.streaming,onCancel:n.onCancel},r.createElement("div",{className:"k-prompt-view"},r.createElement(s.PanelBar,{onSelect:o,selected:""},u(e!=null?e:[])))))};exports.AIPromptCommandsView=I;
@@ -5,20 +5,20 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import r from "react";
8
+ import * as r from "react";
9
9
  import { AIPromptContent as s } from "../AIPromptContent.mjs";
10
- import { AIPromptViewRender as f } from "./AIPromptViewRender.mjs";
11
- import { useAIPromptContext as u } from "../AIPromptContext.mjs";
12
- import { PanelBar as C, PanelBarItem as I } from "@progress/kendo-react-layout";
13
- import { commandsViewDefaults as d } from "./constants.mjs";
14
- const i = (t) => t == null ? void 0 : t.map((e) => /* @__PURE__ */ r.createElement(I, { title: e.text, key: e.id, svgIcon: e.svgIcon, data: e }, e.children && i(e.children || []))), w = (t) => {
15
- const { commands: e } = t, [n] = u(), c = (p) => {
16
- var l, a, m;
17
- const o = (a = (l = p.target) == null ? void 0 : l.props) == null ? void 0 : a.data;
10
+ import { AIPromptViewRender as C } from "./AIPromptViewRender.mjs";
11
+ import { useAIPromptContext as f } from "../AIPromptContext.mjs";
12
+ import { PanelBar as u, PanelBarItem as I } from "@progress/kendo-react-layout";
13
+ import { commandsViewDefaults as E } from "./constants.mjs";
14
+ const i = (t) => t == null ? void 0 : t.map((e) => /* @__PURE__ */ r.createElement(I, { title: e.text, key: e.id, svgIcon: e.svgIcon, data: e }, e.children && i(e.children || []))), h = (t) => {
15
+ const { commands: e } = t, [n] = f(), c = (p) => {
16
+ var a, l, m;
17
+ const o = (l = (a = p.target) == null ? void 0 : a.props) == null ? void 0 : l.data;
18
18
  (m = o.children) != null && m.length || n.onCommandExecute && n.onCommandExecute.call(null, o);
19
19
  };
20
- return /* @__PURE__ */ r.createElement(f, { name: d.name }, /* @__PURE__ */ r.createElement(s, { streaming: n.streaming, onCancel: n.onCancel }, /* @__PURE__ */ r.createElement("div", { className: "k-prompt-view" }, /* @__PURE__ */ r.createElement(C, { onSelect: c, selected: "" }, i(e != null ? e : [])))));
20
+ return /* @__PURE__ */ r.createElement(C, { name: E.name }, /* @__PURE__ */ r.createElement(s, { streaming: n.streaming, onCancel: n.onCancel }, /* @__PURE__ */ r.createElement("div", { className: "k-prompt-view" }, /* @__PURE__ */ r.createElement(u, { onSelect: c, selected: "" }, i(e != null ? e : [])))));
21
21
  };
22
22
  export {
23
- w as AIPromptCommandsView
23
+ h as AIPromptCommandsView
24
24
  };
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { AIPromptOutputInterface } from '../AIPrompt.js';
9
+ import * as React from 'react';
10
10
  /**
11
11
  * The fields of the AIPromptOutputView card prop.
12
12
  */
@@ -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=require("react"),q=require("../AIPromptContent.js"),w=require("../AIPromptContext.js"),m=require("../../messages/index.js"),v=require("./AIPromptViewRender.js"),n=require("@progress/kendo-react-layout"),r=require("@progress/kendo-svg-icons"),a=require("@progress/kendo-react-buttons"),x=require("@progress/kendo-react-intl"),A=require("./constants.js"),O=g=>{const[y,d]=e.useState(""),o=e.useRef(null),[l]=w.useAIPromptContext(),{outputs:s,showOutputRating:R,outputCard:I}=g,{header:u,body:p,actions:C}=I||{},b=x.useLocalization(),h=t=>{l.onPromptRequest&&l.onPromptRequest.call(null,t.prompt,{...t,isRetry:!0}),E()},P=t=>{t!=null&&t.responseContent&&navigator.clipboard.writeText(t.responseContent),d(t.id),setTimeout(()=>{d("")},1e3)},k=(t,i)=>{l.onPromptRequest&&l.onPromptRequest.call(null,t.prompt,{...t,ratingType:i,isRetry:!1}),E()},E=()=>{o&&o.current&&o.current.scrollTo({top:0,behavior:"smooth"})},T=e.createElement(n.Card,null,e.createElement(n.CardHeader,null,e.createElement(n.CardTitle,null,e.createElement("span",{className:"k-skeleton k-skeleton-text k-skeleton-pulse",style:{width:"200px"}})),e.createElement(n.CardSubtitle,null,e.createElement("span",{className:"k-skeleton k-skeleton-text k-skeleton-pulse",style:{width:"100%"}}))),e.createElement(n.CardBody,null,e.createElement("span",{className:"k-skeleton k-skeleton-rect k-skeleton-pulse",style:{height:"80px"}})),e.createElement(n.CardActions,null,e.createElement("span",{className:"k-skeleton k-skeleton-text k-skeleton-pulse",style:{width:"100%"}}))),c=s==null?void 0:s.map((t,i)=>e.createElement(n.Card,{key:`${t.id}_${i}`},e.createElement(n.CardHeader,null,u?u(t):e.createElement(e.Fragment,null,t.title&&e.createElement(n.CardTitle,null,t.title),t.subTitle&&e.createElement(n.CardSubtitle,null,t.subTitle))),e.createElement(n.CardBody,null,p?p(t):t.responseContent),e.createElement(n.CardActions,null,C?C(t):e.createElement(e.Fragment,null,e.createElement(a.Button,{size:"medium",themeColor:"primary",fillMode:"flat",rounded:"medium",title:"Copy",svgIcon:y===t.id?r.checkIcon:r.copyIcon,onClick:()=>P(t)},"Copy"),e.createElement(a.Button,{size:"medium",themeColor:"base",fillMode:"flat",rounded:"medium",title:"Retry",svgIcon:r.arrowRotateCwIcon,onClick:()=>h(t)},"Retry"),R&&e.createElement(e.Fragment,null,e.createElement("span",{className:"k-spacer"}),e.createElement(a.Button,{size:"medium",themeColor:t.ratingType==="positive"?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate up",svgIcon:r.thumbUpOutlineIcon,onClick:()=>k(t,"positive")}),e.createElement(a.Button,{size:"medium",themeColor:t.ratingType==="negative"?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate down",svgIcon:r.thumbDownOutlineIcon,onClick:()=>k(t,"negative")})))))),f=e.createElement(n.Card,null,e.createElement(n.CardBody,null,b.toLanguageString(m.aIPromptNoOutputs,m.messages[m.aIPromptNoOutputs])));return e.createElement(v.AIPromptViewRender,{name:A.outputViewDefaults.name},e.createElement(q.AIPromptContent,{ref:o,streaming:l.streaming,onCancel:l.onCancel},e.createElement("div",{className:"k-card-list"},l.loading&&T,c,(!c||c.length===0)&&!l.loading&&f)))};exports.AIPromptOutputView=O;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),O=require("../AIPromptContent.js"),q=require("../AIPromptContext.js"),p=require("../../messages/index.js"),v=require("./AIPromptViewRender.js"),n=require("@progress/kendo-react-layout"),c=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),x=require("@progress/kendo-react-intl"),A=require("./constants.js");function N(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const o in l)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(s,o,a.get?a:{enumerable:!0,get:()=>l[o]})}}return s.default=l,Object.freeze(s)}const e=N(w),S=l=>{const[s,o]=e.useState(""),a=e.useRef(null),[r]=q.useAIPromptContext(),{outputs:m,showOutputRating:R,outputCard:b}=l,{header:C,body:k,actions:g}=b||{},f=x.useLocalization(),I=t=>{r.onPromptRequest&&r.onPromptRequest.call(null,t.prompt,{...t,isRetry:!0}),E()},P=t=>{t!=null&&t.responseContent&&navigator.clipboard.writeText(t.responseContent),o(t.id),setTimeout(()=>{o("")},1e3)},y=(t,u)=>{r.onPromptRequest&&r.onPromptRequest.call(null,t.prompt,{...t,ratingType:u,isRetry:!1}),E()},E=()=>{a&&a.current&&a.current.scrollTo({top:0,behavior:"smooth"})},h=e.createElement(n.Card,null,e.createElement(n.CardHeader,null,e.createElement(n.CardTitle,null,e.createElement("span",{className:"k-skeleton k-skeleton-text k-skeleton-pulse",style:{width:"200px"}})),e.createElement(n.CardSubtitle,null,e.createElement("span",{className:"k-skeleton k-skeleton-text k-skeleton-pulse",style:{width:"100%"}}))),e.createElement(n.CardBody,null,e.createElement("span",{className:"k-skeleton k-skeleton-rect k-skeleton-pulse",style:{height:"80px"}})),e.createElement(n.CardActions,null,e.createElement("span",{className:"k-skeleton k-skeleton-text k-skeleton-pulse",style:{width:"100%"}}))),d=m==null?void 0:m.map((t,u)=>e.createElement(n.Card,{key:`${t.id}_${u}`},e.createElement(n.CardHeader,null,C?C(t):e.createElement(e.Fragment,null,t.title&&e.createElement(n.CardTitle,null,t.title),t.subTitle&&e.createElement(n.CardSubtitle,null,t.subTitle))),e.createElement(n.CardBody,null,k?k(t):t.responseContent),e.createElement(n.CardActions,null,g?g(t):e.createElement(e.Fragment,null,e.createElement(i.Button,{size:"medium",themeColor:"primary",fillMode:"flat",rounded:"medium",title:"Copy",svgIcon:s===t.id?c.checkIcon:c.copyIcon,onClick:()=>P(t)},"Copy"),e.createElement(i.Button,{size:"medium",themeColor:"base",fillMode:"flat",rounded:"medium",title:"Retry",svgIcon:c.arrowRotateCwIcon,onClick:()=>I(t)},"Retry"),R&&e.createElement(e.Fragment,null,e.createElement("span",{className:"k-spacer"}),e.createElement(i.Button,{size:"medium",themeColor:t.ratingType==="positive"?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate up",svgIcon:c.thumbUpOutlineIcon,onClick:()=>y(t,"positive")}),e.createElement(i.Button,{size:"medium",themeColor:t.ratingType==="negative"?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate down",svgIcon:c.thumbDownOutlineIcon,onClick:()=>y(t,"negative")})))))),T=e.createElement(n.Card,null,e.createElement(n.CardBody,null,f.toLanguageString(p.aIPromptNoOutputs,p.messages[p.aIPromptNoOutputs])));return e.createElement(v.AIPromptViewRender,{name:A.outputViewDefaults.name},e.createElement(O.AIPromptContent,{ref:a,streaming:r.streaming,onCancel:r.onCancel},e.createElement("div",{className:"k-card-list"},r.loading&&h,d,(!d||d.length===0)&&!r.loading&&T)))};exports.AIPromptOutputView=S;
@@ -5,18 +5,18 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import e from "react";
8
+ import * as e from "react";
9
9
  import { AIPromptContent as O } from "../AIPromptContent.mjs";
10
10
  import { useAIPromptContext as z } from "../AIPromptContext.mjs";
11
11
  import { aIPromptNoOutputs as E, messages as A } from "../../messages/index.mjs";
12
12
  import { AIPromptViewRender as q } from "./AIPromptViewRender.mjs";
13
13
  import { Card as s, CardHeader as g, CardTitle as f, CardSubtitle as y, CardBody as i, CardActions as R } from "@progress/kendo-react-layout";
14
- import { checkIcon as M, copyIcon as F, arrowRotateCwIcon as S, thumbUpOutlineIcon as V, thumbDownOutlineIcon as _ } from "@progress/kendo-svg-icons";
14
+ import { checkIcon as M, copyIcon as F, arrowRotateCwIcon as S, thumbUpOutlineIcon as V, thumbDownOutlineIcon as B } from "@progress/kendo-svg-icons";
15
15
  import { Button as r } from "@progress/kendo-react-buttons";
16
- import { useLocalization as B } from "@progress/kendo-react-intl";
17
- import { outputViewDefaults as D } from "./constants.mjs";
18
- const X = (h) => {
19
- const [b, c] = e.useState(""), l = e.useRef(null), [n] = z(), { outputs: o, showOutputRating: I, outputCard: T } = h, { header: d, body: p, actions: k } = T || {}, w = B(), v = (t) => {
16
+ import { useLocalization as D } from "@progress/kendo-react-intl";
17
+ import { outputViewDefaults as L } from "./constants.mjs";
18
+ const W = (h) => {
19
+ const [b, c] = e.useState(""), l = e.useRef(null), [n] = z(), { outputs: o, showOutputRating: I, outputCard: T } = h, { header: d, body: p, actions: k } = T || {}, w = D(), v = (t) => {
20
20
  n.onPromptRequest && n.onPromptRequest.call(null, t.prompt, { ...t, isRetry: !0 }), C();
21
21
  }, P = (t) => {
22
22
  t != null && t.responseContent && navigator.clipboard.writeText(t.responseContent), c(t.id), setTimeout(() => {
@@ -69,12 +69,12 @@ const X = (h) => {
69
69
  fillMode: "flat",
70
70
  rounded: "medium",
71
71
  title: "Rate down",
72
- svgIcon: _,
72
+ svgIcon: B,
73
73
  onClick: () => u(t, "negative")
74
74
  }
75
75
  )))))), N = /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement(i, null, w.toLanguageString(E, A[E])));
76
- return /* @__PURE__ */ e.createElement(q, { name: D.name }, /* @__PURE__ */ e.createElement(O, { ref: l, streaming: n.streaming, onCancel: n.onCancel }, /* @__PURE__ */ e.createElement("div", { className: "k-card-list" }, n.loading && x, a, (!a || a.length === 0) && !n.loading && N)));
76
+ return /* @__PURE__ */ e.createElement(q, { name: L.name }, /* @__PURE__ */ e.createElement(O, { ref: l, streaming: n.streaming, onCancel: n.onCancel }, /* @__PURE__ */ e.createElement("div", { className: "k-card-list" }, n.loading && x, a, (!a || a.length === 0) && !n.loading && N)));
77
77
  };
78
78
  export {
79
- X as AIPromptOutputView
79
+ W as AIPromptOutputView
80
80
  };
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { ButtonProps, SpeechToTextButtonProps } from '@progress/kendo-react-buttons';
10
9
  import { TextAreaProps } from '@progress/kendo-react-inputs';
11
10
  import { CustomComponent } from '@progress/kendo-react-common';
11
+ import * as React from 'react';
12
12
  /**
13
13
  * The properties of the AIPromptView component.
14
14
  */
@@ -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 e=require("react"),F=require("../AIPromptContent.js"),j=require("../AIPromptFooter.js"),A=require("@progress/kendo-react-buttons"),d=require("@progress/kendo-react-inputs"),z=require("@progress/kendo-svg-icons"),I=require("@progress/kendo-react-common"),G=require("./AIPromptViewRender.js"),O=require("../AIPromptExpander.js"),M=require("../AIPromptContext.js"),H=require("../../chat/components/SuggestionsGroup.js"),W=require("./constants.js"),D=S=>{const{promptInput:q=d.TextArea,generateButton:C=A.Button,enableSpeechToText:o=!1,promptValue:E,promptSuggestions:m}=S,[r,u]=e.useState(E||""),[s]=M.useAIPromptContext(),[R,h]=I.useCustomComponent(C),[T,f]=I.useCustomComponent(q),w=()=>{s.onPromptRequest&&s.onPromptRequest.call(null,r),u("")},l=e.useRef(null),V=t=>{u(t)};e.useEffect(()=>{var t,n;(n=(t=l.current)==null?void 0:t.element)!=null&&n.current&&requestAnimationFrame(()=>{var c,i;if((i=(c=l.current)==null?void 0:c.element)!=null&&i.current){const a=l.current.element.current;a.style.height="auto",a.style.height=`${a.scrollHeight}px`}})},[r]);const k=t=>{u(t.target.value)},b={title:"Generate",children:"Generate",svgIcon:z.sparklesIcon},y={placeholder:"Ask or generate content with AI ...",rows:2},x=Object.keys(h).length>0?h:b,v=Object.keys(f).length>0?f:y,P=t=>{const{isFinal:n,alternatives:c}=t;if(n&&c.length>0){const i=c[0].transcript,a=(()=>{const p=r,B=p&&!p.endsWith(" ")&&!p.endsWith(`
9
- `);return p+(B?" ":"")+i})();u(a)}};let g;return o&&(typeof o=="object"?g={...o,onResult:o.onResult||P}:g={onResult:P}),e.createElement(G.AIPromptViewRender,{name:W.promptViewDefaults.name},e.createElement(F.AIPromptContent,{streaming:s.streaming,onCancel:s.onCancel},e.createElement(T,{ref:l,value:r,flow:"vertical",textareaStyle:{maxHeight:"110px"},autoSize:!0,suffix:o?e.createElement(e.Fragment,null,e.createElement(d.InputSeparator,{orientation:"horizontal"}),e.createElement(d.InputSuffix,{orientation:"horizontal"},e.createElement(A.SpeechToTextButton,{fillMode:"flat",...g}))):void 0,onChange:k,...v}),m&&m.length>0&&e.createElement(O.AIPromptExpander,{title:"Prompt Suggestions"},e.createElement(H.SuggestionGroup,{suggestionsView:s.suggestionsView,suggestions:m.map((t,n)=>({id:n,text:t,description:t})),onSuggestionClick:t=>{V(t.text)}}))),e.createElement(j.AIPromptFooter,null,e.createElement(R,{themeColor:"primary",fillMode:"solid",rounded:"full",size:"medium",onClick:w,disabled:!r.trim(),...x},x.children)))};exports.AIPromptView=D;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),B=require("../AIPromptContent.js"),z=require("../AIPromptFooter.js"),q=require("@progress/kendo-react-buttons"),P=require("@progress/kendo-react-inputs"),F=require("@progress/kendo-svg-icons"),C=require("@progress/kendo-react-common"),G=require("./AIPromptViewRender.js"),M=require("../AIPromptExpander.js"),D=require("../AIPromptContext.js"),_=require("../../chat/components/SuggestionsGroup.js"),H=require("./constants.js");function W(o){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(c,r,n.get?n:{enumerable:!0,get:()=>o[r]})}}return c.default=o,Object.freeze(c)}const e=W(j),N=o=>{const{promptInput:c=P.TextArea,generateButton:r=q.Button,enableSpeechToText:n=!1,promptValue:b,promptSuggestions:f}=o,[a,p]=e.useState(b||""),[u]=D.useAIPromptContext(),[R,x]=C.useCustomComponent(r),[E,S]=C.useCustomComponent(c),T=()=>{u.onPromptRequest&&u.onPromptRequest.call(null,a),p("")},m=e.useRef(null),w=t=>{p(t)};e.useEffect(()=>{var t,s;(s=(t=m.current)==null?void 0:t.element)!=null&&s.current&&requestAnimationFrame(()=>{var l,g;if((g=(l=m.current)==null?void 0:l.element)!=null&&g.current){const i=m.current.element.current;i.style.height="auto",i.style.height=`${i.scrollHeight}px`}})},[a]);const y=t=>{p(t.target.value)},k={title:"Generate",children:"Generate",svgIcon:F.sparklesIcon},V={placeholder:"Ask or generate content with AI ...",rows:2},A=Object.keys(x).length>0?x:k,v=Object.keys(S).length>0?S:V,I=t=>{const{isFinal:s,alternatives:l}=t;if(s&&l.length>0){const g=l[0].transcript,i=(()=>{const d=a,O=d&&!d.endsWith(" ")&&!d.endsWith(`
9
+ `);return d+(O?" ":"")+g})();p(i)}};let h;return n&&(typeof n=="object"?h={...n,onResult:n.onResult||I}:h={onResult:I}),e.createElement(G.AIPromptViewRender,{name:H.promptViewDefaults.name},e.createElement(B.AIPromptContent,{streaming:u.streaming,onCancel:u.onCancel},e.createElement(E,{ref:m,value:a,flow:"vertical",textareaStyle:{maxHeight:"110px"},autoSize:!0,suffix:n?e.createElement(e.Fragment,null,e.createElement(P.InputSeparator,{orientation:"horizontal"}),e.createElement(P.InputSuffix,{orientation:"horizontal"},e.createElement(q.SpeechToTextButton,{fillMode:"flat",...h}))):void 0,onChange:y,...v}),f&&f.length>0&&e.createElement(M.AIPromptExpander,{title:"Prompt Suggestions"},e.createElement(_.SuggestionGroup,{suggestionsView:u.suggestionsView,suggestions:f.map((t,s)=>({id:s,text:t,description:t})),onSuggestionClick:t=>{w(t.text)}}))),e.createElement(z.AIPromptFooter,null,e.createElement(R,{themeColor:"primary",fillMode:"solid",rounded:"full",size:"medium",onClick:T,disabled:!a.trim(),...A},A.children)))};exports.AIPromptView=N;
@@ -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 e from "react";
8
+ import * as e from "react";
9
9
  import { AIPromptContent as B } from "../AIPromptContent.mjs";
10
10
  import { AIPromptFooter as q } from "../AIPromptFooter.mjs";
11
11
  import { Button as z, SpeechToTextButton as F } from "@progress/kendo-react-buttons";
@@ -15,9 +15,9 @@ import { useCustomComponent as P } from "@progress/kendo-react-common";
15
15
  import { AIPromptViewRender as H } from "./AIPromptViewRender.mjs";
16
16
  import { AIPromptExpander as M } from "../AIPromptExpander.mjs";
17
17
  import { useAIPromptContext as W } from "../AIPromptContext.mjs";
18
- import { SuggestionGroup as _ } from "../../chat/components/SuggestionsGroup.mjs";
19
- import { promptViewDefaults as D } from "./constants.mjs";
20
- const ne = (S) => {
18
+ import { SuggestionGroup as D } from "../../chat/components/SuggestionsGroup.mjs";
19
+ import { promptViewDefaults as J } from "./constants.mjs";
20
+ const oe = (S) => {
21
21
  const {
22
22
  promptInput: A = j,
23
23
  generateButton: E = z,
@@ -65,7 +65,7 @@ const ne = (S) => {
65
65
  onResult: n.onResult || x
66
66
  } : f = {
67
67
  onResult: x
68
- }), /* @__PURE__ */ e.createElement(H, { name: D.name }, /* @__PURE__ */ e.createElement(B, { streaming: s.streaming, onCancel: s.onCancel }, /* @__PURE__ */ e.createElement(
68
+ }), /* @__PURE__ */ e.createElement(H, { name: J.name }, /* @__PURE__ */ e.createElement(B, { streaming: s.streaming, onCancel: s.onCancel }, /* @__PURE__ */ e.createElement(
69
69
  C,
70
70
  {
71
71
  ref: m,
@@ -78,7 +78,7 @@ const ne = (S) => {
78
78
  ...k
79
79
  }
80
80
  ), p && p.length > 0 && /* @__PURE__ */ e.createElement(M, { title: "Prompt Suggestions" }, /* @__PURE__ */ e.createElement(
81
- _,
81
+ D,
82
82
  {
83
83
  suggestionsView: s.suggestionsView,
84
84
  suggestions: p.map((t, o) => ({
@@ -105,5 +105,5 @@ const ne = (S) => {
105
105
  )));
106
106
  };
107
107
  export {
108
- ne as AIPromptView
108
+ oe as AIPromptView
109
109
  };
@@ -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 { default as React } from 'react';
8
+ import * as React from 'react';
9
9
  /**
10
10
  * The props of the AIPromptViewRender component.
11
11
  */
package/chat/utils.d.ts CHANGED
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { default as React } from 'react';
9
8
  import { LocalizationService } from '@progress/kendo-react-intl';
10
9
  import { Message, User } from '../index.js';
10
+ import * as React from 'react';
11
11
  /**
12
12
  * @hidden
13
13
  */
package/chat/utils.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 d=require("react"),r=require("../messages/index.js"),g=(e,t)=>e&&t.author&&e.id===t.author.id,u=(e,t)=>{const o=t.toLanguageString("chatSender.deletedMessage",r.messages[r.chatSenderDeletedMessage]),s=t.toLanguageString("chatReceiver.deletedMessage",r.messages[r.chatReceiverDeletedMessage]);return e?o:s},h=e=>{navigator.clipboard.writeText(e)},T=(e,t)=>e.find(o=>o.id===t),p=(e,t,o=0)=>{if(!t)return;const s=t.querySelector(`[data-message-id="${e}"]`);if(!s)return;const n=t.querySelector(".k-message-list");if(n){const a=n.getBoundingClientRect().top,l=s.getBoundingClientRect().top,i=n.scrollTop+(l-a)-o;n.scrollTo({top:i,behavior:"smooth"})}else s.scrollIntoView({behavior:"smooth",block:"start"})},c=/(https?:\/\/[^\s]+)/g,M=e=>{if(!e)return[""];const t=e.split(c),o=[];return t.forEach(s=>{s&&c.test(s)?(c.lastIndex=0,o.push(d.createElement("a",{key:s,href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"}},s))):s&&o.push(s)}),o};exports.URL_REGEX=c;exports.convertTextToLinkedContent=M;exports.copyToClipboard=h;exports.getDeletedMessageText=u;exports.getMessageById=T;exports.isAuthor=g;exports.scrollToMessageById=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),r=require("../messages/index.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const u=g(d),f=(e,t)=>e&&t.author&&e.id===t.author.id,p=(e,t)=>{const s=t.toLanguageString("chatSender.deletedMessage",r.messages[r.chatSenderDeletedMessage]),o=t.toLanguageString("chatReceiver.deletedMessage",r.messages[r.chatReceiverDeletedMessage]);return e?s:o},h=e=>{navigator.clipboard.writeText(e)},T=(e,t)=>e.find(s=>s.id===t),b=(e,t,s=0)=>{if(!t)return;const o=t.querySelector(`[data-message-id="${e}"]`);if(!o)return;const n=t.querySelector(".k-message-list");if(n){const a=n.getBoundingClientRect().top,l=o.getBoundingClientRect().top,i=n.scrollTop+(l-a)-s;n.scrollTo({top:i,behavior:"smooth"})}else o.scrollIntoView({behavior:"smooth",block:"start"})},c=/(https?:\/\/[^\s]+)/g,y=e=>{if(!e)return[""];const t=e.split(c),s=[];return t.forEach(o=>{o&&c.test(o)?(c.lastIndex=0,s.push(u.createElement("a",{key:o,href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"}},o))):o&&s.push(o)}),s};exports.URL_REGEX=c;exports.convertTextToLinkedContent=y;exports.copyToClipboard=h;exports.getDeletedMessageText=p;exports.getMessageById=T;exports.isAuthor=f;exports.scrollToMessageById=b;