@progress/kendo-vue-conversational-ui 5.3.0-dev.202410141143 → 5.3.0-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.
- 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
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
-
declare type DefaultMethods<V> = {
|
|
4
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
-
};
|
|
6
|
-
import { AIPromptToolbarItemInterface } from '../AIPromptHeader';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
interface AIPromptViewProps {
|
|
11
|
-
promptInput?: any;
|
|
12
|
-
generateButton?: any;
|
|
13
|
-
promptValue?: string;
|
|
14
|
-
promptSuggestions?: string[];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Specifies the default values for Prompt view Toolbar.
|
|
18
|
-
*/
|
|
19
|
-
export declare const promptViewDefaults: AIPromptToolbarItemInterface;
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
interface AIPromptViewState {
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
interface AIPromptViewData {
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export interface AIPromptViewMethods {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
export interface AIPromptViewComputed {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
computedValue: object;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
export interface AIPromptViewAll extends AIPromptViewMethods, AIPromptViewState, AIPromptViewData, AIPromptViewComputed, Vue2type {
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
declare const AIPromptViewVue2: ComponentOptions<Vue2type, DefaultData<AIPromptViewData>, DefaultMethods<AIPromptViewAll>, AIPromptViewComputed, RecordPropsDefinition<AIPromptViewProps>>;
|
|
52
|
-
/**
|
|
53
|
-
* @hidden
|
|
54
|
-
*/
|
|
55
|
-
declare const AIPromptView: DefineComponent<AIPromptViewProps, any, AIPromptViewData, AIPromptViewComputed, AIPromptViewMethods, {}, {}, {}, string, AIPromptViewProps, AIPromptViewProps, {}>;
|
|
56
|
-
export { AIPromptView, AIPromptViewVue2 };
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import * as Vue from 'vue';
|
|
3
|
-
var allVue = Vue;
|
|
4
|
-
var gh = allVue.h;
|
|
5
|
-
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
-
import { AIPromptContent } from '../AIPromptContent.js';
|
|
7
|
-
import { AIPromptFooter } from '../AIPromptFooter.js';
|
|
8
|
-
import { Button } from '@progress/kendo-vue-buttons';
|
|
9
|
-
import { TextArea } from '@progress/kendo-vue-inputs';
|
|
10
|
-
import { sparklesIcon } from '@progress/kendo-svg-icons';
|
|
11
|
-
import { AIPromptViewRender } from './AIPromptViewRender.js';
|
|
12
|
-
import { AIPromptExpander } from '../AIPromptExpander.js';
|
|
13
|
-
import { getListeners, getTemplate, templateRendering } from '@progress/kendo-vue-common';
|
|
14
|
-
/**
|
|
15
|
-
* Specifies the default values for Prompt view Toolbar.
|
|
16
|
-
*/
|
|
17
|
-
export var promptViewDefaults = {
|
|
18
|
-
name: 'prompt-view',
|
|
19
|
-
buttonText: 'Ask AI',
|
|
20
|
-
buttonIcon: sparklesIcon
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
var AIPromptViewVue2 = {
|
|
26
|
-
name: 'KendoAIPromptView',
|
|
27
|
-
props: {
|
|
28
|
-
promptInput: [Object, String],
|
|
29
|
-
generateButton: [Object, String],
|
|
30
|
-
promptValue: String,
|
|
31
|
-
promptSuggestions: Array
|
|
32
|
-
},
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
setup: !isV3 ? undefined : function () {
|
|
35
|
-
var v3 = !!isV3;
|
|
36
|
-
return {
|
|
37
|
-
v3: v3
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
inject: {
|
|
41
|
-
kendoAIPrompt: {
|
|
42
|
-
default: null
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
computedValue: function computedValue() {
|
|
47
|
-
return this.$props.promptValue !== undefined ? this.$props.promptValue : this.value;
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
data: function data() {
|
|
51
|
-
return {
|
|
52
|
-
value: ''
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
handleOnRequest: function handleOnRequest() {
|
|
57
|
-
if (this.kendoAIPrompt.onPromptRequest) {
|
|
58
|
-
this.kendoAIPrompt.onPromptRequest.call(null, this.value);
|
|
59
|
-
}
|
|
60
|
-
this.value = '';
|
|
61
|
-
},
|
|
62
|
-
handleSuggestionSelect: function handleSuggestionSelect(suggestion) {
|
|
63
|
-
this.value = suggestion;
|
|
64
|
-
},
|
|
65
|
-
onTextChange: function onTextChange(event) {
|
|
66
|
-
this.value = event.value;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
render: function render(createElement) {
|
|
70
|
-
var _this2 = this;
|
|
71
|
-
var h = gh || createElement;
|
|
72
|
-
var buttonText = 'Generate';
|
|
73
|
-
var promptSuggestions = this.$props.promptSuggestions;
|
|
74
|
-
var promptInput = templateRendering.call(this, this.$props.promptInput, getListeners.call(this));
|
|
75
|
-
var promptInputDefaultRendering = h(TextArea, {
|
|
76
|
-
value: this.computedValue,
|
|
77
|
-
attrs: this.v3 ? undefined : {
|
|
78
|
-
value: this.computedValue,
|
|
79
|
-
placeholder: 'Ask or generate content with AI ...',
|
|
80
|
-
rows: 2
|
|
81
|
-
},
|
|
82
|
-
onChange: this.onTextChange,
|
|
83
|
-
on: this.v3 ? undefined : {
|
|
84
|
-
"change": this.onTextChange
|
|
85
|
-
},
|
|
86
|
-
placeholder: 'Ask or generate content with AI ...',
|
|
87
|
-
rows: 2
|
|
88
|
-
});
|
|
89
|
-
var promptInputRendering = getTemplate.call(this, {
|
|
90
|
-
h: h,
|
|
91
|
-
template: promptInput,
|
|
92
|
-
defaultRendering: promptInputDefaultRendering
|
|
93
|
-
});
|
|
94
|
-
var generateButton = templateRendering.call(this, this.$props.generateButton, getListeners.call(this));
|
|
95
|
-
var generateButtonDefaultRendering =
|
|
96
|
-
// @ts-ignore function children
|
|
97
|
-
h(Button, {
|
|
98
|
-
type: 'button',
|
|
99
|
-
attrs: this.v3 ? undefined : {
|
|
100
|
-
type: 'button',
|
|
101
|
-
themeColor: "primary",
|
|
102
|
-
fillMode: "solid",
|
|
103
|
-
"aria-hidden": "true",
|
|
104
|
-
rounded: "full",
|
|
105
|
-
size: "medium",
|
|
106
|
-
title: 'Generate',
|
|
107
|
-
svgIcon: sparklesIcon
|
|
108
|
-
},
|
|
109
|
-
themeColor: "primary",
|
|
110
|
-
fillMode: "solid",
|
|
111
|
-
"aria-hidden": "true",
|
|
112
|
-
rounded: "full",
|
|
113
|
-
size: "medium",
|
|
114
|
-
onClick: this.handleOnRequest,
|
|
115
|
-
on: this.v3 ? undefined : {
|
|
116
|
-
"click": this.handleOnRequest
|
|
117
|
-
},
|
|
118
|
-
title: 'Generate',
|
|
119
|
-
svgIcon: sparklesIcon
|
|
120
|
-
}, this.v3 ? function () {
|
|
121
|
-
return [buttonText];
|
|
122
|
-
} : [buttonText]);
|
|
123
|
-
var generateButtonRendering = getTemplate.call(this, {
|
|
124
|
-
h: h,
|
|
125
|
-
template: generateButton,
|
|
126
|
-
defaultRendering: generateButtonDefaultRendering
|
|
127
|
-
});
|
|
128
|
-
return (
|
|
129
|
-
// @ts-ignore function children
|
|
130
|
-
h(AIPromptViewRender, {
|
|
131
|
-
name: promptViewDefaults.name,
|
|
132
|
-
attrs: this.v3 ? undefined : {
|
|
133
|
-
name: promptViewDefaults.name
|
|
134
|
-
}
|
|
135
|
-
}, this.v3 ? function () {
|
|
136
|
-
return [
|
|
137
|
-
// @ts-ignore function children
|
|
138
|
-
h(AIPromptContent, _this2.v3 ? function () {
|
|
139
|
-
return [promptInputRendering, promptSuggestions && promptSuggestions.length > 0 &&
|
|
140
|
-
// @ts-ignore function children
|
|
141
|
-
h(AIPromptExpander, {
|
|
142
|
-
title: 'Prompt Suggestions',
|
|
143
|
-
attrs: _this2.v3 ? undefined : {
|
|
144
|
-
title: 'Prompt Suggestions'
|
|
145
|
-
}
|
|
146
|
-
}, _this2.v3 ? function () {
|
|
147
|
-
return [promptSuggestions.map(function (suggestion) {
|
|
148
|
-
var _this = this;
|
|
149
|
-
return h("div", {
|
|
150
|
-
key: suggestion,
|
|
151
|
-
"class": "k-prompt-suggestion",
|
|
152
|
-
onClick: function onClick() {
|
|
153
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
154
|
-
},
|
|
155
|
-
on: this.v3 ? undefined : {
|
|
156
|
-
"click": function onClick() {
|
|
157
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}, [suggestion]);
|
|
161
|
-
}, _this2)];
|
|
162
|
-
} : [promptSuggestions.map(function (suggestion) {
|
|
163
|
-
var _this = this;
|
|
164
|
-
return h("div", {
|
|
165
|
-
key: suggestion,
|
|
166
|
-
"class": "k-prompt-suggestion",
|
|
167
|
-
onClick: function onClick() {
|
|
168
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
169
|
-
},
|
|
170
|
-
on: this.v3 ? undefined : {
|
|
171
|
-
"click": function onClick() {
|
|
172
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}, [suggestion]);
|
|
176
|
-
}, _this2)])];
|
|
177
|
-
} : [promptInputRendering, promptSuggestions && promptSuggestions.length > 0 && h(AIPromptExpander, {
|
|
178
|
-
title: 'Prompt Suggestions',
|
|
179
|
-
attrs: _this2.v3 ? undefined : {
|
|
180
|
-
title: 'Prompt Suggestions'
|
|
181
|
-
}
|
|
182
|
-
}, _this2.v3 ? function () {
|
|
183
|
-
return [promptSuggestions.map(function (suggestion) {
|
|
184
|
-
var _this = this;
|
|
185
|
-
return h("div", {
|
|
186
|
-
key: suggestion,
|
|
187
|
-
"class": "k-prompt-suggestion",
|
|
188
|
-
onClick: function onClick() {
|
|
189
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
190
|
-
},
|
|
191
|
-
on: this.v3 ? undefined : {
|
|
192
|
-
"click": function onClick() {
|
|
193
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}, [suggestion]);
|
|
197
|
-
}, _this2)];
|
|
198
|
-
} : [promptSuggestions.map(function (suggestion) {
|
|
199
|
-
var _this = this;
|
|
200
|
-
return h("div", {
|
|
201
|
-
key: suggestion,
|
|
202
|
-
"class": "k-prompt-suggestion",
|
|
203
|
-
onClick: function onClick() {
|
|
204
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
205
|
-
},
|
|
206
|
-
on: this.v3 ? undefined : {
|
|
207
|
-
"click": function onClick() {
|
|
208
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}, [suggestion]);
|
|
212
|
-
}, _this2)])]),
|
|
213
|
-
// @ts-ignore function children
|
|
214
|
-
h(AIPromptFooter, _this2.v3 ? function () {
|
|
215
|
-
return [generateButtonRendering];
|
|
216
|
-
} : [generateButtonRendering])];
|
|
217
|
-
} : [h(AIPromptContent, _this2.v3 ? function () {
|
|
218
|
-
return [promptInputRendering, promptSuggestions && promptSuggestions.length > 0 && h(AIPromptExpander, {
|
|
219
|
-
title: 'Prompt Suggestions',
|
|
220
|
-
attrs: _this2.v3 ? undefined : {
|
|
221
|
-
title: 'Prompt Suggestions'
|
|
222
|
-
}
|
|
223
|
-
}, _this2.v3 ? function () {
|
|
224
|
-
return [promptSuggestions.map(function (suggestion) {
|
|
225
|
-
var _this = this;
|
|
226
|
-
return h("div", {
|
|
227
|
-
key: suggestion,
|
|
228
|
-
"class": "k-prompt-suggestion",
|
|
229
|
-
onClick: function onClick() {
|
|
230
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
231
|
-
},
|
|
232
|
-
on: this.v3 ? undefined : {
|
|
233
|
-
"click": function onClick() {
|
|
234
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}, [suggestion]);
|
|
238
|
-
}, _this2)];
|
|
239
|
-
} : [promptSuggestions.map(function (suggestion) {
|
|
240
|
-
var _this = this;
|
|
241
|
-
return h("div", {
|
|
242
|
-
key: suggestion,
|
|
243
|
-
"class": "k-prompt-suggestion",
|
|
244
|
-
onClick: function onClick() {
|
|
245
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
246
|
-
},
|
|
247
|
-
on: this.v3 ? undefined : {
|
|
248
|
-
"click": function onClick() {
|
|
249
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}, [suggestion]);
|
|
253
|
-
}, _this2)])];
|
|
254
|
-
} : [promptInputRendering, promptSuggestions && promptSuggestions.length > 0 && h(AIPromptExpander, {
|
|
255
|
-
title: 'Prompt Suggestions',
|
|
256
|
-
attrs: _this2.v3 ? undefined : {
|
|
257
|
-
title: 'Prompt Suggestions'
|
|
258
|
-
}
|
|
259
|
-
}, _this2.v3 ? function () {
|
|
260
|
-
return [promptSuggestions.map(function (suggestion) {
|
|
261
|
-
var _this = this;
|
|
262
|
-
return h("div", {
|
|
263
|
-
key: suggestion,
|
|
264
|
-
"class": "k-prompt-suggestion",
|
|
265
|
-
onClick: function onClick() {
|
|
266
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
267
|
-
},
|
|
268
|
-
on: this.v3 ? undefined : {
|
|
269
|
-
"click": function onClick() {
|
|
270
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}, [suggestion]);
|
|
274
|
-
}, _this2)];
|
|
275
|
-
} : [promptSuggestions.map(function (suggestion) {
|
|
276
|
-
var _this = this;
|
|
277
|
-
return h("div", {
|
|
278
|
-
key: suggestion,
|
|
279
|
-
"class": "k-prompt-suggestion",
|
|
280
|
-
onClick: function onClick() {
|
|
281
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
282
|
-
},
|
|
283
|
-
on: this.v3 ? undefined : {
|
|
284
|
-
"click": function onClick() {
|
|
285
|
-
return _this.handleSuggestionSelect(suggestion);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}, [suggestion]);
|
|
289
|
-
}, _this2)])]), h(AIPromptFooter, _this2.v3 ? function () {
|
|
290
|
-
return [generateButtonRendering];
|
|
291
|
-
} : [generateButtonRendering])])
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
/**
|
|
296
|
-
* @hidden
|
|
297
|
-
*/
|
|
298
|
-
var AIPromptView = AIPromptViewVue2;
|
|
299
|
-
export { AIPromptView, AIPromptViewVue2 };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
-
declare type DefaultMethods<V> = {
|
|
4
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The props of the AIPromptViewRender component.
|
|
8
|
-
*/
|
|
9
|
-
export interface AIPromptViewRenderProps {
|
|
10
|
-
/**
|
|
11
|
-
* Specifies the name of the view.
|
|
12
|
-
*/
|
|
13
|
-
name: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
interface AIPromptViewRenderState {
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
interface AIPromptViewRenderData {
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
export interface AIPromptViewRenderMethods {
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
export interface AIPromptViewRenderComputed {
|
|
35
|
-
[key: string]: any;
|
|
36
|
-
wrapperClass: object;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
*/
|
|
41
|
-
export interface AIPromptViewRenderAll extends AIPromptViewRenderMethods, AIPromptViewRenderState, AIPromptViewRenderData, AIPromptViewRenderComputed, Vue2type {
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
declare const AIPromptViewRenderVue2: ComponentOptions<Vue2type, DefaultData<AIPromptViewRenderData>, DefaultMethods<AIPromptViewRenderAll>, AIPromptViewRenderComputed, RecordPropsDefinition<AIPromptViewRenderProps>>;
|
|
47
|
-
/**
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
declare const AIPromptViewRender: DefineComponent<AIPromptViewRenderProps, any, AIPromptViewRenderData, AIPromptViewRenderComputed, AIPromptViewRenderMethods, {}, {}, {}, string, AIPromptViewRenderProps, AIPromptViewRenderProps, {}>;
|
|
51
|
-
export { AIPromptViewRender, AIPromptViewRenderVue2 };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import * as Vue from 'vue';
|
|
3
|
-
var allVue = Vue;
|
|
4
|
-
var gh = allVue.h;
|
|
5
|
-
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
-
import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
var AIPromptViewRenderVue2 = {
|
|
11
|
-
name: 'KendoAIPromptViewRender',
|
|
12
|
-
inheritAttrs: false,
|
|
13
|
-
props: {
|
|
14
|
-
name: String
|
|
15
|
-
},
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
setup: !isV3 ? undefined : function () {
|
|
18
|
-
var v3 = !!isV3;
|
|
19
|
-
return {
|
|
20
|
-
v3: v3
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
inject: {
|
|
24
|
-
kendoAIPrompt: {
|
|
25
|
-
default: null
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
render: function render(createElement) {
|
|
29
|
-
var h = gh || createElement;
|
|
30
|
-
var defaultSlots = getDefaultSlots(this);
|
|
31
|
-
var active = this.kendoAIPrompt.activeView === this.$props.name;
|
|
32
|
-
return active ? this.v3 ? defaultSlots : h("div", [defaultSlots]) : null;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
var AIPromptViewRender = AIPromptViewRenderVue2;
|
|
39
|
-
export { AIPromptViewRender, AIPromptViewRenderVue2 };
|
package/dist/esm/main.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './ai-prompt/AIPrompt';
|
|
2
|
-
export * from './ai-prompt/AIPromptHeader';
|
|
3
|
-
export * from './ai-prompt/AIPromptFooter';
|
|
4
|
-
export * from './ai-prompt/AIPromptContent';
|
|
5
|
-
export * from './ai-prompt/views/AIPromptView';
|
|
6
|
-
export * from './ai-prompt/views/AIPromptOutputView';
|
|
7
|
-
export * from './ai-prompt/views/AIPromptCommandsView';
|
|
8
|
-
export * from './ai-prompt/views/AIPromptViewRender';
|
package/dist/esm/main.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './ai-prompt/AIPrompt.js';
|
|
2
|
-
export * from './ai-prompt/AIPromptHeader.js';
|
|
3
|
-
export * from './ai-prompt/AIPromptFooter.js';
|
|
4
|
-
export * from './ai-prompt/AIPromptContent.js';
|
|
5
|
-
export * from './ai-prompt/views/AIPromptView.js';
|
|
6
|
-
export * from './ai-prompt/views/AIPromptOutputView.js';
|
|
7
|
-
export * from './ai-prompt/views/AIPromptCommandsView.js';
|
|
8
|
-
export * from './ai-prompt/views/AIPromptViewRender.js';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare const avatarAlt = "avatar.alt";
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare const ariaLabelMessageList = "messageList.ariaLabel";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export declare const aIPromptNoOutputs = "aIPrompt.noOutputs";
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare const messages: {
|
|
17
|
-
"avatar.alt": string;
|
|
18
|
-
"messageList.ariaLabel": string;
|
|
19
|
-
"aIPrompt.noOutputs": string;
|
|
20
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export var avatarAlt = 'avatar.alt';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export var ariaLabelMessageList = 'messageList.ariaLabel';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export var aIPromptNoOutputs = 'aIPrompt.noOutputs';
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export var messages = (_a = {},
|
|
18
|
-
_a[avatarAlt] = 'Avatar',
|
|
19
|
-
_a[ariaLabelMessageList] = 'Message list',
|
|
20
|
-
_a[aIPromptNoOutputs] = 'No output from Ai available',
|
|
21
|
-
_a);
|
package/dist/esm/package.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import * as Vue from 'vue';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
type Vue2type = Vue.default;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
-
declare type DefaultMethods<V> = {
|
|
4
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
-
};
|
|
6
|
-
import { AIPromptToolbarItemInterface } from './AIPromptHeader';
|
|
7
|
-
import { AIPromptOutputRating } from './views/AIPromptOutputView';
|
|
8
|
-
import { AIPromptCommandInterface } from './views/AIPromptCommandsView';
|
|
9
|
-
/**
|
|
10
|
-
* The props of the AIPrompt component.
|
|
11
|
-
*/
|
|
12
|
-
export interface AIPromptProps {
|
|
13
|
-
/**
|
|
14
|
-
* Name of the active view.
|
|
15
|
-
*/
|
|
16
|
-
activeView: string;
|
|
17
|
-
/**
|
|
18
|
-
* Collection with items that will override the default Toolbar items.
|
|
19
|
-
*/
|
|
20
|
-
toolbarItems?: AIPromptToolbarItemInterface[];
|
|
21
|
-
/**
|
|
22
|
-
* The collection of generated prompt outputs that will be rendered in the Output view.
|
|
23
|
-
*/
|
|
24
|
-
outputs?: AIPromptOutputInterface[];
|
|
25
|
-
/**
|
|
26
|
-
* The placeholder text for the Prompt view textarea.
|
|
27
|
-
*/
|
|
28
|
-
promptPlaceholder?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The direction of the Prompt.
|
|
31
|
-
*/
|
|
32
|
-
dir?: string;
|
|
33
|
-
/**
|
|
34
|
-
* The onActiveViewChange event handler of the Kendo UI for Vue AIPrompt component.
|
|
35
|
-
* Fires when active view is changed. Exposes the name of the new active view as event data.
|
|
36
|
-
*/
|
|
37
|
-
onActiveviewchange?: (name: string) => void;
|
|
38
|
-
/**
|
|
39
|
-
* The onCommandExecute event handler of the Kendo UI for Vue AIPrompt component.
|
|
40
|
-
* Fires each time the user clicks a command in the Command view. Exposes the selected command as event data.
|
|
41
|
-
*/
|
|
42
|
-
onCommandexecute?: (command: AIPromptCommandInterface) => void;
|
|
43
|
-
/**
|
|
44
|
-
* The onPromptRequest event handler of the Kendo UI for Vue AIPrompt component.
|
|
45
|
-
* Fires when user clicks the `Generate` button in the Prompt view.
|
|
46
|
-
*/
|
|
47
|
-
onPromptrequest?: (prompt?: string, outputItem?: AIPromptOutputInterface) => void;
|
|
48
|
-
}
|
|
49
|
-
export interface AIPromptOutputInterface {
|
|
50
|
-
/**
|
|
51
|
-
* The unique identifier of the command.
|
|
52
|
-
*/
|
|
53
|
-
id: string | number;
|
|
54
|
-
/**
|
|
55
|
-
* An optional custom title for the prompt output.
|
|
56
|
-
*/
|
|
57
|
-
title?: string;
|
|
58
|
-
/**
|
|
59
|
-
* An optional custom sub title for the prompt output.
|
|
60
|
-
*/
|
|
61
|
-
subTitle?: string;
|
|
62
|
-
/**
|
|
63
|
-
* The prompt that initiated the output generation.
|
|
64
|
-
*/
|
|
65
|
-
prompt?: string;
|
|
66
|
-
/**
|
|
67
|
-
* The class of the prompt that is rendered on the output card.
|
|
68
|
-
*/
|
|
69
|
-
class?: string;
|
|
70
|
-
/**
|
|
71
|
-
* The text content of the prompt output.
|
|
72
|
-
*/
|
|
73
|
-
responseContent: string;
|
|
74
|
-
/**
|
|
75
|
-
* Specifies if the prompt generation was initiated via the retry button.
|
|
76
|
-
*/
|
|
77
|
-
isRetry?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* The prompt output rating.
|
|
80
|
-
*/
|
|
81
|
-
ratingType?: AIPromptOutputRating;
|
|
82
|
-
/**
|
|
83
|
-
* Optionally specifies a command, if the prompt generation was triggered via a command.
|
|
84
|
-
*/
|
|
85
|
-
command?: AIPromptCommandInterface;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* @hidden
|
|
89
|
-
*/
|
|
90
|
-
interface AIPromptState {
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @hidden
|
|
94
|
-
*/
|
|
95
|
-
interface AIPromptData {
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* @hidden
|
|
99
|
-
*/
|
|
100
|
-
export interface AIPromptMethods {
|
|
101
|
-
[key: string]: any;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* @hidden
|
|
105
|
-
*/
|
|
106
|
-
export interface AIPromptComputed {
|
|
107
|
-
[key: string]: any;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @hidden
|
|
111
|
-
*/
|
|
112
|
-
export interface AIPromptAll extends AIPromptMethods, AIPromptState, AIPromptData, AIPromptComputed, Vue2type {
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @hidden
|
|
116
|
-
*/
|
|
117
|
-
declare const AIPromptVue2: ComponentOptions<Vue2type, DefaultData<AIPromptData>, DefaultMethods<AIPromptAll>, AIPromptComputed, RecordPropsDefinition<AIPromptProps>>;
|
|
118
|
-
/**
|
|
119
|
-
* @hidden
|
|
120
|
-
*/
|
|
121
|
-
declare const AIPrompt: DefineComponent<AIPromptProps, any, AIPromptData, AIPromptComputed, AIPromptMethods, {}, {}, {}, string, AIPromptProps, AIPromptProps, {}>;
|
|
122
|
-
export { AIPrompt, AIPromptVue2 };
|