ant-design-x-vue 1.2.6 → 1.2.7
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/index.esm.js +38731 -0
- package/dist/index.umd.js +244 -13
- package/es/_util/motion.mjs +11 -13
- package/es/attachments/Attachments2.mjs +14 -14
- package/es/attachments/FileList/FileList2.mjs +10 -12
- package/es/attachments/FileList/FileListCard.mjs +21 -21
- package/es/attachments/index.mjs +7 -4
- package/es/bubble/Bubble.mjs +11 -11
- package/es/bubble/BubbleList.mjs +28 -29
- package/es/bubble/index.mjs +10 -7
- package/es/components.mjs +31 -0
- package/es/components.ts2.mjs +35 -0
- package/es/conversations/Conversations.mjs +14 -15
- package/es/conversations/index.mjs +6 -3
- package/es/hooks.mjs +13 -0
- package/es/index.mjs +47 -36
- package/es/prompts/Prompts.mjs +16 -13
- package/es/prompts/index.mjs +6 -3
- package/es/sender/Sender.mjs +125 -109
- package/es/sender/index.mjs +9 -6
- package/es/suggestion/Suggestion.mjs +10 -10
- package/es/suggestion/index.mjs +6 -3
- package/es/theme/genStyleUtils.mjs +7 -8
- package/es/thought-chain/ThoughtChain.mjs +17 -18
- package/es/thought-chain/index.mjs +6 -3
- package/es/welcome/Welcome.mjs +5 -5
- package/es/welcome/index.mjs +6 -3
- package/es/x-provider/index.mjs +9 -6
- package/es/x-provider/index2.mjs +5 -5
- package/lib/_util/motion.js +1 -1
- package/lib/attachments/Attachments2.js +2 -2
- package/lib/attachments/FileList/FileList2.js +1 -1
- package/lib/attachments/FileList/FileListCard.js +1 -1
- package/lib/attachments/index.js +1 -1
- package/lib/bubble/Bubble.js +1 -1
- package/lib/bubble/BubbleList.js +1 -1
- package/lib/bubble/index.js +1 -1
- package/lib/components.js +1 -0
- package/lib/components.ts2.js +1 -0
- package/lib/conversations/Conversations.js +1 -1
- package/lib/conversations/index.js +1 -1
- package/lib/hooks.js +1 -0
- package/lib/index.js +1 -1
- package/lib/prompts/Prompts.js +1 -1
- package/lib/prompts/index.js +1 -1
- package/lib/sender/Sender.js +1 -1
- package/lib/sender/index.js +1 -1
- package/lib/suggestion/Suggestion.js +1 -1
- package/lib/suggestion/index.js +1 -1
- package/lib/theme/genStyleUtils.js +1 -1
- package/lib/thought-chain/ThoughtChain.js +1 -1
- package/lib/thought-chain/index.js +1 -1
- package/lib/welcome/Welcome.js +1 -1
- package/lib/welcome/index.js +1 -1
- package/lib/x-provider/index.js +1 -1
- package/lib/x-provider/index2.js +1 -1
- package/package.json +5 -4
- package/typings/attachments/index.d.ts +1 -1
- package/typings/bubble/Bubble.vue.d.ts +6 -6
- package/typings/bubble/index.d.ts +12 -12
- package/typings/components.d.ts +9 -0
- package/typings/hooks.d.ts +4 -0
- package/typings/index.d.ts +8 -13
- package/typings/prompts/interface.d.ts +1 -1
- package/typings/sender/Sender.vue.d.ts +4 -4
- package/typings/sender/SenderHeader.vue.d.ts +12 -10
- package/typings/sender/index.d.ts +19 -32
- package/typings/sender/interface.d.ts +13 -3
package/es/index.mjs
CHANGED
|
@@ -1,38 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import {
|
|
15
|
-
import { default as _ } from "./
|
|
16
|
-
import {
|
|
17
|
-
import { default as
|
|
1
|
+
import { c as o } from "./components.ts2.mjs";
|
|
2
|
+
import { default as l } from "./x-stream/x-stream.mjs";
|
|
3
|
+
import { default as d } from "./x-request/x-fetch.mjs";
|
|
4
|
+
import { default as p } from "./x-request/x-request.mjs";
|
|
5
|
+
import { XAgent as c, default as h } from "./use-x-agent/use-x-agent.mjs";
|
|
6
|
+
import { default as b } from "./use-x-chat/use-x-chat.mjs";
|
|
7
|
+
import { theme as C } from "ant-design-vue";
|
|
8
|
+
import { _ as v } from "./x-provider/index2.mjs";
|
|
9
|
+
import { defaultPrefixCls as S, default as B } from "./x-provider/hooks/use-x-provider-context.mjs";
|
|
10
|
+
import { default as k } from "./bubble/BubbleList.mjs";
|
|
11
|
+
import { default as y } from "./conversations/Conversations.mjs";
|
|
12
|
+
import { default as F } from "./welcome/Welcome.mjs";
|
|
13
|
+
import { default as O } from "./prompts/Prompts.mjs";
|
|
14
|
+
import { default as T } from "./suggestion/Suggestion.mjs";
|
|
15
|
+
import { default as _ } from "./thought-chain/ThoughtChain.mjs";
|
|
16
|
+
import { default as z } from "./bubble/index.mjs";
|
|
17
|
+
import { default as G } from "./sender/index.mjs";
|
|
18
|
+
import { default as I } from "./attachments/index.mjs";
|
|
19
|
+
const a = function(e) {
|
|
20
|
+
return Object.keys(o).forEach((r) => {
|
|
21
|
+
const t = o[r];
|
|
22
|
+
t.install && e.use(t);
|
|
23
|
+
}), e;
|
|
24
|
+
}, s = {
|
|
25
|
+
install: a
|
|
26
|
+
};
|
|
18
27
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
I as Attachments,
|
|
29
|
+
z as Bubble,
|
|
30
|
+
k as BubbleList,
|
|
31
|
+
y as Conversations,
|
|
32
|
+
O as Prompts,
|
|
33
|
+
G as Sender,
|
|
34
|
+
T as Suggestion,
|
|
35
|
+
_ as ThoughtChain,
|
|
36
|
+
F as Welcome,
|
|
37
|
+
c as XAgent,
|
|
38
|
+
d as XFetch,
|
|
39
|
+
v as XProvider,
|
|
40
|
+
p as XRequest,
|
|
41
|
+
l as XStream,
|
|
42
|
+
s as default,
|
|
43
|
+
S as defaultPrefixCls,
|
|
44
|
+
a as install,
|
|
45
|
+
C as theme,
|
|
46
|
+
h as useXAgent,
|
|
47
|
+
b as useXChat,
|
|
48
|
+
B as useXProviderContext
|
|
38
49
|
};
|
package/es/prompts/Prompts.mjs
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { defineComponent as k, mergeDefaults as x, toRef as u, useSlots as g, computed as
|
|
1
|
+
import { defineComponent as k, mergeDefaults as x, toRef as u, useSlots as g, computed as m, createVNode as a, mergeProps as I } from "vue";
|
|
2
2
|
import { a as P, c as i } from "../attachments/Attachments2.mjs";
|
|
3
3
|
import w from "./style/index.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "../x-
|
|
4
|
+
import "../x-provider/index.mjs";
|
|
5
|
+
import S from "../_util/hooks/use-x-component-config.mjs";
|
|
6
6
|
import { Typography as L } from "ant-design-vue";
|
|
7
|
-
import
|
|
7
|
+
import "./index.mjs";
|
|
8
|
+
import V from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
8
9
|
const X = /* @__PURE__ */ k({
|
|
9
10
|
name: "AXPrompts",
|
|
10
11
|
__name: "Prompts",
|
|
11
12
|
props: x({
|
|
12
13
|
items: null,
|
|
13
|
-
title:
|
|
14
|
+
title: {
|
|
15
|
+
type: Function
|
|
16
|
+
},
|
|
14
17
|
onItemClick: {
|
|
15
18
|
type: Function
|
|
16
19
|
},
|
|
@@ -34,17 +37,17 @@ const X = /* @__PURE__ */ k({
|
|
|
34
37
|
const n = g(), {
|
|
35
38
|
getPrefixCls: v,
|
|
36
39
|
direction: C
|
|
37
|
-
} =
|
|
40
|
+
} = V(), t = v("prompts", e.prefixCls), l = S("prompts"), [d, N, f] = w(t), $ = m(() => i(t, l.value.className, e.class, e.rootClassName, N.value, f, {
|
|
38
41
|
[`${t}-rtl`]: C.value === "rtl"
|
|
39
|
-
})), b =
|
|
42
|
+
})), b = m(() => i(`${t}-list`, l.value.classNames.list, e.classNames.list, {
|
|
40
43
|
[`${t}-list-wrap`]: e.wrap
|
|
41
44
|
}, {
|
|
42
45
|
[`${t}-list-vertical`]: e.vertical
|
|
43
|
-
})), o =
|
|
46
|
+
})), o = m(() => n.title ? n.title() : typeof e.title == "function" ? e.title() : e.title);
|
|
44
47
|
return () => {
|
|
45
48
|
var r;
|
|
46
49
|
return d(a("div", I(y, {
|
|
47
|
-
class:
|
|
50
|
+
class: $.value,
|
|
48
51
|
style: {
|
|
49
52
|
...typeof e.style == "object" ? e.style : {},
|
|
50
53
|
...typeof l.value.style == "object" ? l.value.style : {}
|
|
@@ -65,7 +68,7 @@ const X = /* @__PURE__ */ k({
|
|
|
65
68
|
...e.styles.list
|
|
66
69
|
}
|
|
67
70
|
}, [(r = e.items) == null ? void 0 : r.map((s, h) => {
|
|
68
|
-
const
|
|
71
|
+
const c = s.children && s.children.length > 0;
|
|
69
72
|
return a("div", {
|
|
70
73
|
key: s.key || `key_${h}`,
|
|
71
74
|
style: {
|
|
@@ -74,10 +77,10 @@ const X = /* @__PURE__ */ k({
|
|
|
74
77
|
},
|
|
75
78
|
class: i(`${t}-item`, l.value.classNames.item, e.classNames.item, {
|
|
76
79
|
[`${t}-item-disabled`]: s.disabled,
|
|
77
|
-
[`${t}-item-has-nest`]:
|
|
80
|
+
[`${t}-item-has-nest`]: c
|
|
78
81
|
}),
|
|
79
82
|
onClick: () => {
|
|
80
|
-
!
|
|
83
|
+
!c && e.onItemClick && e.onItemClick({
|
|
81
84
|
data: s
|
|
82
85
|
});
|
|
83
86
|
}
|
|
@@ -93,7 +96,7 @@ const X = /* @__PURE__ */ k({
|
|
|
93
96
|
class: `${t}-label`
|
|
94
97
|
}, [s.label]), s.description && a("p", {
|
|
95
98
|
class: `${t}-desc`
|
|
96
|
-
}, [s.description]),
|
|
99
|
+
}, [s.description]), c && a(X, {
|
|
97
100
|
class: `${t}-nested`,
|
|
98
101
|
items: s.children,
|
|
99
102
|
vertical: !0,
|
package/es/prompts/index.mjs
CHANGED
package/es/sender/Sender.mjs
CHANGED
|
@@ -1,125 +1,141 @@
|
|
|
1
|
-
import { defineComponent as ee,
|
|
2
|
-
import { a as
|
|
3
|
-
import { Input as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as ee, mergeDefaults as te, toRef as ne, useSlots as le, computed as l, ref as d, watch as ae, createVNode as a, mergeProps as oe } from "vue";
|
|
2
|
+
import { a as se, c as r } from "../attachments/Attachments2.mjs";
|
|
3
|
+
import { Input as ie, Flex as ue } from "ant-design-vue";
|
|
4
|
+
import ce from "../_util/pick-attrs.mjs";
|
|
5
5
|
import re from "../_util/hooks/use-x-component-config.mjs";
|
|
6
|
-
import
|
|
7
|
-
import "../x-provider/context.mjs";
|
|
6
|
+
import "../x-provider/index.mjs";
|
|
8
7
|
import { SenderHeaderContextProvider as fe } from "./context.mjs";
|
|
9
8
|
import { ActionButtonContextProvider as de } from "./components/ActionButton/context.mjs";
|
|
10
9
|
import me from "./components/ClearButton.mjs";
|
|
11
10
|
import D from "./components/LoadingButton.mjs";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import B from "./components/SendButton.mjs";
|
|
12
|
+
import K from "./components/SpeechButton/index.mjs";
|
|
14
13
|
import ve from "./style/index.mjs";
|
|
15
14
|
import ye from "./useSpeech.mjs";
|
|
16
15
|
import Ce from "../_util/getValue.mjs";
|
|
17
|
-
|
|
16
|
+
import he from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
17
|
+
const ze = /* @__PURE__ */ ee({
|
|
18
18
|
name: "AXSender",
|
|
19
19
|
__name: "Sender",
|
|
20
|
-
props: {
|
|
21
|
-
onKeyPress: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
props: te({
|
|
21
|
+
onKeyPress: {
|
|
22
|
+
type: Function
|
|
23
|
+
},
|
|
24
|
+
onFocus: null,
|
|
25
|
+
onBlur: null,
|
|
26
|
+
prefixCls: null,
|
|
27
|
+
defaultValue: null,
|
|
28
|
+
value: null,
|
|
27
29
|
loading: {
|
|
28
30
|
type: Boolean
|
|
29
31
|
},
|
|
30
|
-
placeholder:
|
|
32
|
+
placeholder: null,
|
|
31
33
|
readOnly: {
|
|
32
34
|
type: Boolean
|
|
33
35
|
},
|
|
34
36
|
submitType: {
|
|
35
|
-
type: [String, Boolean]
|
|
36
|
-
default: "enter"
|
|
37
|
+
type: [String, Boolean]
|
|
37
38
|
},
|
|
38
39
|
disabled: {
|
|
39
|
-
type: Boolean
|
|
40
|
-
|
|
40
|
+
type: Boolean
|
|
41
|
+
},
|
|
42
|
+
onSubmit: {
|
|
43
|
+
type: Function
|
|
41
44
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
onCancel: {},
|
|
45
|
-
onKeyDown: {},
|
|
46
|
-
onPaste: {},
|
|
47
|
-
onPasteFile: {},
|
|
48
|
-
components: {},
|
|
49
|
-
styles: {
|
|
50
|
-
default: () => ({})
|
|
45
|
+
onChange: {
|
|
46
|
+
type: Function
|
|
51
47
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
onCancel: null,
|
|
49
|
+
onKeyDown: {
|
|
50
|
+
type: Function
|
|
55
51
|
},
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
onPaste: {
|
|
53
|
+
type: Function
|
|
54
|
+
},
|
|
55
|
+
onPasteFile: {
|
|
56
|
+
type: Function
|
|
57
|
+
},
|
|
58
|
+
components: null,
|
|
59
|
+
styles: null,
|
|
60
|
+
rootClassName: null,
|
|
61
|
+
classNames: null,
|
|
62
|
+
style: null,
|
|
63
|
+
className: null,
|
|
58
64
|
actions: {
|
|
59
|
-
type: [
|
|
60
|
-
default: void 0
|
|
65
|
+
type: [Function, Boolean]
|
|
61
66
|
},
|
|
62
|
-
allowSpeech:
|
|
63
|
-
prefix: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
allowSpeech: null,
|
|
68
|
+
prefix: {
|
|
69
|
+
type: Function
|
|
70
|
+
},
|
|
71
|
+
footer: {
|
|
72
|
+
type: Function
|
|
73
|
+
},
|
|
74
|
+
header: {
|
|
75
|
+
type: Function
|
|
76
|
+
},
|
|
77
|
+
autoSize: null
|
|
78
|
+
}, {
|
|
79
|
+
styles: () => ({}),
|
|
80
|
+
classNames: () => ({}),
|
|
81
|
+
submitType: "enter",
|
|
82
|
+
actions: void 0,
|
|
83
|
+
disabled: void 0,
|
|
84
|
+
autoSize: () => ({
|
|
85
|
+
maxRows: 8
|
|
86
|
+
})
|
|
87
|
+
}),
|
|
72
88
|
emits: ["update:value"],
|
|
73
89
|
setup(e, {
|
|
74
|
-
expose:
|
|
75
|
-
emit:
|
|
90
|
+
expose: R,
|
|
91
|
+
emit: I
|
|
76
92
|
}) {
|
|
77
|
-
const V =
|
|
78
|
-
|
|
79
|
-
function
|
|
80
|
-
return Ce(t, n) ||
|
|
93
|
+
const V = se(e, ["prefixCls", "styles", "classNames", "className", "rootClassName", "style", "defaultValue", "value", "placeholder", "readOnly", "submitType", "onSubmit", "loading", "components", "onCancel", "onChange", "actions", "onKeyPress", "onKeyDown", "disabled", "allowSpeech", "prefix", "footer", "header", "onPaste", "onPasteFile", "autoSize"]);
|
|
94
|
+
ne(e, "prefixCls");
|
|
95
|
+
function T(t, n, c) {
|
|
96
|
+
return Ce(t, n) || c;
|
|
81
97
|
}
|
|
82
98
|
const m = {
|
|
83
|
-
SendButton:
|
|
99
|
+
SendButton: B,
|
|
84
100
|
ClearButton: me,
|
|
85
101
|
LoadingButton: D,
|
|
86
|
-
SpeechButton:
|
|
87
|
-
},
|
|
88
|
-
direction:
|
|
89
|
-
getPrefixCls:
|
|
90
|
-
} =
|
|
91
|
-
[`${
|
|
92
|
-
[`${
|
|
93
|
-
})),
|
|
102
|
+
SpeechButton: K
|
|
103
|
+
}, z = I, i = le(), {
|
|
104
|
+
direction: A,
|
|
105
|
+
getPrefixCls: E
|
|
106
|
+
} = he(), o = l(() => E("sender", e.prefixCls)), v = d(null), f = d(null), s = re("sender"), g = l(() => `${o.value}-input`), [k, O, p] = ve(o.value), X = l(() => r(o.value, s.value.className, e.className, e.rootClassName, O.value, p, {
|
|
107
|
+
[`${o.value}-rtl`]: A.value === "rtl",
|
|
108
|
+
[`${o.value}-disabled`]: e.disabled
|
|
109
|
+
})), L = l(() => `${o.value}-actions-btn`), S = l(() => `${o.value}-actions-list`), u = d(e.value ?? e.defaultValue ?? ""), x = (t) => {
|
|
94
110
|
u.value = t;
|
|
95
111
|
};
|
|
96
112
|
ae(() => e.value, () => {
|
|
97
113
|
x(e.value);
|
|
98
114
|
});
|
|
99
115
|
const y = (t, n) => {
|
|
100
|
-
x(t),
|
|
116
|
+
x(t), z("update:value", t), e.onChange && e.onChange(t, n);
|
|
101
117
|
}, {
|
|
102
|
-
speechPermission:
|
|
118
|
+
speechPermission: M,
|
|
103
119
|
triggerSpeech: b,
|
|
104
120
|
recording: q
|
|
105
121
|
} = ye((t) => {
|
|
106
122
|
y(`${u.value} ${t}`);
|
|
107
|
-
}, () => e.allowSpeech), H =
|
|
123
|
+
}, () => e.allowSpeech), H = T(e.components, ["input"], ie.TextArea), j = l(() => ce(V, {
|
|
108
124
|
attr: !0,
|
|
109
125
|
aria: !0,
|
|
110
126
|
data: !0
|
|
111
|
-
})),
|
|
112
|
-
...
|
|
127
|
+
})), G = l(() => ({
|
|
128
|
+
...j.value,
|
|
113
129
|
ref: f
|
|
114
130
|
})), C = () => {
|
|
115
131
|
u.value && e.onSubmit && !e.loading && e.onSubmit(u.value);
|
|
116
|
-
},
|
|
132
|
+
}, J = () => {
|
|
117
133
|
y("");
|
|
118
|
-
}, h = d(!1),
|
|
134
|
+
}, h = d(!1), Q = () => {
|
|
119
135
|
h.value = !0;
|
|
120
|
-
},
|
|
136
|
+
}, U = () => {
|
|
121
137
|
h.value = !1;
|
|
122
|
-
},
|
|
138
|
+
}, W = (t) => {
|
|
123
139
|
const n = t.key === "Enter" && !h.value;
|
|
124
140
|
switch (e.submitType) {
|
|
125
141
|
case "enter":
|
|
@@ -130,18 +146,18 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
130
146
|
break;
|
|
131
147
|
}
|
|
132
148
|
e.onKeyPress && e.onKeyPress(t);
|
|
149
|
+
}, Y = (t) => {
|
|
150
|
+
var c, w;
|
|
151
|
+
const n = (c = t.clipboardData) == null ? void 0 : c.files;
|
|
152
|
+
n != null && n.length && e.onPasteFile && (e.onPasteFile(n[0], n), t.preventDefault()), (w = e.onPaste) == null || w.call(e, t);
|
|
133
153
|
}, Z = (t) => {
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var n, r;
|
|
139
|
-
t.target !== ((n = v.value) == null ? void 0 : n.querySelector(`.${g.value}`)) && t.preventDefault(), (r = f.value) == null || r.focus();
|
|
140
|
-
}, P = a(() => {
|
|
141
|
-
let t = o(ie, {
|
|
154
|
+
var n, c;
|
|
155
|
+
t.target !== ((n = v.value) == null ? void 0 : n.querySelector(`.${g.value}`)) && t.preventDefault(), (c = f.value) == null || c.focus();
|
|
156
|
+
}, P = l(() => {
|
|
157
|
+
let t = a(ue, {
|
|
142
158
|
class: `${S.value}-presets`
|
|
143
159
|
}, {
|
|
144
|
-
default: () => [e.allowSpeech &&
|
|
160
|
+
default: () => [e.allowSpeech && a(K, null, null), e.loading ? a(D, null, null) : a(B, null, null)]
|
|
145
161
|
});
|
|
146
162
|
const n = {
|
|
147
163
|
components: m
|
|
@@ -150,19 +166,19 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
150
166
|
ori: t,
|
|
151
167
|
info: n
|
|
152
168
|
}) : typeof e.actions == "function" ? t = e.actions(t, n) : (e.actions || e.actions === !1) && (t = e.actions), t;
|
|
153
|
-
}), _ =
|
|
154
|
-
prefixCls:
|
|
169
|
+
}), _ = l(() => ({
|
|
170
|
+
prefixCls: L.value,
|
|
155
171
|
onSend: C,
|
|
156
172
|
onSendDisabled: !u.value,
|
|
157
|
-
onClear:
|
|
173
|
+
onClear: J,
|
|
158
174
|
onClearDisabled: !u.value,
|
|
159
175
|
onCancel: e.onCancel,
|
|
160
176
|
onCancelDisabled: !e.loading,
|
|
161
177
|
onSpeech: () => b(!1),
|
|
162
|
-
onSpeechDisabled: !
|
|
178
|
+
onSpeechDisabled: !M.value,
|
|
163
179
|
speechRecording: q.value,
|
|
164
180
|
disabled: e.disabled
|
|
165
|
-
})), N =
|
|
181
|
+
})), N = l(() => {
|
|
166
182
|
let t = null;
|
|
167
183
|
const n = {
|
|
168
184
|
components: m
|
|
@@ -172,8 +188,8 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
172
188
|
}) : typeof e.footer == "function" ? t = e.footer({
|
|
173
189
|
components: m
|
|
174
190
|
}) : e.footer && (t = e.footer), t;
|
|
175
|
-
}),
|
|
176
|
-
return
|
|
191
|
+
}), F = l(() => i.header ? i.header() : typeof e.header == "function" ? e.header() : e.header), $ = l(() => i.prefix ? i.prefix() : typeof e.prefix == "function" ? e.prefix() : e.prefix);
|
|
192
|
+
return R({
|
|
177
193
|
nativeElement: v.value,
|
|
178
194
|
// @ts-expect-error
|
|
179
195
|
focus: (t) => {
|
|
@@ -185,59 +201,59 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
185
201
|
var t;
|
|
186
202
|
return (t = f.value) == null ? void 0 : t.blur();
|
|
187
203
|
}
|
|
188
|
-
}), () => k(
|
|
204
|
+
}), () => k(a("div", {
|
|
189
205
|
ref: v,
|
|
190
|
-
class:
|
|
206
|
+
class: X.value,
|
|
191
207
|
style: {
|
|
192
208
|
...s.value.style,
|
|
193
209
|
...e.style
|
|
194
210
|
}
|
|
195
|
-
}, [
|
|
211
|
+
}, [F.value && a(fe, {
|
|
196
212
|
value: {
|
|
197
|
-
prefixCls:
|
|
213
|
+
prefixCls: o.value
|
|
198
214
|
}
|
|
199
215
|
}, {
|
|
200
|
-
default: () => [
|
|
201
|
-
}),
|
|
216
|
+
default: () => [F.value]
|
|
217
|
+
}), a(de, {
|
|
202
218
|
value: _.value
|
|
203
219
|
}, {
|
|
204
|
-
default: () => [
|
|
205
|
-
class: `${
|
|
206
|
-
onMousedown:
|
|
207
|
-
}, [
|
|
208
|
-
class:
|
|
220
|
+
default: () => [a("div", {
|
|
221
|
+
class: `${o.value}-content`,
|
|
222
|
+
onMousedown: Z
|
|
223
|
+
}, [$.value && a("div", {
|
|
224
|
+
class: r(`${o.value}-prefix`, s.value.classNames.prefix, e.classNames.prefix),
|
|
209
225
|
style: {
|
|
210
226
|
...s.value.styles.prefix,
|
|
211
227
|
...e.styles.prefix
|
|
212
228
|
}
|
|
213
|
-
}, [
|
|
229
|
+
}, [$.value]), a(H, oe(G.value, {
|
|
214
230
|
disabled: e.disabled,
|
|
215
231
|
style: {
|
|
216
232
|
...s.value.styles.input,
|
|
217
233
|
...e.styles.input
|
|
218
234
|
},
|
|
219
|
-
class:
|
|
235
|
+
class: r(g.value, s.value.classNames.input, e.classNames.input),
|
|
220
236
|
autoSize: e.autoSize,
|
|
221
237
|
value: u.value,
|
|
222
238
|
onChange: (t) => {
|
|
223
239
|
y(t.target.value, t), b(!0);
|
|
224
240
|
},
|
|
225
|
-
onPressEnter:
|
|
226
|
-
onCompositionstart:
|
|
227
|
-
onCompositionend:
|
|
241
|
+
onPressEnter: W,
|
|
242
|
+
onCompositionstart: Q,
|
|
243
|
+
onCompositionend: U,
|
|
228
244
|
onKeydown: e.onKeyDown,
|
|
229
245
|
placeholder: e.placeholder,
|
|
230
|
-
onPaste:
|
|
246
|
+
onPaste: Y,
|
|
231
247
|
bordered: !1,
|
|
232
248
|
readOnly: e.readOnly
|
|
233
|
-
}), null), P.value &&
|
|
234
|
-
class:
|
|
249
|
+
}), null), P.value && a("div", {
|
|
250
|
+
class: r(S.value, s.value.classNames.actions, e.classNames.actions),
|
|
235
251
|
style: {
|
|
236
252
|
...s.value.styles.actions,
|
|
237
253
|
...e.styles.actions
|
|
238
254
|
}
|
|
239
|
-
}, [P.value])]), N.value &&
|
|
240
|
-
class:
|
|
255
|
+
}, [P.value])]), N.value && a("div", {
|
|
256
|
+
class: r(`${o.value}-footer`, s.value.classNames.footer, e.classNames.footer),
|
|
241
257
|
style: {
|
|
242
258
|
...s.value.styles.footer,
|
|
243
259
|
...e.styles.footer
|
|
@@ -247,5 +263,5 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
247
263
|
}
|
|
248
264
|
});
|
|
249
265
|
export {
|
|
250
|
-
|
|
266
|
+
ze as default
|
|
251
267
|
};
|
package/es/sender/index.mjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
Header:
|
|
1
|
+
import t from "./Sender.mjs";
|
|
2
|
+
import o from "./SenderHeader.mjs";
|
|
3
|
+
const e = Object.assign(t, {
|
|
4
|
+
Header: o
|
|
5
5
|
});
|
|
6
|
+
e.install = function(n) {
|
|
7
|
+
return n.component(e.name, e), n.component(o.name, o), n;
|
|
8
|
+
};
|
|
6
9
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
e as Sender,
|
|
11
|
+
e as default
|
|
9
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as D, mergeDefaults as L, toRef as R, useSlots as X, computed as o, createVNode as h } from "vue";
|
|
2
2
|
import { c as y } from "../attachments/Attachments2.mjs";
|
|
3
|
-
import
|
|
4
|
-
import "../x-
|
|
5
|
-
import
|
|
6
|
-
import B from "../_util/hooks/use-x-component-config.mjs";
|
|
7
|
-
import I from "./style/index.mjs";
|
|
3
|
+
import "../x-provider/index.mjs";
|
|
4
|
+
import $ from "../_util/hooks/use-x-component-config.mjs";
|
|
5
|
+
import A from "./style/index.mjs";
|
|
8
6
|
import S from "../_util/hooks/use-state.mjs";
|
|
9
|
-
import
|
|
7
|
+
import { Cascader as B } from "ant-design-vue";
|
|
8
|
+
import I from "./useActive.mjs";
|
|
9
|
+
import P from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
10
10
|
const H = /* @__PURE__ */ D({
|
|
11
11
|
name: "AXSuggestion",
|
|
12
12
|
__name: "Suggestion",
|
|
@@ -43,9 +43,9 @@ const H = /* @__PURE__ */ D({
|
|
|
43
43
|
const s = X(), {
|
|
44
44
|
direction: N,
|
|
45
45
|
getPrefixCls: x
|
|
46
|
-
} =
|
|
46
|
+
} = P(), n = o(() => x("suggestion", e.prefixCls));
|
|
47
47
|
`${n.value}`;
|
|
48
|
-
const a = o(() => N.value === "rtl"), i =
|
|
48
|
+
const a = o(() => N.value === "rtl"), i = $("suggestion"), [b, c, u] = A(n), [m, w] = S(e.open), [k, F] = S(), l = (t) => {
|
|
49
49
|
var v;
|
|
50
50
|
w(t), (v = e.onOpenChange) == null || v.call(e, t);
|
|
51
51
|
}, r = (t) => {
|
|
@@ -54,7 +54,7 @@ const H = /* @__PURE__ */ D({
|
|
|
54
54
|
l(!1);
|
|
55
55
|
}, g = o(() => typeof e.items == "function" ? e.items(k.value) : e.items), C = (t) => {
|
|
56
56
|
e.onSelect && e.onSelect(t[t.length - 1]), l(!1);
|
|
57
|
-
}, [O, d] =
|
|
57
|
+
}, [O, d] = I(g, m, a, C, f), V = o(() => {
|
|
58
58
|
var t;
|
|
59
59
|
return s.default ? s.default({
|
|
60
60
|
onTrigger: r,
|
|
@@ -64,7 +64,7 @@ const H = /* @__PURE__ */ D({
|
|
|
64
64
|
onKeyDown: d
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
return () => b(h(
|
|
67
|
+
return () => b(h(B, {
|
|
68
68
|
options: g.value,
|
|
69
69
|
open: m.value,
|
|
70
70
|
value: O.value,
|
package/es/suggestion/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import i from "../_util/cssinjs-utils/util/genStyleUtils.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { unref as m } from "vue";
|
|
4
|
-
import "../x-provider/context.mjs";
|
|
5
|
-
import "ant-design-vue";
|
|
2
|
+
import "../x-provider/index.mjs";
|
|
6
3
|
import { useInternalToken as l } from "./useToken.mjs";
|
|
7
|
-
|
|
4
|
+
import { unref as m } from "vue";
|
|
5
|
+
import n from "../x-provider/hooks/use-x-provider-context.mjs";
|
|
6
|
+
const { genStyleHooks: C, genComponentStyleHook: c, genSubStyleComponent: P } = i({
|
|
8
7
|
usePrefix: () => {
|
|
9
8
|
const { getPrefixCls: e, iconPrefixCls: o } = n();
|
|
10
9
|
return {
|
|
@@ -26,7 +25,7 @@ const { genStyleHooks: c, genComponentStyleHook: P, genSubStyleComponent: d } =
|
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
c as genComponentStyleHook,
|
|
29
|
+
C as genStyleHooks,
|
|
30
|
+
P as genSubStyleComponent
|
|
32
31
|
};
|