@progress/kendo-vue-conversational-ui 5.3.0-dev.202409130647 → 5.3.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -34
- package/ai-prompt/AIPrompt.js +8 -0
- package/ai-prompt/AIPrompt.mjs +83 -0
- package/ai-prompt/AIPromptContent.js +8 -0
- package/ai-prompt/AIPromptContent.mjs +23 -0
- package/ai-prompt/AIPromptExpander.js +8 -0
- package/ai-prompt/AIPromptExpander.mjs +51 -0
- package/ai-prompt/AIPromptFooter.js +8 -0
- package/ai-prompt/AIPromptFooter.mjs +23 -0
- package/ai-prompt/AIPromptHeader.js +8 -0
- package/ai-prompt/AIPromptHeader.mjs +70 -0
- package/ai-prompt/views/AIPromptCommandsView.js +8 -0
- package/ai-prompt/views/AIPromptCommandsView.mjs +51 -0
- package/ai-prompt/views/AIPromptOutputView.js +8 -0
- package/ai-prompt/views/AIPromptOutputView.mjs +170 -0
- package/ai-prompt/views/AIPromptView.js +8 -0
- package/ai-prompt/views/AIPromptView.mjs +112 -0
- package/ai-prompt/views/AIPromptViewRender.js +8 -0
- package/ai-prompt/views/AIPromptViewRender.mjs +28 -0
- package/dist/cdn/js/kendo-vue-conversational-ui.js +8 -1
- package/index.d.mts +378 -0
- package/index.d.ts +378 -0
- package/index.js +8 -0
- package/index.mjs +29 -0
- package/messages/main.js +8 -0
- package/messages/main.mjs +18 -0
- package/package.json +24 -50
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/ai-prompt/AIPrompt.d.ts +0 -122
- package/dist/es/ai-prompt/AIPrompt.js +0 -117
- package/dist/es/ai-prompt/AIPromptContent.d.ts +0 -47
- package/dist/es/ai-prompt/AIPromptContent.js +0 -33
- package/dist/es/ai-prompt/AIPromptExpander.d.ts +0 -45
- package/dist/es/ai-prompt/AIPromptExpander.js +0 -68
- package/dist/es/ai-prompt/AIPromptFooter.d.ts +0 -44
- package/dist/es/ai-prompt/AIPromptFooter.js +0 -33
- package/dist/es/ai-prompt/AIPromptHeader.d.ts +0 -71
- package/dist/es/ai-prompt/AIPromptHeader.js +0 -146
- package/dist/es/ai-prompt/views/AIPromptCommandsView.d.ts +0 -86
- package/dist/es/ai-prompt/views/AIPromptCommandsView.js +0 -117
- package/dist/es/ai-prompt/views/AIPromptOutputView.d.ts +0 -93
- package/dist/es/ai-prompt/views/AIPromptOutputView.js +0 -2206
- package/dist/es/ai-prompt/views/AIPromptView.d.ts +0 -56
- package/dist/es/ai-prompt/views/AIPromptView.js +0 -299
- package/dist/es/ai-prompt/views/AIPromptViewRender.d.ts +0 -51
- package/dist/es/ai-prompt/views/AIPromptViewRender.js +0 -39
- package/dist/es/main.d.ts +0 -8
- package/dist/es/main.js +0 -8
- package/dist/es/messages/main.d.ts +0 -20
- package/dist/es/messages/main.js +0 -21
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/ai-prompt/AIPrompt.d.ts +0 -122
- package/dist/esm/ai-prompt/AIPrompt.js +0 -117
- package/dist/esm/ai-prompt/AIPromptContent.d.ts +0 -47
- package/dist/esm/ai-prompt/AIPromptContent.js +0 -33
- package/dist/esm/ai-prompt/AIPromptExpander.d.ts +0 -45
- package/dist/esm/ai-prompt/AIPromptExpander.js +0 -68
- package/dist/esm/ai-prompt/AIPromptFooter.d.ts +0 -44
- package/dist/esm/ai-prompt/AIPromptFooter.js +0 -33
- package/dist/esm/ai-prompt/AIPromptHeader.d.ts +0 -71
- package/dist/esm/ai-prompt/AIPromptHeader.js +0 -146
- package/dist/esm/ai-prompt/views/AIPromptCommandsView.d.ts +0 -86
- package/dist/esm/ai-prompt/views/AIPromptCommandsView.js +0 -117
- package/dist/esm/ai-prompt/views/AIPromptOutputView.d.ts +0 -93
- package/dist/esm/ai-prompt/views/AIPromptOutputView.js +0 -2206
- package/dist/esm/ai-prompt/views/AIPromptView.d.ts +0 -56
- package/dist/esm/ai-prompt/views/AIPromptView.js +0 -299
- package/dist/esm/ai-prompt/views/AIPromptViewRender.d.ts +0 -51
- package/dist/esm/ai-prompt/views/AIPromptViewRender.js +0 -39
- package/dist/esm/main.d.ts +0 -8
- package/dist/esm/main.js +0 -8
- package/dist/esm/messages/main.d.ts +0 -20
- package/dist/esm/messages/main.js +0 -21
- package/dist/esm/package.json +0 -3
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/ai-prompt/AIPrompt.d.ts +0 -122
- package/dist/npm/ai-prompt/AIPrompt.js +0 -124
- package/dist/npm/ai-prompt/AIPromptContent.d.ts +0 -47
- package/dist/npm/ai-prompt/AIPromptContent.js +0 -40
- package/dist/npm/ai-prompt/AIPromptExpander.d.ts +0 -45
- package/dist/npm/ai-prompt/AIPromptExpander.js +0 -75
- package/dist/npm/ai-prompt/AIPromptFooter.d.ts +0 -44
- package/dist/npm/ai-prompt/AIPromptFooter.js +0 -40
- package/dist/npm/ai-prompt/AIPromptHeader.d.ts +0 -71
- package/dist/npm/ai-prompt/AIPromptHeader.js +0 -153
- package/dist/npm/ai-prompt/views/AIPromptCommandsView.d.ts +0 -86
- package/dist/npm/ai-prompt/views/AIPromptCommandsView.js +0 -124
- package/dist/npm/ai-prompt/views/AIPromptOutputView.d.ts +0 -93
- package/dist/npm/ai-prompt/views/AIPromptOutputView.js +0 -2213
- package/dist/npm/ai-prompt/views/AIPromptView.d.ts +0 -56
- package/dist/npm/ai-prompt/views/AIPromptView.js +0 -306
- package/dist/npm/ai-prompt/views/AIPromptViewRender.d.ts +0 -51
- package/dist/npm/ai-prompt/views/AIPromptViewRender.js +0 -46
- package/dist/npm/main.d.ts +0 -8
- package/dist/npm/main.js +0 -24
- package/dist/npm/messages/main.d.ts +0 -20
- package/dist/npm/messages/main.js +0 -24
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("../AIPromptContent.js"),I=require("../AIPromptFooter.js"),V=require("@progress/kendo-vue-buttons"),f=require("@progress/kendo-vue-inputs"),i=require("@progress/kendo-svg-icons"),A=require("./AIPromptViewRender.js"),P=require("../AIPromptExpander.js"),n=require("@progress/kendo-vue-common");function p(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const s={name:"prompt-view",buttonText:"Ask AI",buttonIcon:i.sparklesIcon},k=t.defineComponent({name:"KendoAIPromptView",props:{promptInput:[Object,String],generateButton:[Object,String],promptValue:String,promptSuggestions:Array},inject:{kendoAIPrompt:{default:null}},computed:{computedValue(){return this.$props.promptValue!==void 0?this.$props.promptValue:this.value}},data(){return{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 o="Generate",{promptSuggestions:r}=this.$props,a=n.templateRendering.call(this,this.$props.promptInput,n.getListeners.call(this)),c=t.createVNode(f.TextArea,{value:this.computedValue,onChange:this.onTextChange,placeholder:"Ask or generate content with AI ...",rows:2},null),d=n.getTemplate.call(this,{h:t.h,template:a,defaultRendering:c}),m=n.templateRendering.call(this,this.$props.generateButton,n.getListeners.call(this)),h=t.createVNode(V.Button,{type:"button",themeColor:"primary",fillMode:"solid","aria-hidden":"true",rounded:"full",size:"medium",onClick:this.handleOnRequest,title:"Generate",svgIcon:i.sparklesIcon},p(o)?o:{default:()=>[o]}),u=n.getTemplate.call(this,{h:t.h,template:m,defaultRendering:h});return t.createVNode(A.AIPromptViewRender,{name:s.name},{default:()=>[t.createVNode(g.AIPromptContent,null,{default:()=>[d,r&&r.length>0&&t.createVNode(P.AIPromptExpander,{title:"Prompt Suggestions"},p(e=r.map(function(l){return t.createVNode("div",{key:l,class:"k-prompt-suggestion",onClick:()=>this.handleSuggestionSelect(l)},[l])},this))?e:{default:()=>[e]})]}),t.createVNode(I.AIPromptFooter,null,p(u)?u:{default:()=>[u]})]})}});exports.AIPromptView=k;exports.promptViewDefaults=s;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as I, createVNode as e, h as i, isVNode as A } from "vue";
|
|
9
|
+
import { AIPromptContent as P } from "../AIPromptContent.mjs";
|
|
10
|
+
import { AIPromptFooter as R } from "../AIPromptFooter.mjs";
|
|
11
|
+
import { Button as S } from "@progress/kendo-vue-buttons";
|
|
12
|
+
import { TextArea as v } from "@progress/kendo-vue-inputs";
|
|
13
|
+
import { sparklesIcon as m } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { AIPromptViewRender as V } from "./AIPromptViewRender.mjs";
|
|
15
|
+
import { AIPromptExpander as k } from "../AIPromptExpander.mjs";
|
|
16
|
+
import { templateRendering as a, getListeners as u, getTemplate as s } from "@progress/kendo-vue-common";
|
|
17
|
+
function l(t) {
|
|
18
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !A(t);
|
|
19
|
+
}
|
|
20
|
+
const b = {
|
|
21
|
+
name: "prompt-view",
|
|
22
|
+
buttonText: "Ask AI",
|
|
23
|
+
buttonIcon: m
|
|
24
|
+
}, q = /* @__PURE__ */ I({
|
|
25
|
+
name: "KendoAIPromptView",
|
|
26
|
+
props: {
|
|
27
|
+
promptInput: [Object, String],
|
|
28
|
+
generateButton: [Object, String],
|
|
29
|
+
promptValue: String,
|
|
30
|
+
promptSuggestions: Array
|
|
31
|
+
},
|
|
32
|
+
inject: {
|
|
33
|
+
kendoAIPrompt: {
|
|
34
|
+
default: null
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
computedValue() {
|
|
39
|
+
return this.$props.promptValue !== void 0 ? this.$props.promptValue : this.value;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
value: ""
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
handleOnRequest() {
|
|
49
|
+
this.kendoAIPrompt.onPromptRequest && this.kendoAIPrompt.onPromptRequest.call(null, this.value), this.value = "";
|
|
50
|
+
},
|
|
51
|
+
handleSuggestionSelect(t) {
|
|
52
|
+
this.value = t;
|
|
53
|
+
},
|
|
54
|
+
onTextChange(t) {
|
|
55
|
+
this.value = t.value;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
render() {
|
|
59
|
+
let t;
|
|
60
|
+
const o = "Generate", {
|
|
61
|
+
promptSuggestions: n
|
|
62
|
+
} = this.$props, d = a.call(this, this.$props.promptInput, u.call(this)), c = e(v, {
|
|
63
|
+
value: this.computedValue,
|
|
64
|
+
onChange: this.onTextChange,
|
|
65
|
+
placeholder: "Ask or generate content with AI ...",
|
|
66
|
+
rows: 2
|
|
67
|
+
}, null), h = s.call(this, {
|
|
68
|
+
h: i,
|
|
69
|
+
template: d,
|
|
70
|
+
defaultRendering: c
|
|
71
|
+
}), g = a.call(this, this.$props.generateButton, u.call(this)), f = e(S, {
|
|
72
|
+
type: "button",
|
|
73
|
+
themeColor: "primary",
|
|
74
|
+
fillMode: "solid",
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
rounded: "full",
|
|
77
|
+
size: "medium",
|
|
78
|
+
onClick: this.handleOnRequest,
|
|
79
|
+
title: "Generate",
|
|
80
|
+
svgIcon: m
|
|
81
|
+
}, l(o) ? o : {
|
|
82
|
+
default: () => [o]
|
|
83
|
+
}), r = s.call(this, {
|
|
84
|
+
h: i,
|
|
85
|
+
template: g,
|
|
86
|
+
defaultRendering: f
|
|
87
|
+
});
|
|
88
|
+
return e(V, {
|
|
89
|
+
name: b.name
|
|
90
|
+
}, {
|
|
91
|
+
default: () => [e(P, null, {
|
|
92
|
+
default: () => [h, n && n.length > 0 && e(k, {
|
|
93
|
+
title: "Prompt Suggestions"
|
|
94
|
+
}, l(t = n.map(function(p) {
|
|
95
|
+
return e("div", {
|
|
96
|
+
key: p,
|
|
97
|
+
class: "k-prompt-suggestion",
|
|
98
|
+
onClick: () => this.handleSuggestionSelect(p)
|
|
99
|
+
}, [p]);
|
|
100
|
+
}, this)) ? t : {
|
|
101
|
+
default: () => [t]
|
|
102
|
+
})]
|
|
103
|
+
}), e(R, null, l(r) ? r : {
|
|
104
|
+
default: () => [r]
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
q as AIPromptView,
|
|
111
|
+
b as promptViewDefaults
|
|
112
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-vue-common"),n=require("vue"),o=n.defineComponent({name:"KendoAIPromptViewRender",inheritAttrs:!1,props:{name:String},inject:{kendoAIPrompt:{default:null}},render(){const e=t.getDefaultSlots(this);return this.kendoAIPrompt.activeView===this.$props.name?e:null}});exports.AIPromptViewRender=o;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { getDefaultSlots as t } from "@progress/kendo-vue-common";
|
|
9
|
+
import { defineComponent as n } from "vue";
|
|
10
|
+
const m = /* @__PURE__ */ n({
|
|
11
|
+
name: "KendoAIPromptViewRender",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
props: {
|
|
14
|
+
name: String
|
|
15
|
+
},
|
|
16
|
+
inject: {
|
|
17
|
+
kendoAIPrompt: {
|
|
18
|
+
default: null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
render() {
|
|
22
|
+
const e = t(this);
|
|
23
|
+
return this.kendoAIPrompt.activeView === this.$props.name ? e : null;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
m as AIPromptViewRender
|
|
28
|
+
};
|