@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.
Files changed (97) hide show
  1. package/README.md +27 -34
  2. package/ai-prompt/AIPrompt.js +8 -0
  3. package/ai-prompt/AIPrompt.mjs +83 -0
  4. package/ai-prompt/AIPromptContent.js +8 -0
  5. package/ai-prompt/AIPromptContent.mjs +23 -0
  6. package/ai-prompt/AIPromptExpander.js +8 -0
  7. package/ai-prompt/AIPromptExpander.mjs +51 -0
  8. package/ai-prompt/AIPromptFooter.js +8 -0
  9. package/ai-prompt/AIPromptFooter.mjs +23 -0
  10. package/ai-prompt/AIPromptHeader.js +8 -0
  11. package/ai-prompt/AIPromptHeader.mjs +70 -0
  12. package/ai-prompt/views/AIPromptCommandsView.js +8 -0
  13. package/ai-prompt/views/AIPromptCommandsView.mjs +51 -0
  14. package/ai-prompt/views/AIPromptOutputView.js +8 -0
  15. package/ai-prompt/views/AIPromptOutputView.mjs +170 -0
  16. package/ai-prompt/views/AIPromptView.js +8 -0
  17. package/ai-prompt/views/AIPromptView.mjs +112 -0
  18. package/ai-prompt/views/AIPromptViewRender.js +8 -0
  19. package/ai-prompt/views/AIPromptViewRender.mjs +28 -0
  20. package/dist/cdn/js/kendo-vue-conversational-ui.js +8 -1
  21. package/index.d.mts +378 -0
  22. package/index.d.ts +378 -0
  23. package/index.js +8 -0
  24. package/index.mjs +29 -0
  25. package/messages/main.js +8 -0
  26. package/messages/main.mjs +18 -0
  27. package/package.json +24 -50
  28. package/dist/es/additionalTypes.ts +0 -21
  29. package/dist/es/ai-prompt/AIPrompt.d.ts +0 -122
  30. package/dist/es/ai-prompt/AIPrompt.js +0 -117
  31. package/dist/es/ai-prompt/AIPromptContent.d.ts +0 -47
  32. package/dist/es/ai-prompt/AIPromptContent.js +0 -33
  33. package/dist/es/ai-prompt/AIPromptExpander.d.ts +0 -45
  34. package/dist/es/ai-prompt/AIPromptExpander.js +0 -68
  35. package/dist/es/ai-prompt/AIPromptFooter.d.ts +0 -44
  36. package/dist/es/ai-prompt/AIPromptFooter.js +0 -33
  37. package/dist/es/ai-prompt/AIPromptHeader.d.ts +0 -71
  38. package/dist/es/ai-prompt/AIPromptHeader.js +0 -146
  39. package/dist/es/ai-prompt/views/AIPromptCommandsView.d.ts +0 -86
  40. package/dist/es/ai-prompt/views/AIPromptCommandsView.js +0 -117
  41. package/dist/es/ai-prompt/views/AIPromptOutputView.d.ts +0 -93
  42. package/dist/es/ai-prompt/views/AIPromptOutputView.js +0 -2206
  43. package/dist/es/ai-prompt/views/AIPromptView.d.ts +0 -56
  44. package/dist/es/ai-prompt/views/AIPromptView.js +0 -299
  45. package/dist/es/ai-prompt/views/AIPromptViewRender.d.ts +0 -51
  46. package/dist/es/ai-prompt/views/AIPromptViewRender.js +0 -39
  47. package/dist/es/main.d.ts +0 -8
  48. package/dist/es/main.js +0 -8
  49. package/dist/es/messages/main.d.ts +0 -20
  50. package/dist/es/messages/main.js +0 -21
  51. package/dist/esm/additionalTypes.ts +0 -21
  52. package/dist/esm/ai-prompt/AIPrompt.d.ts +0 -122
  53. package/dist/esm/ai-prompt/AIPrompt.js +0 -117
  54. package/dist/esm/ai-prompt/AIPromptContent.d.ts +0 -47
  55. package/dist/esm/ai-prompt/AIPromptContent.js +0 -33
  56. package/dist/esm/ai-prompt/AIPromptExpander.d.ts +0 -45
  57. package/dist/esm/ai-prompt/AIPromptExpander.js +0 -68
  58. package/dist/esm/ai-prompt/AIPromptFooter.d.ts +0 -44
  59. package/dist/esm/ai-prompt/AIPromptFooter.js +0 -33
  60. package/dist/esm/ai-prompt/AIPromptHeader.d.ts +0 -71
  61. package/dist/esm/ai-prompt/AIPromptHeader.js +0 -146
  62. package/dist/esm/ai-prompt/views/AIPromptCommandsView.d.ts +0 -86
  63. package/dist/esm/ai-prompt/views/AIPromptCommandsView.js +0 -117
  64. package/dist/esm/ai-prompt/views/AIPromptOutputView.d.ts +0 -93
  65. package/dist/esm/ai-prompt/views/AIPromptOutputView.js +0 -2206
  66. package/dist/esm/ai-prompt/views/AIPromptView.d.ts +0 -56
  67. package/dist/esm/ai-prompt/views/AIPromptView.js +0 -299
  68. package/dist/esm/ai-prompt/views/AIPromptViewRender.d.ts +0 -51
  69. package/dist/esm/ai-prompt/views/AIPromptViewRender.js +0 -39
  70. package/dist/esm/main.d.ts +0 -8
  71. package/dist/esm/main.js +0 -8
  72. package/dist/esm/messages/main.d.ts +0 -20
  73. package/dist/esm/messages/main.js +0 -21
  74. package/dist/esm/package.json +0 -3
  75. package/dist/npm/additionalTypes.ts +0 -21
  76. package/dist/npm/ai-prompt/AIPrompt.d.ts +0 -122
  77. package/dist/npm/ai-prompt/AIPrompt.js +0 -124
  78. package/dist/npm/ai-prompt/AIPromptContent.d.ts +0 -47
  79. package/dist/npm/ai-prompt/AIPromptContent.js +0 -40
  80. package/dist/npm/ai-prompt/AIPromptExpander.d.ts +0 -45
  81. package/dist/npm/ai-prompt/AIPromptExpander.js +0 -75
  82. package/dist/npm/ai-prompt/AIPromptFooter.d.ts +0 -44
  83. package/dist/npm/ai-prompt/AIPromptFooter.js +0 -40
  84. package/dist/npm/ai-prompt/AIPromptHeader.d.ts +0 -71
  85. package/dist/npm/ai-prompt/AIPromptHeader.js +0 -153
  86. package/dist/npm/ai-prompt/views/AIPromptCommandsView.d.ts +0 -86
  87. package/dist/npm/ai-prompt/views/AIPromptCommandsView.js +0 -124
  88. package/dist/npm/ai-prompt/views/AIPromptOutputView.d.ts +0 -93
  89. package/dist/npm/ai-prompt/views/AIPromptOutputView.js +0 -2213
  90. package/dist/npm/ai-prompt/views/AIPromptView.d.ts +0 -56
  91. package/dist/npm/ai-prompt/views/AIPromptView.js +0 -306
  92. package/dist/npm/ai-prompt/views/AIPromptViewRender.d.ts +0 -51
  93. package/dist/npm/ai-prompt/views/AIPromptViewRender.js +0 -46
  94. package/dist/npm/main.d.ts +0 -8
  95. package/dist/npm/main.js +0 -24
  96. package/dist/npm/messages/main.d.ts +0 -20
  97. package/dist/npm/messages/main.js +0 -24
