@progress/kendo-vue-conversational-ui 6.1.0 → 6.1.1-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.
@@ -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 o=require("vue"),n=require("@progress/kendo-vue-common"),a=require("@progress/kendo-vue-buttons");function c(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const s=o.defineComponent({name:"KendoAIPromptHeader",props:{activeView:String,toolbarItems:Array,onActiveviewchange:Function},methods:{handleClick(e){this.$emit("activeviewchange",e)}},render(){let e;const{activeView:r,toolbarItems:l}=this.$props;return o.createVNode("div",{class:"k-prompt-header"},[o.createVNode(a.Toolbar,{keyboardNavigation:!1,class:"k-toolbar-flat"},c(e=l.map(function(t){const i=n.getTemplate.call(this,{h:o.h,template:t.content,defaultRendering:null,additionalProps:{item:t}});return t.content?i:o.createVNode(a.Button,{type:"button",key:t.name,class:n.classNames("k-toolbar-item",{"k-selected":r===t.name}),size:"medium",themeColor:"primary",fillMode:"flat",rounded:"full",title:t.buttonText,svgIcon:t.buttonIcon,"aria-hidden":"true",onClick:()=>this.handleClick(t.name)},{default:()=>[t.buttonText]})},this))?e:{default:()=>[e]})])}});exports.AIPromptHeader=s;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("@progress/kendo-vue-common"),r=require("@progress/kendo-vue-buttons");function c(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const s=o.defineComponent({name:"KendoAIPromptHeader",props:{activeView:String,toolbarItems:Array,onActiveviewchange:Function},methods:{handleClick(e){this.$emit("activeviewchange",e)}},render(){let e;const{activeView:a,toolbarItems:l}=this.$props;return o.createVNode("div",{class:"k-prompt-header"},[o.createVNode(r.Toolbar,{overflow:"none",keyboardNavigation:!1,class:"k-toolbar-flat"},c(e=l.map(function(t){const i=n.getTemplate.call(this,{h:o.h,template:t.content,defaultRendering:null,additionalProps:{item:t}});return t.content?i:o.createVNode(r.Button,{type:"button",key:t.name,class:n.classNames("k-toolbar-item",{"k-selected":a===t.name}),size:"medium",themeColor:"primary",fillMode:"flat",rounded:"full",title:t.buttonText,svgIcon:t.buttonIcon,"aria-hidden":"true",onClick:()=>this.handleClick(t.name)},{default:()=>[t.buttonText]})},this))?e:{default:()=>[e]})])}});exports.AIPromptHeader=s;
@@ -11,7 +11,7 @@ import { Toolbar as p, Button as m } from "@progress/kendo-vue-buttons";
11
11
  function u(t) {
12
12
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !c(t);
13
13
  }
14
- const k = /* @__PURE__ */ l({
14
+ const v = /* @__PURE__ */ l({
15
15
  name: "KendoAIPromptHeader",
16
16
  props: {
17
17
  activeView: String,
@@ -32,6 +32,7 @@ const k = /* @__PURE__ */ l({
32
32
  return o("div", {
33
33
  class: "k-prompt-header"
34
34
  }, [o(p, {
35
+ overflow: "none",
35
36
  keyboardNavigation: !1,
36
37
  class: "k-toolbar-flat"
37
38
  }, u(t = a.map(function(e) {
@@ -66,5 +67,5 @@ const k = /* @__PURE__ */ l({
66
67
  }
67
68
  });
68
69
  export {
69
- k as AIPromptHeader
70
+ v as AIPromptHeader
70
71
  };
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-inputs"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-layout"),require("@progress/kendo-vue-intl")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-vue-buttons","@progress/kendo-vue-inputs","@progress/kendo-svg-icons","@progress/kendo-vue-layout","@progress/kendo-vue-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueConversationalUi={},e.Vue,e.KendoVueCommon,e.KendoVueButtons,e.KendoVueInputs,e.KendoSvgIcons,e.KendoVueLayout,e.KendoVueIntl)}(this,(function(e,t,o,n,r,i,a,s){"use strict";function l(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const d=t.defineComponent({name:"KendoAIPromptHeader",props:{activeView:String,toolbarItems:Array,onActiveviewchange:Function},methods:{handleClick(e){this.$emit("activeviewchange",e)}},render(){let e;const{activeView:r,toolbarItems:i}=this.$props;return t.createVNode("div",{class:"k-prompt-header"},[t.createVNode(n.Toolbar,{keyboardNavigation:!1,class:"k-toolbar-flat"},l(e=i.map((function(e){const i=o.getTemplate.call(this,{h:t.h,template:e.content,defaultRendering:null,additionalProps:{item:e}});return e.content?i:t.createVNode(n.Button,{type:"button",key:e.name,class:o.classNames("k-toolbar-item",{"k-selected":r===e.name}),size:"medium",themeColor:"primary",fillMode:"flat",rounded:"full",title:e.buttonText,svgIcon:e.buttonIcon,"aria-hidden":"true",onClick:()=>this.handleClick(e.name)},{default:()=>[e.buttonText]})}),this))?e:{default:()=>[e]})])}}),u=t.defineComponent({name:"KendoAIPromptContent",render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-prompt-content"},[t.createVNode("div",{class:"k-prompt-view"},[e])])}}),p=t.defineComponent({name:"KendoAIPromptFooter",render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-prompt-footer"},[t.createVNode("div",{class:"k-actions k-actions-start k-actions-horizontal k-prompt-actions"},[e])])}}),c=t.defineComponent({name:"KendoAIPromptViewRender",inheritAttrs:!1,props:{name:String},inject:{kendoAIPrompt:{default:null}},render(){const e=o.getDefaultSlots(this);return this.kendoAIPrompt.activeView===this.$props.name?e:null}});function m(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const h=t.defineComponent({name:"KendoAIPromptExpander",props:{title:String},data:()=>({expanded:!0}),methods:{buttonClick(){this.expanded=!this.expanded}},render(){const e=o.getDefaultSlots(this),{title:r}=this.$props;return t.createVNode("div",{class:"k-prompt-expander"},[t.createVNode(n.Button,{type:"button",fillMode:"flat",svgIcon:this.expanded?i.chevronUpIcon:i.chevronDownIcon,title:r,onClick:this.buttonClick},m(r)?r:{default:()=>[r]}),this.expanded&&t.createVNode("div",{class:"k-prompt-expander-content"},[e])])}});function g(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const f={name:"prompt-view",buttonText:"Ask AI",buttonIcon:i.sparklesIcon},v=t.defineComponent({name:"KendoAIPromptView",props:{promptInput:[Object,String],generateButton:[Object,String],promptValue:String,promptSuggestions:Array},inject:{kendoAIPrompt:{default:null}},computed:{computedValue(){return void 0!==this.$props.promptValue?this.$props.promptValue:this.value}},data:()=>({value:""}),methods:{handleOnRequest(){this.kendoAIPrompt.onPromptRequest&&this.kendoAIPrompt.onPromptRequest.call(null,this.value),this.value=""},handleSuggestionSelect(e){this.value=e},onTextChange(e){this.value=e.value}},render(){let e;const a="Generate",{promptSuggestions:s}=this.$props,l=o.templateRendering.call(this,this.$props.promptInput,o.getListeners.call(this)),d=t.createVNode(r.TextArea,{value:this.computedValue,onChange:this.onTextChange,placeholder:"Ask or generate content with AI ...",rows:2},null),m=o.getTemplate.call(this,{h:t.h,template:l,defaultRendering:d}),v=o.templateRendering.call(this,this.$props.generateButton,o.getListeners.call(this)),V=t.createVNode(n.Button,{type:"button",themeColor:"primary",fillMode:"solid","aria-hidden":"true",rounded:"full",size:"medium",onClick:this.handleOnRequest,title:"Generate",svgIcon:i.sparklesIcon},g(a)?a:{default:()=>[a]}),I=o.getTemplate.call(this,{h:t.h,template:v,defaultRendering:V});return t.createVNode(c,{name:f.name},{default:()=>[t.createVNode(u,null,{default:()=>[m,s&&s.length>0&&t.createVNode(h,{title:"Prompt Suggestions"},g(e=s.map((function(e){return t.createVNode("div",{key:e,class:"k-prompt-suggestion",onClick:()=>this.handleSuggestionSelect(e)},[e])}),this))?e:{default:()=>[e]})]}),t.createVNode(p,null,g(I)?I:{default:()=>[I]})]})}}),V="avatar.alt",I="messageList.ariaLabel",k="aIPrompt.noOutputs",y={[V]:"Avatar",[I]:"Message list",[k]:"No output from Ai available"};function C(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}let b=function(e){return e.positive="positive",e.negative="negative",e}({});const A={name:"output-view",buttonText:"Output",buttonIcon:i.commentIcon},P=t.defineComponent({name:"KendoAIPromptOutputView",emits:{copy:null,retry:null,rating:null},props:{outputs:Array,outputCard:[String,Function,Object],showOutputRating:Boolean},inject:{kendoAIPrompt:{default:null},kendoLocalizationService:{default:null}},data:()=>({copiedIndex:-1,copyButtonIcon:i.copyIcon}),methods:{retryPrompt(e){this.$emit("retry",e),this.kendoAIPrompt.onPromptRequest&&this.kendoAIPrompt.onPromptRequest.call(null,e.prompt,{...e,isRetry:!0})},copyToClipboard(e,t){null!=e&&e.responseContent&&navigator.clipboard.writeText(e.responseContent),this.copiedIndex=t,this.copyButtonIcon=i.checkIcon,this.$emit("copy",null==e?void 0:e.responseContent),setTimeout((()=>{this.copyButtonIcon=i.copyIcon,this.copiedIndex=-1}),1e3)},outputRating(e,t){this.$emit("rating",e,t),this.kendoAIPrompt.onPromptRequest&&this.kendoAIPrompt.onPromptRequest.call(null,e.prompt,{...e,ratingType:t,isRetry:!1})}},render(){let e;const{outputs:r,showOutputRating:l,outputCard:d}=this.$props,p=s.provideLocalizationService(this),m=o.templateRendering.call(this,d,o.getListeners.call(this));return t.createVNode(c,{name:A.name},{default:()=>[t.createVNode(u,null,{default:()=>[t.createVNode("div",{class:"k-card-list"},[r&&r.length>0?r.map((function(e,r){const s=o.getTemplate.call(this,{h:t.h,template:m,defaultRendering:null,additionalProps:{output:e}});return d?s:t.createVNode(a.Card,{key:e.id,class:e.class},{default:()=>[t.createVNode(a.CardHeader,null,{default:()=>[e.title&&t.createVNode(a.CardTitle,null,{default:()=>[e.title]}),e.subTitle&&t.createVNode(a.CardSubtitle,null,{default:()=>[e.subTitle]})]}),t.createVNode(a.CardBody,null,{default:()=>[e.responseContent]}),t.createVNode(a.CardActions,null,{default:()=>[t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"primary",fillMode:"flat",rounded:"medium",title:"Copy",svgIcon:this.copiedIndex===r?this.copyButtonIcon:i.copyIcon,"aria-hidden":"true",onClick:()=>this.copyToClipboard(e,r)},{default:()=>["Copy"]}),t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"base",fillMode:"flat",rounded:"medium",title:"Retry",svgIcon:i.rotateIcon,"aria-hidden":"true",onClick:()=>this.retryPrompt(e,r)},{default:()=>["Retry"]}),l&&t.createVNode("span",{class:"k-spacer"},null),l&&t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"positive"===e.ratingType?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate up",svgIcon:i.thumbUpOutlineIcon,"aria-hidden":"true",onClick:()=>this.outputRating(e,"positive")},null),l&&t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"negative"===e.ratingType?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate down",svgIcon:i.thumbDownOutlineIcon,"aria-hidden":"true",onClick:()=>this.outputRating(e,"negative")},null)]})]})}),this):t.createVNode(a.Card,null,{default:()=>[t.createVNode(a.CardBody,null,C(e=p.toLanguageString(k,y[k]))?e:{default:()=>[e]})]})])]})]})}}),N=t.defineComponent({name:"KendoAIPrompt",props:{activeView:{type:String,required:!0},dir:String,toolbarItems:Array,outputs:Array,promptPlaceholder:String},provide(){return{kendoAIPrompt:this.$data.contextState}},data(){return{contextState:{activeView:this.$props.activeView,onActiveViewChange:this.onActiveViewChange,onPromptRequest:this.onPromptRequest,onCommandExecute:this.onCommandExecute,onStateAction:this.onStateAction}}},watch:{activeView(e){this.contextState.activeView=e}},methods:{onStateAction(e){this.contextState.activeView=e.activeView},onActiveViewChange(e){this.$emit("activeviewchange",e)},onPromptRequest(e,t){this.$emit("promptrequest",e,t)},onCommandExecute(e){this.$emit("commandexecute",e)}},render(){const e=o.getDefaultSlots(this),{toolbarItems:n,dir:r}=this.$props,i=(n||[f,A]).map((e=>{const t=o.templateRendering.call(this,e.content,o.getListeners.call(this));return{...e,content:t}}));return t.createVNode("div",{class:"k-prompt",dir:r},[t.createVNode(d,{activeView:this.contextState.activeView,toolbarItems:i,onActiveviewchange:this.onActiveViewChange},null),e])}}),w={name:"commands-view",buttonIcon:i.moreHorizontalIcon},S=t.defineComponent({name:"KendoAIPromptCommandsView",props:{commands:Array},inject:{kendoAIPrompt:{default:null}},render(){const{commands:e}=this.$props,o=e=>{var t;const o=e.target;(null==(t=o.items)||!t.length)&&this.kendoAIPrompt.onCommandExecute&&(this.$emit("commandexecute",o),this.kendoAIPrompt.onCommandExecute.call(null,o))};return t.createVNode(c,{name:w.name},{default:()=>[t.createVNode(u,null,{default:()=>[t.createVNode("div",{class:"k-prompt-view"},[t.createVNode(a.PanelBar,{onSelect:o,items:e},null)])]})]})}});e.AIPrompt=N,e.AIPromptCommandsView=S,e.AIPromptContent=u,e.AIPromptFooter=p,e.AIPromptHeader=d,e.AIPromptOutputRating=b,e.AIPromptOutputView=P,e.AIPromptView=v,e.AIPromptViewRender=c,e.commandsViewDefaults=w,e.outputViewDefaults=A,e.promptViewDefaults=f}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-inputs"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-layout"),require("@progress/kendo-vue-intl")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-vue-buttons","@progress/kendo-vue-inputs","@progress/kendo-svg-icons","@progress/kendo-vue-layout","@progress/kendo-vue-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueConversationalUi={},e.Vue,e.KendoVueCommon,e.KendoVueButtons,e.KendoVueInputs,e.KendoSvgIcons,e.KendoVueLayout,e.KendoVueIntl)}(this,(function(e,t,o,n,r,i,a,s){"use strict";function l(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const d=t.defineComponent({name:"KendoAIPromptHeader",props:{activeView:String,toolbarItems:Array,onActiveviewchange:Function},methods:{handleClick(e){this.$emit("activeviewchange",e)}},render(){let e;const{activeView:r,toolbarItems:i}=this.$props;return t.createVNode("div",{class:"k-prompt-header"},[t.createVNode(n.Toolbar,{overflow:"none",keyboardNavigation:!1,class:"k-toolbar-flat"},l(e=i.map((function(e){const i=o.getTemplate.call(this,{h:t.h,template:e.content,defaultRendering:null,additionalProps:{item:e}});return e.content?i:t.createVNode(n.Button,{type:"button",key:e.name,class:o.classNames("k-toolbar-item",{"k-selected":r===e.name}),size:"medium",themeColor:"primary",fillMode:"flat",rounded:"full",title:e.buttonText,svgIcon:e.buttonIcon,"aria-hidden":"true",onClick:()=>this.handleClick(e.name)},{default:()=>[e.buttonText]})}),this))?e:{default:()=>[e]})])}}),u=t.defineComponent({name:"KendoAIPromptContent",render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-prompt-content"},[t.createVNode("div",{class:"k-prompt-view"},[e])])}}),p=t.defineComponent({name:"KendoAIPromptFooter",render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-prompt-footer"},[t.createVNode("div",{class:"k-actions k-actions-start k-actions-horizontal k-prompt-actions"},[e])])}}),c=t.defineComponent({name:"KendoAIPromptViewRender",inheritAttrs:!1,props:{name:String},inject:{kendoAIPrompt:{default:null}},render(){const e=o.getDefaultSlots(this);return this.kendoAIPrompt.activeView===this.$props.name?e:null}});function m(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const h=t.defineComponent({name:"KendoAIPromptExpander",props:{title:String},data:()=>({expanded:!0}),methods:{buttonClick(){this.expanded=!this.expanded}},render(){const e=o.getDefaultSlots(this),{title:r}=this.$props;return t.createVNode("div",{class:"k-prompt-expander"},[t.createVNode(n.Button,{type:"button",fillMode:"flat",svgIcon:this.expanded?i.chevronUpIcon:i.chevronDownIcon,title:r,onClick:this.buttonClick},m(r)?r:{default:()=>[r]}),this.expanded&&t.createVNode("div",{class:"k-prompt-expander-content"},[e])])}});function g(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const f={name:"prompt-view",buttonText:"Ask AI",buttonIcon:i.sparklesIcon},v=t.defineComponent({name:"KendoAIPromptView",props:{promptInput:[Object,String],generateButton:[Object,String],promptValue:String,promptSuggestions:Array},inject:{kendoAIPrompt:{default:null}},computed:{computedValue(){return void 0!==this.$props.promptValue?this.$props.promptValue:this.value}},data:()=>({value:""}),methods:{handleOnRequest(){this.kendoAIPrompt.onPromptRequest&&this.kendoAIPrompt.onPromptRequest.call(null,this.value),this.value=""},handleSuggestionSelect(e){this.value=e},onTextChange(e){this.value=e.value}},render(){let e;const a="Generate",{promptSuggestions:s}=this.$props,l=o.templateRendering.call(this,this.$props.promptInput,o.getListeners.call(this)),d=t.createVNode(r.TextArea,{value:this.computedValue,onChange:this.onTextChange,placeholder:"Ask or generate content with AI ...",rows:2},null),m=o.getTemplate.call(this,{h:t.h,template:l,defaultRendering:d}),v=o.templateRendering.call(this,this.$props.generateButton,o.getListeners.call(this)),V=t.createVNode(n.Button,{type:"button",themeColor:"primary",fillMode:"solid","aria-hidden":"true",rounded:"full",size:"medium",onClick:this.handleOnRequest,title:"Generate",svgIcon:i.sparklesIcon},g(a)?a:{default:()=>[a]}),I=o.getTemplate.call(this,{h:t.h,template:v,defaultRendering:V});return t.createVNode(c,{name:f.name},{default:()=>[t.createVNode(u,null,{default:()=>[m,s&&s.length>0&&t.createVNode(h,{title:"Prompt Suggestions"},g(e=s.map((function(e){return t.createVNode("div",{key:e,class:"k-prompt-suggestion",onClick:()=>this.handleSuggestionSelect(e)},[e])}),this))?e:{default:()=>[e]})]}),t.createVNode(p,null,g(I)?I:{default:()=>[I]})]})}}),V="avatar.alt",I="messageList.ariaLabel",k="aIPrompt.noOutputs",y={[V]:"Avatar",[I]:"Message list",[k]:"No output from Ai available"};function C(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}let b=function(e){return e.positive="positive",e.negative="negative",e}({});const A={name:"output-view",buttonText:"Output",buttonIcon:i.commentIcon},P=t.defineComponent({name:"KendoAIPromptOutputView",emits:{copy:null,retry:null,rating:null},props:{outputs:Array,outputCard:[String,Function,Object],showOutputRating:Boolean},inject:{kendoAIPrompt:{default:null},kendoLocalizationService:{default:null}},data:()=>({copiedIndex:-1,copyButtonIcon:i.copyIcon}),methods:{retryPrompt(e){this.$emit("retry",e),this.kendoAIPrompt.onPromptRequest&&this.kendoAIPrompt.onPromptRequest.call(null,e.prompt,{...e,isRetry:!0})},copyToClipboard(e,t){null!=e&&e.responseContent&&navigator.clipboard.writeText(e.responseContent),this.copiedIndex=t,this.copyButtonIcon=i.checkIcon,this.$emit("copy",null==e?void 0:e.responseContent),setTimeout((()=>{this.copyButtonIcon=i.copyIcon,this.copiedIndex=-1}),1e3)},outputRating(e,t){this.$emit("rating",e,t),this.kendoAIPrompt.onPromptRequest&&this.kendoAIPrompt.onPromptRequest.call(null,e.prompt,{...e,ratingType:t,isRetry:!1})}},render(){let e;const{outputs:r,showOutputRating:l,outputCard:d}=this.$props,p=s.provideLocalizationService(this),m=o.templateRendering.call(this,d,o.getListeners.call(this));return t.createVNode(c,{name:A.name},{default:()=>[t.createVNode(u,null,{default:()=>[t.createVNode("div",{class:"k-card-list"},[r&&r.length>0?r.map((function(e,r){const s=o.getTemplate.call(this,{h:t.h,template:m,defaultRendering:null,additionalProps:{output:e}});return d?s:t.createVNode(a.Card,{key:e.id,class:e.class},{default:()=>[t.createVNode(a.CardHeader,null,{default:()=>[e.title&&t.createVNode(a.CardTitle,null,{default:()=>[e.title]}),e.subTitle&&t.createVNode(a.CardSubtitle,null,{default:()=>[e.subTitle]})]}),t.createVNode(a.CardBody,null,{default:()=>[e.responseContent]}),t.createVNode(a.CardActions,null,{default:()=>[t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"primary",fillMode:"flat",rounded:"medium",title:"Copy",svgIcon:this.copiedIndex===r?this.copyButtonIcon:i.copyIcon,"aria-hidden":"true",onClick:()=>this.copyToClipboard(e,r)},{default:()=>["Copy"]}),t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"base",fillMode:"flat",rounded:"medium",title:"Retry",svgIcon:i.rotateIcon,"aria-hidden":"true",onClick:()=>this.retryPrompt(e,r)},{default:()=>["Retry"]}),l&&t.createVNode("span",{class:"k-spacer"},null),l&&t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"positive"===e.ratingType?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate up",svgIcon:i.thumbUpOutlineIcon,"aria-hidden":"true",onClick:()=>this.outputRating(e,"positive")},null),l&&t.createVNode(n.Button,{type:"button",size:"medium",themeColor:"negative"===e.ratingType?"primary":"base",fillMode:"flat",rounded:"medium",title:"Rate down",svgIcon:i.thumbDownOutlineIcon,"aria-hidden":"true",onClick:()=>this.outputRating(e,"negative")},null)]})]})}),this):t.createVNode(a.Card,null,{default:()=>[t.createVNode(a.CardBody,null,C(e=p.toLanguageString(k,y[k]))?e:{default:()=>[e]})]})])]})]})}}),w=t.defineComponent({name:"KendoAIPrompt",props:{activeView:{type:String,required:!0},dir:String,toolbarItems:Array,outputs:Array,promptPlaceholder:String},provide(){return{kendoAIPrompt:this.$data.contextState}},data(){return{contextState:{activeView:this.$props.activeView,onActiveViewChange:this.onActiveViewChange,onPromptRequest:this.onPromptRequest,onCommandExecute:this.onCommandExecute,onStateAction:this.onStateAction}}},watch:{activeView(e){this.contextState.activeView=e}},methods:{onStateAction(e){this.contextState.activeView=e.activeView},onActiveViewChange(e){this.$emit("activeviewchange",e)},onPromptRequest(e,t){this.$emit("promptrequest",e,t)},onCommandExecute(e){this.$emit("commandexecute",e)}},render(){const e=o.getDefaultSlots(this),{toolbarItems:n,dir:r}=this.$props,i=(n||[f,A]).map((e=>{const t=o.templateRendering.call(this,e.content,o.getListeners.call(this));return{...e,content:t}}));return t.createVNode("div",{class:"k-prompt",dir:r},[t.createVNode(d,{activeView:this.contextState.activeView,toolbarItems:i,onActiveviewchange:this.onActiveViewChange},null),e])}}),N={name:"commands-view",buttonIcon:i.moreHorizontalIcon},S=t.defineComponent({name:"KendoAIPromptCommandsView",props:{commands:Array},inject:{kendoAIPrompt:{default:null}},render(){const{commands:e}=this.$props,o=e=>{var t;const o=e.target;(null==(t=o.items)||!t.length)&&this.kendoAIPrompt.onCommandExecute&&(this.$emit("commandexecute",o),this.kendoAIPrompt.onCommandExecute.call(null,o))};return t.createVNode(c,{name:N.name},{default:()=>[t.createVNode(u,null,{default:()=>[t.createVNode("div",{class:"k-prompt-view"},[t.createVNode(a.PanelBar,{onSelect:o,items:e},null)])]})]})}});e.AIPrompt=w,e.AIPromptCommandsView=S,e.AIPromptContent=u,e.AIPromptFooter=p,e.AIPromptHeader=d,e.AIPromptOutputRating=b,e.AIPromptOutputView=P,e.AIPromptView=v,e.AIPromptViewRender=c,e.commandsViewDefaults=N,e.outputViewDefaults=A,e.promptViewDefaults=f}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-conversational-ui",
3
- "version": "6.1.0",
3
+ "version": "6.1.1-develop.2",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -19,11 +19,11 @@
19
19
  "sideEffects": false,
20
20
  "peerDependencies": {
21
21
  "@progress/kendo-licensing": "^1.4.0",
22
- "@progress/kendo-vue-buttons": "6.1.0",
23
- "@progress/kendo-vue-common": "6.1.0",
24
- "@progress/kendo-vue-intl": "6.1.0",
25
- "@progress/kendo-vue-inputs": "6.1.0",
26
- "@progress/kendo-vue-layout": "6.1.0",
22
+ "@progress/kendo-vue-buttons": "6.1.1-develop.2",
23
+ "@progress/kendo-vue-common": "6.1.1-develop.2",
24
+ "@progress/kendo-vue-intl": "6.1.1-develop.2",
25
+ "@progress/kendo-vue-inputs": "6.1.1-develop.2",
26
+ "@progress/kendo-vue-layout": "6.1.1-develop.2",
27
27
  "@progress/kendo-svg-icons": "^4.0.0",
28
28
  "vue": "^3.0.2"
29
29
  },