@progress/kendo-vue-conversational-ui 4.3.0-dev.202401291303

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 (75) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +86 -0
  3. package/README.md +53 -0
  4. package/dist/cdn/js/kendo-vue-conversational-ui.js +1 -0
  5. package/dist/es/additionalTypes.ts +21 -0
  6. package/dist/es/ai-prompt/AIPrompt.d.ts +117 -0
  7. package/dist/es/ai-prompt/AIPrompt.js +117 -0
  8. package/dist/es/ai-prompt/AIPromptContent.d.ts +47 -0
  9. package/dist/es/ai-prompt/AIPromptContent.js +33 -0
  10. package/dist/es/ai-prompt/AIPromptExpander.d.ts +45 -0
  11. package/dist/es/ai-prompt/AIPromptExpander.js +66 -0
  12. package/dist/es/ai-prompt/AIPromptFooter.d.ts +44 -0
  13. package/dist/es/ai-prompt/AIPromptFooter.js +33 -0
  14. package/dist/es/ai-prompt/AIPromptHeader.d.ts +71 -0
  15. package/dist/es/ai-prompt/AIPromptHeader.js +141 -0
  16. package/dist/es/ai-prompt/views/AIPromptCommandsView.d.ts +87 -0
  17. package/dist/es/ai-prompt/views/AIPromptCommandsView.js +116 -0
  18. package/dist/es/ai-prompt/views/AIPromptOutputView.d.ts +77 -0
  19. package/dist/es/ai-prompt/views/AIPromptOutputView.js +2048 -0
  20. package/dist/es/ai-prompt/views/AIPromptView.d.ts +56 -0
  21. package/dist/es/ai-prompt/views/AIPromptView.js +297 -0
  22. package/dist/es/ai-prompt/views/AIPromptViewRender.d.ts +51 -0
  23. package/dist/es/ai-prompt/views/AIPromptViewRender.js +39 -0
  24. package/dist/es/main.d.ts +8 -0
  25. package/dist/es/main.js +8 -0
  26. package/dist/es/messages/main.d.ts +20 -0
  27. package/dist/es/messages/main.js +21 -0
  28. package/dist/esm/additionalTypes.ts +21 -0
  29. package/dist/esm/ai-prompt/AIPrompt.d.ts +117 -0
  30. package/dist/esm/ai-prompt/AIPrompt.js +117 -0
  31. package/dist/esm/ai-prompt/AIPromptContent.d.ts +47 -0
  32. package/dist/esm/ai-prompt/AIPromptContent.js +33 -0
  33. package/dist/esm/ai-prompt/AIPromptExpander.d.ts +45 -0
  34. package/dist/esm/ai-prompt/AIPromptExpander.js +66 -0
  35. package/dist/esm/ai-prompt/AIPromptFooter.d.ts +44 -0
  36. package/dist/esm/ai-prompt/AIPromptFooter.js +33 -0
  37. package/dist/esm/ai-prompt/AIPromptHeader.d.ts +71 -0
  38. package/dist/esm/ai-prompt/AIPromptHeader.js +141 -0
  39. package/dist/esm/ai-prompt/views/AIPromptCommandsView.d.ts +87 -0
  40. package/dist/esm/ai-prompt/views/AIPromptCommandsView.js +116 -0
  41. package/dist/esm/ai-prompt/views/AIPromptOutputView.d.ts +77 -0
  42. package/dist/esm/ai-prompt/views/AIPromptOutputView.js +2048 -0
  43. package/dist/esm/ai-prompt/views/AIPromptView.d.ts +56 -0
  44. package/dist/esm/ai-prompt/views/AIPromptView.js +297 -0
  45. package/dist/esm/ai-prompt/views/AIPromptViewRender.d.ts +51 -0
  46. package/dist/esm/ai-prompt/views/AIPromptViewRender.js +39 -0
  47. package/dist/esm/main.d.ts +8 -0
  48. package/dist/esm/main.js +8 -0
  49. package/dist/esm/messages/main.d.ts +20 -0
  50. package/dist/esm/messages/main.js +21 -0
  51. package/dist/esm/package.json +3 -0
  52. package/dist/npm/additionalTypes.ts +21 -0
  53. package/dist/npm/ai-prompt/AIPrompt.d.ts +117 -0
  54. package/dist/npm/ai-prompt/AIPrompt.js +124 -0
  55. package/dist/npm/ai-prompt/AIPromptContent.d.ts +47 -0
  56. package/dist/npm/ai-prompt/AIPromptContent.js +40 -0
  57. package/dist/npm/ai-prompt/AIPromptExpander.d.ts +45 -0
  58. package/dist/npm/ai-prompt/AIPromptExpander.js +73 -0
  59. package/dist/npm/ai-prompt/AIPromptFooter.d.ts +44 -0
  60. package/dist/npm/ai-prompt/AIPromptFooter.js +40 -0
  61. package/dist/npm/ai-prompt/AIPromptHeader.d.ts +71 -0
  62. package/dist/npm/ai-prompt/AIPromptHeader.js +148 -0
  63. package/dist/npm/ai-prompt/views/AIPromptCommandsView.d.ts +87 -0
  64. package/dist/npm/ai-prompt/views/AIPromptCommandsView.js +123 -0
  65. package/dist/npm/ai-prompt/views/AIPromptOutputView.d.ts +77 -0
  66. package/dist/npm/ai-prompt/views/AIPromptOutputView.js +2055 -0
  67. package/dist/npm/ai-prompt/views/AIPromptView.d.ts +56 -0
  68. package/dist/npm/ai-prompt/views/AIPromptView.js +304 -0
  69. package/dist/npm/ai-prompt/views/AIPromptViewRender.d.ts +51 -0
  70. package/dist/npm/ai-prompt/views/AIPromptViewRender.js +46 -0
  71. package/dist/npm/main.d.ts +8 -0
  72. package/dist/npm/main.js +24 -0
  73. package/dist/npm/messages/main.d.ts +20 -0
  74. package/dist/npm/messages/main.js +24 -0
  75. package/package.json +70 -0