@@ -1,117 +0,0 @@
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 };
@@ -1,47 +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 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 };
@@ -1,33 +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 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 };
@@ -1,45 +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
- 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 };
@@ -1,68 +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
- 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
- type: 'button',
44
- attrs: this.v3 ? undefined : {
45
- type: 'button',
46
- fillMode: 'flat',
47
- svgIcon: this.expanded ? chevronUpIcon : chevronDownIcon,
48
- title: title
49
- },
50
- fillMode: 'flat',
51
- svgIcon: this.expanded ? chevronUpIcon : chevronDownIcon,
52
- title: title,
53
- onClick: this.buttonClick,
54
- on: this.v3 ? undefined : {
55
- "click": this.buttonClick
56
- }
57
- }, this.v3 ? function () {
58
- return [title];
59
- } : [title]), this.expanded && h("div", {
60
- "class": "k-prompt-expander-content"
61
- }, [defaultSlots])]);
62
- }
63
- };
64
- /**
65
- * @hidden
66
- */
67
- var AIPromptExpander = AIPromptExpanderVue2;
68
- export { AIPromptExpander, AIPromptExpanderVue2 };
@@ -1,44 +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
- 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 };
@@ -1,33 +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 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 };
@@ -1,71 +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 { 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 };
@@ -1,146 +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 { 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
- "class": "k-toolbar-flat"
47
- }, this.v3 ? function () {
48
- return [toolbarItems.map(function (item) {
49
- var _this = this;
50
- var itemContent = getTemplate.call(this, {
51
- h: h,
52
- template: item.content,
53
- defaultRendering: null,
54
- additionalProps: {
55
- item: item
56
- }
57
- });
58
- return item.content ? itemContent :
59
- // @ts-ignore function children
60
- h(Button, {
61
- type: 'button',
62
- attrs: this.v3 ? undefined : {
63
- type: 'button',
64
- size: 'medium',
65
- themeColor: 'primary',
66
- fillMode: 'flat',
67
- rounded: 'full',
68
- title: item.buttonText,
69
- svgIcon: item.buttonIcon,
70
- "aria-hidden": "true"
71
- },
72
- key: item.name,
73
- "class": classNames('k-toolbar-item', {
74
- 'k-selected': activeView === item.name
75
- }),
76
- size: 'medium',
77
- themeColor: 'primary',
78
- fillMode: 'flat',
79
- rounded: 'full',
80
- title: item.buttonText,
81
- svgIcon: item.buttonIcon,
82
- "aria-hidden": "true",
83
- onClick: function onClick() {
84
- return _this.handleClick(item.name);
85
- },
86
- on: this.v3 ? undefined : {
87
- "click": function onClick() {
88
- return _this.handleClick(item.name);
89
- }
90
- }
91
- }, this.v3 ? function () {
92
- return [item.buttonText];
93
- } : [item.buttonText]);
94
- }, _this2)];
95
- } : [toolbarItems.map(function (item) {
96
- var _this = this;
97
- var itemContent = getTemplate.call(this, {
98
- h: h,
99
- template: item.content,
100
- defaultRendering: null,
101
- additionalProps: {
102
- item: item
103
- }
104
- });
105
- return item.content ? itemContent : h(Button, {
106
- type: 'button',
107
- attrs: this.v3 ? undefined : {
108
- type: 'button',
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
- key: item.name,
118
- "class": classNames('k-toolbar-item', {
119
- 'k-selected': activeView === item.name
120
- }),
121
- size: 'medium',
122
- themeColor: 'primary',
123
- fillMode: 'flat',
124
- rounded: 'full',
125
- title: item.buttonText,
126
- svgIcon: item.buttonIcon,
127
- "aria-hidden": "true",
128
- onClick: function onClick() {
129
- return _this.handleClick(item.name);
130
- },
131
- on: this.v3 ? undefined : {
132
- "click": function onClick() {
133
- return _this.handleClick(item.name);
134
- }
135
- }
136
- }, this.v3 ? function () {
137
- return [item.buttonText];
138
- } : [item.buttonText]);
139
- }, _this2)])]);
140
- }
141
- };
142
- /**
143
- * @hidden
144
- */
145
- var AIPromptHeader = AIPromptHeaderVue2;
146
- export { AIPromptHeader, AIPromptHeaderVue2 };
@@ -1,86 +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 { SVGIcon } from '@progress/kendo-vue-common';
8
- /**
9
- * The props of the AIPromptCommandsView component.
10
- */
11
- export interface AIPromptCommandsViewProps {
12
- /**
13
- * The collection of commands that will be rendered in the Command view.
14
- */
15
- commands?: AIPromptCommandInterface[];
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 AIPromptCommandInterface 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
- }
73
- /**
74
- * @hidden
75
- */
76
- export interface AIPromptCommandsViewAll extends AIPromptCommandsViewMethods, AIPromptCommandsViewState, AIPromptCommandsViewData, AIPromptCommandsViewComputed, Vue2type {
77
- }
78
- /**
79
- * @hidden
80
- */
81
- declare const AIPromptCommandsViewVue2: ComponentOptions<Vue2type, DefaultData<AIPromptCommandsViewData>, DefaultMethods<AIPromptCommandsViewAll>, AIPromptCommandsViewComputed, RecordPropsDefinition<AIPromptCommandsViewProps>>;
82
- /**
83
- * @hidden
84
- */
85
- declare const AIPromptCommandsView: DefineComponent<AIPromptCommandsViewProps, any, AIPromptCommandsViewData, AIPromptCommandsViewComputed, AIPromptCommandsViewMethods, {}, {}, {}, string, AIPromptCommandsViewProps, AIPromptCommandsViewProps, {}>;
86
- export { AIPromptCommandsView, AIPromptCommandsViewVue2 };