@opentiny/tiny-robot 0.3.1-alpha.6 → 0.3.1-alpha.8
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/action-group/index.js +8 -8
- package/dist/attachments/index.js +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +11 -4014
- package/dist/container/index.js +7 -7
- package/dist/drag-overlay/index.js +6 -6
- package/dist/dropdown-menu/index.js +7 -7
- package/dist/feedback/index.js +1 -1
- package/dist/flow-layout-buttons/index.js +16 -16
- package/dist/history/index.js +1 -1
- package/dist/icon-button/index.js +1 -1
- package/dist/index.d.ts +942 -673
- package/dist/index.js +108 -104
- package/dist/index2.js +90 -90
- package/dist/index3.js +155 -150
- package/dist/index4.js +319 -295
- package/dist/index5.js +507 -279
- package/dist/index6.js +286 -146
- package/dist/index7.js +161 -0
- package/dist/mcp-add-form/index.js +6 -6
- package/dist/mcp-server-picker/index.js +58 -57
- package/dist/prompts/index.js +3 -3
- package/dist/sender/index.js +3261 -6
- package/dist/sender-compat/index.js +105 -109
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +13 -13
- package/dist/suggestion-popover/index.js +181 -182
- package/dist/theme-provider/index.js +7 -7
- package/dist/welcome/index.js +4 -4
- package/package.json +8 -5
- package/dist/chat-input/index.js +0 -3151
- package/dist/loading.js +0 -4
- /package/dist/{chat-input-actions → sender-actions}/index.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import F from "./attachments/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { B as S, a as b, b as x } from "./index5.js";
|
|
3
|
+
import { c as xe, d as Ee, u as ze, e as Ce, f as Pe, g as Ae, h as Le, i as ye } from "./index5.js";
|
|
4
|
+
import E from "./container/index.js";
|
|
5
|
+
import z from "./conversations/index.js";
|
|
6
|
+
import C from "./drag-overlay/index.js";
|
|
7
7
|
import P from "./dropdown-menu/index.js";
|
|
8
|
-
import
|
|
9
|
-
import { H as
|
|
10
|
-
import { u as
|
|
8
|
+
import A from "./feedback/index.js";
|
|
9
|
+
import { H as L } from "./index6.js";
|
|
10
|
+
import { u as Me } from "./index6.js";
|
|
11
11
|
import y from "./icon-button/index.js";
|
|
12
|
-
import { Prompt as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
12
|
+
import { Prompt as O, Prompts as M } from "./prompts/index.js";
|
|
13
|
+
import H from "./sender/index.js";
|
|
14
|
+
import R from "./sender-compat/index.js";
|
|
15
|
+
import j, { SuggestionPillButton as W } from "./suggestion-pills/index.js";
|
|
16
|
+
import w from "./suggestion-popover/index.js";
|
|
17
17
|
import $ from "./theme-provider/index.js";
|
|
18
|
-
import { useTheme as
|
|
18
|
+
import { useTheme as Re } from "./theme-provider/index.js";
|
|
19
19
|
import k from "./welcome/index.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { A as
|
|
23
|
-
import { u as
|
|
24
|
-
import { _ as
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
function X(e, r) {
|
|
20
|
+
import N from "./mcp-server-picker/index.js";
|
|
21
|
+
import V from "./mcp-add-form/index.js";
|
|
22
|
+
import { A as I, S as U, _ as K, W as X, D as Y } from "./index2.js";
|
|
23
|
+
import { a as We, u as we } from "./index2.js";
|
|
24
|
+
import { _ as q, V as G } from "./index3.js";
|
|
25
|
+
var u = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(u || {});
|
|
26
|
+
function J(e, r) {
|
|
28
27
|
if (!r) return !0;
|
|
29
28
|
const o = r.split(",").map((t) => t.trim());
|
|
30
29
|
return o.includes("*") ? !0 : o.some((t) => {
|
|
@@ -37,45 +36,45 @@ function X(e, r) {
|
|
|
37
36
|
return e.type === t;
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
|
-
function
|
|
39
|
+
function v(e, r) {
|
|
41
40
|
return e.size <= r;
|
|
42
41
|
}
|
|
43
|
-
function
|
|
42
|
+
function Q(e, r) {
|
|
44
43
|
return e.length <= r;
|
|
45
44
|
}
|
|
46
45
|
function Z(e, r) {
|
|
47
46
|
const { accept: o, multiple: t, maxSize: a, maxFiles: l } = r, n = [], s = [];
|
|
48
|
-
if (!
|
|
47
|
+
if (!Q(e, l))
|
|
49
48
|
return {
|
|
50
49
|
acceptedFiles: n,
|
|
51
50
|
rejectedFiles: Array.from(e),
|
|
52
51
|
rejectionReason: {
|
|
53
|
-
code:
|
|
52
|
+
code: u.FileCountExceeded,
|
|
54
53
|
message: `文件数量不能超过 ${l} 个`
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
if (e.forEach((i) => {
|
|
58
|
-
|
|
57
|
+
J(i, o) && v(i, a) ? n.push(i) : s.push(i);
|
|
59
58
|
}), !t && n.length > 1)
|
|
60
59
|
return {
|
|
61
60
|
acceptedFiles: [],
|
|
62
61
|
rejectedFiles: n,
|
|
63
62
|
rejectionReason: {
|
|
64
|
-
code:
|
|
63
|
+
code: u.FileCountExceeded,
|
|
65
64
|
message: "只允许上传一个文件"
|
|
66
65
|
}
|
|
67
66
|
};
|
|
68
67
|
if (s.length > 0) {
|
|
69
|
-
const i = s.some((p) => !
|
|
68
|
+
const i = s.some((p) => !v(p, a)), d = i ? u.FileSizeExceeded : u.FileTypeNotAllowed, m = i ? `文件大小不能超过 ${a / 1024 / 1024}MB` : `文件类型不匹配 (accept: ${o})`;
|
|
70
69
|
return {
|
|
71
70
|
acceptedFiles: n,
|
|
72
71
|
rejectedFiles: s,
|
|
73
|
-
rejectionReason: { code:
|
|
72
|
+
rejectionReason: { code: d, message: m }
|
|
74
73
|
};
|
|
75
74
|
}
|
|
76
75
|
return { acceptedFiles: n, rejectedFiles: s, rejectionReason: null };
|
|
77
76
|
}
|
|
78
|
-
function
|
|
77
|
+
function T(e) {
|
|
79
78
|
return {
|
|
80
79
|
accept: e.accept || "*",
|
|
81
80
|
multiple: e.multiple ?? !0,
|
|
@@ -86,7 +85,7 @@ function D(e) {
|
|
|
86
85
|
disabled: e.disabled || !1
|
|
87
86
|
};
|
|
88
87
|
}
|
|
89
|
-
const
|
|
88
|
+
const Be = {
|
|
90
89
|
/**
|
|
91
90
|
* 挂载指令
|
|
92
91
|
* @param el 元素
|
|
@@ -95,7 +94,7 @@ const Se = {
|
|
|
95
94
|
mounted(e, r) {
|
|
96
95
|
let o = 0;
|
|
97
96
|
const { disabled: t, onDraggingChange: a } = r.value;
|
|
98
|
-
e.__vDropzoneOptions__ =
|
|
97
|
+
e.__vDropzoneOptions__ = T(r.value);
|
|
99
98
|
const l = {
|
|
100
99
|
/**
|
|
101
100
|
* 拖拽进入
|
|
@@ -124,22 +123,22 @@ const Se = {
|
|
|
124
123
|
var c;
|
|
125
124
|
if (t) return;
|
|
126
125
|
n.preventDefault(), o = 0, a(!1, null);
|
|
127
|
-
const s = (c = n.dataTransfer) == null ? void 0 : c.files, { onDrop: i, onError:
|
|
126
|
+
const s = (c = n.dataTransfer) == null ? void 0 : c.files, { onDrop: i, onError: d, accept: m, multiple: p, maxSize: D, maxFiles: g } = e.__vDropzoneOptions__;
|
|
128
127
|
if (s && s.length > 0) {
|
|
129
|
-
const h = Array.from(s), { acceptedFiles: f, rejectedFiles:
|
|
128
|
+
const h = Array.from(s), { acceptedFiles: f, rejectedFiles: B, rejectionReason: _ } = Z(h, {
|
|
130
129
|
accept: m,
|
|
131
130
|
multiple: p,
|
|
132
|
-
maxSize:
|
|
131
|
+
maxSize: D,
|
|
133
132
|
maxFiles: g
|
|
134
133
|
});
|
|
135
|
-
|
|
134
|
+
_ && d({ files: B, ..._ }), f.length > 0 && i(f);
|
|
136
135
|
}
|
|
137
136
|
}
|
|
138
137
|
};
|
|
139
138
|
e.__vDropzoneHandlers__ = l, e.addEventListener("dragenter", l.handleDragEnter), e.addEventListener("dragover", l.handleDragOver), e.addEventListener("dragleave", l.handleDragLeave), e.addEventListener("drop", l.handleDrop);
|
|
140
139
|
},
|
|
141
140
|
updated(e, r) {
|
|
142
|
-
e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ =
|
|
141
|
+
e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ = T(r.value));
|
|
143
142
|
},
|
|
144
143
|
/**
|
|
145
144
|
* 卸载指令
|
|
@@ -150,34 +149,34 @@ const Se = {
|
|
|
150
149
|
}
|
|
151
150
|
}, ee = [
|
|
152
151
|
F,
|
|
153
|
-
|
|
152
|
+
S,
|
|
153
|
+
b,
|
|
154
154
|
x,
|
|
155
|
+
E,
|
|
155
156
|
z,
|
|
156
157
|
C,
|
|
157
|
-
E,
|
|
158
|
-
b,
|
|
159
158
|
P,
|
|
160
|
-
L,
|
|
161
159
|
A,
|
|
160
|
+
L,
|
|
162
161
|
y,
|
|
163
|
-
H,
|
|
164
162
|
O,
|
|
165
|
-
W,
|
|
166
|
-
j,
|
|
167
163
|
M,
|
|
168
|
-
|
|
164
|
+
H,
|
|
169
165
|
R,
|
|
166
|
+
j,
|
|
167
|
+
W,
|
|
168
|
+
w,
|
|
170
169
|
$,
|
|
171
170
|
k,
|
|
171
|
+
N,
|
|
172
172
|
V,
|
|
173
173
|
I,
|
|
174
|
-
N,
|
|
175
174
|
U,
|
|
176
|
-
q,
|
|
177
175
|
K,
|
|
178
|
-
|
|
176
|
+
q,
|
|
179
177
|
G,
|
|
180
|
-
|
|
178
|
+
X,
|
|
179
|
+
Y
|
|
181
180
|
], Fe = {
|
|
182
181
|
install(e) {
|
|
183
182
|
ee.forEach((r) => {
|
|
@@ -187,71 +186,76 @@ const Se = {
|
|
|
187
186
|
}
|
|
188
187
|
};
|
|
189
188
|
export {
|
|
190
|
-
|
|
189
|
+
I as ActionButton,
|
|
191
190
|
F as Attachments,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
x as
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
191
|
+
S as Bubble,
|
|
192
|
+
b as BubbleList,
|
|
193
|
+
x as BubbleProvider,
|
|
194
|
+
xe as BubbleRendererMatchPriority,
|
|
195
|
+
Ee as BubbleRenderers,
|
|
196
|
+
K as ClearButton,
|
|
197
|
+
E as Container,
|
|
198
|
+
z as Conversations,
|
|
199
|
+
Y as DefaultActionButtons,
|
|
200
|
+
C as DragOverlay,
|
|
202
201
|
P as DropdownMenu,
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
A as Feedback,
|
|
203
|
+
L as History,
|
|
205
204
|
y as IconButton,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
V as McpAddForm,
|
|
206
|
+
N as McpServerPicker,
|
|
207
|
+
O as Prompt,
|
|
208
|
+
M as Prompts,
|
|
209
|
+
We as SENDER_CONTEXT_KEY,
|
|
210
|
+
H as Sender,
|
|
211
|
+
R as SenderCompat,
|
|
212
212
|
U as SubmitButton,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
W as SuggestionPillButton,
|
|
214
|
+
j as SuggestionPills,
|
|
215
|
+
w as SuggestionPopover,
|
|
216
216
|
$ as ThemeProvider,
|
|
217
|
-
|
|
217
|
+
I as TrActionButton,
|
|
218
218
|
F as TrAttachments,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
S as TrBubble,
|
|
220
|
+
b as TrBubbleList,
|
|
221
|
+
x as TrBubbleProvider,
|
|
222
|
+
K as TrClearButton,
|
|
223
|
+
E as TrContainer,
|
|
224
|
+
z as TrConversations,
|
|
225
|
+
Y as TrDefaultActionButtons,
|
|
226
|
+
C as TrDragOverlay,
|
|
227
227
|
P as TrDropdownMenu,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
A as TrFeedback,
|
|
229
|
+
L as TrHistory,
|
|
230
230
|
y as TrIconButton,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
V as TrMcpAddForm,
|
|
232
|
+
N as TrMcpServerPicker,
|
|
233
|
+
O as TrPrompt,
|
|
234
|
+
M as TrPrompts,
|
|
235
|
+
H as TrSender,
|
|
236
|
+
R as TrSenderCompat,
|
|
237
237
|
U as TrSubmitButton,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
W as TrSuggestionPillButton,
|
|
239
|
+
j as TrSuggestionPills,
|
|
240
|
+
w as TrSuggestionPopover,
|
|
241
241
|
$ as TrThemeProvider,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
q as TrUploadButton,
|
|
243
|
+
G as TrVoiceButton,
|
|
244
244
|
k as TrWelcome,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
Oe as WebSpeechHandler,
|
|
245
|
+
X as TrWordCounter,
|
|
246
|
+
q as UploadButton,
|
|
247
|
+
G as VoiceButton,
|
|
249
248
|
k as Welcome,
|
|
250
|
-
|
|
249
|
+
X as WordCounter,
|
|
251
250
|
Fe as default,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
251
|
+
ze as useAutoScroll,
|
|
252
|
+
Ce as useBubbleBoxRenderer,
|
|
253
|
+
Pe as useBubbleContentRenderer,
|
|
254
|
+
Ae as useBubbleStateChangeFn,
|
|
255
|
+
Le as useMessageContent,
|
|
256
|
+
ye as useOmitMessageFields,
|
|
257
|
+
we as useSenderContext,
|
|
258
|
+
Re as useTheme,
|
|
259
|
+
Me as useTouchDevice,
|
|
260
|
+
Be as vDropzone
|
|
257
261
|
};
|
package/dist/index2.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { IconSend as
|
|
4
|
-
import { TinyTooltip as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
9
|
-
throw new Error("
|
|
10
|
-
return
|
|
1
|
+
import { inject as A, defineComponent as h, computed as d, openBlock as i, createBlock as b, unref as o, withCtx as x, createElementVNode as f, normalizeClass as v, renderSlot as B, resolveDynamicComponent as D, normalizeStyle as E, createElementBlock as p, createVNode as m, toDisplayString as w, createCommentVNode as k, Transition as I } from "vue";
|
|
2
|
+
import { _ as S } from "./_plugin-vue_export-helper.js";
|
|
3
|
+
import { IconSend as P, IconStop as N, IconClear as F } from "@opentiny/tiny-robot-svgs";
|
|
4
|
+
import { TinyTooltip as T } from "@opentiny/vue";
|
|
5
|
+
const R = Symbol("sender-context");
|
|
6
|
+
function g() {
|
|
7
|
+
const a = A(R);
|
|
8
|
+
if (!a)
|
|
9
|
+
throw new Error("useSenderContext must be used within Sender component");
|
|
10
|
+
return a;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (
|
|
14
|
-
return typeof
|
|
12
|
+
function $(a) {
|
|
13
|
+
if (a)
|
|
14
|
+
return typeof a == "string" ? () => a : a;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
17
17
|
__name: "index",
|
|
18
18
|
props: {
|
|
19
19
|
icon: {},
|
|
@@ -21,13 +21,13 @@ const R = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
21
21
|
active: { type: Boolean, default: !1 },
|
|
22
22
|
tooltip: {},
|
|
23
23
|
tooltipPlacement: { default: "top" },
|
|
24
|
-
size: {
|
|
24
|
+
size: {}
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const t =
|
|
28
|
-
return (r, c) => t.tooltip ? (i(),
|
|
26
|
+
setup(a) {
|
|
27
|
+
const t = a, s = d(() => $(t.tooltip)), l = d(() => t.size ? { fontSize: typeof t.size == "number" ? `${t.size}px` : t.size } : {});
|
|
28
|
+
return (r, c) => t.tooltip ? (i(), b(o(T), {
|
|
29
29
|
key: 0,
|
|
30
|
-
"render-content":
|
|
30
|
+
"render-content": s.value,
|
|
31
31
|
placement: t.tooltipPlacement,
|
|
32
32
|
effect: "light",
|
|
33
33
|
"visible-arrow": !1,
|
|
@@ -35,49 +35,49 @@ const R = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
35
35
|
}, {
|
|
36
36
|
default: x(() => [
|
|
37
37
|
f("button", {
|
|
38
|
-
class:
|
|
38
|
+
class: v(["tr-action-button", { active: t.active }]),
|
|
39
39
|
disabled: t.disabled,
|
|
40
40
|
onFocusCapture: c[0] || (c[0] = (u) => u.stopPropagation())
|
|
41
41
|
}, [
|
|
42
|
-
|
|
43
|
-
(i(),
|
|
44
|
-
style:
|
|
42
|
+
B(r.$slots, "icon", {}, () => [
|
|
43
|
+
(i(), b(D(t.icon), {
|
|
44
|
+
style: E(l.value)
|
|
45
45
|
}, null, 8, ["style"]))
|
|
46
46
|
], !0)
|
|
47
|
-
], 42,
|
|
47
|
+
], 42, L)
|
|
48
48
|
]),
|
|
49
49
|
_: 3
|
|
50
|
-
}, 8, ["render-content", "placement"])) : (i(),
|
|
50
|
+
}, 8, ["render-content", "placement"])) : (i(), p("button", {
|
|
51
51
|
key: 1,
|
|
52
|
-
class:
|
|
52
|
+
class: v(["tr-action-button", { active: t.active }]),
|
|
53
53
|
disabled: t.disabled
|
|
54
54
|
}, [
|
|
55
|
-
|
|
56
|
-
(i(),
|
|
57
|
-
style:
|
|
55
|
+
B(r.$slots, "icon", {}, () => [
|
|
56
|
+
(i(), b(D(t.icon), {
|
|
57
|
+
style: E(l.value)
|
|
58
58
|
}, null, 8, ["style"]))
|
|
59
59
|
], !0)
|
|
60
60
|
], 10, V));
|
|
61
61
|
}
|
|
62
|
-
}), O = /* @__PURE__ */
|
|
62
|
+
}), O = /* @__PURE__ */ S(W, [["__scopeId", "data-v-01ebbab5"]]), j = {
|
|
63
63
|
key: 0,
|
|
64
|
-
class: "tr-
|
|
65
|
-
},
|
|
64
|
+
class: "tr-sender-submit-button__cancel-text"
|
|
65
|
+
}, K = /* @__PURE__ */ h({
|
|
66
66
|
__name: "index",
|
|
67
|
-
setup(
|
|
68
|
-
const { canSubmit: t, loading:
|
|
67
|
+
setup(a) {
|
|
68
|
+
const { canSubmit: t, loading: s, defaultActions: l, submit: r, cancel: c, stopText: u } = g(), _ = d(() => {
|
|
69
69
|
var e, n;
|
|
70
|
-
return (n = (e = l.value) == null ? void 0 : e.submit) != null && n.disabled ? !0 : !t.value && !
|
|
71
|
-
}), y =
|
|
70
|
+
return (n = (e = l.value) == null ? void 0 : e.submit) != null && n.disabled ? !0 : !t.value && !s.value;
|
|
71
|
+
}), y = d(() => {
|
|
72
72
|
var e, n;
|
|
73
|
-
return
|
|
74
|
-
}), z =
|
|
73
|
+
return $((n = (e = l.value) == null ? void 0 : e.submit) == null ? void 0 : n.tooltip);
|
|
74
|
+
}), z = d(() => {
|
|
75
75
|
var e, n;
|
|
76
76
|
return ((n = (e = l.value) == null ? void 0 : e.submit) == null ? void 0 : n.tooltipPlacement) ?? "top";
|
|
77
77
|
}), C = () => {
|
|
78
|
-
|
|
78
|
+
_.value || (s.value ? c() : r());
|
|
79
79
|
};
|
|
80
|
-
return (e, n) => y.value && !o(
|
|
80
|
+
return (e, n) => y.value && !o(s) ? (i(), b(o(T), {
|
|
81
81
|
key: 0,
|
|
82
82
|
"render-content": y.value,
|
|
83
83
|
placement: z.value,
|
|
@@ -87,99 +87,99 @@ const R = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
87
87
|
}, {
|
|
88
88
|
default: x(() => [
|
|
89
89
|
f("div", {
|
|
90
|
-
class:
|
|
91
|
-
"tr-
|
|
90
|
+
class: v([
|
|
91
|
+
"tr-sender-submit-button",
|
|
92
92
|
{
|
|
93
|
-
"is-disabled":
|
|
94
|
-
"is-loading": o(
|
|
93
|
+
"is-disabled": _.value,
|
|
94
|
+
"is-loading": o(s)
|
|
95
95
|
}
|
|
96
96
|
]),
|
|
97
97
|
onClick: C
|
|
98
98
|
}, [
|
|
99
|
-
|
|
99
|
+
m(o(P), { class: "tr-sender-submit-button__icon" })
|
|
100
100
|
], 2)
|
|
101
101
|
]),
|
|
102
102
|
_: 1
|
|
103
|
-
}, 8, ["render-content", "placement"])) : (i(),
|
|
103
|
+
}, 8, ["render-content", "placement"])) : (i(), p("div", {
|
|
104
104
|
key: 1,
|
|
105
|
-
class:
|
|
106
|
-
"tr-
|
|
105
|
+
class: v([
|
|
106
|
+
"tr-sender-submit-button",
|
|
107
107
|
{
|
|
108
|
-
"is-disabled":
|
|
109
|
-
"is-loading": o(
|
|
108
|
+
"is-disabled": _.value,
|
|
109
|
+
"is-loading": o(s)
|
|
110
110
|
}
|
|
111
111
|
]),
|
|
112
112
|
onClick: C
|
|
113
113
|
}, [
|
|
114
|
-
o(
|
|
114
|
+
o(s) ? (i(), p("div", {
|
|
115
115
|
key: 1,
|
|
116
|
-
class:
|
|
116
|
+
class: v(["tr-sender-submit-button__cancel", { "icon-only": !o(u) }])
|
|
117
117
|
}, [
|
|
118
|
-
|
|
119
|
-
o(u) ? (i(),
|
|
120
|
-
], 2)) : (i(),
|
|
118
|
+
m(o(N), { class: "tr-sender-submit-button__cancel-icon" }),
|
|
119
|
+
o(u) ? (i(), p("span", j, w(o(u)), 1)) : k("", !0)
|
|
120
|
+
], 2)) : (i(), b(o(P), {
|
|
121
121
|
key: 0,
|
|
122
|
-
class: "tr-
|
|
122
|
+
class: "tr-sender-submit-button__icon"
|
|
123
123
|
}))
|
|
124
124
|
], 2));
|
|
125
125
|
}
|
|
126
|
-
}),
|
|
126
|
+
}), X = /* @__PURE__ */ S(K, [["__scopeId", "data-v-4b48493a"]]), Y = /* @__PURE__ */ h({
|
|
127
127
|
__name: "index",
|
|
128
|
-
setup(
|
|
129
|
-
const { hasContent: t, clearable:
|
|
128
|
+
setup(a) {
|
|
129
|
+
const { hasContent: t, clearable: s, clear: l, loading: r, defaultActions: c } = g(), u = d(() => {
|
|
130
130
|
var e, n;
|
|
131
131
|
return ((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.disabled) !== void 0 ? c.value.clear.disabled : !1;
|
|
132
|
-
}),
|
|
132
|
+
}), _ = d(() => {
|
|
133
133
|
var e, n;
|
|
134
|
-
return
|
|
135
|
-
}), y =
|
|
134
|
+
return $((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.tooltip);
|
|
135
|
+
}), y = d(() => {
|
|
136
136
|
var e, n;
|
|
137
137
|
return ((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.tooltipPlacement) ?? "top";
|
|
138
|
-
}), z =
|
|
138
|
+
}), z = d(() => s.value && t.value && !r.value && !u.value), C = () => {
|
|
139
139
|
u.value || l();
|
|
140
140
|
};
|
|
141
|
-
return (e, n) => z.value ? (i(),
|
|
141
|
+
return (e, n) => z.value ? (i(), b(O, {
|
|
142
142
|
key: 0,
|
|
143
143
|
icon: o(F),
|
|
144
144
|
disabled: u.value,
|
|
145
|
-
tooltip:
|
|
145
|
+
tooltip: _.value,
|
|
146
146
|
"tooltip-placement": y.value,
|
|
147
147
|
onClick: C
|
|
148
148
|
}, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : k("", !0);
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), q = {
|
|
151
151
|
key: 0,
|
|
152
|
-
class: "tr-
|
|
153
|
-
},
|
|
152
|
+
class: "tr-sender-word-counter"
|
|
153
|
+
}, G = /* @__PURE__ */ h({
|
|
154
154
|
__name: "index",
|
|
155
|
-
setup(
|
|
156
|
-
const { characterCount: t, maxLength:
|
|
157
|
-
return (u,
|
|
155
|
+
setup(a) {
|
|
156
|
+
const { characterCount: t, maxLength: s, isOverLimit: l, showWordLimit: r } = g(), c = d(() => r.value && s.value !== void 0);
|
|
157
|
+
return (u, _) => c.value ? (i(), p("span", q, [
|
|
158
158
|
f("span", {
|
|
159
|
-
class:
|
|
160
|
-
},
|
|
161
|
-
f("span", null, "/" +
|
|
159
|
+
class: v({ "is-over-limit": o(l) })
|
|
160
|
+
}, w(o(t)), 3),
|
|
161
|
+
f("span", null, "/" + w(o(s)), 1)
|
|
162
162
|
])) : k("", !0);
|
|
163
163
|
}
|
|
164
|
-
}), nt = /* @__PURE__ */
|
|
164
|
+
}), nt = /* @__PURE__ */ S(G, [["__scopeId", "data-v-206396cd"]]), H = { class: "tr-default-action-buttons" }, J = {
|
|
165
165
|
key: 0,
|
|
166
166
|
class: "tr-action-buttons-group"
|
|
167
|
-
},
|
|
167
|
+
}, M = { class: "tr-submit-wrapper" }, Q = /* @__PURE__ */ h({
|
|
168
168
|
__name: "index",
|
|
169
|
-
setup(
|
|
170
|
-
const { hasContent: t, loading:
|
|
171
|
-
return (l, r) => (i(),
|
|
172
|
-
|
|
169
|
+
setup(a) {
|
|
170
|
+
const { hasContent: t, loading: s } = g();
|
|
171
|
+
return (l, r) => (i(), p("div", H, [
|
|
172
|
+
m(I, { name: "tr-slide-right" }, {
|
|
173
173
|
default: x(() => [
|
|
174
|
-
o(t) || o(
|
|
175
|
-
|
|
174
|
+
o(t) || o(s) ? (i(), p("div", J, [
|
|
175
|
+
m(I, { name: "tr-slide-right" }, {
|
|
176
176
|
default: x(() => [
|
|
177
|
-
|
|
177
|
+
m(Y)
|
|
178
178
|
]),
|
|
179
179
|
_: 1
|
|
180
180
|
}),
|
|
181
|
-
f("div",
|
|
182
|
-
|
|
181
|
+
f("div", M, [
|
|
182
|
+
m(X)
|
|
183
183
|
])
|
|
184
184
|
])) : k("", !0)
|
|
185
185
|
]),
|
|
@@ -187,13 +187,13 @@ const R = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
187
187
|
})
|
|
188
188
|
]));
|
|
189
189
|
}
|
|
190
|
-
}), ot = /* @__PURE__ */
|
|
190
|
+
}), ot = /* @__PURE__ */ S(Q, [["__scopeId", "data-v-209924d7"]]);
|
|
191
191
|
export {
|
|
192
192
|
O as A,
|
|
193
|
-
L as C,
|
|
194
193
|
ot as D,
|
|
195
|
-
|
|
194
|
+
X as S,
|
|
196
195
|
nt as W,
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
Y as _,
|
|
197
|
+
R as a,
|
|
198
|
+
g as u
|
|
199
199
|
};
|