@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,117 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) {
6
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7
+ }
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ // @ts-ignore
14
+ import * as Vue from 'vue';
15
+ var allVue = Vue;
16
+ var gh = allVue.h;
17
+ var isV3 = allVue.version && allVue.version[0] === '3';
18
+ import { AIPromptHeader } from './AIPromptHeader.js';
19
+ import { promptViewDefaults } from './views/AIPromptView.js';
20
+ import { outputViewDefaults } from './views/AIPromptOutputView.js';
21
+ import { getDefaultSlots, getListeners, templateRendering } from '@progress/kendo-vue-common';
22
+ /**
23
+ * @hidden
24
+ */
25
+ var AIPromptVue2 = {
26
+ name: 'KendoAIPrompt',
27
+ props: {
28
+ activeView: {
29
+ type: String,
30
+ required: true
31
+ },
32
+ dir: String,
33
+ toolbarItems: Array,
34
+ outputs: Array,
35
+ promptPlaceholder: String
36
+ },
37
+ // @ts-ignore
38
+ setup: !isV3 ? undefined : function () {
39
+ var v3 = !!isV3;
40
+ return {
41
+ v3: v3
42
+ };
43
+ },
44
+ provide: function provide() {
45
+ return {
46
+ kendoAIPrompt: this.$data.contextState
47
+ };
48
+ },
49
+ data: function data() {
50
+ return {
51
+ contextState: {
52
+ activeView: this.$props.activeView,
53
+ onActiveViewChange: this.onActiveViewChange,
54
+ onPromptRequest: this.onPromptRequest,
55
+ onCommandExecute: this.onCommandExecute,
56
+ onStateAction: this.onStateAction
57
+ }
58
+ };
59
+ },
60
+ watch: {
61
+ activeView: function activeView(newValue) {
62
+ this.contextState.activeView = newValue;
63
+ }
64
+ },
65
+ methods: {
66
+ onStateAction: function onStateAction(action) {
67
+ this.contextState.activeView = action.activeView;
68
+ },
69
+ onActiveViewChange: function onActiveViewChange(event) {
70
+ this.$emit('activeviewchange', event);
71
+ },
72
+ onPromptRequest: function onPromptRequest(prompt, outputItem) {
73
+ this.$emit('promptrequest', prompt, outputItem);
74
+ },
75
+ onCommandExecute: function onCommandExecute(event) {
76
+ this.$emit('commandexecute', event);
77
+ }
78
+ },
79
+ render: function render(createElement) {
80
+ var _this = this;
81
+ var h = gh || createElement;
82
+ var defaultSlots = getDefaultSlots(this);
83
+ var _a = this.$props,
84
+ toolbarItems = _a.toolbarItems,
85
+ dir = _a.dir;
86
+ var itemsToShow = toolbarItems || [promptViewDefaults, outputViewDefaults];
87
+ var items = itemsToShow.map(function (item) {
88
+ var content = templateRendering.call(_this, item.content, getListeners.call(_this));
89
+ return __assign(__assign({}, item), {
90
+ content: content
91
+ });
92
+ });
93
+ return h("div", {
94
+ "class": "k-prompt",
95
+ dir: dir,
96
+ attrs: this.v3 ? undefined : {
97
+ dir: dir
98
+ }
99
+ }, [h(AIPromptHeader, {
100
+ activeView: this.contextState.activeView,
101
+ attrs: this.v3 ? undefined : {
102
+ activeView: this.contextState.activeView,
103
+ toolbarItems: items
104
+ },
105
+ toolbarItems: items,
106
+ onActiveviewchange: this.onActiveViewChange,
107
+ on: this.v3 ? undefined : {
108
+ "activeviewchange": this.onActiveViewChange
109
+ }
110
+ }), defaultSlots]);
111
+ }
112
+ };
113
+ /**
114
+ * @hidden
115
+ */
116
+ var AIPrompt = AIPromptVue2;
117
+ export { AIPrompt, AIPromptVue2 };
@@ -0,0 +1,47 @@
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 AIPromptContent component.
8
+ */
9
+ interface AIPromptContentProps {
10
+ }
11
+ /**
12
+ * @hidden
13
+ */
14
+ interface AIPromptContentState {
15
+ }
16
+ /**
17
+ * @hidden
18
+ */
19
+ interface AIPromptContentData {
20
+ }
21
+ /**
22
+ * @hidden
23
+ */
24
+ export interface AIPromptContentMethods {
25
+ [key: string]: any;
26
+ }
27
+ /**
28
+ * @hidden
29
+ */
30
+ export interface AIPromptContentComputed {
31
+ [key: string]: any;
32
+ wrapperClass: object;
33
+ }
34
+ /**
35
+ * @hidden
36
+ */
37
+ export interface AIPromptContentAll extends AIPromptContentMethods, AIPromptContentState, AIPromptContentData, AIPromptContentComputed, Vue2type {
38
+ }
39
+ /**
40
+ * @hidden
41
+ */
42
+ declare const AIPromptContentVue2: ComponentOptions<Vue2type, DefaultData<AIPromptContentData>, DefaultMethods<AIPromptContentAll>, AIPromptContentComputed, RecordPropsDefinition<AIPromptContentProps>>;
43
+ /**
44
+ * @hidden
45
+ */
46
+ declare const AIPromptContent: DefineComponent<AIPromptContentProps, any, AIPromptContentData, AIPromptContentComputed, AIPromptContentMethods, {}, {}, {}, string, AIPromptContentProps, AIPromptContentProps, {}>;
47
+ export { AIPromptContent, AIPromptContentVue2 };
@@ -0,0 +1,33 @@
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 AIPromptContentVue2 = {
11
+ name: 'KendoAIPromptContent',
12
+ // @ts-ignore
13
+ setup: !isV3 ? undefined : function () {
14
+ var v3 = !!isV3;
15
+ return {
16
+ v3: v3
17
+ };
18
+ },
19
+ render: function render(createElement) {
20
+ var h = gh || createElement;
21
+ var defaultSlots = getDefaultSlots(this);
22
+ return h("div", {
23
+ "class": "k-prompt-content"
24
+ }, [h("div", {
25
+ "class": "k-prompt-view"
26
+ }, [defaultSlots])]);
27
+ }
28
+ };
29
+ /**
30
+ * @hidden
31
+ */
32
+ var AIPromptContent = AIPromptContentVue2;
33
+ export { AIPromptContent, AIPromptContentVue2 };
@@ -0,0 +1,45 @@
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
+ export interface AIPromptExpanderProps {
7
+ title: string;
8
+ }
9
+ /**
10
+ * @hidden
11
+ */
12
+ interface AIPromptExpanderState {
13
+ }
14
+ /**
15
+ * @hidden
16
+ */
17
+ interface AIPromptExpanderData {
18
+ }
19
+ /**
20
+ * @hidden
21
+ */
22
+ export interface AIPromptExpanderMethods {
23
+ [key: string]: any;
24
+ }
25
+ /**
26
+ * @hidden
27
+ */
28
+ export interface AIPromptExpanderComputed {
29
+ [key: string]: any;
30
+ wrapperClass: object;
31
+ }
32
+ /**
33
+ * @hidden
34
+ */
35
+ export interface AIPromptExpanderAll extends AIPromptExpanderMethods, AIPromptExpanderState, AIPromptExpanderData, AIPromptExpanderComputed, Vue2type {
36
+ }
37
+ /**
38
+ * @hidden
39
+ */
40
+ declare const AIPromptExpanderVue2: ComponentOptions<Vue2type, DefaultData<AIPromptExpanderData>, DefaultMethods<AIPromptExpanderAll>, AIPromptExpanderComputed, RecordPropsDefinition<AIPromptExpanderProps>>;
41
+ /**
42
+ * @hidden
43
+ */
44
+ declare const AIPromptExpander: DefineComponent<AIPromptExpanderProps, any, AIPromptExpanderData, AIPromptExpanderComputed, AIPromptExpanderMethods, {}, {}, {}, string, AIPromptExpanderProps, AIPromptExpanderProps, {}>;
45
+ export { AIPromptExpander, AIPromptExpanderVue2 };
@@ -0,0 +1,66 @@
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
+ import { Button } from '@progress/kendo-vue-buttons';
8
+ import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
9
+ /**
10
+ * @hidden
11
+ */
12
+ var AIPromptExpanderVue2 = {
13
+ name: 'KendoAIPromptExpander',
14
+ props: {
15
+ title: String
16
+ },
17
+ // @ts-ignore
18
+ setup: !isV3 ? undefined : function () {
19
+ var v3 = !!isV3;
20
+ return {
21
+ v3: v3
22
+ };
23
+ },
24
+ data: function data() {
25
+ return {
26
+ expanded: true
27
+ };
28
+ },
29
+ methods: {
30
+ buttonClick: function buttonClick() {
31
+ this.expanded = !this.expanded;
32
+ }
33
+ },
34
+ render: function render(createElement) {
35
+ var h = gh || createElement;
36
+ var defaultSlots = getDefaultSlots(this);
37
+ var title = this.$props.title;
38
+ return h("div", {
39
+ "class": "k-prompt-expander"
40
+ }, [
41
+ // @ts-ignore function children
42
+ h(Button, {
43
+ fillMode: 'flat',
44
+ attrs: this.v3 ? undefined : {
45
+ fillMode: 'flat',
46
+ svgIcon: this.expanded ? chevronUpIcon : chevronDownIcon,
47
+ title: title
48
+ },
49
+ svgIcon: this.expanded ? chevronUpIcon : chevronDownIcon,
50
+ title: title,
51
+ onClick: this.buttonClick,
52
+ on: this.v3 ? undefined : {
53
+ "click": this.buttonClick
54
+ }
55
+ }, this.v3 ? function () {
56
+ return [title];
57
+ } : [title]), this.expanded && h("div", {
58
+ "class": "k-prompt-expander-content"
59
+ }, [defaultSlots])]);
60
+ }
61
+ };
62
+ /**
63
+ * @hidden
64
+ */
65
+ var AIPromptExpander = AIPromptExpanderVue2;
66
+ export { AIPromptExpander, AIPromptExpanderVue2 };
@@ -0,0 +1,44 @@
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
+ interface AIPromptFooterProps {
7
+ }
8
+ /**
9
+ * @hidden
10
+ */
11
+ interface AIPromptFooterState {
12
+ }
13
+ /**
14
+ * @hidden
15
+ */
16
+ interface AIPromptFooterData {
17
+ }
18
+ /**
19
+ * @hidden
20
+ */
21
+ export interface AIPromptFooterMethods {
22
+ [key: string]: any;
23
+ }
24
+ /**
25
+ * @hidden
26
+ */
27
+ export interface AIPromptFooterComputed {
28
+ [key: string]: any;
29
+ wrapperClass: object;
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ export interface AIPromptFooterAll extends AIPromptFooterMethods, AIPromptFooterState, AIPromptFooterData, AIPromptFooterComputed, Vue2type {
35
+ }
36
+ /**
37
+ * @hidden
38
+ */
39
+ declare const AIPromptFooterVue2: ComponentOptions<Vue2type, DefaultData<AIPromptFooterData>, DefaultMethods<AIPromptFooterAll>, AIPromptFooterComputed, RecordPropsDefinition<AIPromptFooterProps>>;
40
+ /**
41
+ * @hidden
42
+ */
43
+ declare const AIPromptFooter: DefineComponent<AIPromptFooterProps, any, AIPromptFooterData, AIPromptFooterComputed, AIPromptFooterMethods, {}, {}, {}, string, AIPromptFooterProps, AIPromptFooterProps, {}>;
44
+ export { AIPromptFooter, AIPromptFooterVue2 };
@@ -0,0 +1,33 @@
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 AIPromptFooterVue2 = {
11
+ name: 'KendoAIPromptFooter',
12
+ // @ts-ignore
13
+ setup: !isV3 ? undefined : function () {
14
+ var v3 = !!isV3;
15
+ return {
16
+ v3: v3
17
+ };
18
+ },
19
+ render: function render(createElement) {
20
+ var h = gh || createElement;
21
+ var defaultSlots = getDefaultSlots(this);
22
+ return h("div", {
23
+ "class": "k-prompt-footer"
24
+ }, [h("div", {
25
+ "class": "k-actions k-actions-start k-actions-horizontal k-prompt-actions"
26
+ }, [defaultSlots])]);
27
+ }
28
+ };
29
+ /**
30
+ * @hidden
31
+ */
32
+ var AIPromptFooter = AIPromptFooterVue2;
33
+ export { AIPromptFooter, AIPromptFooterVue2 };
@@ -0,0 +1,71 @@
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 { SVGIcon } from '@progress/kendo-svg-icons';
7
+ /**
8
+ * An interface for the AIPromptToolbarItem.
9
+ */
10
+ export interface AIPromptToolbarItemInterface {
11
+ /**
12
+ * Defines the name of the view witch is related to.
13
+ */
14
+ name: string;
15
+ /**
16
+ * Defines the svgIcon used in the Toolbar button.
17
+ */
18
+ buttonIcon?: SVGIcon;
19
+ /**
20
+ * Defines the text used in the Toolbar button.
21
+ */
22
+ buttonText?: string;
23
+ /**
24
+ * Defines custom content for the item. It can be either a name of a named slot or a rendered function.
25
+ */
26
+ content?: string | Function | Object;
27
+ }
28
+ /**
29
+ * @hidden
30
+ */
31
+ interface AIPromptHeaderProps {
32
+ activeView: string;
33
+ toolbarItems: AIPromptToolbarItemInterface[];
34
+ activeViewChange?: (event: any) => void;
35
+ }
36
+ /**
37
+ * @hidden
38
+ */
39
+ interface AIPromptHeaderState {
40
+ }
41
+ /**
42
+ * @hidden
43
+ */
44
+ interface AIPromptHeaderData {
45
+ }
46
+ /**
47
+ * @hidden
48
+ */
49
+ export interface AIPromptHeaderMethods {
50
+ [key: string]: any;
51
+ }
52
+ /**
53
+ * @hidden
54
+ */
55
+ export interface AIPromptHeaderComputed {
56
+ [key: string]: any;
57
+ }
58
+ /**
59
+ * @hidden
60
+ */
61
+ export interface AIPromptHeaderAll extends AIPromptHeaderMethods, AIPromptHeaderState, AIPromptHeaderData, AIPromptHeaderComputed, Vue2type {
62
+ }
63
+ /**
64
+ * @hidden
65
+ */
66
+ declare const AIPromptHeaderVue2: ComponentOptions<Vue2type, DefaultData<AIPromptHeaderData>, DefaultMethods<AIPromptHeaderAll>, AIPromptHeaderComputed, RecordPropsDefinition<AIPromptHeaderProps>>;
67
+ /**
68
+ * @hidden
69
+ */
70
+ declare const AIPromptHeader: DefineComponent<AIPromptHeaderProps, any, AIPromptHeaderData, AIPromptHeaderComputed, AIPromptHeaderMethods, {}, {}, {}, string, AIPromptHeaderProps, AIPromptHeaderProps, {}>;
71
+ export { AIPromptHeader, AIPromptHeaderVue2 };
@@ -0,0 +1,141 @@
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 { classNames, getTemplate } from '@progress/kendo-vue-common';
7
+ import { Button, Toolbar } from '@progress/kendo-vue-buttons';
8
+ /**
9
+ * @hidden
10
+ */
11
+ var AIPromptHeaderVue2 = {
12
+ name: 'KendoAIPromptHeader',
13
+ props: {
14
+ activeView: String,
15
+ toolbarItems: Array
16
+ },
17
+ // @ts-ignore
18
+ setup: !isV3 ? undefined : function () {
19
+ var v3 = !!isV3;
20
+ return {
21
+ v3: v3
22
+ };
23
+ },
24
+ methods: {
25
+ handleClick: function handleClick(viewName) {
26
+ this.$emit('activeviewchange', viewName);
27
+ }
28
+ },
29
+ render: function render(createElement) {
30
+ var _this2 = this;
31
+ var h = gh || createElement;
32
+ var _a = this.$props,
33
+ activeView = _a.activeView,
34
+ toolbarItems = _a.toolbarItems;
35
+ return h("div", {
36
+ "class": "k-prompt-header"
37
+ }, [
38
+ // @ts-ignore function children
39
+ h(Toolbar, {
40
+ keyboardNavigation: false,
41
+ attrs: this.v3 ? undefined : {
42
+ keyboardNavigation: false,
43
+ role: "toolbar"
44
+ },
45
+ role: "toolbar"
46
+ }, this.v3 ? function () {
47
+ return [toolbarItems.map(function (item) {
48
+ var _this = this;
49
+ var itemContent = getTemplate.call(this, {
50
+ h: h,
51
+ template: item.content,
52
+ defaultRendering: null,
53
+ additionalProps: {
54
+ item: item
55
+ }
56
+ });
57
+ return item.content ? itemContent :
58
+ // @ts-ignore function children
59
+ h(Button, {
60
+ key: item.name,
61
+ "class": classNames('k-toolbar-item', {
62
+ 'k-selected': activeView === item.name
63
+ }),
64
+ size: 'medium',
65
+ attrs: this.v3 ? undefined : {
66
+ size: 'medium',
67
+ themeColor: 'primary',
68
+ fillMode: 'flat',
69
+ rounded: 'full',
70
+ title: item.buttonText,
71
+ svgIcon: item.buttonIcon,
72
+ "aria-hidden": "true"
73
+ },
74
+ themeColor: 'primary',
75
+ fillMode: 'flat',
76
+ rounded: 'full',
77
+ title: item.buttonText,
78
+ svgIcon: item.buttonIcon,
79
+ "aria-hidden": "true",
80
+ onClick: function onClick() {
81
+ return _this.handleClick(item.name);
82
+ },
83
+ on: this.v3 ? undefined : {
84
+ "click": function onClick() {
85
+ return _this.handleClick(item.name);
86
+ }
87
+ }
88
+ }, this.v3 ? function () {
89
+ return [item.buttonText];
90
+ } : [item.buttonText]);
91
+ }, _this2)];
92
+ } : [toolbarItems.map(function (item) {
93
+ var _this = this;
94
+ var itemContent = getTemplate.call(this, {
95
+ h: h,
96
+ template: item.content,
97
+ defaultRendering: null,
98
+ additionalProps: {
99
+ item: item
100
+ }
101
+ });
102
+ return item.content ? itemContent : h(Button, {
103
+ key: item.name,
104
+ "class": classNames('k-toolbar-item', {
105
+ 'k-selected': activeView === item.name
106
+ }),
107
+ size: 'medium',
108
+ attrs: this.v3 ? undefined : {
109
+ size: 'medium',
110
+ themeColor: 'primary',
111
+ fillMode: 'flat',
112
+ rounded: 'full',
113
+ title: item.buttonText,
114
+ svgIcon: item.buttonIcon,
115
+ "aria-hidden": "true"
116
+ },
117
+ themeColor: 'primary',
118
+ fillMode: 'flat',
119
+ rounded: 'full',
120
+ title: item.buttonText,
121
+ svgIcon: item.buttonIcon,
122
+ "aria-hidden": "true",
123
+ onClick: function onClick() {
124
+ return _this.handleClick(item.name);
125
+ },
126
+ on: this.v3 ? undefined : {
127
+ "click": function onClick() {
128
+ return _this.handleClick(item.name);
129
+ }
130
+ }
131
+ }, this.v3 ? function () {
132
+ return [item.buttonText];
133
+ } : [item.buttonText]);
134
+ }, _this2)])]);
135
+ }
136
+ };
137
+ /**
138
+ * @hidden
139
+ */
140
+ var AIPromptHeader = AIPromptHeaderVue2;
141
+ export { AIPromptHeader, AIPromptHeaderVue2 };
@@ -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 };