@@ -0,0 +1,87 @@
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 { SVGIcon } from '@progress/kendo-vue-common';
8
+ /**
9
+ * The props of the AIPromptCommandsView component.
10
+ */
11
+ interface AIPromptCommandsViewProps {
12
+ /**
13
+ * The collection of commands that will be rendered in the Command view.
14
+ */
15
+ commands?: CommandInterface[];
16
+ /**
17
+ * Fires each time the user clicks over a Command view command. Exposes the selected command as event data.
18
+ */
19
+ onCommandExecute?: (command: CommandItemInterface) => void;
20
+ }
21
+ /**
22
+ * An interface for the Command view command.
23
+ */
24
+ export interface CommandInterface extends CommandItemInterface {
25
+ /**
26
+ * Collection with nested commands.
27
+ */
28
+ children?: CommandItemInterface[];
29
+ }
30
+ /**
31
+ * @hidden
32
+ */
33
+ interface CommandItemInterface {
34
+ /**
35
+ * The unique identifier of the command.
36
+ */
37
+ id: string;
38
+ /**
39
+ * Specifies the command text.
40
+ */
41
+ text: string;
42
+ /**
43
+ * Specifies the name of the SVG icon that will be rendered for the command.
44
+ */
45
+ svgIcon?: SVGIcon;
46
+ }
47
+ /**
48
+ * Specifies the default values for Commands view Toolbar.
49
+ */
50
+ export declare const commandsViewDefaults: AIPromptToolbarItemInterface;
51
+ /**
52
+ * @hidden
53
+ */
54
+ interface AIPromptCommandsViewState {
55
+ }
56
+ /**
57
+ * @hidden
58
+ */
59
+ interface AIPromptCommandsViewData {
60
+ }
61
+ /**
62
+ * @hidden
63
+ */
64
+ export interface AIPromptCommandsViewMethods {
65
+ [key: string]: any;
66
+ }
67
+ /**
68
+ * @hidden
69
+ */
70
+ export interface AIPromptCommandsViewComputed {
71
+ [key: string]: any;
72
+ wrapperClass: object;
73
+ }
74
+ /**
75
+ * @hidden
76
+ */
77
+ export interface AIPromptCommandsViewAll extends AIPromptCommandsViewMethods, AIPromptCommandsViewState, AIPromptCommandsViewData, AIPromptCommandsViewComputed, Vue2type {
78
+ }
79
+ /**
80
+ * @hidden
81
+ */
82
+ declare const AIPromptCommandsViewVue2: ComponentOptions<Vue2type, DefaultData<AIPromptCommandsViewData>, DefaultMethods<AIPromptCommandsViewAll>, AIPromptCommandsViewComputed, RecordPropsDefinition<AIPromptCommandsViewProps>>;
83
+ /**
84
+ * @hidden
85
+ */
86
+ declare const AIPromptCommandsView: DefineComponent<AIPromptCommandsViewProps, any, AIPromptCommandsViewData, AIPromptCommandsViewComputed, AIPromptCommandsViewMethods, {}, {}, {}, string, AIPromptCommandsViewProps, AIPromptCommandsViewProps, {}>;
87
+ export { AIPromptCommandsView, AIPromptCommandsViewVue2 };
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AIPromptCommandsViewVue2 = exports.AIPromptCommandsView = exports.commandsViewDefaults = void 0;
7
+ // @ts-ignore
8
+ var Vue = require("vue");
9
+ var allVue = Vue;
10
+ var gh = allVue.h;
11
+ var isV3 = allVue.version && allVue.version[0] === '3';
12
+ var AIPromptContent_1 = require("../AIPromptContent");
13
+ var AIPromptViewRender_1 = require("./AIPromptViewRender");
14
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
15
+ var kendo_vue_layout_1 = require("@progress/kendo-vue-layout");
16
+ /**
17
+ * Specifies the default values for Commands view Toolbar.
18
+ */
19
+ exports.commandsViewDefaults = {
20
+ name: 'Commands view',
21
+ buttonIcon: kendo_svg_icons_1.moreHorizontalIcon
22
+ };
23
+ /**
24
+ * @hidden
25
+ */
26
+ var AIPromptCommandsViewVue2 = {
27
+ name: 'KendoAIPromptCommandsView',
28
+ props: {
29
+ commands: Array
30
+ },
31
+ // @ts-ignore
32
+ setup: !isV3 ? undefined : function () {
33
+ var v3 = !!isV3;
34
+ return {
35
+ v3: v3
36
+ };
37
+ },
38
+ inject: {
39
+ kendoAIPrompt: {
40
+ default: null
41
+ }
42
+ },
43
+ render: function render(createElement) {
44
+ var _this2 = this;
45
+ var _this = this;
46
+ var h = gh || createElement;
47
+ var commands = this.$props.commands;
48
+ var onCommandClick = function onCommandClick(event) {
49
+ var _a;
50
+ var command = event.target;
51
+ if (!((_a = command.items) === null || _a === void 0 ? void 0 : _a.length) && _this.kendoAIPrompt.onCommandExecute) {
52
+ _this.kendoAIPrompt.onCommandExecute.call(null, command);
53
+ }
54
+ };
55
+ return (
56
+ // @ts-ignore function children
57
+ h(AIPromptViewRender_1.AIPromptViewRender, {
58
+ name: exports.commandsViewDefaults.name,
59
+ attrs: this.v3 ? undefined : {
60
+ name: exports.commandsViewDefaults.name
61
+ }
62
+ }, this.v3 ? function () {
63
+ return [
64
+ // @ts-ignore function children
65
+ h(AIPromptContent_1.AIPromptContent, _this2.v3 ? function () {
66
+ return [h("div", {
67
+ "class": "k-prompt-view"
68
+ }, [h(kendo_vue_layout_1.PanelBar, {
69
+ onSelect: onCommandClick,
70
+ on: _this2.v3 ? undefined : {
71
+ "select": onCommandClick
72
+ },
73
+ items: commands,
74
+ attrs: _this2.v3 ? undefined : {
75
+ items: commands
76
+ }
77
+ })])];
78
+ } : [h("div", {
79
+ "class": "k-prompt-view"
80
+ }, [h(kendo_vue_layout_1.PanelBar, {
81
+ onSelect: onCommandClick,
82
+ on: _this2.v3 ? undefined : {
83
+ "select": onCommandClick
84
+ },
85
+ items: commands,
86
+ attrs: _this2.v3 ? undefined : {
87
+ items: commands
88
+ }
89
+ })])])];
90
+ } : [h(AIPromptContent_1.AIPromptContent, _this2.v3 ? function () {
91
+ return [h("div", {
92
+ "class": "k-prompt-view"
93
+ }, [h(kendo_vue_layout_1.PanelBar, {
94
+ onSelect: onCommandClick,
95
+ on: _this2.v3 ? undefined : {
96
+ "select": onCommandClick
97
+ },
98
+ items: commands,
99
+ attrs: _this2.v3 ? undefined : {
100
+ items: commands
101
+ }
102
+ })])];
103
+ } : [h("div", {
104
+ "class": "k-prompt-view"
105
+ }, [h(kendo_vue_layout_1.PanelBar, {
106
+ onSelect: onCommandClick,
107
+ on: _this2.v3 ? undefined : {
108
+ "select": onCommandClick
109
+ },
110
+ items: commands,
111
+ attrs: _this2.v3 ? undefined : {
112
+ items: commands
113
+ }
114
+ })])])])
115
+ );
116
+ }
117
+ };
118
+ exports.AIPromptCommandsViewVue2 = AIPromptCommandsViewVue2;
119
+ /**
120
+ * @hidden
121
+ */
122
+ var AIPromptCommandsView = AIPromptCommandsViewVue2;
123
+ exports.AIPromptCommandsView = AIPromptCommandsView;
@@ -0,0 +1,77 @@
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 { AIPromptOutputInterface } from '../AIPrompt';
7
+ import { AIPromptToolbarItemInterface } from '../AIPromptHeader';
8
+ /**
9
+ * The props of the AIPromptOutputView component.
10
+ */
11
+ interface AIPromptOutputViewProps {
12
+ /**
13
+ * The collection of generated prompt outputs that will be rendered in the Output view.
14
+ */
15
+ outputs?: AIPromptOutputInterface[];
16
+ /**
17
+ * Represents a template that allows you to define custom Card .It accepts string of a named slot or a render function.
18
+ * The custom fields will override the default one.
19
+ */
20
+ outputCard?: String | Function;
21
+ /**
22
+ * Specifies if the rating buttons in each card will be rendered.
23
+ * By default, rating buttons are not rendered.
24
+ *
25
+ * @default false
26
+ */
27
+ showOutputRating?: boolean;
28
+ onRetry?: (value: any) => void;
29
+ /**
30
+ * Fires each time the user clicks Copy button in the card.
31
+ */
32
+ onCopy?: () => void;
33
+ /**
34
+ * Fires each time the user clicks a rating button in the card.
35
+ */
36
+ onOutputRating?: () => void;
37
+ }
38
+ /**
39
+ * Specifies the default values for Output view Toolbar.
40
+ */
41
+ export declare const outputViewDefaults: AIPromptToolbarItemInterface;
42
+ /**
43
+ * @hidden
44
+ */
45
+ interface AIPromptOutputViewState {
46
+ }
47
+ /**
48
+ * @hidden
49
+ */
50
+ interface AIPromptOutputViewData {
51
+ }
52
+ /**
53
+ * @hidden
54
+ */
55
+ export interface AIPromptOutputViewMethods {
56
+ [key: string]: any;
57
+ }
58
+ /**
59
+ * @hidden
60
+ */
61
+ export interface AIPromptOutputViewComputed {
62
+ [key: string]: any;
63
+ }
64
+ /**
65
+ * @hidden
66
+ */
67
+ export interface AIPromptOutputViewAll extends AIPromptOutputViewMethods, AIPromptOutputViewState, AIPromptOutputViewData, AIPromptOutputViewComputed, Vue2type {
68
+ }
69
+ /**
70
+ * @hidden
71
+ */
72
+ declare const AIPromptOutputViewVue2: ComponentOptions<Vue2type, DefaultData<AIPromptOutputViewData>, DefaultMethods<AIPromptOutputViewAll>, AIPromptOutputViewComputed, RecordPropsDefinition<AIPromptOutputViewProps>>;
73
+ /**
74
+ * @hidden
75
+ */
76
+ declare const AIPromptOutputView: DefineComponent<AIPromptOutputViewProps, any, AIPromptOutputViewData, AIPromptOutputViewComputed, AIPromptOutputViewMethods, {}, {}, {}, string, AIPromptOutputViewProps, AIPromptOutputViewProps, {}>;
77
+ export { AIPromptOutputView, AIPromptOutputViewVue2 };