@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.
@@ -0,0 +1,472 @@
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 U, createVNode as n, nextTick as K, ref as q, mergeProps as f, Fragment as G } from "vue";
9
+ import { classNames as S, templateRendering as X, getListeners as Z, shouldShowValidationUI as J, WatermarkOverlay as Q, getLicenseMessage as Y, validatePackage as tt } from "@progress/kendo-vue-common";
10
+ import { stopSmIcon as et, arrowUpOutlineIcon as it, paperclipOutlineAltRightIcon as st } from "@progress/kendo-svg-icons";
11
+ import { PromptBoxActionButton as nt } from "./PromptBoxActionButton.mjs";
12
+ import { PromptBoxSpeechToTextButton as ot } from "./PromptBoxSpeechToTextButton.mjs";
13
+ import { PromptBoxUploadButton as lt } from "./PromptBoxUploadButton.mjs";
14
+ import { FileBox as rt } from "./FileBox.mjs";
15
+ import { packageMetadata as T } from "../package-metadata.mjs";
16
+ import { provideLocalizationService as at } from "@progress/kendo-vue-intl";
17
+ import { promptBoxStopGenerating as g, messages as h, promptBoxSendButton as $, promptBoxAttachFile as x, promptBoxInput as R, promptBoxAriaLabel as E } from "../messages/main.mjs";
18
+ const l = "k-prompt-box", ht = 20, ut = 50, yt = /* @__PURE__ */ U({
19
+ name: "KendoPromptBox",
20
+ emits: {
21
+ change: (t) => !0,
22
+ focus: (t) => !0,
23
+ blur: (t) => !0,
24
+ promptaction: (t) => !0
25
+ },
26
+ props: {
27
+ value: String,
28
+ defaultValue: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ mode: {
33
+ type: String,
34
+ default: "auto"
35
+ },
36
+ rows: {
37
+ type: Number,
38
+ default: 1
39
+ },
40
+ maxTextAreaHeight: String,
41
+ title: String,
42
+ disabled: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ readOnly: {
47
+ type: Boolean,
48
+ default: !1
49
+ },
50
+ placeholder: String,
51
+ maxLength: Number,
52
+ inputAttributes: Object,
53
+ fillMode: String,
54
+ topAffix: [Object, Function, String],
55
+ startAffix: [Object, Function, String],
56
+ endAffix: [Object, Function, String],
57
+ header: [Object, Function, String],
58
+ loading: {
59
+ type: Boolean,
60
+ default: !1
61
+ },
62
+ uploadButtonConfig: {
63
+ type: [Boolean, Object],
64
+ default: !1
65
+ },
66
+ speechToTextButtonConfig: {
67
+ type: [Boolean, Object],
68
+ default: !0
69
+ },
70
+ actionButtonConfig: {
71
+ type: [Boolean, Object],
72
+ default: !0
73
+ },
74
+ attachments: Array
75
+ },
76
+ inject: {
77
+ kendoLocalizationService: {
78
+ default: null
79
+ }
80
+ },
81
+ created() {
82
+ tt(T), this._uploadRef = q(null);
83
+ },
84
+ data() {
85
+ return {
86
+ stateValue: this.$props.defaultValue || "",
87
+ stateFiles: [],
88
+ hasExpanded: !1,
89
+ initialHeight: 0,
90
+ minMultiRowHeight: 0,
91
+ isResizing: !1,
92
+ previousValueLength: 0,
93
+ singleLineWidth: 0,
94
+ resizeObserver: null,
95
+ resizeTimeout: null,
96
+ onRemoveAttachmentCallback: null
97
+ };
98
+ },
99
+ computed: {
100
+ isControlled() {
101
+ return this.$props.value !== void 0;
102
+ },
103
+ currentValue() {
104
+ return this.isControlled ? this.$props.value || "" : this.stateValue;
105
+ },
106
+ isFilesControlled() {
107
+ return this.$props.attachments !== void 0;
108
+ },
109
+ currentFiles() {
110
+ return this.isFilesControlled ? this.$props.attachments || [] : this.stateFiles;
111
+ },
112
+ canSendMessage() {
113
+ var t;
114
+ return !!((t = this.currentValue) != null && t.trim() || this.currentFiles.length > 0);
115
+ },
116
+ isMultilineLayout() {
117
+ return this.$props.mode === "multi" || this.$props.mode === "auto" && this.hasExpanded;
118
+ },
119
+ hasBuiltInButtons() {
120
+ return this.$props.uploadButtonConfig !== !1 || this.$props.speechToTextButtonConfig !== !1 || this.$props.actionButtonConfig !== !1;
121
+ },
122
+ hasEndAffixOrButtons() {
123
+ return !!this.$props.endAffix || this.hasBuiltInButtons;
124
+ },
125
+ hasStartAffixOrEndAffixOrButtons() {
126
+ return !!this.$props.startAffix || !!this.$props.endAffix || this.hasBuiltInButtons;
127
+ },
128
+ effectiveRows() {
129
+ return this.$props.mode === "auto" ? 1 : this.$props.rows;
130
+ }
131
+ },
132
+ watch: {
133
+ currentValue(t) {
134
+ if (this.$props.mode === "single")
135
+ return;
136
+ const e = (t == null ? void 0 : t.length) || 0;
137
+ requestAnimationFrame(() => {
138
+ const i = this.$refs.inputElement;
139
+ i && (this.$props.mode === "multi" ? this.resizeMultiMode(i) : this.$props.mode === "auto" && this.resizeAutoMode(i, e), this.previousValueLength = e);
140
+ });
141
+ },
142
+ rows() {
143
+ this.$props.mode !== "single" && (this.captureInitialDimensions(), this.resize());
144
+ },
145
+ maxTextAreaHeight() {
146
+ this.$props.mode !== "single" && this.resize();
147
+ },
148
+ mode() {
149
+ this.$props.mode !== "single" && K(() => {
150
+ this.captureInitialDimensions(), this.resize();
151
+ });
152
+ },
153
+ hasExpanded(t) {
154
+ if (this.$props.mode === "auto" && t && requestAnimationFrame(() => {
155
+ const e = this.$refs.inputElement;
156
+ e && (this.updateHeight(e), this.isResizing = !1);
157
+ }), this.$props.mode === "auto" && !t) {
158
+ const e = this.$refs.inputElement;
159
+ e && (e.style.height = "", e.style.overflow = "", this.isResizing = !1);
160
+ }
161
+ }
162
+ },
163
+ mounted() {
164
+ this.$props.mode !== "single" && this.captureInitialDimensions(), this.setupResizeObserver();
165
+ },
166
+ beforeUnmount() {
167
+ this.cleanupResizeObserver();
168
+ },
169
+ methods: {
170
+ captureInitialDimensions() {
171
+ const t = this.$refs.inputElement;
172
+ if (!t || this.$props.mode === "single")
173
+ return;
174
+ const e = globalThis.getComputedStyle(t), i = Number.parseFloat(e.lineHeight) || ht, s = Number.parseFloat(e.paddingTop) || 0, o = Number.parseFloat(e.paddingBottom) || 0;
175
+ this.initialHeight = t.offsetHeight || i + s + o, this.minMultiRowHeight = i * this.$props.rows + s + o, this.$props.mode === "auto" && !this.hasExpanded && (this.singleLineWidth = t.offsetWidth);
176
+ },
177
+ calculateHeight(t) {
178
+ if (this.$props.maxTextAreaHeight) {
179
+ const e = Number.parseInt(this.$props.maxTextAreaHeight, 10);
180
+ if (t > e)
181
+ return e;
182
+ }
183
+ return Math.max(this.minMultiRowHeight, t);
184
+ },
185
+ resizeMultiMode(t) {
186
+ t.style.overflow = "hidden", t.style.height = `${this.initialHeight}px`;
187
+ const e = t.scrollHeight, i = this.calculateHeight(e);
188
+ t.style.height = `${i}px`, this.$props.maxTextAreaHeight && e > Number.parseInt(this.$props.maxTextAreaHeight, 10) && (t.style.overflow = "");
189
+ },
190
+ updateHeight(t) {
191
+ t.style.overflow = "hidden", t.style.height = `${this.initialHeight}px`;
192
+ const e = t.scrollHeight, i = this.$props.maxTextAreaHeight ? Math.min(e, Number.parseInt(this.$props.maxTextAreaHeight, 10)) : e;
193
+ t.style.height = `${i}px`, this.$props.maxTextAreaHeight && e > Number.parseInt(this.$props.maxTextAreaHeight, 10) && (t.style.overflow = "");
194
+ },
195
+ shouldCollapse(t) {
196
+ if (this.singleLineWidth <= 0)
197
+ return !1;
198
+ const e = t.style.height, i = t.style.width;
199
+ t.style.overflow = "hidden", t.style.width = `${this.singleLineWidth}px`, t.style.height = `${this.initialHeight}px`;
200
+ const s = t.scrollWidth <= this.singleLineWidth && t.scrollHeight <= this.initialHeight;
201
+ return t.style.overflow = "", t.style.width = i || "", t.style.height = e || "", s;
202
+ },
203
+ resizeAutoMode(t, e) {
204
+ if (this.isResizing)
205
+ return;
206
+ if ((t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight) && !this.hasExpanded) {
207
+ this.isResizing = !0, this.hasExpanded = !0;
208
+ return;
209
+ }
210
+ if (this.hasExpanded) {
211
+ this.updateHeight(t);
212
+ const s = this.previousValueLength;
213
+ e < s && this.shouldCollapse(t) && (t.style.height = "", this.isResizing = !0, this.hasExpanded = !1);
214
+ }
215
+ },
216
+ resize() {
217
+ var i;
218
+ if (this.$props.mode === "single")
219
+ return;
220
+ const t = this.$refs.inputElement;
221
+ if (!t)
222
+ return;
223
+ const e = ((i = t.value) == null ? void 0 : i.length) || 0;
224
+ this.$props.mode === "multi" ? this.resizeMultiMode(t) : this.$props.mode === "auto" && this.resizeAutoMode(t, e);
225
+ },
226
+ setupResizeObserver() {
227
+ if (this.$props.mode === "single")
228
+ return;
229
+ const t = this.$refs.inputElement;
230
+ t && (this.resizeObserver = new ResizeObserver(() => {
231
+ this.resizeTimeout && clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(() => {
232
+ this.$props.mode === "auto" && !this.hasExpanded && this.captureInitialDimensions(), this.resize();
233
+ }, ut);
234
+ }), this.resizeObserver.observe(t));
235
+ },
236
+ cleanupResizeObserver() {
237
+ this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.resizeTimeout && (clearTimeout(this.resizeTimeout), this.resizeTimeout = null);
238
+ },
239
+ handleChange(t) {
240
+ const i = t.target.value;
241
+ !this.isControlled && !this.$props.disabled && (this.stateValue = i), this.$props.disabled || this.$emit("change", {
242
+ event: t,
243
+ value: i
244
+ }), this.$props.mode !== "single" && this.resize();
245
+ },
246
+ handleFocus(t) {
247
+ this.$props.disabled || this.$emit("focus", {
248
+ event: t
249
+ });
250
+ },
251
+ handleBlur(t) {
252
+ this.$props.disabled || this.$emit("blur", {
253
+ event: t
254
+ });
255
+ },
256
+ handleButtonMouseDown(t) {
257
+ t.preventDefault();
258
+ },
259
+ handleActionButtonClick(t) {
260
+ this.$emit("promptaction", {
261
+ event: t,
262
+ value: this.currentValue,
263
+ attachments: this.currentFiles
264
+ }), this.isControlled || (this.stateValue = ""), this.isFilesControlled || (this.stateFiles = []);
265
+ },
266
+ handleKeyDown(t) {
267
+ if (!(t.key === "Enter" && t.shiftKey)) {
268
+ if (t.key === "ArrowUp" || t.key === "ArrowDown") {
269
+ t.stopPropagation();
270
+ return;
271
+ }
272
+ if (t.key === "Enter") {
273
+ if (t.preventDefault(), this.$props.loading)
274
+ return;
275
+ this.canSendMessage && this.handleActionButtonClick(t);
276
+ }
277
+ }
278
+ },
279
+ handleSpeechResult(t) {
280
+ var s;
281
+ const {
282
+ isFinal: e,
283
+ alternatives: i
284
+ } = t;
285
+ if (i.length > 0) {
286
+ const o = i[0];
287
+ if (e) {
288
+ const r = this.$refs.inputElement, c = (r == null ? void 0 : r.value) || "", m = (c ? `${c} ` : "") + o.transcript;
289
+ if (this.isControlled || (this.stateValue = m), !this.$props.disabled) {
290
+ const B = {
291
+ target: r,
292
+ currentTarget: r
293
+ };
294
+ this.$emit("change", {
295
+ event: B,
296
+ value: m
297
+ });
298
+ }
299
+ }
300
+ }
301
+ (s = this.$refs.inputElement) == null || s.focus();
302
+ },
303
+ handleUploadButtonClick() {
304
+ const t = this._uploadRef.value;
305
+ if (t != null && t.$el) {
306
+ const e = t.$el.querySelector('input[type="file"]');
307
+ e && e.click();
308
+ }
309
+ },
310
+ onFilesSelect(t) {
311
+ var r;
312
+ const e = Array.from(t.affectedFiles), i = this.$props.uploadButtonConfig, s = typeof i == "object" && i, o = s ? s.onSelectAttachments : void 0;
313
+ this.isFilesControlled || (this.stateFiles = [...this.stateFiles, ...e]), o && o({
314
+ selectedFiles: t.affectedFiles,
315
+ allFiles: t.newState
316
+ }), (r = this.$refs.inputElement) == null || r.focus();
317
+ },
318
+ handleRemoveFile(t) {
319
+ this.isFilesControlled || (this.stateFiles = this.stateFiles.filter((o) => o.name !== t));
320
+ const e = this.$props.uploadButtonConfig, i = typeof e == "object" && e, s = i ? i.onRemoveAttachment : void 0;
321
+ s && (this.onRemoveAttachmentCallback = s), this.onRemoveAttachmentCallback && this.onRemoveAttachmentCallback(t);
322
+ },
323
+ renderAffix(t, e) {
324
+ return t ? typeof t == "function" ? t(e) : t : null;
325
+ }
326
+ },
327
+ render() {
328
+ const t = at(this), {
329
+ mode: e,
330
+ fillMode: i,
331
+ maxTextAreaHeight: s,
332
+ disabled: o,
333
+ readOnly: r,
334
+ placeholder: c,
335
+ title: m,
336
+ maxLength: B,
337
+ inputAttributes: O,
338
+ topAffix: z,
339
+ startAffix: u,
340
+ endAffix: p,
341
+ header: L,
342
+ loading: d,
343
+ speechToTextButtonConfig: v,
344
+ actionButtonConfig: b,
345
+ uploadButtonConfig: A
346
+ } = this.$props, a = {
347
+ uploadButtonProps: {
348
+ fillMode: "flat",
349
+ svgIcon: st,
350
+ size: "small",
351
+ rounded: "full",
352
+ onClick: this.handleUploadButtonClick,
353
+ onFilesAdd: this.onFilesSelect,
354
+ files: this.currentFiles,
355
+ _uploadRef: this._uploadRef,
356
+ "aria-label": t.toLanguageString(x, h[x]),
357
+ title: t.toLanguageString(x, h[x]),
358
+ _registerRemoveCallback: (C) => {
359
+ this.onRemoveAttachmentCallback = C || null;
360
+ }
361
+ },
362
+ speechToTextButtonProps: {
363
+ fillMode: "flat",
364
+ size: "small",
365
+ rounded: "full",
366
+ onResult: this.handleSpeechResult
367
+ },
368
+ actionButtonProps: {
369
+ rounded: "full",
370
+ size: "small",
371
+ svgIcon: d ? et : it,
372
+ class: d ? "k-generating" : "",
373
+ onClick: this.handleActionButtonClick,
374
+ onMousedown: this.handleButtonMouseDown,
375
+ disabled: !d && !this.canSendMessage,
376
+ "aria-disabled": !d && !this.canSendMessage,
377
+ "aria-label": d ? t.toLanguageString(g, h[g]) : t.toLanguageString($, h[$]),
378
+ title: d ? t.toLanguageString(g, h[g]) : t.toLanguageString($, h[$]),
379
+ "aria-live": "polite"
380
+ }
381
+ }, y = () => {
382
+ const C = v !== !1, k = b !== !1, I = A !== !1, P = typeof v == "object" ? v : void 0, _ = typeof A == "object" ? A : {}, {
383
+ restrictions: j,
384
+ multiple: V = !0,
385
+ accept: D,
386
+ onSelectAttachments: pt,
387
+ onRemoveAttachment: dt,
388
+ ...N
389
+ } = _, F = {
390
+ restrictions: j,
391
+ multiple: V,
392
+ accept: D
393
+ }, W = typeof b == "object" ? b : void 0;
394
+ return n(G, null, [I && n(lt, f({
395
+ ref: "uploadButton"
396
+ }, a.uploadButtonProps, {
397
+ restrictions: F.restrictions,
398
+ multiple: F.multiple,
399
+ accept: F.accept
400
+ }, N), null), C && n(ot, f(a.speechToTextButtonProps, P), null), k && n(nt, f(a.actionButtonProps, W), null)]);
401
+ }, H = {
402
+ disabled: o,
403
+ readOnly: r,
404
+ placeholder: c,
405
+ title: m,
406
+ maxLength: B,
407
+ "aria-label": t.toLanguageString(R, h[R]),
408
+ value: this.currentValue,
409
+ onKeydown: this.handleKeyDown,
410
+ ...O,
411
+ onInput: this.handleChange,
412
+ onFocus: this.handleFocus,
413
+ onBlur: this.handleBlur,
414
+ ref: "inputElement"
415
+ }, M = () => n("div", {
416
+ class: `${l}-content`
417
+ }, [u && n("div", {
418
+ class: `${l}-affix`
419
+ }, [this.renderAffix(u, a)]), n("input", f(H, {
420
+ class: S("k-input-inner", `${l}-input`)
421
+ }), null), this.hasEndAffixOrButtons ? n("div", {
422
+ class: `${l}-affix`
423
+ }, [p && this.renderAffix(p, a), y()]) : null]), w = () => n("div", {
424
+ class: `${l}-content`
425
+ }, [e === "multi" && z && n("div", {
426
+ class: `${l}-affix`
427
+ }, [this.renderAffix(z, a)]), e === "auto" && u && n("div", {
428
+ class: `${l}-affix`,
429
+ style: {
430
+ display: this.hasExpanded ? "none" : void 0
431
+ }
432
+ }, [this.renderAffix(u, a)]), n("textarea", f(H, {
433
+ class: S("k-input-inner", `${l}-textarea`),
434
+ rows: this.effectiveRows,
435
+ style: s ? {
436
+ maxHeight: s
437
+ } : {}
438
+ }, this.isMultilineLayout && {
439
+ "aria-multiline": "true"
440
+ }), null), e === "auto" && this.hasEndAffixOrButtons ? n("div", {
441
+ class: `${l}-affix`,
442
+ style: {
443
+ display: this.hasExpanded ? "none" : void 0
444
+ }
445
+ }, [p && this.renderAffix(p, a), y()]) : null, this.hasStartAffixOrEndAffixOrButtons ? n("div", {
446
+ class: `${l}-affix`,
447
+ style: {
448
+ display: this.isMultilineLayout ? void 0 : "none"
449
+ }
450
+ }, [u && this.renderAffix(u, a), (u || p) && n("div", {
451
+ class: "k-spacer"
452
+ }, null), p && this.renderAffix(p, a), y()]) : null]);
453
+ return n("div", {
454
+ "aria-label": t.toLanguageString(E, h[E]),
455
+ class: S("k-input", l, {
456
+ [`k-input-${i}`]: i,
457
+ "k-disabled": o,
458
+ "k-prompt-box-singleline": e === "single",
459
+ "k-prompt-box-multiline": this.isMultilineLayout
460
+ })
461
+ }, [n(rt, {
462
+ files: this.currentFiles,
463
+ onRemoveFile: this.handleRemoveFile,
464
+ header: X.call(this, L, Z.call(this))
465
+ }, null), e === "single" ? M() : w(), J(T) && n(Q, {
466
+ message: Y(T)
467
+ }, null)]);
468
+ }
469
+ });
470
+ export {
471
+ yt as PromptBox
472
+ };
@@ -0,0 +1,20 @@
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
+ /**
9
+ * Represents the props of the PromptBoxActionButton component.
10
+ * Extends the ButtonProps from @progress/kendo-vue-buttons.
11
+ */
12
+ export interface PromptBoxActionButtonProps {
13
+ [key: string]: any;
14
+ }
15
+ /**
16
+ * Represents the PromptBox Action Button component.
17
+ * Receives default props from the parent PromptBox component.
18
+ */
19
+ declare const PromptBoxActionButton: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
+ export { PromptBoxActionButton };
@@ -0,0 +1,8 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),e=require("@progress/kendo-vue-buttons"),o=t.defineComponent({name:"KendoPromptBoxActionButton",inheritAttrs:!1,render(){return t.createVNode(e.Button,this.$attrs,null)}});exports.PromptBoxActionButton=o;
@@ -0,0 +1,19 @@
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 t, createVNode as o } from "vue";
9
+ import { Button as n } from "@progress/kendo-vue-buttons";
10
+ const i = /* @__PURE__ */ t({
11
+ name: "KendoPromptBoxActionButton",
12
+ inheritAttrs: !1,
13
+ render() {
14
+ return o(n, this.$attrs, null);
15
+ }
16
+ });
17
+ export {
18
+ i as PromptBoxActionButton
19
+ };
@@ -0,0 +1,20 @@
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
+ /**
9
+ * Represents the props of the PromptBoxSpeechToTextButton component.
10
+ * Extends the SpeechToTextButtonProps from @progress/kendo-vue-buttons.
11
+ */
12
+ export interface PromptBoxSpeechToTextButtonProps {
13
+ [key: string]: any;
14
+ }
15
+ /**
16
+ * Represents the PromptBox Speech-to-Text Button component.
17
+ * Receives default props from the parent PromptBox component.
18
+ */
19
+ declare const PromptBoxSpeechToTextButton: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
+ export { PromptBoxSpeechToTextButton };
@@ -0,0 +1,8 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("@progress/kendo-vue-buttons"),o=e.defineComponent({name:"KendoPromptBoxSpeechToTextButton",inheritAttrs:!1,render(){return e.createVNode(t.SpeechToTextButton,this.$attrs,null)}});exports.PromptBoxSpeechToTextButton=o;
@@ -0,0 +1,19 @@
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 t, createVNode as e } from "vue";
9
+ import { SpeechToTextButton as o } from "@progress/kendo-vue-buttons";
10
+ const p = /* @__PURE__ */ t({
11
+ name: "KendoPromptBoxSpeechToTextButton",
12
+ inheritAttrs: !1,
13
+ render() {
14
+ return e(o, this.$attrs, null);
15
+ }
16
+ });
17
+ export {
18
+ p as PromptBoxSpeechToTextButton
19
+ };
@@ -0,0 +1,95 @@
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 { PropType } from 'vue';
9
+ import { UploadOnAddEvent, UploadFileInfo, UploadFileRestrictions } from '@progress/kendo-vue-upload';
10
+ import { PromptBoxSelectAttachmentsEvent } from './Events';
11
+ /**
12
+ * Represents the props of the PromptBoxUploadButton component.
13
+ */
14
+ export interface PromptBoxUploadButtonProps {
15
+ /**
16
+ * Callback fired when files are selected.
17
+ *
18
+ * @hidden
19
+ */
20
+ onFilesAdd?: (event: UploadOnAddEvent) => void;
21
+ /**
22
+ * The currently selected files.
23
+ *
24
+ * @hidden
25
+ */
26
+ files?: UploadFileInfo[];
27
+ /**
28
+ * Restrictions on the files that can be uploaded.
29
+ */
30
+ restrictions?: UploadFileRestrictions;
31
+ /**
32
+ * Whether multiple files can be selected.
33
+ */
34
+ multiple?: boolean;
35
+ /**
36
+ * The file types that can be selected.
37
+ */
38
+ accept?: string;
39
+ /**
40
+ * Fires when the user selects files via the upload button.
41
+ */
42
+ onSelectAttachments?: (event: PromptBoxSelectAttachmentsEvent) => void;
43
+ /**
44
+ * Fires when the user removes an attachment by clicking the remove button.
45
+ */
46
+ onRemoveAttachment?: (fileName: string) => void;
47
+ /**
48
+ * @hidden
49
+ * Internal callback registration for parent component.
50
+ */
51
+ _registerRemoveCallback?: (callback: ((fileName: string) => void) | undefined) => void;
52
+ [key: string]: any;
53
+ }
54
+ /**
55
+ * Represents the PromptBox Upload Button component.
56
+ * Receives default props from the parent PromptBox component.
57
+ */
58
+ declare const PromptBoxUploadButton: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
59
+ onFilesAdd: PropType<(event: UploadOnAddEvent) => void>;
60
+ files: {
61
+ type: PropType<UploadFileInfo[]>;
62
+ default: () => any[];
63
+ };
64
+ restrictions: PropType<UploadFileRestrictions>;
65
+ multiple: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ accept: StringConstructor;
70
+ onSelectAttachments: PropType<(event: PromptBoxSelectAttachmentsEvent) => void>;
71
+ onRemoveAttachment: PropType<(fileName: string) => void>;
72
+ _registerRemoveCallback: PropType<(callback: (fileName: string) => void) => void>;
73
+ }>, {
74
+ uploadRef: import('vue').Ref<any, any>;
75
+ handleFilesAdd: (event: UploadOnAddEvent) => void;
76
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
77
+ onFilesAdd: PropType<(event: UploadOnAddEvent) => void>;
78
+ files: {
79
+ type: PropType<UploadFileInfo[]>;
80
+ default: () => any[];
81
+ };
82
+ restrictions: PropType<UploadFileRestrictions>;
83
+ multiple: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ accept: StringConstructor;
88
+ onSelectAttachments: PropType<(event: PromptBoxSelectAttachmentsEvent) => void>;
89
+ onRemoveAttachment: PropType<(fileName: string) => void>;
90
+ _registerRemoveCallback: PropType<(callback: (fileName: string) => void) => void>;
91
+ }>> & Readonly<{}>, {
92
+ multiple: boolean;
93
+ files: UploadFileInfo[];
94
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
95
+ export { PromptBoxUploadButton };
@@ -0,0 +1,8 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),s=require("@progress/kendo-vue-buttons"),d=require("@progress/kendo-vue-upload"),r=t.defineComponent({name:"KendoPromptBoxUploadButton",inheritAttrs:!1,props:{onFilesAdd:Function,files:{type:Array,default:()=>[]},restrictions:Object,multiple:{type:Boolean,default:!0},accept:String,onSelectAttachments:Function,onRemoveAttachment:Function,_registerRemoveCallback:Function},setup(e){const o=t.ref(null);return t.watch(()=>e.onRemoveAttachment,n=>{e._registerRemoveCallback&&n&&e._registerRemoveCallback(n)},{immediate:!0}),t.onUnmounted(()=>{e._registerRemoveCallback&&e.onRemoveAttachment&&e._registerRemoveCallback(void 0)}),{uploadRef:o,handleFilesAdd:n=>{e.onFilesAdd&&e.onFilesAdd(n),e.onSelectAttachments&&e.onSelectAttachments({selectedFiles:n.affectedFiles,allFiles:n.newState})}}},render(){const{onFilesAdd:e,files:o,restrictions:a,multiple:n,accept:u,onSelectAttachments:m,onRemoveAttachment:f,_registerRemoveCallback:h,_uploadRef:l,...c}=this.$attrs;return t.createVNode(t.Fragment,null,[t.createVNode(s.Button,c,null),t.createVNode(d.Upload,{ref:i=>{this.uploadRef=i,l&&(l.value=i)},files:this.files,onAdd:this.handleFilesAdd,autoUpload:!1,restrictions:this.restrictions,multiple:this.multiple,accept:this.accept,class:"k-hidden"},null)])}});exports.PromptBoxUploadButton=r;