@progress/kendo-vue-conversational-ui 8.1.0-develop.4 → 8.1.0-develop.5
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/dist/cdn/js/kendo-vue-conversational-ui.js +1 -1
- package/index.d.mts +6 -0
- package/index.d.ts +6 -0
- package/index.js +1 -1
- package/index.mjs +28 -20
- package/messages/main.d.ts +25 -5
- package/messages/main.js +1 -1
- package/messages/main.mjs +20 -8
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -7
- package/prompt-box/Events.d.ts +76 -0
- package/prompt-box/FileBox.d.ts +60 -0
- package/prompt-box/FileBox.js +8 -0
- package/prompt-box/FileBox.mjs +140 -0
- package/prompt-box/PromptBox.d.ts +180 -0
- package/prompt-box/PromptBox.js +8 -0
- package/prompt-box/PromptBox.mjs +472 -0
- package/prompt-box/PromptBoxActionButton.d.ts +20 -0
- package/prompt-box/PromptBoxActionButton.js +8 -0
- package/prompt-box/PromptBoxActionButton.mjs +19 -0
- package/prompt-box/PromptBoxSpeechToTextButton.d.ts +20 -0
- package/prompt-box/PromptBoxSpeechToTextButton.js +8 -0
- package/prompt-box/PromptBoxSpeechToTextButton.mjs +19 -0
- package/prompt-box/PromptBoxUploadButton.d.ts +95 -0
- package/prompt-box/PromptBoxUploadButton.js +8 -0
- package/prompt-box/PromptBoxUploadButton.mjs +77 -0
- package/prompt-box/interfaces/PromptBoxProps.d.ts +197 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as c, createVNode as n, Fragment as d, ref as r, watch as m, onUnmounted as u } from "vue";
|
|
9
|
+
import { Button as f } from "@progress/kendo-vue-buttons";
|
|
10
|
+
import { Upload as h } from "@progress/kendo-vue-upload";
|
|
11
|
+
const b = /* @__PURE__ */ c({
|
|
12
|
+
name: "KendoPromptBoxUploadButton",
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
props: {
|
|
15
|
+
onFilesAdd: Function,
|
|
16
|
+
files: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
},
|
|
20
|
+
restrictions: Object,
|
|
21
|
+
multiple: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
accept: String,
|
|
26
|
+
onSelectAttachments: Function,
|
|
27
|
+
onRemoveAttachment: Function,
|
|
28
|
+
_registerRemoveCallback: Function
|
|
29
|
+
},
|
|
30
|
+
setup(e) {
|
|
31
|
+
const l = r(null);
|
|
32
|
+
return m(() => e.onRemoveAttachment, (t) => {
|
|
33
|
+
e._registerRemoveCallback && t && e._registerRemoveCallback(t);
|
|
34
|
+
}, {
|
|
35
|
+
immediate: !0
|
|
36
|
+
}), u(() => {
|
|
37
|
+
e._registerRemoveCallback && e.onRemoveAttachment && e._registerRemoveCallback(void 0);
|
|
38
|
+
}), {
|
|
39
|
+
uploadRef: l,
|
|
40
|
+
handleFilesAdd: (t) => {
|
|
41
|
+
e.onFilesAdd && e.onFilesAdd(t), e.onSelectAttachments && e.onSelectAttachments({
|
|
42
|
+
selectedFiles: t.affectedFiles,
|
|
43
|
+
allFiles: t.newState
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render() {
|
|
49
|
+
const {
|
|
50
|
+
onFilesAdd: e,
|
|
51
|
+
files: l,
|
|
52
|
+
restrictions: a,
|
|
53
|
+
multiple: t,
|
|
54
|
+
accept: A,
|
|
55
|
+
onSelectAttachments: F,
|
|
56
|
+
onRemoveAttachment: R,
|
|
57
|
+
_registerRemoveCallback: v,
|
|
58
|
+
_uploadRef: o,
|
|
59
|
+
...s
|
|
60
|
+
} = this.$attrs;
|
|
61
|
+
return n(d, null, [n(f, s, null), n(h, {
|
|
62
|
+
ref: (i) => {
|
|
63
|
+
this.uploadRef = i, o && (o.value = i);
|
|
64
|
+
},
|
|
65
|
+
files: this.files,
|
|
66
|
+
onAdd: this.handleFilesAdd,
|
|
67
|
+
autoUpload: !1,
|
|
68
|
+
restrictions: this.restrictions,
|
|
69
|
+
multiple: this.multiple,
|
|
70
|
+
accept: this.accept,
|
|
71
|
+
class: "k-hidden"
|
|
72
|
+
}, null)]);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
b as PromptBoxUploadButton
|
|
77
|
+
};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { UploadFileInfo, UploadFileRestrictions } from '@progress/kendo-vue-upload';
|
|
9
|
+
import { ButtonProps, SpeechToTextButtonProps } from '@progress/kendo-vue-buttons';
|
|
10
|
+
import { PromptBoxSelectAttachmentsEvent } from '../Events';
|
|
11
|
+
/**
|
|
12
|
+
* Props passed to affix render functions.
|
|
13
|
+
*
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface AffixTemplateProps {
|
|
17
|
+
/**
|
|
18
|
+
* Props for the upload button component.
|
|
19
|
+
*/
|
|
20
|
+
uploadButtonProps: any;
|
|
21
|
+
/**
|
|
22
|
+
* Props for the speech-to-text button component.
|
|
23
|
+
*/
|
|
24
|
+
speechToTextButtonProps: any;
|
|
25
|
+
/**
|
|
26
|
+
* Props for the action button component.
|
|
27
|
+
*/
|
|
28
|
+
actionButtonProps: any;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Defines the line mode for the PromptBox component.
|
|
32
|
+
*/
|
|
33
|
+
export type PromptBoxMode = 'single' | 'multi' | 'auto';
|
|
34
|
+
/**
|
|
35
|
+
* Represents the configuration options for the Upload button.
|
|
36
|
+
* Combines button styling props, upload behavior props, and event callbacks.
|
|
37
|
+
*/
|
|
38
|
+
export interface UploadButtonProps extends Pick<ButtonProps, 'disabled' | 'fillMode' | 'rounded' | 'size' | 'svgIcon' | 'themeColor'> {
|
|
39
|
+
/**
|
|
40
|
+
* Upload file restrictions.
|
|
41
|
+
*/
|
|
42
|
+
restrictions?: UploadFileRestrictions;
|
|
43
|
+
/**
|
|
44
|
+
* Whether multiple files can be selected.
|
|
45
|
+
*/
|
|
46
|
+
multiple?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The file types that can be selected.
|
|
49
|
+
*/
|
|
50
|
+
accept?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Fires when the user selects files via the upload button.
|
|
53
|
+
* Provides both the newly selected files and the complete file state.
|
|
54
|
+
*/
|
|
55
|
+
onSelectAttachments?: (event: PromptBoxSelectAttachmentsEvent) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Fires when the user removes an attachment by clicking the remove button.
|
|
58
|
+
* In controlled mode (when `attachments` prop is provided), use this to update your state.
|
|
59
|
+
*/
|
|
60
|
+
onRemoveAttachment?: (fileName: string) => void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Represents the props of the PromptBox component.
|
|
64
|
+
*/
|
|
65
|
+
export interface PromptBoxProps {
|
|
66
|
+
/**
|
|
67
|
+
* Sets the value for the internal input/textarea of the PromptBox.
|
|
68
|
+
*
|
|
69
|
+
* @default ''
|
|
70
|
+
*/
|
|
71
|
+
value?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The default value of the PromptBox (uncontrolled mode).
|
|
74
|
+
*/
|
|
75
|
+
defaultValue?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the line mode for the PromptBox component.
|
|
78
|
+
*
|
|
79
|
+
* The available options are:
|
|
80
|
+
* - `single` - Sets one line for the text input
|
|
81
|
+
* - `multi` - Multi-line textarea
|
|
82
|
+
* - `auto` - Transforms the PromptBox from single to multi line mode based on content
|
|
83
|
+
*
|
|
84
|
+
* @default 'auto'
|
|
85
|
+
*/
|
|
86
|
+
mode?: PromptBoxMode;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the visible height of the internal textarea in lines.
|
|
89
|
+
* Only applicable when mode is 'multi'.
|
|
90
|
+
* This sets the minimum number of rows.
|
|
91
|
+
*
|
|
92
|
+
* @default 1
|
|
93
|
+
*/
|
|
94
|
+
rows?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Sets the maximum height of the native textarea in px.
|
|
97
|
+
* When the text height exceeds this value, a scrollbar appears.
|
|
98
|
+
* Applicable for `multi` and `auto` modes.
|
|
99
|
+
*/
|
|
100
|
+
maxTextAreaHeight?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the title attribute of the internal text input element of the component.
|
|
103
|
+
*
|
|
104
|
+
* @default ''
|
|
105
|
+
*/
|
|
106
|
+
title?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Sets the disabled state of the PromptBox component.
|
|
109
|
+
*
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the read-only state of the PromptBox component.
|
|
115
|
+
*
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
readOnly?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* The hint, which is displayed when the text input element is empty.
|
|
121
|
+
*
|
|
122
|
+
* @default ''
|
|
123
|
+
*/
|
|
124
|
+
placeholder?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Sets the maximum number of characters allowed in the text input element.
|
|
127
|
+
*/
|
|
128
|
+
maxLength?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Sets the HTML attributes of the inner focusable input element.
|
|
131
|
+
*/
|
|
132
|
+
inputAttributes?: Record<string, any>;
|
|
133
|
+
/**
|
|
134
|
+
* Configures the `fillMode` of the PromptBox.
|
|
135
|
+
*
|
|
136
|
+
* The available options are:
|
|
137
|
+
* - solid
|
|
138
|
+
* - outline
|
|
139
|
+
* - flat
|
|
140
|
+
*/
|
|
141
|
+
fillMode?: 'solid' | 'flat' | 'outline';
|
|
142
|
+
/**
|
|
143
|
+
* Custom content rendered at the top of the PromptBox.
|
|
144
|
+
* Only rendered when mode is 'multi' or when 'auto' mode has expanded.
|
|
145
|
+
* Can be a render function receiving AffixTemplateProps, or a Vue VNode.
|
|
146
|
+
*/
|
|
147
|
+
topAffix?: any;
|
|
148
|
+
/**
|
|
149
|
+
* Custom content rendered at the start of the input element in single line mode.
|
|
150
|
+
* In 'multi' and 'auto' with more than one row, it is rendered at the bottom left of the textarea.
|
|
151
|
+
* Can be a render function receiving AffixTemplateProps, or a Vue VNode.
|
|
152
|
+
*/
|
|
153
|
+
startAffix?: any;
|
|
154
|
+
/**
|
|
155
|
+
* Custom content rendered at the end of the input element.
|
|
156
|
+
* In 'multi' and 'auto' with more than one row, it is rendered at the bottom right of the textarea.
|
|
157
|
+
* Custom content appears BEFORE built-in buttons.
|
|
158
|
+
* Can be a render function receiving AffixTemplateProps, or a Vue VNode.
|
|
159
|
+
*/
|
|
160
|
+
endAffix?: any;
|
|
161
|
+
/**
|
|
162
|
+
* Specifies whether the Send button is transformed to a stop generation button.
|
|
163
|
+
*
|
|
164
|
+
* @default false
|
|
165
|
+
*/
|
|
166
|
+
loading?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Sets the File Attachments button visibility and/or settings.
|
|
169
|
+
*
|
|
170
|
+
* @default false
|
|
171
|
+
*/
|
|
172
|
+
uploadButtonConfig?: boolean | UploadButtonProps;
|
|
173
|
+
/**
|
|
174
|
+
* Sets the SpeechToText button visibility and/or settings.
|
|
175
|
+
*
|
|
176
|
+
* @default true
|
|
177
|
+
*/
|
|
178
|
+
speechToTextButtonConfig?: boolean | SpeechToTextButtonProps;
|
|
179
|
+
/**
|
|
180
|
+
* Sets the send button visibility and/or settings.
|
|
181
|
+
*
|
|
182
|
+
* @default true
|
|
183
|
+
*/
|
|
184
|
+
actionButtonConfig?: boolean | ButtonProps;
|
|
185
|
+
/**
|
|
186
|
+
* Sets the attachments for controlled file management.
|
|
187
|
+
* When provided, the component operates in controlled mode and the developer must manage attachments.
|
|
188
|
+
* When not provided, the component manages attachments internally (uncontrolled mode).
|
|
189
|
+
*/
|
|
190
|
+
attachments?: UploadFileInfo[];
|
|
191
|
+
/**
|
|
192
|
+
* Custom content rendered before the file attachments list in the FileBox.
|
|
193
|
+
*
|
|
194
|
+
* @hidden
|
|
195
|
+
*/
|
|
196
|
+
header?: any;
|
|
197
|
+
}
|